From 54d16e601a295eb4d35947ef706b180095c12865 Mon Sep 17 00:00:00 2001 From: Isabelle <141270045+ibrandes@users.noreply.github.com> Date: Wed, 19 Nov 2025 12:56:16 -0800 Subject: [PATCH 01/26] Storage - Encoding Container Names (#47093) * implementation and some tests * wip * batch api tests * container api tests * wip * wrapping up helper tests * adding blob tests * adding datalake tests * fixing azurite failure * reverting parseNonIpUrl change * updating recordings and resolving errors * removing unecessary encode * addressing comments wip * wip * wip * addressing comments * adding onelake compatibility test * making options bag test more official * swapping onelake test to live only * removing onelake test * addressing last couple of comments --- .../azure-storage-blob-batch/CHANGELOG.md | 2 + .../azure-storage-blob-batch/assets.json | 2 +- .../azure/storage/blob/batch/BlobBatch.java | 25 +-- .../BlobBatchSetBlobAccessTierOptions.java | 3 +- .../storage/blob/batch/BatchApiTests.java | 154 ++++++++++++++++++ sdk/storage/azure-storage-blob/CHANGELOG.md | 1 + sdk/storage/azure-storage-blob/assets.json | 2 +- .../blob/BlobContainerAsyncClient.java | 3 +- .../storage/blob/BlobContainerClient.java | 3 +- .../com/azure/storage/blob/BlobUrlParts.java | 33 +++- .../blob/specialized/BlobAsyncClientBase.java | 3 +- .../blob/specialized/BlobClientBase.java | 3 +- .../com/azure/storage/blob/AzuriteTests.java | 53 +++--- .../com/azure/storage/blob/BlobApiTests.java | 15 ++ .../azure/storage/blob/BlobAsyncApiTests.java | 16 ++ .../azure/storage/blob/ContainerApiTests.java | 10 ++ .../storage/blob/ContainerAsyncApiTests.java | 10 ++ .../azure/storage/blob/ServiceApiTests.java | 3 +- .../storage/blob/ServiceAsyncApiTests.java | 3 +- .../storage/blob/specialized/HelperTests.java | 75 ++++++++- .../azure-storage-file-datalake/CHANGELOG.md | 1 + .../azure-storage-file-datalake/assets.json | 2 +- .../DataLakeFileSystemAsyncClient.java | 3 +- .../datalake/DataLakeFileSystemClient.java | 3 +- .../datalake/DataLakePathAsyncClient.java | 4 +- .../file/datalake/DataLakePathClient.java | 4 +- .../file/datalake/DirectoryApiTests.java | 6 + .../file/datalake/DirectoryAsyncApiTests.java | 8 + .../storage/file/datalake/FileApiTest.java | 7 + .../file/datalake/FileAsyncApiTests.java | 6 + .../file/datalake/FileSystemApiTests.java | 14 ++ .../datalake/FileSystemAsyncApiTests.java | 16 ++ .../file/datalake/ServiceAsyncApiTests.java | 1 - 33 files changed, 421 insertions(+), 73 deletions(-) diff --git a/sdk/storage/azure-storage-blob-batch/CHANGELOG.md b/sdk/storage/azure-storage-blob-batch/CHANGELOG.md index 13a54d704113..425197e0922f 100644 --- a/sdk/storage/azure-storage-blob-batch/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob-batch/CHANGELOG.md @@ -7,8 +7,10 @@ ### Breaking Changes ### Bugs Fixed +- Fixed an issue where `BlobBatchSetBlobAccessTierOptions` would not properly handle blob names with special characters. ### Other Changes +- Added support for container names with special characters when using OneLake. ## 12.28.0 (2025-10-21) diff --git a/sdk/storage/azure-storage-blob-batch/assets.json b/sdk/storage/azure-storage-blob-batch/assets.json index ba14e26b5311..89bf38f04c2b 100644 --- a/sdk/storage/azure-storage-blob-batch/assets.json +++ b/sdk/storage/azure-storage-blob-batch/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-blob-batch", - "Tag": "java/storage/azure-storage-blob-batch_469f26eff9" + "Tag": "java/storage/azure-storage-blob-batch_1951fdc3fd" } diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java index 7e256304b651..c83d67972bdb 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatch.java @@ -125,13 +125,14 @@ public final class BlobBatch { * * * @param containerName The container of the blob. - * @param blobName The name of the blob. + * @param blobName The name of the blob. If the blob name contains special characters, it should be URL encoded. * @return a {@link Response} that will be used to associate this operation to the response when the batch is * submitted. * @throws UnsupportedOperationException If this batch has already added an operation of another type. */ public Response deleteBlob(String containerName, String blobName) { - return deleteBlobHelper(containerName + "/" + Utility.urlEncode(Utility.urlDecode(blobName)), null, null); + return deleteBlobHelper(Utility.urlEncode(containerName) + "/" + Utility.urlEncode(Utility.urlDecode(blobName)), + null, null); } /** @@ -149,7 +150,7 @@ public Response deleteBlob(String containerName, String blobName) { * * * @param containerName The container of the blob. - * @param blobName The name of the blob. + * @param blobName The name of the blob. If the blob name contains special characters, it should be URL encoded. * @param deleteOptions Delete options for the blob and its snapshots. * @param blobRequestConditions Additional access conditions that must be met to allow this operation. * @return a {@link Response} that will be used to associate this operation to the response when the batch is @@ -158,8 +159,8 @@ public Response deleteBlob(String containerName, String blobName) { */ public Response deleteBlob(String containerName, String blobName, DeleteSnapshotsOptionType deleteOptions, BlobRequestConditions blobRequestConditions) { - return deleteBlobHelper(containerName + "/" + Utility.urlEncode(Utility.urlDecode(blobName)), deleteOptions, - blobRequestConditions); + return deleteBlobHelper(Utility.urlEncode(containerName) + "/" + Utility.urlEncode(Utility.urlDecode(blobName)), + deleteOptions, blobRequestConditions); } /** @@ -227,15 +228,16 @@ private Response deleteBlobHelper(String urlPath, DeleteSnapshotsOptionTyp * * * @param containerName The container of the blob. - * @param blobName The name of the blob. + * @param blobName The name of the blob. If the blob name contains special characters, it should be URL encoded. * @param accessTier The tier to set on the blob. * @return a {@link Response} that will be used to associate this operation to the response when the batch is * submitted. * @throws UnsupportedOperationException If this batch has already added an operation of another type. */ public Response setBlobAccessTier(String containerName, String blobName, AccessTier accessTier) { - return setBlobAccessTierHelper(containerName + "/" + Utility.urlEncode(Utility.urlDecode(blobName)), accessTier, - null, null, null); + return setBlobAccessTierHelper( + Utility.urlEncode(containerName) + "/" + Utility.urlEncode(Utility.urlDecode(blobName)), accessTier, null, + null, null); } /** @@ -251,7 +253,7 @@ public Response setBlobAccessTier(String containerName, String blobName, A * * * @param containerName The container of the blob. - * @param blobName The name of the blob. + * @param blobName The name of the blob. If the blob name contains special characters, it should be URL encoded. * @param accessTier The tier to set on the blob. * @param leaseId The lease ID the active lease on the blob must match. * @return a {@link Response} that will be used to associate this operation to the response when the batch is @@ -260,8 +262,9 @@ public Response setBlobAccessTier(String containerName, String blobName, A */ public Response setBlobAccessTier(String containerName, String blobName, AccessTier accessTier, String leaseId) { - return setBlobAccessTierHelper(containerName + "/" + Utility.urlEncode(Utility.urlDecode(blobName)), accessTier, - null, leaseId, null); + return setBlobAccessTierHelper( + Utility.urlEncode(containerName) + "/" + Utility.urlEncode(Utility.urlDecode(blobName)), accessTier, null, + leaseId, null); } /** diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/options/BlobBatchSetBlobAccessTierOptions.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/options/BlobBatchSetBlobAccessTierOptions.java index c5be9d7549c2..e082df092eae 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/options/BlobBatchSetBlobAccessTierOptions.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/options/BlobBatchSetBlobAccessTierOptions.java @@ -89,7 +89,8 @@ public String getBlobName() { * @return Identifier of the blob to set its access tier. */ public String getBlobIdentifier() { - String basePath = blobUrlParts.getBlobContainerName() + "/" + blobUrlParts.getBlobName(); + String basePath = Utility.urlEncode(blobUrlParts.getBlobContainerName()) + "/" + + Utility.urlEncode(blobUrlParts.getBlobName()); String snapshot = blobUrlParts.getSnapshot(); String versionId = blobUrlParts.getVersionId(); if (snapshot != null && versionId != null) { diff --git a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/BatchApiTests.java b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/BatchApiTests.java index bbb4c4c55105..fc73d04fe5c3 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/BatchApiTests.java +++ b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/BatchApiTests.java @@ -20,6 +20,7 @@ import com.azure.storage.blob.specialized.BlobClientBase; import com.azure.storage.blob.specialized.BlockBlobClient; import com.azure.storage.blob.specialized.PageBlobClient; +import com.azure.storage.common.Utility; import com.azure.storage.common.sas.AccountSasPermission; import com.azure.storage.common.sas.AccountSasResourceType; import com.azure.storage.common.sas.AccountSasService; @@ -794,4 +795,157 @@ public void submitBatchWithContainerSasCredentialsError() { = assertThrows(BlobBatchStorageException.class, () -> batchClient.submitBatch(batch)); assertEquals(2, getIterableSize(ex.getBatchExceptions())); } + + // Tests container name encoding for BlobBatch.deleteBlob. Container names with special characters are not supported + // by the service, however, the names should still be encoded. + @Test + public void deleteBlobContainerNameEncoding() { + String containerName = "my container"; + String blobName = generateBlobName(); + + BlobBatch batch = batchClient.getBlobBatch(); + Response response = batch.deleteBlob(containerName, blobName); + + assertThrows(BlobBatchStorageException.class, () -> batchClient.submitBatch(batch)); + BlobStorageException temp = assertThrows(BlobStorageException.class, response::getRequest); + + assertTrue(temp.getResponse().getRequest().getUrl().toString().contains("my%20container")); + } + + // Tests blob name encoding for BlobBatch.deleteBlob. + @Test + public void deleteBlobNameEncoding() { + String containerName = generateContainerName(); + String blobName = generateBlobName() + "enc!"; + BlobContainerClient containerClient = primaryBlobServiceClient.createBlobContainer(containerName); + containerClient.getBlobClient(blobName).getPageBlobClient().create(0); + + BlobBatch batch = batchClient.getBlobBatch(); + Response response = batch.deleteBlob(containerName, blobName); + batchClient.submitBatch(batch); + + assertEquals(202, response.getStatusCode()); + } + + // Tests container name encoding for BlobBatch.setBlobAccessTier. Container names with special characters are not supported + // by the service, however, the names should still be encoded. + @Test + public void setTierContainerNameEncoding() { + String containerName = "my container"; + String blobName = generateBlobName(); + + BlobBatch batch = batchClient.getBlobBatch(); + Response response = batch.setBlobAccessTier(containerName, blobName, AccessTier.HOT); + + assertThrows(BlobBatchStorageException.class, () -> batchClient.submitBatch(batch)); + BlobStorageException temp = assertThrows(BlobStorageException.class, response::getRequest); + + assertTrue(temp.getResponse().getRequest().getUrl().toString().contains("my%20container")); + } + + // Tests blob name encoding for BlobBatch.setBlobAccessTier + @Test + public void setTierBlobNameEncoding() { + String containerName = generateContainerName(); + String blobName = generateBlobName() + "enc!"; + BlobContainerClient containerClient = primaryBlobServiceClient.createBlobContainer(containerName); + containerClient.getBlobClient(blobName).getBlockBlobClient().upload(DATA.getDefaultBinaryData()); + + BlobBatch batch = batchClient.getBlobBatch(); + Response response = batch.setBlobAccessTier(containerName, blobName, AccessTier.HOT); + batchClient.submitBatch(batch); + + assertEquals(200, response.getStatusCode()); + } + + // Tests container name encoding for BlobBatchSetBlobAccessTierOptions constructor. Container names with special characters are not supported + // by the service, however, the names should still be encoded. + @Test + public void setTierContainerNameEncodingOptionsConstructor() { + String containerName = "my container"; + String blobName = generateBlobName(); + + BlobBatch batch = batchClient.getBlobBatch(); + BlobBatchSetBlobAccessTierOptions options + = new BlobBatchSetBlobAccessTierOptions(containerName, blobName, AccessTier.HOT); + Response response = batch.setBlobAccessTier(options); + + assertThrows(BlobBatchStorageException.class, () -> batchClient.submitBatch(batch)); + BlobStorageException temp = assertThrows(BlobStorageException.class, response::getRequest); + + assertTrue(temp.getResponse().getRequest().getUrl().toString().contains("my%20container")); + } + + //Tests blob name encoding for BlobBatchSetBlobAccessTierOptions constructor + @Test + public void setTierBlobNameEncodingOptionsConstructor() { + String containerName = generateContainerName(); + String blobName = generateBlobName() + "enc!"; + BlobContainerClient containerClient = primaryBlobServiceClient.createBlobContainer(containerName); + containerClient.getBlobClient(blobName).getBlockBlobClient().upload(DATA.getDefaultBinaryData()); + + BlobBatch batch = batchClient.getBlobBatch(); + BlobBatchSetBlobAccessTierOptions options + = new BlobBatchSetBlobAccessTierOptions(containerName, blobName, AccessTier.HOT); + Response response = batch.setBlobAccessTier(options); + batchClient.submitBatch(batch); + + assertEquals(200, response.getStatusCode()); + String identifier = options.getBlobIdentifier(); + assertTrue(identifier.contains(Utility.urlEncode(blobName))); + } + + // Tests getters return unencoded names (constructor with separate names) + @Test + public void getBlobNameAndContainerNameOptionsConstructor() { + String containerName = "my container"; + String blobName = "my blob"; + + BlobBatchSetBlobAccessTierOptions options + = new BlobBatchSetBlobAccessTierOptions(containerName, blobName, AccessTier.HOT); + + assertEquals(containerName, options.getBlobContainerName()); + assertEquals(blobName, options.getBlobName()); + + String identifier = options.getBlobIdentifier(); + assertTrue(identifier.contains("my%20container")); + assertTrue(identifier.contains("my%20blob")); + } + + // Tests getters return unencoded names (constructor with full blob URL) + @Test + public void getBlobNameAndContainerNameUrlConstructor() { + String containerName = "my container"; + String blobName = "my blob"; + BlockBlobClient blockBlobClient = primaryBlobServiceClient.getBlobContainerClient(containerName) + .getBlobClient(blobName) + .getBlockBlobClient(); + + BlobBatchSetBlobAccessTierOptions options + = new BlobBatchSetBlobAccessTierOptions(blockBlobClient.getBlobUrl(), AccessTier.HOT); + + assertEquals(containerName, options.getBlobContainerName()); + assertEquals(blobName, options.getBlobName()); + + String identifier = options.getBlobIdentifier(); + assertTrue(identifier.contains("my%20container")); + assertTrue(identifier.contains("my%20blob")); + } + + @Test + public void blobBatchSetBlobAccessTierOptionsHandlesSpecialChars() { + String blobName = "my blob"; + String containerName = generateContainerName(); + + BlobBatch batch = batchClient.getBlobBatch(); + BlobContainerClient containerClient = primaryBlobServiceClient.createBlobContainer(containerName); + + BlobClient blobClient1 = containerClient.getBlobClient(blobName); + blobClient1.getBlockBlobClient().upload(DATA.getDefaultBinaryData()); + + Response response + = batch.setBlobAccessTier(new BlobBatchSetBlobAccessTierOptions(containerName, blobName, AccessTier.HOT)); + batchClient.submitBatch(batch); + assertEquals(200, response.getStatusCode()); + } } diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index 82d611ab9c57..d3145dd28c8e 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -9,6 +9,7 @@ ### Bugs Fixed ### Other Changes +- Added support for container names with special characters when using OneLake. ## 12.32.0 (2025-10-21) diff --git a/sdk/storage/azure-storage-blob/assets.json b/sdk/storage/azure-storage-blob/assets.json index 5b08c54952d8..82f1a7906dca 100644 --- a/sdk/storage/azure-storage-blob/assets.json +++ b/sdk/storage/azure-storage-blob/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-blob", - "Tag": "java/storage/azure-storage-blob_16534d98da" + "Tag": "java/storage/azure-storage-blob_c018337a13" } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java index fe495a008ace..540ade6b8e06 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerAsyncClient.java @@ -50,6 +50,7 @@ import com.azure.storage.blob.options.FindBlobsOptions; import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; import reactor.core.publisher.Mono; @@ -220,7 +221,7 @@ public String getAccountUrl() { * @return the URL. */ public String getBlobContainerUrl() { - return azureBlobStorage.getUrl() + "/" + containerName; + return azureBlobStorage.getUrl() + "/" + Utility.urlEncode(containerName); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java index db4f2cc8bb51..12ff712b405c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobContainerClient.java @@ -53,6 +53,7 @@ import com.azure.storage.blob.options.FindBlobsOptions; import com.azure.storage.blob.sas.BlobServiceSasSignatureValues; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; @@ -232,7 +233,7 @@ public String getAccountUrl() { * @return the URL. */ public String getBlobContainerUrl() { - return azureBlobStorage.getUrl() + "/" + containerName; + return azureBlobStorage.getUrl() + "/" + Utility.urlEncode(containerName); } /** diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java index bad85339ebe8..4378e774affa 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java @@ -110,27 +110,40 @@ public BlobUrlParts setHost(String host) { } /** - * Gets the container name that will be used as part of the URL path. + * Gets the decoded container name that will be used as part of the URL path. + *

Note: + * This value may differ from the original value provided to {@link #setContainerName(String)} + * because the setter and getter do not guarantee round-trip consistency. + * This behavior is intentional to normalize names that may or may not be URL encoded.

* - * @return the container name. + * @return the decoded container name. */ public String getBlobContainerName() { - return containerName; + return (containerName == null) ? null : Utility.urlDecode(containerName); } /** * Sets the container name that will be used as part of the URL path. + *

Note: + * The setter and getter do not guarantee round-trip consistency. + * This is because container names with special characters may need URL encoding, + * and this method normalizes the input by decoding and then encoding it. + * If the container name contains special characters, it is recommended to URL encode it.

* - * @param containerName The container nme. + * @param containerName The container name. If the container name contains special characters, it should be URL encoded. * @return the updated BlobUrlParts object. */ public BlobUrlParts setContainerName(String containerName) { - this.containerName = containerName; + this.containerName = Utility.urlEncode(Utility.urlDecode(containerName)); return this; } /** - * Decodes and gets the blob name that will be used as part of the URL path. + * Gets the decoded blob name that will be used as part of the URL path. + *

Note: + * This value may differ from the original value provided to {@link #setBlobName(String)} + * because the setter and getter do not guarantee round-trip consistency. + * This behavior is intentional to normalize names that may or may not be URL encoded.

* * @return the decoded blob name. */ @@ -140,9 +153,13 @@ public String getBlobName() { /** * Sets the blob name that will be used as part of the URL path. + *

Note: + * The setter and getter do not guarantee round-trip consistency. + * This is because blob names with special characters may need URL encoding, + * and this method normalizes the input by decoding and then encoding it. + * If the blob name contains special characters, it is recommended to URL encode it.

* - * @param blobName The blob name. If the blob name contains special characters, pass in the url encoded version - * of the blob name. + * @param blobName The blob name. If the blob name contains special characters, it should be URL encoded. * @return the updated BlobUrlParts object. */ public BlobUrlParts setBlobName(String blobName) { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java index 812fabc80214..bb2df93aabdd 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobAsyncClientBase.java @@ -337,7 +337,8 @@ public String getAccountUrl() { * @return the URL. */ public String getBlobUrl() { - String blobUrl = azureBlobStorage.getUrl() + "/" + containerName + "/" + Utility.urlEncode(blobName); + String blobUrl + = azureBlobStorage.getUrl() + "/" + Utility.urlEncode(containerName) + "/" + Utility.urlEncode(blobName); if (this.isSnapshot()) { blobUrl = Utility.appendQueryParameter(blobUrl, "snapshot", getSnapshotId()); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java index c13a9a0565de..e76e752f0f86 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobClientBase.java @@ -307,7 +307,8 @@ public String getAccountUrl() { * @return the URL. */ public String getBlobUrl() { - String blobUrl = azureBlobStorage.getUrl() + "/" + containerName + "/" + Utility.urlEncode(blobName); + String blobUrl + = azureBlobStorage.getUrl() + "/" + Utility.urlEncode(containerName) + "/" + Utility.urlEncode(blobName); if (this.isSnapshot()) { blobUrl = Utility.appendQueryParameter(blobUrl, "snapshot", getSnapshotId()); } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/AzuriteTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/AzuriteTests.java index 37ec30e767fd..70486f962d50 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/AzuriteTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/AzuriteTests.java @@ -52,9 +52,9 @@ private BlobServiceClient getAzuriteServiceClient(String azuriteEndpoint) { } private static void validateBlobClient(BlobClientBase client, String blobUrl) { - assertEquals(client.getAccountName(), "devstoreaccount1"); - assertEquals(client.getContainerName(), "container"); - assertEquals(client.getBlobName(), "blob"); + assertEquals("devstoreaccount1", client.getAccountName()); + assertEquals("container", client.getContainerName()); + assertEquals("blob", client.getBlobName()); assertEquals(client.getBlobUrl(), blobUrl); } @@ -64,12 +64,12 @@ public void azuriteURLParser(String endpoint, String scheme, String host, String String blobContainerName, String blobName, String expectedUrl) throws MalformedURLException { BlobUrlParts parts = BlobUrlParts.parse(new URL(endpoint)); - assertEquals(parts.getScheme(), scheme); - assertEquals(parts.getHost(), host); - assertEquals(parts.getAccountName(), accountName); - assertEquals(parts.getBlobContainerName(), blobContainerName); - assertEquals(parts.getBlobName(), blobName); - assertEquals(parts.toUrl().toString(), expectedUrl); + assertEquals(scheme, parts.getScheme()); + assertEquals(host, parts.getHost()); + assertEquals(accountName, parts.getAccountName()); + assertEquals(blobContainerName, parts.getBlobContainerName()); + assertEquals(blobName, parts.getBlobName()); + assertEquals(expectedUrl, parts.toUrl().toString()); } private static Stream azuriteURLParserSupplier() { @@ -107,7 +107,6 @@ private static Stream azuriteURLParserSupplier() { Arguments.of("http://azure-storage-emulator-azurite:10000/devstoreaccount1/container/blob", "http", "azure-storage-emulator-azurite:10000", "devstoreaccount1", "container", "blob", "http://azure-storage-emulator-azurite:10000/devstoreaccount1/container/blob")); - } @ParameterizedTest @@ -121,8 +120,8 @@ public void useDevelopmentStorageTrue(int index) { .httpClient(getHttpClient()) .buildClient(); - assertEquals(serviceClient.getAccountUrl(), AZURITE_ENDPOINTS[index]); - assertEquals(serviceClient.getAccountName(), "devstoreaccount1"); + assertEquals(AZURITE_ENDPOINTS[index], serviceClient.getAccountUrl()); + assertEquals("devstoreaccount1", serviceClient.getAccountName()); // cleanup: if (originalUseDevelopmentStorage != null) { @@ -137,8 +136,8 @@ public void useDevelopmentStorageTrue(int index) { public void azuriteURLConstructingServiceClient(int index) { BlobServiceClient serviceClient = getAzuriteServiceClient(AZURITE_ENDPOINTS[index]); - assertEquals(serviceClient.getAccountUrl(), AZURITE_ENDPOINTS[index]); - assertEquals(serviceClient.getAccountName(), "devstoreaccount1"); + assertEquals(AZURITE_ENDPOINTS[index], serviceClient.getAccountUrl()); + assertEquals("devstoreaccount1", serviceClient.getAccountName()); } @ParameterizedTest @@ -147,9 +146,9 @@ public void azuriteURLGetContainerClient(int index) { BlobContainerClient containerClient = getAzuriteServiceClient(AZURITE_ENDPOINTS[index]).getBlobContainerClient("container"); - assertEquals(containerClient.getAccountName(), "devstoreaccount1"); - assertEquals(containerClient.getBlobContainerName(), "container"); - assertEquals(containerClient.getBlobContainerUrl(), AZURITE_ENDPOINTS[index] + "/container"); + assertEquals("devstoreaccount1", containerClient.getAccountName()); + assertEquals("container", containerClient.getBlobContainerName()); + assertEquals(AZURITE_ENDPOINTS[index] + "/container", containerClient.getBlobContainerUrl()); } @ParameterizedTest @@ -161,9 +160,9 @@ public void azuriteURLConstructContainerClient(int index) { .httpClient(getHttpClient()) .buildClient(); - assertEquals(containerClient.getAccountName(), "devstoreaccount1"); - assertEquals(containerClient.getBlobContainerName(), "container"); - assertEquals(containerClient.getBlobContainerUrl(), AZURITE_ENDPOINTS[index] + "/container"); + assertEquals("devstoreaccount1", containerClient.getAccountName()); + assertEquals("container", containerClient.getBlobContainerName()); + assertEquals(AZURITE_ENDPOINTS[index] + "/container", containerClient.getBlobContainerUrl()); } @ParameterizedTest @@ -175,9 +174,9 @@ public void azuriteURLConstructContainerClientWithDefaultAzureCredential(int ind .httpClient(getHttpClient()) .buildClient(); - assertEquals(containerClient.getAccountName(), "devstoreaccount1"); - assertEquals(containerClient.getBlobContainerName(), "container"); - assertEquals(containerClient.getBlobContainerUrl(), AZURITE_ENDPOINTS[index] + "/container"); + assertEquals("devstoreaccount1", containerClient.getAccountName()); + assertEquals("container", containerClient.getBlobContainerName()); + assertEquals(AZURITE_ENDPOINTS[index] + "/container", containerClient.getBlobContainerUrl()); } @ParameterizedTest @@ -248,13 +247,13 @@ public void azuriteURLGetLeaseClient(int index) { BlobLeaseClient containerLeaseClient = new BlobLeaseClientBuilder().containerClient(containerClient).buildClient(); - assertEquals(containerLeaseClient.getAccountName(), "devstoreaccount1"); - assertEquals(containerLeaseClient.getResourceUrl(), AZURITE_ENDPOINTS[index] + "/container"); + assertEquals("devstoreaccount1", containerLeaseClient.getAccountName()); + assertEquals(AZURITE_ENDPOINTS[index] + "/container", containerLeaseClient.getResourceUrl()); BlobLeaseClient blobLeaseClient = new BlobLeaseClientBuilder().blobClient(blobClient).buildClient(); - assertEquals(blobLeaseClient.getAccountName(), "devstoreaccount1"); - assertEquals(blobLeaseClient.getResourceUrl(), AZURITE_ENDPOINTS[index] + "/container/blob"); + assertEquals("devstoreaccount1", blobLeaseClient.getAccountName()); + assertEquals(AZURITE_ENDPOINTS[index] + "/container/blob", blobLeaseClient.getResourceUrl()); } @Disabled("Enable once the April 2023 release of azure-core-http-netty happens") diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java index 9468a0320ff0..ef01e27eef7c 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java @@ -3108,4 +3108,19 @@ public void copyFromUriSourceBearerTokenFileSource() throws IOException { deleteFileShareWithoutDependency(shareName); } + @Test + public void blobNameEncodingOnGetBlobUrl() { + BlobClient blobClient = cc.getBlobClient("my blob"); + String expectedEncodedBlobName = "my%20blob"; + assertTrue(blobClient.getBlobUrl().contains(expectedEncodedBlobName)); + } + + @Test + void containerNameEncodingOnGetBlobUrl() { + BlobContainerClient containerClient = primaryBlobServiceClient.getBlobContainerClient("my container"); + BlobClient blobClient = containerClient.getBlobClient(generateBlobName()); + String expectedEncodedContainerName = "my%20container"; + assertTrue(blobClient.getBlobUrl().contains(expectedEncodedContainerName)); + } + } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java index ddadd611584f..2c27dbb8f110 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java @@ -2882,4 +2882,20 @@ public void copyFromUriSourceBearerTokenFileSource() throws IOException { deleteFileShareWithoutDependency(shareName); } + @Test + public void blobNameEncodingOnGetBlobUrl() { + BlobAsyncClient blobClient = ccAsync.getBlobAsyncClient("my blob"); + String expectedEncodedBlobName = "my%20blob"; + assertTrue(blobClient.getBlobUrl().contains(expectedEncodedBlobName)); + } + + @Test + void containerNameEncodingOnGetBlobUrl() { + BlobContainerAsyncClient containerClient + = primaryBlobServiceAsyncClient.getBlobContainerAsyncClient("my container"); + BlobAsyncClient blobClient = containerClient.getBlobAsyncClient(generateBlobName()); + String expectedEncodedContainerName = "my%20container"; + assertTrue(blobClient.getBlobUrl().contains(expectedEncodedContainerName)); + } + } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index 795256b5dc76..377e3378fb83 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -1970,6 +1970,16 @@ public void invalidServiceVersion() { assertTrue(exception.getMessage().contains(INVALID_VERSION_HEADER_MESSAGE)); } + // Tests that the container name is URL encoded. Container names with special characters are not supported + // by the service, however, the names should still be encoded. + @Test + public void getBlobContainerUrlEncodesContainerName() { + String containerName = "my container"; + BlobContainerClient containerClient = primaryBlobServiceClient.getBlobContainerClient(containerName); + + assertTrue(containerClient.getBlobContainerUrl().contains("my%20container")); + } + // TODO: Reintroduce these tests once service starts supporting it. // public void Rename() { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java index 29de85829240..ed2ea12103d0 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java @@ -2094,4 +2094,14 @@ public void invalidServiceVersion() { }); } + // Tests that the container name is URL encoded. Container names with special characters are not supported + // by the service, however, the names should still be encoded. + @Test + public void getBlobContainerUrlEncodesContainerName() { + String containerName = "my container"; + BlobContainerAsyncClient containerClient + = primaryBlobServiceAsyncClient.getBlobContainerAsyncClient(containerName); + + assertTrue(containerClient.getBlobContainerUrl().contains("my%20container")); + } } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceApiTests.java index f578cae2408c..759c01b31fe7 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceApiTests.java @@ -1106,8 +1106,7 @@ public void sasTokenDoesNotShowUpOnInvalidUri(String service, String container) /* Note: the check is on the blob builder as well but I can't test it this way since we encode all blob names - so it will not be invalid. */ private static Stream sasTokenDoesNotShowUpOnInvalidUriSupplier() { - return Stream.of(Arguments.of("https://doesntmatter. blob.core.windows.net", "containername"), - Arguments.of("https://doesntmatter.blob.core.windows.net", "container name")); + return Stream.of(Arguments.of("https://doesntmatter. blob.core.windows.net", "containername")); } @Test diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAsyncApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAsyncApiTests.java index fb5ab8529038..aceec08acab5 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ServiceAsyncApiTests.java @@ -1046,8 +1046,7 @@ public void sasTokenDoesNotShowUpOnInvalidUri(String service, String container) /* Note: the check is on the blob builder as well but I can't test it this way since we encode all blob names - so it will not be invalid. */ private static Stream sasTokenDoesNotShowUpOnInvalidUriSupplier() { - return Stream.of(Arguments.of("https://doesntmatter. blob.core.windows.net", "containername"), - Arguments.of("https://doesntmatter.blob.core.windows.net", "container name")); + return Stream.of(Arguments.of("https://doesntmatter. blob.core.windows.net", "containername")); } @Test diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTests.java index 29449f6b65be..73300131d722 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/HelperTests.java @@ -37,6 +37,7 @@ import java.util.stream.Stream; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -119,13 +120,13 @@ public void blobURLParts() { String[] splitParts = parts.toUrl().toString().split("\\?"); // Ensure that there is only one question mark even when sas and snapshot are present - assertEquals(splitParts.length, 2); - assertEquals(splitParts[0], "http://host/container/blob"); + assertEquals(2, splitParts.length); + assertEquals("http://host/container/blob", splitParts[0]); assertTrue(splitParts[1].contains("snapshot=snapshot")); assertTrue(splitParts[1].contains("sp=r")); assertTrue(splitParts[1].contains("sig=")); assertTrue(splitParts[1].contains("ses=encryptionScope")); - assertEquals(splitParts[1].split("&").length, 7); // snapshot & sv & sr & sp & sig & ses + assertEquals(7, splitParts[1].split("&").length); // snapshot & sv & sr & sp & sig & ses } @Test @@ -134,7 +135,7 @@ public void blobURLPartsImplicitRoot() { BlobUrlParts implParts = BlobUrlParts.parse(bup.toUrl()); - assertEquals(implParts.getBlobContainerName(), BlobContainerAsyncClient.ROOT_CONTAINER_NAME); + assertEquals(BlobContainerAsyncClient.ROOT_CONTAINER_NAME, implParts.getBlobContainerName()); } @Test @@ -144,11 +145,11 @@ public void utilityConvertStreamToBufferReplayable() { Flux flux = Utility.convertStreamToByteBuffer(new ByteArrayInputStream(data), 1024, 1024, true); StepVerifier.create(flux) - .assertNext(buffer -> assertEquals(buffer.compareTo(ByteBuffer.wrap(data)), 0)) + .assertNext(buffer -> assertEquals(0, buffer.compareTo(ByteBuffer.wrap(data)))) .verifyComplete(); // subscribe multiple times and ensure data is same each time StepVerifier.create(flux) - .assertNext(buffer -> assertEquals(buffer.compareTo(ByteBuffer.wrap(data)), 0)) + .assertNext(buffer -> assertEquals(0, buffer.compareTo(ByteBuffer.wrap(data)))) .verifyComplete(); } @@ -165,11 +166,11 @@ public void utilityConvertStreamToBufferAvailable() { //then: "When the stream is the right length but available always returns > 0, do not throw" StepVerifier.create(flux) - .assertNext(buffer -> assertEquals(buffer.compareTo(ByteBuffer.wrap(data)), 0)) + .assertNext(buffer -> assertEquals(0, buffer.compareTo(ByteBuffer.wrap(data)))) .verifyComplete(); // subscribe multiple times and ensure data is same each time StepVerifier.create(flux) - .assertNext(buffer -> assertEquals(buffer.compareTo(ByteBuffer.wrap(data)), 0)) + .assertNext(buffer -> assertEquals(0, buffer.compareTo(ByteBuffer.wrap(data)))) .verifyComplete(); //when: "When the stream is actually longer than the length, throw" @@ -204,4 +205,62 @@ public void pageListCustomDeserializer() throws IOException { assertEquals(2, pageList.getPageRange().size()); assertEquals(1, pageList.getClearRange().size()); } + + // Tests that container names are properly URL decoded when retrieved from BlobUrlParts. Container names with + // special characters are not supported by the service, however, the names should still be encoded. + @Test + public void containerNameDecodingOnGet() { + BlobUrlParts parts = new BlobUrlParts().setScheme("http").setHost("host").setContainerName("my%20container"); + assertEquals("my container", parts.getBlobContainerName()); + // URL should retain the encoded form supplied by caller + assertTrue(parts.toUrl().toString().contains("my%20container")); + } + + @Test + public void blobNameDecodingOnGet() { + BlobUrlParts parts = new BlobUrlParts().setScheme("http").setHost("host").setBlobName("my%20blob"); + assertEquals("my blob", parts.getBlobName()); + // URL should retain the encoded form supplied by caller + assertTrue(parts.toUrl().toString().contains("my%20blob")); + } + + // Tests that blob names are automatically URL encoded when set in BlobUrlParts. + @Test + public void setBlobNameEncodedInURL() { + BlobUrlParts parts = new BlobUrlParts().setScheme("http").setHost("host").setBlobName("my blob"); + assertEquals("my blob", parts.getBlobName()); + String url = parts.toUrl().toString(); + assertFalse(url.contains("my blob")); + assertTrue(url.contains("my%20blob")); + } + + // Tests that container names are automatically URL encoded when set in BlobUrlParts. + @Test + public void setContainerNameEncodedInURL() { + BlobUrlParts parts = new BlobUrlParts().setScheme("http").setHost("host").setContainerName("my container"); + assertEquals("my container", parts.getBlobContainerName()); + String url = parts.toUrl().toString(); + assertFalse(url.contains("my container")); + assertTrue(url.contains("my%20container")); + } + + // Tests that blob names are properly URL decoded when retrieved from BlobUrlParts. + @Test + public void setBlobNameEncodedNotDoubleEncoded() { + BlobUrlParts parts = new BlobUrlParts().setScheme("http").setHost("host").setBlobName("my%20blob"); + assertEquals("my blob", parts.getBlobName()); + String url = parts.toUrl().toString(); + assertTrue(url.contains("my%20blob")); + assertFalse(url.contains("%2520")); + } + + // Tests that container names are properly URL decoded when retrieved from BlobUrlParts. + @Test + public void setContainerNameEncodedNotDoubleEncoded() { + BlobUrlParts parts = new BlobUrlParts().setScheme("http").setHost("host").setContainerName("my%20container"); + assertEquals("my container", parts.getBlobContainerName()); + String url = parts.toUrl().toString(); + assertTrue(url.contains("my%20container")); + assertFalse(url.contains("%2520")); + } } diff --git a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md index 6b2ac551732a..d8fe79037786 100644 --- a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md +++ b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md @@ -9,6 +9,7 @@ ### Bugs Fixed ### Other Changes +- Added support for container names with special characters when using OneLake. ## 12.25.0 (2025-10-21) diff --git a/sdk/storage/azure-storage-file-datalake/assets.json b/sdk/storage/azure-storage-file-datalake/assets.json index 733b99460aaf..74cab7061d15 100644 --- a/sdk/storage/azure-storage-file-datalake/assets.json +++ b/sdk/storage/azure-storage-file-datalake/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-file-datalake", - "Tag": "java/storage/azure-storage-file-datalake_a65998bcad" + "Tag": "java/storage/azure-storage-file-datalake_53fb07cde0" } diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemAsyncClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemAsyncClient.java index 581521c3fa42..716618f9011b 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemAsyncClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemAsyncClient.java @@ -25,6 +25,7 @@ import com.azure.storage.blob.options.BlobContainerCreateOptions; import com.azure.storage.blob.specialized.BlockBlobAsyncClient; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; @@ -250,7 +251,7 @@ public String getAccountUrl() { * @return the URL. */ public String getFileSystemUrl() { - return azureDataLakeStorage.getUrl() + "/" + fileSystemName; + return azureDataLakeStorage.getUrl() + "/" + Utility.urlEncode(fileSystemName); } /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemClient.java index fa27fe49f65d..1aeeaa0c560a 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemClient.java @@ -22,6 +22,7 @@ import com.azure.storage.blob.options.BlobContainerCreateOptions; import com.azure.storage.blob.specialized.BlockBlobClient; import com.azure.storage.common.StorageSharedKeyCredential; +import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.SasImplUtils; import com.azure.storage.common.implementation.StorageImplUtils; @@ -248,7 +249,7 @@ public String getAccountUrl() { * @return the URL. */ public String getFileSystemUrl() { - return azureDataLakeStorage.getUrl() + "/" + fileSystemName; + return azureDataLakeStorage.getUrl() + "/" + Utility.urlEncode(fileSystemName); } /** diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathAsyncClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathAsyncClient.java index 9926616025fa..7cd073a4bb0e 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathAsyncClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathAsyncClient.java @@ -183,7 +183,7 @@ String getAccountUrl() { * @return the URL. */ String getPathUrl() { - return dataLakeStorage.getUrl() + "/" + fileSystemName + "/" + Utility.urlEncode(pathName); + return dataLakeStorage.getUrl() + "/" + Utility.urlEncode(fileSystemName) + "/" + Utility.urlEncode(pathName); } /** @@ -1715,7 +1715,7 @@ Mono> renameWithResponse(String destinationFil DataLakePathAsyncClient dataLakePathAsyncClient = getPathAsyncClient(destinationFileSystem, destinationPath); - String renameSource = "/" + this.fileSystemName + "/" + Utility.urlEncode(pathName); + String renameSource = "/" + Utility.urlEncode(this.fileSystemName) + "/" + Utility.urlEncode(pathName); //String renameSource = "/" + this.fileSystemName + "/" + pathName; String signature = null; diff --git a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathClient.java b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathClient.java index 591107639437..87dbaac73d1a 100644 --- a/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathClient.java +++ b/sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakePathClient.java @@ -158,7 +158,7 @@ String getAccountUrl() { * @return the URL. */ String getPathUrl() { - return dataLakeStorage.getUrl() + "/" + fileSystemName + "/" + Utility.urlEncode(pathName); + return dataLakeStorage.getUrl() + "/" + Utility.urlEncode(fileSystemName) + "/" + Utility.urlEncode(pathName); } /** @@ -1399,7 +1399,7 @@ Response renameWithResponseWithTimeout(String destinationFil DataLakePathClient dataLakePathClient = getPathClient(destinationFileSystem, destinationPath); - String renameSource = "/" + this.getFileSystemName() + "/" + Utility.urlEncode(pathName); + String renameSource = "/" + Utility.urlEncode(this.getFileSystemName()) + "/" + Utility.urlEncode(pathName); String signature = null; if (this.getSasToken() != null) { if (this.getSasToken().getSignature().startsWith("?")) { diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DirectoryApiTests.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DirectoryApiTests.java index f806c58f0ebd..36a91b899b6f 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DirectoryApiTests.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DirectoryApiTests.java @@ -3616,4 +3616,10 @@ public void pathGetSystemPropertiesDirectoryMin() { assertNotNull(dc.getSystemProperties()); } + @Test + public void directoryNameEncodingOnGetPathUrl() { + DataLakeDirectoryClient directoryClient = dataLakeFileSystemClient.getDirectoryClient("my directory"); + String expectedName = "my%20directory"; + assertTrue(directoryClient.getPathUrl().contains(expectedName)); + } } diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DirectoryAsyncApiTests.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DirectoryAsyncApiTests.java index 43232df388d0..1a119cb7b8c8 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DirectoryAsyncApiTests.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DirectoryAsyncApiTests.java @@ -3973,4 +3973,12 @@ public void pathGetSystemPropertiesDirectory() { public void pathGetSystemPropertiesDirectoryMin() { StepVerifier.create(dc.getSystemProperties()).expectNextCount(1).verifyComplete(); } + + @Test + public void directoryNameEncodingOnGetPathUrl() { + DataLakeDirectoryAsyncClient directoryClient + = dataLakeFileSystemAsyncClient.getDirectoryAsyncClient("my directory"); + String expectedName = "my%20directory"; + assertTrue(directoryClient.getPathUrl().contains(expectedName)); + } } diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileApiTest.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileApiTest.java index 8f98cd0bb69e..cbb120507cbd 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileApiTest.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileApiTest.java @@ -3617,4 +3617,11 @@ public void pathGetSystemPropertiesFile() { public void pathGetSystemPropertiesFileMin() { assertNotNull(fc.getSystemProperties()); } + + @Test + public void fileNameEncodingOnGetPathUrl() { + DataLakeFileClient fileClient = dataLakeFileSystemClient.getFileClient("my file"); + String expectedName = "my%20file"; + assertTrue(fileClient.getPathUrl().contains(expectedName)); + } } diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAsyncApiTests.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAsyncApiTests.java index 6a54b2dee6b5..e059ee7c0ded 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAsyncApiTests.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAsyncApiTests.java @@ -4401,4 +4401,10 @@ public void pathGetSystemPropertiesFileMin() { StepVerifier.create(fc.getSystemProperties()).expectNextCount(1).verifyComplete(); } + @Test + public void fileNameEncodingOnGetPathUrl() { + DataLakeFileAsyncClient fileClient = dataLakeFileSystemAsyncClient.getFileAsyncClient("my file"); + String expectedName = "my%20file"; + assertTrue(fileClient.getPathUrl().contains(expectedName)); + } } diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemApiTests.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemApiTests.java index 5471afb89919..8e76f9861b6f 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemApiTests.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemApiTests.java @@ -2394,7 +2394,21 @@ public void getSetAccessPolicyOAuth() { // Act FileSystemAccessPolicies response = fileSystemClient.getAccessPolicy(); fileSystemClient.setAccessPolicy(null, response.getIdentifiers()); + } + @Test + public void fileSystemNameEncodingOnGetFileSystemUrl() { + DataLakeFileSystemClient fileSystemClient = primaryDataLakeServiceClient.getFileSystemClient("my filesystem"); + String expectedName = "my%20filesystem"; + assertTrue(fileSystemClient.getFileSystemUrl().contains(expectedName)); + } + + @Test + public void fileSystemNameEncodingOnGetPathUrl() { + DataLakeFileSystemClient fileSystemClient = primaryDataLakeServiceClient.getFileSystemClient("my filesystem"); + String expectedName = "my%20filesystem"; + DataLakeDirectoryClient directoryClient = fileSystemClient.getDirectoryClient(generatePathName()); + assertTrue(directoryClient.getPathUrl().contains(expectedName)); } // @Test diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemAsyncApiTests.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemAsyncApiTests.java index ac53431f0d7c..a9c9a6a12271 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemAsyncApiTests.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileSystemAsyncApiTests.java @@ -2568,4 +2568,20 @@ public void getSetAccessPolicyOAuth() { .verifyComplete(); } + @Test + public void fileSystemNameEncodingOnGetFileSystemUrl() { + DataLakeFileSystemAsyncClient fileSystemClient + = primaryDataLakeServiceAsyncClient.getFileSystemAsyncClient("my filesystem"); + String expectedName = "my%20filesystem"; + assertTrue(fileSystemClient.getFileSystemUrl().contains(expectedName)); + } + + @Test + public void fileSystemNameEncodingOnGetPathUrl() { + DataLakeFileSystemAsyncClient fileSystemClient + = primaryDataLakeServiceAsyncClient.getFileSystemAsyncClient("my filesystem"); + String expectedName = "my%20filesystem"; + DataLakeDirectoryAsyncClient directoryClient = fileSystemClient.getDirectoryAsyncClient(generatePathName()); + assertTrue(directoryClient.getPathUrl().contains(expectedName)); + } } diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/ServiceAsyncApiTests.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/ServiceAsyncApiTests.java index e5bcb1c68ceb..d9185c4a4cf9 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/ServiceAsyncApiTests.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/ServiceAsyncApiTests.java @@ -771,5 +771,4 @@ public void audienceFromString() { StepVerifier.create(aadServiceClient.getProperties()).assertNext(Assertions::assertNotNull).verifyComplete(); } - } From e7580067d0f934831f55ca2f0c8f005badaacac1 Mon Sep 17 00:00:00 2001 From: Isabelle <141270045+ibrandes@users.noreply.github.com> Date: Wed, 19 Nov 2025 15:41:35 -0800 Subject: [PATCH 02/26] Storage - Improving Perf of StorageBearerTokenChallengeAuthorizationPolicy (#46685) * removing override that forces token fetch on initial request * scope refactoring * removing unecessary elements in signatures * refactoring authorizeRequestOnChallenge overrides * refactoring and strengthening parsing logic * some tests * fixing failing tests * adding overrides back to prevent breaking change * Update sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/StorageBearerTokenChallengeAuthorizationPolicy.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/policy/StorageBearerTokenChallengeAuthorizationPolicyTests.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * using CoreUtils.parseAuthenticateHeader instead of custom util method * adding changelog entry * adding scope and tenant verification * wip * added comment about failure * removing warning * adding custom parsing back and adjusting tests * many many tests for the parsing logic * undoing new parsing changes * moving stuff around * adjusting tests * more test adjustment * formatting --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- sdk/storage/azure-storage-common/CHANGELOG.md | 2 + ...arerTokenChallengeAuthorizationPolicy.java | 130 +++---- ...okenChallengeAuthorizationPolicyTests.java | 330 +++++++++++------- 3 files changed, 261 insertions(+), 201 deletions(-) diff --git a/sdk/storage/azure-storage-common/CHANGELOG.md b/sdk/storage/azure-storage-common/CHANGELOG.md index b37364b51fa7..6c2a3842e421 100644 --- a/sdk/storage/azure-storage-common/CHANGELOG.md +++ b/sdk/storage/azure-storage-common/CHANGELOG.md @@ -7,6 +7,8 @@ ### Breaking Changes ### Bugs Fixed +- Addressed a performance regression introduced in version 12.27.0+ of the Azure Storage SDK for Java, where token +retrieval became thread-local, causing a consistent 4 to 5-second delay across threads during initial authorization. ### Other Changes diff --git a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/StorageBearerTokenChallengeAuthorizationPolicy.java b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/StorageBearerTokenChallengeAuthorizationPolicy.java index edc8323e0600..8459755589d9 100644 --- a/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/StorageBearerTokenChallengeAuthorizationPolicy.java +++ b/sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy/StorageBearerTokenChallengeAuthorizationPolicy.java @@ -18,19 +18,20 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; -import java.util.Locale; /** - * The storage authorization policy which supports challenge. + * The storage authorization policy which supports challenges. */ public class StorageBearerTokenChallengeAuthorizationPolicy extends BearerTokenAuthenticationPolicy { - private static final ClientLogger LOGGER = new ClientLogger(StorageBearerTokenChallengeAuthorizationPolicy.class); private static final String DEFAULT_SCOPE = "/.default"; - static final String BEARER_TOKEN_PREFIX = "Bearer "; + private static final String BEARER_TOKEN_PREFIX = "Bearer"; + private static final String RESOURCE_ID = "resource_id"; + private static final String AUTHORIZATION_URI = "authorization_uri"; - private String[] scopes; + // Immutable constructor scopes (base class retains them); challenge may supply new scopes dynamically. + private final String[] initialScopes; /** * Creates StorageBearerTokenChallengeAuthorizationPolicy. @@ -40,56 +41,45 @@ public class StorageBearerTokenChallengeAuthorizationPolicy extends BearerTokenA */ public StorageBearerTokenChallengeAuthorizationPolicy(TokenCredential credential, String... scopes) { super(credential, scopes); - this.scopes = scopes; + this.initialScopes = CoreUtils.clone(scopes); } @Override public Mono authorizeRequest(HttpPipelineCallContext context) { - String[] scopes = this.scopes; - scopes = getScopes(context, scopes); - if (scopes == null) { - return Mono.empty(); - } else { - return setAuthorizationHeader(context, new TokenRequestContext().addScopes(scopes)); - } + // Delegate to superclass to maintain previous behavior + return super.authorizeRequest(context); } @Override public void authorizeRequestSync(HttpPipelineCallContext context) { - String[] scopes = this.scopes; - scopes = getScopes(context, scopes); - - if (scopes != null) { - setAuthorizationHeaderSync(context, new TokenRequestContext().addScopes(scopes)); - } + // Delegate to superclass to maintain previous behavior + super.authorizeRequestSync(context); } @Override public Mono authorizeRequestOnChallenge(HttpPipelineCallContext context, HttpResponse response) { String authHeader = response.getHeaderValue(HttpHeaderName.WWW_AUTHENTICATE); - Map challenges = extractChallengeAttributes(authHeader, BEARER_TOKEN_PREFIX); - - String scope = getScopeFromChallenges(challenges); - String authorization = getAuthorizationFromChallenges(challenges); + Map attributes = extractChallengeAttributes(authHeader); - if (scope != null) { - scope += DEFAULT_SCOPE; - scopes = new String[] { scope }; - scopes = getScopes(context, scopes); + if (attributes.isEmpty()) { + return Mono.just(false); } - if (authorization != null) { - String tenantId = extractTenantIdFromUri(authorization); - TokenRequestContext tokenRequestContext = new TokenRequestContext().addScopes(scopes).setTenantId(tenantId); - return setAuthorizationHeader(context, tokenRequestContext).thenReturn(true); - } + String resource = attributes.get(RESOURCE_ID); + String authUrl = attributes.get(AUTHORIZATION_URI); - if (scope != null) { - TokenRequestContext tokenRequestContext = new TokenRequestContext().addScopes(scopes); - return setAuthorizationHeader(context, tokenRequestContext).thenReturn(true); + // Create new scopes array to avoid mutating the original + String[] scopesToUse = initialScopes; + if (!CoreUtils.isNullOrEmpty(resource)) { + scopesToUse = new String[] { resource.endsWith(DEFAULT_SCOPE) ? resource : resource + DEFAULT_SCOPE }; } - return Mono.just(false); + TokenRequestContext tokenRequestContext = new TokenRequestContext().addScopes(scopesToUse).setCaeEnabled(true); + + if (!CoreUtils.isNullOrEmpty(authUrl)) { + tokenRequestContext.setTenantId(extractTenantIdFromUri(authUrl)); + } + return setAuthorizationHeader(context, tokenRequestContext).thenReturn(true); } String extractTenantIdFromUri(String uri) { @@ -108,66 +98,60 @@ String extractTenantIdFromUri(String uri) { @Override public boolean authorizeRequestOnChallengeSync(HttpPipelineCallContext context, HttpResponse response) { String authHeader = response.getHeaderValue(HttpHeaderName.WWW_AUTHENTICATE); - Map challenges = extractChallengeAttributes(authHeader, BEARER_TOKEN_PREFIX); - - String scope = getScopeFromChallenges(challenges); - String authorization = getAuthorizationFromChallenges(challenges); + Map attributes = extractChallengeAttributes(authHeader); - if (scope != null) { - scope += DEFAULT_SCOPE; - scopes = new String[] { scope }; - scopes = getScopes(context, scopes); + if (attributes.isEmpty()) { + return false; } - if (authorization != null) { - String tenantId = extractTenantIdFromUri(authorization); - TokenRequestContext tokenRequestContext = new TokenRequestContext().addScopes(scopes).setTenantId(tenantId); - setAuthorizationHeaderSync(context, tokenRequestContext); - return true; - } + String resource = attributes.get(RESOURCE_ID); + String authUrl = attributes.get(AUTHORIZATION_URI); - if (scope != null) { - TokenRequestContext tokenRequestContext = new TokenRequestContext().addScopes(scopes); - setAuthorizationHeaderSync(context, tokenRequestContext); - return true; + // Create new scopes array to avoid mutating the original + String[] scopesToUse = initialScopes; + if (!CoreUtils.isNullOrEmpty(resource)) { + scopesToUse = new String[] { resource.endsWith(DEFAULT_SCOPE) ? resource : resource + DEFAULT_SCOPE }; } - return false; - } + TokenRequestContext tokenRequestContext = new TokenRequestContext().addScopes(scopesToUse).setCaeEnabled(true); - String[] getScopes(HttpPipelineCallContext context, String[] scopes) { - return CoreUtils.clone(scopes); + if (!CoreUtils.isNullOrEmpty(authUrl)) { + tokenRequestContext.setTenantId(extractTenantIdFromUri(authUrl)); + } + + setAuthorizationHeaderSync(context, tokenRequestContext); + return true; } - Map extractChallengeAttributes(String header, String authChallengePrefix) { - if (!isBearerChallenge(header, authChallengePrefix)) { + static Map extractChallengeAttributes(String header) { + if (!isBearerChallenge(header)) { return Collections.emptyMap(); } - header = header.toLowerCase(Locale.ROOT).replace(authChallengePrefix.toLowerCase(Locale.ROOT), ""); + // Don't lowercase the entire header as values can be corrupted. Also don't mutate the original header. + String remainingHeader = header.substring(BEARER_TOKEN_PREFIX.length()); - String[] attributes = header.split(" "); + // Split on commas first; if no commas present fall back to spaces. + String[] attributes = remainingHeader.contains(",") ? remainingHeader.split(",") : remainingHeader.split(" "); Map attributeMap = new HashMap<>(); for (String pair : attributes) { + // Skip empty strings and any strings that don't contain '='. + // Allows scenarios where there is only an auth URI and no resource ID. + if (CoreUtils.isNullOrEmpty(pair) || !pair.contains("=")) { + continue; + } String[] keyValue = pair.split("="); - attributeMap.put(keyValue[0].replaceAll("\"", ""), keyValue[1].replaceAll("\"", "")); + // Support spaces after commas by trimming. + attributeMap.put(keyValue[0].replaceAll("\"", "").trim(), keyValue[1].replaceAll("\"", "").trim()); } return attributeMap; } - static boolean isBearerChallenge(String authenticateHeader, String authChallengePrefix) { + static boolean isBearerChallenge(String authenticateHeader) { return (!CoreUtils.isNullOrEmpty(authenticateHeader) - && authenticateHeader.toLowerCase(Locale.ROOT).startsWith(authChallengePrefix.toLowerCase(Locale.ROOT))); - } - - String getScopeFromChallenges(Map challenges) { - return challenges.get("resource_id"); - } - - String getAuthorizationFromChallenges(Map challenges) { - return challenges.get("authorization_uri"); + && authenticateHeader.regionMatches(true, 0, BEARER_TOKEN_PREFIX, 0, BEARER_TOKEN_PREFIX.length())); } } diff --git a/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/policy/StorageBearerTokenChallengeAuthorizationPolicyTests.java b/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/policy/StorageBearerTokenChallengeAuthorizationPolicyTests.java index 3cee69ca1f50..5caff46df779 100644 --- a/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/policy/StorageBearerTokenChallengeAuthorizationPolicyTests.java +++ b/sdk/storage/azure-storage-common/src/test/java/com/azure/storage/common/policy/StorageBearerTokenChallengeAuthorizationPolicyTests.java @@ -3,16 +3,33 @@ package com.azure.storage.common.policy; +import com.azure.core.credential.AccessToken; import com.azure.core.credential.TokenCredential; +import com.azure.core.credential.TokenRequestContext; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpMethod; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelineCallContext; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.test.http.MockHttpResponse; import com.azure.core.test.utils.MockTokenCredential; +import com.azure.core.util.Context; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; -import java.util.HashMap; +import java.time.OffsetDateTime; import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.util.concurrent.atomic.AtomicReference; -import static com.azure.storage.common.policy.StorageBearerTokenChallengeAuthorizationPolicy.BEARER_TOKEN_PREFIX; +import static com.azure.storage.common.policy.StorageBearerTokenChallengeAuthorizationPolicy.extractChallengeAttributes; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -20,152 +37,170 @@ public class StorageBearerTokenChallengeAuthorizationPolicyTests { - private String[] scopes; - private TokenCredential mockCredential; + private StorageBearerTokenChallengeAuthorizationPolicy policy; + private static final String DEFAULT_SCOPE = "https://storage.azure.com/.default"; + private static final String RESOURCE_ID_STRING = "resource_id"; + private static final String AUTHORIZATION_URI_STRING = "authorization_uri"; @BeforeEach public void setup() { - scopes = new String[] { "https://storage.azure.com/.default" }; - mockCredential = new MockTokenCredential(); + policy = new StorageBearerTokenChallengeAuthorizationPolicy(new MockTokenCredential(), DEFAULT_SCOPE); } @Test - public void testExtractChallengeAttributes() { - StorageBearerTokenChallengeAuthorizationPolicy policy - = new StorageBearerTokenChallengeAuthorizationPolicy(mockCredential, "https://storage.azure.com/.default"); - - String authHeader - = "Bearer authorization_uri=https://login.microsoftonline.com/tenantId/oauth2/authorize resource_id=https://storage.azure.com"; - Map challenges = policy.extractChallengeAttributes(authHeader, BEARER_TOKEN_PREFIX); - - assertNotNull(challenges); - assertEquals("https://login.microsoftonline.com/tenantid/oauth2/authorize", - challenges.get("authorization_uri")); - assertEquals("https://storage.azure.com", challenges.get("resource_id")); + public void extractChallengeAttributesExpected() { + String header + = "Bearer resource_id=\"https://storage.azure.com\",authorization_uri=\"https://login.microsoftonline.com/tenant/oauth2/authorize\""; + Map challengeAttributes = extractChallengeAttributes(header); + assertNotNull(challengeAttributes); + assertExampleResourceId(challengeAttributes.get(RESOURCE_ID_STRING)); + assertExampleAuthURI(challengeAttributes.get(AUTHORIZATION_URI_STRING)); } @Test - public void testGetScopeFromChallenges() { - StorageBearerTokenChallengeAuthorizationPolicy policy - = new StorageBearerTokenChallengeAuthorizationPolicy(mockCredential, "https://storage.azure.com/.default"); - - Map challenges = new HashMap<>(); - challenges.put("resource_id", "https://storage.azure.com"); - - String scope = policy.getScopeFromChallenges(challenges); - - assertEquals("https://storage.azure.com", scope); + public void extractChallengeAttributesSpaceAfterComma() { + String header + = "Bearer resource_id=\"https://storage.azure.com\", authorization_uri=\"https://login.microsoftonline.com/tenant/oauth2/authorize\""; + Map challengeAttributes = extractChallengeAttributes(header); + assertNotNull(challengeAttributes); + assertExampleResourceId(challengeAttributes.get(RESOURCE_ID_STRING)); + assertExampleAuthURI(challengeAttributes.get(AUTHORIZATION_URI_STRING)); } @Test - public void testGetAuthorizationFromChallenges() { - StorageBearerTokenChallengeAuthorizationPolicy policy - = new StorageBearerTokenChallengeAuthorizationPolicy(mockCredential, "https://storage.azure.com/.default"); - - Map challenges = new HashMap<>(); - challenges.put("authorization_uri", "https://login.microsoftonline.com/tenantId/oauth2/authorize"); - - String authorization = policy.getAuthorizationFromChallenges(challenges); - - assertEquals("https://login.microsoftonline.com/tenantId/oauth2/authorize", authorization); + public void extractChallengeAttributesWithUnknownExtraParam() { + String header + = "Bearer resource_id=\"https://storage.azure.com\", foo=\"bar\", authorization_uri=\"https://login.microsoftonline.com/tenant/oauth2/authorize\""; + Map challengeAttributes = extractChallengeAttributes(header); + assertNotNull(challengeAttributes); + assertEquals("bar", challengeAttributes.get("foo")); + assertExampleResourceId(challengeAttributes.get(RESOURCE_ID_STRING)); } @Test - public void usesTokenProvidedByCredentials() { - StorageBearerTokenChallengeAuthorizationPolicy policy - = new StorageBearerTokenChallengeAuthorizationPolicy(mockCredential, scopes); - - Map challenges = policy.extractChallengeAttributes(null, BEARER_TOKEN_PREFIX); - - String scope = policy.getScopeFromChallenges(challenges); - String authorization = policy.getAuthorizationFromChallenges(challenges); - - assertNull(scope); - assertNull(authorization); + public void extractChallengeAttributesWithLowercaseScheme() { + String header + = "bearer resource_id=\"https://storage.azure.com\", authorization_uri=\"https://login.microsoftonline.com/tenant/oauth2/authorize\""; + Map challengeAttributes = extractChallengeAttributes(header); + assertNotNull(challengeAttributes); + assertExampleResourceId(challengeAttributes.get(RESOURCE_ID_STRING)); + assertExampleAuthURI(challengeAttributes.get(AUTHORIZATION_URI_STRING)); } @Test - public void doesNotSendUnauthorizedRequestWhenEnableTenantDiscoveryIsFalse() { - StorageBearerTokenChallengeAuthorizationPolicy policy - = new StorageBearerTokenChallengeAuthorizationPolicy(mockCredential, scopes); - - Map challenges = policy.extractChallengeAttributes(null, BEARER_TOKEN_PREFIX); - - String scope = policy.getScopeFromChallenges(challenges); - String authorization = policy.getAuthorizationFromChallenges(challenges); - - assertNull(scope); - assertNull(authorization); + public void extractEmptyChallenges() { + assertTrue(extractChallengeAttributes(null).isEmpty()); + assertTrue(extractChallengeAttributes("Basic realm=\"test\"").isEmpty()); + assertTrue(extractChallengeAttributes("").isEmpty()); } @Test - public void sendsUnauthorizedRequestWhenEnableTenantDiscoveryIsTrue() { - StorageBearerTokenChallengeAuthorizationPolicy policy - = new StorageBearerTokenChallengeAuthorizationPolicy(mockCredential, scopes); + public void doesNotAuthorizeRequestOnInvalidChallenge() { + // Use a recording credential so we can assert scopes, tenantId, and CAE. + RecordingTokenCredential recordingCredential = new RecordingTokenCredential(); + StorageBearerTokenChallengeAuthorizationPolicy policyUnderTest + = new StorageBearerTokenChallengeAuthorizationPolicy(recordingCredential, DEFAULT_SCOPE); - String expectedTenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47"; - String authHeader = "Bearer authorization_uri=https://login.microsoftonline.com/" + expectedTenantId - + "/oauth2/authorize resource_id=https://storage.azure.com"; - Map challenges = policy.extractChallengeAttributes(authHeader, BEARER_TOKEN_PREFIX); + HttpRequest request = new HttpRequest(HttpMethod.GET, "https://storage.azure.com"); + HttpResponse response = new MockHttpResponse(request, 401); + HttpPipelineCallContext context = createMockCallContext(request); - String scope = policy.getScopeFromChallenges(challenges); - String authorization = policy.getAuthorizationFromChallenges(challenges); + boolean result = policyUnderTest.authorizeRequestOnChallengeSync(context, response); - assertEquals("https://storage.azure.com", scope); - assertEquals("https://login.microsoftonline.com/" + expectedTenantId + "/oauth2/authorize", authorization); + assertFalse(result); + assertNull(request.getHeaders().getValue(HttpHeaderName.AUTHORIZATION)); + assertNull(recordingCredential.getLastContext()); } @Test - public void usesScopeFromBearerChallenge() { - StorageBearerTokenChallengeAuthorizationPolicy policy = new StorageBearerTokenChallengeAuthorizationPolicy( - mockCredential, "https://disk.compute.azure.com/.default"); - - String serviceChallengeResponseScope = "https://storage.azure.com"; - String authHeader - = "Bearer authorization_uri=https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/authorize resource_id=" - + serviceChallengeResponseScope; - Map challenges = policy.extractChallengeAttributes(authHeader, BEARER_TOKEN_PREFIX); - - String scope = policy.getScopeFromChallenges(challenges); - String authorization = policy.getAuthorizationFromChallenges(challenges); - - assertEquals(serviceChallengeResponseScope, scope); - assertEquals("https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/authorize", - authorization); + public void authorizeRequestOnValidChallenge() { + // Use a recording credential so we can assert scopes, tenantId, and CAE. + RecordingTokenCredential recordingCredential = new RecordingTokenCredential(); + StorageBearerTokenChallengeAuthorizationPolicy policyUnderTest + = new StorageBearerTokenChallengeAuthorizationPolicy(recordingCredential, DEFAULT_SCOPE); + + HttpRequest request = new HttpRequest(HttpMethod.GET, "https://storage.azure.com"); + // Use a different resource to verify scopes are updated from the challenge. + HttpHeaders headers = new HttpHeaders().set(HttpHeaderName.WWW_AUTHENTICATE, + "Bearer resource_id=\"https://storage.core.windows.net\", authorization_uri=\"https://login.microsoftonline.com/tenant/oauth2/authorize\""); + HttpResponse response = new MockHttpResponse(request, 401, headers); + HttpPipelineCallContext context = createMockCallContext(request); + + boolean result = policyUnderTest.authorizeRequestOnChallengeSync(context, response); + + assertTrue(result); + String authHeader = request.getHeaders().getValue(HttpHeaderName.AUTHORIZATION); + assertNotNull(authHeader); + assertTrue(authHeader.startsWith("Bearer ")); + + TokenRequestContext captured = recordingCredential.getLastContext(); + assertNotNull(captured); + assertEquals(1, captured.getScopes().size()); + assertEquals("https://storage.core.windows.net/.default", captured.getScopes().get(0)); + assertEquals("tenant", captured.getTenantId()); + assertTrue(captured.isCaeEnabled()); } @Test - public void testMultiTenantAuthentication() { - StorageBearerTokenChallengeAuthorizationPolicy policy - = new StorageBearerTokenChallengeAuthorizationPolicy(mockCredential, "https://storage.azure.com/.default"); - - String tenantId1 = "tenant1"; - String tenantId2 = "tenant2"; - - String authHeader1 = "Bearer authorization_uri=https://login.microsoftonline.com/" + tenantId1 - + "/oauth2/authorize resource_id=https://storage.azure.com"; - String authHeader2 = "Bearer authorization_uri=https://login.microsoftonline.com/" + tenantId2 - + "/oauth2/authorize resource_id=https://storage.azure.com"; - - Map challenges1 = policy.extractChallengeAttributes(authHeader1, BEARER_TOKEN_PREFIX); - Map challenges2 = policy.extractChallengeAttributes(authHeader2, BEARER_TOKEN_PREFIX); - - String scope1 = policy.getScopeFromChallenges(challenges1); - String authorization1 = policy.getAuthorizationFromChallenges(challenges1); - String scope2 = policy.getScopeFromChallenges(challenges2); - String authorization2 = policy.getAuthorizationFromChallenges(challenges2); - - assertEquals("https://storage.azure.com", scope1); - assertEquals("https://login.microsoftonline.com/" + tenantId1 + "/oauth2/authorize", authorization1); - assertEquals("https://storage.azure.com", scope2); - assertEquals("https://login.microsoftonline.com/" + tenantId2 + "/oauth2/authorize", authorization2); + public void authorizeRequestOnChallengeWithAuthorizationUriOnly() { + RecordingTokenCredential recordingCredential = new RecordingTokenCredential(); + StorageBearerTokenChallengeAuthorizationPolicy policyUnderTest + = new StorageBearerTokenChallengeAuthorizationPolicy(recordingCredential, DEFAULT_SCOPE); + + HttpRequest request = new HttpRequest(HttpMethod.GET, "https://storage.azure.com"); + HttpHeaders headers = new HttpHeaders().set(HttpHeaderName.WWW_AUTHENTICATE, + "Bearer authorization_uri=\"https://login.microsoftonline.com/tenant/oauth2/authorize\""); + HttpResponse response = new MockHttpResponse(request, 401, headers); + HttpPipelineCallContext context = createMockCallContext(request); + + boolean result = policyUnderTest.authorizeRequestOnChallengeSync(context, response); + assertTrue(result); + + TokenRequestContext captured = recordingCredential.getLastContext(); + assertNotNull(captured); + assertEquals(1, captured.getScopes().size()); + assertEquals(DEFAULT_SCOPE, captured.getScopes().get(0)); // falls back to initial scopes + assertEquals("tenant", captured.getTenantId()); + assertTrue(captured.isCaeEnabled()); } @Test - public void testExtractTenantIdFromUri() { - StorageBearerTokenChallengeAuthorizationPolicy policy - = new StorageBearerTokenChallengeAuthorizationPolicy(mockCredential, "https://storage.azure.com/.default"); + public void authorizeRequestOnChallengeWithMultipleTenants() { + RecordingTokenCredential credential = new RecordingTokenCredential(); + StorageBearerTokenChallengeAuthorizationPolicy policyUnderTest + = new StorageBearerTokenChallengeAuthorizationPolicy(credential, DEFAULT_SCOPE); + + String[] tenants = { "tenantA", "72f988bf-86f1-41af-91ab-2d7cd011db47", "my-tenant" }; + + for (String tenant : tenants) { + HttpRequest request = new HttpRequest(HttpMethod.GET, "https://storage.azure.com"); + HttpHeaders headers = new HttpHeaders().set(HttpHeaderName.WWW_AUTHENTICATE, + "Bearer resource_id=\"https://storage.azure.com\", authorization_uri=\"https://login.microsoftonline.com/" + + tenant + "/oauth2/authorize\""); + HttpResponse response = new MockHttpResponse(request, 401, headers); + HttpPipelineCallContext context = createMockCallContext(request); + + boolean handled = policyUnderTest.authorizeRequestOnChallengeSync(context, response); + assertTrue(handled, "Challenge should be handled for tenant: " + tenant); + + String authHeader = request.getHeaders().getValue(HttpHeaderName.AUTHORIZATION); + assertNotNull(authHeader); + assertTrue(authHeader.startsWith("Bearer ")); + } + + List captured = credential.getContexts(); + assertEquals(tenants.length, captured.size()); + for (int i = 0; i < tenants.length; i++) { + TokenRequestContext ctx = captured.get(i); + assertEquals(1, ctx.getScopes().size()); + assertEquals(DEFAULT_SCOPE, ctx.getScopes().get(0)); + assertEquals(tenants[i], ctx.getTenantId()); + assertTrue(ctx.isCaeEnabled()); + } + } + @Test + public void extractTenantIdFromUri() { String uri = "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/authorize"; String expectedTenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47"; @@ -175,15 +210,10 @@ public void testExtractTenantIdFromUri() { } @Test - public void testExtractTenantIdFromUriInvalidUri() { - StorageBearerTokenChallengeAuthorizationPolicy policy - = new StorageBearerTokenChallengeAuthorizationPolicy(mockCredential, "https://storage.azure.com/.default"); - + public void extractTenantIdFromUriInvalidUri() { String invalidUri = "https://login.microsoftonline.com/"; - Exception exception = assertThrows(RuntimeException.class, () -> { - policy.extractTenantIdFromUri(invalidUri); - }); + Exception exception = assertThrows(RuntimeException.class, () -> policy.extractTenantIdFromUri(invalidUri)); String expectedMessage = "Invalid authorization URI: tenantId not found"; String actualMessage = exception.getMessage(); @@ -192,15 +222,10 @@ public void testExtractTenantIdFromUriInvalidUri() { } @Test - public void testExtractTenantIdFromUriMalformedUri() { - StorageBearerTokenChallengeAuthorizationPolicy policy - = new StorageBearerTokenChallengeAuthorizationPolicy(mockCredential, "https://storage.azure.com/.default"); - + public void extractTenantIdFromUriMalformedUri() { String malformedUri = "ht!tp://invalid-uri"; - Exception exception = assertThrows(RuntimeException.class, () -> { - policy.extractTenantIdFromUri(malformedUri); - }); + Exception exception = assertThrows(RuntimeException.class, () -> policy.extractTenantIdFromUri(malformedUri)); String expectedMessage = "Invalid authorization URI"; String actualMessage = exception.getMessage(); @@ -208,4 +233,53 @@ public void testExtractTenantIdFromUriMalformedUri() { assertTrue(actualMessage.contains(expectedMessage)); } + private static HttpPipelineCallContext createMockCallContext(HttpRequest request) { + AtomicReference callContextReference = new AtomicReference<>(); + + HttpPipeline callContextCreator = new HttpPipelineBuilder().policies((callContext, next) -> { + callContextReference.set(callContext); + + return next.process(); + }).httpClient(ignored -> Mono.empty()).build(); + + HttpResponse response = callContextCreator.sendSync(request, Context.NONE); + if (response != null) { + response.close(); + } + return callContextReference.get(); + } + + // New helper credential to capture the TokenRequestContext used during challenge handling. + static final class RecordingTokenCredential implements TokenCredential { + private final AtomicReference lastContext = new AtomicReference<>(); + private final List contexts = new ArrayList<>(); + + @Override + public Mono getToken(TokenRequestContext requestContext) { + // Snapshot to avoid mutation side effects if the same instance is reused. + TokenRequestContext snapshot + = new TokenRequestContext().addScopes(requestContext.getScopes().toArray(new String[0])) + .setTenantId(requestContext.getTenantId()) + .setCaeEnabled(requestContext.isCaeEnabled()); + lastContext.set(snapshot); + contexts.add(snapshot); + return Mono.just(new AccessToken("test-token", OffsetDateTime.now().plusHours(1))); + } + + TokenRequestContext getLastContext() { + return lastContext.get(); + } + + List getContexts() { + return contexts; + } + } + + private void assertExampleResourceId(String resourceId) { + assertEquals("https://storage.azure.com", resourceId); + } + + private void assertExampleAuthURI(String authURI) { + assertEquals("https://login.microsoftonline.com/tenant/oauth2/authorize", authURI); + } } From 86b3dc8204cb4720e24425982d27c9fbaa91a279 Mon Sep 17 00:00:00 2001 From: Fabian Meiswinkel Date: Thu, 20 Nov 2025 07:41:35 +0100 Subject: [PATCH 03/26] [Internal]Enabled Netty Buffer Leak detection and left-over CosmsoClient instance detection during test execution (#47211) * Test changes to add leak detection * Update Configs.java * Update CosmosNettyLeakDetectorFactory.java * Update sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/CosmosNettyLeakDetectorFactory.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update CosmosNettyLeakDetectorFactory.java * Fixes * Fixes * Update CosmosNettyLeakDetectorFactory.java * Update RxDocumentClientImpl.java * Fixes * Update CosmosNettyLeakDetectorFactory.java * Fixes * Fixes * Iterating on tests * Fixing build warning * Fixing memory leak * Reverting production changes * Iterating on test tools * Cleaning-up dummy QueryFeedRangeState properly * Update test-resources.json * Update sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosDiagnosticsE2ETest.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * [WIP] Fix Netty buffer and RxDocumentClientImpl leaks (#47213) * Initial plan * Improve JavaDoc phrasing in RxDocumentClientImpl Co-authored-by: FabianMeiswinkel <19165014+FabianMeiswinkel@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: FabianMeiswinkel <19165014+FabianMeiswinkel@users.noreply.github.com> Co-authored-by: Fabian Meiswinkel * NITs * Move static block to class level in cosmos-encryption TestSuiteBase (#47216) * Initial plan * Move CosmosNettyLeakDetectorFactory.ingestIntoNetty() to class-level static block Co-authored-by: FabianMeiswinkel <19165014+FabianMeiswinkel@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: FabianMeiswinkel <19165014+FabianMeiswinkel@users.noreply.github.com> * Update SessionTest.java * Update tests.yml * Update CosmosNettyLeakDetectorFactory.java * Test config * Update CosmosNettyLeakDetectorFactory.java * Updating TestNG * Reverting TestNG to 7.9.0 (highest version still supporting Java8) * Switching back to TestNG 7.5.1 * Enabling leak detection in unit tests * Iterating on tests * Update pom.xml * Test changes (#47233) * Update RntbdTransportClientTest.java * Updating netty leak detection system properties * Update CosmosNettyLeakDetectorFactory.java * Test changes * Prod memory leak fixes * Test fixes * Test fixes * Users/fabianm/portfixes (#47252) * Update WebExceptionRetryPolicy.java * Update ThinClientStoreModel.java * Test fixes * Fix Netty ByteBuf leaks in StoreResponse and RetryContextOnDiagnosticTest (#47266) * Initial plan * Improve logging for ByteBufInputStream close failures Change log level from debug to warn and catch Throwable instead of just IOException to make potential ByteBuf leak issues more visible. Co-authored-by: FabianMeiswinkel <19165014+FabianMeiswinkel@users.noreply.github.com> * Fix ByteBuf leak in RetryContextOnDiagnosticTest Changed from Mono.just() to Mono.fromCallable() to defer StoreResponse creation, ensuring ByteBuf lifecycle is properly managed within each subscription rather than eagerly at mock setup time. Co-authored-by: FabianMeiswinkel <19165014+FabianMeiswinkel@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: FabianMeiswinkel <19165014+FabianMeiswinkel@users.noreply.github.com> * Update EncryptionAsyncApiCrudTest.java * Fix ByteBuf memory leak in TcpServerMock request decoders (#47269) * Initial plan * Fix memory leak in ServerRntbdRequestDecoder and ServerRntbdContextRequestDecoder When overriding channelRead() in ByteToMessageDecoder and bypassing the parent's decode logic by calling context.fireChannelRead() directly, the ByteBuf reference must be explicitly released to prevent memory leaks. Added ReferenceCountUtil.release() in try-finally blocks to properly manage buffer lifecycle. Co-authored-by: FabianMeiswinkel <19165014+FabianMeiswinkel@users.noreply.github.com> * Replace ReferenceCountUtil.release with safeRelease * Replace ReferenceCountUtil.release with safeRelease --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: FabianMeiswinkel <19165014+FabianMeiswinkel@users.noreply.github.com> Co-authored-by: Fabian Meiswinkel * Update ThinClientStoreModel.java * Fixing test issues * Disable netty leak detection in RetrycontextOnDiagnosticTest * Test and diagnostics improvements * Test fixes and more breadcrumbs * Test fixes * Test fixes * Test fixes * Update OrderbyDocumentQueryTest.java * Test fixes * Reverting too noisy logs * Test fixes * Fixing POMs * React to code review feedback * Update pom.xml * Addresses code review feedback * Update sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestDecoder.java Co-authored-by: Annie Liang <64233642+xinlian12@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: FabianMeiswinkel <19165014+FabianMeiswinkel@users.noreply.github.com> Co-authored-by: Annie Liang <64233642+xinlian12@users.noreply.github.com> --- sdk/cosmos/azure-cosmos-benchmark/pom.xml | 88 ++++ .../cosmos/benchmark/ReadMyWriteWorkflow.java | 9 + sdk/cosmos/azure-cosmos-encryption/README.md | 2 +- sdk/cosmos/azure-cosmos-encryption/pom.xml | 25 +- .../CosmosEncryptionAsyncClientTest.java | 76 +--- .../CosmosNettyLeakDetectorFactory.java | 195 ++++++++- .../EncryptionAsyncApiCrudTest.java | 209 +++++----- .../cosmos/encryption/TestSuiteBase.java | 28 +- sdk/cosmos/azure-cosmos-kafka-connect/pom.xml | 38 +- .../pom.xml | 16 + .../azure-cosmos-spark_3-3_2-12/pom.xml | 16 + .../azure-cosmos-spark_3-4_2-12/pom.xml | 16 + .../azure-cosmos-spark_3-5_2-12/pom.xml | 16 + sdk/cosmos/azure-cosmos-spark_3/pom.xml | 16 + sdk/cosmos/azure-cosmos-test/pom.xml | 10 + sdk/cosmos/azure-cosmos-tests/pom.xml | 156 ++++++- ...ChangeFeedContinuationTokenUtilsTests.java | 2 +- .../azure/cosmos/ClientUnderTestBuilder.java | 6 + .../azure/cosmos/CosmosAsyncClientTest.java | 79 +--- .../azure/cosmos/CosmosClientBuilderTest.java | 255 ++++++------ .../azure/cosmos/CosmosDiagnosticsTest.java | 111 ++--- .../CosmosNettyLeakDetectorFactory.java | 193 ++++++++- .../azure/cosmos/DistributedClientTest.java | 13 +- .../com/azure/cosmos/DocumentClientTest.java | 78 +--- .../EndToEndTimeOutValidationTests.java | 204 ++++++---- ...PerPartitionAutomaticFailoverE2ETests.java | 98 +++-- .../PerPartitionCircuitBreakerE2ETests.java | 17 +- .../cosmos/RetryContextOnDiagnosticTest.java | 97 +++-- .../com/azure/cosmos/UserAgentSuffixTest.java | 85 ++-- ...ExcludedRegionWithFaultInjectionTests.java | 4 +- ...aultInjectionConnectionErrorRuleTests.java | 7 +- .../SessionRetryOptionsTests.java | 6 +- .../implementation/ConsistencyTests1.java | 376 +++++++++-------- .../implementation/ConsistencyTests2.java | 141 ++++--- .../implementation/ConsistencyTestsBase.java | 122 +++--- .../DocumentQuerySpyWireContentTest.java | 42 +- .../RequestHeadersSpyWireTest.java | 53 ++- .../cosmos/implementation/SessionTest.java | 42 +- .../cosmos/implementation/TestSuiteBase.java | 335 +++++++++------- .../cpu/CpuLoadMonitorTest.java | 24 +- .../ConnectionStateListenerTest.java | 174 ++++---- .../DCDocumentCrudTest.java | 28 +- .../GatewayAddressCacheTest.java | 2 +- .../directconnectivity/ReflectionUtils.java | 9 + .../ServerRntbdContextRequestDecoder.java | 2 + .../rntbd/ServerRntbdRequestDecoder.java | 1 + .../rntbd/RntbdRequestRecordTests.java | 64 +-- .../rntbd/RntbdTokenTests.java | 87 ++-- .../http/ReactorNettyHttpClientTest.java | 13 +- .../com/azure/cosmos/rx/BackPressureTest.java | 35 +- .../cosmos/rx/ClientRetryPolicyE2ETests.java | 116 +++--- ...lientRetryPolicyE2ETestsWithGatewayV2.java | 11 +- .../cosmos/rx/MultiOrderByQueryTests.java | 11 +- .../com/azure/cosmos/rx/OfferQueryTest.java | 120 +++--- .../azure/cosmos/rx/OfferReadReplaceTest.java | 74 ++-- .../cosmos/rx/OrderbyDocumentQueryTest.java | 9 +- .../azure/cosmos/rx/ReadFeedOffersTest.java | 78 ++-- .../com/azure/cosmos/rx/ReadFeedPkrTests.java | 6 +- .../azure/cosmos/rx/ResourceTokenTest.java | 9 +- .../com/azure/cosmos/rx/TestSuiteBase.java | 107 +++-- .../UserDefinedFunctionUpsertReplaceTest.java | 1 + .../IncrementalChangeFeedProcessorTest.java | 52 +-- .../rx/proxy/HttpProxyClientHandler.java | 41 +- .../rx/proxy/HttpProxyClientHeader.java | 107 +++-- .../rx/proxy/HttpProxyRemoteHandler.java | 27 +- sdk/cosmos/azure-cosmos/pom.xml | 10 + .../implementation/AsyncDocumentClient.java | 1 + .../implementation/FeedOperationState.java | 4 + .../implementation/RxDocumentClientImpl.java | 3 + .../implementation/RxGatewayStoreModel.java | 379 ++++++++++-------- .../implementation/ThinClientStoreModel.java | 4 +- .../directconnectivity/StoreResponse.java | 11 +- .../rntbd/RntbdContextDecoder.java | 28 ++ .../rntbd/RntbdContextRequestDecoder.java | 34 ++ .../rntbd/RntbdRequestDecoder.java | 34 ++ .../rntbd/RntbdResponseDecoder.java | 34 ++ .../http/ReactorNettyClient.java | 32 +- sdk/cosmos/fabric-cosmos-spark-auth_3/pom.xml | 16 + sdk/cosmos/tests.yml | 16 +- 79 files changed, 3160 insertions(+), 1936 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-benchmark/pom.xml b/sdk/cosmos/azure-cosmos-benchmark/pom.xml index 7ae0b50faafb..d865417c6dca 100644 --- a/sdk/cosmos/azure-cosmos-benchmark/pom.xml +++ b/sdk/cosmos/azure-cosmos-benchmark/pom.xml @@ -203,6 +203,12 @@ Licensed under the MIT License. 3.5.3 unit + + true + 1 + 256 + paranoid + %regex[.*] @@ -211,6 +217,10 @@ Licensed under the MIT License. surefire.testng.verbose 2 + + listener + com.azure.cosmos.CosmosNettyLeakDetectorFactory + true @@ -308,6 +318,12 @@ Licensed under the MIT License. src/test/resources/unit-testng.xml + + true + 1 + 256 + paranoid + @@ -329,6 +345,12 @@ Licensed under the MIT License. src/test/resources/fast-testng.xml + + true + 1 + 256 + paranoid + @@ -350,6 +372,12 @@ Licensed under the MIT License. src/test/resources/split-testng.xml + + true + 1 + 256 + paranoid + @@ -371,6 +399,12 @@ Licensed under the MIT License. src/test/resources/cfp-split-testng.xml + + true + 1 + 256 + paranoid + @@ -392,6 +426,12 @@ Licensed under the MIT License. src/test/resources/query-testng.xml + + true + 1 + 256 + paranoid + @@ -413,6 +453,12 @@ Licensed under the MIT License. src/test/resources/long-testng.xml + + true + 1 + 256 + paranoid + @@ -434,6 +480,12 @@ Licensed under the MIT License. src/test/resources/direct-testng.xml + + true + 1 + 256 + paranoid + @@ -455,6 +507,12 @@ Licensed under the MIT License. src/test/resources/multi-master-testng.xml + + true + 1 + 256 + paranoid + @@ -476,6 +534,12 @@ Licensed under the MIT License. src/test/resources/flaky-multi-master-testng.xml + + true + 1 + 256 + paranoid + @@ -497,6 +561,12 @@ Licensed under the MIT License. src/test/resources/fi-multi-master-testng.xml + + true + 1 + 256 + paranoid + @@ -519,6 +589,12 @@ Licensed under the MIT License. src/test/resources/examples-testng.xml + + true + 1 + 256 + paranoid + @@ -548,6 +624,12 @@ Licensed under the MIT License. src/test/resources/emulator-testng.xml + + true + 1 + 256 + paranoid + @@ -569,6 +651,12 @@ Licensed under the MIT License. src/test/resources/e2e-testng.xml + + true + 1 + 256 + paranoid + diff --git a/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/ReadMyWriteWorkflow.java b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/ReadMyWriteWorkflow.java index a3d5b79ad4ab..5584f243c419 100644 --- a/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/ReadMyWriteWorkflow.java +++ b/sdk/cosmos/azure-cosmos-benchmark/src/main/java/com/azure/cosmos/benchmark/ReadMyWriteWorkflow.java @@ -498,4 +498,13 @@ protected String getDocumentLink(Document doc) { return doc.getSelfLink(); } } + + @Override + void shutdown() { + if (this.client != null) { + this.client.close(); + } + + super.shutdown(); + } } diff --git a/sdk/cosmos/azure-cosmos-encryption/README.md b/sdk/cosmos/azure-cosmos-encryption/README.md index 97bc4c8ef534..d460dca455f1 100644 --- a/sdk/cosmos/azure-cosmos-encryption/README.md +++ b/sdk/cosmos/azure-cosmos-encryption/README.md @@ -12,7 +12,7 @@ The Azure Cosmos Encryption Plugin is used for encrypting data with a user-provi com.azure azure-cosmos-encryption - 2.24.0 + 2.25.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/cosmos/azure-cosmos-encryption/pom.xml b/sdk/cosmos/azure-cosmos-encryption/pom.xml index a9984111c017..1a2eeb22d564 100644 --- a/sdk/cosmos/azure-cosmos-encryption/pom.xml +++ b/sdk/cosmos/azure-cosmos-encryption/pom.xml @@ -49,6 +49,8 @@ Licensed under the MIT License. --add-opens com.azure.cosmos.encryption/com.azure.cosmos.encryption.util=ALL-UNNAMED --add-opens com.azure.cosmos.encryption/com.azure.cosmos.encryption.models=ALL-UNNAMED --add-opens com.azure.cosmos/com.azure.cosmos.implementation=ALL-UNNAMED + --add-modules java.management + --add-reads com.azure.cosmos.encryption=java.management - true @@ -217,6 +219,12 @@ Licensed under the MIT License. 3.5.3 unit + + true + 1 + 256 + paranoid + %regex[.*] @@ -225,6 +233,10 @@ Licensed under the MIT License. surefire.testng.verbose 2 + + listener + com.azure.cosmos.encryption.CosmosNettyLeakDetectorFactory + true @@ -263,6 +275,12 @@ Licensed under the MIT License. src/test/resources/unit-testng.xml + + true + 1 + 256 + paranoid + @@ -284,7 +302,12 @@ Licensed under the MIT License. src/test/resources/encryption-testng.xml - + + true + 1 + 256 + paranoid + diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/CosmosEncryptionAsyncClientTest.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/CosmosEncryptionAsyncClientTest.java index d396a824659b..d91fdd7c7af8 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/CosmosEncryptionAsyncClientTest.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/CosmosEncryptionAsyncClientTest.java @@ -20,6 +20,7 @@ import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Listeners; import java.lang.management.BufferPoolMXBean; import java.lang.management.ManagementFactory; @@ -29,16 +30,15 @@ import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; +@Listeners({TestNGLogListener.class, CosmosNettyLeakDetectorFactory.class}) public abstract class CosmosEncryptionAsyncClientTest implements ITest { protected static Logger logger = LoggerFactory.getLogger(CosmosEncryptionAsyncClientTest.class.getSimpleName()); protected static final int SUITE_SETUP_TIMEOUT = 120000; private static final ImplementationBridgeHelpers.CosmosClientBuilderHelper.CosmosClientBuilderAccessor cosmosClientBuilderAccessor = ImplementationBridgeHelpers.CosmosClientBuilderHelper.getCosmosClientBuilderAccessor(); - private final static AtomicInteger instancesUsed = new AtomicInteger(0); private final CosmosClientBuilder clientBuilder; private String testName; - private volatile Map activeClientsAtBegin = new HashMap<>(); public CosmosEncryptionAsyncClientTest() { this(new CosmosClientBuilder()); @@ -52,78 +52,6 @@ public final CosmosClientBuilder getClientBuilder() { return this.clientBuilder; } - @BeforeClass(groups = {"fast", "long", "direct", "multi-master", "encryption"}, timeOut = SUITE_SETUP_TIMEOUT) - - public void beforeClassSetupLeakDetection() { - if (instancesUsed.getAndIncrement() == 0) { - this.activeClientsAtBegin = RxDocumentClientImpl.getActiveClientsSnapshot(); - this.logMemoryUsage("BEFORE"); - } - } - - private void logMemoryUsage(String name) { - long pooledDirectBytes = PooledByteBufAllocator.DEFAULT.metric() - .directArenas().stream() - .mapToLong(io.netty.buffer.PoolArenaMetric::numActiveBytes) - .sum(); - - long used = PlatformDependent.usedDirectMemory(); - long max = PlatformDependent.maxDirectMemory(); - logger.info("MEMORY USAGE: {}:{}", this.getClass().getCanonicalName(), name); - logger.info("Netty Direct Memory: {}/{}/{} bytes", used, pooledDirectBytes, max); - for (BufferPoolMXBean pool : ManagementFactory.getPlatformMXBeans(BufferPoolMXBean.class)) { - logger.info("Pool {}: used={} bytes, capacity={} bytes, count={}", - pool.getName(), pool.getMemoryUsed(), pool.getTotalCapacity(), pool.getCount()); - } - } - - @AfterClass(groups = {"fast", "long", "direct", "multi-master", "encryption"}, timeOut = SUITE_SETUP_TIMEOUT) - public void afterClassSetupLeakDetection() { - if (instancesUsed.decrementAndGet() == 0) { - Map leakedClientSnapshotNow = RxDocumentClientImpl.getActiveClientsSnapshot(); - StringBuilder sb = new StringBuilder(); - Map leakedClientSnapshotAtBegin = activeClientsAtBegin; - - for (Integer clientId : leakedClientSnapshotNow.keySet()) { - if (!leakedClientSnapshotAtBegin.containsKey(clientId)) { - // this client was leaked in this class - sb - .append("CosmosClient [") - .append(clientId) - .append("] leaked. Callstack of initialization:\n") - .append(leakedClientSnapshotNow.get(clientId)) - .append("\n\n"); - } - } - - if (sb.length() > 0) { - String msg = "COSMOS CLIENT LEAKS detected in test class: " - + this.getClass().getCanonicalName() - + "\n\n" - + sb; - - logger.error(msg); - // fail(msg); - } - - List nettyLeaks = CosmosNettyLeakDetectorFactory.resetIdentifiedLeaks(); - if (nettyLeaks.size() > 0) { - sb.append("\n"); - for (String leak : nettyLeaks) { - sb.append(leak).append("\n"); - } - - String msg = "NETTY LEAKS detected in test class: " - + this.getClass().getCanonicalName() - + sb; - - logger.error(msg); - // fail(msg); - } - this.logMemoryUsage("AFTER"); - } - } - @Override public final String getTestName() { return this.testName; diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/CosmosNettyLeakDetectorFactory.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/CosmosNettyLeakDetectorFactory.java index c2b5f179131f..83a975352e0b 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/CosmosNettyLeakDetectorFactory.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/CosmosNettyLeakDetectorFactory.java @@ -2,23 +2,47 @@ // Licensed under the MIT License. package com.azure.cosmos.encryption; -import com.azure.cosmos.implementation.StackTraceUtil; +import com.azure.cosmos.implementation.Configs; +import com.azure.cosmos.implementation.RxDocumentClientImpl; +import io.netty.buffer.PooledByteBufAllocator; import io.netty.util.ResourceLeakDetector; import io.netty.util.ResourceLeakDetectorFactory; +import io.netty.util.internal.PlatformDependent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.testng.IClassListener; import org.testng.IExecutionListener; +import org.testng.IInvokedMethod; +import org.testng.IInvokedMethodListener; +import org.testng.ITestClass; +import org.testng.ITestContext; +import org.testng.ITestNGMethod; +import org.testng.ITestResult; +import java.lang.management.BufferPoolMXBean; +import java.lang.management.ManagementFactory; import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.assertj.core.api.Fail.fail; + +public final class CosmosNettyLeakDetectorFactory + extends ResourceLeakDetectorFactory implements IExecutionListener, IInvokedMethodListener, IClassListener { -public final class CosmosNettyLeakDetectorFactory extends ResourceLeakDetectorFactory implements IExecutionListener { protected static Logger logger = LoggerFactory.getLogger(CosmosNettyLeakDetectorFactory.class.getSimpleName()); private final static List identifiedLeaks = new ArrayList<>(); private final static Object staticLock = new Object(); + + private final static Map testClassInventory = new HashMap<>(); private static volatile boolean isLeakDetectionDisabled = false; private static volatile boolean isInitialized = false; + private volatile Map activeClientsAtBegin = new HashMap<>(); + public CosmosNettyLeakDetectorFactory() { } @@ -28,16 +52,149 @@ public void onExecutionStart() { } @Override - public void onExecutionFinish() { - // Run GC to force finalizers to run - only in finalizers Netty would actually detect any leaks. - System.gc(); - try { - Thread.sleep(1_000); - } catch (InterruptedException e) { - throw new RuntimeException(e); + public void onBeforeClass(ITestClass testClass) { + if (Configs.isClientLeakDetectionEnabled()) { + String testClassName = testClass.getRealClass().getCanonicalName(); + AtomicInteger instanceCountSnapshot = null; + synchronized (staticLock) { + instanceCountSnapshot = testClassInventory.get(testClassName); + if (instanceCountSnapshot == null) { + testClassInventory.put(testClassName, instanceCountSnapshot = new AtomicInteger(0)); + } + } + + int alreadyInitializedInstanceCount = instanceCountSnapshot.getAndIncrement(); + if (alreadyInitializedInstanceCount == 0) { + logger.info("LEAK DETECTION INITIALIZATION for test class {}", testClassName); + this.activeClientsAtBegin = RxDocumentClientImpl.getActiveClientsSnapshot(); + this.logMemoryUsage("BEFORE CLASS", testClassName); + } } } + @Override + public void onAfterClass(ITestClass testClass) { + // Unfortunately can't use this consistently in TestNG 7.51 because execution is not symmetric + // IClassListener.onBeforeClass + // TestClassBase.@BeforeClass + // TestClass.@BeforeClass + // IClassListener.onAfterClass + // TestClass.@AfterClass + // TestClassBase.@AfterClass + // we would want the IClassListener.onAfterClass to be called last - which system property + // -Dtestng.listener.execution.symmetric=true allows, but this is only available + // in TestNG 7.7.1 - which requires Java11 + // So, this class simulates this behavior by hooking into IInvokedMethodListener + } + + @Override + public void afterInvocation(IInvokedMethod method, ITestResult result, ITestContext ctx) { + ITestClass testClass = (ITestClass)result.getTestClass(); + ITestNGMethod[] afterClassMethods = testClass.getAfterClassMethods(); + boolean testClassHasAfterClassMethods = afterClassMethods != null && afterClassMethods.length > 0; + + boolean isImplementedAfterClassMethod = testClassHasAfterClassMethods + && method.isConfigurationMethod() + && method.getTestMethod().isAfterClassConfiguration(); + + ITestNGMethod[] testMethods = ctx.getAllTestMethods(); + + boolean isLastTestMethodOnTestClassWithoutAfterClassMethod = !testClassHasAfterClassMethods + && method.isTestMethod() + && method.getTestMethod().isTest() + && method.getTestMethod().getEnabled() + && testMethods.length > 0 + && method.getTestMethod() == testMethods[testMethods.length - 1]; + + if (isImplementedAfterClassMethod || isLastTestMethodOnTestClassWithoutAfterClassMethod) { + this.onAfterClassCore(testClass); + } + } + + private void onAfterClassCore(ITestClass testClass) { + if (Configs.isClientLeakDetectionEnabled()) { + String testClassName = testClass.getRealClass().getCanonicalName(); + AtomicInteger instanceCountSnapshot = null; + synchronized (staticLock) { + instanceCountSnapshot = testClassInventory.get(testClassName); + if (instanceCountSnapshot == null) { + throw new IllegalStateException( + "BeforeClass in TestListener was not called for testClass " + testClassName); + } + } + + int remainingInstanceCount = instanceCountSnapshot.decrementAndGet(); + if (remainingInstanceCount == 0) { + String failMessage = ""; + logger.info("LEAK DETECTION EVALUATION for test class {}", testClassName); + Map leakedClientSnapshotNow = RxDocumentClientImpl.getActiveClientsSnapshot(); + StringBuilder sb = new StringBuilder(); + Map leakedClientSnapshotAtBegin = activeClientsAtBegin; + + for (Integer clientId : leakedClientSnapshotNow.keySet()) { + if (!leakedClientSnapshotAtBegin.containsKey(clientId)) { + // this client was leaked in this class + sb + .append("CosmosClient [") + .append(clientId) + .append("] leaked. Callstack of initialization:\n") + .append(leakedClientSnapshotNow.get(clientId)) + .append("\n\n"); + } + } + + if (sb.length() > 0) { + failMessage = "COSMOS CLIENT LEAKS detected in test class: " + + testClassName + + "\n\n" + + sb; + } + + List nettyLeaks = CosmosNettyLeakDetectorFactory.resetIdentifiedLeaks(); + if (nettyLeaks.size() > 0) { + sb.append("\n"); + for (String leak : nettyLeaks) { + sb.append(leak).append("\n"); + } + + if (failMessage.length() > 0) { + failMessage += "\n\n"; + } + + failMessage += "NETTY LEAKS detected in test class: " + + testClassName + + "\n\n" + + sb; + + } + + if (failMessage.length() > 0) { + logger.error(failMessage); + fail(failMessage); + } + + this.logMemoryUsage("AFTER CLASS", testClassName); + } + } + } + + private void logMemoryUsage(String name, String className) { + long pooledDirectBytes = PooledByteBufAllocator.DEFAULT.metric() + .directArenas().stream() + .mapToLong(io.netty.buffer.PoolArenaMetric::numActiveBytes) + .sum(); + + long used = PlatformDependent.usedDirectMemory(); + long max = PlatformDependent.maxDirectMemory(); + logger.info("MEMORY USAGE: {}:{}", className, name); + logger.info("Netty Direct Memory: {}/{}/{} bytes", used, pooledDirectBytes, max); + for (BufferPoolMXBean pool : ManagementFactory.getPlatformMXBeans(BufferPoolMXBean.class)) { + logger.info("Pool {}: used={} bytes, capacity={} bytes, count={}", + pool.getName(), pool.getMemoryUsed(), pool.getTotalCapacity(), pool.getCount()); + } + } + + // This method must be called as early as possible in the lifecycle of a process // before any Netty ByteBuf has been allocated public static void ingestIntoNetty() { @@ -50,15 +207,12 @@ public static void ingestIntoNetty() { return; } - // Must run before any Netty ByteBuf is allocated - ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.PARANOID); - // sample every allocation - System.setProperty("io.netty.leakDetection.samplingInterval", "1"); - System.setProperty("io.netty.leakDetection.targetRecords", "256"); // install custom reporter ResourceLeakDetectorFactory.setResourceLeakDetectorFactory(new CosmosNettyLeakDetectorFactory()); - logger.info("NETTY LEAK detection initialized"); + logger.info( + "NETTY LEAK detection initialized, CosmosClient leak detection enabled: {}", + Configs.isClientLeakDetectionEnabled()); isInitialized = true; } } @@ -82,7 +236,7 @@ public static List resetIdentifiedLeaks() { public static AutoCloseable createDisableLeakDetectionScope() { synchronized (staticLock) { - logger.info("Disabling Leak detection: {}", StackTraceUtil.currentCallStack()); + logger.warn("Disabling Leak detection:"); isLeakDetectionDisabled = true; return new DisableLeakDetectionScope(); @@ -131,8 +285,10 @@ protected void reportInstancesLeak(String resourceType) { synchronized (staticLock) { if (!isLeakDetectionDisabled) { String msg = "NETTY LEAK (instances) type=" + resourceType; + identifiedLeaks.add(msg); logger.error(msg); + } } } @@ -144,6 +300,13 @@ private static final class DisableLeakDetectionScope implements AutoCloseable { @Override public void close() { synchronized (staticLock) { + CosmosNettyLeakDetectorFactory.resetIdentifiedLeaks(); + try { + Thread.sleep(10_000); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + CosmosNettyLeakDetectorFactory.resetIdentifiedLeaks(); isLeakDetectionDisabled = false; logger.info("Leak detection enabled again."); } diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/EncryptionAsyncApiCrudTest.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/EncryptionAsyncApiCrudTest.java index 1fbda8eb17f0..c9ee457fa750 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/EncryptionAsyncApiCrudTest.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/EncryptionAsyncApiCrudTest.java @@ -509,117 +509,118 @@ public void crudOnDifferentOverload() { String databaseId = UUID.randomUUID().toString(); try { createNewDatabaseWithClientEncryptionKey(databaseId); - CosmosAsyncClient asyncClient = getClientBuilder().buildAsyncClient(); - KeyEncryptionKeyResolver keyEncryptionKeyResolver = new TestKeyEncryptionKeyResolver(); - CosmosEncryptionAsyncClient cosmosEncryptionAsyncClient = new CosmosEncryptionClientBuilder().cosmosAsyncClient(asyncClient).keyEncryptionKeyResolver( - keyEncryptionKeyResolver).keyEncryptionKeyResolverName("TEST_KEY_RESOLVER").buildAsyncClient(); - CosmosEncryptionAsyncDatabase cosmosEncryptionAsyncDatabase = - cosmosEncryptionAsyncClient.getCosmosEncryptionAsyncDatabase(asyncClient.getDatabase(databaseId)); - - String containerId = UUID.randomUUID().toString(); - ClientEncryptionPolicy clientEncryptionPolicy = new ClientEncryptionPolicy(getPaths(1), 1); - createEncryptionContainer(cosmosEncryptionAsyncDatabase, clientEncryptionPolicy, containerId); - CosmosEncryptionAsyncContainer encryptionAsyncContainerOriginal = - cosmosEncryptionAsyncDatabase.getCosmosEncryptionAsyncContainer(containerId); - - List actualProperties = new ArrayList<>(); - // Read item - EncryptionPojo properties = getItem(UUID.randomUUID().toString()); - CosmosItemResponse itemResponse = encryptionAsyncContainerOriginal.createItem(properties).block(); - assertThat(itemResponse.getRequestCharge()).isGreaterThan(0); - EncryptionPojo responseItem = itemResponse.getItem(); - validateResponse(properties, responseItem); - actualProperties.add(properties); - - properties = getItem(UUID.randomUUID().toString()); - CosmosItemResponse itemResponse1 = encryptionAsyncContainerOriginal.createItem(properties, new CosmosItemRequestOptions()).block(); - assertThat(itemResponse1.getRequestCharge()).isGreaterThan(0); - EncryptionPojo responseItem1 = itemResponse1.getItem(); - validateResponse(properties, responseItem1); - actualProperties.add(properties); - - //Upsert Item - properties = getItem(UUID.randomUUID().toString()); - CosmosItemResponse upsertResponse1 = encryptionAsyncContainerOriginal.upsertItem(properties).block(); - assertThat(upsertResponse1.getRequestCharge()).isGreaterThan(0); - EncryptionPojo responseItem2 = upsertResponse1.getItem(); - validateResponse(properties, responseItem2); - actualProperties.add(properties); - - properties = getItem(UUID.randomUUID().toString()); - CosmosItemResponse upsertResponse2 = encryptionAsyncContainerOriginal.upsertItem(properties, new CosmosItemRequestOptions()).block(); - assertThat(upsertResponse2.getRequestCharge()).isGreaterThan(0); - EncryptionPojo responseItem3 = upsertResponse2.getItem(); - validateResponse(properties, responseItem3); - actualProperties.add(properties); - - //Read Item - EncryptionPojo readItem = encryptionAsyncContainerOriginal.readItem(actualProperties.get(0).getId(), - new PartitionKey(actualProperties.get(0).getMypk()), EncryptionPojo.class).block().getItem(); - validateResponse(actualProperties.get(0), readItem); - - //Query Item - String query = String.format("SELECT * from c where c.id = '%s'", actualProperties.get(1).getId()); - - CosmosPagedFlux feedResponseIterator = - encryptionAsyncContainerOriginal.queryItems(query, EncryptionPojo.class); - List feedResponse = feedResponseIterator.byPage().blockFirst().getResults(); - assertThat(feedResponse.size()).isGreaterThanOrEqualTo(1); - for (EncryptionPojo pojo : feedResponse) { - if (pojo.getId().equals(actualProperties.get(1).getId())) { - validateResponse(pojo, responseItem1); + try (CosmosAsyncClient asyncClient = getClientBuilder().buildAsyncClient()) { + KeyEncryptionKeyResolver keyEncryptionKeyResolver = new TestKeyEncryptionKeyResolver(); + CosmosEncryptionAsyncClient cosmosEncryptionAsyncClient = new CosmosEncryptionClientBuilder().cosmosAsyncClient(asyncClient).keyEncryptionKeyResolver( + keyEncryptionKeyResolver).keyEncryptionKeyResolverName("TEST_KEY_RESOLVER").buildAsyncClient(); + CosmosEncryptionAsyncDatabase cosmosEncryptionAsyncDatabase = + cosmosEncryptionAsyncClient.getCosmosEncryptionAsyncDatabase(asyncClient.getDatabase(databaseId)); + + String containerId = UUID.randomUUID().toString(); + ClientEncryptionPolicy clientEncryptionPolicy = new ClientEncryptionPolicy(getPaths(1), 1); + createEncryptionContainer(cosmosEncryptionAsyncDatabase, clientEncryptionPolicy, containerId); + CosmosEncryptionAsyncContainer encryptionAsyncContainerOriginal = + cosmosEncryptionAsyncDatabase.getCosmosEncryptionAsyncContainer(containerId); + + List actualProperties = new ArrayList<>(); + // Read item + EncryptionPojo properties = getItem(UUID.randomUUID().toString()); + CosmosItemResponse itemResponse = encryptionAsyncContainerOriginal.createItem(properties).block(); + assertThat(itemResponse.getRequestCharge()).isGreaterThan(0); + EncryptionPojo responseItem = itemResponse.getItem(); + validateResponse(properties, responseItem); + actualProperties.add(properties); + + properties = getItem(UUID.randomUUID().toString()); + CosmosItemResponse itemResponse1 = encryptionAsyncContainerOriginal.createItem(properties, new CosmosItemRequestOptions()).block(); + assertThat(itemResponse1.getRequestCharge()).isGreaterThan(0); + EncryptionPojo responseItem1 = itemResponse1.getItem(); + validateResponse(properties, responseItem1); + actualProperties.add(properties); + + //Upsert Item + properties = getItem(UUID.randomUUID().toString()); + CosmosItemResponse upsertResponse1 = encryptionAsyncContainerOriginal.upsertItem(properties).block(); + assertThat(upsertResponse1.getRequestCharge()).isGreaterThan(0); + EncryptionPojo responseItem2 = upsertResponse1.getItem(); + validateResponse(properties, responseItem2); + actualProperties.add(properties); + + properties = getItem(UUID.randomUUID().toString()); + CosmosItemResponse upsertResponse2 = encryptionAsyncContainerOriginal.upsertItem(properties, new CosmosItemRequestOptions()).block(); + assertThat(upsertResponse2.getRequestCharge()).isGreaterThan(0); + EncryptionPojo responseItem3 = upsertResponse2.getItem(); + validateResponse(properties, responseItem3); + actualProperties.add(properties); + + //Read Item + EncryptionPojo readItem = encryptionAsyncContainerOriginal.readItem(actualProperties.get(0).getId(), + new PartitionKey(actualProperties.get(0).getMypk()), EncryptionPojo.class).block().getItem(); + validateResponse(actualProperties.get(0), readItem); + + //Query Item + String query = String.format("SELECT * from c where c.id = '%s'", actualProperties.get(1).getId()); + + CosmosPagedFlux feedResponseIterator = + encryptionAsyncContainerOriginal.queryItems(query, EncryptionPojo.class); + List feedResponse = feedResponseIterator.byPage().blockFirst().getResults(); + assertThat(feedResponse.size()).isGreaterThanOrEqualTo(1); + for (EncryptionPojo pojo : feedResponse) { + if (pojo.getId().equals(actualProperties.get(1).getId())) { + validateResponse(pojo, responseItem1); + } } - } - CosmosQueryRequestOptions cosmosQueryRequestOptions1 = new CosmosQueryRequestOptions(); + CosmosQueryRequestOptions cosmosQueryRequestOptions1 = new CosmosQueryRequestOptions(); - CosmosPagedFlux feedResponseIterator1 = - encryptionAsyncContainerOriginal.queryItems(query, cosmosQueryRequestOptions1, EncryptionPojo.class); - List feedResponse1 = feedResponseIterator1.byPage().blockFirst().getResults(); - assertThat(feedResponse1.size()).isGreaterThanOrEqualTo(1); - for (EncryptionPojo pojo : feedResponse1) { - if (pojo.getId().equals(actualProperties.get(1).getId())) { - validateResponse(pojo, responseItem1); + CosmosPagedFlux feedResponseIterator1 = + encryptionAsyncContainerOriginal.queryItems(query, cosmosQueryRequestOptions1, EncryptionPojo.class); + List feedResponse1 = feedResponseIterator1.byPage().blockFirst().getResults(); + assertThat(feedResponse1.size()).isGreaterThanOrEqualTo(1); + for (EncryptionPojo pojo : feedResponse1) { + if (pojo.getId().equals(actualProperties.get(1).getId())) { + validateResponse(pojo, responseItem1); + } } - } - CosmosQueryRequestOptions cosmosQueryRequestOptions2 = new CosmosQueryRequestOptions(); - SqlQuerySpec querySpec = new SqlQuerySpec(query); - - CosmosPagedFlux feedResponseIterator2 = - encryptionAsyncContainerOriginal.queryItems(querySpec, cosmosQueryRequestOptions2, EncryptionPojo.class); - List feedResponse2 = feedResponseIterator2.byPage().blockFirst().getResults(); - assertThat(feedResponse2.size()).isGreaterThanOrEqualTo(1); - for (EncryptionPojo pojo : feedResponse2) { - if (pojo.getId().equals(actualProperties.get(1).getId())) { - validateResponse(pojo, responseItem1); + CosmosQueryRequestOptions cosmosQueryRequestOptions2 = new CosmosQueryRequestOptions(); + SqlQuerySpec querySpec = new SqlQuerySpec(query); + + CosmosPagedFlux feedResponseIterator2 = + encryptionAsyncContainerOriginal.queryItems(querySpec, cosmosQueryRequestOptions2, EncryptionPojo.class); + List feedResponse2 = feedResponseIterator2.byPage().blockFirst().getResults(); + assertThat(feedResponse2.size()).isGreaterThanOrEqualTo(1); + for (EncryptionPojo pojo : feedResponse2) { + if (pojo.getId().equals(actualProperties.get(1).getId())) { + validateResponse(pojo, responseItem1); + } } - } - //Replace Item - CosmosItemResponse replaceResponse = - encryptionAsyncContainerOriginal.replaceItem(actualProperties.get(2), actualProperties.get(2).getId(), - new PartitionKey(actualProperties.get(2).getMypk())).block(); - assertThat(upsertResponse1.getRequestCharge()).isGreaterThan(0); - responseItem = replaceResponse.getItem(); - validateResponse(actualProperties.get(2), responseItem); - - //Delete Item - CosmosItemResponse deleteResponse = encryptionAsyncContainerOriginal.deleteItem(actualProperties.get(0).getId(), - new PartitionKey(actualProperties.get(0).getMypk())).block(); - assertThat(deleteResponse.getStatusCode()).isEqualTo(204); - - CosmosItemResponse deleteResponse1 = encryptionAsyncContainerOriginal.deleteItem(actualProperties.get(1).getId(), - new PartitionKey(actualProperties.get(1).getMypk()), new CosmosItemRequestOptions()).block(); - assertThat(deleteResponse1.getStatusCode()).isEqualTo(204); - - CosmosItemResponse deleteResponse2 = encryptionAsyncContainerOriginal.deleteItem(actualProperties.get(2), - new CosmosItemRequestOptions()).block(); - assertThat(deleteResponse2.getStatusCode()).isEqualTo(204); - - CosmosItemResponse deleteResponse3 = encryptionAsyncContainerOriginal.deleteAllItemsByPartitionKey(new PartitionKey(actualProperties.get(3).getMypk()), - new CosmosItemRequestOptions()).block(); - assertThat(deleteResponse3.getStatusCode()).isEqualTo(200); + //Replace Item + CosmosItemResponse replaceResponse = + encryptionAsyncContainerOriginal.replaceItem(actualProperties.get(2), actualProperties.get(2).getId(), + new PartitionKey(actualProperties.get(2).getMypk())).block(); + assertThat(upsertResponse1.getRequestCharge()).isGreaterThan(0); + responseItem = replaceResponse.getItem(); + validateResponse(actualProperties.get(2), responseItem); + + //Delete Item + CosmosItemResponse deleteResponse = encryptionAsyncContainerOriginal.deleteItem(actualProperties.get(0).getId(), + new PartitionKey(actualProperties.get(0).getMypk())).block(); + assertThat(deleteResponse.getStatusCode()).isEqualTo(204); + + CosmosItemResponse deleteResponse1 = encryptionAsyncContainerOriginal.deleteItem(actualProperties.get(1).getId(), + new PartitionKey(actualProperties.get(1).getMypk()), new CosmosItemRequestOptions()).block(); + assertThat(deleteResponse1.getStatusCode()).isEqualTo(204); + + CosmosItemResponse deleteResponse2 = encryptionAsyncContainerOriginal.deleteItem(actualProperties.get(2), + new CosmosItemRequestOptions()).block(); + assertThat(deleteResponse2.getStatusCode()).isEqualTo(204); + + CosmosItemResponse deleteResponse3 = encryptionAsyncContainerOriginal.deleteAllItemsByPartitionKey(new PartitionKey(actualProperties.get(3).getMypk()), + new CosmosItemRequestOptions()).block(); + assertThat(deleteResponse3.getStatusCode()).isEqualTo(200); + } } finally { try { //deleting the database created for this test diff --git a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/TestSuiteBase.java b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/TestSuiteBase.java index 3457351177d4..9186c4099d70 100644 --- a/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/TestSuiteBase.java +++ b/sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/TestSuiteBase.java @@ -82,8 +82,7 @@ import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.spy; -@Listeners({TestNGLogListener.class}) -public class TestSuiteBase extends CosmosEncryptionAsyncClientTest { +public abstract class TestSuiteBase extends CosmosEncryptionAsyncClientTest { private static final int DEFAULT_BULK_INSERT_CONCURRENCY_LEVEL = 500; private static final ObjectMapper objectMapper = new ObjectMapper(); @@ -170,6 +169,7 @@ protected static CosmosAsyncContainer getSharedSinglePartitionCosmosContainer(Co } static { + CosmosNettyLeakDetectorFactory.ingestIntoNetty(); accountConsistency = parseConsistency(TestConfigurations.CONSISTENCY); desiredConsistencies = immutableListOrNull( ObjectUtils.defaultIfNull(parseDesiredConsistencies(TestConfigurations.DESIRED_CONSISTENCIES), @@ -256,13 +256,6 @@ public void beforeSuite() { } } - @BeforeSuite(groups = {"unit"}) - public void parallelizeUnitTests(ITestContext context) { - // TODO: Parallelization was disabled due to flaky tests. Re-enable after fixing the flaky tests. -// context.getSuite().getXmlSuite().setParallel(XmlSuite.ParallelMode.CLASSES); -// context.getSuite().getXmlSuite().setThreadCount(Runtime.getRuntime().availableProcessors()); - } - @AfterSuite(groups = {"fast", "long", "direct", "multi-master", "encryption"}, timeOut = SUITE_SHUTDOWN_TIMEOUT) public void afterSuite() { @@ -800,18 +793,6 @@ static protected void safeDeleteCollection(CosmosAsyncDatabase database, String } } - static protected void safeCloseAsync(CosmosAsyncClient client) { - if (client != null) { - new Thread(() -> { - try { - client.close(); - } catch (Exception e) { - logger.error("failed to close client", e); - } - }).start(); - } - } - static protected void safeClose(CosmosAsyncClient client) { if (client != null) { try { @@ -1482,9 +1463,4 @@ protected static void validateResponse(EncryptionPojo originalItem, EncryptionPo assertThat(result.getSensitiveChildPojo2DArray()[0][0].getSensitiveStringArray()).isEqualTo(originalItem.getSensitiveChildPojo2DArray()[0][0].getSensitiveStringArray()); assertThat(result.getSensitiveChildPojo2DArray()[0][0].getSensitiveString3DArray()).isEqualTo(originalItem.getSensitiveChildPojo2DArray()[0][0].getSensitiveString3DArray()); } - - - static { - CosmosNettyLeakDetectorFactory.ingestIntoNetty(); - } } diff --git a/sdk/cosmos/azure-cosmos-kafka-connect/pom.xml b/sdk/cosmos/azure-cosmos-kafka-connect/pom.xml index c40222186043..8c667bf4db24 100644 --- a/sdk/cosmos/azure-cosmos-kafka-connect/pom.xml +++ b/sdk/cosmos/azure-cosmos-kafka-connect/pom.xml @@ -277,6 +277,12 @@ Licensed under the MIT License. 3.5.3 unit + + true + 1 + 256 + paranoid + %regex[.*] @@ -285,6 +291,10 @@ Licensed under the MIT License. surefire.testng.verbose 2 + + listener + com.azure.cosmos.CosmosNettyLeakDetectorFactory + true @@ -534,7 +544,12 @@ Licensed under the MIT License. src/test/resources/unit-testng.xml - + + true + 1 + 256 + paranoid + @@ -556,7 +571,12 @@ Licensed under the MIT License. src/test/resources/kafka-emulator-testng.xml - + + true + 1 + 256 + paranoid + @@ -578,7 +598,12 @@ Licensed under the MIT License. src/test/resources/kafka-testng.xml - + + true + 1 + 256 + paranoid + @@ -600,7 +625,12 @@ Licensed under the MIT License. src/test/resources/kafka-integration-testng.xml - + + true + 1 + 256 + paranoid + diff --git a/sdk/cosmos/azure-cosmos-spark-account-data-resolver-sample/pom.xml b/sdk/cosmos/azure-cosmos-spark-account-data-resolver-sample/pom.xml index 395ba445c54b..725aa4898852 100644 --- a/sdk/cosmos/azure-cosmos-spark-account-data-resolver-sample/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark-account-data-resolver-sample/pom.xml @@ -696,6 +696,12 @@ maven-surefire-plugin 3.5.3 + + true + 1 + 256 + paranoid + **/*.* **/*Test.* @@ -703,6 +709,16 @@ **/*Spec.* true + + + surefire.testng.verbose + 2 + + + listener + com.azure.cosmos.CosmosNettyLeakDetectorFactory + + diff --git a/sdk/cosmos/azure-cosmos-spark_3-3_2-12/pom.xml b/sdk/cosmos/azure-cosmos-spark_3-3_2-12/pom.xml index 948990bafe7f..315bc2259f92 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-3_2-12/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_3-3_2-12/pom.xml @@ -118,6 +118,12 @@ maven-surefire-plugin 3.5.3 + + true + 1 + 256 + paranoid + **/*.* **/*Test.* @@ -125,6 +131,16 @@ **/*Spec.* true + + + surefire.testng.verbose + 2 + + + listener + com.azure.cosmos.CosmosNettyLeakDetectorFactory + + diff --git a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml index fcecfd210ea5..0ec4dd9d214a 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/pom.xml @@ -118,6 +118,12 @@ maven-surefire-plugin 3.5.3 + + true + 1 + 256 + paranoid + **/*.* **/*Test.* @@ -125,6 +131,16 @@ **/*Spec.* true + + + surefire.testng.verbose + 2 + + + listener + com.azure.cosmos.CosmosNettyLeakDetectorFactory + + diff --git a/sdk/cosmos/azure-cosmos-spark_3-5_2-12/pom.xml b/sdk/cosmos/azure-cosmos-spark_3-5_2-12/pom.xml index 435e9fd672e5..11f0ab4f685a 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-5_2-12/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_3-5_2-12/pom.xml @@ -118,6 +118,12 @@ maven-surefire-plugin 3.5.3 + + true + 1 + 256 + paranoid + **/*.* **/*Test.* @@ -125,6 +131,16 @@ **/*Spec.* true + + + surefire.testng.verbose + 2 + + + listener + com.azure.cosmos.CosmosNettyLeakDetectorFactory + + diff --git a/sdk/cosmos/azure-cosmos-spark_3/pom.xml b/sdk/cosmos/azure-cosmos-spark_3/pom.xml index ba4c3106ead7..e620df1b0373 100644 --- a/sdk/cosmos/azure-cosmos-spark_3/pom.xml +++ b/sdk/cosmos/azure-cosmos-spark_3/pom.xml @@ -747,6 +747,12 @@ maven-surefire-plugin 3.5.3 + + true + 1 + 256 + paranoid + **/*.* **/*Test.* @@ -754,6 +760,16 @@ **/*Spec.* true + + + surefire.testng.verbose + 2 + + + listener + com.azure.cosmos.CosmosNettyLeakDetectorFactory + + diff --git a/sdk/cosmos/azure-cosmos-test/pom.xml b/sdk/cosmos/azure-cosmos-test/pom.xml index ee090944ee95..7ef7ada263d7 100644 --- a/sdk/cosmos/azure-cosmos-test/pom.xml +++ b/sdk/cosmos/azure-cosmos-test/pom.xml @@ -152,6 +152,12 @@ Licensed under the MIT License. 3.5.3 unit + + true + 1 + 256 + paranoid + %regex[.*] @@ -160,6 +166,10 @@ Licensed under the MIT License. surefire.testng.verbose 2 + + listener + com.azure.cosmos.CosmosNettyLeakDetectorFactory + true diff --git a/sdk/cosmos/azure-cosmos-tests/pom.xml b/sdk/cosmos/azure-cosmos-tests/pom.xml index 13536af9918a..fc7765209c4d 100644 --- a/sdk/cosmos/azure-cosmos-tests/pom.xml +++ b/sdk/cosmos/azure-cosmos-tests/pom.xml @@ -233,6 +233,12 @@ Licensed under the MIT License. 3.5.3 unit + + true + 1 + 256 + paranoid + %regex[.*] @@ -241,6 +247,10 @@ Licensed under the MIT License. surefire.testng.verbose 2 + + listener + com.azure.cosmos.CosmosNettyLeakDetectorFactory + true @@ -314,7 +324,12 @@ Licensed under the MIT License. src/test/resources/unit-testng.xml - + + true + 1 + 256 + paranoid + @@ -336,7 +351,12 @@ Licensed under the MIT License. src/test/resources/fast-testng.xml - + + true + 1 + 256 + paranoid + @@ -358,7 +378,12 @@ Licensed under the MIT License. src/test/resources/split-testng.xml - + + true + 1 + 256 + paranoid + @@ -380,7 +405,12 @@ Licensed under the MIT License. src/test/resources/cfp-split-testng.xml - + + true + 1 + 256 + paranoid + @@ -402,7 +432,12 @@ Licensed under the MIT License. src/test/resources/query-testng.xml - + + true + 1 + 256 + paranoid + @@ -424,7 +459,12 @@ Licensed under the MIT License. src/test/resources/long-testng.xml - + + true + 1 + 256 + paranoid + @@ -446,7 +486,12 @@ Licensed under the MIT License. src/test/resources/direct-testng.xml - + + true + 1 + 256 + paranoid + @@ -468,7 +513,12 @@ Licensed under the MIT License. src/test/resources/multi-master-testng.xml - + + true + 1 + 256 + paranoid + @@ -490,7 +540,12 @@ Licensed under the MIT License. src/test/resources/circuit-breaker-read-all-read-many-testng.xml - + + true + 1 + 256 + paranoid + @@ -512,7 +567,12 @@ Licensed under the MIT License. src/test/resources/circuit-breaker-misc-direct-testng.xml - + + true + 1 + 256 + paranoid + @@ -534,7 +594,12 @@ Licensed under the MIT License. src/test/resources/circuit-breaker-misc-gateway-testng.xml - + + true + 1 + 256 + paranoid + @@ -556,7 +621,12 @@ Licensed under the MIT License. src/test/resources/flaky-multi-master-testng.xml - + + true + 1 + 256 + paranoid + @@ -578,7 +648,12 @@ Licensed under the MIT License. src/test/resources/fi-multi-master-testng.xml - + + true + 1 + 256 + paranoid + @@ -600,7 +675,12 @@ Licensed under the MIT License. src/test/resources/multi-region-testng.xml - + + true + 1 + 256 + paranoid + @@ -623,7 +703,12 @@ Licensed under the MIT License. src/test/resources/examples-testng.xml - + + true + 1 + 256 + paranoid + @@ -653,7 +738,12 @@ Licensed under the MIT License. src/test/resources/emulator-testng.xml - + + true + 1 + 256 + paranoid + @@ -675,7 +765,12 @@ Licensed under the MIT License. src/test/resources/long-emulator-testng.xml - + + true + 1 + 256 + paranoid + @@ -697,7 +792,12 @@ Licensed under the MIT License. src/test/resources/emulator-vnext-testng.xml - + + true + 1 + 256 + paranoid + @@ -719,7 +819,12 @@ Licensed under the MIT License. src/test/resources/e2e-testng.xml - + + true + 1 + 256 + paranoid + @@ -741,7 +846,12 @@ Licensed under the MIT License. src/test/resources/thinclient-testng.xml - + + true + 1 + 256 + paranoid + @@ -763,6 +873,9 @@ Licensed under the MIT License. src/test/resources/fi-thinclient-multi-region-testng.xml + + true + @@ -784,6 +897,9 @@ Licensed under the MIT License. src/test/resources/fi-thinclient-multi-master-testng.xml + + true + diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/ChangeFeedContinuationTokenUtilsTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/ChangeFeedContinuationTokenUtilsTests.java index 2bcb312b0dd1..cc0082e492d9 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/ChangeFeedContinuationTokenUtilsTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/ChangeFeedContinuationTokenUtilsTests.java @@ -159,7 +159,7 @@ public void extractContinuationTokens() { @AfterClass(groups = { "emulator" }, timeOut = 3 * SHUTDOWN_TIMEOUT, alwaysRun = true) public void afterClass() { logger.info("starting ...."); - safeCloseAsync(this.client); + safeClose(this.client); } private static class TestItem { diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/ClientUnderTestBuilder.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/ClientUnderTestBuilder.java index 9565d9cb630f..5c40da73f36e 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/ClientUnderTestBuilder.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/ClientUnderTestBuilder.java @@ -2,6 +2,7 @@ // Licensed under the MIT License. package com.azure.cosmos; +import com.azure.cosmos.implementation.AsyncDocumentClient; import com.azure.cosmos.implementation.ImplementationBridgeHelpers; import com.azure.cosmos.implementation.RxDocumentClientUnderTest; import com.azure.cosmos.implementation.Strings; @@ -59,6 +60,11 @@ public CosmosAsyncClient buildAsyncClient() { } catch (URISyntaxException e) { throw new IllegalArgumentException(e.getMessage()); } + + AsyncDocumentClient realAsyncClient = ReflectionUtils.getAsyncDocumentClient(cosmosAsyncClient); + if (realAsyncClient != null) { + realAsyncClient.close(); + } ReflectionUtils.setAsyncDocumentClient(cosmosAsyncClient, rxClient); return cosmosAsyncClient; } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosAsyncClientTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosAsyncClientTest.java index 24fe8f9b06b6..72c2f1d43a04 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosAsyncClientTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosAsyncClientTest.java @@ -18,6 +18,7 @@ import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Listeners; import java.lang.management.BufferPoolMXBean; import java.lang.management.ManagementFactory; @@ -29,6 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@Listeners({TestNGLogListener.class, CosmosNettyLeakDetectorFactory.class}) public abstract class CosmosAsyncClientTest implements ITest { public static final String ROUTING_GATEWAY_EMULATOR_PORT = ":8081"; @@ -36,10 +38,8 @@ public abstract class CosmosAsyncClientTest implements ITest { protected static Logger logger = LoggerFactory.getLogger(CosmosAsyncClientTest.class.getSimpleName()); protected static final int SUITE_SETUP_TIMEOUT = 120000; - private final static AtomicInteger instancesUsed = new AtomicInteger(0); private final CosmosClientBuilder clientBuilder; private String testName; - private volatile Map activeClientsAtBegin = new HashMap<>(); public CosmosAsyncClientTest() { this(new CosmosClientBuilder()); @@ -49,81 +49,6 @@ public CosmosAsyncClientTest(CosmosClientBuilder clientBuilder) { this.clientBuilder = clientBuilder; } - @BeforeClass(groups = {"thinclient", "fast", "long", "direct", "multi-region", "multi-master", "flaky-multi-master", "emulator", - "emulator-vnext", "split", "query", "cfp-split", "circuit-breaker-misc-gateway", "circuit-breaker-misc-direct", - "circuit-breaker-read-all-read-many", "fi-multi-master", "long-emulator", "fi-thinclient-multi-region", "fi-thinclient-multi-master"}, timeOut = SUITE_SETUP_TIMEOUT, alwaysRun = true) - public void beforeClassSetupLeakDetection() { - if (instancesUsed.getAndIncrement() == 0) { - this.activeClientsAtBegin = RxDocumentClientImpl.getActiveClientsSnapshot(); - this.logMemoryUsage("BEFORE"); - } - } - - private void logMemoryUsage(String name) { - long pooledDirectBytes = PooledByteBufAllocator.DEFAULT.metric() - .directArenas().stream() - .mapToLong(io.netty.buffer.PoolArenaMetric::numActiveBytes) - .sum(); - - long used = PlatformDependent.usedDirectMemory(); - long max = PlatformDependent.maxDirectMemory(); - logger.info("MEMORY USAGE: {}:{}", this.getClass().getCanonicalName(), name); - logger.info("Netty Direct Memory: {}/{}/{} bytes", used, pooledDirectBytes, max); - for (BufferPoolMXBean pool : ManagementFactory.getPlatformMXBeans(BufferPoolMXBean.class)) { - logger.info("Pool {}: used={} bytes, capacity={} bytes, count={}", - pool.getName(), pool.getMemoryUsed(), pool.getTotalCapacity(), pool.getCount()); - } - } - - @AfterClass(groups = {"thinclient", "fast", "long", "direct", "multi-region", "multi-master", "flaky-multi-master", "emulator", - "emulator-vnext", "split", "query", "cfp-split", "circuit-breaker-misc-gateway", "circuit-breaker-misc-direct", - "circuit-breaker-read-all-read-many", "fi-multi-master", "long-emulator", "fi-thinclient-multi-region", "fi-thinclient-multi-master"}, timeOut = SUITE_SETUP_TIMEOUT, alwaysRun = true) - public void afterClassSetupLeakDetection() { - if (instancesUsed.decrementAndGet() == 0) { - Map leakedClientSnapshotNow = RxDocumentClientImpl.getActiveClientsSnapshot(); - StringBuilder sb = new StringBuilder(); - Map leakedClientSnapshotAtBegin = activeClientsAtBegin; - - for (Integer clientId : leakedClientSnapshotNow.keySet()) { - if (!leakedClientSnapshotAtBegin.containsKey(clientId)) { - // this client was leaked in this class - sb - .append("CosmosClient [") - .append(clientId) - .append("] leaked. Callstack of initialization:\n") - .append(leakedClientSnapshotNow.get(clientId)) - .append("\n\n"); - } - } - - if (sb.length() > 0) { - String msg = "COSMOS CLIENT LEAKS detected in test class: " - + this.getClass().getCanonicalName() - + "\n\n" - + sb; - - logger.error(msg); - // fail(msg); - } - - List nettyLeaks = CosmosNettyLeakDetectorFactory.resetIdentifiedLeaks(); - if (nettyLeaks.size() > 0) { - sb.append("\n"); - for (String leak : nettyLeaks) { - sb.append(leak).append("\n"); - } - - String msg = "NETTY LEAKS detected in test class: " - + this.getClass().getCanonicalName() - + sb; - - logger.error(msg); - // fail(msg); - } - this.logMemoryUsage("AFTER"); - } - } - public final CosmosClientBuilder getClientBuilder() { return this.clientBuilder; } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosClientBuilderTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosClientBuilderTest.java index 53c03033ee3c..79121376b871 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosClientBuilderTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosClientBuilderTest.java @@ -61,12 +61,11 @@ public void validateBadPreferredRegions1() { @Test(groups = "unit") public void validateBadPreferredRegions2() { - try { - CosmosAsyncClient client = new CosmosClientBuilder() + try (CosmosAsyncClient client = new CosmosClientBuilder() .key(TestConfigurations.MASTER_KEY) .endpoint(hostName) .preferredRegions(Arrays.asList(" ")) - .buildAsyncClient(); + .buildAsyncClient()) { client.close(); } catch (Exception e) { assertThat(e).isInstanceOf(RuntimeException.class); @@ -92,9 +91,11 @@ public void validateApiTypePresent() { ImplementationBridgeHelpers.CosmosClientBuilderHelper.getCosmosClientBuilderAccessor(); accessor.setCosmosClientApiType(cosmosClientBuilder, apiType); - RxDocumentClientImpl documentClient = - (RxDocumentClientImpl) ReflectionUtils.getAsyncDocumentClient(cosmosClientBuilder.buildAsyncClient()); - assertThat(ReflectionUtils.getApiType(documentClient)).isEqualTo(apiType); + try (CosmosAsyncClient cosmosClient = cosmosClientBuilder.buildAsyncClient()) { + RxDocumentClientImpl documentClient = + (RxDocumentClientImpl) ReflectionUtils.getAsyncDocumentClient(cosmosClient); + assertThat(ReflectionUtils.getApiType(documentClient)).isEqualTo(apiType); + } } @Test(groups = "emulator", dataProvider = "regionScopedSessionContainerConfigs") @@ -111,23 +112,24 @@ public void validateSessionTokenCapturingForAccountDefaultConsistency(boolean sh .key(TestConfigurations.MASTER_KEY) .userAgentSuffix("custom-direct-client"); - CosmosAsyncClient client = cosmosClientBuilder.buildAsyncClient(); - RxDocumentClientImpl documentClient = - (RxDocumentClientImpl) ReflectionUtils.getAsyncDocumentClient(client); + try (CosmosAsyncClient client = cosmosClientBuilder.buildAsyncClient()) { + RxDocumentClientImpl documentClient = + (RxDocumentClientImpl) ReflectionUtils.getAsyncDocumentClient(client); - if (documentClient.getDefaultConsistencyLevelOfAccount() != ConsistencyLevel.SESSION) { - throw new SkipException("This test is only applicable when default account-level consistency is Session."); - } + if (documentClient.getDefaultConsistencyLevelOfAccount() != ConsistencyLevel.SESSION) { + throw new SkipException("This test is only applicable when default account-level consistency is Session."); + } - ISessionContainer sessionContainer = documentClient.getSession(); + ISessionContainer sessionContainer = documentClient.getSession(); - if (System.getProperty("COSMOS.SESSION_CAPTURING_TYPE") != null && System.getProperty("COSMOS.SESSION_CAPTURING_TYPE").equals("REGION_SCOPED")) { - assertThat(sessionContainer instanceof RegionScopedSessionContainer).isTrue(); - } else { - assertThat(sessionContainer instanceof SessionContainer).isTrue(); - } + if (System.getProperty("COSMOS.SESSION_CAPTURING_TYPE") != null && System.getProperty("COSMOS.SESSION_CAPTURING_TYPE").equals("REGION_SCOPED")) { + assertThat(sessionContainer instanceof RegionScopedSessionContainer).isTrue(); + } else { + assertThat(sessionContainer instanceof SessionContainer).isTrue(); + } - assertThat(sessionContainer.getDisableSessionCapturing()).isEqualTo(false); + assertThat(sessionContainer.getDisableSessionCapturing()).isEqualTo(false); + } } finally { System.clearProperty("COSMOS.SESSION_CAPTURING_TYPE"); } @@ -144,23 +146,24 @@ public void validateSessionTokenCapturingForAccountDefaultConsistencyWithEnvVari .key(TestConfigurations.MASTER_KEY) .userAgentSuffix("custom-direct-client"); - CosmosAsyncClient client = cosmosClientBuilder.buildAsyncClient(); - RxDocumentClientImpl documentClient = - (RxDocumentClientImpl) ReflectionUtils.getAsyncDocumentClient(client); + try (CosmosAsyncClient client = cosmosClientBuilder.buildAsyncClient()) { + RxDocumentClientImpl documentClient = + (RxDocumentClientImpl) ReflectionUtils.getAsyncDocumentClient(client); - if (documentClient.getDefaultConsistencyLevelOfAccount() != ConsistencyLevel.SESSION) { - throw new SkipException("This test is only applicable when default account-level consistency is Session."); - } + if (documentClient.getDefaultConsistencyLevelOfAccount() != ConsistencyLevel.SESSION) { + throw new SkipException("This test is only applicable when default account-level consistency is Session."); + } - ISessionContainer sessionContainer = documentClient.getSession(); + ISessionContainer sessionContainer = documentClient.getSession(); - if (System.getenv("COSMOS.SESSION_CAPTURING_TYPE") != null && System.getenv("COSMOS.SESSION_CAPTURING_TYPE").equals("REGION_SCOPED")) { - assertThat(sessionContainer instanceof RegionScopedSessionContainer).isTrue(); - } else { - assertThat(sessionContainer instanceof SessionContainer).isTrue(); - } + if (System.getenv("COSMOS.SESSION_CAPTURING_TYPE") != null && System.getenv("COSMOS.SESSION_CAPTURING_TYPE").equals("REGION_SCOPED")) { + assertThat(sessionContainer instanceof RegionScopedSessionContainer).isTrue(); + } else { + assertThat(sessionContainer instanceof SessionContainer).isTrue(); + } - assertThat(sessionContainer.getDisableSessionCapturing()).isEqualTo(false); + assertThat(sessionContainer.getDisableSessionCapturing()).isEqualTo(false); + } } finally { System.clearProperty("COSMOS.SESSION_CAPTURING_TYPE"); } @@ -168,102 +171,108 @@ public void validateSessionTokenCapturingForAccountDefaultConsistencyWithEnvVari @Test(groups = "emulator") public void validateContainerCreationInterceptor() { - CosmosClient clientWithoutInterceptor = new CosmosClientBuilder() + try (CosmosClient clientWithoutInterceptor = new CosmosClientBuilder() .endpoint(TestConfigurations.HOST) .key(TestConfigurations.MASTER_KEY) .userAgentSuffix("noInterceptor") - .buildClient(); - - ConcurrentMap> queryCache = new ConcurrentHashMap<>(); - - CosmosClient clientWithInterceptor = new CosmosClientBuilder() - .endpoint(TestConfigurations.HOST) - .key(TestConfigurations.MASTER_KEY) - .userAgentSuffix("withInterceptor") - .containerCreationInterceptor(originalContainer -> new CacheAndValidateQueriesContainer(originalContainer, queryCache)) - .buildClient(); - - CosmosAsyncClient asyncClientWithInterceptor = new CosmosClientBuilder() - .endpoint(TestConfigurations.HOST) - .key(TestConfigurations.MASTER_KEY) - .userAgentSuffix("withInterceptor") - .containerCreationInterceptor(originalContainer -> new CacheAndValidateQueriesContainer(originalContainer, queryCache)) - .buildAsyncClient(); - - CosmosContainer normalContainer = clientWithoutInterceptor - .getDatabase("TestDB") - .getContainer("TestContainer"); - assertThat(normalContainer).isNotNull(); - assertThat(normalContainer.getClass()).isEqualTo(CosmosContainer.class); - assertThat(normalContainer.asyncContainer.getClass()).isEqualTo(CosmosAsyncContainer.class); - - CosmosContainer customSyncContainer = clientWithInterceptor - .getDatabase("TestDB") - .getContainer("TestContainer"); - assertThat(customSyncContainer).isNotNull(); - assertThat(customSyncContainer.getClass()).isEqualTo(CosmosContainer.class); - assertThat(customSyncContainer.asyncContainer.getClass()).isEqualTo(CacheAndValidateQueriesContainer.class); - - CosmosAsyncContainer customAsyncContainer = asyncClientWithInterceptor - .getDatabase("TestDB") - .getContainer("TestContainer"); - assertThat(customAsyncContainer).isNotNull(); - assertThat(customAsyncContainer.getClass()).isEqualTo(CacheAndValidateQueriesContainer.class); - - try { - customSyncContainer.queryItems("SELECT * from c", null, ObjectNode.class); - fail("Unparameterized query should throw"); - } catch (IllegalStateException expectedError) {} - - try { - customAsyncContainer.queryItems("SELECT * from c", null, ObjectNode.class); - fail("Unparameterized query should throw"); - } catch (IllegalStateException expectedError) {} - - try { - customAsyncContainer.queryItems("SELECT * from c", ObjectNode.class); - fail("Unparameterized query should throw"); - } catch (IllegalStateException expectedError) {} - - SqlQuerySpec querySpec = new SqlQuerySpec().setQueryText("SELECT * from c"); - assertThat(queryCache).size().isEqualTo(0); - - try { - List items = customSyncContainer - .queryItems(querySpec, null, ObjectNode.class) - .stream().collect(Collectors.toList()); - fail("Not yet cached - the query above should always throw"); - } catch (CosmosException cosmosException) { - // Container does not exist - when not cached should fail - assertThat(cosmosException.getStatusCode()).isEqualTo(404); - assertThat(cosmosException.getSubStatusCode()).isEqualTo(1003); - } - - queryCache.putIfAbsent(new CacheKey(ObjectNode.class.getCanonicalName(), querySpec), new ArrayList<>()); - assertThat(queryCache).size().isEqualTo(1); - - // Validate that CacheKey equality check works - queryCache.putIfAbsent(new CacheKey(ObjectNode.class.getCanonicalName(), querySpec), new ArrayList<>()); - assertThat(queryCache).size().isEqualTo(1); - - // Validate that form cache the results can be served - List items = customSyncContainer - .queryItems(querySpec, null, ObjectNode.class) - .stream().collect(Collectors.toList()); + .buildClient()) { - querySpec = new SqlQuerySpec().setQueryText("SELECT * from c"); - CosmosPagedFlux cachedPagedFlux = customAsyncContainer - .queryItems(querySpec, null, ObjectNode.class); - assertThat(cachedPagedFlux.getClass().getName()).startsWith("com.azure.cosmos.util.CosmosPagedFluxStaticListImpl"); + ConcurrentMap> queryCache = new ConcurrentHashMap<>(); - // Validate that uncached query form async Container also fails with 404 due to non-existing Container - querySpec = new SqlQuerySpec().setQueryText("SELECT * from r"); - try { - CosmosPagedFlux uncachedPagedFlux = customAsyncContainer - .queryItems(querySpec, null, ObjectNode.class); - } catch (CosmosException cosmosException) { - assertThat(cosmosException.getStatusCode()).isEqualTo(404); - assertThat(cosmosException.getSubStatusCode()).isEqualTo(1003); + try (CosmosClient clientWithInterceptor = new CosmosClientBuilder() + .endpoint(TestConfigurations.HOST) + .key(TestConfigurations.MASTER_KEY) + .userAgentSuffix("withInterceptor") + .containerCreationInterceptor(originalContainer -> new CacheAndValidateQueriesContainer(originalContainer, queryCache)) + .buildClient()) { + + try (CosmosAsyncClient asyncClientWithInterceptor = new CosmosClientBuilder() + .endpoint(TestConfigurations.HOST) + .key(TestConfigurations.MASTER_KEY) + .userAgentSuffix("withInterceptor") + .containerCreationInterceptor(originalContainer -> new CacheAndValidateQueriesContainer(originalContainer, queryCache)) + .buildAsyncClient()) { + + CosmosContainer normalContainer = clientWithoutInterceptor + .getDatabase("TestDB") + .getContainer("TestContainer"); + assertThat(normalContainer).isNotNull(); + assertThat(normalContainer.getClass()).isEqualTo(CosmosContainer.class); + assertThat(normalContainer.asyncContainer.getClass()).isEqualTo(CosmosAsyncContainer.class); + + CosmosContainer customSyncContainer = clientWithInterceptor + .getDatabase("TestDB") + .getContainer("TestContainer"); + assertThat(customSyncContainer).isNotNull(); + assertThat(customSyncContainer.getClass()).isEqualTo(CosmosContainer.class); + assertThat(customSyncContainer.asyncContainer.getClass()).isEqualTo(CacheAndValidateQueriesContainer.class); + + CosmosAsyncContainer customAsyncContainer = asyncClientWithInterceptor + .getDatabase("TestDB") + .getContainer("TestContainer"); + assertThat(customAsyncContainer).isNotNull(); + assertThat(customAsyncContainer.getClass()).isEqualTo(CacheAndValidateQueriesContainer.class); + + try { + customSyncContainer.queryItems("SELECT * from c", null, ObjectNode.class); + fail("Unparameterized query should throw"); + } catch (IllegalStateException expectedError) { + } + + try { + customAsyncContainer.queryItems("SELECT * from c", null, ObjectNode.class); + fail("Unparameterized query should throw"); + } catch (IllegalStateException expectedError) { + } + + try { + customAsyncContainer.queryItems("SELECT * from c", ObjectNode.class); + fail("Unparameterized query should throw"); + } catch (IllegalStateException expectedError) { + } + + SqlQuerySpec querySpec = new SqlQuerySpec().setQueryText("SELECT * from c"); + assertThat(queryCache).size().isEqualTo(0); + + try { + List items = customSyncContainer + .queryItems(querySpec, null, ObjectNode.class) + .stream().collect(Collectors.toList()); + fail("Not yet cached - the query above should always throw"); + } catch (CosmosException cosmosException) { + // Container does not exist - when not cached should fail + assertThat(cosmosException.getStatusCode()).isEqualTo(404); + assertThat(cosmosException.getSubStatusCode()).isEqualTo(1003); + } + + queryCache.putIfAbsent(new CacheKey(ObjectNode.class.getCanonicalName(), querySpec), new ArrayList<>()); + assertThat(queryCache).size().isEqualTo(1); + + // Validate that CacheKey equality check works + queryCache.putIfAbsent(new CacheKey(ObjectNode.class.getCanonicalName(), querySpec), new ArrayList<>()); + assertThat(queryCache).size().isEqualTo(1); + + // Validate that form cache the results can be served + List items = customSyncContainer + .queryItems(querySpec, null, ObjectNode.class) + .stream().collect(Collectors.toList()); + + querySpec = new SqlQuerySpec().setQueryText("SELECT * from c"); + CosmosPagedFlux cachedPagedFlux = customAsyncContainer + .queryItems(querySpec, null, ObjectNode.class); + assertThat(cachedPagedFlux.getClass().getName()).startsWith("com.azure.cosmos.util.CosmosPagedFluxStaticListImpl"); + + // Validate that uncached query form async Container also fails with 404 due to non-existing Container + querySpec = new SqlQuerySpec().setQueryText("SELECT * from r"); + try { + CosmosPagedFlux uncachedPagedFlux = customAsyncContainer + .queryItems(querySpec, null, ObjectNode.class); + } catch (CosmosException cosmosException) { + assertThat(cosmosException.getStatusCode()).isEqualTo(404); + assertThat(cosmosException.getSubStatusCode()).isEqualTo(1003); + } + } + } } } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosDiagnosticsTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosDiagnosticsTest.java index 5eb5b59867db..ab5d26f0d4c4 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosDiagnosticsTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosDiagnosticsTest.java @@ -328,41 +328,42 @@ public void queryChangeFeedIncrementalGatewayMode() throws Exception { @Test(groups = {"fast"}, timeOut = TIMEOUT) public void gatewayDiagnostics() throws Exception { - CosmosClient testClient = new CosmosClientBuilder() + try (CosmosClient testClient = new CosmosClientBuilder() .endpoint(TestConfigurations.HOST) .key(TestConfigurations.MASTER_KEY) .contentResponseOnWriteEnabled(true) .userAgentSuffix(USER_AGENT_SUFFIX_GATEWAY_CLIENT) .gatewayMode() - .buildClient(); + .buildClient()) { - CosmosContainer testContainer = - testClient - .getDatabase(cosmosAsyncContainer.getDatabase().getId()) - .getContainer(cosmosAsyncContainer.getId()); - // Adding a delay to allow async VM instance metadata initialization to complete - Thread.sleep(2000); - InternalObjectNode internalObjectNode = getInternalObjectNode(); - CosmosItemResponse createResponse = testContainer.createItem(internalObjectNode); - String diagnostics = createResponse.getDiagnostics().toString(); - logger.info("DIAGNOSTICS: {}", diagnostics); - assertThat(diagnostics).contains("\"connectionMode\":\"GATEWAY\""); - assertThat(diagnostics).contains("gatewayStatisticsList"); - assertThat(diagnostics).contains("\"operationType\":\"Create\""); - assertThat(diagnostics).contains("\"metaDataName\":\"CONTAINER_LOOK_UP\""); - assertThat(diagnostics).contains("\"serializationType\":\"PARTITION_KEY_FETCH_SERIALIZATION\""); - assertThat(diagnostics).contains("\"userAgent\":\"" + this.gatewayClientUserAgent + "\""); - assertThat(diagnostics).containsAnyOf( - "\"machineId\":\"" + tempMachineId + "\"", // logged machineId should be static uuid or - "\"machineId\":\"" + ClientTelemetry.getMachineId(null) + "\"" // the vmId from Azure - ); - assertThat(diagnostics).containsPattern("(?s).*?\"activityId\":\"[^\\s\"]+\".*"); - assertThat(createResponse.getDiagnostics().getDuration()).isNotNull(); - assertThat(createResponse.getDiagnostics().getContactedRegionNames()).isNotNull(); - assertThat(createResponse.getDiagnostics().getRegionsContacted()).isNotEmpty(); - validateTransportRequestTimelineGateway(diagnostics); - validateRegionContacted(createResponse.getDiagnostics(), gatewayClient.asyncClient()); - isValidJSON(diagnostics); + CosmosContainer testContainer = + testClient + .getDatabase(cosmosAsyncContainer.getDatabase().getId()) + .getContainer(cosmosAsyncContainer.getId()); + // Adding a delay to allow async VM instance metadata initialization to complete + Thread.sleep(2000); + InternalObjectNode internalObjectNode = getInternalObjectNode(); + CosmosItemResponse createResponse = testContainer.createItem(internalObjectNode); + String diagnostics = createResponse.getDiagnostics().toString(); + logger.info("DIAGNOSTICS: {}", diagnostics); + assertThat(diagnostics).contains("\"connectionMode\":\"GATEWAY\""); + assertThat(diagnostics).contains("gatewayStatisticsList"); + assertThat(diagnostics).contains("\"operationType\":\"Create\""); + assertThat(diagnostics).contains("\"metaDataName\":\"CONTAINER_LOOK_UP\""); + assertThat(diagnostics).contains("\"serializationType\":\"PARTITION_KEY_FETCH_SERIALIZATION\""); + assertThat(diagnostics).contains("\"userAgent\":\"" + this.gatewayClientUserAgent + "\""); + assertThat(diagnostics).containsAnyOf( + "\"machineId\":\"" + tempMachineId + "\"", // logged machineId should be static uuid or + "\"machineId\":\"" + ClientTelemetry.getMachineId(null) + "\"" // the vmId from Azure + ); + assertThat(diagnostics).containsPattern("(?s).*?\"activityId\":\"[^\\s\"]+\".*"); + assertThat(createResponse.getDiagnostics().getDuration()).isNotNull(); + assertThat(createResponse.getDiagnostics().getContactedRegionNames()).isNotNull(); + assertThat(createResponse.getDiagnostics().getRegionsContacted()).isNotEmpty(); + validateTransportRequestTimelineGateway(diagnostics); + validateRegionContacted(createResponse.getDiagnostics(), gatewayClient.asyncClient()); + isValidJSON(diagnostics); + } } @Test(groups = {"fast"}, timeOut = TIMEOUT) @@ -474,31 +475,32 @@ public void systemDiagnosticsForSystemStateInformation() { @Test(groups = {"fast"}, timeOut = TIMEOUT) public void directDiagnostics() throws Exception { - CosmosClient testClient = new CosmosClientBuilder() + try (CosmosClient testClient = new CosmosClientBuilder() .endpoint(TestConfigurations.HOST) .key(TestConfigurations.MASTER_KEY) .contentResponseOnWriteEnabled(true) .userAgentSuffix(USER_AGENT_SUFFIX_DIRECT_CLIENT) .directMode() - .buildClient(); + .buildClient()) { - CosmosContainer testContainer = - testClient - .getDatabase(cosmosAsyncContainer.getDatabase().getId()) - .getContainer(cosmosAsyncContainer.getId()); + CosmosContainer testContainer = + testClient + .getDatabase(cosmosAsyncContainer.getDatabase().getId()) + .getContainer(cosmosAsyncContainer.getId()); - InternalObjectNode internalObjectNode = getInternalObjectNode(); - CosmosItemResponse createResponse = testContainer.createItem(internalObjectNode); - validateDirectModeDiagnosticsOnSuccess(createResponse.getDiagnostics(), directClient, this.directClientUserAgent); - validateChannelAcquisitionContext(createResponse.getDiagnostics(), false); + InternalObjectNode internalObjectNode = getInternalObjectNode(); + CosmosItemResponse createResponse = testContainer.createItem(internalObjectNode); + validateDirectModeDiagnosticsOnSuccess(createResponse.getDiagnostics(), directClient, this.directClientUserAgent); + validateChannelAcquisitionContext(createResponse.getDiagnostics(), false); - // validate that on failed operation request timeline is populated - try { - testContainer.createItem(internalObjectNode); - fail("expected 409"); - } catch (CosmosException e) { - validateDirectModeDiagnosticsOnException(e, this.directClientUserAgent); - validateChannelAcquisitionContext(e.getDiagnostics(), false); + // validate that on failed operation request timeline is populated + try { + testContainer.createItem(internalObjectNode); + fail("expected 409"); + } catch (CosmosException e) { + validateDirectModeDiagnosticsOnException(e, this.directClientUserAgent); + validateChannelAcquisitionContext(e.getDiagnostics(), false); + } } } @@ -796,7 +798,7 @@ public void queryDiagnosticsOnOrderBy() { deleteCollection(testcontainer); } - @Test(groups = {"fast"}, dataProvider = "operationTypeProvider", timeOut = TIMEOUT) + @Test(groups = {"fast"}, dataProvider = "operationTypeProvider", timeOut = TIMEOUT, retryAnalyzer = FlakyTestRetryAnalyzer.class) public void directDiagnosticsOnCancelledOperation(OperationType operationType) { CosmosAsyncClient client = null; @@ -1808,12 +1810,15 @@ public void expireRecordWhenRecordAlreadyCompleteExceptionally() throws URISynta RxDocumentServiceRequest.create(mockDiagnosticsClientContext(), OperationType.Read, ResourceType.Document), new Uri(new URI("http://localhost/replica-path").toString()) ); - RntbdRequestTimer requestTimer = new RntbdRequestTimer(5000, 5000); - RntbdRequestRecord record = new AsyncRntbdRequestRecord(requestArgs, requestTimer); - record.completeExceptionally(exception); - // validate record.toString() will work correctly - String recordString = record.toString(); - assertThat(recordString.contains("NotFoundException")).isTrue(); + try (RntbdRequestTimer requestTimer = + new RntbdRequestTimer(5000, 5000)) { + + RntbdRequestRecord record = new AsyncRntbdRequestRecord(requestArgs, requestTimer); + record.completeExceptionally(exception); + // validate record.toString() will work correctly + String recordString = record.toString(); + assertThat(recordString.contains("NotFoundException")).isTrue(); + } } finally { safeClose(client); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosNettyLeakDetectorFactory.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosNettyLeakDetectorFactory.java index c94a542edfff..c8c87f945a29 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosNettyLeakDetectorFactory.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosNettyLeakDetectorFactory.java @@ -2,23 +2,47 @@ // Licensed under the MIT License. package com.azure.cosmos; -import com.azure.cosmos.implementation.StackTraceUtil; +import com.azure.cosmos.implementation.Configs; +import com.azure.cosmos.implementation.RxDocumentClientImpl; +import io.netty.buffer.PooledByteBufAllocator; import io.netty.util.ResourceLeakDetector; import io.netty.util.ResourceLeakDetectorFactory; +import io.netty.util.internal.PlatformDependent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.testng.IClassListener; import org.testng.IExecutionListener; +import org.testng.IInvokedMethod; +import org.testng.IInvokedMethodListener; +import org.testng.ITestClass; +import org.testng.ITestContext; +import org.testng.ITestNGMethod; +import org.testng.ITestResult; +import java.lang.management.BufferPoolMXBean; +import java.lang.management.ManagementFactory; import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.assertj.core.api.Fail.fail; + +public final class CosmosNettyLeakDetectorFactory + extends ResourceLeakDetectorFactory implements IExecutionListener, IInvokedMethodListener, IClassListener { -public final class CosmosNettyLeakDetectorFactory extends ResourceLeakDetectorFactory implements IExecutionListener { protected static Logger logger = LoggerFactory.getLogger(CosmosNettyLeakDetectorFactory.class.getSimpleName()); private final static List identifiedLeaks = new ArrayList<>(); private final static Object staticLock = new Object(); + + private final static Map testClassInventory = new HashMap<>(); private static volatile boolean isLeakDetectionDisabled = false; private static volatile boolean isInitialized = false; + private volatile Map activeClientsAtBegin = new HashMap<>(); + public CosmosNettyLeakDetectorFactory() { } @@ -28,16 +52,149 @@ public void onExecutionStart() { } @Override - public void onExecutionFinish() { - // Run GC to force finalizers to run - only in finalizers Netty would actually detect any leaks. - System.gc(); - try { - Thread.sleep(1_000); - } catch (InterruptedException e) { - throw new RuntimeException(e); + public void onBeforeClass(ITestClass testClass) { + if (Configs.isClientLeakDetectionEnabled()) { + String testClassName = testClass.getRealClass().getCanonicalName(); + AtomicInteger instanceCountSnapshot = null; + synchronized (staticLock) { + instanceCountSnapshot = testClassInventory.get(testClassName); + if (instanceCountSnapshot == null) { + testClassInventory.put(testClassName, instanceCountSnapshot = new AtomicInteger(0)); + } + } + + int alreadyInitializedInstanceCount = instanceCountSnapshot.getAndIncrement(); + if (alreadyInitializedInstanceCount == 0) { + logger.info("LEAK DETECTION INITIALIZATION for test class {}", testClassName); + this.activeClientsAtBegin = RxDocumentClientImpl.getActiveClientsSnapshot(); + this.logMemoryUsage("BEFORE CLASS", testClassName); + } + } + } + + @Override + public void onAfterClass(ITestClass testClass) { + // Unfortunately can't use this consistently in TestNG 7.51 because execution is not symmetric + // IClassListener.onBeforeClass + // TestClassBase.@BeforeClass + // TestClass.@BeforeClass + // IClassListener.onAfterClass + // TestClass.@AfterClass + // TestClassBase.@AfterClass + // we would want the IClassListener.onAfterClass to be called last - which system property + // -Dtestng.listener.execution.symmetric=true allows, but this is only available + // in TestNG 7.7.1 - which requires Java11 + // So, this class simulates this behavior by hooking into IInvokedMethodListener + } + + @Override + public void afterInvocation(IInvokedMethod method, ITestResult result, ITestContext ctx) { + ITestClass testClass = (ITestClass)result.getTestClass(); + ITestNGMethod[] afterClassMethods = testClass.getAfterClassMethods(); + boolean testClassHasAfterClassMethods = afterClassMethods != null && afterClassMethods.length > 0; + + boolean isImplementedAfterClassMethod = testClassHasAfterClassMethods + && method.isConfigurationMethod() + && method.getTestMethod().isAfterClassConfiguration(); + + ITestNGMethod[] testMethods = ctx.getAllTestMethods(); + + boolean isLastTestMethodOnTestClassWithoutAfterClassMethod = !testClassHasAfterClassMethods + && method.isTestMethod() + && method.getTestMethod().isTest() + && method.getTestMethod().getEnabled() + && testMethods.length > 0 + && method.getTestMethod() == testMethods[testMethods.length - 1]; + + if (isImplementedAfterClassMethod || isLastTestMethodOnTestClassWithoutAfterClassMethod) { + this.onAfterClassCore(testClass); } } + private void onAfterClassCore(ITestClass testClass) { + if (Configs.isClientLeakDetectionEnabled()) { + String testClassName = testClass.getRealClass().getCanonicalName(); + AtomicInteger instanceCountSnapshot = null; + synchronized (staticLock) { + instanceCountSnapshot = testClassInventory.get(testClassName); + if (instanceCountSnapshot == null) { + throw new IllegalStateException( + "BeforeClass in TestListener was not called for testClass " + testClassName); + } + } + + int remainingInstanceCount = instanceCountSnapshot.decrementAndGet(); + if (remainingInstanceCount == 0) { + String failMessage = ""; + logger.info("LEAK DETECTION EVALUATION for test class {}", testClassName); + Map leakedClientSnapshotNow = RxDocumentClientImpl.getActiveClientsSnapshot(); + StringBuilder sb = new StringBuilder(); + Map leakedClientSnapshotAtBegin = activeClientsAtBegin; + + for (Integer clientId : leakedClientSnapshotNow.keySet()) { + if (!leakedClientSnapshotAtBegin.containsKey(clientId)) { + // this client was leaked in this class + sb + .append("CosmosClient [") + .append(clientId) + .append("] leaked. Callstack of initialization:\n") + .append(leakedClientSnapshotNow.get(clientId)) + .append("\n\n"); + } + } + + if (sb.length() > 0) { + failMessage = "COSMOS CLIENT LEAKS detected in test class: " + + testClassName + + "\n\n" + + sb; + } + + List nettyLeaks = CosmosNettyLeakDetectorFactory.resetIdentifiedLeaks(); + if (nettyLeaks.size() > 0) { + sb.append("\n"); + for (String leak : nettyLeaks) { + sb.append(leak).append("\n"); + } + + if (failMessage.length() > 0) { + failMessage += "\n\n"; + } + + failMessage += "NETTY LEAKS detected in test class: " + + testClassName + + "\n\n" + + sb; + + } + + if (failMessage.length() > 0) { + logger.error(failMessage); + fail(failMessage); + } + + this.logMemoryUsage("AFTER CLASS", testClassName); + } + } + } + + private void logMemoryUsage(String name, String className) { + long pooledDirectBytes = PooledByteBufAllocator.DEFAULT.metric() + .directArenas().stream() + .mapToLong(io.netty.buffer.PoolArenaMetric::numActiveBytes) + .sum(); + + long used = PlatformDependent.usedDirectMemory(); + long max = PlatformDependent.maxDirectMemory(); + logger.info("MEMORY USAGE: {}:{}", className, name); + logger.info("Netty Direct Memory: {}/{}/{} bytes", used, pooledDirectBytes, max); + for (BufferPoolMXBean pool : ManagementFactory.getPlatformMXBeans(BufferPoolMXBean.class)) { + logger.info("Pool {}: used={} bytes, capacity={} bytes, count={}", + pool.getName(), pool.getMemoryUsed(), pool.getTotalCapacity(), pool.getCount()); + } + } + + // This method must be called as early as possible in the lifecycle of a process // before any Netty ByteBuf has been allocated public static void ingestIntoNetty() { @@ -50,15 +207,12 @@ public static void ingestIntoNetty() { return; } - // Must run before any Netty ByteBuf is allocated - ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.PARANOID); - // sample every allocation - System.setProperty("io.netty.leakDetection.samplingInterval", "1"); - System.setProperty("io.netty.leakDetection.targetRecords", "256"); // install custom reporter ResourceLeakDetectorFactory.setResourceLeakDetectorFactory(new CosmosNettyLeakDetectorFactory()); - logger.info("NETTY LEAK detection initialized"); + logger.info( + "NETTY LEAK detection initialized, CosmosClient leak detection enabled: {}", + Configs.isClientLeakDetectionEnabled()); isInitialized = true; } } @@ -82,7 +236,7 @@ public static List resetIdentifiedLeaks() { public static AutoCloseable createDisableLeakDetectionScope() { synchronized (staticLock) { - logger.info("Disabling Leak detection: {}", StackTraceUtil.currentCallStack()); + logger.warn("Disabling Leak detection:"); isLeakDetectionDisabled = true; return new DisableLeakDetectionScope(); @@ -146,6 +300,13 @@ private static final class DisableLeakDetectionScope implements AutoCloseable { @Override public void close() { synchronized (staticLock) { + CosmosNettyLeakDetectorFactory.resetIdentifiedLeaks(); + try { + Thread.sleep(10_000); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + CosmosNettyLeakDetectorFactory.resetIdentifiedLeaks(); isLeakDetectionDisabled = false; logger.info("Leak detection enabled again."); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/DistributedClientTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/DistributedClientTest.java index b88bd63db110..156b116dc8b0 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/DistributedClientTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/DistributedClientTest.java @@ -44,13 +44,18 @@ public void createDocument() throws Exception { CosmosClientMetadataCachesSnapshot state = new CosmosClientMetadataCachesSnapshot(); RxClientCollectionCache.serialize(state, cache); - CosmosAsyncClient newClient = new CosmosClientBuilder().endpoint(TestConfigurations.HOST) + try (CosmosAsyncClient newClient = new CosmosClientBuilder().endpoint(TestConfigurations.HOST) .key(TestConfigurations.MASTER_KEY) .metadataCaches(state) - .buildAsyncClient(); + .buildAsyncClient()) { - // TODO: moderakh we should somehow verify that to collection fetch request is made and the existing collection cache is used. - newClient.getDatabase(container.getDatabase().getId()).getContainer(container.getId()).readItem(id, new PartitionKey(id), ObjectNode.class).block(); + // TODO: moderakh we should somehow verify that to collection fetch request is made and the existing collection cache is used. + newClient + .getDatabase(container.getDatabase().getId()) + .getContainer(container.getId()) + .readItem(id, new PartitionKey(id), ObjectNode.class) + .block(); + } } @BeforeClass(groups = { "emulator" }, timeOut = SETUP_TIMEOUT) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/DocumentClientTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/DocumentClientTest.java index 000bfaffc0f0..44b609aa5a55 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/DocumentClientTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/DocumentClientTest.java @@ -15,6 +15,7 @@ import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Listeners; import java.lang.management.BufferPoolMXBean; import java.lang.management.ManagementFactory; @@ -24,13 +25,12 @@ import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; +@Listeners({TestNGLogListener.class, CosmosNettyLeakDetectorFactory.class}) public abstract class DocumentClientTest implements ITest { protected static Logger logger = LoggerFactory.getLogger(DocumentClientTest.class.getSimpleName()); protected static final int SUITE_SETUP_TIMEOUT = 120000; - private final static AtomicInteger instancesUsed = new AtomicInteger(0); private final AsyncDocumentClient.Builder clientBuilder; private String testName; - private volatile Map activeClientsAtBegin = new HashMap<>(); public DocumentClientTest() { this(new AsyncDocumentClient.Builder()); @@ -44,80 +44,6 @@ public final AsyncDocumentClient.Builder clientBuilder() { return this.clientBuilder; } - @BeforeClass(groups = {"fast", "long", "direct", "multi-region", "multi-master", "flaky-multi-master", "emulator", - "split", "query", "cfp-split", "long-emulator"}, timeOut = SUITE_SETUP_TIMEOUT) - - public void beforeClassSetupLeakDetection() { - if (instancesUsed.getAndIncrement() == 0) { - this.activeClientsAtBegin = RxDocumentClientImpl.getActiveClientsSnapshot(); - this.logMemoryUsage("BEFORE"); - } - } - - private void logMemoryUsage(String name) { - long pooledDirectBytes = PooledByteBufAllocator.DEFAULT.metric() - .directArenas().stream() - .mapToLong(io.netty.buffer.PoolArenaMetric::numActiveBytes) - .sum(); - - long used = PlatformDependent.usedDirectMemory(); - long max = PlatformDependent.maxDirectMemory(); - logger.info("MEMORY USAGE: {}:{}", this.getClass().getCanonicalName(), name); - logger.info("Netty Direct Memory: {}/{}/{} bytes", used, pooledDirectBytes, max); - for (BufferPoolMXBean pool : ManagementFactory.getPlatformMXBeans(BufferPoolMXBean.class)) { - logger.info("Pool {}: used={} bytes, capacity={} bytes, count={}", - pool.getName(), pool.getMemoryUsed(), pool.getTotalCapacity(), pool.getCount()); - } - } - - @AfterClass(groups = {"fast", "long", "direct", "multi-region", "multi-master", "flaky-multi-master", "emulator", - "split", "query", "cfp-split", "long-emulator"}, timeOut = SUITE_SETUP_TIMEOUT) - public void afterClassSetupLeakDetection() { - if (instancesUsed.decrementAndGet() == 0) { - Map leakedClientSnapshotNow = RxDocumentClientImpl.getActiveClientsSnapshot(); - StringBuilder sb = new StringBuilder(); - Map leakedClientSnapshotAtBegin = activeClientsAtBegin; - - for (Integer clientId : leakedClientSnapshotNow.keySet()) { - if (!leakedClientSnapshotAtBegin.containsKey(clientId)) { - // this client was leaked in this class - sb - .append("CosmosClient [") - .append(clientId) - .append("] leaked. Callstack of initialization:\n") - .append(leakedClientSnapshotNow.get(clientId)) - .append("\n\n"); - } - } - - if (sb.length() > 0) { - String msg = "COSMOS CLIENT LEAKS detected in test class: " - + this.getClass().getCanonicalName() - + "\n\n" - + sb; - - logger.error(msg); - // fail(msg); - } - - List nettyLeaks = CosmosNettyLeakDetectorFactory.resetIdentifiedLeaks(); - if (nettyLeaks.size() > 0) { - sb.append("\n"); - for (String leak : nettyLeaks) { - sb.append(leak).append("\n"); - } - - String msg = "NETTY LEAKS detected in test class: " - + this.getClass().getCanonicalName() - + sb; - - logger.error(msg); - // fail(msg); - } - this.logMemoryUsage("AFTER"); - } - } - @Override public final String getTestName() { return this.testName; diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/EndToEndTimeOutValidationTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/EndToEndTimeOutValidationTests.java index 1277992b9b8d..f1cc3e82a30c 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/EndToEndTimeOutValidationTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/EndToEndTimeOutValidationTests.java @@ -25,6 +25,7 @@ import com.azure.cosmos.test.faultinjection.IFaultInjectionResult; import com.azure.cosmos.test.implementation.faultinjection.FaultInjectorProvider; import com.azure.cosmos.util.CosmosPagedFlux; +import net.bytebuddy.implementation.bytecode.Throw; import org.testng.SkipException; import org.testng.annotations.BeforeClass; import org.testng.annotations.Factory; @@ -55,20 +56,24 @@ public EndToEndTimeOutValidationTests(CosmosClientBuilder clientBuilder) { .build(); } - @BeforeClass(groups = {"fast"}, timeOut = SETUP_TIMEOUT * 100) - public void beforeClass() throws Exception { - initializeClient(null); - } - - public void initializeClient(CosmosEndToEndOperationLatencyPolicyConfig e2eDefaultConfig) { + public CosmosAsyncClient initializeClient(CosmosEndToEndOperationLatencyPolicyConfig e2eDefaultConfig) { CosmosAsyncClient client = this .getClientBuilder() .endToEndOperationLatencyPolicyConfig(e2eDefaultConfig) .buildAsyncClient(); - createdContainer = getSharedMultiPartitionCosmosContainer(client); - truncateCollection(createdContainer); - createdDocuments.addAll(this.insertDocuments(DEFAULT_NUM_DOCUMENTS, null, createdContainer)); + try { + createdContainer = getSharedMultiPartitionCosmosContainer(client); + truncateCollection(createdContainer); + + createdDocuments.addAll(this.insertDocuments(DEFAULT_NUM_DOCUMENTS, null, createdContainer)); + + return client; + } catch (Throwable t) { + safeClose(client); + + throw t; + } } @Test(groups = {"fast"}, timeOut = 10000L, retryAnalyzer = FlakyTestRetryAnalyzer.class) @@ -77,17 +82,24 @@ public void readItemWithEndToEndTimeoutPolicyInOptionsShouldTimeoutWithClientCon throw new SkipException("Failure injection only supported for DIRECT mode"); } - initializeClient(endToEndOperationLatencyPolicyConfig); + CosmosAsyncClient cosmosClient = initializeClient(endToEndOperationLatencyPolicyConfig); + FaultInjectionRule rule = null; + try { - CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - TestObject itemToRead = createdDocuments.get(random.nextInt(createdDocuments.size())); - FaultInjectionRule rule = injectFailure(createdContainer, FaultInjectionOperationType.READ_ITEM, null); + CosmosItemRequestOptions options = new CosmosItemRequestOptions(); + TestObject itemToRead = createdDocuments.get(random.nextInt(createdDocuments.size())); + rule = injectFailure(createdContainer, FaultInjectionOperationType.READ_ITEM, null); - Mono> cosmosItemResponseMono = - createdContainer.readItem(itemToRead.id, new PartitionKey(itemToRead.mypk), options, TestObject.class); + Mono> cosmosItemResponseMono = + createdContainer.readItem(itemToRead.id, new PartitionKey(itemToRead.mypk), options, TestObject.class); - verifyExpectError(cosmosItemResponseMono); - rule.disable(); + verifyExpectError(cosmosItemResponseMono); + } finally { + if (rule != null) { + rule.disable(); + } + safeClose(cosmosClient); + } } @Test(groups = {"fast"}, timeOut = 10000L, retryAnalyzer = FlakyTestRetryAnalyzer.class) @@ -100,7 +112,7 @@ public void readItemWithEndToEndTimeoutPolicyInOptionsShouldTimeoutEvenWhenDisab Configs.DEFAULT_E2E_FOR_NON_POINT_DISABLED, "true"); - initializeClient(endToEndOperationLatencyPolicyConfig); + CosmosAsyncClient cosmosClient = initializeClient(endToEndOperationLatencyPolicyConfig); FaultInjectionRule rule = null; try { @@ -119,6 +131,7 @@ public void readItemWithEndToEndTimeoutPolicyInOptionsShouldTimeoutEvenWhenDisab } System.clearProperty(Configs.DEFAULT_E2E_FOR_NON_POINT_DISABLED); + safeClose(cosmosClient); } } @@ -128,16 +141,24 @@ public void createItemWithEndToEndTimeoutPolicyInOptionsShouldTimeout() { throw new SkipException("Failure injection only supported for DIRECT mode"); } - CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.setCosmosEndToEndOperationLatencyPolicyConfig(endToEndOperationLatencyPolicyConfig); + CosmosAsyncClient cosmosClient = initializeClient(endToEndOperationLatencyPolicyConfig); + FaultInjectionRule faultInjectionRule = null; + try { + CosmosItemRequestOptions options = new CosmosItemRequestOptions(); + options.setCosmosEndToEndOperationLatencyPolicyConfig(endToEndOperationLatencyPolicyConfig); - FaultInjectionRule faultInjectionRule = injectFailure(createdContainer, FaultInjectionOperationType.CREATE_ITEM, null); - TestObject inputObject = new TestObject(UUID.randomUUID().toString(), "name123", 1, UUID.randomUUID().toString()); - Mono> cosmosItemResponseMono = - createdContainer.createItem(inputObject, new PartitionKey(inputObject.mypk), options); + faultInjectionRule = injectFailure(createdContainer, FaultInjectionOperationType.CREATE_ITEM, null); + TestObject inputObject = new TestObject(UUID.randomUUID().toString(), "name123", 1, UUID.randomUUID().toString()); + Mono> cosmosItemResponseMono = + createdContainer.createItem(inputObject, new PartitionKey(inputObject.mypk), options); - verifyExpectError(cosmosItemResponseMono); - faultInjectionRule.disable(); + verifyExpectError(cosmosItemResponseMono); + } finally { + if (faultInjectionRule != null) { + faultInjectionRule.disable(); + } + safeClose(cosmosClient); + } } @Test(groups = {"fast"}, timeOut = 10000L, retryAnalyzer = FlakyTestRetryAnalyzer.class) @@ -146,18 +167,26 @@ public void replaceItemWithEndToEndTimeoutPolicyInOptionsShouldTimeout() { throw new SkipException("Failure injection only supported for DIRECT mode"); } - CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.setCosmosEndToEndOperationLatencyPolicyConfig(endToEndOperationLatencyPolicyConfig); + CosmosAsyncClient cosmosClient = initializeClient(endToEndOperationLatencyPolicyConfig); + FaultInjectionRule rule = null; + try { + CosmosItemRequestOptions options = new CosmosItemRequestOptions(); + options.setCosmosEndToEndOperationLatencyPolicyConfig(endToEndOperationLatencyPolicyConfig); - TestObject inputObject = new TestObject(UUID.randomUUID().toString(), "name123", 1, UUID.randomUUID().toString()); - createdContainer.createItem(inputObject, new PartitionKey(inputObject.mypk), options).block(); - FaultInjectionRule rule = injectFailure(createdContainer, FaultInjectionOperationType.REPLACE_ITEM, null); - inputObject.setName("replaceName"); - Mono> cosmosItemResponseMono = - createdContainer.replaceItem(inputObject, inputObject.id, new PartitionKey(inputObject.mypk), options); + TestObject inputObject = new TestObject(UUID.randomUUID().toString(), "name123", 1, UUID.randomUUID().toString()); + createdContainer.createItem(inputObject, new PartitionKey(inputObject.mypk), options).block(); + rule = injectFailure(createdContainer, FaultInjectionOperationType.REPLACE_ITEM, null); + inputObject.setName("replaceName"); + Mono> cosmosItemResponseMono = + createdContainer.replaceItem(inputObject, inputObject.id, new PartitionKey(inputObject.mypk), options); - verifyExpectError(cosmosItemResponseMono); - rule.disable(); + verifyExpectError(cosmosItemResponseMono); + } finally { + if (rule != null) { + rule.disable(); + } + safeClose(cosmosClient); + } } @Test(groups = {"fast"}, timeOut = 10000L, retryAnalyzer = FlakyTestRetryAnalyzer.class) @@ -166,16 +195,25 @@ public void upsertItemWithEndToEndTimeoutPolicyInOptionsShouldTimeout() { throw new SkipException("Failure injection only supported for DIRECT mode"); } - CosmosItemRequestOptions options = new CosmosItemRequestOptions(); - options.setCosmosEndToEndOperationLatencyPolicyConfig(endToEndOperationLatencyPolicyConfig); + CosmosAsyncClient cosmosClient = initializeClient(endToEndOperationLatencyPolicyConfig); + FaultInjectionRule rule = null; + try { + CosmosItemRequestOptions options = new CosmosItemRequestOptions(); + options.setCosmosEndToEndOperationLatencyPolicyConfig(endToEndOperationLatencyPolicyConfig); + + rule = injectFailure(createdContainer, FaultInjectionOperationType.UPSERT_ITEM, null); + TestObject inputObject = new TestObject(UUID.randomUUID().toString(), "name123", 1, UUID.randomUUID().toString()); + Mono> cosmosItemResponseMono = + createdContainer.upsertItem(inputObject, new PartitionKey(inputObject.mypk), options); - FaultInjectionRule rule = injectFailure(createdContainer, FaultInjectionOperationType.UPSERT_ITEM, null); - TestObject inputObject = new TestObject(UUID.randomUUID().toString(), "name123", 1, UUID.randomUUID().toString()); - Mono> cosmosItemResponseMono = - createdContainer.upsertItem(inputObject, new PartitionKey(inputObject.mypk), options); + verifyExpectError(cosmosItemResponseMono); + } finally { + if (rule != null) { + rule.disable(); + } - verifyExpectError(cosmosItemResponseMono); - rule.disable(); + safeClose(cosmosClient); + } } static void verifyExpectError(Mono> cosmosItemResponseMono) { @@ -190,27 +228,36 @@ public void queryItemWithEndToEndTimeoutPolicyInOptionsShouldTimeout() { throw new SkipException("Failure injection only supported for DIRECT mode"); } - CosmosEndToEndOperationLatencyPolicyConfig endToEndOperationLatencyPolicyConfig = - new CosmosEndToEndOperationLatencyPolicyConfigBuilder(Duration.ofSeconds(1)) - .build(); + CosmosAsyncClient cosmosClient = initializeClient(endToEndOperationLatencyPolicyConfig); + FaultInjectionRule faultInjectionRule = null; + try { + CosmosEndToEndOperationLatencyPolicyConfig endToEndOperationLatencyPolicyConfig = + new CosmosEndToEndOperationLatencyPolicyConfigBuilder(Duration.ofSeconds(1)) + .build(); - CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); - options.setCosmosEndToEndOperationLatencyPolicyConfig(endToEndOperationLatencyPolicyConfig); + CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); + options.setCosmosEndToEndOperationLatencyPolicyConfig(endToEndOperationLatencyPolicyConfig); - createdDocuments.get(random.nextInt(createdDocuments.size())); + createdDocuments.get(random.nextInt(createdDocuments.size())); - String queryText = "select top 1 * from c"; - SqlQuerySpec sqlQuerySpec = new SqlQuerySpec(queryText); + String queryText = "select top 1 * from c"; + SqlQuerySpec sqlQuerySpec = new SqlQuerySpec(queryText); - FaultInjectionRule faultInjectionRule = injectFailure(createdContainer, FaultInjectionOperationType.QUERY_ITEM, null); - CosmosPagedFlux queryPagedFlux = createdContainer.queryItems(sqlQuerySpec, options, TestObject.class); + faultInjectionRule = injectFailure(createdContainer, FaultInjectionOperationType.QUERY_ITEM, null); + CosmosPagedFlux queryPagedFlux = createdContainer.queryItems(sqlQuerySpec, options, TestObject.class); - StepVerifier.create(queryPagedFlux) - .expectErrorMatches(throwable -> throwable instanceof OperationCancelledException - && ((OperationCancelledException) throwable).getSubStatusCode() - == HttpConstants.SubStatusCodes.CLIENT_OPERATION_TIMEOUT) - .verify(); - faultInjectionRule.disable(); + StepVerifier.create(queryPagedFlux) + .expectErrorMatches(throwable -> throwable instanceof OperationCancelledException + && ((OperationCancelledException) throwable).getSubStatusCode() + == HttpConstants.SubStatusCodes.CLIENT_OPERATION_TIMEOUT) + .verify(); + } finally { + if (faultInjectionRule != null) { + faultInjectionRule.disable(); + } + + safeClose(cosmosClient); + } } @Test(groups = {"fast"}, timeOut = 10000L, retryAnalyzer = FlakyTestRetryAnalyzer.class) @@ -223,24 +270,30 @@ public void queryItemWithEndToEndTimeoutPolicyInOptionsShouldTimeoutWithClientCo new CosmosEndToEndOperationLatencyPolicyConfigBuilder(Duration.ofSeconds(1)) .build(); - initializeClient(endToEndOperationLatencyPolicyConfig); - - CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); + CosmosAsyncClient cosmosClient = initializeClient(endToEndOperationLatencyPolicyConfig); + FaultInjectionRule faultInjectionRule = null; + try { + CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); - createdDocuments.get(random.nextInt(createdDocuments.size())); + createdDocuments.get(random.nextInt(createdDocuments.size())); - String queryText = "select top 1 * from c"; - SqlQuerySpec sqlQuerySpec = new SqlQuerySpec(queryText); + String queryText = "select top 1 * from c"; + SqlQuerySpec sqlQuerySpec = new SqlQuerySpec(queryText); - FaultInjectionRule faultInjectionRule = injectFailure(createdContainer, FaultInjectionOperationType.QUERY_ITEM, null); - CosmosPagedFlux queryPagedFlux = createdContainer.queryItems(sqlQuerySpec, options, TestObject.class); + faultInjectionRule = injectFailure(createdContainer, FaultInjectionOperationType.QUERY_ITEM, null); + CosmosPagedFlux queryPagedFlux = createdContainer.queryItems(sqlQuerySpec, options, TestObject.class); - StepVerifier.create(queryPagedFlux) - .expectErrorMatches(throwable -> throwable instanceof OperationCancelledException - && ((OperationCancelledException) throwable).getSubStatusCode() - == HttpConstants.SubStatusCodes.CLIENT_OPERATION_TIMEOUT) - .verify(); - faultInjectionRule.disable(); + StepVerifier.create(queryPagedFlux) + .expectErrorMatches(throwable -> throwable instanceof OperationCancelledException + && ((OperationCancelledException) throwable).getSubStatusCode() + == HttpConstants.SubStatusCodes.CLIENT_OPERATION_TIMEOUT) + .verify(); + } finally { + if (faultInjectionRule != null) { + faultInjectionRule.disable(); + } + safeClose(cosmosClient); + } } @Test(groups = {"fast"}, timeOut = 10000L, retryAnalyzer = FlakyTestRetryAnalyzer.class) @@ -257,7 +310,7 @@ public void queryItemWithEndToEndTimeoutPolicyInOptionsShouldNotTimeoutWhenSuppr "isDefaultE2ETimeoutDisabledForNonPointOperations() after setting system property {}", Configs.isDefaultE2ETimeoutDisabledForNonPointOperations()); - initializeClient( + CosmosAsyncClient cosmosClient = initializeClient( new CosmosEndToEndOperationLatencyPolicyConfigBuilder(Duration.ofSeconds(1)) .build() ); @@ -283,6 +336,7 @@ public void queryItemWithEndToEndTimeoutPolicyInOptionsShouldNotTimeoutWhenSuppr } System.clearProperty(Configs.DEFAULT_E2E_FOR_NON_POINT_DISABLED); + safeClose(cosmosClient); } } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/PerPartitionAutomaticFailoverE2ETests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/PerPartitionAutomaticFailoverE2ETests.java index c7f09c818050..92d21daf488b 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/PerPartitionAutomaticFailoverE2ETests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/PerPartitionAutomaticFailoverE2ETests.java @@ -69,9 +69,11 @@ import io.netty.buffer.ByteBufUtil; import io.netty.handler.codec.http.HttpMethod; import io.netty.handler.timeout.ReadTimeoutException; +import io.netty.util.ReferenceCountUtil; import org.assertj.core.api.Assertions; import org.mockito.Mockito; import org.testng.SkipException; +import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Factory; @@ -95,6 +97,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicReference; import java.util.function.BiConsumer; +import java.util.function.Supplier; import static org.assertj.core.api.Assertions.assertThat; @@ -212,6 +215,7 @@ */ public class PerPartitionAutomaticFailoverE2ETests extends TestSuiteBase { + private CosmosAsyncClient sharedClient; private CosmosAsyncDatabase sharedDatabase; private CosmosAsyncContainer sharedSinglePartitionContainer; private AccountLevelLocationContext accountLevelLocationReadableLocationContext; @@ -462,10 +466,10 @@ public Object[][] ppafDynamicEnablement503Only() { @BeforeClass(groups = {"multi-region"}) public void beforeClass() { - CosmosAsyncClient cosmosAsyncClient = getClientBuilder().buildAsyncClient(); + this.sharedClient = getClientBuilder().buildAsyncClient(); - this.sharedDatabase = getSharedCosmosDatabase(cosmosAsyncClient); - this.sharedSinglePartitionContainer = getSharedSinglePartitionCosmosContainer(cosmosAsyncClient); + this.sharedDatabase = getSharedCosmosDatabase(this.sharedClient); + this.sharedSinglePartitionContainer = getSharedSinglePartitionCosmosContainer(this.sharedClient); ONLY_GATEWAY_MODE.add(ConnectionMode.GATEWAY); ONLY_DIRECT_MODE.add(ConnectionMode.DIRECT); @@ -473,13 +477,20 @@ public void beforeClass() { ALL_CONNECTION_MODES.add(ConnectionMode.DIRECT); ALL_CONNECTION_MODES.add(ConnectionMode.GATEWAY); - RxDocumentClientImpl rxDocumentClient = (RxDocumentClientImpl) ReflectionUtils.getAsyncDocumentClient(cosmosAsyncClient); + RxDocumentClientImpl rxDocumentClient = (RxDocumentClientImpl) ReflectionUtils.getAsyncDocumentClient(this.sharedClient); GlobalEndpointManager globalEndpointManager = ReflectionUtils.getGlobalEndpointManager(rxDocumentClient); DatabaseAccount databaseAccountSnapshot = globalEndpointManager.getLatestDatabaseAccount(); this.accountLevelLocationReadableLocationContext = getAccountLevelLocationContext(databaseAccountSnapshot, false); } + @AfterClass(groups = {"multi-region"}) + public void afterClass() throws InterruptedException { + safeClose(this.sharedClient); + System.gc(); + Thread.sleep(10_000); + } + @DataProvider(name = "ppafTestConfigsWithWriteOps") public Object[][] ppafTestConfigsWithWriteOps() { @@ -2821,32 +2832,49 @@ public HttpHeaders headers() { @Override public Mono body() { - try { - - if (resourceType == ResourceType.DatabaseAccount) { - return Mono.just(ByteBufUtil.writeUtf8(ByteBufAllocator.DEFAULT, databaseAccount.toJson())); - } - - if (operationType == OperationType.Batch) { - FakeBatchResponse fakeBatchResponse = new FakeBatchResponse(); - - fakeBatchResponse - .seteTag("1") - .setStatusCode(HttpConstants.StatusCodes.OK) - .setSubStatusCode(HttpConstants.SubStatusCodes.UNKNOWN) - .setRequestCharge(1.0d) - .setResourceBody(getTestPojoObject()) - .setRetryAfterMilliseconds("1"); - - return Mono.just(ByteBufUtil.writeUtf8(ByteBufAllocator.DEFAULT, - OBJECT_MAPPER.writeValueAsString(Arrays.asList(fakeBatchResponse)))); - } + if (resourceType == ResourceType.DatabaseAccount) { + return createAutoReleasingMono( + () -> ByteBufUtil.writeUtf8( + ByteBufAllocator.DEFAULT, + databaseAccount.toJson() + )); + } - return Mono.just(ByteBufUtil.writeUtf8(ByteBufAllocator.DEFAULT, - OBJECT_MAPPER.writeValueAsString(testPojo))); - } catch (JsonProcessingException e) { - return Mono.error(e); + if (operationType == OperationType.Batch) { + FakeBatchResponse fakeBatchResponse = new FakeBatchResponse(); + + fakeBatchResponse + .seteTag("1") + .setStatusCode(HttpConstants.StatusCodes.OK) + .setSubStatusCode(HttpConstants.SubStatusCodes.UNKNOWN) + .setRequestCharge(1.0d) + .setResourceBody(getTestPojoObject()) + .setRetryAfterMilliseconds("1"); + + return createAutoReleasingMono( + () -> { + try { + return ByteBufUtil.writeUtf8( + ByteBufAllocator.DEFAULT, + OBJECT_MAPPER.writeValueAsString(Arrays.asList(fakeBatchResponse)) + ); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + }); } + + return createAutoReleasingMono( + () -> { + try { + return ByteBufUtil.writeUtf8( + ByteBufAllocator.DEFAULT, + OBJECT_MAPPER.writeValueAsString(testPojo) + ); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + }); } @Override @@ -2884,4 +2912,18 @@ public Mono bodyAsString() { return httpResponse; } } + + private Mono createAutoReleasingMono(Supplier bufferSupplier) { + final AtomicReference output = new AtomicReference<>(null); + + return Mono + .fromCallable(() -> { + ByteBuf buf = bufferSupplier.get(); + output.set(buf); + + return buf; + }) + .doOnDiscard(ByteBuf.class, ReferenceCountUtil::safeRelease) + .doFinally(signalType -> ReferenceCountUtil.safeRelease(output.get())); + } } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/PerPartitionCircuitBreakerE2ETests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/PerPartitionCircuitBreakerE2ETests.java index 5503feab8382..10c5aa400894 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/PerPartitionCircuitBreakerE2ETests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/PerPartitionCircuitBreakerE2ETests.java @@ -54,7 +54,9 @@ import com.azure.cosmos.test.faultinjection.FaultInjectionServerErrorType; import org.testng.SkipException; import org.testng.annotations.AfterClass; +import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; import org.testng.annotations.Factory; import org.testng.annotations.Test; @@ -235,7 +237,7 @@ public PerPartitionCircuitBreakerE2ETests(CosmosClientBuilder cosmosClientBuilde super(cosmosClientBuilder); } - @BeforeClass(groups = {"circuit-breaker-misc-gateway", "circuit-breaker-misc-direct", "circuit-breaker-read-all-read-many"}) + @BeforeClass(groups = {"circuit-breaker-misc-gateway", "circuit-breaker-misc-direct", "circuit-breaker-read-all-read-many", "multi-region"}) public void beforeClass() { try (CosmosAsyncClient testClient = getClientBuilder().buildAsyncClient()) { RxDocumentClientImpl documentClient = (RxDocumentClientImpl) ReflectionUtils.getAsyncDocumentClient(testClient); @@ -4498,7 +4500,18 @@ private String resolveContainerIdByFaultInjectionOperationType(FaultInjectionOpe } } - @AfterClass(groups = {"circuit-breaker-misc-gateway", "circuit-breaker-misc-direct", "circuit-breaker-read-all-read-many"}) + @BeforeMethod(groups = { "circuit-breaker-misc-gateway", "circuit-breaker-misc-direct", "circuit-breaker-read-all-read-many", "multi-region" }, timeOut = 2 * SETUP_TIMEOUT, alwaysRun = true) + public void beforeMethod() throws Exception { + // add a cool off time + CosmosNettyLeakDetectorFactory.resetIdentifiedLeaks(); + } + + @AfterMethod(groups = { "circuit-breaker-misc-gateway", "circuit-breaker-misc-direct", "circuit-breaker-read-all-read-many", "multi-region" }, timeOut = SETUP_TIMEOUT, alwaysRun = true) + public void afterMethod() throws Exception { + logger.info("captureNettyLeaks: {}", captureNettyLeaks()); + } + + @AfterClass(groups = { "circuit-breaker-misc-gateway", "circuit-breaker-misc-direct", "circuit-breaker-read-all-read-many", "multi-region" }) public void afterClass() { CosmosClientBuilder clientBuilder = new CosmosClientBuilder() .endpoint(TestConfigurations.HOST) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/RetryContextOnDiagnosticTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/RetryContextOnDiagnosticTest.java index 7d6491c1fee2..ee59f0ac723e 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/RetryContextOnDiagnosticTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/RetryContextOnDiagnosticTest.java @@ -58,12 +58,13 @@ import com.fasterxml.jackson.databind.ObjectMapper; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufAllocator; -import io.netty.buffer.ByteBufInputStream; import io.netty.buffer.ByteBufUtil; import io.netty.handler.codec.http.HttpMethod; +import io.netty.util.ReferenceCountUtil; import io.reactivex.subscribers.TestSubscriber; import org.mockito.ArgumentMatchers; import org.mockito.Mockito; +import org.testng.annotations.AfterClass; import org.testng.annotations.Test; import reactor.core.publisher.Mono; @@ -71,7 +72,6 @@ import java.net.URISyntaxException; import java.time.Duration; import java.util.Arrays; -import java.util.HashMap; import java.util.Iterator; import java.util.Optional; import java.util.UUID; @@ -79,10 +79,10 @@ import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; import static com.azure.cosmos.implementation.TestUtils.mockDiagnosticsClientContext; -import static com.azure.cosmos.implementation.Utils.getUTF8BytesOrNull; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Fail.fail; @@ -95,6 +95,12 @@ public class RetryContextOnDiagnosticTest extends TestSuiteBase { private RxDocumentServiceRequest serviceRequest; private AddressSelector addressSelector; + @AfterClass(groups = {"unit", "long-emulator"}, alwaysRun = true) + public void afterClass_ReactivateNettyLeakDetection() throws Exception { + System.gc(); + Thread.sleep(10_000); + } + @Test(groups = {"unit"}, timeOut = TIMEOUT * 2) public void backoffRetryUtilityExecuteRetry() throws Exception { @SuppressWarnings("unchecked") @@ -105,15 +111,12 @@ public void backoffRetryUtilityExecuteRetry() throws Exception { addressSelector = Mockito.mock(AddressSelector.class); CosmosException exception = new CosmosException(410, exceptionText); String rawJson = "{\"id\":\"" + responseText + "\"}"; - ByteBuf buffer = getUTF8BytesOrNull(rawJson); Mockito.when(callbackMethod.call()).thenThrow(exception, exception, exception, exception, exception) - .thenReturn(Mono.just(new StoreResponse( - null, - 200, - new HashMap<>(), - new ByteBufInputStream(buffer, true), - buffer.readableBytes()))); + .thenReturn(Mono.fromCallable(() -> StoreResponseBuilder.create() + .withContent(rawJson) + .withStatus(200) + .build())); Mono monoResponse = BackoffRetryUtility.executeRetry(callbackMethod, retryPolicy); StoreResponse response = validateSuccess(monoResponse); @@ -156,14 +159,11 @@ public void backoffRetryUtilityExecuteAsync() { CosmosException exception = new CosmosException(410, exceptionText); Mono exceptionMono = Mono.error(exception); String rawJson = "{\"id\":\"" + responseText + "\"}"; - ByteBuf buffer = getUTF8BytesOrNull(rawJson); Mockito.when(parameterizedCallbackMethod.apply(ArgumentMatchers.any())).thenReturn(exceptionMono, exceptionMono, exceptionMono, exceptionMono, exceptionMono) - .thenReturn(Mono.just(new StoreResponse( - null, - 200, - new HashMap<>(), - new ByteBufInputStream(buffer, true), - buffer.readableBytes()))); + .thenReturn(Mono.fromCallable(() -> StoreResponseBuilder.create() + .withContent(rawJson) + .withStatus(200) + .build())); Mono monoResponse = BackoffRetryUtility.executeAsync( parameterizedCallbackMethod, retryPolicy, @@ -860,6 +860,7 @@ public void throttlingExceptionGatewayModeScenario() { .key(TestConfigurations.MASTER_KEY) .gatewayMode() .buildClient(); + HttpClient mockHttpClient = null; try { CosmosAsyncContainer cosmosAsyncContainer = getSharedMultiPartitionCosmosContainer(cosmosClient.asyncClient()); @@ -884,18 +885,18 @@ public void throttlingExceptionGatewayModeScenario() { options.setPartitionKey(new PartitionKey(testPojo.getMypk())); options.setReadConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL); Iterator> iterator = cosmosContainer.queryItems(query, - options, InternalObjectNode.class) - .iterableByPage(1) - .iterator(); + options, InternalObjectNode.class) + .iterableByPage(1) + .iterator(); FeedResponse feedResponse = iterator.next(); // Query Plan Caching end - HttpClient mockHttpClient = Mockito.mock(HttpClient.class); + mockHttpClient = Mockito.mock(HttpClient.class); CosmosException throttlingException = new CosmosException(429, "Throttling Test"); Mockito.when(mockHttpClient.send(Mockito.any(HttpRequest.class), Mockito.any(Duration.class))) - .thenReturn(Mono.error(throttlingException), Mono.error(throttlingException), - Mono.just(createResponse((201)))); + .thenReturn(Mono.error(throttlingException), Mono.error(throttlingException), + Mono.just(createResponse((201)))); ReflectionUtils.setGatewayHttpClient(rxGatewayStoreModel, mockHttpClient); CosmosItemResponse createItemResponse = cosmosContainer.createItem(testPojo, @@ -905,10 +906,11 @@ public void throttlingExceptionGatewayModeScenario() { assertThat(retryContext.getRetryCount()).isEqualTo(2); assertThat(retryContext.getStatusAndSubStatusCodes().get(0)[0]).isEqualTo(429); + mockHttpClient.shutdown(); mockHttpClient = Mockito.mock(HttpClient.class); Mockito.when(mockHttpClient.send(Mockito.any(HttpRequest.class), Mockito.any(Duration.class))) - .thenReturn(Mono.error(throttlingException), Mono.error(throttlingException), - Mono.just(createResponse((201)))); + .thenReturn(Mono.error(throttlingException), Mono.error(throttlingException), + Mono.just(createResponse((201)))); ReflectionUtils.setGatewayHttpClient(rxGatewayStoreModel, mockHttpClient); CosmosItemRequestOptions requestOptions = new CosmosItemRequestOptions(); @@ -921,30 +923,34 @@ public void throttlingExceptionGatewayModeScenario() { assertThat(retryContext.getRetryCount()).isEqualTo(2); assertThat(retryContext.getStatusAndSubStatusCodes().get(0)[0]).isEqualTo(429); + mockHttpClient.shutdown(); mockHttpClient = Mockito.mock(HttpClient.class); Mockito.when(mockHttpClient.send(Mockito.any(HttpRequest.class), Mockito.any(Duration.class))) - .thenReturn(Mono.error(throttlingException), Mono.error(throttlingException), - Mono.just(createResponse((201)))); + .thenReturn(Mono.error(throttlingException), Mono.error(throttlingException), + Mono.just(createResponse((201)))); ReflectionUtils.setGatewayHttpClient(rxGatewayStoreModel, mockHttpClient); options.setConsistencyLevel(ConsistencyLevel.EVENTUAL); iterator = cosmosContainer.queryItems(query, - options, InternalObjectNode.class) - .iterableByPage() - .iterator(); + options, InternalObjectNode.class) + .iterableByPage() + .iterator(); feedResponse = iterator.next(); Optional first = feedResponse.getCosmosDiagnostics() - .getFeedResponseDiagnostics() - .getClientSideRequestStatistics() - .stream() - .filter(context -> context.getRetryContext().getRetryCount() == 2 - && context.getRetryContext().getStatusAndSubStatusCodes().get(0)[0] == 429) - .findFirst(); + .getFeedResponseDiagnostics() + .getClientSideRequestStatistics() + .stream() + .filter(context -> context.getRetryContext().getRetryCount() == 2 + && context.getRetryContext().getStatusAndSubStatusCodes().get(0)[0] == 429) + .findFirst(); assertThat(first.isPresent()).isTrue(); System.setProperty("COSMOS.QUERYPLAN_CACHING_ENABLED", "false"); } finally { safeCloseSyncClient(cosmosClient); + if (mockHttpClient != null) { + mockHttpClient.shutdown(); + } } } @@ -1058,12 +1064,19 @@ public HttpHeaders headers() { @Override public Mono body() { - try { - return Mono.just(ByteBufUtil.writeUtf8(ByteBufAllocator.DEFAULT, - OBJECT_MAPPER.writeValueAsString(getTestPojoObject()))); - } catch (JsonProcessingException e) { - return Mono.error(e); - } + final AtomicReference output = new AtomicReference<>(null); + + return Mono + .fromCallable(() -> { + ByteBuf buf = ByteBufUtil.writeUtf8( + ByteBufAllocator.DEFAULT, + OBJECT_MAPPER.writeValueAsString(getTestPojoObject())); + output.set(buf); + + return buf; + }) + .doOnDiscard(ByteBuf.class, ReferenceCountUtil::safeRelease) + .doFinally(signalType -> ReferenceCountUtil.safeRelease(output.get())); } @Override diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/UserAgentSuffixTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/UserAgentSuffixTest.java index d91b97327f80..116eb5b72e0e 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/UserAgentSuffixTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/UserAgentSuffixTest.java @@ -9,6 +9,7 @@ import com.azure.cosmos.implementation.Configs; import com.azure.cosmos.models.CosmosContainerResponse; import com.azure.cosmos.rx.TestSuiteBase; +import org.testng.ITestContext; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Factory; @@ -42,70 +43,74 @@ public void afterClass() { @Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT) public void userAgentSuffixWithoutSpecialCharacter() { - CosmosClient clientWithUserAgentSuffix = getClientBuilder() + try (CosmosClient clientWithUserAgentSuffix = getClientBuilder() .userAgentSuffix("TestUserAgent") - .buildClient(); + .buildClient()) { - CosmosContainerResponse response = - clientWithUserAgentSuffix.getDatabase(this.databaseName).getContainer(this.containerName).read(); + CosmosContainerResponse response = + clientWithUserAgentSuffix.getDatabase(this.databaseName).getContainer(this.containerName).read(); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); - assertThat(response.getProperties()).isNotNull(); - assertThat(response.getProperties().getId()).isEqualTo(this.containerName); - assertThat(response.getDiagnostics()).isNotNull(); - validateUserAgentSuffix(response.getDiagnostics().getUserAgent(), "TestUserAgent"); + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertThat(response.getProperties()).isNotNull(); + assertThat(response.getProperties().getId()).isEqualTo(this.containerName); + assertThat(response.getDiagnostics()).isNotNull(); + validateUserAgentSuffix(response.getDiagnostics().getUserAgent(), "TestUserAgent"); + } } @Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT) public void userAgentSuffixWithSpecialCharacter() { - CosmosClient clientWithUserAgentSuffix = getClientBuilder() + try (CosmosClient clientWithUserAgentSuffix = getClientBuilder() .userAgentSuffix("TéstUserAgent's") - .buildClient(); + .buildClient()) { - CosmosContainerResponse response = - clientWithUserAgentSuffix.getDatabase(this.databaseName).getContainer(this.containerName).read(); + CosmosContainerResponse response = + clientWithUserAgentSuffix.getDatabase(this.databaseName).getContainer(this.containerName).read(); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); - assertThat(response.getProperties()).isNotNull(); - assertThat(response.getProperties().getId()).isEqualTo(this.containerName); - assertThat(response.getDiagnostics()).isNotNull(); - validateUserAgentSuffix(response.getDiagnostics().getUserAgent(), "TestUserAgent's"); + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertThat(response.getProperties()).isNotNull(); + assertThat(response.getProperties().getId()).isEqualTo(this.containerName); + assertThat(response.getDiagnostics()).isNotNull(); + validateUserAgentSuffix(response.getDiagnostics().getUserAgent(), "TestUserAgent's"); + } } @Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT) public void userAgentSuffixWithUnicodeCharacter() { - CosmosClient clientWithUserAgentSuffix = getClientBuilder() + try (CosmosClient clientWithUserAgentSuffix = getClientBuilder() .userAgentSuffix("UnicodeChar鱀InUserAgent") - .buildClient(); + .buildClient()) { - CosmosContainerResponse response = - clientWithUserAgentSuffix.getDatabase(this.databaseName).getContainer(this.containerName).read(); + CosmosContainerResponse response = + clientWithUserAgentSuffix.getDatabase(this.databaseName).getContainer(this.containerName).read(); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); - assertThat(response.getProperties()).isNotNull(); - assertThat(response.getProperties().getId()).isEqualTo(this.containerName); - assertThat(response.getDiagnostics()).isNotNull(); - validateUserAgentSuffix(response.getDiagnostics().getUserAgent(), "UnicodeChar_InUserAgent"); + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertThat(response.getProperties()).isNotNull(); + assertThat(response.getProperties().getId()).isEqualTo(this.containerName); + assertThat(response.getDiagnostics()).isNotNull(); + validateUserAgentSuffix(response.getDiagnostics().getUserAgent(), "UnicodeChar_InUserAgent"); + } } @Test(groups = { "fast", "emulator" }, timeOut = TIMEOUT) public void userAgentSuffixWithWhitespaceAndAsciiSpecialChars() { - CosmosClient clientWithUserAgentSuffix = getClientBuilder() + try (CosmosClient clientWithUserAgentSuffix = getClientBuilder() .userAgentSuffix("UserAgent with space$%_^()*&") - .buildClient(); + .buildClient()) { - CosmosContainerResponse response = - clientWithUserAgentSuffix.getDatabase(this.databaseName).getContainer(this.containerName).read(); + CosmosContainerResponse response = + clientWithUserAgentSuffix.getDatabase(this.databaseName).getContainer(this.containerName).read(); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); - assertThat(response.getProperties()).isNotNull(); - assertThat(response.getProperties().getId()).isEqualTo(this.containerName); - assertThat(response.getDiagnostics()).isNotNull(); - validateUserAgentSuffix(response.getDiagnostics().getUserAgent(), "UserAgent with space$%_^()*&"); + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertThat(response.getProperties()).isNotNull(); + assertThat(response.getProperties().getId()).isEqualTo(this.containerName); + assertThat(response.getDiagnostics()).isNotNull(); + validateUserAgentSuffix(response.getDiagnostics().getUserAgent(), "UserAgent with space$%_^()*&"); + } } private void validateUserAgentSuffix(String actualUserAgent, String expectedUserAgentSuffix) { diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/ExcludedRegionWithFaultInjectionTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/ExcludedRegionWithFaultInjectionTests.java index 79bc5818cc92..3b20cd2ec3a5 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/ExcludedRegionWithFaultInjectionTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/ExcludedRegionWithFaultInjectionTests.java @@ -2422,13 +2422,13 @@ private void execute(MutationTestConfig mutationTestConfig, boolean shouldInject } finally { System.clearProperty("COSMOS.MAX_RETRIES_IN_LOCAL_REGION_WHEN_REMOTE_REGION_PREFERRED"); - safeCloseAsync(clientWithPreferredRegions); + safeClose(clientWithPreferredRegions); } } @AfterClass(groups = {"multi-master"}) public void afterClass() { - safeCloseAsync(this.cosmosAsyncClient); + safeClose(this.cosmosAsyncClient); } private static List buildFaultInjectionRules( diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/FaultInjectionConnectionErrorRuleTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/FaultInjectionConnectionErrorRuleTests.java index b3eedd79ff17..d3301b2de255 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/FaultInjectionConnectionErrorRuleTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/FaultInjectionConnectionErrorRuleTests.java @@ -97,6 +97,7 @@ public void faultInjectionConnectionErrorRuleTestWithNoConnectionWarmup(FaultInj .contentResponseOnWriteEnabled(true) .directMode() .buildAsyncClient(); + FaultInjectionRule connectionErrorRule = null; try { // using single partition here so that all write operations will be on the same physical partitions @@ -113,7 +114,7 @@ public void faultInjectionConnectionErrorRuleTestWithNoConnectionWarmup(FaultInj // now enable the connection error rule which expected to close the connections String ruleId = "connectionErrorRule-close-" + UUID.randomUUID(); - FaultInjectionRule connectionErrorRule = + connectionErrorRule = new FaultInjectionRuleBuilder(ruleId) .condition( new FaultInjectionConditionBuilder() @@ -158,6 +159,10 @@ public void faultInjectionConnectionErrorRuleTestWithNoConnectionWarmup(FaultInj } catch (InterruptedException ex) { throw new RuntimeException(ex); } finally { + if (connectionErrorRule != null) { + connectionErrorRule.disable(); + } + safeClose(client); } } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/SessionRetryOptionsTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/SessionRetryOptionsTests.java index 261ae9ee0a27..c619b5c1d83a 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/SessionRetryOptionsTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/SessionRetryOptionsTests.java @@ -279,7 +279,7 @@ public void nonWriteOperation_WithReadSessionUnavailable_test( } } finally { System.clearProperty("COSMOS.MAX_RETRIES_IN_LOCAL_REGION_WHEN_REMOTE_REGION_PREFERRED"); - safeCloseAsync(clientWithPreferredRegions); + safeClose(clientWithPreferredRegions); } } @@ -354,13 +354,13 @@ public void writeOperation_withReadSessionUnavailable_test( } } finally { System.clearProperty("COSMOS.MAX_RETRIES_IN_LOCAL_REGION_WHEN_REMOTE_REGION_PREFERRED"); - safeCloseAsync(clientWithPreferredRegions); + safeClose(clientWithPreferredRegions); } } @AfterClass(groups = {"multi-master"}, timeOut = SHUTDOWN_TIMEOUT) public void afterClass() { - safeCloseAsync(cosmosAsyncClient); + safeClose(cosmosAsyncClient); } private Map getRegionMap(DatabaseAccount databaseAccount, boolean writeOnly) { diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyTests1.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyTests1.java index 22cba6842472..de8120a84091 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyTests1.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyTests1.java @@ -28,34 +28,42 @@ public void validateStrongConsistencyOnSyncReplication() throws Exception { throw new SkipException("Endpoint does not have strong consistency"); } - ConnectionPolicy connectionPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); - this.writeClient = - (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withConsistencyLevel(ConsistencyLevel.STRONG) - .withContentResponseOnWriteEnabled(true) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); + RxDocumentClientImpl writeClient = null; + RxDocumentClientImpl readClient = null; - this.readClient = + try { + ConnectionPolicy connectionPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); + writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withConsistencyLevel(ConsistencyLevel.STRONG) - .withContentResponseOnWriteEnabled(true) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); - User userDefinition = getUserDefinition(); - userDefinition.setId(userDefinition.getId() + "validateStrongConsistencyOnSyncReplication"); - User user = safeCreateUser(this.initClient, createdDatabase.getId(), userDefinition); - validateStrongConsistency(user); + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withConsistencyLevel(ConsistencyLevel.STRONG) + .withContentResponseOnWriteEnabled(true) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + + readClient = + (RxDocumentClientImpl) new AsyncDocumentClient.Builder() + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withConsistencyLevel(ConsistencyLevel.STRONG) + .withContentResponseOnWriteEnabled(true) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + User userDefinition = getUserDefinition(); + userDefinition.setId(userDefinition.getId() + "validateStrongConsistencyOnSyncReplication"); + User user = safeCreateUser(this.initClient, createdDatabase.getId(), userDefinition); + validateStrongConsistency(user, readClient, writeClient); + } finally { + safeClose(readClient); + safeClose(writeClient); + } } @@ -63,85 +71,109 @@ public void validateStrongConsistencyOnSyncReplication() throws Exception { public void validateConsistentLSNForDirectTCPClient() { //TODO Need to test with TCP protocol // https://msdata.visualstudio.com/CosmosDB/_workitems/edit/355057 - ConnectionPolicy connectionPolicy = new ConnectionPolicy(DirectConnectionConfig.getDefaultConfig()); - this.writeClient = - (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withContentResponseOnWriteEnabled(true) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); + RxDocumentClientImpl writeClient = null; + RxDocumentClientImpl readClient = null; - this.readClient = + try { + ConnectionPolicy connectionPolicy = new ConnectionPolicy(DirectConnectionConfig.getDefaultConfig()); + writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withContentResponseOnWriteEnabled(true) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); - validateConsistentLSN(); + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withContentResponseOnWriteEnabled(true) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + + readClient = + (RxDocumentClientImpl) new AsyncDocumentClient.Builder() + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withContentResponseOnWriteEnabled(true) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + validateConsistentLSN(readClient, writeClient); + } finally { + safeClose(readClient); + safeClose(writeClient); + } } @Test(groups = {"direct"}, timeOut = CONSISTENCY_TEST_TIMEOUT) public void validateConsistentLSNForDirectHttpsClient() { ConnectionPolicy connectionPolicy = new ConnectionPolicy(DirectConnectionConfig.getDefaultConfig()); - this.writeClient = - (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withContentResponseOnWriteEnabled(true) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); + RxDocumentClientImpl writeClient = null; + RxDocumentClientImpl readClient = null; - this.readClient = + try { + writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withContentResponseOnWriteEnabled(true) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); - validateConsistentLSN(); + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withContentResponseOnWriteEnabled(true) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + + readClient = + (RxDocumentClientImpl) new AsyncDocumentClient.Builder() + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withContentResponseOnWriteEnabled(true) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + validateConsistentLSN(readClient, writeClient); + } finally { + safeClose(readClient); + safeClose(writeClient); + } } @Test(groups = {"direct"}, timeOut = CONSISTENCY_TEST_TIMEOUT, enabled = false) public void validateConsistentLSNAndQuorumAckedLSNForDirectTCPClient() { //TODO Need to test with TCP protocol //https://msdata.visualstudio.com/CosmosDB/_workitems/edit/355057 - ConnectionPolicy connectionPolicy = new ConnectionPolicy(DirectConnectionConfig.getDefaultConfig()); - this.writeClient = - (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withContentResponseOnWriteEnabled(true) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); + RxDocumentClientImpl writeClient = null; + RxDocumentClientImpl readClient = null; - this.readClient = + try { + ConnectionPolicy connectionPolicy = new ConnectionPolicy(DirectConnectionConfig.getDefaultConfig()); + writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withContentResponseOnWriteEnabled(true) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); - validateConsistentLSNAndQuorumAckedLSN(); + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withContentResponseOnWriteEnabled(true) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + + readClient = + (RxDocumentClientImpl) new AsyncDocumentClient.Builder() + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withContentResponseOnWriteEnabled(true) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + validateConsistentLSNAndQuorumAckedLSN(readClient, writeClient); + } finally { + safeClose(readClient); + safeClose(writeClient); + } } @Test(groups = {"direct"}, timeOut = CONSISTENCY_TEST_TIMEOUT) @@ -164,29 +196,37 @@ public void validateBoundedStalenessDynamicQuorumSyncReplication() { @Test(groups = {"direct"}, timeOut = CONSISTENCY_TEST_TIMEOUT) public void validateConsistentLSNAndQuorumAckedLSNForDirectHttpsClient() { - ConnectionPolicy connectionPolicy = new ConnectionPolicy(DirectConnectionConfig.getDefaultConfig()); - this.writeClient = - (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withContentResponseOnWriteEnabled(true) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); + RxDocumentClientImpl writeClient = null; + RxDocumentClientImpl readClient = null; - this.readClient = + try { + ConnectionPolicy connectionPolicy = new ConnectionPolicy(DirectConnectionConfig.getDefaultConfig()); + writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withContentResponseOnWriteEnabled(true) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); - validateConsistentLSNAndQuorumAckedLSN(); + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withContentResponseOnWriteEnabled(true) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + + readClient = + (RxDocumentClientImpl) new AsyncDocumentClient.Builder() + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withContentResponseOnWriteEnabled(true) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + validateConsistentLSNAndQuorumAckedLSN(readClient, writeClient); + } finally { + safeClose(readClient); + safeClose(writeClient); + } } // TODO (DANOBLE) test is flaky @@ -218,33 +258,41 @@ public void validateConsistentPrefixOnSyncReplication() throws InterruptedExcept throw new SkipException("Endpoint does not have strong consistency"); } - ConnectionPolicy connectionPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); - this.writeClient = - (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withConsistencyLevel(ConsistencyLevel.BOUNDED_STALENESS) - .withContentResponseOnWriteEnabled(true) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); + RxDocumentClientImpl writeClient = null; + RxDocumentClientImpl readClient = null; - this.readClient = + try { + ConnectionPolicy connectionPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); + writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withConsistencyLevel(ConsistencyLevel.BOUNDED_STALENESS) - .withContentResponseOnWriteEnabled(true) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); - User user = safeCreateUser(this.initClient, createdDatabase.getId(), getUserDefinition()); - boolean readLagging = validateConsistentPrefix(user); - assertThat(readLagging).isFalse(); + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withConsistencyLevel(ConsistencyLevel.BOUNDED_STALENESS) + .withContentResponseOnWriteEnabled(true) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + + readClient = + (RxDocumentClientImpl) new AsyncDocumentClient.Builder() + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withConsistencyLevel(ConsistencyLevel.BOUNDED_STALENESS) + .withContentResponseOnWriteEnabled(true) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + User user = safeCreateUser(this.initClient, createdDatabase.getId(), getUserDefinition()); + boolean readLagging = validateConsistentPrefix(user, readClient, writeClient); + assertThat(readLagging).isFalse(); + } finally { + safeClose(readClient); + safeClose(writeClient); + } } @Test(groups = {"direct"}, timeOut = CONSISTENCY_TEST_TIMEOUT) @@ -253,34 +301,42 @@ public void validateConsistentPrefixOnAsyncReplication() throws InterruptedExcep throw new SkipException("Endpoint does not have strong consistency"); } - ConnectionPolicy connectionPolicy = new ConnectionPolicy(DirectConnectionConfig.getDefaultConfig()); - this.writeClient = - (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withConsistencyLevel(ConsistencyLevel.BOUNDED_STALENESS) - .withContentResponseOnWriteEnabled(true) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); + RxDocumentClientImpl writeClient = null; + RxDocumentClientImpl readClient = null; - this.readClient = + try { + ConnectionPolicy connectionPolicy = new ConnectionPolicy(DirectConnectionConfig.getDefaultConfig()); + writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withConsistencyLevel(ConsistencyLevel.BOUNDED_STALENESS) - .withContentResponseOnWriteEnabled(true) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); - Document documentDefinition = getDocumentDefinition(); - Document document = createDocument(this.initClient, createdDatabase.getId(), createdCollection.getId(), documentDefinition); - boolean readLagging = validateConsistentPrefix(document); - //assertThat(readLagging).isTrue(); //Will fail if batch repl is turned off + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withConsistencyLevel(ConsistencyLevel.BOUNDED_STALENESS) + .withContentResponseOnWriteEnabled(true) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + + readClient = + (RxDocumentClientImpl) new AsyncDocumentClient.Builder() + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withConsistencyLevel(ConsistencyLevel.BOUNDED_STALENESS) + .withContentResponseOnWriteEnabled(true) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + Document documentDefinition = getDocumentDefinition(); + Document document = createDocument(this.initClient, createdDatabase.getId(), createdCollection.getId(), documentDefinition); + boolean readLagging = validateConsistentPrefix(document, readClient, writeClient); + //assertThat(readLagging).isTrue(); //Will fail if batch repl is turned off + } finally { + safeClose(readClient); + safeClose(writeClient); + } } @Test(groups = {"direct"}, timeOut = CONSISTENCY_TEST_TIMEOUT, enabled = false) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyTests2.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyTests2.java index e13377e64999..4bc97ff928dc 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyTests2.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyTests2.java @@ -42,75 +42,91 @@ public Object[] regionScopedSessionContainerConfigs() { @Test(groups = {"direct"}, dataProvider = "regionScopedSessionContainerConfigs", timeOut = CONSISTENCY_TEST_TIMEOUT) public void validateReadSessionOnAsyncReplication(boolean shouldRegionScopedSessionContainerEnabled) throws InterruptedException { - ConnectionPolicy connectionPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); - this.writeClient = - (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withConsistencyLevel(ConsistencyLevel.SESSION) - .withContentResponseOnWriteEnabled(true) - .withRegionScopedSessionCapturingEnabled(shouldRegionScopedSessionContainerEnabled) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); + RxDocumentClientImpl writeClient = null; + RxDocumentClientImpl readClient = null; - this.readClient = + try { + ConnectionPolicy connectionPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); + writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withConsistencyLevel(ConsistencyLevel.SESSION) - .withContentResponseOnWriteEnabled(true) - .withRegionScopedSessionCapturingEnabled(shouldRegionScopedSessionContainerEnabled) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); - - Document document = this.initClient.createDocument(createdCollection.getSelfLink(), getDocumentDefinition(), - null, false).block().getResource(); - Thread.sleep(5000);//WaitForServerReplication - boolean readLagging = this.validateReadSession(document); - //assertThat(readLagging).isTrue(); //Will fail if batch repl is turned off + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withConsistencyLevel(ConsistencyLevel.SESSION) + .withContentResponseOnWriteEnabled(true) + .withRegionScopedSessionCapturingEnabled(shouldRegionScopedSessionContainerEnabled) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + + readClient = + (RxDocumentClientImpl) new AsyncDocumentClient.Builder() + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withConsistencyLevel(ConsistencyLevel.SESSION) + .withContentResponseOnWriteEnabled(true) + .withRegionScopedSessionCapturingEnabled(shouldRegionScopedSessionContainerEnabled) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + + Document document = this.initClient.createDocument(createdCollection.getSelfLink(), getDocumentDefinition(), + null, false).block().getResource(); + Thread.sleep(5000);//WaitForServerReplication + boolean readLagging = this.validateReadSession(document, readClient, writeClient); + //assertThat(readLagging).isTrue(); //Will fail if batch repl is turned off + } finally { + safeClose(readClient); + safeClose(writeClient); + } } @Test(groups = {"direct"}, dataProvider = "regionScopedSessionContainerConfigs", timeOut = CONSISTENCY_TEST_TIMEOUT) public void validateWriteSessionOnAsyncReplication(boolean shouldRegionScopedSessionContainerEnabled) throws InterruptedException { - ConnectionPolicy connectionPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); - this.writeClient = - (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withConsistencyLevel(ConsistencyLevel.SESSION) - .withContentResponseOnWriteEnabled(true) - .withRegionScopedSessionCapturingEnabled(shouldRegionScopedSessionContainerEnabled) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); + RxDocumentClientImpl writeClient = null; + RxDocumentClientImpl readClient = null; - this.readClient = + try { + ConnectionPolicy connectionPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); + writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withConsistencyLevel(ConsistencyLevel.SESSION) - .withContentResponseOnWriteEnabled(true) - .withRegionScopedSessionCapturingEnabled(shouldRegionScopedSessionContainerEnabled) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); - - Document document = this.initClient.createDocument(createdCollection.getSelfLink(), getDocumentDefinition(), - null, false).block().getResource(); - Thread.sleep(5000);//WaitForServerReplication - boolean readLagging = this.validateWriteSession(document); - //assertThat(readLagging).isTrue(); //Will fail if batch repl is turned off + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withConsistencyLevel(ConsistencyLevel.SESSION) + .withContentResponseOnWriteEnabled(true) + .withRegionScopedSessionCapturingEnabled(shouldRegionScopedSessionContainerEnabled) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + + readClient = + (RxDocumentClientImpl) new AsyncDocumentClient.Builder() + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withConsistencyLevel(ConsistencyLevel.SESSION) + .withContentResponseOnWriteEnabled(true) + .withRegionScopedSessionCapturingEnabled(shouldRegionScopedSessionContainerEnabled) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); + + Document document = this.initClient.createDocument(createdCollection.getSelfLink(), getDocumentDefinition(), + null, false).block().getResource(); + Thread.sleep(5000);//WaitForServerReplication + boolean readLagging = this.validateWriteSession(document, readClient, writeClient); + //assertThat(readLagging).isTrue(); //Will fail if batch repl is turned off + } finally { + safeClose(readClient); + safeClose(writeClient); + } } @Test(groups = {"direct"}, timeOut = CONSISTENCY_TEST_TIMEOUT, enabled = false) @@ -233,6 +249,8 @@ public void validateNoChargeOnFailedSessionRead() throws Exception { new CosmosClientTelemetryConfig() .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) .build(); + + QueryFeedOperationState dummyState = null; try { // CREATE collection DocumentCollection parentResource = writeClient.createCollection(createdDatabase.getSelfLink(), @@ -250,7 +268,7 @@ public void validateNoChargeOnFailedSessionRead() throws Exception { cosmosQueryRequestOptions.setPartitionKey(new PartitionKey(PartitionKeyInternal.Empty.toJson())); cosmosQueryRequestOptions.setSessionToken(token); - QueryFeedOperationState dummyState = TestUtils.createDummyQueryFeedOperationState( + dummyState = TestUtils.createDummyQueryFeedOperationState( ResourceType.Document, OperationType.ReadFeed, cosmosQueryRequestOptions, @@ -262,6 +280,7 @@ public void validateNoChargeOnFailedSessionRead() throws Exception { parentResource.getSelfLink(), dummyState, Document.class); validateQueryFailure(feedObservable, validator); } finally { + safeClose(dummyState); safeClose(writeClient); safeClose(readSecondaryClient); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyTestsBase.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyTestsBase.java index 3b5244997d2e..75b5c04bf6ea 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyTestsBase.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyTestsBase.java @@ -36,8 +36,6 @@ public class ConsistencyTestsBase extends TestSuiteBase { static final int CONSISTENCY_TEST_TIMEOUT = 120000; static final String USER_NAME = "TestUser"; - RxDocumentClientImpl writeClient; - RxDocumentClientImpl readClient; AsyncDocumentClient initClient; Database createdDatabase; DocumentCollection createdCollection; @@ -49,7 +47,11 @@ public void before_ConsistencyTestsBase() throws Exception { createdCollection = SHARED_MULTI_PARTITION_COLLECTION; } - void validateStrongConsistency(Resource resourceToWorkWith) throws Exception { + void validateStrongConsistency( + Resource resourceToWorkWith, + RxDocumentClientImpl readClient, + RxDocumentClientImpl writeClient) throws Exception { + int numberOfTestIteration = 5; Resource writeResource = resourceToWorkWith; while (numberOfTestIteration-- > 0) //Write from a client and do point read through second client and ensure TS matches. @@ -58,47 +60,47 @@ void validateStrongConsistency(Resource resourceToWorkWith) throws Exception { Thread.sleep(1000); //Timestamp is in granularity of seconds. Resource updatedResource = null; if (resourceToWorkWith instanceof User) { - updatedResource = this.writeClient.upsertUser(createdDatabase.getSelfLink(), (User) writeResource, null).block().getResource(); + updatedResource = writeClient.upsertUser(createdDatabase.getSelfLink(), (User) writeResource, null).block().getResource(); } else if (resourceToWorkWith instanceof Document) { RequestOptions options = new RequestOptions(); options.setPartitionKey(new PartitionKey(resourceToWorkWith.get("mypk"))); - updatedResource = this.writeClient.upsertDocument(createdCollection.getSelfLink(), (Document) writeResource, options, false).block().getResource(); + updatedResource = writeClient.upsertDocument(createdCollection.getSelfLink(), (Document) writeResource, options, false).block().getResource(); } assertThat(updatedResource.getTimestamp().isAfter(sourceTimestamp)).isTrue(); - User readResource = this.readClient.readUser(resourceToWorkWith.getSelfLink(), null).block().getResource(); + User readResource = readClient.readUser(resourceToWorkWith.getSelfLink(), null).block().getResource(); assertThat(updatedResource.getTimestamp().equals(readResource.getTimestamp())); } } - void validateConsistentLSN() { + void validateConsistentLSN(RxDocumentClientImpl readClient, RxDocumentClientImpl writeClient) { Document documentDefinition = getDocumentDefinition(); RequestOptions options = new RequestOptions(); options.setPartitionKey(new PartitionKey(documentDefinition.get("mypk"))); - Document document = createDocument(this.writeClient, createdDatabase.getId(), createdCollection.getId(), documentDefinition); - ResourceResponse response = this.writeClient.deleteDocument(document.getSelfLink(), options).block(); + Document document = createDocument(writeClient, createdDatabase.getId(), createdCollection.getId(), documentDefinition); + ResourceResponse response = writeClient.deleteDocument(document.getSelfLink(), options).block(); assertThat(response.getStatusCode()).isEqualTo(204); long quorumAckedLSN = Long.parseLong(response.getResponseHeaders().get(WFConstants.BackendHeaders.QUORUM_ACKED_LSN)); assertThat(quorumAckedLSN > 0).isTrue(); FailureValidator validator = new FailureValidator.Builder().statusCode(404).lsnGreaterThan(quorumAckedLSN).build(); - Mono> readObservable = this.readClient.readDocument(document.getSelfLink(), options); + Mono> readObservable = readClient.readDocument(document.getSelfLink(), options); validateFailure(readObservable, validator); } - void validateConsistentLSNAndQuorumAckedLSN() { + void validateConsistentLSNAndQuorumAckedLSN(RxDocumentClientImpl readClient, RxDocumentClientImpl writeClient) { Document documentDefinition = getDocumentDefinition(); RequestOptions options = new RequestOptions(); options.setPartitionKey(new PartitionKey(documentDefinition.get("mypk"))); - Document document = createDocument(this.writeClient, createdDatabase.getId(), createdCollection.getId(), documentDefinition); - ResourceResponse response = this.writeClient.deleteDocument(document.getSelfLink(), options).block(); + Document document = createDocument(writeClient, createdDatabase.getId(), createdCollection.getId(), documentDefinition); + ResourceResponse response = writeClient.deleteDocument(document.getSelfLink(), options).block(); assertThat(response.getStatusCode()).isEqualTo(204); long quorumAckedLSN = Long.parseLong(response.getResponseHeaders().get(WFConstants.BackendHeaders.QUORUM_ACKED_LSN)); assertThat(quorumAckedLSN > 0).isTrue(); FailureValidator validator = new FailureValidator.Builder().statusCode(404).lsnGreaterThanEqualsTo(quorumAckedLSN).exceptionQuorumAckedLSNInNotNull().build(); - Mono> readObservable = this.readClient.deleteDocument(document.getSelfLink(), options); + Mono> readObservable = readClient.deleteDocument(document.getSelfLink(), options); validateFailure(readObservable, validator); } @@ -119,36 +121,48 @@ void validateStrongConsistencyOnAsyncReplication(boolean useGateway) throws Inte connectionPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); } - this.writeClient = + RxDocumentClientImpl writeClient = null; + RxDocumentClientImpl readClient = null; + + try { + writeClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withConsistencyLevel(ConsistencyLevel.STRONG) - .withContentResponseOnWriteEnabled(true) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withConsistencyLevel(ConsistencyLevel.STRONG) + .withContentResponseOnWriteEnabled(true) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); - this.readClient = + readClient = (RxDocumentClientImpl) new AsyncDocumentClient.Builder() - .withServiceEndpoint(TestConfigurations.HOST) - .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) - .withConnectionPolicy(connectionPolicy) - .withConsistencyLevel(ConsistencyLevel.STRONG) - .withContentResponseOnWriteEnabled(true) - .withClientTelemetryConfig( - new CosmosClientTelemetryConfig() - .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) - .build(); + .withServiceEndpoint(TestConfigurations.HOST) + .withMasterKeyOrResourceToken(TestConfigurations.MASTER_KEY) + .withConnectionPolicy(connectionPolicy) + .withConsistencyLevel(ConsistencyLevel.STRONG) + .withContentResponseOnWriteEnabled(true) + .withClientTelemetryConfig( + new CosmosClientTelemetryConfig() + .sendClientTelemetryToService(ClientTelemetry.DEFAULT_CLIENT_TELEMETRY_ENABLED)) + .build(); - Document documentDefinition = getDocumentDefinition(); - Document document = createDocument(this.writeClient, createdDatabase.getId(), createdCollection.getId(), documentDefinition); - validateStrongConsistency(document, TestUtils.getCollectionNameLink(createdDatabase.getId(), createdCollection.getId())); + Document documentDefinition = getDocumentDefinition(); + Document document = createDocument(writeClient, createdDatabase.getId(), createdCollection.getId(), documentDefinition); + validateStrongConsistency( + document, + TestUtils.getCollectionNameLink(createdDatabase.getId(), createdCollection.getId()), + readClient, + writeClient); + } finally { + safeClose(readClient); + safeClose(writeClient); + } } - void validateStrongConsistency(Document documentToWorkWith, String collectionLink) throws InterruptedException { + void validateStrongConsistency(Document documentToWorkWith, String collectionLink, RxDocumentClientImpl readClient, RxDocumentClientImpl writeClient) throws InterruptedException { int numberOfTestIteration = 5; Document writeDocument = documentToWorkWith; while (numberOfTestIteration-- > 0) { @@ -156,10 +170,10 @@ void validateStrongConsistency(Document documentToWorkWith, String collectionLin Thread.sleep(1000);//Timestamp is in granularity of seconds. RequestOptions options = new RequestOptions(); options.setPartitionKey(new PartitionKey(documentToWorkWith.get("mypk"))); - Document updatedDocument = this.writeClient.replaceDocument(writeDocument, options).block().getResource(); + Document updatedDocument = writeClient.replaceDocument(writeDocument, options).block().getResource(); assertThat(updatedDocument.getTimestamp().isAfter(sourceTimestamp)).isTrue(); - Document readDocument = this.readClient.readDocument(documentToWorkWith.getSelfLink(), options).block().getResource(); + Document readDocument = readClient.readDocument(documentToWorkWith.getSelfLink(), options).block().getResource(); assertThat(updatedDocument.getTimestamp().equals(readDocument.getTimestamp())); } } @@ -251,7 +265,7 @@ void validateSessionContainerAfterCollectionCreateReplace(boolean useGateway) { } } - boolean validateConsistentPrefix(Resource resourceToWorkWith) throws InterruptedException { + boolean validateConsistentPrefix(Resource resourceToWorkWith, RxDocumentClientImpl readClient, RxDocumentClientImpl writeClient) throws InterruptedException { int numberOfTestIteration = 5; Instant lastReadDateTime = resourceToWorkWith.getTimestamp(); boolean readLagging = false; @@ -262,12 +276,12 @@ boolean validateConsistentPrefix(Resource resourceToWorkWith) throws Interrupted Thread.sleep(1000); //Timestamp is in granularity of seconds. Resource updatedResource = null; if (resourceToWorkWith instanceof User) { - updatedResource = this.writeClient.upsertUser(createdDatabase.getSelfLink(), (User) writeResource, + updatedResource = writeClient.upsertUser(createdDatabase.getSelfLink(), (User) writeResource, null) .block() .getResource(); } else if (resourceToWorkWith instanceof Document) { - updatedResource = this.writeClient.upsertDocument(createdCollection.getSelfLink(), + updatedResource = writeClient.upsertDocument(createdCollection.getSelfLink(), (Document) writeResource, null, false) .block() .getResource(); @@ -277,13 +291,13 @@ boolean validateConsistentPrefix(Resource resourceToWorkWith) throws Interrupted Resource readResource = null; if (resourceToWorkWith instanceof User) { - readResource = this.readClient.readUser(resourceToWorkWith.getSelfLink(), null) + readResource = readClient.readUser(resourceToWorkWith.getSelfLink(), null) .block() .getResource(); } else if (resourceToWorkWith instanceof Document) { RequestOptions options = new RequestOptions(); options.setPartitionKey(new PartitionKey(resourceToWorkWith.get("mypk"))); - readResource = this.readClient.readDocument(resourceToWorkWith.getSelfLink(), options) + readResource = readClient.readDocument(resourceToWorkWith.getSelfLink(), options) .block() .getResource(); } @@ -296,7 +310,7 @@ boolean validateConsistentPrefix(Resource resourceToWorkWith) throws Interrupted return readLagging; } - boolean validateReadSession(Resource resourceToWorkWith) throws InterruptedException { + boolean validateReadSession(Resource resourceToWorkWith, RxDocumentClientImpl readClient, RxDocumentClientImpl writeClient) throws InterruptedException { int numberOfTestIteration = 5; Instant lastReadDateTime = Instant.MIN; boolean readLagging = false; @@ -307,7 +321,7 @@ boolean validateReadSession(Resource resourceToWorkWith) throws InterruptedExcep Thread.sleep(1000); Resource updatedResource = null; if (resourceToWorkWith instanceof Document) { - updatedResource = this.writeClient.upsertDocument(createdCollection.getSelfLink(), writeResource, + updatedResource = writeClient.upsertDocument(createdCollection.getSelfLink(), writeResource, null, false) .block() .getResource(); @@ -319,7 +333,7 @@ boolean validateReadSession(Resource resourceToWorkWith) throws InterruptedExcep RequestOptions requestOptions = new RequestOptions(); requestOptions.setPartitionKey(new PartitionKey(resourceToWorkWith.get("mypk"))); if (resourceToWorkWith instanceof Document) { - readResource = this.readClient.readDocument(resourceToWorkWith.getSelfLink(), requestOptions).block().getResource(); + readResource = readClient.readDocument(resourceToWorkWith.getSelfLink(), requestOptions).block().getResource(); } assertThat(readResource.getTimestamp().compareTo(lastReadDateTime) >= 0).isTrue(); lastReadDateTime = readResource.getTimestamp(); @@ -331,7 +345,7 @@ boolean validateReadSession(Resource resourceToWorkWith) throws InterruptedExcep return readLagging; } - boolean validateWriteSession(Resource resourceToWorkWith) throws InterruptedException { + boolean validateWriteSession(Resource resourceToWorkWith, RxDocumentClientImpl readClient, RxDocumentClientImpl writeClient) throws InterruptedException { int numberOfTestIteration = 5; Instant lastReadDateTime = Instant.MIN; boolean readLagging = false; @@ -342,7 +356,7 @@ boolean validateWriteSession(Resource resourceToWorkWith) throws InterruptedExce Thread.sleep(1000); Resource updatedResource = null; if (resourceToWorkWith instanceof Document) { - updatedResource = this.writeClient.upsertDocument(createdCollection.getSelfLink(), writeResource, null, false).block().getResource(); + updatedResource = writeClient.upsertDocument(createdCollection.getSelfLink(), writeResource, null, false).block().getResource(); } assertThat(updatedResource.getTimestamp().isAfter(sourceTimestamp)).isTrue(); writeResource = updatedResource; @@ -352,7 +366,7 @@ boolean validateWriteSession(Resource resourceToWorkWith) throws InterruptedExce requestOptions.setPartitionKey(new PartitionKey(resourceToWorkWith.get("mypk"))); if (resourceToWorkWith instanceof Document) { readResource = - this.readClient.readDocument(resourceToWorkWith.getSelfLink(), requestOptions) + readClient.readDocument(resourceToWorkWith.getSelfLink(), requestOptions) .block() .getResource(); } @@ -366,7 +380,7 @@ boolean validateWriteSession(Resource resourceToWorkWith) throws InterruptedExce //Now perform write on session and update our session token and lastReadTS Thread.sleep(1000); if (resourceToWorkWith instanceof Document) { - readResource = this.writeClient.upsertDocument(createdCollection.getSelfLink(), readResource, + readResource = writeClient.upsertDocument(createdCollection.getSelfLink(), readResource, requestOptions, false) .block() .getResource(); @@ -374,7 +388,7 @@ boolean validateWriteSession(Resource resourceToWorkWith) throws InterruptedExce } assertThat(readResource.getTimestamp().isAfter(lastReadDateTime)); - this.readClient.setSession(this.writeClient.getSession()); + readClient.setSession(writeClient.getSession()); } return readLagging; } @@ -873,8 +887,6 @@ private static String getGlobalSessionToken(RxDocumentClientImpl client, Documen @AfterClass(groups = {"direct"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) public void afterClass() { safeClose(this.initClient); - safeClose(this.writeClient); - safeClose(this.readClient); } private String getDifferentLSNToken(String token, long lsnDifferent) throws Exception { diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/DocumentQuerySpyWireContentTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/DocumentQuerySpyWireContentTest.java index 23e7d569a4b1..22b3be737817 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/DocumentQuerySpyWireContentTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/DocumentQuerySpyWireContentTest.java @@ -95,22 +95,27 @@ public void queryWithContinuationTokenLimit(CosmosQueryRequestOptions options, S client.clearCapturedRequests(); - Flux> queryObservable = client + QueryFeedOperationState dummyState = TestUtils.createDummyQueryFeedOperationState(ResourceType.Document, OperationType.Query, options, client); + try { + Flux> queryObservable = client .queryDocuments( collectionLink, query, - TestUtils.createDummyQueryFeedOperationState(ResourceType.Document, OperationType.Query, options, client), + dummyState, Document.class); - List results = queryObservable.flatMap(p -> Flux.fromIterable(p.getResults())) - .collectList().block(); + List results = queryObservable.flatMap(p -> Flux.fromIterable(p.getResults())) + .collectList().block(); - assertThat(results.size()).describedAs("total results").isGreaterThanOrEqualTo(1); + assertThat(results.size()).describedAs("total results").isGreaterThanOrEqualTo(1); - List requests = client.getCapturedRequests(); + List requests = client.getCapturedRequests(); - for(HttpRequest req: requests) { - validateRequestHasContinuationTokenLimit(req, options.getResponseContinuationTokenLimitInKb()); + for (HttpRequest req : requests) { + validateRequestHasContinuationTokenLimit(req, options.getResponseContinuationTokenLimitInKb()); + } + } finally { + safeClose(dummyState); } } @@ -142,6 +147,11 @@ public Document createDocument(AsyncDocumentClient client, String collectionLink @BeforeClass(groups = { "fast" }, timeOut = SETUP_TIMEOUT) public void before_DocumentQuerySpyWireContentTest() throws Exception { + SpyClientUnderTestFactory.ClientUnderTest oldSnapshot = client; + if (oldSnapshot != null) { + oldSnapshot.close(); + } + client = new SpyClientBuilder(this.clientBuilder()).build(); createdDatabase = SHARED_DATABASE; @@ -172,13 +182,17 @@ public void before_DocumentQuerySpyWireContentTest() throws Exception { client ); - // do the query once to ensure the collection is cached. - client.queryDocuments(getMultiPartitionCollectionLink(), "select * from root", state, Document.class) - .then().block(); + try { + // do the query once to ensure the collection is cached. + client.queryDocuments(getMultiPartitionCollectionLink(), "select * from root", state, Document.class) + .then().block(); - // do the query once to ensure the collection is cached. - client.queryDocuments(getSinglePartitionCollectionLink(), "select * from root", state, Document.class) - .then().block(); + // do the query once to ensure the collection is cached. + client.queryDocuments(getSinglePartitionCollectionLink(), "select * from root", state, Document.class) + .then().block(); + } finally { + safeClose(state); + } } @AfterClass(groups = { "fast" }, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RequestHeadersSpyWireTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RequestHeadersSpyWireTest.java index 435cf569c90b..9f5e783d1f67 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RequestHeadersSpyWireTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RequestHeadersSpyWireTest.java @@ -137,15 +137,20 @@ public void queryWithMaxIntegratedCacheStaleness(CosmosQueryRequestOptions optio client.clearCapturedRequests(); - client.queryDocuments( - collectionLink, - query, - TestUtils.createDummyQueryFeedOperationState(ResourceType.Document, OperationType.Query, options, client), - Document.class).blockLast(); - - List requests = client.getCapturedRequests(); - for (HttpRequest httpRequest : requests) { - validateRequestHasDedicatedGatewayHeaders(httpRequest, options.getDedicatedGatewayRequestOptions()); + QueryFeedOperationState dummyState = TestUtils.createDummyQueryFeedOperationState(ResourceType.Document, OperationType.Query, options, client); + try { + client.queryDocuments( + collectionLink, + query, + dummyState, + Document.class).blockLast(); + + List requests = client.getCapturedRequests(); + for (HttpRequest httpRequest : requests) { + validateRequestHasDedicatedGatewayHeaders(httpRequest, options.getDedicatedGatewayRequestOptions()); + } + } finally { + safeClose(dummyState); } } @@ -168,11 +173,15 @@ public void queryWithMaxIntegratedCacheStalenessInNanoseconds() { client ); - assertThatThrownBy(() -> client - .queryDocuments(collectionLink, query, state, Document.class) - .blockLast()) - .isInstanceOf(IllegalArgumentException.class) - .hasMessage("MaxIntegratedCacheStaleness granularity is milliseconds"); + try { + assertThatThrownBy(() -> client + .queryDocuments(collectionLink, query, state, Document.class) + .blockLast()) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("MaxIntegratedCacheStaleness granularity is milliseconds"); + } finally { + safeClose(state); + } } @Test(groups = { "fast" }, timeOut = TIMEOUT) @@ -192,13 +201,17 @@ public void queryWithMaxIntegratedCacheStalenessInNegative() { client ); - client.clearCapturedRequests(); + try { + client.clearCapturedRequests(); - assertThatThrownBy(() -> client - .queryDocuments(collectionLink, query, state, Document.class) - .blockLast()) - .isInstanceOf(IllegalArgumentException.class) - .hasMessage("MaxIntegratedCacheStaleness duration cannot be negative"); + assertThatThrownBy(() -> client + .queryDocuments(collectionLink, query, state, Document.class) + .blockLast()) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("MaxIntegratedCacheStaleness duration cannot be negative"); + } finally { + safeClose(state); + } } @Test(dataProvider = "maxIntegratedCacheStalenessDurationProviderItemOptions", groups = { "fast" }, timeOut = diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/SessionTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/SessionTest.java index 888ed2687825..e672381f247a 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/SessionTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/SessionTest.java @@ -78,21 +78,26 @@ public void before_SessionTest() { RequestOptions requestOptions = new RequestOptions(); requestOptions.setOfferThroughput(20000); //Making sure we have 4 physical partitions - createdCollection = createCollection(createGatewayHouseKeepingDocumentClient().build(), createdDatabase.getId(), + AsyncDocumentClient asynClient = createGatewayHouseKeepingDocumentClient().build(); + try { + createdCollection = createCollection(asynClient, createdDatabase.getId(), collection, requestOptions); - houseKeepingClient = clientBuilder().build(); - connectionMode = houseKeepingClient.getConnectionPolicy().getConnectionMode(); - - if (connectionMode == ConnectionMode.DIRECT) { - spyClient = SpyClientUnderTestFactory.createDirectHttpsClientUnderTest(clientBuilder()); - } else { - // Gateway builder has multipleWriteRegionsEnabled false by default, enabling it for multi master test - ConnectionPolicy connectionPolicy = clientBuilder().connectionPolicy; - connectionPolicy.setMultipleWriteRegionsEnabled(true); - spyClient = SpyClientUnderTestFactory.createClientUnderTest(clientBuilder().withConnectionPolicy(connectionPolicy)); + houseKeepingClient = clientBuilder().build(); + connectionMode = houseKeepingClient.getConnectionPolicy().getConnectionMode(); + + if (connectionMode == ConnectionMode.DIRECT) { + spyClient = SpyClientUnderTestFactory.createDirectHttpsClientUnderTest(clientBuilder()); + } else { + // Gateway builder has multipleWriteRegionsEnabled false by default, enabling it for multi master test + ConnectionPolicy connectionPolicy = clientBuilder().connectionPolicy; + connectionPolicy.setMultipleWriteRegionsEnabled(true); + spyClient = SpyClientUnderTestFactory.createClientUnderTest(clientBuilder().withConnectionPolicy(connectionPolicy)); + } + options = new RequestOptions(); + options.setPartitionKey(PartitionKey.NONE); + } finally { + asynClient.close(); } - options = new RequestOptions(); - options.setPartitionKey(PartitionKey.NONE); } @AfterClass(groups = { "fast", "multi-master" }, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) @@ -211,6 +216,8 @@ public void partitionedSessionToken(boolean isNameBased) throws NoSuchMethodExce // Session token validation for cross partition query spyClient.clearCapturedRequests(); queryRequestOptions = new CosmosQueryRequestOptions(); + + safeClose(dummyState); dummyState = TestUtils.createDummyQueryFeedOperationState( ResourceType.Document, OperationType.Query, @@ -227,6 +234,7 @@ public void partitionedSessionToken(boolean isNameBased) throws NoSuchMethodExce List feedRanges = spyClient.getFeedRanges(getCollectionLink(isNameBased), true).block(); queryRequestOptions = new CosmosQueryRequestOptions(); queryRequestOptions.setFeedRange(feedRanges.get(0)); + safeClose(dummyState); dummyState = TestUtils.createDummyQueryFeedOperationState( ResourceType.Document, OperationType.Query, @@ -241,6 +249,7 @@ public void partitionedSessionToken(boolean isNameBased) throws NoSuchMethodExce // Session token validation for readAll with partition query spyClient.clearCapturedRequests(); queryRequestOptions = new CosmosQueryRequestOptions(); + safeClose(dummyState); dummyState = TestUtils.createDummyQueryFeedOperationState( ResourceType.Document, OperationType.ReadFeed, @@ -260,6 +269,7 @@ public void partitionedSessionToken(boolean isNameBased) throws NoSuchMethodExce spyClient.clearCapturedRequests(); queryRequestOptions = new CosmosQueryRequestOptions(); + safeClose(dummyState); dummyState = TestUtils.createDummyQueryFeedOperationState( ResourceType.Document, OperationType.ReadFeed, @@ -278,10 +288,12 @@ public void partitionedSessionToken(boolean isNameBased) throws NoSuchMethodExce CosmosItemIdentity cosmosItemIdentity = new CosmosItemIdentity(new PartitionKey(documentCreated.getId()), documentCreated.getId()); List cosmosItemIdentities = new ArrayList<>(); cosmosItemIdentities.add(cosmosItemIdentity); + safeClose(dummyState); + dummyState = TestUtils.createDummyQueryFeedOperationState(ResourceType.Document, OperationType.Query, queryRequestOptions, spyClient); spyClient.readMany( cosmosItemIdentities, getCollectionLink(isNameBased), - TestUtils.createDummyQueryFeedOperationState(ResourceType.Document, OperationType.Query, queryRequestOptions, spyClient), + dummyState, InternalObjectNode.class).block(); assertThat(getSessionTokensInRequests().size()).isEqualTo(1); assertThat(getSessionTokensInRequests().get(0)).isNotEmpty(); @@ -317,6 +329,8 @@ public void partitionedSessionToken(boolean isNameBased) throws NoSuchMethodExce assertThat(getSessionTokensInRequests().get(0)).isNotEmpty(); assertThat(getSessionTokensInRequests().get(0)).doesNotContain(","); // making sure we have only one scope session token } + + safeClose(dummyState); } @Test(groups = { "fast" }, timeOut = TIMEOUT, dataProvider = "sessionTestArgProvider") diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/TestSuiteBase.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/TestSuiteBase.java index 3da097f3213c..ce0b29a47de5 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/TestSuiteBase.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/TestSuiteBase.java @@ -55,8 +55,8 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.doAnswer; -@Listeners({TestNGLogListener.class}) -public class TestSuiteBase extends DocumentClientTest { +@Listeners({TestNGLogListener.class, CosmosNettyLeakDetectorFactory.class}) +public abstract class TestSuiteBase extends DocumentClientTest { private static final int DEFAULT_BULK_INSERT_CONCURRENCY_LEVEL = 500; private static final ObjectMapper objectMapper = new ObjectMapper(); protected static final int TIMEOUT = 40000; @@ -126,7 +126,9 @@ public Flux> queryDatabases(SqlQuerySpec query) { OperationType.Query, new CosmosQueryRequestOptions(), client); - return client.queryDatabases(query, state); + return client + .queryDatabases(query, state) + .doFinally(signal -> safeClose(state)); } @Override @@ -158,13 +160,6 @@ public void beforeSuite() { } } - @BeforeSuite(groups = {"unit"}) - public void parallelizeUnitTests(ITestContext context) { - // TODO: Parallelization was disabled due to flaky tests. Re-enable after fixing the flaky tests. -// context.getSuite().getXmlSuite().setParallel(XmlSuite.ParallelMode.CLASSES); -// context.getSuite().getXmlSuite().setThreadCount(Runtime.getRuntime().availableProcessors()); - } - @AfterSuite(groups = {"fast", "long", "direct", "multi-region", "multi-master", "flaky-multi-master", "emulator", "split", "query", "cfp-split", "long-emulator"}, timeOut = SUITE_SHUTDOWN_TIMEOUT) public void afterSuite() { @@ -184,128 +179,128 @@ protected static void truncateCollection(DocumentCollection collection) { try { List paths = collection.getPartitionKey().getPaths(); - CosmosAsyncClient cosmosClient = new CosmosClientBuilder() + try (CosmosAsyncClient cosmosClient = new CosmosClientBuilder() .key(TestConfigurations.MASTER_KEY) .endpoint(TestConfigurations.HOST) - .buildAsyncClient(); - CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); - options.setMaxDegreeOfParallelism(-1); - QueryFeedOperationState state = new QueryFeedOperationState( - cosmosClient, - "truncateCollection", - collection.getSelfLink(), - collection.getId(), - ResourceType.Document, - OperationType.Query, - null, - options, - new CosmosPagedFluxOptions() - ); - - ModelBridgeInternal.setQueryRequestOptionsMaxItemCount(options, 100); - - logger.info("Truncating DocumentCollection {} documents ...", collection.getId()); - - houseKeepingClient.queryDocuments(collection.getSelfLink(), "SELECT * FROM root", state, Document.class) - .publishOn(Schedulers.parallel()) - .flatMap(page -> Flux.fromIterable(page.getResults())) - .flatMap(doc -> { - RequestOptions requestOptions = new RequestOptions(); - - if (paths != null && !paths.isEmpty()) { - List pkPath = PathParser.getPathParts(paths.get(0)); - Object propertyValue = doc.getObjectByPath(pkPath); - if (propertyValue == null) { - propertyValue = Undefined.value(); - } - - requestOptions.setPartitionKey(new PartitionKey(propertyValue)); - } - - return houseKeepingClient.deleteDocument(doc.getSelfLink(), requestOptions); - }).then().block(); - - logger.info("Truncating DocumentCollection {} triggers ...", collection.getId()); - - state = new QueryFeedOperationState( - cosmosClient, - "truncateTriggers", - collection.getSelfLink(), - collection.getId(), - ResourceType.Document, - OperationType.Query, - null, - options, - new CosmosPagedFluxOptions() - ); - houseKeepingClient.queryTriggers(collection.getSelfLink(), "SELECT * FROM root", state) - .publishOn(Schedulers.parallel()) - .flatMap(page -> Flux.fromIterable(page.getResults())) - .flatMap(trigger -> { - RequestOptions requestOptions = new RequestOptions(); - -// if (paths != null && !paths.isEmpty()) { -// Object propertyValue = trigger.getObjectByPath(PathParser.getPathParts(paths.get(0))); -// requestOptions.partitionKey(new PartitionKey(propertyValue)); -// } - - return houseKeepingClient.deleteTrigger(trigger.getSelfLink(), requestOptions); - }).then().block(); - - logger.info("Truncating DocumentCollection {} storedProcedures ...", collection.getId()); - - state = new QueryFeedOperationState( - cosmosClient, - "truncateStoredProcs", - collection.getSelfLink(), - collection.getId(), - ResourceType.Document, - OperationType.Query, - null, - options, - new CosmosPagedFluxOptions() - ); - houseKeepingClient.queryStoredProcedures(collection.getSelfLink(), "SELECT * FROM root", state) - .publishOn(Schedulers.parallel()) - .flatMap(page -> Flux.fromIterable(page.getResults())) - .flatMap(storedProcedure -> { - RequestOptions requestOptions = new RequestOptions(); - -// if (paths != null && !paths.isEmpty()) { -// Object propertyValue = storedProcedure.getObjectByPath(PathParser.getPathParts(paths.get(0))); -// requestOptions.partitionKey(new PartitionKey(propertyValue)); -// } - - return houseKeepingClient.deleteStoredProcedure(storedProcedure.getSelfLink(), requestOptions); - }).then().block(); - - logger.info("Truncating DocumentCollection {} udfs ...", collection.getId()); - - state = new QueryFeedOperationState( - cosmosClient, - "truncateUserDefinedFunctions", - collection.getSelfLink(), - collection.getId(), - ResourceType.Document, - OperationType.Query, - null, - options, - new CosmosPagedFluxOptions() - ); - houseKeepingClient.queryUserDefinedFunctions(collection.getSelfLink(), "SELECT * FROM root", state) - .publishOn(Schedulers.parallel()) - .flatMap(page -> Flux.fromIterable(page.getResults())) - .flatMap(udf -> { - RequestOptions requestOptions = new RequestOptions(); - -// if (paths != null && !paths.isEmpty()) { -// Object propertyValue = udf.getObjectByPath(PathParser.getPathParts(paths.get(0))); -// requestOptions.partitionKey(new PartitionKey(propertyValue)); -// } - - return houseKeepingClient.deleteUserDefinedFunction(udf.getSelfLink(), requestOptions); - }).then().block(); - + .buildAsyncClient()) { + CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); + options.setMaxDegreeOfParallelism(-1); + QueryFeedOperationState state = new QueryFeedOperationState( + cosmosClient, + "truncateCollection", + collection.getSelfLink(), + collection.getId(), + ResourceType.Document, + OperationType.Query, + null, + options, + new CosmosPagedFluxOptions() + ); + + ModelBridgeInternal.setQueryRequestOptionsMaxItemCount(options, 100); + + logger.info("Truncating DocumentCollection {} documents ...", collection.getId()); + + houseKeepingClient.queryDocuments(collection.getSelfLink(), "SELECT * FROM root", state, Document.class) + .publishOn(Schedulers.parallel()) + .flatMap(page -> Flux.fromIterable(page.getResults())) + .flatMap(doc -> { + RequestOptions requestOptions = new RequestOptions(); + + if (paths != null && !paths.isEmpty()) { + List pkPath = PathParser.getPathParts(paths.get(0)); + Object propertyValue = doc.getObjectByPath(pkPath); + if (propertyValue == null) { + propertyValue = Undefined.value(); + } + + requestOptions.setPartitionKey(new PartitionKey(propertyValue)); + } + + return houseKeepingClient.deleteDocument(doc.getSelfLink(), requestOptions); + }).then().block(); + + logger.info("Truncating DocumentCollection {} triggers ...", collection.getId()); + + state = new QueryFeedOperationState( + cosmosClient, + "truncateTriggers", + collection.getSelfLink(), + collection.getId(), + ResourceType.Document, + OperationType.Query, + null, + options, + new CosmosPagedFluxOptions() + ); + houseKeepingClient.queryTriggers(collection.getSelfLink(), "SELECT * FROM root", state) + .publishOn(Schedulers.parallel()) + .flatMap(page -> Flux.fromIterable(page.getResults())) + .flatMap(trigger -> { + RequestOptions requestOptions = new RequestOptions(); + + // if (paths != null && !paths.isEmpty()) { + // Object propertyValue = trigger.getObjectByPath(PathParser.getPathParts(paths.get(0))); + // requestOptions.partitionKey(new PartitionKey(propertyValue)); + // } + + return houseKeepingClient.deleteTrigger(trigger.getSelfLink(), requestOptions); + }).then().block(); + + logger.info("Truncating DocumentCollection {} storedProcedures ...", collection.getId()); + + state = new QueryFeedOperationState( + cosmosClient, + "truncateStoredProcs", + collection.getSelfLink(), + collection.getId(), + ResourceType.Document, + OperationType.Query, + null, + options, + new CosmosPagedFluxOptions() + ); + houseKeepingClient.queryStoredProcedures(collection.getSelfLink(), "SELECT * FROM root", state) + .publishOn(Schedulers.parallel()) + .flatMap(page -> Flux.fromIterable(page.getResults())) + .flatMap(storedProcedure -> { + RequestOptions requestOptions = new RequestOptions(); + + // if (paths != null && !paths.isEmpty()) { + // Object propertyValue = storedProcedure.getObjectByPath(PathParser.getPathParts(paths.get(0))); + // requestOptions.partitionKey(new PartitionKey(propertyValue)); + // } + + return houseKeepingClient.deleteStoredProcedure(storedProcedure.getSelfLink(), requestOptions); + }).then().block(); + + logger.info("Truncating DocumentCollection {} udfs ...", collection.getId()); + + state = new QueryFeedOperationState( + cosmosClient, + "truncateUserDefinedFunctions", + collection.getSelfLink(), + collection.getId(), + ResourceType.Document, + OperationType.Query, + null, + options, + new CosmosPagedFluxOptions() + ); + houseKeepingClient.queryUserDefinedFunctions(collection.getSelfLink(), "SELECT * FROM root", state) + .publishOn(Schedulers.parallel()) + .flatMap(page -> Flux.fromIterable(page.getResults())) + .flatMap(udf -> { + RequestOptions requestOptions = new RequestOptions(); + + // if (paths != null && !paths.isEmpty()) { + // Object propertyValue = udf.getObjectByPath(PathParser.getPathParts(paths.get(0))); + // requestOptions.partitionKey(new PartitionKey(propertyValue)); + // } + + return houseKeepingClient.deleteUserDefinedFunction(udf.getSelfLink(), requestOptions); + }).then().block(); + } } finally { houseKeepingClient.close(); } @@ -554,11 +549,15 @@ public static void deleteCollectionIfExists(AsyncDocumentClient client, String d new CosmosQueryRequestOptions(), client ); - List res = client.queryCollections("dbs/" + databaseId, - String.format("SELECT * FROM root r where r.id = '%s'", collectionId), state).single().block() - .getResults(); - if (!res.isEmpty()) { - deleteCollection(client, TestUtils.getCollectionNameLink(databaseId, collectionId)); + try { + List res = client.queryCollections("dbs/" + databaseId, + String.format("SELECT * FROM root r where r.id = '%s'", collectionId), state).single().block() + .getResults(); + if (!res.isEmpty()) { + deleteCollection(client, TestUtils.getCollectionNameLink(databaseId, collectionId)); + } + } finally { + safeClose(state); } } @@ -576,15 +575,19 @@ public static void deleteDocumentIfExists(AsyncDocumentClient client, String dat new CosmosQueryRequestOptions(), client ); - List res = client + try { + List res = client .queryDocuments( TestUtils.getCollectionNameLink(databaseId, collectionId), String.format("SELECT * FROM root r where r.id = '%s'", docId), state, Document.class) .single().block().getResults(); - if (!res.isEmpty()) { - deleteDocument(client, TestUtils.getDocumentNameLink(databaseId, collectionId, docId), pk, TestUtils.getCollectionNameLink(databaseId, collectionId)); + if (!res.isEmpty()) { + deleteDocument(client, TestUtils.getDocumentNameLink(databaseId, collectionId, docId), pk, TestUtils.getCollectionNameLink(databaseId, collectionId)); + } + } finally { + safeClose(state); } } @@ -601,11 +604,16 @@ public static void deleteUserIfExists(AsyncDocumentClient client, String databas new CosmosQueryRequestOptions(), client ); - List res = client + + try { + List res = client .queryUsers("dbs/" + databaseId, String.format("SELECT * FROM root r where r.id = '%s'", userId), state) .single().block().getResults(); - if (!res.isEmpty()) { - deleteUser(client, TestUtils.getUserNameLink(databaseId, userId)); + if (!res.isEmpty()) { + deleteUser(client, TestUtils.getUserNameLink(databaseId, userId)); + } + } finally { + safeClose(state); } } @@ -640,7 +648,8 @@ static protected Database createDatabaseIfNotExists(AsyncDocumentClient client, new CosmosQueryRequestOptions(), client ); - return client.queryDatabases(String.format("SELECT * FROM r where r.id = '%s'", databaseId), state).flatMap(p -> Flux.fromIterable(p.getResults())).switchIfEmpty( + try { + return client.queryDatabases(String.format("SELECT * FROM r where r.id = '%s'", databaseId), state).flatMap(p -> Flux.fromIterable(p.getResults())).switchIfEmpty( Flux.defer(() -> { Database databaseDefinition = new Database(); @@ -648,7 +657,10 @@ static protected Database createDatabaseIfNotExists(AsyncDocumentClient client, return client.createDatabase(databaseDefinition, null).map(ResourceResponse::getResource); }) - ).single().block(); + ).single().block(); + } finally { + safeClose(state); + } } static protected void safeDeleteDatabase(AsyncDocumentClient client, Database database) { @@ -674,14 +686,19 @@ static protected void safeDeleteAllCollections(AsyncDocumentClient client, Datab new CosmosQueryRequestOptions(), client ); - List collections = client.readCollections(database.getSelfLink(), state) - .flatMap(p -> Flux.fromIterable(p.getResults())) - .collectList() - .single() - .block(); - - for (DocumentCollection collection : collections) { - client.deleteCollection(collection.getSelfLink(), null).block().getResource(); + + try { + List collections = client.readCollections(database.getSelfLink(), state) + .flatMap(p -> Flux.fromIterable(p.getResults())) + .collectList() + .single() + .block(); + + for (DocumentCollection collection : collections) { + client.deleteCollection(collection.getSelfLink(), null).block().getResource(); + } + } finally { + safeClose(state); } } } @@ -716,6 +733,22 @@ static protected void safeCloseAsync(AsyncDocumentClient client) { } } + static protected void safeClose(QueryFeedOperationState state) { + if (state != null) { + safeClose(state.getClient()); + } + } + + static protected void safeClose(CosmosAsyncClient client) { + if (client != null) { + try { + client.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + static protected void safeClose(AsyncDocumentClient client) { if (client != null) { try { diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/cpu/CpuLoadMonitorTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/cpu/CpuLoadMonitorTest.java index 46b5e0374438..ceafb8c65778 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/cpu/CpuLoadMonitorTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/cpu/CpuLoadMonitorTest.java @@ -15,7 +15,7 @@ public class CpuLoadMonitorTest { @Test(groups = "unit") public void noInstance() throws Exception { - assertThat(ReflectionUtils.getListeners()).hasSize(0); + assertEventualListenerCount(0); assertThat(ReflectionUtils.getFuture()).isNull(); } @@ -31,7 +31,7 @@ public void multipleInstances() throws Exception { Future workFuture = ReflectionUtils.getFuture(); assertThat(workFuture).isNotNull(); assertThat(workFuture.isCancelled()).isFalse(); - assertThat(ReflectionUtils.getListeners()).hasSize(cpuMonitorList.size()); + assertEventualListenerCount(cpuMonitorList.size()); Thread.sleep(10); } @@ -41,7 +41,7 @@ public void multipleInstances() throws Exception { CpuMemoryMonitor.unregister(cpuMemoryListener); - assertThat(ReflectionUtils.getListeners()).hasSize(cpuMonitorList.size()); + assertEventualListenerCount(cpuMonitorList.size()); Future workFuture = ReflectionUtils.getFuture(); assertThat(workFuture).isNotNull(); @@ -54,7 +54,7 @@ public void multipleInstances() throws Exception { CpuMemoryMonitor.register(newListener); CpuMemoryMonitor.unregister(newListener); - assertThat(ReflectionUtils.getListeners()).hasSize(cpuMonitorList.size()); + assertEventualListenerCount(cpuMonitorList.size()); Future workFuture = ReflectionUtils.getFuture(); assertThat(workFuture).isNotNull(); assertThat(workFuture.isCancelled()).isFalse(); @@ -62,7 +62,7 @@ public void multipleInstances() throws Exception { CpuMemoryListener cpuMemoryListener = cpuMonitorList.remove(0); CpuMemoryMonitor.unregister(cpuMemoryListener); - assertThat(ReflectionUtils.getListeners()).hasSize(cpuMonitorList.size()); + assertEventualListenerCount(cpuMonitorList.size()); workFuture = ReflectionUtils.getFuture(); assertThat(workFuture).isNull(); @@ -74,12 +74,20 @@ public void handleLeak() throws Throwable { CpuMemoryMonitor.register(listener); listener = null; System.gc(); - Thread.sleep(10000); - - assertThat(ReflectionUtils.getListeners()).hasSize(0); + int secondsWaited = 0; + assertEventualListenerCount(0); assertThat(ReflectionUtils.getFuture()).isNull(); } + private static void assertEventualListenerCount(int expectedListenerCount) throws Exception { + int secondsWaited = 0; + while (secondsWaited < 30 && ReflectionUtils.getListeners().size() > expectedListenerCount) { + Thread.sleep(1_000); + } + + assertThat(ReflectionUtils.getListeners()).hasSize(expectedListenerCount); + } + class TestMemoryListener implements CpuMemoryListener { } } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/ConnectionStateListenerTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/ConnectionStateListenerTest.java index 97f86bb795d3..01e7c1f86de4 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/ConnectionStateListenerTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/ConnectionStateListenerTest.java @@ -4,6 +4,7 @@ package com.azure.cosmos.implementation.directconnectivity; import com.azure.cosmos.ConnectionMode; +import com.azure.cosmos.CosmosNettyLeakDetectorFactory; import com.azure.cosmos.DirectConnectionConfig; import com.azure.cosmos.implementation.Configs; import com.azure.cosmos.implementation.ConnectionPolicy; @@ -29,34 +30,43 @@ import com.azure.cosmos.implementation.routing.RegionalRoutingContext; import io.netty.handler.ssl.SslContext; import org.mockito.Mockito; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import java.io.IOException; import java.net.URI; -import java.net.URISyntaxException; import java.nio.channels.ClosedChannelException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; -import java.util.Random; import java.util.UUID; -import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicInteger; import static com.azure.cosmos.implementation.TestUtils.mockDiagnosticsClientContext; import static org.assertj.core.api.Assertions.assertThat; public class ConnectionStateListenerTest { - private static final Logger logger = LoggerFactory.getLogger(ConnectionStateListenerTest.class); private static final AtomicInteger randomPort = new AtomicInteger(1000); - private static int port = 8082; - private static String serverAddressPrefix = "rntbd://localhost:"; - private static Random random = new Random(); + private static final int port = 8082; + private static final String serverAddressPrefix = "rntbd://localhost:"; + + private volatile AutoCloseable disableNettyLeakDetectionScope; + + @BeforeClass(groups = "unit") + public void beforeClass_DisableNettyLeakDetection() { + this.disableNettyLeakDetectionScope = CosmosNettyLeakDetectorFactory.createDisableLeakDetectionScope(); + } + + @AfterClass(groups = "unit", alwaysRun = true) + public void afterClass_ReactivateNettyLeakDetection() throws Exception { + if (this.disableNettyLeakDetectionScope != null) { + this.disableNettyLeakDetectionScope.close(); + } + } @DataProvider(name = "connectionStateListenerConfigProvider") public Object[][] connectionStateListenerConfigProvider() { @@ -88,82 +98,84 @@ public void connectionStateListener_OnConnectionEvent( boolean isTcpConnectionEndpointRediscoveryEnabled, RequestResponseType responseType, boolean markUnhealthy, - boolean markUnhealthyWhenServerShutdown) throws ExecutionException, InterruptedException, URISyntaxException { - - ConnectionPolicy connectionPolicy = new ConnectionPolicy(DirectConnectionConfig.getDefaultConfig()); - connectionPolicy.setTcpConnectionEndpointRediscoveryEnabled(isTcpConnectionEndpointRediscoveryEnabled); - - GlobalAddressResolver addressResolver = Mockito.mock(GlobalAddressResolver.class); - - SslContext sslContext = SslContextUtils.CreateSslContext("client.jks", false); - - Configs config = Mockito.mock(Configs.class); - Mockito.doReturn(sslContext).when(config).getSslContext(false, false); - - ClientTelemetry clientTelemetry = Mockito.mock(ClientTelemetry.class); - ClientTelemetryInfo clientTelemetryInfo = new ClientTelemetryInfo( - "testMachine", - "testClient", - "testProcess", - "testApp", - ConnectionMode.DIRECT, - "test-cdb-account", - "Test Region 1", - "Linux", - false, - Arrays.asList("Test Region 1", "Test Region 2")); - - Mockito.when(clientTelemetry.getClientTelemetryInfo()).thenReturn(clientTelemetryInfo); - - RntbdTransportClient client = new RntbdTransportClient( - config, - connectionPolicy, - new UserAgentContainer(), - addressResolver, - clientTelemetry, - null); - - RxDocumentServiceRequest req = - RxDocumentServiceRequest.create(mockDiagnosticsClientContext(), OperationType.Create, ResourceType.Document, - "dbs/fakedb/colls/fakeColls", - getDocumentDefinition(), new HashMap<>()); - req.requestContext.regionalRoutingContextToRoute = new RegionalRoutingContext(new URI("https://localhost:8080")); - - req.setPartitionKeyRangeIdentity(new PartitionKeyRangeIdentity("fakeCollectionId","fakePartitionKeyRangeId")); - - // Validate connectionStateListener will always track the latest Uri - List targetUris = new ArrayList<>(); - int serverPort = port + randomPort.getAndIncrement(); - String serverAddress = serverAddressPrefix + serverPort; - - targetUris.add(new Uri(serverAddress)); - targetUris.add(new Uri(serverAddress)); - - for (Uri uri : targetUris) { - // using a random generated server port - TcpServer server = TcpServerFactory.startNewRntbdServer(serverPort); - // Inject fake response - server.injectServerResponse(responseType); - - try { - client.invokeResourceOperationAsync(uri, req).block(); - } catch (Exception e) { - // no op here - } - - if (markUnhealthy) { - assertThat(uri.getHealthStatus()).isEqualTo(Uri.HealthStatus.Unhealthy); - TcpServerFactory.shutdownRntbdServer(server); - assertThat(uri.getHealthStatus()).isEqualTo(Uri.HealthStatus.Unhealthy); - - } else { - assertThat(uri.getHealthStatus()).isEqualTo(Uri.HealthStatus.Connected); + boolean markUnhealthyWhenServerShutdown) throws Exception { + + try (AutoCloseable disableNettyLeakDetectionScope = CosmosNettyLeakDetectorFactory.createDisableLeakDetectionScope()) { + ConnectionPolicy connectionPolicy = new ConnectionPolicy(DirectConnectionConfig.getDefaultConfig()); + connectionPolicy.setTcpConnectionEndpointRediscoveryEnabled(isTcpConnectionEndpointRediscoveryEnabled); + + GlobalAddressResolver addressResolver = Mockito.mock(GlobalAddressResolver.class); + + SslContext sslContext = SslContextUtils.CreateSslContext("client.jks", false); + + Configs config = Mockito.mock(Configs.class); + Mockito.doReturn(sslContext).when(config).getSslContext(false, false); + + ClientTelemetry clientTelemetry = Mockito.mock(ClientTelemetry.class); + ClientTelemetryInfo clientTelemetryInfo = new ClientTelemetryInfo( + "testMachine", + "testClient", + "testProcess", + "testApp", + ConnectionMode.DIRECT, + "test-cdb-account", + "Test Region 1", + "Linux", + false, + Arrays.asList("Test Region 1", "Test Region 2")); + + Mockito.when(clientTelemetry.getClientTelemetryInfo()).thenReturn(clientTelemetryInfo); + + RntbdTransportClient client = new RntbdTransportClient( + config, + connectionPolicy, + new UserAgentContainer(), + addressResolver, + clientTelemetry, + null); + + RxDocumentServiceRequest req = + RxDocumentServiceRequest.create(mockDiagnosticsClientContext(), OperationType.Create, ResourceType.Document, + "dbs/fakedb/colls/fakeColls", + getDocumentDefinition(), new HashMap<>()); + req.requestContext.regionalRoutingContextToRoute = new RegionalRoutingContext(new URI("https://localhost:8080")); + + req.setPartitionKeyRangeIdentity(new PartitionKeyRangeIdentity("fakeCollectionId", "fakePartitionKeyRangeId")); + + // Validate connectionStateListener will always track the latest Uri + List targetUris = new ArrayList<>(); + int serverPort = port + randomPort.getAndIncrement(); + String serverAddress = serverAddressPrefix + serverPort; + + targetUris.add(new Uri(serverAddress)); + targetUris.add(new Uri(serverAddress)); + + for (Uri uri : targetUris) { + // using a random generated server port + TcpServer server = TcpServerFactory.startNewRntbdServer(serverPort); + // Inject fake response + server.injectServerResponse(responseType); + + try { + client.invokeResourceOperationAsync(uri, req).block(); + } catch (Exception e) { + // no op here + } - TcpServerFactory.shutdownRntbdServer(server); - if (markUnhealthyWhenServerShutdown) { + if (markUnhealthy) { assertThat(uri.getHealthStatus()).isEqualTo(Uri.HealthStatus.Unhealthy); + TcpServerFactory.shutdownRntbdServer(server); + assertThat(uri.getHealthStatus()).isEqualTo(Uri.HealthStatus.Unhealthy); + } else { assertThat(uri.getHealthStatus()).isEqualTo(Uri.HealthStatus.Connected); + + TcpServerFactory.shutdownRntbdServer(server); + if (markUnhealthyWhenServerShutdown) { + assertThat(uri.getHealthStatus()).isEqualTo(Uri.HealthStatus.Unhealthy); + } else { + assertThat(uri.getHealthStatus()).isEqualTo(Uri.HealthStatus.Connected); + } } } } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/DCDocumentCrudTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/DCDocumentCrudTest.java index 77d68acb18bd..7e7410836eb5 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/DCDocumentCrudTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/DCDocumentCrudTest.java @@ -5,6 +5,7 @@ import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.DirectConnectionConfig; import com.azure.cosmos.implementation.AsyncDocumentClient.Builder; +import com.azure.cosmos.implementation.QueryFeedOperationState; import com.azure.cosmos.implementation.TestUtils; import com.azure.cosmos.implementation.clienttelemetry.ClientTelemetry; import com.azure.cosmos.models.CosmosClientTelemetryConfig; @@ -228,20 +229,27 @@ public void crossPartitionQuery() { options.setMaxDegreeOfParallelism(-1); ModelBridgeInternal.setQueryRequestOptionsMaxItemCount(options, 100); - Flux> results = client.queryDocuments( - getCollectionLink(), - "SELECT * FROM r", - TestUtils.createDummyQueryFeedOperationState(ResourceType.Document, OperationType.Query, options, client), - Document.class); + QueryFeedOperationState dummyState = + TestUtils.createDummyQueryFeedOperationState(ResourceType.Document, OperationType.Query, options, client); + try { + Flux> results = client.queryDocuments( + getCollectionLink(), + "SELECT * FROM r", + dummyState, + Document.class); - FeedResponseListValidator validator = new FeedResponseListValidator.Builder() + FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(documentList.size()) .exactlyContainsInAnyOrder(documentList.stream().map(Document::getResourceId).collect(Collectors.toList())).build(); - validateQuerySuccess(results, validator, QUERY_TIMEOUT); - validateNoDocumentQueryOperationThroughGateway(); - // validates only the first query for fetching query plan goes to gateway. - assertThat(client.getCapturedRequests().stream().filter(r -> r.getResourceType() == ResourceType.Document)).hasSize(1); + validateQuerySuccess(results, validator, QUERY_TIMEOUT); + validateNoDocumentQueryOperationThroughGateway(); + + // validates only the first query for fetching query plan goes to gateway. + assertThat(client.getCapturedRequests().stream().filter(r -> r.getResourceType() == ResourceType.Document)).hasSize(1); + } finally { + safeClose(dummyState); + } } private void validateNoStoredProcExecutionOperationThroughGateway() { diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/GatewayAddressCacheTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/GatewayAddressCacheTest.java index c92781137a97..8285ea915603 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/GatewayAddressCacheTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/GatewayAddressCacheTest.java @@ -168,7 +168,7 @@ public void getServerAddressesViaGateway(List partitionKeyRangeIds, } } - @Test(groups = { "direct" }, dataProvider = "protocolProvider", timeOut = TIMEOUT) + @Test(groups = { "direct" }, dataProvider = "protocolProvider", timeOut = TIMEOUT, retryAnalyzer = FlakyTestRetryAnalyzer.class) @SuppressWarnings({"unchecked", "rawtypes"}) public void getMasterAddressesViaGatewayAsync(Protocol protocol) throws Exception { Configs configs = ConfigsBuilder.instance().withProtocol(protocol).build(); diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/ReflectionUtils.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/ReflectionUtils.java index cf126f74b3fe..cf1110aec87f 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/ReflectionUtils.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/ReflectionUtils.java @@ -317,6 +317,15 @@ public static void setTransportClient(StoreReader storeReader, TransportClient t set(storeReader, transportClient, "transportClient"); } + public static void setTransportClient(CosmosClient client, TransportClient transportClient) { + StoreClient storeClient = getStoreClient((RxDocumentClientImpl) CosmosBridgeInternal.getAsyncDocumentClient(client)); + set(storeClient, transportClient, "transportClient"); + ReplicatedResourceClient replicatedResClient = getReplicatedResourceClient(storeClient); + ConsistencyWriter writer = getConsistencyWriter(replicatedResClient); + set(replicatedResClient, transportClient, "transportClient"); + set(writer, transportClient, "transportClient"); + } + public static TransportClient getTransportClient(ReplicatedResourceClient replicatedResourceClient) { return get(TransportClient.class, replicatedResourceClient, "transportClient"); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdContextRequestDecoder.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdContextRequestDecoder.java index 4dd92d213297..a9ae3654115a 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdContextRequestDecoder.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdContextRequestDecoder.java @@ -7,6 +7,7 @@ import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.ByteToMessageDecoder; +import io.netty.util.ReferenceCountUtil; import java.util.List; @@ -39,6 +40,7 @@ public void channelRead(final ChannelHandlerContext context, final Object messag return; } } + context.fireChannelRead(message); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdRequestDecoder.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdRequestDecoder.java index d9fdaec12fdf..948a09f88a21 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdRequestDecoder.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/TcpServerMock/rntbd/ServerRntbdRequestDecoder.java @@ -6,6 +6,7 @@ import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.ByteToMessageDecoder; +import io.netty.util.ReferenceCountUtil; import java.util.List; diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestRecordTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestRecordTests.java index 5afe521bcc51..a6f11a5f7c82 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestRecordTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestRecordTests.java @@ -46,21 +46,24 @@ public void expireRecord(OperationType operationType, boolean requestSent, Class new Uri(new URI("http://localhost/replica-path").toString()) ); - RntbdRequestTimer requestTimer = new RntbdRequestTimer(5000, 5000); - RntbdRequestRecord record = new AsyncRntbdRequestRecord(requestArgs, requestTimer); - if (requestSent) { - record.setSendingRequestHasStarted(); - } - record.expire(); - - try{ - record.get(); - fail("RntbdRequestRecord should complete with exception"); - } catch (ExecutionException e) { - Throwable innerException = e.getCause(); - assertThat(innerException).isInstanceOf(exceptionType); - } catch (Exception e) { - fail("Wrong exception"); + try (RntbdRequestTimer requestTimer = + new RntbdRequestTimer(5000, 5000)) { + + RntbdRequestRecord record = new AsyncRntbdRequestRecord(requestArgs, requestTimer); + if (requestSent) { + record.setSendingRequestHasStarted(); + } + record.expire(); + + try { + record.get(); + fail("RntbdRequestRecord should complete with exception"); + } catch (ExecutionException e) { + Throwable innerException = e.getCause(); + assertThat(innerException).isInstanceOf(exceptionType); + } catch (Exception e) { + fail("Wrong exception"); + } } } @@ -72,22 +75,25 @@ public void cancelRecord() throws URISyntaxException, InterruptedException, Json new Uri(new URI("http://localhost/replica-path").toString()) ); - RntbdRequestTimer requestTimer = new RntbdRequestTimer(5000, 5000); - RntbdRequestRecord record = new AsyncRntbdRequestRecord(requestArgs, requestTimer); - Mono result = Mono.fromFuture(record) - .doOnNext(storeResponse -> fail("Record got cancelled should not reach here")) - .doOnError(throwable -> fail("Record got cancelled should not reach here")); + try (RntbdRequestTimer requestTimer = + new RntbdRequestTimer(5000, 5000)) { + + RntbdRequestRecord record = new AsyncRntbdRequestRecord(requestArgs, requestTimer); + Mono result = Mono.fromFuture(record) + .doOnNext(storeResponse -> fail("Record got cancelled should not reach here")) + .doOnError(throwable -> fail("Record got cancelled should not reach here")); - result.cancelOn(Schedulers.boundedElastic()).subscribe().dispose(); + result.cancelOn(Schedulers.boundedElastic()).subscribe().dispose(); - Thread.sleep(100); - assertThat(record.isCancelled()).isTrue(); + Thread.sleep(100); + assertThat(record.isCancelled()).isTrue(); - String jsonString = record.toString(); - String statusString = "{\"done\":true,\"cancelled\":true,\"completedExceptionally\":true,\"error\":{\"type\":\"java.util.concurrent.CancellationException\"}}"; - JsonNode jsonNode = Utils.getSimpleObjectMapper().readTree(jsonString); - JsonNode errorStatus = jsonNode.get("RntbdRequestRecord").get("status"); - assertThat(errorStatus).isNotNull(); - assertThat(errorStatus.toString()).isEqualTo(statusString); + String jsonString = record.toString(); + String statusString = "{\"done\":true,\"cancelled\":true,\"completedExceptionally\":true,\"error\":{\"type\":\"java.util.concurrent.CancellationException\"}}"; + JsonNode jsonNode = Utils.getSimpleObjectMapper().readTree(jsonString); + JsonNode errorStatus = jsonNode.get("RntbdRequestRecord").get("status"); + assertThat(errorStatus).isNotNull(); + assertThat(errorStatus.toString()).isEqualTo(statusString); + } } } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdTokenTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdTokenTests.java index 6de130598613..f417bec3061b 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdTokenTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdTokenTests.java @@ -15,50 +15,63 @@ public class RntbdTokenTests { private static final Random rnd = new Random(); @Test(groups = { "unit" }) public void getValueIsIdempotent() { - RntbdToken token = RntbdToken.create(RntbdConstants.RntbdRequestHeader.EffectivePartitionKey); - byte[] blob = new byte[10]; - rnd.nextBytes(blob); - token.setValue(blob); + ByteBuf buffer = null; + ByteBuf byteBufValue1 = null; - String expectedJson = "{\"id\":90,\"name\":\"EffectivePartitionKey\",\"present\":true," - + "\"required\":false,\"value\":\"" - + Base64.getEncoder().encodeToString(blob) - + "\",\"tokenType\":\"Bytes\"}"; - assertThat(RntbdObjectMapper.toJson(token)).isEqualTo(expectedJson); + try { + RntbdToken token = RntbdToken.create(RntbdConstants.RntbdRequestHeader.EffectivePartitionKey); + byte[] blob = new byte[10]; + rnd.nextBytes(blob); + token.setValue(blob); - Object value1 = token.getValue(); - Object value2 = token.getValue(); - assertThat(value1).isSameAs(value2); - assertThat(value1).isSameAs(blob); + String expectedJson = "{\"id\":90,\"name\":\"EffectivePartitionKey\",\"present\":true," + + "\"required\":false,\"value\":\"" + + Base64.getEncoder().encodeToString(blob) + + "\",\"tokenType\":\"Bytes\"}"; + assertThat(RntbdObjectMapper.toJson(token)).isEqualTo(expectedJson); - assertThat(RntbdObjectMapper.toJson(token)).isEqualTo(expectedJson); + Object value1 = token.getValue(); + Object value2 = token.getValue(); + assertThat(value1).isSameAs(value2); + assertThat(value1).isSameAs(blob); - ByteBuf buffer = Unpooled.buffer(1024); - token.encode(buffer); + assertThat(RntbdObjectMapper.toJson(token)).isEqualTo(expectedJson); + buffer = Unpooled.buffer(1024); + token.encode(buffer); - RntbdToken decodedToken = RntbdToken.create(RntbdConstants.RntbdRequestHeader.EffectivePartitionKey); - // skipping 3 bytes (2 bytes for header id + 1 byte for token type) - buffer.readerIndex(3); - // when decoding the RntbdToken.value is a ByteBuffer - not a byte[] - testing this path for idempotency as well - decodedToken.decode(buffer); - assertThat(RntbdObjectMapper.toJson(decodedToken)).isEqualTo(expectedJson); + RntbdToken decodedToken = RntbdToken.create(RntbdConstants.RntbdRequestHeader.EffectivePartitionKey); + // skipping 3 bytes (2 bytes for header id + 1 byte for token type) + buffer.readerIndex(3); + // when decoding the RntbdToken.value is a ByteBuffer - not a byte[] - testing this path for idempotency as well + decodedToken.decode(buffer); + assertThat(RntbdObjectMapper.toJson(decodedToken)).isEqualTo(expectedJson); - value1 = decodedToken.getValue(); - assertThat(value1).isInstanceOf(ByteBuf.class); - ByteBuf byteBufValue1 = (ByteBuf)value1; - assertThat(byteBufValue1.readableBytes()).isEqualTo(10); - byte[] byteArray1 = new byte[10]; - byteBufValue1.getBytes(byteBufValue1.readerIndex(), byteArray1); - assertThat(byteArray1).isEqualTo(blob); + value1 = decodedToken.getValue(); + assertThat(value1).isInstanceOf(ByteBuf.class); - value2 = decodedToken.getValue(); - assertThat(value1).isSameAs(value2); - ByteBuf byteBufValue2 = (ByteBuf)value2; - assertThat(byteBufValue2.readableBytes()).isEqualTo(10); - byte[] byteArray2 = new byte[10]; - byteBufValue2.getBytes(byteBufValue2.readerIndex(), byteArray2); - assertThat(byteArray2).isEqualTo(blob); + byteBufValue1 = (ByteBuf) value1; + assertThat(byteBufValue1.readableBytes()).isEqualTo(10); + byte[] byteArray1 = new byte[10]; + byteBufValue1.getBytes(byteBufValue1.readerIndex(), byteArray1); + assertThat(byteArray1).isEqualTo(blob); - assertThat(RntbdObjectMapper.toJson(decodedToken)).isEqualTo(expectedJson); + value2 = decodedToken.getValue(); + assertThat(value1).isSameAs(value2); + ByteBuf byteBufValue2 = (ByteBuf) value2; + assertThat(byteBufValue2.readableBytes()).isEqualTo(10); + byte[] byteArray2 = new byte[10]; + byteBufValue2.getBytes(byteBufValue2.readerIndex(), byteArray2); + assertThat(byteArray2).isEqualTo(blob); + + assertThat(RntbdObjectMapper.toJson(decodedToken)).isEqualTo(expectedJson); + } finally { + if (buffer != null) { + buffer.release(); + } + + if (byteBufValue1 != null) { + byteBufValue1.release(); + } + } } } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/http/ReactorNettyHttpClientTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/http/ReactorNettyHttpClientTest.java index 74a00185967a..88b85abbdf68 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/http/ReactorNettyHttpClientTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/http/ReactorNettyHttpClientTest.java @@ -4,6 +4,8 @@ package com.azure.cosmos.implementation.http; +import com.azure.cosmos.CosmosNettyLeakDetectorFactory; +import com.azure.cosmos.TestNGLogListener; import com.azure.cosmos.implementation.Configs; import com.azure.cosmos.implementation.LifeCycleUtils; import com.azure.cosmos.implementation.directconnectivity.ReflectionUtils; @@ -12,6 +14,7 @@ import org.slf4j.LoggerFactory; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; +import org.testng.annotations.Listeners; import org.testng.annotations.Test; import java.time.Duration; @@ -26,15 +29,21 @@ public class ReactorNettyHttpClientTest { private static final Logger logger = LoggerFactory.getLogger(ReactorNettyHttpClientTest.class); private HttpClient reactorNettyHttpClient; + private volatile AutoCloseable disableNettyLeakDetectionScope; @BeforeClass(groups = "unit") public void before_ReactorNettyHttpClientTest() { this.reactorNettyHttpClient = HttpClient.createFixed(new HttpClientConfig(new Configs())); + this.disableNettyLeakDetectionScope = CosmosNettyLeakDetectorFactory.createDisableLeakDetectionScope(); } - @AfterClass(groups = "unit") - public void after_ReactorNettyHttpClientTest() { + @AfterClass(groups = "unit", alwaysRun = true) + public void after_ReactorNettyHttpClientTest() throws Exception { + LifeCycleUtils.closeQuietly(reactorNettyHttpClient); + if (this.disableNettyLeakDetectionScope != null) { + this.disableNettyLeakDetectionScope.close(); + } } @Test(groups = "unit") diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/BackPressureTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/BackPressureTest.java index abee1236ba68..1a3c89736e8c 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/BackPressureTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/BackPressureTest.java @@ -251,6 +251,7 @@ public void queryItems() throws Exception { public void before_BackPressureTest() throws Exception { CosmosContainerRequestOptions options = new CosmosContainerRequestOptions(); + client = new ClientUnderTestBuilder( getClientBuilder() .key(TestConfigurations.MASTER_KEY) @@ -269,25 +270,29 @@ public void before_BackPressureTest() throws Exception { rxClient ); - // increase throughput to max for a single partition collection to avoid throttling - // for bulk insert and later queries. - Offer offer = rxClient.queryOffers( + try { + // increase throughput to max for a single partition collection to avoid throttling + // for bulk insert and later queries. + Offer offer = rxClient.queryOffers( String.format("SELECT * FROM r WHERE r.offerResourceId = '%s'", createdCollection.read().block().getProperties().getResourceId()) - , state).take(1).map(FeedResponse::getResults).single().block().get(0); - offer.setThroughput(6000); - offer = rxClient.replaceOffer(offer).block().getResource(); - assertThat(offer.getThroughput()).isEqualTo(6000); - - ArrayList docDefList = new ArrayList<>(); - for(int i = 0; i < 1000; i++) { - docDefList.add(getDocumentDefinition(i)); - } + , state).take(1).map(FeedResponse::getResults).single().block().get(0); + offer.setThroughput(6000); + offer = rxClient.replaceOffer(offer).block().getResource(); + assertThat(offer.getThroughput()).isEqualTo(6000); + + ArrayList docDefList = new ArrayList<>(); + for (int i = 0; i < 1000; i++) { + docDefList.add(getDocumentDefinition(i)); + } - createdDocuments = bulkInsertBlocking(createdCollection, docDefList); + createdDocuments = bulkInsertBlocking(createdCollection, docDefList); - waitIfNeededForReplicasToCatchUp(getClientBuilder()); - warmUp(); + waitIfNeededForReplicasToCatchUp(getClientBuilder()); + warmUp(); + } finally { + safeClose(state); + } } private void warmUp() { diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ClientRetryPolicyE2ETests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ClientRetryPolicyE2ETests.java index 8d4e7fe2570b..446ee82008b8 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ClientRetryPolicyE2ETests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ClientRetryPolicyE2ETests.java @@ -57,7 +57,6 @@ import reactor.core.publisher.Mono; import java.time.Duration; -import java.time.Instant; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -68,7 +67,6 @@ import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; import java.util.stream.Collectors; @@ -154,46 +152,49 @@ public ClientRetryPolicyE2ETests(CosmosClientBuilder clientBuilder) { @BeforeClass(groups = {"multi-master", "fast", "fi-multi-master", "multi-region"}, timeOut = TIMEOUT) public void beforeClass() { - CosmosAsyncClient dummy = getClientBuilder().buildAsyncClient(); - AsyncDocumentClient asyncDocumentClient = BridgeInternal.getContextClient(dummy); - GlobalEndpointManager globalEndpointManager = asyncDocumentClient.getGlobalEndpointManager(); + try(CosmosAsyncClient dummy = getClientBuilder().buildAsyncClient()) { + AsyncDocumentClient asyncDocumentClient = BridgeInternal.getContextClient(dummy); + GlobalEndpointManager globalEndpointManager = asyncDocumentClient.getGlobalEndpointManager(); - DatabaseAccount databaseAccount = globalEndpointManager.getLatestDatabaseAccount(); + DatabaseAccount databaseAccount = globalEndpointManager.getLatestDatabaseAccount(); - AccountLevelLocationContext accountLevelReadableLocationContext - = getAccountLevelLocationContext(databaseAccount, false); + AccountLevelLocationContext accountLevelReadableLocationContext + = getAccountLevelLocationContext(databaseAccount, false); - AccountLevelLocationContext accountLevelWriteableLocationContext - = getAccountLevelLocationContext(databaseAccount, true); + AccountLevelLocationContext accountLevelWriteableLocationContext + = getAccountLevelLocationContext(databaseAccount, true); - validate(accountLevelReadableLocationContext, false); - validate(accountLevelWriteableLocationContext, true); + validate(accountLevelReadableLocationContext, false); + validate(accountLevelWriteableLocationContext, true); - this.preferredRegions = accountLevelReadableLocationContext.serviceOrderedReadableRegions + this.preferredRegions = accountLevelReadableLocationContext.serviceOrderedReadableRegions .stream() .map(regionName -> regionName.toLowerCase(Locale.ROOT)) .collect(Collectors.toList()); - this.serviceOrderedReadableRegions = this.preferredRegions; + this.serviceOrderedReadableRegions = this.preferredRegions; - this.serviceOrderedWriteableRegions = accountLevelWriteableLocationContext.serviceOrderedWriteableRegions - .stream() - .map(regionName -> regionName.toLowerCase(Locale.ROOT)) - .collect(Collectors.toList()); + this.serviceOrderedWriteableRegions = accountLevelWriteableLocationContext.serviceOrderedWriteableRegions + .stream() + .map(regionName -> regionName.toLowerCase(Locale.ROOT)) + .collect(Collectors.toList()); - this.clientWithPreferredRegions = getClientBuilder() - .preferredRegions(this.preferredRegions) - .endpointDiscoveryEnabled(true) - .multipleWriteRegionsEnabled(true) - .buildAsyncClient(); + this.clientWithPreferredRegions = getClientBuilder() + .preferredRegions(this.preferredRegions) + .endpointDiscoveryEnabled(true) + .multipleWriteRegionsEnabled(true) + .buildAsyncClient(); - this.clientWithoutPreferredRegions = getClientBuilder() - .endpointDiscoveryEnabled(true) - .multipleWriteRegionsEnabled(true) - .buildAsyncClient(); + this.clientWithoutPreferredRegions = getClientBuilder() + .endpointDiscoveryEnabled(true) + .multipleWriteRegionsEnabled(true) + .buildAsyncClient(); + } - this.cosmosAsyncContainerFromClientWithPreferredRegions = getSharedMultiPartitionCosmosContainerWithIdAsPartitionKey(clientWithPreferredRegions); - this.cosmosAsyncContainerFromClientWithoutPreferredRegions = getSharedMultiPartitionCosmosContainerWithIdAsPartitionKey(clientWithoutPreferredRegions); + this.cosmosAsyncContainerFromClientWithPreferredRegions = + getSharedMultiPartitionCosmosContainerWithIdAsPartitionKey(clientWithPreferredRegions); + this.cosmosAsyncContainerFromClientWithoutPreferredRegions = + getSharedMultiPartitionCosmosContainerWithIdAsPartitionKey(clientWithoutPreferredRegions); } @AfterClass(groups = {"multi-master", "fast", "fi-multi-master", "multi-region"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) @@ -550,52 +551,49 @@ public void dataPlaneRequestHitsLeaseNotFoundInFirstPreferredRegion( .hitLimit(hitLimit) .build(); - CosmosAsyncClient testClient = getClientBuilder() + try (CosmosAsyncClient testClient = getClientBuilder() .preferredRegions(shouldUsePreferredRegionsOnClient ? this.preferredRegions : Collections.emptyList()) .directMode() // required to force a quorum read irrespective of account consistency level .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) - .buildAsyncClient(); + .buildAsyncClient()) { - CosmosAsyncContainer testContainer = getSharedSinglePartitionCosmosContainer(testClient); + CosmosAsyncContainer testContainer = getSharedSinglePartitionCosmosContainer(testClient); - try { + try { - testContainer.createItem(createdItem).block(); + testContainer.createItem(createdItem).block(); - CosmosFaultInjectionHelper.configureFaultInjectionRules(testContainer, Arrays.asList(leaseNotFoundFaultRule)).block(); + CosmosFaultInjectionHelper.configureFaultInjectionRules(testContainer, Arrays.asList(leaseNotFoundFaultRule)).block(); - CosmosDiagnostics cosmosDiagnostics - = this.performDocumentOperation(testContainer, operationType, createdItem, testItem -> new PartitionKey(testItem.getMypk()), isReadMany) - .block(); + CosmosDiagnostics cosmosDiagnostics + = this.performDocumentOperation(testContainer, operationType, createdItem, testItem -> new PartitionKey(testItem.getMypk()), isReadMany) + .block(); - if (shouldRetryCrossRegion) { - assertThat(cosmosDiagnostics).isNotNull(); - assertThat(cosmosDiagnostics.getDiagnosticsContext()).isNotNull(); + if (shouldRetryCrossRegion) { + assertThat(cosmosDiagnostics).isNotNull(); + assertThat(cosmosDiagnostics.getDiagnosticsContext()).isNotNull(); - CosmosDiagnosticsContext diagnosticsContext = cosmosDiagnostics.getDiagnosticsContext(); + CosmosDiagnosticsContext diagnosticsContext = cosmosDiagnostics.getDiagnosticsContext(); - assertThat(diagnosticsContext.getContactedRegionNames().size()).isEqualTo(2); - assertThat(diagnosticsContext.getStatusCode()).isLessThan(HttpConstants.StatusCodes.BADREQUEST); - assertThat(diagnosticsContext.getDuration()).isLessThan(Duration.ofSeconds(5)); - } else { - assertThat(cosmosDiagnostics).isNotNull(); - assertThat(cosmosDiagnostics.getDiagnosticsContext()).isNotNull(); + assertThat(diagnosticsContext.getContactedRegionNames().size()).isEqualTo(2); + assertThat(diagnosticsContext.getStatusCode()).isLessThan(HttpConstants.StatusCodes.BADREQUEST); + assertThat(diagnosticsContext.getDuration()).isLessThan(Duration.ofSeconds(5)); + } else { + assertThat(cosmosDiagnostics).isNotNull(); + assertThat(cosmosDiagnostics.getDiagnosticsContext()).isNotNull(); - CosmosDiagnosticsContext diagnosticsContext = cosmosDiagnostics.getDiagnosticsContext(); + CosmosDiagnosticsContext diagnosticsContext = cosmosDiagnostics.getDiagnosticsContext(); - assertThat(diagnosticsContext.getContactedRegionNames().size()).isEqualTo(1); - assertThat(diagnosticsContext.getStatusCode()).isEqualTo(HttpConstants.StatusCodes.SERVICE_UNAVAILABLE); - assertThat(diagnosticsContext.getSubStatusCode()).isEqualTo(HttpConstants.SubStatusCodes.LEASE_NOT_FOUND); - assertThat(diagnosticsContext.getDuration()).isLessThan(Duration.ofSeconds(5)); - } - - } finally { - leaseNotFoundFaultRule.disable(); + assertThat(diagnosticsContext.getContactedRegionNames().size()).isEqualTo(1); + assertThat(diagnosticsContext.getStatusCode()).isEqualTo(HttpConstants.StatusCodes.SERVICE_UNAVAILABLE); + assertThat(diagnosticsContext.getSubStatusCode()).isEqualTo(HttpConstants.SubStatusCodes.LEASE_NOT_FOUND); + assertThat(diagnosticsContext.getDuration()).isLessThan(Duration.ofSeconds(5)); + } - if (testClient != null) { + } finally { + leaseNotFoundFaultRule.disable(); cleanUpContainer(testContainer); - testClient.close(); } } } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ClientRetryPolicyE2ETestsWithGatewayV2.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ClientRetryPolicyE2ETestsWithGatewayV2.java index 6c8f80e66a75..66d9621cbc1f 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ClientRetryPolicyE2ETestsWithGatewayV2.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ClientRetryPolicyE2ETestsWithGatewayV2.java @@ -81,11 +81,14 @@ public ClientRetryPolicyE2ETestsWithGatewayV2(CosmosClientBuilder clientBuilder) @BeforeClass(groups = {"fi-thinclient-multi-region", "fi-thinclient-multi-master"}, timeOut = TIMEOUT) public void beforeClass() { - CosmosAsyncClient dummy = getClientBuilder().buildAsyncClient(); - AsyncDocumentClient asyncDocumentClient = BridgeInternal.getContextClient(dummy); - GlobalEndpointManager globalEndpointManager = asyncDocumentClient.getGlobalEndpointManager(); + DatabaseAccount databaseAccount; - DatabaseAccount databaseAccount = globalEndpointManager.getLatestDatabaseAccount(); + try (CosmosAsyncClient dummy = getClientBuilder().buildAsyncClient()) { + AsyncDocumentClient asyncDocumentClient = BridgeInternal.getContextClient(dummy); + GlobalEndpointManager globalEndpointManager = asyncDocumentClient.getGlobalEndpointManager(); + + databaseAccount = globalEndpointManager.getLatestDatabaseAccount(); + } this.accountLevelReadableLocationContext = getAccountLevelLocationContext(databaseAccount, false); diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/MultiOrderByQueryTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/MultiOrderByQueryTests.java index c6e232ec7b84..a5e9e832aa1c 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/MultiOrderByQueryTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/MultiOrderByQueryTests.java @@ -16,8 +16,8 @@ import com.azure.cosmos.util.CosmosPagedFlux; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.collections4.ComparatorUtils; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Factory; import org.testng.annotations.Test; @@ -110,17 +110,19 @@ public MultiOrderByQueryTests(CosmosClientBuilder clientBuilder) { super(clientBuilder); } - @AfterClass(groups = { "query" }, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) + @AfterMethod(groups = { "query" }, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) public void afterClass() { safeClose(client); } - @BeforeClass(groups = { "query" }, timeOut = SETUP_TIMEOUT) + @BeforeMethod(groups = { "query" }, timeOut = SETUP_TIMEOUT) public void before_MultiOrderByQueryTests() throws Exception { + documents = new ArrayList<>(); client = getClientBuilder().buildAsyncClient(); documentCollection = getSharedMultiPartitionCosmosContainerWithCompositeAndSpatialIndexes(client); truncateCollection(documentCollection); + expectCount(documentCollection, 0); int numberOfDocuments = 4; Random random = new Random(); @@ -160,6 +162,7 @@ public void before_MultiOrderByQueryTests() throws Exception { } voidBulkInsertBlocking(documentCollection, documents); + expectCount(documentCollection, documents.size()); waitIfNeededForReplicasToCatchUp(getClientBuilder()); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/OfferQueryTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/OfferQueryTest.java index d0e79d6d3f28..a8743a1f6b9c 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/OfferQueryTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/OfferQueryTest.java @@ -62,29 +62,40 @@ public void queryOffersWithFilter() throws Exception { CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); ModelBridgeInternal.setQueryRequestOptionsMaxItemCount(options, 2); - Flux> queryObservable = client.queryOffers( - query, - TestUtils.createDummyQueryFeedOperationState(ResourceType.Offer, OperationType.Query, options, client)); - List allOffers = client - .readOffers(TestUtils.createDummyQueryFeedOperationState(ResourceType.Offer, OperationType.ReadFeed, options, client)) - .flatMap(f -> Flux.fromIterable(f.getResults())).collectList().single().block(); - List expectedOffers = allOffers.stream().filter(o -> collectionResourceId.equals(o.getString("offerResourceId"))).collect(Collectors.toList()); + QueryFeedOperationState queryDummyState = TestUtils + .createDummyQueryFeedOperationState(ResourceType.Offer, OperationType.Query, options, client); + QueryFeedOperationState offerDummyState = TestUtils + .createDummyQueryFeedOperationState(ResourceType.Offer, OperationType.ReadFeed, options, client); - assertThat(expectedOffers).isNotEmpty(); + try { + Flux> queryObservable = client.queryOffers( + query, + queryDummyState); - Integer maxItemCount = ModelBridgeInternal.getMaxItemCountFromQueryRequestOptions(options); - int expectedPageSize = (expectedOffers.size() + maxItemCount - 1) / maxItemCount; + List allOffers = client + .readOffers(offerDummyState) + .flatMap(f -> Flux.fromIterable(f.getResults())).collectList().single().block(); + List expectedOffers = allOffers.stream().filter(o -> collectionResourceId.equals(o.getString("offerResourceId"))).collect(Collectors.toList()); - FeedResponseListValidator validator = new FeedResponseListValidator.Builder() + assertThat(expectedOffers).isNotEmpty(); + + Integer maxItemCount = ModelBridgeInternal.getMaxItemCountFromQueryRequestOptions(options); + int expectedPageSize = (expectedOffers.size() + maxItemCount - 1) / maxItemCount; + + FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedOffers.size()) .exactlyContainsInAnyOrder(expectedOffers.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() - .requestChargeGreaterThanOrEqualTo(1.0).build()) + .requestChargeGreaterThanOrEqualTo(1.0).build()) .build(); - validateQuerySuccess(queryObservable, validator, 10000); + validateQuerySuccess(queryObservable, validator, 10000); + } finally { + safeClose(queryDummyState); + safeClose(offerDummyState); + } } @Test(groups = { "query" }, timeOut = TIMEOUT * 10) @@ -97,32 +108,44 @@ public void queryOffersFilterMorePages() throws Exception { CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); ModelBridgeInternal.setQueryRequestOptionsMaxItemCount(options, 1); - Flux> queryObservable = client.queryOffers( - query, - TestUtils.createDummyQueryFeedOperationState(ResourceType.Offer, OperationType.Query, options, client)); + QueryFeedOperationState queryDummyState = TestUtils + .createDummyQueryFeedOperationState(ResourceType.Offer, OperationType.Query, options, client); + + QueryFeedOperationState offerDummyState = TestUtils + .createDummyQueryFeedOperationState(ResourceType.Offer, OperationType.ReadFeed, new CosmosQueryRequestOptions(), client); + + try { - List expectedOffers = client - .readOffers(TestUtils.createDummyQueryFeedOperationState(ResourceType.Offer, OperationType.ReadFeed, new CosmosQueryRequestOptions(), client)) + Flux> queryObservable = client.queryOffers( + query, + queryDummyState); + + List expectedOffers = client + .readOffers(offerDummyState) .flatMap(f -> Flux.fromIterable(f.getResults())) .collectList() .single().block() .stream().filter(o -> collectionResourceIds.contains(o.getOfferResourceId())) .collect(Collectors.toList()); - assertThat(expectedOffers).hasSize(createdCollections.size()); + assertThat(expectedOffers).hasSize(createdCollections.size()); - Integer maxItemCount = ModelBridgeInternal.getMaxItemCountFromQueryRequestOptions(options); - int expectedPageSize = (expectedOffers.size() + maxItemCount- 1) / maxItemCount; + Integer maxItemCount = ModelBridgeInternal.getMaxItemCountFromQueryRequestOptions(options); + int expectedPageSize = (expectedOffers.size() + maxItemCount - 1) / maxItemCount; - FeedResponseListValidator validator = new FeedResponseListValidator.Builder() + FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(expectedOffers.size()) .exactlyContainsInAnyOrder(expectedOffers.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() - .requestChargeGreaterThanOrEqualTo(1.0).build()) + .requestChargeGreaterThanOrEqualTo(1.0).build()) .build(); - validateQuerySuccess(queryObservable, validator, 10000); + validateQuerySuccess(queryObservable, validator, 10000); + } finally { + safeClose(queryDummyState); + safeClose(offerDummyState); + } } @Test(groups = { "query" }, timeOut = TIMEOUT) @@ -130,30 +153,37 @@ public void queryCollections_NoResults() throws Exception { String query = "SELECT * from root r where r.id = '2'"; CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); - CosmosAsyncClient cosmosClient = new CosmosClientBuilder() + try (CosmosAsyncClient cosmosClient = new CosmosClientBuilder() .key(TestConfigurations.MASTER_KEY) .endpoint(TestConfigurations.HOST) - .buildAsyncClient(); - QueryFeedOperationState dummyState = new QueryFeedOperationState( - cosmosClient, - "SomeSpanName", - "SomeDBName", - "SomeContainerName", - ResourceType.Document, - OperationType.Query, - null, - options, - new CosmosPagedFluxOptions() - ); - Flux> queryObservable = client.queryCollections(getDatabaseLink(), query, dummyState); - - FeedResponseListValidator validator = new FeedResponseListValidator.Builder() - .containsExactly(new ArrayList<>()) - .numberOfPages(1) - .pageSatisfy(0, new FeedResponseValidator.Builder() + .buildAsyncClient()) { + + QueryFeedOperationState dummyState = new QueryFeedOperationState( + cosmosClient, + "SomeSpanName", + "SomeDBName", + "SomeContainerName", + ResourceType.Document, + OperationType.Query, + null, + options, + new CosmosPagedFluxOptions() + ); + + try { + Flux> queryObservable = client.queryCollections(getDatabaseLink(), query, dummyState); + + FeedResponseListValidator validator = new FeedResponseListValidator.Builder() + .containsExactly(new ArrayList<>()) + .numberOfPages(1) + .pageSatisfy(0, new FeedResponseValidator.Builder() .requestChargeGreaterThanOrEqualTo(1.0).build()) - .build(); - validateQuerySuccess(queryObservable, validator); + .build(); + validateQuerySuccess(queryObservable, validator); + } finally { + safeClose(dummyState); + } + } } @BeforeClass(groups = { "query" }, timeOut = SETUP_TIMEOUT) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/OfferReadReplaceTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/OfferReadReplaceTest.java index 6d6064d48b0a..ed4f1a523e71 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/OfferReadReplaceTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/OfferReadReplaceTest.java @@ -3,6 +3,7 @@ package com.azure.cosmos.rx; import com.azure.cosmos.implementation.OperationType; +import com.azure.cosmos.implementation.QueryFeedOperationState; import com.azure.cosmos.implementation.ResourceType; import com.azure.cosmos.implementation.TestUtils; import com.azure.cosmos.models.CosmosQueryRequestOptions; @@ -42,48 +43,53 @@ public OfferReadReplaceTest(AsyncDocumentClient.Builder clientBuilder) { @Test(groups = { "emulator" }, timeOut = TIMEOUT) public void readAndReplaceOffer() { - List offers = client - .readOffers( - TestUtils.createDummyQueryFeedOperationState( - ResourceType.Offer, - OperationType.ReadFeed, - new CosmosQueryRequestOptions(), - client)) - .map(FeedResponse::getResults) - .flatMap(list -> Flux.fromIterable(list)).collectList().block(); - - int i; - for (i = 0; i < offers.size(); i++) { - if (offers.get(i).getOfferResourceId().equals(createdCollection.getResourceId())) { - break; + QueryFeedOperationState offerDummyState = TestUtils.createDummyQueryFeedOperationState( + ResourceType.Offer, + OperationType.ReadFeed, + new CosmosQueryRequestOptions(), + client); + + try { + List offers = client + .readOffers(offerDummyState) + .map(FeedResponse::getResults) + .flatMap(list -> Flux.fromIterable(list)).collectList().block(); + + int i; + for (i = 0; i < offers.size(); i++) { + if (offers.get(i).getOfferResourceId().equals(createdCollection.getResourceId())) { + break; + } } - } - Offer rOffer = client.readOffer(offers.get(i).getSelfLink()).single().block().getResource(); - int oldThroughput = rOffer.getThroughput(); + Offer rOffer = client.readOffer(offers.get(i).getSelfLink()).single().block().getResource(); + int oldThroughput = rOffer.getThroughput(); - Mono> readObservable = client.readOffer(offers.get(i).getSelfLink()); + Mono> readObservable = client.readOffer(offers.get(i).getSelfLink()); - // validate offer read - ResourceResponseValidator validatorForRead = new ResourceResponseValidator.Builder() - .withOfferThroughput(oldThroughput) - .notNullEtag() - .build(); + // validate offer read + ResourceResponseValidator validatorForRead = new ResourceResponseValidator.Builder() + .withOfferThroughput(oldThroughput) + .notNullEtag() + .build(); - validateSuccess(readObservable, validatorForRead); + validateSuccess(readObservable, validatorForRead); - // update offer - int newThroughput = oldThroughput + 100; - offers.get(i).setThroughput(newThroughput); - Mono> replaceObservable = client.replaceOffer(offers.get(i)); + // update offer + int newThroughput = oldThroughput + 100; + offers.get(i).setThroughput(newThroughput); + Mono> replaceObservable = client.replaceOffer(offers.get(i)); - // validate offer replace - ResourceResponseValidator validatorForReplace = new ResourceResponseValidator.Builder() - .withOfferThroughput(newThroughput) - .notNullEtag() - .build(); + // validate offer replace + ResourceResponseValidator validatorForReplace = new ResourceResponseValidator.Builder() + .withOfferThroughput(newThroughput) + .notNullEtag() + .build(); - validateSuccess(replaceObservable, validatorForReplace); + validateSuccess(replaceObservable, validatorForReplace); + } finally { + safeClose(offerDummyState); + } } @BeforeClass(groups = { "emulator" }, timeOut = SETUP_TIMEOUT) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/OrderbyDocumentQueryTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/OrderbyDocumentQueryTest.java index b4df631aed8b..e210696bad82 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/OrderbyDocumentQueryTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/OrderbyDocumentQueryTest.java @@ -10,6 +10,7 @@ import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.CosmosException; import com.azure.cosmos.CosmosItemSerializerNoExceptionWrapping; +import com.azure.cosmos.CosmosNettyLeakDetectorFactory; import com.azure.cosmos.implementation.AsyncDocumentClient; import com.azure.cosmos.implementation.FeedResponseDiagnostics; import com.azure.cosmos.implementation.FeedResponseListValidator; @@ -41,6 +42,7 @@ import io.reactivex.subscribers.TestSubscriber; import org.apache.commons.lang3.StringUtils; import org.testng.annotations.AfterClass; +import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; @@ -658,7 +660,12 @@ public List bulkInsert(CosmosAsyncContainer cosmosContainer, @BeforeMethod(groups = { "query" }) public void beforeMethod() throws Exception { // add a cool off time - TimeUnit.SECONDS.sleep(10); + CosmosNettyLeakDetectorFactory.resetIdentifiedLeaks(); + } + + @AfterMethod(groups = { "query" }, alwaysRun = true) + public void afterMethod() throws Exception { + logger.info("captureNettyLeaks: {}", captureNettyLeaks()); } @BeforeClass(groups = { "query" }, timeOut = 4 * SETUP_TIMEOUT) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadFeedOffersTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadFeedOffersTest.java index aff4b8d6d536..69e4bb9f4a1a 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadFeedOffersTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadFeedOffersTest.java @@ -4,6 +4,7 @@ import com.azure.cosmos.CosmosAsyncClient; import com.azure.cosmos.CosmosClientBuilder; +import com.azure.cosmos.FlakyTestRetryAnalyzer; import com.azure.cosmos.implementation.CosmosPagedFluxOptions; import com.azure.cosmos.implementation.OperationType; import com.azure.cosmos.implementation.QueryFeedOperationState; @@ -53,41 +54,42 @@ public ReadFeedOffersTest(AsyncDocumentClient.Builder clientBuilder) { super(clientBuilder); } - @Test(groups = { "query" }, timeOut = FEED_TIMEOUT) + @Test(groups = { "query" }, timeOut = FEED_TIMEOUT, retryAnalyzer = FlakyTestRetryAnalyzer.class) public void readOffers() throws Exception { CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); ModelBridgeInternal.setQueryRequestOptionsMaxItemCount(options, 2); - CosmosAsyncClient cosmosClient = new CosmosClientBuilder() + try (CosmosAsyncClient cosmosClient = new CosmosClientBuilder() .key(TestConfigurations.MASTER_KEY) .endpoint(TestConfigurations.HOST) - .buildAsyncClient(); - QueryFeedOperationState dummyState = new QueryFeedOperationState( - cosmosClient, - "SomeSpanName", - "SomeDBName", - "SomeContainerName", - ResourceType.Document, - OperationType.Query, - null, - options, - new CosmosPagedFluxOptions() - ); - - Flux> feedObservable = client.readOffers(dummyState); - - int maxItemCount = ModelBridgeInternal.getMaxItemCountFromQueryRequestOptions(options); - int expectedPageSize = (allOffers.size() + maxItemCount - 1) / maxItemCount; - - FeedResponseListValidator validator = new FeedResponseListValidator.Builder() + .buildAsyncClient()) { + QueryFeedOperationState dummyState = new QueryFeedOperationState( + cosmosClient, + "SomeSpanName", + "SomeDBName", + "SomeContainerName", + ResourceType.Document, + OperationType.Query, + null, + options, + new CosmosPagedFluxOptions() + ); + + Flux> feedObservable = client.readOffers(dummyState); + + int maxItemCount = ModelBridgeInternal.getMaxItemCountFromQueryRequestOptions(options); + int expectedPageSize = (allOffers.size() + maxItemCount - 1) / maxItemCount; + + FeedResponseListValidator validator = new FeedResponseListValidator.Builder() .totalSize(allOffers.size()) .exactlyContainsInAnyOrder(allOffers.stream().map(d -> d.getResourceId()).collect(Collectors.toList())) .numberOfPages(expectedPageSize) .pageSatisfy(0, new FeedResponseValidator.Builder() - .requestChargeGreaterThanOrEqualTo(1.0).build()) + .requestChargeGreaterThanOrEqualTo(1.0).build()) .build(); - validateQuerySuccess(feedObservable, validator, FEED_TIMEOUT); + validateQuerySuccess(feedObservable, validator, FEED_TIMEOUT); + } } @BeforeClass(groups = { "query" }, timeOut = SETUP_TIMEOUT) @@ -99,19 +101,23 @@ public void before_ReadFeedOffersTest() { createCollections(client); } - allOffers = client.readOffers( - TestUtils.createDummyQueryFeedOperationState( - ResourceType.Offer, - OperationType.ReadFeed, - new CosmosQueryRequestOptions(), - client - ) - ) - .map(FeedResponse::getResults) - .collectList() - .map(list -> list.stream().flatMap(Collection::stream).collect(Collectors.toList())) - .single() - .block(); + QueryFeedOperationState offerDummyState = TestUtils.createDummyQueryFeedOperationState( + ResourceType.Offer, + OperationType.ReadFeed, + new CosmosQueryRequestOptions(), + client + ); + + try { + allOffers = client.readOffers(offerDummyState) + .map(FeedResponse::getResults) + .collectList() + .map(list -> list.stream().flatMap(Collection::stream).collect(Collectors.toList())) + .single() + .block(); + } finally { + safeClose(offerDummyState); + } } @AfterClass(groups = { "query" }, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadFeedPkrTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadFeedPkrTests.java index 16764539b983..680b55050123 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadFeedPkrTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadFeedPkrTests.java @@ -2,6 +2,7 @@ // Licensed under the MIT License. package com.azure.cosmos.rx; +import com.azure.cosmos.CosmosAsyncClient; import com.azure.cosmos.CosmosAsyncContainer; import com.azure.cosmos.CosmosAsyncDatabase; import com.azure.cosmos.CosmosBridgeInternal; @@ -49,8 +50,9 @@ public void readPartitionKeyRanges() throws Exception { @BeforeClass(groups = { "query" }, timeOut = SETUP_TIMEOUT) public void before_ReadFeedPkrTests() { - client = CosmosBridgeInternal.getAsyncDocumentClient(getClientBuilder().buildAsyncClient()); - createdDatabase = getSharedCosmosDatabase(getClientBuilder().buildAsyncClient()); + CosmosAsyncClient cosmosAsyncClient = getClientBuilder().buildAsyncClient(); + client = CosmosBridgeInternal.getAsyncDocumentClient(cosmosAsyncClient); + createdDatabase = getSharedCosmosDatabase(cosmosAsyncClient); createdCollection = createCollection(createdDatabase, getCollectionDefinition(), new CosmosContainerRequestOptions()); diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ResourceTokenTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ResourceTokenTest.java index a94dfea5b85c..ead3cdc9f785 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ResourceTokenTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ResourceTokenTest.java @@ -6,6 +6,7 @@ import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.implementation.AsyncDocumentClient; import com.azure.cosmos.implementation.OperationType; +import com.azure.cosmos.implementation.QueryFeedOperationState; import com.azure.cosmos.implementation.ResourceType; import com.azure.cosmos.implementation.Utils; import com.azure.cosmos.implementation.clienttelemetry.ClientTelemetry; @@ -463,6 +464,7 @@ public void readDocumentFromCollPermissionWithDiffPartitionKey_WithException() t public void queryItemFromResourceToken(DocumentCollection documentCollection, Permission permission, PartitionKey partitionKey) throws Exception { AsyncDocumentClient asyncClientResourceToken = null; + QueryFeedOperationState dummyState = null; try { List permissionFeed = new ArrayList<>(); permissionFeed.add(permission); @@ -479,11 +481,15 @@ public void queryItemFromResourceToken(DocumentCollection documentCollection, Pe CosmosQueryRequestOptions queryRequestOptions = new CosmosQueryRequestOptions(); queryRequestOptions.setPartitionKey(partitionKey); + + dummyState = TestUtils + .createDummyQueryFeedOperationState(ResourceType.Document, OperationType.Query, queryRequestOptions, asyncClientResourceToken); + Flux> queryObservable = asyncClientResourceToken.queryDocuments( documentCollection.getAltLink(), "select * from c", - TestUtils.createDummyQueryFeedOperationState(ResourceType.Document, OperationType.Query, queryRequestOptions, asyncClientResourceToken), + dummyState, Document.class); FeedResponseListValidator validator = new FeedResponseListValidator.Builder() @@ -494,6 +500,7 @@ public void queryItemFromResourceToken(DocumentCollection documentCollection, Pe validateQuerySuccess(queryObservable, validator); } finally { safeClose(asyncClientResourceToken); + safeClose(dummyState); } } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/TestSuiteBase.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/TestSuiteBase.java index 6f18de03873e..e4118eedc747 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/TestSuiteBase.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/TestSuiteBase.java @@ -32,6 +32,7 @@ import com.azure.cosmos.implementation.ImplementationBridgeHelpers; import com.azure.cosmos.implementation.InternalObjectNode; import com.azure.cosmos.implementation.PathParser; +import com.azure.cosmos.implementation.QueryFeedOperationState; import com.azure.cosmos.implementation.Resource; import com.azure.cosmos.implementation.TestConfigurations; import com.azure.cosmos.implementation.Utils; @@ -95,8 +96,7 @@ import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.spy; -@Listeners({TestNGLogListener.class}) -public class TestSuiteBase extends CosmosAsyncClientTest { +public abstract class TestSuiteBase extends CosmosAsyncClientTest { private static final int DEFAULT_BULK_INSERT_CONCURRENCY_LEVEL = 500; private static final ObjectMapper objectMapper = new ObjectMapper(); @@ -221,13 +221,6 @@ public void beforeSuite() { } } - @BeforeSuite(groups = {"unit"}) - public void parallelizeUnitTests(ITestContext context) { - // TODO: Parallelization was disabled due to flaky tests. Re-enable after fixing the flaky tests. -// context.getSuite().getXmlSuite().setParallel(XmlSuite.ParallelMode.CLASSES); -// context.getSuite().getXmlSuite().setThreadCount(Runtime.getRuntime().availableProcessors()); - } - @AfterSuite(groups = {"thinclient", "fast", "long", "direct", "multi-region", "multi-master", "flaky-multi-master", "emulator", "split", "query", "cfp-split", "circuit-breaker-misc-gateway", "circuit-breaker-misc-direct", "circuit-breaker-read-all-read-many", "fi-multi-master", "long-emulator", "fi-thinclient-multi-region", "fi-thinclient-multi-master", "fault-injection-barrier"}, timeOut = SUITE_SHUTDOWN_TIMEOUT) @@ -287,30 +280,53 @@ protected static void cleanUpContainer(CosmosAsyncContainer cosmosContainer) { } protected static void truncateCollection(CosmosAsyncContainer cosmosContainer) { - int i = 0; - while (i < 100) { - try { - truncateCollectionInternal(cosmosContainer); - return; - } catch (CosmosException exception) { - if (exception.getStatusCode() != HttpConstants.StatusCodes.TOO_MANY_REQUESTS - || exception.getSubStatusCode() != 3200) { - - logger.error("No retry of exception", exception); - throw exception; - } - i++; - logger.info("Retrying truncation after 100ms - iteration " + i); + try { + int i = 0; + while (i < 100) { try { - Thread.sleep(100); - } catch (InterruptedException e) { - throw new RuntimeException(e); + truncateCollectionInternal(cosmosContainer); + return; + } catch (CosmosException exception) { + if (exception.getStatusCode() != HttpConstants.StatusCodes.TOO_MANY_REQUESTS + || exception.getSubStatusCode() != 3200) { + + logger.error("No retry of exception", exception); + throw exception; + } + + i++; + logger.info("Retrying truncation after 100ms - iteration " + i); + try { + Thread.sleep(100); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } } } + } finally { + // TODO @fabianm - Resetting leak detection - there is some flakiness when tests + // truncate collection and hit throttling - this will need to be investigated + // separately + CosmosNettyLeakDetectorFactory.resetIdentifiedLeaks(); } } + protected static void expectCount(CosmosAsyncContainer cosmosContainer, int expectedCount) { + CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); + options.setCosmosEndToEndOperationLatencyPolicyConfig( + new CosmosEndToEndOperationLatencyPolicyConfigBuilder(Duration.ofHours(1)) + .build() + ); + options.setMaxDegreeOfParallelism(-1); + List counts = cosmosContainer + .queryItems("SELECT VALUE COUNT(0) FROM root", options, Integer.class) + .collectList() + .block(); + assertThat(counts).hasSize(1); + assertThat(counts.get(0)).isEqualTo(expectedCount); + } + private static void truncateCollectionInternal(CosmosAsyncContainer cosmosContainer) { CosmosContainerProperties cosmosContainerProperties = cosmosContainer.read().block().getProperties(); String cosmosContainerId = cosmosContainerProperties.getId(); @@ -349,6 +365,9 @@ private static void truncateCollectionInternal(CosmosAsyncContainer cosmosContai return cosmosContainer.deleteItem(doc.getId(), partitionKey); }).then().block(); + + expectCount(cosmosContainer, 0); + logger.info("Truncating collection {} triggers ...", cosmosContainerId); cosmosContainer.getScripts().queryTriggers("SELECT * FROM root", options) @@ -924,15 +943,9 @@ static protected void safeDeleteCollection(CosmosAsyncDatabase database, String } } - static protected void safeCloseAsync(CosmosAsyncClient client) { - if (client != null) { - new Thread(() -> { - try { - client.close(); - } catch (Exception e) { - logger.error("failed to close client", e); - } - }).start(); + static protected void safeClose(QueryFeedOperationState state) { + if (state != null) { + safeClose(state.getClient()); } } @@ -1580,4 +1593,28 @@ public byte[] decodeHexString(String string) { } return outputStream.toByteArray(); } + + public static String captureNettyLeaks() { + System.gc(); + try { + Thread.sleep(5_000); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + List nettyLeaks = CosmosNettyLeakDetectorFactory.resetIdentifiedLeaks(); + if (nettyLeaks.size() > 0) { + StringBuilder sb = new StringBuilder(); + sb.append("\n"); + for (String leak : nettyLeaks) { + sb.append(leak).append("\n"); + } + + return "NETTY LEAKS detected: " + + "\n\n" + + sb; + } + + return ""; + } + } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/UserDefinedFunctionUpsertReplaceTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/UserDefinedFunctionUpsertReplaceTest.java index 5d8dff9eacd3..c9d19969c8dc 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/UserDefinedFunctionUpsertReplaceTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/UserDefinedFunctionUpsertReplaceTest.java @@ -4,6 +4,7 @@ import com.azure.cosmos.CosmosAsyncClient; import com.azure.cosmos.CosmosAsyncContainer; +import com.azure.cosmos.CosmosNettyLeakDetectorFactory; import com.azure.cosmos.models.CosmosUserDefinedFunctionResponse; import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.CosmosResponseValidator; diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/changefeed/pkversion/IncrementalChangeFeedProcessorTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/changefeed/pkversion/IncrementalChangeFeedProcessorTest.java index a8300df95f85..ad70d2997423 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/changefeed/pkversion/IncrementalChangeFeedProcessorTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/changefeed/pkversion/IncrementalChangeFeedProcessorTest.java @@ -10,6 +10,7 @@ import com.azure.cosmos.CosmosAsyncDatabase; import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.CosmosEndToEndOperationLatencyPolicyConfigBuilder; +import com.azure.cosmos.CosmosNettyLeakDetectorFactory; import com.azure.cosmos.SplitTestsRetryAnalyzer; import com.azure.cosmos.SplitTimeoutException; import com.azure.cosmos.ThroughputControlGroupConfig; @@ -2207,53 +2208,24 @@ private Consumer> leasesChangeFeedProcessorHandler(LeaseStateMoni log.info("LEASES processing from thread {}", Thread.currentThread().getId()); }; } + @BeforeMethod(groups = { "long-emulator", "cfp-split", "multi-master", "query" }, timeOut = 2 * SETUP_TIMEOUT, alwaysRun = true) + public void beforeMethod() throws Exception { + // add a cool off time + CosmosNettyLeakDetectorFactory.resetIdentifiedLeaks(); + } - @BeforeMethod(groups = { "long-emulator", "cfp-split" }, timeOut = 2 * SETUP_TIMEOUT, alwaysRun = true) - public void beforeMethod() { - } + @AfterMethod(groups = { "long-emulator", "cfp-split", "multi-master", "query" }, timeOut = SETUP_TIMEOUT, alwaysRun = true) + public void afterMethod() throws Exception { + logger.info("captureNettyLeaks: {}", captureNettyLeaks()); + } - @BeforeClass(groups = { "long-emulator", "cfp-split" }, timeOut = SETUP_TIMEOUT, alwaysRun = true) + @BeforeClass(groups = { "long-emulator", "cfp-split", "multi-master", "query" }, timeOut = SETUP_TIMEOUT, alwaysRun = true) public void before_ChangeFeedProcessorTest() { client = getClientBuilder().buildAsyncClient(); createdDatabase = getSharedCosmosDatabase(client); - - // Following is code that when enabled locally it allows for a predicted database/collection name that can be - // checked in the Azure Portal -// try { -// client.getDatabase(databaseId).read() -// .map(cosmosDatabaseResponse -> cosmosDatabaseResponse.getDatabase()) -// .flatMap(database -> database.delete()) -// .onErrorResume(throwable -> { -// if (throwable instanceof com.azure.cosmos.CosmosClientException) { -// com.azure.cosmos.CosmosClientException clientException = (com.azure.cosmos.CosmosClientException) throwable; -// if (clientException.getStatusCode() == 404) { -// return Mono.empty(); -// } -// } -// return Mono.error(throwable); -// }).block(); -// Thread.sleep(500); -// } catch (Exception e){ -// log.warn("Database delete", e); -// } -// createdDatabase = createDatabase(client, databaseId); } - - @AfterMethod(groups = { "long-emulator", "cfp-split" }, timeOut = 3 * SHUTDOWN_TIMEOUT, alwaysRun = true) - public void afterMethod() { - } - - @AfterClass(groups = { "long-emulator", "cfp-split" }, timeOut = 2 * SHUTDOWN_TIMEOUT, alwaysRun = true) + @AfterClass(groups = { "long-emulator", "cfp-split", "multi-master", "query" }, timeOut = 2 * SHUTDOWN_TIMEOUT, alwaysRun = true) public void afterClass() { -// try { -// client.readAllDatabases() -// .flatMap(cosmosDatabaseProperties -> { -// CosmosAsyncDatabase cosmosDatabase = client.getDatabase(cosmosDatabaseProperties.getId()); -// return cosmosDatabase.delete(); -// }).blockLast(); -// Thread.sleep(500); -// } catch (Exception e){ } - safeClose(client); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/proxy/HttpProxyClientHandler.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/proxy/HttpProxyClientHandler.java index 79bfbc76336e..6114d930c1ec 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/proxy/HttpProxyClientHandler.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/proxy/HttpProxyClientHandler.java @@ -10,14 +10,22 @@ import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; +import io.netty.util.ReferenceCountUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.nio.charset.StandardCharsets; + /** * Handle data from client. * */ public class HttpProxyClientHandler extends ChannelInboundHandlerAdapter { + + private static final ByteBuf TUNNEL_OK = + Unpooled.unreleasableBuffer( + Unpooled.copiedBuffer("HTTP/1.1 200 Connection Established\r\n\r\n", StandardCharsets.US_ASCII)); + private final Logger logger = LoggerFactory.getLogger(HttpProxyClientHandler.class); private final String id; private Channel clientChannel; @@ -36,15 +44,27 @@ public void channelActive(ChannelHandlerContext ctx) { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) { if (header.isComplete()) { - remoteChannel.writeAndFlush(msg); // just forward + if (remoteChannel != null && remoteChannel.isActive()) { + remoteChannel.writeAndFlush(msg); // just forward + } else { + ReferenceCountUtil.safeRelease(msg); + flushAndClose(clientChannel); + } return; } ByteBuf in = (ByteBuf) msg; - header.digest(in); + + try { + header.digest(in); + } catch (Throwable t) { + ReferenceCountUtil.safeRelease(in); + flushAndClose(clientChannel); + throw t; + } if (!header.isComplete()) { - in.release(); + ReferenceCountUtil.safeRelease(in); return; } @@ -52,7 +72,7 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) { clientChannel.config().setAutoRead(false); // disable AutoRead until remote connection is ready if (header.isHttps()) { // if https, respond 200 to create tunnel - clientChannel.writeAndFlush(Unpooled.wrappedBuffer("HTTP/1.1 200 Connection Established\r\n\r\n".getBytes())); + clientChannel.writeAndFlush(TUNNEL_OK.duplicate()); } Bootstrap b = new Bootstrap(); @@ -71,20 +91,27 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) { remoteChannel.writeAndFlush(in); } else { - in.release(); - clientChannel.close(); + ReferenceCountUtil.safeRelease(in); + // release header buffer if retained/allocated + ReferenceCountUtil.safeRelease(header.getByteBuf()); + flushAndClose(remoteChannel); + flushAndClose(clientChannel); } }); } @Override public void channelInactive(ChannelHandlerContext ctx) { + flushAndClose(remoteChannel); + remoteChannel = null; + clientChannel = null; } @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable e) { - logger.error(id + " error occured", e); + logger.error(id + " error occurred", e); + flushAndClose(remoteChannel); flushAndClose(clientChannel); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/proxy/HttpProxyClientHeader.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/proxy/HttpProxyClientHeader.java index d300cbaa5337..4a64410fb187 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/proxy/HttpProxyClientHeader.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/proxy/HttpProxyClientHeader.java @@ -4,12 +4,20 @@ import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; +import io.netty.util.ResourceLeakDetector; /** * The http header of client. * */ public class HttpProxyClientHeader { + private static final int MAX_HEADER_BYTES = 64 * 1024; + + private static final boolean LEAK_DEBUG = + ResourceLeakDetector.getLevel().ordinal() >= ResourceLeakDetector.Level.ADVANCED.ordinal(); + + private volatile boolean touchedAlloc; + private String method; private String host; private int port; @@ -43,10 +51,6 @@ public int getPort() { return port; } - public void setPort(int port) { - this.port = port; - } - public boolean isHttps() { return https; } @@ -56,58 +60,87 @@ public void setHttps(boolean https) { } public ByteBuf getByteBuf() { - return byteBuf; - } - - public void setByteBuf(ByteBuf byteBuf) { - this.byteBuf = byteBuf; - } - - public StringBuilder getLineBuf() { - return lineBuf; + if (!complete) throw new IllegalStateException("header not complete"); + if (LEAK_DEBUG) { + this.byteBuf.touch("getByteBuf handoff"); + } + ByteBuf out = this.byteBuf; + this.byteBuf = Unpooled.EMPTY_BUFFER; // we no longer own anything + return out; // caller must write/release this } public void setComplete(boolean complete) { + if (complete) { + if (LEAK_DEBUG) { + this.byteBuf.touch("end-of-headers; https=" + https + " host=" + host + " port=" + port); + } + } this.complete = complete; } + /** Release any internal buffer we still own (idempotent). */ + public void releaseQuietly() { + if (LEAK_DEBUG) { + this.byteBuf.touch("releaseQuietly"); + } + io.netty.util.ReferenceCountUtil.safeRelease(this.byteBuf); + this.byteBuf = Unpooled.EMPTY_BUFFER; + } + public void digest(ByteBuf in) { + if (LEAK_DEBUG && !touchedAlloc) { + touchedAlloc = true; + this.byteBuf.touch("allocated header buffer"); + } + while (in.isReadable()) { - if (complete) { - throw new IllegalStateException("already complete"); - } + if (complete) throw new IllegalStateException("already complete"); String line = readLine(in); - if (line == null) { - return; - } + if (line == null) return; if (method == null) { - method = line.split(" ")[0]; // the first word is http method name - https = method.equalsIgnoreCase("CONNECT"); // method CONNECT means https + method = line.split(" ", 2)[0]; + https = "CONNECT".equalsIgnoreCase(method); } - if (line.startsWith("Host: ") || line.startsWith("host: ")) { - String[] arr = line.split(":"); - host = arr[1].trim(); - if (arr.length == 3) { - port = Integer.parseInt(arr[2]); - } else if (https) { - port = 443; // https + if (line.regionMatches(true, 0, "Host:", 0, 5)) { + // be tolerant to extra spaces and IPv6 + String value = line.substring(5).trim(); + int idx = value.lastIndexOf(':'); // last colon to allow IPv6 literals + if (idx > 0 && value.indexOf(']') < idx) { + host = value.substring(0, idx).trim(); + port = Integer.parseInt(value.substring(idx + 1).trim()); } else { - port = 80; // http + host = value; + port = https ? 443 : 80; } } if (line.isEmpty()) { if (host == null || port == 0) { - throw new IllegalStateException("cannot find header \'Host\'"); + releaseQuietly(); + throw new IllegalStateException("cannot find header 'Host'"); } - - byteBuf = byteBuf.asReadOnly(); - complete = true; + // If HTTPS, we don’t forward the CONNECT request → release now. + if (https) { + releaseQuietly(); + } else { + // non-HTTPS: make read-only for safety; caller will drain & own it + byteBuf = byteBuf.asReadOnly(); + } + setComplete(true); break; } + + // size guard to avoid OOM from giant headers + if (byteBuf.writerIndex() >= MAX_HEADER_BYTES) { + releaseQuietly(); + if (LEAK_DEBUG) { + this.byteBuf.touch("header too large at writerIndex=" + byteBuf.writerIndex()); + } + throw new IllegalStateException("header too large"); + } } } @@ -117,12 +150,14 @@ private String readLine(ByteBuf in) { byteBuf.writeByte(b); lineBuf.append((char) b); int len = lineBuf.length(); - if (len >= 2 && lineBuf.substring(len - 2).equals("\r\n")) { + if (len >= 2 && lineBuf.charAt(len - 2) == '\r' && lineBuf.charAt(len - 1) == '\n') { String line = lineBuf.substring(0, len - 2); - lineBuf.delete(0, len); + lineBuf.setLength(0); + if (LEAK_DEBUG) { + this.byteBuf.touch("CRLF reached, writerIndex=" + byteBuf.writerIndex()); + } return line; } - } return null; } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/proxy/HttpProxyRemoteHandler.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/proxy/HttpProxyRemoteHandler.java index 487aa265d104..ee9228aeeeb9 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/proxy/HttpProxyRemoteHandler.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/proxy/HttpProxyRemoteHandler.java @@ -32,18 +32,41 @@ public void channelActive(ChannelHandlerContext ctx) { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) { - clientChannel.writeAndFlush(msg); // just forward + if (clientChannel != null && clientChannel.isActive()) { + clientChannel.writeAndFlush(msg).addListener(f -> { + if (!f.isSuccess()) { + // transport is broken; close both sides + flushAndClose(clientChannel); + flushAndClose(remoteChannel); + } + }); + } else { + io.netty.util.ReferenceCountUtil.safeRelease(msg); // prevent leak + flushAndClose(remoteChannel); + } } @Override public void channelInactive(ChannelHandlerContext ctx) { flushAndClose(clientChannel); + remoteChannel = null; + clientChannel = null; } @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable e) { - logger.error(id + " error occured", e); + logger.error(id + " error occurred", e); flushAndClose(remoteChannel); + flushAndClose(clientChannel); + } + + @Override + public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { + if (remoteChannel != null) { + boolean writable = clientChannel != null && clientChannel.isWritable(); + remoteChannel.config().setAutoRead(writable); + } + ctx.fireChannelWritabilityChanged(); } private void flushAndClose(Channel ch) { diff --git a/sdk/cosmos/azure-cosmos/pom.xml b/sdk/cosmos/azure-cosmos/pom.xml index b474bbe5f73b..ef7d198e3dde 100644 --- a/sdk/cosmos/azure-cosmos/pom.xml +++ b/sdk/cosmos/azure-cosmos/pom.xml @@ -146,6 +146,12 @@ Licensed under the MIT License. 3.5.3 unit + + true + 1 + 256 + paranoid + %regex[.*] @@ -154,6 +160,10 @@ Licensed under the MIT License. surefire.testng.verbose 2 + + listener + com.azure.cosmos.CosmosNettyLeakDetectorFactory + true diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/AsyncDocumentClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/AsyncDocumentClient.java index d0df0de41b45..1ebddafdb677 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/AsyncDocumentClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/AsyncDocumentClient.java @@ -331,6 +331,7 @@ public AsyncDocumentClient build() { isPerPartitionAutomaticFailoverEnabled); client.init(state, null); + return client; } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/FeedOperationState.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/FeedOperationState.java index 03922e5b1cec..900d6b2d6768 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/FeedOperationState.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/FeedOperationState.java @@ -155,6 +155,10 @@ public String getSpanName() { return ctxAccessor.getSpanName(this.ctxHolder.get()); } + public CosmosAsyncClient getClient() { + return this.cosmosAsyncClient; + } + public CosmosDiagnosticsContext getDiagnosticsContextSnapshot() { return this.ctxHolder.get(); } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java index bdb2cac11aaa..2acea4e9db57 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java @@ -1381,6 +1381,9 @@ private Flux> createQueryInternal( private void addToActiveClients() { if (Configs.isClientLeakDetectionEnabled()) { + logger.warn( + "Cosmos Client leak detection is enabled - " + + "this will impact performance negatively - disable it in production scenarios."); synchronized (staticLock) { activeClients.put(this.clientId, StackTraceUtil.currentCallStack()); } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java index b7455ade6906..906fc518f2f7 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java @@ -212,13 +212,20 @@ public StoreResponse unwrapToStoreResponse( retainedContent, "Argument 'retainedContent' must not be null - use empty ByteBuf when theres is no payload."); + if (leakDetectionDebuggingEnabled) { + retainedContent.touch( + "RxGatewayStoreModel.unwrapToStoreResponse before validate - refCnt: " + retainedContent.refCnt()); + logger.debug("RxGatewayStoreModel.unwrapToStoreResponse before validate - refCnt: {}", retainedContent.refCnt()); + } + // If there is any error in the header response this throws exception validateOrThrow(request, HttpResponseStatus.valueOf(statusCode), headers, retainedContent); int size; if ((size = retainedContent.readableBytes()) > 0) { if (leakDetectionDebuggingEnabled) { - retainedContent.touch(this); + retainedContent.touch("RxGatewayStoreModel before creating StoreResponse - refCnt: " + retainedContent.refCnt()); + logger.debug("RxGatewayStoreModel before creating StoreResponse - refCnt: {}", retainedContent.refCnt()); } return new StoreResponse( @@ -407,210 +414,252 @@ private Mono toDocumentServiceResponse(Mono { - - // header key/value pairs - HttpHeaders httpResponseHeaders = httpResponse.headers(); - int httpResponseStatus = httpResponse.statusCode(); - - Mono contentObservable = httpResponse - .body() - .switchIfEmpty(Mono.just(Unpooled.EMPTY_BUFFER)) - .map(bodyByteBuf -> leakDetectionDebuggingEnabled - ? bodyByteBuf.retain().touch(this) - : bodyByteBuf.retain()) - .publishOn(CosmosSchedulers.TRANSPORT_RESPONSE_BOUNDED_ELASTIC) - .doOnDiscard(ByteBuf.class, buf -> { - if (buf.refCnt() > 0) { - // there could be a race with the catch in the .map operator below - // so, use safeRelease - ReferenceCountUtil.safeRelease(buf); - } - }); + return httpResponseMono + .publishOn(CosmosSchedulers.TRANSPORT_RESPONSE_BOUNDED_ELASTIC) + .flatMap(httpResponse -> { + + // header key/value pairs + HttpHeaders httpResponseHeaders = httpResponse.headers(); + int httpResponseStatus = httpResponse.statusCode(); + + Mono contentObservable = httpResponse + .body() + .switchIfEmpty(Mono.just(Unpooled.EMPTY_BUFFER)) + .map(bodyByteBuf -> { + if (leakDetectionDebuggingEnabled) { + bodyByteBuf.touch("RxGatewayStoreModel - buffer after aggregate before retain - refCnt: " + bodyByteBuf.refCnt()); + logger.debug("RxGatewayStoreModel - buffer after aggregate before retain - refCnt: {}", bodyByteBuf.refCnt()); + } - return contentObservable - .map(content -> { - if (leakDetectionDebuggingEnabled) { - content.touch(this); - } + if (bodyByteBuf != Unpooled.EMPTY_BUFFER) { + // +1 for our downstream work since Reactor Netty (ByteBufFlux) auto-releases buffer + bodyByteBuf.retain(); + } + + if (leakDetectionDebuggingEnabled) { + bodyByteBuf.touch("RxGatewayStoreModel - touch retained buffer - refCnt: " + bodyByteBuf.refCnt()); + logger.debug("RxGatewayStoreModel - touch retained buffer - refCnt: {]", bodyByteBuf.refCnt()); + } - try { - // Capture transport client request timeline - ReactorNettyRequestRecord reactorNettyRequestRecord = httpResponse.request().reactorNettyRequestRecord(); - if (reactorNettyRequestRecord != null) { - reactorNettyRequestRecord.setTimeCompleted(Instant.now()); + return bodyByteBuf; + }) + .doOnDiscard(ByteBuf.class, buf -> { + if (buf.refCnt() > 0) { + if (leakDetectionDebuggingEnabled) { + buf.touch("RxGatewayStoreModel - doOnDiscard - begin - refCnt: " + buf.refCnt()); + logger.debug("RxGatewayStoreModel - doOnDiscard - begin - refCnt: {}", buf.refCnt()); + } + + // there could be a race with the catch in the .map operator below + // so, use safeRelease + ReferenceCountUtil.safeRelease(buf); + } + }) + .publishOn(CosmosSchedulers.TRANSPORT_RESPONSE_BOUNDED_ELASTIC); + + return contentObservable + .map(content -> { + if (leakDetectionDebuggingEnabled) { + content.touch("RxGatewayStoreModel - before capturing transport timeline - refCnt: " + content.refCnt()); + logger.debug("RxGatewayStoreModel - before capturing transport timeline - refCnt: {}", content.refCnt()); } - StoreResponse rsp = request - .getEffectiveHttpTransportSerializer(this) - .unwrapToStoreResponse(httpRequest.uri().toString(), request, httpResponseStatus, httpResponseHeaders, content); + try { + // Capture transport client request timeline + ReactorNettyRequestRecord reactorNettyRequestRecord = httpResponse.request().reactorNettyRequestRecord(); + if (reactorNettyRequestRecord != null) { + reactorNettyRequestRecord.setTimeCompleted(Instant.now()); + } - if (reactorNettyRequestRecord != null) { - rsp.setRequestTimeline(reactorNettyRequestRecord.takeTimelineSnapshot()); + if (leakDetectionDebuggingEnabled) { + content.touch("RxGatewayStoreModel - before creating StoreResponse - refCnt: " + content.refCnt()); + logger.debug("RxGatewayStoreModel - before creating StoreResponse - refCnt: {}", content.refCnt()); + } + StoreResponse rsp = request + .getEffectiveHttpTransportSerializer(this) + .unwrapToStoreResponse(httpRequest.uri().toString(), request, httpResponseStatus, httpResponseHeaders, content); + + if (reactorNettyRequestRecord != null) { + rsp.setRequestTimeline(reactorNettyRequestRecord.takeTimelineSnapshot()); + + if (this.gatewayServerErrorInjector != null) { + // only configure when fault injection is used + rsp.setFaultInjectionRuleId( + request + .faultInjectionRequestContext + .getFaultInjectionRuleId(reactorNettyRequestRecord.getTransportRequestId())); + + rsp.setFaultInjectionRuleEvaluationResults( + request + .faultInjectionRequestContext + .getFaultInjectionRuleEvaluationResults(reactorNettyRequestRecord.getTransportRequestId())); + } + } - if (this.gatewayServerErrorInjector != null) { - // only configure when fault injection is used - rsp.setFaultInjectionRuleId( - request - .faultInjectionRequestContext - .getFaultInjectionRuleId(reactorNettyRequestRecord.getTransportRequestId())); + if (request.requestContext.cosmosDiagnostics != null) { + BridgeInternal.recordGatewayResponse(request.requestContext.cosmosDiagnostics, request, rsp, globalEndpointManager); + } - rsp.setFaultInjectionRuleEvaluationResults( - request - .faultInjectionRequestContext - .getFaultInjectionRuleEvaluationResults(reactorNettyRequestRecord.getTransportRequestId())); + return rsp; + } catch (Throwable t) { + if (content.refCnt() > 0) { + if (leakDetectionDebuggingEnabled) { + content.touch("RxGatewayStoreModel -exception creating StoreResponse - refCnt: " + content.refCnt()); + logger.debug("RxGatewayStoreModel -exception creating StoreResponse - refCnt: {}", content.refCnt()); + } + // Unwrap failed before StoreResponse took ownership -> release our retain + // there could be a race with the doOnDiscard above - so, use safeRelease + ReferenceCountUtil.safeRelease(content); } - } - if (request.requestContext.cosmosDiagnostics != null) { - BridgeInternal.recordGatewayResponse(request.requestContext.cosmosDiagnostics, request, rsp, globalEndpointManager); + throw t; } - - return rsp; - } catch (Throwable t) { - if (content.refCnt() > 0) { - // Unwrap failed before StoreResponse took ownership -> release our retain - // there could be a race with the doOnDiscard above - so, use safeRelease - ReferenceCountUtil.safeRelease(content); + }) + .doOnDiscard(ByteBuf.class, buf -> { + // This handles the case where the retained buffer is discarded after the map operation + // but before unwrapToStoreResponse takes ownership (e.g., during cancellation) + if (buf.refCnt() > 0) { + if (leakDetectionDebuggingEnabled) { + buf.touch("RxGatewayStoreModel - doOnDiscard after map - refCnt: " + buf.refCnt()); + logger.debug("RxGatewayStoreModel - doOnDiscard after map - refCnt: {}", buf.refCnt()); + } + ReferenceCountUtil.safeRelease(buf); } + }) + .single(); - throw t; - } - }) - .single(); + }).map(rsp -> { + RxDocumentServiceResponse rxDocumentServiceResponse; + if (httpRequest.reactorNettyRequestRecord() != null) { + rxDocumentServiceResponse = + new RxDocumentServiceResponse(this.clientContext, rsp, + httpRequest.reactorNettyRequestRecord().takeTimelineSnapshot()); - }).map(rsp -> { - RxDocumentServiceResponse rxDocumentServiceResponse; - if (httpRequest.reactorNettyRequestRecord() != null) { - rxDocumentServiceResponse = - new RxDocumentServiceResponse(this.clientContext, rsp, - httpRequest.reactorNettyRequestRecord().takeTimelineSnapshot()); + } else { + rxDocumentServiceResponse = + new RxDocumentServiceResponse(this.clientContext, rsp); + } + rxDocumentServiceResponse.setCosmosDiagnostics(request.requestContext.cosmosDiagnostics); + return rxDocumentServiceResponse; + }).onErrorResume(throwable -> { + Throwable unwrappedException = reactor.core.Exceptions.unwrap(throwable); + if (!(unwrappedException instanceof Exception)) { + // fatal error + logger.error("Unexpected failure " + unwrappedException.getMessage(), unwrappedException); + return Mono.error(unwrappedException); + } - } else { - rxDocumentServiceResponse = - new RxDocumentServiceResponse(this.clientContext, rsp); - } - rxDocumentServiceResponse.setCosmosDiagnostics(request.requestContext.cosmosDiagnostics); - return rxDocumentServiceResponse; - }).onErrorResume(throwable -> { - Throwable unwrappedException = reactor.core.Exceptions.unwrap(throwable); - if (!(unwrappedException instanceof Exception)) { - // fatal error - logger.error("Unexpected failure " + unwrappedException.getMessage(), unwrappedException); - return Mono.error(unwrappedException); - } + Exception exception = (Exception) unwrappedException; + CosmosException dce; + if (!(exception instanceof CosmosException)) { + int statusCode = 0; + if (WebExceptionUtility.isNetworkFailure(exception)) { - Exception exception = (Exception) unwrappedException; - CosmosException dce; - if (!(exception instanceof CosmosException)) { - int statusCode = 0; - if (WebExceptionUtility.isNetworkFailure(exception)) { + // wrap in CosmosException + logger.error("Network failure", exception); - // wrap in CosmosException - logger.error("Network failure", exception); + if (WebExceptionUtility.isReadTimeoutException(exception)) { + statusCode = HttpConstants.StatusCodes.REQUEST_TIMEOUT; + } else { + statusCode = HttpConstants.StatusCodes.SERVICE_UNAVAILABLE; + } + } - if (WebExceptionUtility.isReadTimeoutException(exception)) { - statusCode = HttpConstants.StatusCodes.REQUEST_TIMEOUT; + dce = BridgeInternal.createCosmosException(request.requestContext.resourcePhysicalAddress, statusCode, exception); + BridgeInternal.setRequestHeaders(dce, request.getHeaders()); + } else { + logger.error("Non-network failure", exception); + dce = (CosmosException) exception; + } + + if (WebExceptionUtility.isNetworkFailure(dce)) { + if (WebExceptionUtility.isReadTimeoutException(dce)) { + BridgeInternal.setSubStatusCode(dce, HttpConstants.SubStatusCodes.GATEWAY_ENDPOINT_READ_TIMEOUT); } else { - statusCode = HttpConstants.StatusCodes.SERVICE_UNAVAILABLE; + BridgeInternal.setSubStatusCode(dce, HttpConstants.SubStatusCodes.GATEWAY_ENDPOINT_UNAVAILABLE); } } - dce = BridgeInternal.createCosmosException(request.requestContext.resourcePhysicalAddress, statusCode, exception); - BridgeInternal.setRequestHeaders(dce, request.getHeaders()); - } else { - logger.error("Non-network failure", exception); - dce = (CosmosException) exception; - } + ImplementationBridgeHelpers + .CosmosExceptionHelper + .getCosmosExceptionAccessor() + .setRequestUri(dce, Uri.create(httpRequest.uri().toString())); - if (WebExceptionUtility.isNetworkFailure(dce)) { - if (WebExceptionUtility.isReadTimeoutException(dce)) { - BridgeInternal.setSubStatusCode(dce, HttpConstants.SubStatusCodes.GATEWAY_ENDPOINT_READ_TIMEOUT); - } else { - BridgeInternal.setSubStatusCode(dce, HttpConstants.SubStatusCodes.GATEWAY_ENDPOINT_UNAVAILABLE); - } - } + if (request.requestContext.cosmosDiagnostics != null) { + if (httpRequest.reactorNettyRequestRecord() != null) { + ReactorNettyRequestRecord reactorNettyRequestRecord = httpRequest.reactorNettyRequestRecord(); + BridgeInternal.setRequestTimeline(dce, reactorNettyRequestRecord.takeTimelineSnapshot()); - ImplementationBridgeHelpers - .CosmosExceptionHelper - .getCosmosExceptionAccessor() - .setRequestUri(dce, Uri.create(httpRequest.uri().toString())); + ImplementationBridgeHelpers + .CosmosExceptionHelper + .getCosmosExceptionAccessor() + .setFaultInjectionRuleId( + dce, + request.faultInjectionRequestContext + .getFaultInjectionRuleId(reactorNettyRequestRecord.getTransportRequestId())); - if (request.requestContext.cosmosDiagnostics != null) { - if (httpRequest.reactorNettyRequestRecord() != null) { - ReactorNettyRequestRecord reactorNettyRequestRecord = httpRequest.reactorNettyRequestRecord(); - BridgeInternal.setRequestTimeline(dce, reactorNettyRequestRecord.takeTimelineSnapshot()); - - ImplementationBridgeHelpers - .CosmosExceptionHelper - .getCosmosExceptionAccessor() - .setFaultInjectionRuleId( - dce, - request.faultInjectionRequestContext - .getFaultInjectionRuleId(reactorNettyRequestRecord.getTransportRequestId())); - - ImplementationBridgeHelpers - .CosmosExceptionHelper - .getCosmosExceptionAccessor() - .setFaultInjectionEvaluationResults( - dce, - request.faultInjectionRequestContext - .getFaultInjectionRuleEvaluationResults(reactorNettyRequestRecord.getTransportRequestId())); - } + ImplementationBridgeHelpers + .CosmosExceptionHelper + .getCosmosExceptionAccessor() + .setFaultInjectionEvaluationResults( + dce, + request.faultInjectionRequestContext + .getFaultInjectionRuleEvaluationResults(reactorNettyRequestRecord.getTransportRequestId())); + } - BridgeInternal.recordGatewayResponse(request.requestContext.cosmosDiagnostics, request, dce, globalEndpointManager); - } + BridgeInternal.recordGatewayResponse(request.requestContext.cosmosDiagnostics, request, dce, globalEndpointManager); + } - return Mono.error(dce); - }).doFinally(signalType -> { + return Mono.error(dce); + }).doFinally(signalType -> { - if (signalType != SignalType.CANCEL) { - return; - } + if (signalType != SignalType.CANCEL) { + return; + } - if (httpRequest.reactorNettyRequestRecord() != null) { + if (httpRequest.reactorNettyRequestRecord() != null) { - OperationCancelledException oce = new OperationCancelledException("", httpRequest.uri()); + OperationCancelledException oce = new OperationCancelledException("", httpRequest.uri()); - ReactorNettyRequestRecord reactorNettyRequestRecord = httpRequest.reactorNettyRequestRecord(); + ReactorNettyRequestRecord reactorNettyRequestRecord = httpRequest.reactorNettyRequestRecord(); - RequestTimeline requestTimeline = reactorNettyRequestRecord.takeTimelineSnapshot(); - long transportRequestId = reactorNettyRequestRecord.getTransportRequestId(); + RequestTimeline requestTimeline = reactorNettyRequestRecord.takeTimelineSnapshot(); + long transportRequestId = reactorNettyRequestRecord.getTransportRequestId(); - GatewayRequestTimelineContext gatewayRequestTimelineContext = new GatewayRequestTimelineContext(requestTimeline, transportRequestId); + GatewayRequestTimelineContext gatewayRequestTimelineContext = new GatewayRequestTimelineContext(requestTimeline, transportRequestId); - request.requestContext.cancelledGatewayRequestTimelineContexts.add(gatewayRequestTimelineContext); + request.requestContext.cancelledGatewayRequestTimelineContexts.add(gatewayRequestTimelineContext); - if (request.requestContext.getCrossRegionAvailabilityContext() != null) { + if (request.requestContext.getCrossRegionAvailabilityContext() != null) { - CrossRegionAvailabilityContextForRxDocumentServiceRequest availabilityStrategyContextForReq = - request.requestContext.getCrossRegionAvailabilityContext(); + CrossRegionAvailabilityContextForRxDocumentServiceRequest availabilityStrategyContextForReq = + request.requestContext.getCrossRegionAvailabilityContext(); - if (availabilityStrategyContextForReq.getAvailabilityStrategyContext().isAvailabilityStrategyEnabled() && !availabilityStrategyContextForReq.getAvailabilityStrategyContext().isHedgedRequest()) { + if (availabilityStrategyContextForReq.getAvailabilityStrategyContext().isAvailabilityStrategyEnabled() && !availabilityStrategyContextForReq.getAvailabilityStrategyContext().isHedgedRequest()) { - BridgeInternal.setRequestTimeline(oce, reactorNettyRequestRecord.takeTimelineSnapshot()); + BridgeInternal.setRequestTimeline(oce, reactorNettyRequestRecord.takeTimelineSnapshot()); - ImplementationBridgeHelpers - .CosmosExceptionHelper - .getCosmosExceptionAccessor() - .setFaultInjectionRuleId( - oce, - request.faultInjectionRequestContext - .getFaultInjectionRuleId(transportRequestId)); + ImplementationBridgeHelpers + .CosmosExceptionHelper + .getCosmosExceptionAccessor() + .setFaultInjectionRuleId( + oce, + request.faultInjectionRequestContext + .getFaultInjectionRuleId(transportRequestId)); - ImplementationBridgeHelpers - .CosmosExceptionHelper - .getCosmosExceptionAccessor() - .setFaultInjectionEvaluationResults( - oce, - request.faultInjectionRequestContext - .getFaultInjectionRuleEvaluationResults(transportRequestId)); + ImplementationBridgeHelpers + .CosmosExceptionHelper + .getCosmosExceptionAccessor() + .setFaultInjectionEvaluationResults( + oce, + request.faultInjectionRequestContext + .getFaultInjectionRuleEvaluationResults(transportRequestId)); - BridgeInternal.recordGatewayResponse(request.requestContext.cosmosDiagnostics, request, oce, globalEndpointManager); + BridgeInternal.recordGatewayResponse(request.requestContext.cosmosDiagnostics, request, oce, globalEndpointManager); + } } } - } - }); + }); } private void validateOrThrow(RxDocumentServiceRequest request, @@ -625,11 +674,11 @@ private void validateOrThrow(RxDocumentServiceRequest request, ? status.reasonPhrase().replace(" ", "") : ""; - String body = retainedBodyAsByteBuf != null + String body = retainedBodyAsByteBuf.readableBytes() > 0 ? retainedBodyAsByteBuf.toString(StandardCharsets.UTF_8) : null; - retainedBodyAsByteBuf.release(); + ReferenceCountUtil.safeRelease(retainedBodyAsByteBuf); CosmosError cosmosError; cosmosError = (StringUtils.isNotEmpty(body)) ? new CosmosError(body) : new CosmosError(); diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ThinClientStoreModel.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ThinClientStoreModel.java index 74b314881bba..d32e5d901f18 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ThinClientStoreModel.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ThinClientStoreModel.java @@ -111,7 +111,7 @@ public StoreResponse unwrapToStoreResponse( } if (leakDetectionDebuggingEnabled) { - content.touch(this); + content.touch("ThinClientStoreModel.unwrapToStoreResponse - refCnt: " + content.refCnt()); } try { @@ -123,7 +123,7 @@ public StoreResponse unwrapToStoreResponse( ByteBuf payloadBuf = response.getContent(); if (payloadBuf != Unpooled.EMPTY_BUFFER && leakDetectionDebuggingEnabled) { - payloadBuf.touch(this); + payloadBuf.touch("ThinClientStoreModel.after RNTBD decoding - refCnt: " + payloadBuf.refCnt()); } try { diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreResponse.java index 52681e2ed6fa..a4bab8f3edbe 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreResponse.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreResponse.java @@ -11,6 +11,7 @@ import com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdEndpointStatistics; import com.fasterxml.jackson.databind.JsonNode; import io.netty.buffer.ByteBufInputStream; +import io.netty.util.IllegalReferenceCountException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -71,12 +72,14 @@ public StoreResponse( if (contentStream != null) { try { this.responsePayload = new JsonNodeStorePayload(contentStream, responsePayloadLength, headerMap); - } - finally { + } finally { try { contentStream.close(); - } catch (IOException e) { - logger.debug("Could not successfully close content stream.", e); + } catch (Throwable e) { + if (!(e instanceof IllegalReferenceCountException)) { + // Log as warning instead of debug to make ByteBuf leak issues more visible + logger.warn("Failed to close content stream. This may cause a Netty ByteBuf leak.", e); + } } } } else { diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdContextDecoder.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdContextDecoder.java index cf8724244535..353f34461aa1 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdContextDecoder.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdContextDecoder.java @@ -6,6 +6,7 @@ import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.ByteToMessageDecoder; +import io.netty.util.ResourceLeakDetector; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -14,6 +15,8 @@ class RntbdContextDecoder extends ByteToMessageDecoder { private static final Logger logger = LoggerFactory.getLogger(RntbdContextDecoder.class); + private static final boolean leakDetectionDebuggingEnabled = ResourceLeakDetector.getLevel().ordinal() >= + ResourceLeakDetector.Level.ADVANCED.ordinal(); /** * Deserialize from an input {@link ByteBuf} to an {@link RntbdContext} instance @@ -27,6 +30,10 @@ class RntbdContextDecoder extends ByteToMessageDecoder { @Override protected void decode(final ChannelHandlerContext context, final ByteBuf in, final List out) { + if (leakDetectionDebuggingEnabled) { + in.touch("RntbdContextDecoder.decode: entry"); + } + if (RntbdFramer.canDecodeHead(in)) { Object result; @@ -35,14 +42,35 @@ protected void decode(final ChannelHandlerContext context, final ByteBuf in, fin final RntbdContext rntbdContext = RntbdContext.decode(in); context.fireUserEventTriggered(rntbdContext); result = rntbdContext; + + if (leakDetectionDebuggingEnabled) { + logger.debug("{} RntbdContextDecoder: decoded RntbdContext successfully", context.channel()); + } } catch (RntbdContextException error) { context.fireUserEventTriggered(error); result = error; + + if (leakDetectionDebuggingEnabled) { + logger.debug("{} RntbdContextDecoder: caught RntbdContextException", context.channel(), error); + } } finally { + if (leakDetectionDebuggingEnabled) { + in.touch("RntbdContextDecoder.decode: before discardReadBytes in finally block"); + } in.discardReadBytes(); } logger.debug("{} DECODE COMPLETE: {}", context.channel(), result); + } else if (leakDetectionDebuggingEnabled) { + logger.debug("{} RntbdContextDecoder: cannot decode head yet, readableBytes={}", + context.channel(), in.readableBytes()); } } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { + // BREADCRUMB: Track exceptions that might lead to leaked buffers + logger.warn("{} RntbdContextDecoder.exceptionCaught: {}", ctx.channel(), cause.getMessage(), cause); + super.exceptionCaught(ctx, cause); + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdContextRequestDecoder.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdContextRequestDecoder.java index c256fce6de65..ceec8d90ad46 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdContextRequestDecoder.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdContextRequestDecoder.java @@ -6,11 +6,19 @@ import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.ByteToMessageDecoder; +import io.netty.util.ResourceLeakDetector; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.List; public class RntbdContextRequestDecoder extends ByteToMessageDecoder { + private static final Logger logger = LoggerFactory.getLogger(RntbdContextRequestDecoder.class); + + private static final boolean leakDetectionDebuggingEnabled = ResourceLeakDetector.getLevel().ordinal() >= + ResourceLeakDetector.Level.ADVANCED.ordinal(); + public RntbdContextRequestDecoder() { this.setSingleDecode(true); } @@ -28,14 +36,33 @@ public void channelRead(final ChannelHandlerContext context, final Object messag if (message instanceof ByteBuf) { final ByteBuf in = (ByteBuf)message; + // BREADCRUMB: Track buffer before reading operation type + if (leakDetectionDebuggingEnabled) { + in.touch("RntbdContextRequestDecoder.channelRead: before reading resourceOperationType"); + } + final int resourceOperationType = in.getInt(in.readerIndex() + Integer.BYTES); if (resourceOperationType == 0) { assert this.isSingleDecode(); + // BREADCRUMB: Going through normal decode path + if (leakDetectionDebuggingEnabled) { + in.touch("RntbdContextRequestDecoder.channelRead: passing to super.channelRead (resourceOperationType == 0)"); + } super.channelRead(context, message); return; } + + // BREADCRUMB: Bypassing decoder - this is a potential leak point if downstream doesn't release + if (leakDetectionDebuggingEnabled) { + in.touch("RntbdContextRequestDecoder.channelRead: bypassing decoder (resourceOperationType != 0)"); + } } + // BREADCRUMB: Message forwarded downstream - downstream MUST release it + if (leakDetectionDebuggingEnabled && message instanceof ByteBuf) { + ((ByteBuf) message).touch("RntbdContextRequestDecoder.channelRead: forwarding to next handler"); + } + context.fireChannelRead(message); } @@ -66,4 +93,11 @@ protected void decode(final ChannelHandlerContext context, final ByteBuf in, fin in.discardReadBytes(); out.add(request); } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { + // BREADCRUMB: Track exceptions that might lead to leaked buffers + logger.warn("{} RntbdContextRequestDecoder.exceptionCaught: {}", ctx.channel(), cause.getMessage(), cause); + super.exceptionCaught(ctx, cause); + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestDecoder.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestDecoder.java index b924f2e97169..972ca9193d8c 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestDecoder.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestDecoder.java @@ -6,10 +6,19 @@ import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.ByteToMessageDecoder; +import io.netty.util.ResourceLeakDetector; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.List; public final class RntbdRequestDecoder extends ByteToMessageDecoder { + + private static final Logger logger = LoggerFactory.getLogger(RntbdRequestDecoder.class); + + private static final boolean leakDetectionDebuggingEnabled = ResourceLeakDetector.getLevel().ordinal() >= + ResourceLeakDetector.Level.ADVANCED.ordinal(); + /** * Prepare for decoding an @{link RntbdRequest} or fire a channel readTree event to pass the input message along. * @@ -23,14 +32,32 @@ public void channelRead(final ChannelHandlerContext context, final Object messag if (message instanceof ByteBuf) { final ByteBuf in = (ByteBuf) message; + // BREADCRUMB: Track buffer before reading operation type + if (leakDetectionDebuggingEnabled) { + in.touch("RntbdRequestDecoder.channelRead: before reading resourceOperationType"); + } + final int resourceOperationType = in.getInt(in.readerIndex() + Integer.BYTES); if (resourceOperationType != 0) { + // BREADCRUMB: Going through normal decode path + if (leakDetectionDebuggingEnabled) { + in.touch("RntbdRequestDecoder.channelRead: passing to super.channelRead (resourceOperationType != 0)"); + } super.channelRead(context, message); return; } + + // BREADCRUMB: Bypassing decoder - this is a potential leak point if downstream doesn't release + if (leakDetectionDebuggingEnabled) { + in.touch("RntbdRequestDecoder.channelRead: bypassing decoder (resourceOperationType == 0)"); + } } + // BREADCRUMB: Message forwarded downstream - downstream MUST release it + if (leakDetectionDebuggingEnabled && message instanceof ByteBuf) { + ((ByteBuf) message).touch("RntbdRequestDecoder.channelRead: forwarding to next handler"); + } context.fireChannelRead(message); } @@ -65,4 +92,11 @@ protected void decode( in.discardReadBytes(); out.add(request); } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { + // BREADCRUMB: Track exceptions that might lead to leaked buffers + logger.warn("{} RntbdRequestDecoder.exceptionCaught: {}", ctx.channel(), cause.getMessage(), cause); + super.exceptionCaught(ctx, cause); + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdResponseDecoder.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdResponseDecoder.java index 57c1c9a1a13a..a946dfe8bce2 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdResponseDecoder.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdResponseDecoder.java @@ -6,6 +6,7 @@ import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.ByteToMessageDecoder; +import io.netty.util.ResourceLeakDetector; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -18,6 +19,9 @@ public final class RntbdResponseDecoder extends ByteToMessageDecoder { private static final Logger logger = LoggerFactory.getLogger(RntbdResponseDecoder.class); private static final AtomicReference decodeStartTime = new AtomicReference<>(); + private static final boolean leakDetectionDebuggingEnabled = ResourceLeakDetector.getLevel().ordinal() >= + ResourceLeakDetector.Level.ADVANCED.ordinal(); + /** * Deserialize from an input {@link ByteBuf} to an {@link RntbdResponse} instance. *

@@ -32,6 +36,11 @@ protected void decode(final ChannelHandlerContext context, final ByteBuf in, fin decodeStartTime.compareAndSet(null, Instant.now()); + // BREADCRUMB: Track buffer at decode entry + if (leakDetectionDebuggingEnabled) { + in.touch("RntbdResponseDecoder.decode: entry"); + } + if (RntbdFramer.canDecodeHead(in)) { final RntbdResponse response = RntbdResponse.decode(in); @@ -41,9 +50,34 @@ protected void decode(final ChannelHandlerContext context, final ByteBuf in, fin response.setDecodeStartTime(decodeStartTime.getAndSet(null)); logger.debug("{} DECODE COMPLETE: {}", context.channel(), response); + + // BREADCRUMB: Track buffer before discard + if (leakDetectionDebuggingEnabled) { + in.touch("RntbdResponseDecoder.decode: before discardReadBytes"); + } + in.discardReadBytes(); + + // BREADCRUMB: Track response before adding to output + if (leakDetectionDebuggingEnabled) { + response.touch("RntbdResponseDecoder.decode: before retain and adding to output"); + } + out.add(response.retain()); + } else if (leakDetectionDebuggingEnabled) { + logger.debug("{} RntbdResponseDecoder: response is null, not enough data to decode yet", + context.channel()); } + } else if (leakDetectionDebuggingEnabled) { + logger.debug("{} RntbdResponseDecoder: cannot decode head yet, readableBytes={}", + context.channel(), in.readableBytes()); } } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { + // BREADCRUMB: Track exceptions that might lead to leaked buffers + logger.warn("{} RntbdResponseDecoder.exceptionCaught: {}", ctx.channel(), cause.getMessage(), cause); + super.exceptionCaught(ctx, cause); + } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/http/ReactorNettyClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/http/ReactorNettyClient.java index 488596e825d5..44e2d0045edb 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/http/ReactorNettyClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/http/ReactorNettyClient.java @@ -11,6 +11,8 @@ import io.netty.handler.codec.http.HttpMethod; import io.netty.handler.logging.LogLevel; import io.netty.resolver.DefaultAddressResolverGroup; +import io.netty.util.ReferenceCountUtil; +import io.netty.util.ResourceLeakDetector; import org.reactivestreams.Publisher; import org.reactivestreams.Subscription; import org.slf4j.Logger; @@ -39,7 +41,8 @@ * HttpClient that is implemented using reactor-netty. */ public class ReactorNettyClient implements HttpClient { - + private static final boolean leakDetectionDebuggingEnabled = ResourceLeakDetector.getLevel().ordinal() >= + ResourceLeakDetector.Level.ADVANCED.ordinal(); private static final String REACTOR_NETTY_REQUEST_RECORD_KEY = "reactorNettyRequestRecordKey"; private static final Logger logger = LoggerFactory.getLogger(ReactorNettyClient.class.getSimpleName()); @@ -348,7 +351,17 @@ public HttpHeaders headers() { public Mono body() { return ByteBufFlux .fromInbound( - bodyIntern().doOnDiscard(ByteBuf.class, io.netty.util.ReferenceCountUtil::safeRelease) + bodyIntern().doOnDiscard( + ByteBuf.class, + buf -> { + if (buf.refCnt() > 0) { + if (leakDetectionDebuggingEnabled) { + buf.touch("ReactorNettyHttpResponse.body - onDiscard - refCnt: " + buf.refCnt()); + logger.debug("ReactorNettyHttpResponse.body - onDiscard - refCnt: {}", buf.refCnt()); + } + ReferenceCountUtil.safeRelease(buf); + } + }) ) .aggregate() .doOnSubscribe(this::updateSubscriptionState); @@ -400,8 +413,19 @@ private void releaseOnNotSubscribedResponse(ReactorNettyResponseState reactorNet if (logger.isDebugEnabled()) { logger.debug("Releasing body, not yet subscribed"); } - this.bodyIntern() - .doOnNext(io.netty.util.ReferenceCountUtil::safeRelease) + + body() + .map(buf -> { + if (buf.refCnt() > 0) { + if (leakDetectionDebuggingEnabled) { + buf.touch("ReactorNettyHttpResponse.releaseOnNotSubscribedResponse - refCnt: " + buf.refCnt()); + logger.debug("ReactorNettyHttpResponse.releaseOnNotSubscribedResponse - refCnt: {}", buf.refCnt()); + } + ReferenceCountUtil.safeRelease(buf); + } + + return buf; + }) .subscribe(v -> {}, ex -> {}, () -> {}); } } diff --git a/sdk/cosmos/fabric-cosmos-spark-auth_3/pom.xml b/sdk/cosmos/fabric-cosmos-spark-auth_3/pom.xml index 2941fa16041d..bfd53130788c 100644 --- a/sdk/cosmos/fabric-cosmos-spark-auth_3/pom.xml +++ b/sdk/cosmos/fabric-cosmos-spark-auth_3/pom.xml @@ -506,6 +506,12 @@ maven-surefire-plugin 3.5.3 + + true + 1 + 256 + paranoid + **/*.* **/*Test.* @@ -513,6 +519,16 @@ **/*Spec.* true + + + surefire.testng.verbose + 2 + + + listener + com.azure.cosmos.CosmosNettyLeakDetectorFactory + + diff --git a/sdk/cosmos/tests.yml b/sdk/cosmos/tests.yml index 17af3836ec2d..69d782fcc9a0 100644 --- a/sdk/cosmos/tests.yml +++ b/sdk/cosmos/tests.yml @@ -33,7 +33,7 @@ extends: TestResultsFiles: '**/junitreports/TEST-*.xml' AdditionalVariables: - name: AdditionalArgs - value: '-DCOSMOS.CLIENT_TELEMETRY_ENDPOINT=$(cosmos-client-telemetry-endpoint) -DCOSMOS.CLIENT_TELEMETRY_COSMOS_ACCOUNT=$(cosmos-client-telemetry-cosmos-account)' + value: '-DCOSMOS.CLIENT_LEAK_DETECTION_ENABLED=true' - template: /eng/pipelines/templates/stages/archetype-sdk-tests-isolated.yml parameters: @@ -65,7 +65,7 @@ extends: TestResultsFiles: '**/junitreports/TEST-*.xml' AdditionalVariables: - name: AdditionalArgs - value: '-DCOSMOS.CLIENT_TELEMETRY_ENDPOINT=$(cosmos-client-telemetry-endpoint) -DCOSMOS.CLIENT_TELEMETRY_COSMOS_ACCOUNT=$(cosmos-client-telemetry-cosmos-account) -DCOSMOS.HTTP2_ENABLED=true' + value: '-DCOSMOS.CLIENT_LEAK_DETECTION_ENABLED=true -DCOSMOS.HTTP2_ENABLED=true' - template: /eng/pipelines/templates/stages/archetype-sdk-tests-isolated.yml parameters: @@ -97,7 +97,7 @@ extends: TestResultsFiles: '**/junitreports/TEST-*.xml' AdditionalVariables: - name: AdditionalArgs - value: '-DCOSMOS.CLIENT_TELEMETRY_ENDPOINT=$(cosmos-client-telemetry-endpoint) -DCOSMOS.CLIENT_TELEMETRY_COSMOS_ACCOUNT=$(cosmos-client-telemetry-cosmos-account) -DACCOUNT_HOST=$(thinclient-test-endpoint) -DACCOUNT_KEY=$(thinclient-test-key) -DCOSMOS.THINCLIENT_ENABLED=true -DCOSMOS.HTTP2_ENABLED=true' + value: '-DCOSMOS.CLIENT_LEAK_DETECTION_ENABLED=true -DACCOUNT_HOST=$(thinclient-test-endpoint) -DACCOUNT_KEY=$(thinclient-test-key) -DCOSMOS.THINCLIENT_ENABLED=true -DCOSMOS.HTTP2_ENABLED=true' - template: /eng/pipelines/templates/stages/archetype-sdk-tests-isolated.yml parameters: @@ -129,7 +129,7 @@ extends: TestResultsFiles: '**/junitreports/TEST-*.xml' AdditionalVariables: - name: AdditionalArgs - value: '-DCOSMOS.CLIENT_TELEMETRY_ENDPOINT=$(cosmos-client-telemetry-endpoint) -DCOSMOS.CLIENT_TELEMETRY_COSMOS_ACCOUNT=$(cosmos-client-telemetry-cosmos-account) -DACCOUNT_HOST=$(thin-client-canary-multi-region-session-endpoint) -DACCOUNT_KEY=$(thin-client-canary-multi-region-session-key) -DCOSMOS.THINCLIENT_ENABLED=true' + value: '-DCOSMOS.CLIENT_LEAK_DETECTION_ENABLED=true -DACCOUNT_HOST=$(thin-client-canary-multi-region-session-endpoint) -DACCOUNT_KEY=$(thin-client-canary-multi-region-session-key) -DCOSMOS.THINCLIENT_ENABLED=true' - template: /eng/pipelines/templates/stages/archetype-sdk-tests-isolated.yml parameters: @@ -161,7 +161,7 @@ extends: TestResultsFiles: '**/junitreports/TEST-*.xml' AdditionalVariables: - name: AdditionalArgs - value: '-DCOSMOS.CLIENT_TELEMETRY_ENDPOINT=$(cosmos-client-telemetry-endpoint) -DCOSMOS.CLIENT_TELEMETRY_COSMOS_ACCOUNT=$(cosmos-client-telemetry-cosmos-account) -DACCOUNT_HOST=$(thin-client-canary-multi-writer-session-endpoint) -DACCOUNT_KEY=$(thin-client-canary-multi-writer-session-key) -DCOSMOS.THINCLIENT_ENABLED=true' + value: '-DCOSMOS.CLIENT_LEAK_DETECTION_ENABLED=true -DACCOUNT_HOST=$(thin-client-canary-multi-writer-session-endpoint) -DACCOUNT_KEY=$(thin-client-canary-multi-writer-session-key) -DCOSMOS.THINCLIENT_ENABLED=true' - template: /eng/pipelines/templates/stages/archetype-sdk-tests-isolated.yml parameters: @@ -183,10 +183,10 @@ extends: safeName: azurespringdatacosmos TimeoutInMinutes: 90 TestGoals: 'verify' - TestOptions: '$(ProfileFlag) -DskipCompile=true -DskipTestCompile=true -DcreateSourcesJar=false' + TestOptions: '$(ProfileFlag) $(AdditionalArgs) -DskipCompile=true -DskipTestCompile=true -DcreateSourcesJar=false' AdditionalVariables: - name: AdditionalArgs - value: '-DCOSMOS.CLIENT_TELEMETRY_ENDPOINT=$(cosmos-client-telemetry-endpoint) -DCOSMOS.CLIENT_TELEMETRY_COSMOS_ACCOUNT=$(cosmos-client-telemetry-cosmos-account)' + value: '-DCOSMOS.CLIENT_LEAK_DETECTION_ENABLED=false' - template: /eng/pipelines/templates/stages/archetype-sdk-tests-isolated.yml parameters: @@ -212,5 +212,5 @@ extends: TestOptions: '$(ProfileFlag) $(AdditionalArgs)' AdditionalVariables: - name: AdditionalArgs - value: '-DCOSMOS.CLIENT_TELEMETRY_ENDPOINT=$(cosmos-client-telemetry-endpoint) -DCOSMOS.CLIENT_TELEMETRY_COSMOS_ACCOUNT=$(cosmos-client-telemetry-cosmos-account)' + value: '-DCOSMOS.CLIENT_LEAK_DETECTION_ENABLED=true' From 896ec7674cff39c654194333fd734d23494ccdf1 Mon Sep 17 00:00:00 2001 From: v-huizhu2 Date: Thu, 20 Nov 2025 16:52:28 +0800 Subject: [PATCH 04/26] mgmt network, update api-version to 2025-03-01 (#47331) * feat(network): update api spec to package-2025-03-01 - Updated network resource manager API specification - Bumped package version from 2025-01-01 to 2025-03-01 - Maintained existing inner class configurations - Preserved sync stack disabled setting - Kept deprecation note for ApplicationGatewaySku * gulp codegen * release(network): update azure-resourcemanager-network to version 2.57.0 - Updated version in version_client.txt from 2.56.0 to 2.57.0 - Updated README.md to reflect new stable version 2.57.0 - Updated pom.xml to use stable version 2.57.0 instead of beta - Updated azure-resourcemanager dependency reference to 2.57.0 * chore(network): update api-version to 2025-03-01 - Updated `api-version` to `2025-03-01` in network changelog - Aligned resourcemanager dependency with latest api-version - Removed beta release notes and marked as stable release - Consolidated changelog entries under dependency updates section * chore(assets): update network manager asset tag - Updated asset tag from previous version to latest - Maintains consistency with azure resource manager network module - No functional changes, only metadata update * feat(versioning): add azure-resourcemanager-cosmos version entry - Added unreleased version entry for azure-resourcemanager-cosmos - Set version to 2.54.0 in version_client.txt - Maintained consistent formatting with other entries * chore(versioning): remove cosmos resource manager beta version entry - Removed unreleased Cosmos Resource Manager version entry - Cleaned up version client tracking file - Updated dependency version management list * chore(revapi): update revapi configuration to ignore removed fields - Ignore removal of ApplicationGatewayWafRuleSensitivityTypes.NONE - Ignore removal of SensitivityType.NONE - Mark removed fields as intentionally cleaned up in newer version * fix(revapi): remove unnecessary ignore flags for removed fields - Removed redundant 'ignore' flag for ApplicationGatewayWafRuleSensitivityTypes.NONE - Removed redundant 'ignore' flag for SensitivityType.NONE - Cleanup obsolete field removal justifications - Ensure proper detection of breaking changes in API evolution - Maintain accurate API compatibility checking configuration * fix(network): update justification for removed sensitivity fields - Update justification for ApplicationGatewayWafRuleSensitivityTypes.NONE removal - Update justification for SensitivityType.NONE removal - Both fields now specify removal due to DDoS ruleset changes instead of general cleanup --- eng/lintingconfigs/revapi/track2/revapi.json | 10 + eng/versioning/version_client.txt | 3 +- .../CHANGELOG.md | 10 +- .../azure-resourcemanager-network/README.md | 2 +- .../azure-resourcemanager-network/assets.json | 2 +- .../azure-resourcemanager-network/pom.xml | 2 +- .../fluent/PublicIpAddressesClient.java | 247 ++++++++ ...raJwtValidationConfigPropertiesFormat.java | 210 ++++++ .../models/ApplicationGatewayInner.java | 29 + .../ApplicationGatewayPropertiesFormat.java | 42 ++ ...icationGatewayRequestRoutingRuleInner.java | 26 + ...wayRequestRoutingRulePropertiesFormat.java | 32 + .../fluent/models/DdosCustomPolicyInner.java | 51 ++ .../DdosCustomPolicyPropertiesFormat.java | 74 ++- .../DdosDetectionRulePropertiesFormat.java | 147 +++++ .../models/FlowLogInformationInner.java | 31 + .../network/fluent/models/FlowLogInner.java | 31 + .../fluent/models/FlowLogProperties.java | 39 ++ .../models/FlowLogPropertiesFormat.java | 39 ++ .../fluent/models/PrivateEndpointInner.java | 26 + .../PrivateEndpointPropertiesInner.java | 32 + .../AdminRuleCollectionsClientImpl.java | 16 +- .../implementation/AdminRulesClientImpl.java | 16 +- ...yPrivateEndpointConnectionsClientImpl.java | 16 +- ...GatewayPrivateLinkResourcesClientImpl.java | 4 +- ...nGatewayWafDynamicManifestsClientImpl.java | 4 +- ...WafDynamicManifestsDefaultsClientImpl.java | 4 +- .../ApplicationGatewaysClientImpl.java | 68 +- .../ApplicationSecurityGroupsClientImpl.java | 24 +- .../AvailableDelegationsClientImpl.java | 4 +- .../AvailableEndpointServicesClientImpl.java | 4 +- ...ailablePrivateEndpointTypesClientImpl.java | 8 +- ...bleResourceGroupDelegationsClientImpl.java | 4 +- .../AvailableServiceAliasesClientImpl.java | 8 +- .../AzureFirewallFqdnTagsClientImpl.java | 4 +- .../AzureFirewallsClientImpl.java | 36 +- .../BastionHostsClientImpl.java | 24 +- .../BgpServiceCommunitiesClientImpl.java | 4 +- .../ConfigurationPolicyGroupsClientImpl.java | 16 +- .../ConnectionMonitorsClientImpl.java | 24 +- .../ConnectivityConfigurationsClientImpl.java | 16 +- .../CustomIpPrefixesClientImpl.java | 24 +- .../DdosCustomPoliciesClientImpl.java | 16 +- .../DdosProtectionPlansClientImpl.java | 24 +- .../DefaultSecurityRulesClientImpl.java | 8 +- .../DscpConfigurationsClientImpl.java | 20 +- ...sRouteCircuitAuthorizationsClientImpl.java | 16 +- ...ressRouteCircuitConnectionsClientImpl.java | 16 +- ...ExpressRouteCircuitPeeringsClientImpl.java | 16 +- .../ExpressRouteCircuitsClientImpl.java | 44 +- .../ExpressRouteConnectionsClientImpl.java | 16 +- ...outeCrossConnectionPeeringsClientImpl.java | 16 +- ...xpressRouteCrossConnectionsClientImpl.java | 32 +- .../ExpressRouteGatewaysClientImpl.java | 24 +- .../ExpressRouteLinksClientImpl.java | 8 +- ...ressRoutePortAuthorizationsClientImpl.java | 16 +- .../ExpressRoutePortsClientImpl.java | 28 +- .../ExpressRoutePortsLocationsClientImpl.java | 8 +- ...RouteProviderPortsLocationsClientImpl.java | 4 +- ...xpressRouteServiceProvidersClientImpl.java | 4 +- .../FirewallPoliciesClientImpl.java | 24 +- .../FirewallPolicyDeploymentsClientImpl.java | 4 +- .../FirewallPolicyDraftsClientImpl.java | 12 +- ...irewallPolicyIdpsSignaturesClientImpl.java | 4 +- ...yIdpsSignaturesFilterValuesClientImpl.java | 4 +- ...licyIdpsSignaturesOverridesClientImpl.java | 16 +- ...cyRuleCollectionGroupDraftsClientImpl.java | 12 +- ...lPolicyRuleCollectionGroupsClientImpl.java | 16 +- .../implementation/FlowLogsClientImpl.java | 20 +- .../HubRouteTablesClientImpl.java | 16 +- ...ubVirtualNetworkConnectionsClientImpl.java | 16 +- .../InboundNatRulesClientImpl.java | 16 +- ...boundSecurityRuleOperationsClientImpl.java | 8 +- .../IpAllocationsClientImpl.java | 24 +- .../implementation/IpGroupsClientImpl.java | 24 +- .../implementation/IpamPoolsClientImpl.java | 28 +- ...BalancerBackendAddressPoolsClientImpl.java | 16 +- ...cerFrontendIpConfigurationsClientImpl.java | 8 +- ...dBalancerLoadBalancingRulesClientImpl.java | 12 +- ...adBalancerNetworkInterfacesClientImpl.java | 4 +- .../LoadBalancerOutboundRulesClientImpl.java | 8 +- .../LoadBalancerProbesClientImpl.java | 8 +- .../LoadBalancersClientImpl.java | 36 +- .../LocalNetworkGatewaysClientImpl.java | 20 +- ...upNetworkManagerConnectionsClientImpl.java | 16 +- .../implementation/NatGatewaysClientImpl.java | 24 +- .../implementation/NatRulesClientImpl.java | 16 +- .../NetworkGroupsClientImpl.java | 16 +- ...rkInterfaceIpConfigurationsClientImpl.java | 8 +- ...tworkInterfaceLoadBalancersClientImpl.java | 4 +- ...kInterfaceTapConfigurationsClientImpl.java | 16 +- .../NetworkInterfacesClientImpl.java | 44 +- .../NetworkManagementClientImpl.java | 56 +- .../NetworkManagerCommitsClientImpl.java | 4 +- ...rDeploymentStatusOperationsClientImpl.java | 4 +- ...anagerRoutingConfigurationsClientImpl.java | 16 +- .../NetworkManagersClientImpl.java | 24 +- .../NetworkProfilesClientImpl.java | 24 +- .../NetworkSecurityGroupsClientImpl.java | 24 +- ...ecurityPerimeterAccessRulesClientImpl.java | 20 +- ...eterAssociableResourceTypesClientImpl.java | 4 +- ...curityPerimeterAssociationsClientImpl.java | 20 +- ...rityPerimeterLinkReferencesClientImpl.java | 12 +- ...tworkSecurityPerimeterLinksClientImpl.java | 16 +- ...imeterLoggingConfigurationsClientImpl.java | 16 +- ...yPerimeterOperationStatusesClientImpl.java | 4 +- ...rkSecurityPerimeterProfilesClientImpl.java | 16 +- ...ecurityPerimeterServiceTagsClientImpl.java | 4 +- .../NetworkSecurityPerimetersClientImpl.java | 24 +- ...VirtualApplianceConnectionsClientImpl.java | 16 +- .../NetworkVirtualAppliancesClientImpl.java | 36 +- .../NetworkWatchersClientImpl.java | 72 +-- .../implementation/OperationsClientImpl.java | 4 +- .../P2SVpnGatewaysClientImpl.java | 44 +- .../PacketCapturesClientImpl.java | 24 +- ...ressRouteCircuitConnectionsClientImpl.java | 8 +- .../PrivateDnsZoneGroupsClientImpl.java | 16 +- .../PrivateEndpointsClientImpl.java | 20 +- .../PrivateLinkServicesClientImpl.java | 52 +- .../PublicIpAddressesClientImpl.java | 597 +++++++++++++++++- .../PublicIpPrefixesClientImpl.java | 24 +- ...ReachabilityAnalysisIntentsClientImpl.java | 16 +- .../ReachabilityAnalysisRunsClientImpl.java | 16 +- .../ResourceNavigationLinksClientImpl.java | 4 +- .../RouteFilterRulesClientImpl.java | 16 +- .../RouteFiltersClientImpl.java | 24 +- .../implementation/RouteMapsClientImpl.java | 16 +- .../implementation/RouteTablesClientImpl.java | 24 +- .../implementation/RoutesClientImpl.java | 16 +- .../RoutingIntentsClientImpl.java | 16 +- .../RoutingRuleCollectionsClientImpl.java | 16 +- .../RoutingRulesClientImpl.java | 16 +- .../ScopeConnectionsClientImpl.java | 16 +- ...SecurityAdminConfigurationsClientImpl.java | 16 +- .../SecurityPartnerProvidersClientImpl.java | 24 +- .../SecurityRulesClientImpl.java | 16 +- .../SecurityUserConfigurationsClientImpl.java | 16 +- ...SecurityUserRuleCollectionsClientImpl.java | 16 +- .../SecurityUserRulesClientImpl.java | 16 +- .../ServiceAssociationLinksClientImpl.java | 4 +- .../ServiceEndpointPoliciesClientImpl.java | 24 +- ...ceEndpointPolicyDefinitionsClientImpl.java | 16 +- .../ServiceTagInformationsClientImpl.java | 4 +- .../implementation/ServiceTagsClientImpl.java | 4 +- .../implementation/StaticCidrsClientImpl.java | 16 +- .../StaticMembersClientImpl.java | 16 +- .../implementation/SubnetsClientImpl.java | 24 +- ...onNetworkManagerConnectionsClientImpl.java | 16 +- .../implementation/UsagesClientImpl.java | 4 +- .../VerifierWorkspacesClientImpl.java | 20 +- .../implementation/VipSwapsClientImpl.java | 12 +- .../VirtualApplianceSitesClientImpl.java | 16 +- .../VirtualApplianceSkusClientImpl.java | 8 +- .../VirtualHubBgpConnectionsClientImpl.java | 24 +- .../VirtualHubIpConfigurationsClientImpl.java | 16 +- .../VirtualHubRouteTableV2SClientImpl.java | 16 +- .../implementation/VirtualHubsClientImpl.java | 36 +- ...alNetworkGatewayConnectionsClientImpl.java | 48 +- ...rtualNetworkGatewayNatRulesClientImpl.java | 16 +- .../VirtualNetworkGatewaysClientImpl.java | 132 ++-- .../VirtualNetworkPeeringsClientImpl.java | 16 +- .../VirtualNetworkTapsClientImpl.java | 24 +- .../VirtualNetworksClientImpl.java | 36 +- .../VirtualRouterPeeringsClientImpl.java | 16 +- .../VirtualRoutersClientImpl.java | 20 +- .../implementation/VirtualWansClientImpl.java | 24 +- .../VpnConnectionsClientImpl.java | 24 +- .../implementation/VpnGatewaysClientImpl.java | 36 +- .../VpnLinkConnectionsClientImpl.java | 28 +- ...nsAssociatedWithVirtualWansClientImpl.java | 4 +- .../VpnServerConfigurationsClientImpl.java | 28 +- .../VpnSiteLinkConnectionsClientImpl.java | 4 +- .../VpnSiteLinksClientImpl.java | 8 +- .../implementation/VpnSitesClientImpl.java | 24 +- .../VpnSitesConfigurationsClientImpl.java | 4 +- ...ApplicationFirewallPoliciesClientImpl.java | 20 +- .../WebCategoriesClientImpl.java | 8 +- ...icationGatewayClientAuthConfiguration.java | 31 + ...ionGatewayClientAuthVerificationModes.java | 52 ++ ...cationGatewayEntraJwtValidationConfig.java | 251 ++++++++ ...ationGatewayUnAuthorizedRequestAction.java | 52 ++ ...icationGatewayWafRuleSensitivityTypes.java | 5 - .../network/models/DdosDetectionMode.java | 46 ++ .../network/models/DdosDetectionRule.java | 213 +++++++ .../network/models/DdosTrafficType.java | 56 ++ ...sassociateCloudServicePublicIpRequest.java | 108 ++++ .../network/models/IsRollback.java | 51 ++ .../models/PrivateEndpointIpVersionType.java | 56 ++ ...rveCloudServicePublicIpAddressRequest.java | 105 +++ .../network/models/SensitivityType.java | 5 - .../network/models/TrafficDetectionRule.java | 123 ++++ sdk/resourcemanager/api-specs.json | 2 +- .../azure-resourcemanager/CHANGELOG.md | 2 +- .../azure-resourcemanager/pom.xml | 2 +- ...nRuleCollectionsCreateOrUpdateSamples.java | 2 +- .../AdminRuleCollectionsDeleteSamples.java | 2 +- .../AdminRuleCollectionsGetSamples.java | 2 +- .../AdminRuleCollectionsListSamples.java | 2 +- .../AdminRulesCreateOrUpdateSamples.java | 4 +- .../generated/AdminRulesDeleteSamples.java | 2 +- .../generated/AdminRulesGetSamples.java | 4 +- .../generated/AdminRulesListSamples.java | 2 +- ...ivateEndpointConnectionsDeleteSamples.java | 2 +- ...yPrivateEndpointConnectionsGetSamples.java | 2 +- ...PrivateEndpointConnectionsListSamples.java | 2 +- ...ivateEndpointConnectionsUpdateSamples.java | 2 +- ...atewayPrivateLinkResourcesListSamples.java | 2 +- ...yWafDynamicManifestsDefaultGetSamples.java | 2 +- ...nGatewayWafDynamicManifestsGetSamples.java | 2 +- ...nGatewaysBackendHealthOnDemandSamples.java | 2 +- ...plicationGatewaysBackendHealthSamples.java | 2 +- ...licationGatewaysCreateOrUpdateSamples.java | 13 +- .../ApplicationGatewaysDeleteSamples.java | 2 +- ...tionGatewaysGetByResourceGroupSamples.java | 2 +- ...GatewaysGetSslPredefinedPolicySamples.java | 2 +- ...aysListAvailableRequestHeadersSamples.java | 2 +- ...ysListAvailableResponseHeadersSamples.java | 2 +- ...ysListAvailableServerVariablesSamples.java | 2 +- ...atewaysListAvailableSslOptionsSamples.java | 2 +- ...AvailableSslPredefinedPoliciesSamples.java | 2 +- ...tewaysListAvailableWafRuleSetsSamples.java | 2 +- ...ionGatewaysListByResourceGroupSamples.java | 2 +- .../ApplicationGatewaysListSamples.java | 2 +- .../ApplicationGatewaysStartSamples.java | 2 +- .../ApplicationGatewaysStopSamples.java | 2 +- .../ApplicationGatewaysUpdateTagsSamples.java | 2 +- ...onSecurityGroupsCreateOrUpdateSamples.java | 2 +- ...pplicationSecurityGroupsDeleteSamples.java | 2 +- ...curityGroupsGetByResourceGroupSamples.java | 2 +- ...urityGroupsListByResourceGroupSamples.java | 2 +- .../ApplicationSecurityGroupsListSamples.java | 2 +- ...cationSecurityGroupsUpdateTagsSamples.java | 2 +- .../AvailableDelegationsListSamples.java | 2 +- .../AvailableEndpointServicesListSamples.java | 2 +- ...dpointTypesListByResourceGroupSamples.java | 2 +- ...ilablePrivateEndpointTypesListSamples.java | 2 +- ...leResourceGroupDelegationsListSamples.java | 2 +- ...viceAliasesListByResourceGroupSamples.java | 2 +- .../AvailableServiceAliasesListSamples.java | 2 +- .../AzureFirewallFqdnTagsListSamples.java | 2 +- .../AzureFirewallsCreateOrUpdateSamples.java | 12 +- .../AzureFirewallsDeleteSamples.java | 2 +- ...ureFirewallsGetByResourceGroupSamples.java | 10 +- ...reFirewallsListByResourceGroupSamples.java | 2 +- ...reFirewallsListLearnedPrefixesSamples.java | 2 +- .../generated/AzureFirewallsListSamples.java | 2 +- ...irewallsPacketCaptureOperationSamples.java | 2 +- .../AzureFirewallsPacketCaptureSamples.java | 2 +- .../AzureFirewallsUpdateTagsSamples.java | 2 +- .../BastionHostsCreateOrUpdateSamples.java | 8 +- .../generated/BastionHostsDeleteSamples.java | 4 +- ...BastionHostsGetByResourceGroupSamples.java | 8 +- ...astionHostsListByResourceGroupSamples.java | 2 +- .../generated/BastionHostsListSamples.java | 2 +- .../BastionHostsUpdateTagsSamples.java | 2 +- .../BgpServiceCommunitiesListSamples.java | 2 +- ...tionPolicyGroupsCreateOrUpdateSamples.java | 2 +- ...onfigurationPolicyGroupsDeleteSamples.java | 2 +- .../ConfigurationPolicyGroupsGetSamples.java | 2 +- ...psListByVpnServerConfigurationSamples.java | 2 +- ...nnectionMonitorsCreateOrUpdateSamples.java | 6 +- .../ConnectionMonitorsDeleteSamples.java | 2 +- .../ConnectionMonitorsGetSamples.java | 2 +- .../ConnectionMonitorsListSamples.java | 2 +- .../ConnectionMonitorsStopSamples.java | 2 +- .../ConnectionMonitorsUpdateTagsSamples.java | 2 +- ...tyConfigurationsCreateOrUpdateSamples.java | 2 +- ...nnectivityConfigurationsDeleteSamples.java | 2 +- .../ConnectivityConfigurationsGetSamples.java | 2 +- ...ConnectivityConfigurationsListSamples.java | 2 +- ...CustomIpPrefixesCreateOrUpdateSamples.java | 2 +- .../CustomIpPrefixesDeleteSamples.java | 2 +- ...omIpPrefixesGetByResourceGroupSamples.java | 2 +- ...mIpPrefixesListByResourceGroupSamples.java | 2 +- .../CustomIpPrefixesListSamples.java | 2 +- .../CustomIpPrefixesUpdateTagsSamples.java | 2 +- ...osCustomPoliciesCreateOrUpdateSamples.java | 14 +- .../DdosCustomPoliciesDeleteSamples.java | 2 +- ...stomPoliciesGetByResourceGroupSamples.java | 2 +- .../DdosCustomPoliciesUpdateTagsSamples.java | 2 +- ...sProtectionPlansCreateOrUpdateSamples.java | 2 +- .../DdosProtectionPlansDeleteSamples.java | 2 +- ...tectionPlansGetByResourceGroupSamples.java | 2 +- ...ectionPlansListByResourceGroupSamples.java | 2 +- .../DdosProtectionPlansListSamples.java | 2 +- .../DdosProtectionPlansUpdateTagsSamples.java | 2 +- .../DefaultSecurityRulesGetSamples.java | 2 +- .../DefaultSecurityRulesListSamples.java | 2 +- ...scpConfigurationCreateOrUpdateSamples.java | 2 +- .../DscpConfigurationDeleteSamples.java | 2 +- ...onfigurationGetByResourceGroupSamples.java | 2 +- ...nfigurationListByResourceGroupSamples.java | 2 +- .../DscpConfigurationListSamples.java | 2 +- ...itAuthorizationsCreateOrUpdateSamples.java | 2 +- ...uteCircuitAuthorizationsDeleteSamples.java | 2 +- ...sRouteCircuitAuthorizationsGetSamples.java | 2 +- ...RouteCircuitAuthorizationsListSamples.java | 2 +- ...rcuitConnectionsCreateOrUpdateSamples.java | 2 +- ...sRouteCircuitConnectionsDeleteSamples.java | 2 +- ...ressRouteCircuitConnectionsGetSamples.java | 2 +- ...essRouteCircuitConnectionsListSamples.java | 2 +- ...eCircuitPeeringsCreateOrUpdateSamples.java | 2 +- ...ressRouteCircuitPeeringsDeleteSamples.java | 2 +- ...ExpressRouteCircuitPeeringsGetSamples.java | 2 +- ...xpressRouteCircuitPeeringsListSamples.java | 2 +- ...essRouteCircuitsCreateOrUpdateSamples.java | 4 +- .../ExpressRouteCircuitsDeleteSamples.java | 2 +- ...outeCircuitsGetByResourceGroupSamples.java | 2 +- ...ssRouteCircuitsGetPeeringStatsSamples.java | 2 +- .../ExpressRouteCircuitsGetStatsSamples.java | 2 +- ...pressRouteCircuitsListArpTableSamples.java | 2 +- ...uteCircuitsListByResourceGroupSamples.java | 2 +- ...ssRouteCircuitsListRoutesTableSamples.java | 2 +- ...CircuitsListRoutesTableSummarySamples.java | 2 +- .../ExpressRouteCircuitsListSamples.java | 2 +- ...ExpressRouteCircuitsUpdateTagsSamples.java | 2 +- ...RouteConnectionsCreateOrUpdateSamples.java | 2 +- .../ExpressRouteConnectionsDeleteSamples.java | 2 +- .../ExpressRouteConnectionsGetSamples.java | 2 +- .../ExpressRouteConnectionsListSamples.java | 2 +- ...nnectionPeeringsCreateOrUpdateSamples.java | 2 +- ...eCrossConnectionPeeringsDeleteSamples.java | 2 +- ...outeCrossConnectionPeeringsGetSamples.java | 2 +- ...uteCrossConnectionPeeringsListSamples.java | 2 +- ...CrossConnectionsCreateOrUpdateSamples.java | 2 +- ...sConnectionsGetByResourceGroupSamples.java | 2 +- ...teCrossConnectionsListArpTableSamples.java | 2 +- ...ConnectionsListByResourceGroupSamples.java | 2 +- ...rossConnectionsListRoutesTableSamples.java | 2 +- ...nectionsListRoutesTableSummarySamples.java | 2 +- ...pressRouteCrossConnectionsListSamples.java | 2 +- ...outeCrossConnectionsUpdateTagsSamples.java | 2 +- ...essRouteGatewaysCreateOrUpdateSamples.java | 2 +- .../ExpressRouteGatewaysDeleteSamples.java | 2 +- ...outeGatewaysGetByResourceGroupSamples.java | 2 +- ...uteGatewaysListByResourceGroupSamples.java | 2 +- ...outeGatewaysListBySubscriptionSamples.java | 2 +- ...ExpressRouteGatewaysUpdateTagsSamples.java | 2 +- .../ExpressRouteLinksGetSamples.java | 2 +- .../ExpressRouteLinksListSamples.java | 2 +- ...rtAuthorizationsCreateOrUpdateSamples.java | 2 +- ...sRoutePortAuthorizationsDeleteSamples.java | 2 +- ...ressRoutePortAuthorizationsGetSamples.java | 2 +- ...essRoutePortAuthorizationsListSamples.java | 2 +- ...xpressRoutePortsCreateOrUpdateSamples.java | 4 +- .../ExpressRoutePortsDeleteSamples.java | 2 +- .../ExpressRoutePortsGenerateLoaSamples.java | 2 +- ...ssRoutePortsGetByResourceGroupSamples.java | 2 +- ...sRoutePortsListByResourceGroupSamples.java | 2 +- .../ExpressRoutePortsListSamples.java | 2 +- .../ExpressRoutePortsLocationsGetSamples.java | 2 +- ...ExpressRoutePortsLocationsListSamples.java | 2 +- .../ExpressRoutePortsUpdateTagsSamples.java | 2 +- ...RouteProviderPortsLocationListSamples.java | 2 +- ...pressRouteServiceProvidersListSamples.java | 2 +- ...FirewallPoliciesCreateOrUpdateSamples.java | 2 +- .../FirewallPoliciesDeleteSamples.java | 2 +- ...wallPoliciesGetByResourceGroupSamples.java | 2 +- ...allPoliciesListByResourceGroupSamples.java | 2 +- .../FirewallPoliciesListSamples.java | 2 +- .../FirewallPoliciesUpdateTagsSamples.java | 2 +- ...irewallPolicyDeploymentsDeploySamples.java | 2 +- ...wallPolicyDraftsCreateOrUpdateSamples.java | 2 +- .../FirewallPolicyDraftsDeleteSamples.java | 2 +- .../FirewallPolicyDraftsGetSamples.java | 2 +- ...IdpsSignaturesFilterValuesListSamples.java | 2 +- ...rewallPolicyIdpsSignaturesListSamples.java | 2 +- ...licyIdpsSignaturesOverridesGetSamples.java | 2 +- ...icyIdpsSignaturesOverridesListSamples.java | 2 +- ...cyIdpsSignaturesOverridesPatchSamples.java | 2 +- ...licyIdpsSignaturesOverridesPutSamples.java | 2 +- ...ctionGroupDraftsCreateOrUpdateSamples.java | 2 +- ...uleCollectionGroupDraftsDeleteSamples.java | 2 +- ...cyRuleCollectionGroupDraftsGetSamples.java | 2 +- ...CollectionGroupsCreateOrUpdateSamples.java | 10 +- ...licyRuleCollectionGroupsDeleteSamples.java | 2 +- ...lPolicyRuleCollectionGroupsGetSamples.java | 8 +- ...PolicyRuleCollectionGroupsListSamples.java | 6 +- .../FlowLogsCreateOrUpdateSamples.java | 3 +- .../generated/FlowLogsDeleteSamples.java | 2 +- .../network/generated/FlowLogsGetSamples.java | 2 +- .../generated/FlowLogsListSamples.java | 2 +- .../generated/FlowLogsUpdateTagsSamples.java | 2 +- .../HubRouteTablesCreateOrUpdateSamples.java | 2 +- .../HubRouteTablesDeleteSamples.java | 2 +- .../generated/HubRouteTablesGetSamples.java | 2 +- .../generated/HubRouteTablesListSamples.java | 2 +- ...tworkConnectionsCreateOrUpdateSamples.java | 2 +- ...irtualNetworkConnectionsDeleteSamples.java | 2 +- ...ubVirtualNetworkConnectionsGetSamples.java | 2 +- ...bVirtualNetworkConnectionsListSamples.java | 2 +- .../InboundNatRulesCreateOrUpdateSamples.java | 2 +- .../InboundNatRulesDeleteSamples.java | 2 +- .../generated/InboundNatRulesGetSamples.java | 2 +- .../generated/InboundNatRulesListSamples.java | 2 +- ...ityRuleOperationCreateOrUpdateSamples.java | 2 +- ...nboundSecurityRuleOperationGetSamples.java | 2 +- .../IpAllocationsCreateOrUpdateSamples.java | 2 +- .../generated/IpAllocationsDeleteSamples.java | 2 +- ...pAllocationsGetByResourceGroupSamples.java | 2 +- ...AllocationsListByResourceGroupSamples.java | 2 +- .../generated/IpAllocationsListSamples.java | 2 +- .../IpAllocationsUpdateTagsSamples.java | 2 +- .../IpGroupsCreateOrUpdateSamples.java | 2 +- .../generated/IpGroupsDeleteSamples.java | 2 +- .../IpGroupsGetByResourceGroupSamples.java | 2 +- .../IpGroupsListByResourceGroupSamples.java | 2 +- .../generated/IpGroupsListSamples.java | 2 +- .../IpGroupsUpdateGroupsSamples.java | 2 +- .../generated/IpamPoolsCreateSamples.java | 2 +- .../generated/IpamPoolsDeleteSamples.java | 2 +- .../IpamPoolsGetPoolUsageSamples.java | 2 +- .../generated/IpamPoolsGetSamples.java | 2 +- ...amPoolsListAssociatedResourcesSamples.java | 2 +- .../generated/IpamPoolsListSamples.java | 2 +- .../generated/IpamPoolsUpdateSamples.java | 2 +- ...kendAddressPoolsCreateOrUpdateSamples.java | 2 +- ...ancerBackendAddressPoolsDeleteSamples.java | 2 +- ...BalancerBackendAddressPoolsGetSamples.java | 4 +- ...alancerBackendAddressPoolsListSamples.java | 4 +- ...cerFrontendIpConfigurationsGetSamples.java | 2 +- ...erFrontendIpConfigurationsListSamples.java | 2 +- ...dBalancerLoadBalancingRulesGetSamples.java | 2 +- ...lancerLoadBalancingRulesHealthSamples.java | 2 +- ...BalancerLoadBalancingRulesListSamples.java | 2 +- ...dBalancerNetworkInterfacesListSamples.java | 4 +- .../LoadBalancerOutboundRulesGetSamples.java | 2 +- .../LoadBalancerOutboundRulesListSamples.java | 2 +- .../LoadBalancerProbesGetSamples.java | 2 +- .../LoadBalancerProbesListSamples.java | 2 +- .../LoadBalancersCreateOrUpdateSamples.java | 20 +- .../generated/LoadBalancersDeleteSamples.java | 2 +- ...oadBalancersGetByResourceGroupSamples.java | 4 +- ...adBalancersListByResourceGroupSamples.java | 2 +- ...ListInboundNatRulePortMappingsSamples.java | 2 +- .../generated/LoadBalancersListSamples.java | 2 +- .../LoadBalancersMigrateToIpBasedSamples.java | 2 +- ...BalancersSwapPublicIpAddressesSamples.java | 2 +- .../LoadBalancersUpdateTagsSamples.java | 2 +- ...lNetworkGatewaysCreateOrUpdateSamples.java | 2 +- .../LocalNetworkGatewaysDeleteSamples.java | 2 +- ...workGatewaysGetByResourceGroupSamples.java | 2 +- ...orkGatewaysListByResourceGroupSamples.java | 2 +- ...LocalNetworkGatewaysUpdateTagsSamples.java | 2 +- ...nagerConnectionsCreateOrUpdateSamples.java | 2 +- ...etworkManagerConnectionsDeleteSamples.java | 2 +- ...upNetworkManagerConnectionsGetSamples.java | 2 +- ...pNetworkManagerConnectionsListSamples.java | 2 +- .../NatGatewaysCreateOrUpdateSamples.java | 4 +- .../generated/NatGatewaysDeleteSamples.java | 2 +- .../NatGatewaysGetByResourceGroupSamples.java | 4 +- ...NatGatewaysListByResourceGroupSamples.java | 2 +- .../generated/NatGatewaysListSamples.java | 2 +- .../NatGatewaysUpdateTagsSamples.java | 4 +- .../NatRulesCreateOrUpdateSamples.java | 2 +- .../generated/NatRulesDeleteSamples.java | 2 +- .../network/generated/NatRulesGetSamples.java | 2 +- .../NatRulesListByVpnGatewaySamples.java | 2 +- .../NetworkGroupsCreateOrUpdateSamples.java | 2 +- .../generated/NetworkGroupsDeleteSamples.java | 2 +- .../generated/NetworkGroupsGetSamples.java | 2 +- .../generated/NetworkGroupsListSamples.java | 2 +- ...rkInterfaceIpConfigurationsGetSamples.java | 2 +- ...kInterfaceIpConfigurationsListSamples.java | 2 +- ...workInterfaceLoadBalancersListSamples.java | 2 +- ...apConfigurationsCreateOrUpdateSamples.java | 2 +- ...terfaceTapConfigurationsDeleteSamples.java | 2 +- ...kInterfaceTapConfigurationsGetSamples.java | 2 +- ...InterfaceTapConfigurationsListSamples.java | 2 +- ...etworkInterfacesCreateOrUpdateSamples.java | 4 +- .../NetworkInterfacesDeleteSamples.java | 2 +- ...rkInterfacesGetByResourceGroupSamples.java | 2 +- ...etCloudServiceNetworkInterfaceSamples.java | 2 +- ...terfacesGetEffectiveRouteTableSamples.java | 2 +- ...MachineScaleSetIpConfigurationSamples.java | 2 +- ...achineScaleSetNetworkInterfaceSamples.java | 2 +- ...kInterfacesListByResourceGroupSamples.java | 2 +- ...tCloudServiceNetworkInterfacesSamples.java | 2 +- ...eRoleInstanceNetworkInterfacesSamples.java | 2 +- ...EffectiveNetworkSecurityGroupsSamples.java | 2 +- .../NetworkInterfacesListSamples.java | 2 +- ...achineScaleSetIpConfigurationsSamples.java | 2 +- ...chineScaleSetNetworkInterfacesSamples.java | 2 +- ...ineScaleSetVMNetworkInterfacesSamples.java | 2 +- .../NetworkInterfacesUpdateTagsSamples.java | 2 +- .../NetworkManagerCommitsPostSamples.java | 2 +- ...rDeploymentStatusOperationListSamples.java | 2 +- ...ngConfigurationsCreateOrUpdateSamples.java | 2 +- ...gerRoutingConfigurationsDeleteSamples.java | 2 +- ...anagerRoutingConfigurationsGetSamples.java | 2 +- ...nagerRoutingConfigurationsListSamples.java | 2 +- .../NetworkManagersCreateOrUpdateSamples.java | 2 +- .../NetworkManagersDeleteSamples.java | 2 +- ...workManagersGetByResourceGroupSamples.java | 2 +- ...orkManagersListByResourceGroupSamples.java | 2 +- .../generated/NetworkManagersListSamples.java | 2 +- .../NetworkManagersPatchSamples.java | 2 +- .../NetworkProfilesCreateOrUpdateSamples.java | 2 +- .../NetworkProfilesDeleteSamples.java | 2 +- ...workProfilesGetByResourceGroupSamples.java | 4 +- ...orkProfilesListByResourceGroupSamples.java | 2 +- .../generated/NetworkProfilesListSamples.java | 2 +- .../NetworkProfilesUpdateTagsSamples.java | 2 +- ...rkSecurityGroupsCreateOrUpdateSamples.java | 4 +- .../NetworkSecurityGroupsDeleteSamples.java | 2 +- ...curityGroupsGetByResourceGroupSamples.java | 2 +- ...urityGroupsListByResourceGroupSamples.java | 2 +- .../NetworkSecurityGroupsListSamples.java | 2 +- ...etworkSecurityGroupsUpdateTagsSamples.java | 2 +- ...meterAccessRulesCreateOrUpdateSamples.java | 2 +- ...rityPerimeterAccessRulesDeleteSamples.java | 2 +- ...ecurityPerimeterAccessRulesGetSamples.java | 2 +- ...curityPerimeterAccessRulesListSamples.java | 2 +- ...yPerimeterAccessRulesReconcileSamples.java | 2 +- ...terAssociableResourceTypesListSamples.java | 2 +- ...eterAssociationsCreateOrUpdateSamples.java | 2 +- ...ityPerimeterAssociationsDeleteSamples.java | 2 +- ...curityPerimeterAssociationsGetSamples.java | 2 +- ...urityPerimeterAssociationsListSamples.java | 2 +- ...PerimeterAssociationsReconcileSamples.java | 2 +- ...yPerimeterLinkReferencesDeleteSamples.java | 2 +- ...rityPerimeterLinkReferencesGetSamples.java | 2 +- ...ityPerimeterLinkReferencesListSamples.java | 2 +- ...tyPerimeterLinksCreateOrUpdateSamples.java | 2 +- ...rkSecurityPerimeterLinksDeleteSamples.java | 2 +- ...tworkSecurityPerimeterLinksGetSamples.java | 2 +- ...workSecurityPerimeterLinksListSamples.java | 2 +- ...ngConfigurationsCreateOrUpdateSamples.java | 2 +- ...terLoggingConfigurationsDeleteSamples.java | 2 +- ...imeterLoggingConfigurationsGetSamples.java | 2 +- ...meterLoggingConfigurationsListSamples.java | 2 +- ...yPerimeterOperationStatusesGetSamples.java | 2 +- ...erimeterProfilesCreateOrUpdateSamples.java | 2 +- ...ecurityPerimeterProfilesDeleteSamples.java | 2 +- ...rkSecurityPerimeterProfilesGetSamples.java | 2 +- ...kSecurityPerimeterProfilesListSamples.java | 2 +- ...curityPerimeterServiceTagsListSamples.java | 2 +- ...curityPerimetersCreateOrUpdateSamples.java | 2 +- ...etworkSecurityPerimetersDeleteSamples.java | 2 +- ...tyPerimetersGetByResourceGroupSamples.java | 2 +- ...yPerimetersListByResourceGroupSamples.java | 2 +- .../NetworkSecurityPerimetersListSamples.java | 2 +- ...NetworkSecurityPerimetersPatchSamples.java | 2 +- ...ianceConnectionsCreateOrUpdateSamples.java | 2 +- ...tualApplianceConnectionsDeleteSamples.java | 2 +- ...VirtualApplianceConnectionsGetSamples.java | 2 +- ...irtualApplianceConnectionsListSamples.java | 2 +- ...irtualAppliancesCreateOrUpdateSamples.java | 14 +- ...NetworkVirtualAppliancesDeleteSamples.java | 2 +- ...ppliancesGetBootDiagnosticLogsSamples.java | 2 +- ...alAppliancesGetByResourceGroupSamples.java | 2 +- ...lAppliancesListByResourceGroupSamples.java | 2 +- .../NetworkVirtualAppliancesListSamples.java | 2 +- ...etworkVirtualAppliancesReimageSamples.java | 2 +- ...etworkVirtualAppliancesRestartSamples.java | 4 +- ...orkVirtualAppliancesUpdateTagsSamples.java | 2 +- ...tworkWatchersCheckConnectivitySamples.java | 2 +- .../NetworkWatchersCreateOrUpdateSamples.java | 2 +- .../NetworkWatchersDeleteSamples.java | 2 +- ...hersGetAzureReachabilityReportSamples.java | 2 +- ...workWatchersGetByResourceGroupSamples.java | 2 +- ...etworkWatchersGetFlowLogStatusSamples.java | 2 +- ...NetworkConfigurationDiagnosticSamples.java | 2 +- .../NetworkWatchersGetNextHopSamples.java | 2 +- .../NetworkWatchersGetTopologySamples.java | 2 +- ...tchersGetTroubleshootingResultSamples.java | 2 +- ...workWatchersGetTroubleshootingSamples.java | 2 +- ...workWatchersGetVMSecurityRulesSamples.java | 2 +- ...WatchersListAvailableProvidersSamples.java | 2 +- ...orkWatchersListByResourceGroupSamples.java | 2 +- .../generated/NetworkWatchersListSamples.java | 2 +- ...atchersSetFlowLogConfigurationSamples.java | 2 +- .../NetworkWatchersUpdateTagsSamples.java | 2 +- .../NetworkWatchersVerifyIpFlowSamples.java | 2 +- .../generated/OperationsListSamples.java | 2 +- .../P2SVpnGatewaysCreateOrUpdateSamples.java | 2 +- .../P2SVpnGatewaysDeleteSamples.java | 2 +- ...aysDisconnectP2SVpnConnectionsSamples.java | 2 +- ...SVpnGatewaysGenerateVpnProfileSamples.java | 2 +- ...SVpnGatewaysGetByResourceGroupSamples.java | 2 +- ...P2SVpnConnectionHealthDetailedSamples.java | 2 +- ...ewaysGetP2SVpnConnectionHealthSamples.java | 2 +- ...VpnGatewaysListByResourceGroupSamples.java | 2 +- .../generated/P2SVpnGatewaysListSamples.java | 2 +- .../generated/P2SVpnGatewaysResetSamples.java | 2 +- .../P2SVpnGatewaysUpdateTagsSamples.java | 2 +- .../PacketCapturesCreateSamples.java | 2 +- .../PacketCapturesDeleteSamples.java | 2 +- .../generated/PacketCapturesGetSamples.java | 2 +- .../PacketCapturesGetStatusSamples.java | 2 +- .../generated/PacketCapturesListSamples.java | 2 +- .../generated/PacketCapturesStopSamples.java | 2 +- ...ressRouteCircuitConnectionsGetSamples.java | 2 +- ...essRouteCircuitConnectionsListSamples.java | 2 +- ...ateDnsZoneGroupsCreateOrUpdateSamples.java | 2 +- .../PrivateDnsZoneGroupsDeleteSamples.java | 2 +- .../PrivateDnsZoneGroupsGetSamples.java | 2 +- .../PrivateDnsZoneGroupsListSamples.java | 2 +- ...PrivateEndpointsCreateOrUpdateSamples.java | 8 +- .../PrivateEndpointsDeleteSamples.java | 2 +- ...ateEndpointsGetByResourceGroupSamples.java | 6 +- ...teEndpointsListByResourceGroupSamples.java | 2 +- .../PrivateEndpointsListSamples.java | 2 +- ...rviceVisibilityByResourceGroupSamples.java | 2 +- ...ckPrivateLinkServiceVisibilitySamples.java | 2 +- ...vateLinkServicesCreateOrUpdateSamples.java | 2 +- ...eletePrivateEndpointConnectionSamples.java | 2 +- .../PrivateLinkServicesDeleteSamples.java | 2 +- ...LinkServicesGetByResourceGroupSamples.java | 2 +- ...esGetPrivateEndpointConnectionSamples.java | 2 +- ...ateLinkServicesByResourceGroupSamples.java | 2 +- ...utoApprovedPrivateLinkServicesSamples.java | 2 +- ...inkServicesListByResourceGroupSamples.java | 2 +- ...ListPrivateEndpointConnectionsSamples.java | 2 +- .../PrivateLinkServicesListSamples.java | 2 +- ...pdatePrivateEndpointConnectionSamples.java | 2 +- ...ublicIpAddressesCreateOrUpdateSamples.java | 10 +- ...pAddressesDdosProtectionStatusSamples.java | 2 +- .../PublicIpAddressesDeleteSamples.java | 2 +- ...teCloudServiceReservedPublicIpSamples.java | 32 + ...cIpAddressesGetByResourceGroupSamples.java | 4 +- ...GetCloudServicePublicIpAddressSamples.java | 2 +- ...MachineScaleSetPublicIpAddressSamples.java | 2 +- ...IpAddressesListByResourceGroupSamples.java | 2 +- ...tCloudServicePublicIpAddressesSamples.java | 2 +- ...eRoleInstancePublicIpAddressesSamples.java | 2 +- .../PublicIpAddressesListSamples.java | 2 +- ...chineScaleSetPublicIpAddressesSamples.java | 2 +- ...ineScaleSetVMPublicIpAddressesSamples.java | 2 +- ...rveCloudServicePublicIpAddressSamples.java | 32 + .../PublicIpAddressesUpdateTagsSamples.java | 2 +- ...PublicIpPrefixesCreateOrUpdateSamples.java | 6 +- .../PublicIpPrefixesDeleteSamples.java | 2 +- ...icIpPrefixesGetByResourceGroupSamples.java | 4 +- ...cIpPrefixesListByResourceGroupSamples.java | 2 +- .../PublicIpPrefixesListSamples.java | 2 +- .../PublicIpPrefixesUpdateTagsSamples.java | 2 +- ...chabilityAnalysisIntentsCreateSamples.java | 2 +- ...chabilityAnalysisIntentsDeleteSamples.java | 2 +- ...ReachabilityAnalysisIntentsGetSamples.java | 2 +- ...eachabilityAnalysisIntentsListSamples.java | 2 +- ...ReachabilityAnalysisRunsCreateSamples.java | 2 +- ...ReachabilityAnalysisRunsDeleteSamples.java | 2 +- .../ReachabilityAnalysisRunsGetSamples.java | 2 +- .../ReachabilityAnalysisRunsListSamples.java | 2 +- .../ResourceNavigationLinksListSamples.java | 2 +- ...RouteFilterRulesCreateOrUpdateSamples.java | 2 +- .../RouteFilterRulesDeleteSamples.java | 2 +- .../generated/RouteFilterRulesGetSamples.java | 2 +- ...teFilterRulesListByRouteFilterSamples.java | 2 +- .../RouteFiltersCreateOrUpdateSamples.java | 2 +- .../generated/RouteFiltersDeleteSamples.java | 2 +- ...RouteFiltersGetByResourceGroupSamples.java | 2 +- ...outeFiltersListByResourceGroupSamples.java | 2 +- .../generated/RouteFiltersListSamples.java | 2 +- .../RouteFiltersUpdateTagsSamples.java | 2 +- .../RouteMapsCreateOrUpdateSamples.java | 2 +- .../generated/RouteMapsDeleteSamples.java | 2 +- .../generated/RouteMapsGetSamples.java | 2 +- .../generated/RouteMapsListSamples.java | 2 +- .../RouteTablesCreateOrUpdateSamples.java | 4 +- .../generated/RouteTablesDeleteSamples.java | 2 +- .../RouteTablesGetByResourceGroupSamples.java | 2 +- ...RouteTablesListByResourceGroupSamples.java | 2 +- .../generated/RouteTablesListSamples.java | 2 +- .../RouteTablesUpdateTagsSamples.java | 2 +- .../RoutesCreateOrUpdateSamples.java | 2 +- .../generated/RoutesDeleteSamples.java | 2 +- .../network/generated/RoutesGetSamples.java | 2 +- .../network/generated/RoutesListSamples.java | 2 +- .../RoutingIntentCreateOrUpdateSamples.java | 2 +- .../generated/RoutingIntentDeleteSamples.java | 2 +- .../generated/RoutingIntentGetSamples.java | 2 +- .../generated/RoutingIntentListSamples.java | 2 +- ...gRuleCollectionsCreateOrUpdateSamples.java | 2 +- .../RoutingRuleCollectionsDeleteSamples.java | 2 +- .../RoutingRuleCollectionsGetSamples.java | 2 +- .../RoutingRuleCollectionsListSamples.java | 2 +- .../RoutingRulesCreateOrUpdateSamples.java | 4 +- .../generated/RoutingRulesDeleteSamples.java | 2 +- .../generated/RoutingRulesGetSamples.java | 2 +- .../generated/RoutingRulesListSamples.java | 2 +- ...ScopeConnectionsCreateOrUpdateSamples.java | 2 +- .../ScopeConnectionsDeleteSamples.java | 2 +- .../generated/ScopeConnectionsGetSamples.java | 2 +- .../ScopeConnectionsListSamples.java | 2 +- ...inConfigurationsCreateOrUpdateSamples.java | 4 +- ...urityAdminConfigurationsDeleteSamples.java | 2 +- ...SecurityAdminConfigurationsGetSamples.java | 2 +- ...ecurityAdminConfigurationsListSamples.java | 2 +- ...PartnerProvidersCreateOrUpdateSamples.java | 2 +- ...SecurityPartnerProvidersDeleteSamples.java | 2 +- ...nerProvidersGetByResourceGroupSamples.java | 2 +- ...erProvidersListByResourceGroupSamples.java | 2 +- .../SecurityPartnerProvidersListSamples.java | 2 +- ...rityPartnerProvidersUpdateTagsSamples.java | 2 +- .../SecurityRulesCreateOrUpdateSamples.java | 2 +- .../generated/SecurityRulesDeleteSamples.java | 2 +- .../generated/SecurityRulesGetSamples.java | 2 +- .../generated/SecurityRulesListSamples.java | 2 +- ...erConfigurationsCreateOrUpdateSamples.java | 2 +- ...curityUserConfigurationsDeleteSamples.java | 2 +- .../SecurityUserConfigurationsGetSamples.java | 2 +- ...SecurityUserConfigurationsListSamples.java | 2 +- ...rRuleCollectionsCreateOrUpdateSamples.java | 2 +- ...urityUserRuleCollectionsDeleteSamples.java | 2 +- ...SecurityUserRuleCollectionsGetSamples.java | 2 +- ...ecurityUserRuleCollectionsListSamples.java | 2 +- ...ecurityUserRulesCreateOrUpdateSamples.java | 2 +- .../SecurityUserRulesDeleteSamples.java | 2 +- .../SecurityUserRulesGetSamples.java | 2 +- .../SecurityUserRulesListSamples.java | 2 +- .../ServiceAssociationLinksListSamples.java | 2 +- ...EndpointPoliciesCreateOrUpdateSamples.java | 4 +- .../ServiceEndpointPoliciesDeleteSamples.java | 2 +- ...ointPoliciesGetByResourceGroupSamples.java | 2 +- ...intPoliciesListByResourceGroupSamples.java | 2 +- .../ServiceEndpointPoliciesListSamples.java | 2 +- ...viceEndpointPoliciesUpdateTagsSamples.java | 2 +- ...olicyDefinitionsCreateOrUpdateSamples.java | 2 +- ...ndpointPolicyDefinitionsDeleteSamples.java | 2 +- ...ceEndpointPolicyDefinitionsGetSamples.java | 2 +- ...DefinitionsListByResourceGroupSamples.java | 2 +- .../ServiceTagInformationListSamples.java | 6 +- .../generated/ServiceTagsListSamples.java | 2 +- .../generated/StaticCidrsCreateSamples.java | 2 +- .../generated/StaticCidrsDeleteSamples.java | 2 +- .../generated/StaticCidrsGetSamples.java | 2 +- .../generated/StaticCidrsListSamples.java | 2 +- .../StaticMembersCreateOrUpdateSamples.java | 2 +- .../generated/StaticMembersDeleteSamples.java | 2 +- .../generated/StaticMembersGetSamples.java | 2 +- .../generated/StaticMembersListSamples.java | 2 +- .../SubnetsCreateOrUpdateSamples.java | 10 +- .../generated/SubnetsDeleteSamples.java | 2 +- .../network/generated/SubnetsGetSamples.java | 6 +- .../network/generated/SubnetsListSamples.java | 2 +- .../SubnetsPrepareNetworkPoliciesSamples.java | 2 +- ...ubnetsUnprepareNetworkPoliciesSamples.java | 2 +- ...nagerConnectionsCreateOrUpdateSamples.java | 2 +- ...etworkManagerConnectionsDeleteSamples.java | 2 +- ...onNetworkManagerConnectionsGetSamples.java | 2 +- ...nNetworkManagerConnectionsListSamples.java | 2 +- .../network/generated/UsagesListSamples.java | 4 +- .../VerifierWorkspacesCreateSamples.java | 2 +- .../VerifierWorkspacesDeleteSamples.java | 2 +- .../VerifierWorkspacesGetSamples.java | 2 +- .../VerifierWorkspacesListSamples.java | 2 +- .../VerifierWorkspacesUpdateSamples.java | 2 +- .../generated/VipSwapCreateSamples.java | 2 +- .../network/generated/VipSwapGetSamples.java | 2 +- .../network/generated/VipSwapListSamples.java | 2 +- ...alApplianceSitesCreateOrUpdateSamples.java | 2 +- .../VirtualApplianceSitesDeleteSamples.java | 2 +- .../VirtualApplianceSitesGetSamples.java | 2 +- .../VirtualApplianceSitesListSamples.java | 2 +- .../VirtualApplianceSkusGetSamples.java | 2 +- .../VirtualApplianceSkusListSamples.java | 2 +- ...ubBgpConnectionsCreateOrUpdateSamples.java | 2 +- ...VirtualHubBgpConnectionsDeleteSamples.java | 2 +- .../VirtualHubBgpConnectionsGetSamples.java | 2 +- ...onnectionsListAdvertisedRoutesSamples.java | 2 +- ...gpConnectionsListLearnedRoutesSamples.java | 2 +- .../VirtualHubBgpConnectionsListSamples.java | 2 +- ...bIpConfigurationCreateOrUpdateSamples.java | 2 +- ...irtualHubIpConfigurationDeleteSamples.java | 2 +- .../VirtualHubIpConfigurationGetSamples.java | 2 +- .../VirtualHubIpConfigurationListSamples.java | 2 +- ...HubRouteTableV2SCreateOrUpdateSamples.java | 2 +- .../VirtualHubRouteTableV2SDeleteSamples.java | 2 +- .../VirtualHubRouteTableV2SGetSamples.java | 2 +- .../VirtualHubRouteTableV2SListSamples.java | 2 +- .../VirtualHubsCreateOrUpdateSamples.java | 2 +- .../generated/VirtualHubsDeleteSamples.java | 2 +- .../VirtualHubsGetByResourceGroupSamples.java | 2 +- ...bsGetEffectiveVirtualHubRoutesSamples.java | 6 +- .../VirtualHubsGetInboundRoutesSamples.java | 2 +- .../VirtualHubsGetOutboundRoutesSamples.java | 2 +- ...VirtualHubsListByResourceGroupSamples.java | 2 +- .../generated/VirtualHubsListSamples.java | 2 +- .../VirtualHubsUpdateTagsSamples.java | 2 +- ...tewayConnectionsCreateOrUpdateSamples.java | 2 +- ...etworkGatewayConnectionsDeleteSamples.java | 2 +- ...yConnectionsGetByResourceGroupSamples.java | 2 +- ...orkGatewayConnectionsGetIkeSasSamples.java | 2 +- ...GatewayConnectionsGetSharedKeySamples.java | 2 +- ...ConnectionsListByResourceGroupSamples.java | 2 +- ...ewayConnectionsResetConnectionSamples.java | 2 +- ...tewayConnectionsResetSharedKeySamples.java | 2 +- ...GatewayConnectionsSetSharedKeySamples.java | 2 +- ...yConnectionsStartPacketCaptureSamples.java | 4 +- ...ayConnectionsStopPacketCaptureSamples.java | 2 +- ...rkGatewayConnectionsUpdateTagsSamples.java | 2 +- ...kGatewayNatRulesCreateOrUpdateSamples.java | 2 +- ...alNetworkGatewayNatRulesDeleteSamples.java | 2 +- ...rtualNetworkGatewayNatRulesGetSamples.java | 2 +- ...lesListByVirtualNetworkGatewaySamples.java | 2 +- ...lNetworkGatewaysCreateOrUpdateSamples.java | 32 +- .../VirtualNetworkGatewaysDeleteSamples.java | 2 +- ...alNetworkGatewayVpnConnectionsSamples.java | 2 +- ...workGatewaysGenerateVpnProfileSamples.java | 2 +- ...tewaysGeneratevpnclientpackageSamples.java | 2 +- ...orkGatewaysGetAdvertisedRoutesSamples.java | 2 +- ...etworkGatewaysGetBgpPeerStatusSamples.java | 2 +- ...workGatewaysGetByResourceGroupSamples.java | 4 +- ...ewaysGetFailoverAllTestDetailsSamples.java | 2 +- ...ysGetFailoverSingleTestDetailsSamples.java | 2 +- ...etworkGatewaysGetLearnedRoutesSamples.java | 2 +- ...tewaysGetResiliencyInformationSamples.java | 2 +- ...rkGatewaysGetRoutesInformationSamples.java | 2 +- ...atewaysGetVpnProfilePackageUrlSamples.java | 2 +- ...ysGetVpnclientConnectionHealthSamples.java | 2 +- ...aysGetVpnclientIpsecParametersSamples.java | 2 +- ...rkGatewaysInvokeAbortMigrationSamples.java | 2 +- ...kGatewaysInvokeCommitMigrationSamples.java | 2 +- ...GatewaysInvokeExecuteMigrationSamples.java | 2 +- ...GatewaysInvokePrepareMigrationSamples.java | 2 +- ...orkGatewaysListByResourceGroupSamples.java | 2 +- ...NetworkGatewaysListConnectionsSamples.java | 2 +- ...tworkGatewaysListRadiusSecretsSamples.java | 2 +- .../VirtualNetworkGatewaysResetSamples.java | 2 +- ...atewaysResetVpnClientSharedKeySamples.java | 2 +- ...aysSetVpnclientIpsecParametersSamples.java | 2 +- ...essRouteSiteFailoverSimulationSamples.java | 2 +- ...workGatewaysStartPacketCaptureSamples.java | 4 +- ...essRouteSiteFailoverSimulationSamples.java | 2 +- ...tworkGatewaysStopPacketCaptureSamples.java | 2 +- ...orkGatewaysSupportedVpnDevicesSamples.java | 2 +- ...rtualNetworkGatewaysUpdateTagsSamples.java | 2 +- ...ysVpnDeviceConfigurationScriptSamples.java | 2 +- ...lNetworkPeeringsCreateOrUpdateSamples.java | 14 +- .../VirtualNetworkPeeringsDeleteSamples.java | 2 +- .../VirtualNetworkPeeringsGetSamples.java | 8 +- .../VirtualNetworkPeeringsListSamples.java | 4 +- ...rtualNetworkTapsCreateOrUpdateSamples.java | 2 +- .../VirtualNetworkTapsDeleteSamples.java | 2 +- ...lNetworkTapsGetByResourceGroupSamples.java | 2 +- ...NetworkTapsListByResourceGroupSamples.java | 2 +- .../VirtualNetworkTapsListSamples.java | 2 +- .../VirtualNetworkTapsUpdateTagsSamples.java | 2 +- ...orksCheckIpAddressAvailabilitySamples.java | 2 +- .../VirtualNetworksCreateOrUpdateSamples.java | 18 +- .../VirtualNetworksDeleteSamples.java | 2 +- ...tualNetworksGetByResourceGroupSamples.java | 6 +- ...ualNetworksListByResourceGroupSamples.java | 2 +- ...tworksListDdosProtectionStatusSamples.java | 2 +- .../generated/VirtualNetworksListSamples.java | 2 +- .../VirtualNetworksListUsageSamples.java | 2 +- .../VirtualNetworksUpdateTagsSamples.java | 2 +- ...alRouterPeeringsCreateOrUpdateSamples.java | 2 +- .../VirtualRouterPeeringsDeleteSamples.java | 2 +- .../VirtualRouterPeeringsGetSamples.java | 2 +- .../VirtualRouterPeeringsListSamples.java | 2 +- .../VirtualRoutersCreateOrUpdateSamples.java | 2 +- .../VirtualRoutersDeleteSamples.java | 2 +- ...rtualRoutersGetByResourceGroupSamples.java | 2 +- ...tualRoutersListByResourceGroupSamples.java | 2 +- .../generated/VirtualRoutersListSamples.java | 2 +- .../VirtualWansCreateOrUpdateSamples.java | 2 +- .../generated/VirtualWansDeleteSamples.java | 2 +- .../VirtualWansGetByResourceGroupSamples.java | 2 +- ...VirtualWansListByResourceGroupSamples.java | 2 +- .../generated/VirtualWansListSamples.java | 2 +- .../VirtualWansUpdateTagsSamples.java | 2 +- .../VpnConnectionsCreateOrUpdateSamples.java | 2 +- .../VpnConnectionsDeleteSamples.java | 2 +- .../generated/VpnConnectionsGetSamples.java | 2 +- ...VpnConnectionsListByVpnGatewaySamples.java | 2 +- ...nConnectionsStartPacketCaptureSamples.java | 4 +- ...pnConnectionsStopPacketCaptureSamples.java | 2 +- .../VpnGatewaysCreateOrUpdateSamples.java | 2 +- .../generated/VpnGatewaysDeleteSamples.java | 2 +- .../VpnGatewaysGetByResourceGroupSamples.java | 2 +- ...VpnGatewaysListByResourceGroupSamples.java | 2 +- .../generated/VpnGatewaysListSamples.java | 2 +- .../generated/VpnGatewaysResetSamples.java | 2 +- .../VpnGatewaysStartPacketCaptureSamples.java | 4 +- .../VpnGatewaysStopPacketCaptureSamples.java | 2 +- .../VpnGatewaysUpdateTagsSamples.java | 2 +- ...inkConnectionsGetAllSharedKeysSamples.java | 2 +- ...ConnectionsGetDefaultSharedKeySamples.java | 2 +- .../VpnLinkConnectionsGetIkeSasSamples.java | 2 +- ...ConnectionsListByVpnConnectionSamples.java | 2 +- ...onnectionsListDefaultSharedKeySamples.java | 2 +- ...LinkConnectionsResetConnectionSamples.java | 2 +- ...tionsSetOrInitDefaultSharedKeySamples.java | 2 +- ...nsAssociatedWithVirtualWanListSamples.java | 2 +- ...erConfigurationsCreateOrUpdateSamples.java | 2 +- .../VpnServerConfigurationsDeleteSamples.java | 2 +- ...nfigurationsGetByResourceGroupSamples.java | 2 +- ...figurationsListByResourceGroupSamples.java | 2 +- ...onfigurationsListRadiusSecretsSamples.java | 2 +- .../VpnServerConfigurationsListSamples.java | 2 +- ...ServerConfigurationsUpdateTagsSamples.java | 2 +- .../VpnSiteLinkConnectionsGetSamples.java | 2 +- .../generated/VpnSiteLinksGetSamples.java | 2 +- .../VpnSiteLinksListByVpnSiteSamples.java | 2 +- .../VpnSitesConfigurationDownloadSamples.java | 2 +- .../VpnSitesCreateOrUpdateSamples.java | 2 +- .../generated/VpnSitesDeleteSamples.java | 2 +- .../VpnSitesGetByResourceGroupSamples.java | 2 +- .../VpnSitesListByResourceGroupSamples.java | 2 +- .../generated/VpnSitesListSamples.java | 2 +- .../generated/VpnSitesUpdateTagsSamples.java | 2 +- ...FirewallPoliciesCreateOrUpdateSamples.java | 2 +- ...licationFirewallPoliciesDeleteSamples.java | 2 +- ...wallPoliciesGetByResourceGroupSamples.java | 2 +- ...allPoliciesListByResourceGroupSamples.java | 2 +- ...pplicationFirewallPoliciesListSamples.java | 2 +- .../generated/WebCategoriesGetSamples.java | 2 +- .../generated/WebCategoriesListSamples.java | 2 +- 911 files changed, 5142 insertions(+), 2312 deletions(-) create mode 100644 sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayEntraJwtValidationConfigPropertiesFormat.java create mode 100644 sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/DdosDetectionRulePropertiesFormat.java create mode 100644 sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayClientAuthVerificationModes.java create mode 100644 sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayEntraJwtValidationConfig.java create mode 100644 sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayUnAuthorizedRequestAction.java create mode 100644 sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/DdosDetectionMode.java create mode 100644 sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/DdosDetectionRule.java create mode 100644 sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/DdosTrafficType.java create mode 100644 sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/DisassociateCloudServicePublicIpRequest.java create mode 100644 sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/IsRollback.java create mode 100644 sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/PrivateEndpointIpVersionType.java create mode 100644 sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ReserveCloudServicePublicIpAddressRequest.java create mode 100644 sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/TrafficDetectionRule.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesDisassociateCloudServiceReservedPublicIpSamples.java create mode 100644 sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesReserveCloudServicePublicIpAddressSamples.java diff --git a/eng/lintingconfigs/revapi/track2/revapi.json b/eng/lintingconfigs/revapi/track2/revapi.json index 00a4f85ab9a5..88da8835cc34 100644 --- a/eng/lintingconfigs/revapi/track2/revapi.json +++ b/eng/lintingconfigs/revapi/track2/revapi.json @@ -761,6 +761,16 @@ "code" : "java.field.addedStaticField", "new" : "field com.azure.resourcemanager.network.models.PublicIPSkuType.STANDARD_V2", "justification" : "Not a break." + }, + { + "code": "java.field.removed", + "old": "field com.azure.resourcemanager.network.models.ApplicationGatewayWafRuleSensitivityTypes.NONE", + "justification": "Remove NonSensitivity for DDoS ruleset." + }, + { + "code": "java.field.removed", + "old": "field com.azure.resourcemanager.network.models.SensitivityType.NONE", + "justification": "Remove NonSensitivity for DDoS ruleset." } ] } diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 682fed78a991..f4707bf77292 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -286,7 +286,7 @@ com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.53.4;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-keyvault;2.54.0;2.55.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-monitor;2.53.4;2.54.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-msi;2.53.4;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-network;2.56.0;2.57.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-network;2.56.0;2.57.0 com.azure.resourcemanager:azure-resourcemanager-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-privatedns;2.53.4;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-resources;2.53.5;2.54.0-beta.1 @@ -551,6 +551,7 @@ unreleased_com.azure.v2:azure-core;2.0.0-beta.1 unreleased_com.azure.v2:azure-identity;2.0.0-beta.1 unreleased_com.azure.v2:azure-data-appconfiguration;2.0.0-beta.1 unreleased_io.clientcore:http-netty4;1.0.0-beta.1 +unreleased_com.azure.resourcemanager:azure-resourcemanager-network;2.57.0 # Released Beta dependencies: Copy the entry from above, prepend "beta_", remove the current # version and set the version to the released beta. Released beta dependencies are only valid diff --git a/sdk/network/azure-resourcemanager-network/CHANGELOG.md b/sdk/network/azure-resourcemanager-network/CHANGELOG.md index 333811acc191..22b603e1bd71 100644 --- a/sdk/network/azure-resourcemanager-network/CHANGELOG.md +++ b/sdk/network/azure-resourcemanager-network/CHANGELOG.md @@ -1,14 +1,12 @@ # Release History -## 2.57.0-beta.1 (Unreleased) +## 2.57.0 (2025-11-19) -### Features Added - -### Breaking Changes +### Other Changes -### Bugs Fixed +#### Dependency Updates -### Other Changes +- Updated `api-version` to `2025-03-01`. ## 2.56.0 (2025-11-12) diff --git a/sdk/network/azure-resourcemanager-network/README.md b/sdk/network/azure-resourcemanager-network/README.md index 85e7c38db521..65ea3d84a87a 100644 --- a/sdk/network/azure-resourcemanager-network/README.md +++ b/sdk/network/azure-resourcemanager-network/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-network - 2.55.0 + 2.57.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/network/azure-resourcemanager-network/assets.json b/sdk/network/azure-resourcemanager-network/assets.json index cf0c7d95dfed..a03579793ee5 100644 --- a/sdk/network/azure-resourcemanager-network/assets.json +++ b/sdk/network/azure-resourcemanager-network/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/network/azure-resourcemanager-network", - "Tag": "java/network/azure-resourcemanager-network_9360a60339" + "Tag": "java/network/azure-resourcemanager-network_95e9cb8046" } diff --git a/sdk/network/azure-resourcemanager-network/pom.xml b/sdk/network/azure-resourcemanager-network/pom.xml index 0087ac5251c9..c6afdbe3a218 100644 --- a/sdk/network/azure-resourcemanager-network/pom.xml +++ b/sdk/network/azure-resourcemanager-network/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-network - 2.57.0-beta.1 + 2.57.0 jar Microsoft Azure SDK for Network Management diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PublicIpAddressesClient.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PublicIpAddressesClient.java index b8a4d414a54a..f1a157228c7a 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PublicIpAddressesClient.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PublicIpAddressesClient.java @@ -15,6 +15,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.network.fluent.models.PublicIpAddressInner; import com.azure.resourcemanager.network.fluent.models.PublicIpDdosProtectionStatusResultInner; +import com.azure.resourcemanager.network.models.DisassociateCloudServicePublicIpRequest; +import com.azure.resourcemanager.network.models.ReserveCloudServicePublicIpAddressRequest; import com.azure.resourcemanager.network.models.TagsObject; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; @@ -694,6 +696,251 @@ Mono ddosProtectionStatusAsync(String r PublicIpDdosProtectionStatusResultInner ddosProtectionStatus(String resourceGroupName, String publicIpAddressName, Context context); + /** + * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is + * requested, reverts the allocation method to Dynamic. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public IP address resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> reserveCloudServicePublicIpAddressWithResponseAsync(String resourceGroupName, + String publicIpAddressName, ReserveCloudServicePublicIpAddressRequest parameters); + + /** + * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is + * requested, reverts the allocation method to Dynamic. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of public IP address resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, PublicIpAddressInner> beginReserveCloudServicePublicIpAddressAsync( + String resourceGroupName, String publicIpAddressName, ReserveCloudServicePublicIpAddressRequest parameters); + + /** + * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is + * requested, reverts the allocation method to Dynamic. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of public IP address resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PublicIpAddressInner> beginReserveCloudServicePublicIpAddress( + String resourceGroupName, String publicIpAddressName, ReserveCloudServicePublicIpAddressRequest parameters); + + /** + * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is + * requested, reverts the allocation method to Dynamic. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of public IP address resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PublicIpAddressInner> beginReserveCloudServicePublicIpAddress( + String resourceGroupName, String publicIpAddressName, ReserveCloudServicePublicIpAddressRequest parameters, + Context context); + + /** + * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is + * requested, reverts the allocation method to Dynamic. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public IP address resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono reserveCloudServicePublicIpAddressAsync(String resourceGroupName, + String publicIpAddressName, ReserveCloudServicePublicIpAddressRequest parameters); + + /** + * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is + * requested, reverts the allocation method to Dynamic. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public IP address resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PublicIpAddressInner reserveCloudServicePublicIpAddress(String resourceGroupName, String publicIpAddressName, + ReserveCloudServicePublicIpAddressRequest parameters); + + /** + * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is + * requested, reverts the allocation method to Dynamic. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public IP address resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PublicIpAddressInner reserveCloudServicePublicIpAddress(String resourceGroupName, String publicIpAddressName, + ReserveCloudServicePublicIpAddressRequest parameters, Context context); + + /** + * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same + * Cloud Service frontend. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public IP address resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> disassociateCloudServiceReservedPublicIpWithResponseAsync(String resourceGroupName, + String publicIpAddressName, DisassociateCloudServicePublicIpRequest parameters); + + /** + * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same + * Cloud Service frontend. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of public IP address resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, PublicIpAddressInner> + beginDisassociateCloudServiceReservedPublicIpAsync(String resourceGroupName, String publicIpAddressName, + DisassociateCloudServicePublicIpRequest parameters); + + /** + * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same + * Cloud Service frontend. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of public IP address resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PublicIpAddressInner> beginDisassociateCloudServiceReservedPublicIp( + String resourceGroupName, String publicIpAddressName, DisassociateCloudServicePublicIpRequest parameters); + + /** + * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same + * Cloud Service frontend. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of public IP address resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PublicIpAddressInner> beginDisassociateCloudServiceReservedPublicIp( + String resourceGroupName, String publicIpAddressName, DisassociateCloudServicePublicIpRequest parameters, + Context context); + + /** + * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same + * Cloud Service frontend. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public IP address resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono disassociateCloudServiceReservedPublicIpAsync(String resourceGroupName, + String publicIpAddressName, DisassociateCloudServicePublicIpRequest parameters); + + /** + * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same + * Cloud Service frontend. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public IP address resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PublicIpAddressInner disassociateCloudServiceReservedPublicIp(String resourceGroupName, String publicIpAddressName, + DisassociateCloudServicePublicIpRequest parameters); + + /** + * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same + * Cloud Service frontend. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public IP address resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PublicIpAddressInner disassociateCloudServiceReservedPublicIp(String resourceGroupName, String publicIpAddressName, + DisassociateCloudServicePublicIpRequest parameters, Context context); + /** * Gets information about all public IP addresses on a virtual machine scale set level. * diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayEntraJwtValidationConfigPropertiesFormat.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayEntraJwtValidationConfigPropertiesFormat.java new file mode 100644 index 000000000000..5ae5e80a65ce --- /dev/null +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayEntraJwtValidationConfigPropertiesFormat.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.network.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.network.models.ApplicationGatewayUnAuthorizedRequestAction; +import com.azure.resourcemanager.network.models.ProvisioningState; +import java.io.IOException; +import java.util.List; + +/** + * Properties of entra jwt validation configuration of the application gateway. + */ +@Fluent +public final class ApplicationGatewayEntraJwtValidationConfigPropertiesFormat + implements JsonSerializable { + /* + * Unauthorized request action. + */ + private ApplicationGatewayUnAuthorizedRequestAction unAuthorizedRequestAction; + + /* + * The Tenant ID of the Microsoft Entra ID application. + */ + private String tenantId; + + /* + * The Client ID of the Microsoft Entra ID application. + */ + private String clientId; + + /* + * List of acceptable audience claims that can be present in the token (aud claim). A maximum of 5 audiences are + * permitted. + */ + private List audiences; + + /* + * The provisioning state of the entra jwt validation configuration resource. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of ApplicationGatewayEntraJwtValidationConfigPropertiesFormat class. + */ + public ApplicationGatewayEntraJwtValidationConfigPropertiesFormat() { + } + + /** + * Get the unAuthorizedRequestAction property: Unauthorized request action. + * + * @return the unAuthorizedRequestAction value. + */ + public ApplicationGatewayUnAuthorizedRequestAction unAuthorizedRequestAction() { + return this.unAuthorizedRequestAction; + } + + /** + * Set the unAuthorizedRequestAction property: Unauthorized request action. + * + * @param unAuthorizedRequestAction the unAuthorizedRequestAction value to set. + * @return the ApplicationGatewayEntraJwtValidationConfigPropertiesFormat object itself. + */ + public ApplicationGatewayEntraJwtValidationConfigPropertiesFormat + withUnAuthorizedRequestAction(ApplicationGatewayUnAuthorizedRequestAction unAuthorizedRequestAction) { + this.unAuthorizedRequestAction = unAuthorizedRequestAction; + return this; + } + + /** + * Get the tenantId property: The Tenant ID of the Microsoft Entra ID application. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The Tenant ID of the Microsoft Entra ID application. + * + * @param tenantId the tenantId value to set. + * @return the ApplicationGatewayEntraJwtValidationConfigPropertiesFormat object itself. + */ + public ApplicationGatewayEntraJwtValidationConfigPropertiesFormat withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the clientId property: The Client ID of the Microsoft Entra ID application. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The Client ID of the Microsoft Entra ID application. + * + * @param clientId the clientId value to set. + * @return the ApplicationGatewayEntraJwtValidationConfigPropertiesFormat object itself. + */ + public ApplicationGatewayEntraJwtValidationConfigPropertiesFormat withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the audiences property: List of acceptable audience claims that can be present in the token (aud claim). A + * maximum of 5 audiences are permitted. + * + * @return the audiences value. + */ + public List audiences() { + return this.audiences; + } + + /** + * Set the audiences property: List of acceptable audience claims that can be present in the token (aud claim). A + * maximum of 5 audiences are permitted. + * + * @param audiences the audiences value to set. + * @return the ApplicationGatewayEntraJwtValidationConfigPropertiesFormat object itself. + */ + public ApplicationGatewayEntraJwtValidationConfigPropertiesFormat withAudiences(List audiences) { + this.audiences = audiences; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the entra jwt validation configuration resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("unAuthorizedRequestAction", + this.unAuthorizedRequestAction == null ? null : this.unAuthorizedRequestAction.toString()); + jsonWriter.writeStringField("tenantId", this.tenantId); + jsonWriter.writeStringField("clientId", this.clientId); + jsonWriter.writeArrayField("audiences", this.audiences, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ApplicationGatewayEntraJwtValidationConfigPropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ApplicationGatewayEntraJwtValidationConfigPropertiesFormat if the JsonReader was pointing + * to an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the + * ApplicationGatewayEntraJwtValidationConfigPropertiesFormat. + */ + public static ApplicationGatewayEntraJwtValidationConfigPropertiesFormat fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ApplicationGatewayEntraJwtValidationConfigPropertiesFormat deserializedApplicationGatewayEntraJwtValidationConfigPropertiesFormat + = new ApplicationGatewayEntraJwtValidationConfigPropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("unAuthorizedRequestAction".equals(fieldName)) { + deserializedApplicationGatewayEntraJwtValidationConfigPropertiesFormat.unAuthorizedRequestAction + = ApplicationGatewayUnAuthorizedRequestAction.fromString(reader.getString()); + } else if ("tenantId".equals(fieldName)) { + deserializedApplicationGatewayEntraJwtValidationConfigPropertiesFormat.tenantId + = reader.getString(); + } else if ("clientId".equals(fieldName)) { + deserializedApplicationGatewayEntraJwtValidationConfigPropertiesFormat.clientId + = reader.getString(); + } else if ("audiences".equals(fieldName)) { + List audiences = reader.readArray(reader1 -> reader1.getString()); + deserializedApplicationGatewayEntraJwtValidationConfigPropertiesFormat.audiences = audiences; + } else if ("provisioningState".equals(fieldName)) { + deserializedApplicationGatewayEntraJwtValidationConfigPropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedApplicationGatewayEntraJwtValidationConfigPropertiesFormat; + }); + } +} diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayInner.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayInner.java index e60d1986aa57..c1240aa1be04 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayInner.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayInner.java @@ -15,6 +15,7 @@ import com.azure.resourcemanager.network.models.ApplicationGatewayBackendHttpSettings; import com.azure.resourcemanager.network.models.ApplicationGatewayBackendSettings; import com.azure.resourcemanager.network.models.ApplicationGatewayCustomError; +import com.azure.resourcemanager.network.models.ApplicationGatewayEntraJwtValidationConfig; import com.azure.resourcemanager.network.models.ApplicationGatewayFrontendIpConfiguration; import com.azure.resourcemanager.network.models.ApplicationGatewayFrontendPort; import com.azure.resourcemanager.network.models.ApplicationGatewayGlobalConfiguration; @@ -1000,6 +1001,34 @@ public List loadDistributionPolicies() return this; } + /** + * Get the entraJwtValidationConfigs property: Entra JWT validation configurations for the application gateway + * resource. For default limits, see [Application Gateway + * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @return the entraJwtValidationConfigs value. + */ + public List entraJwtValidationConfigs() { + return this.innerProperties() == null ? null : this.innerProperties().entraJwtValidationConfigs(); + } + + /** + * Set the entraJwtValidationConfigs property: Entra JWT validation configurations for the application gateway + * resource. For default limits, see [Application Gateway + * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @param entraJwtValidationConfigs the entraJwtValidationConfigs value to set. + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner + withEntraJwtValidationConfigs(List entraJwtValidationConfigs) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationGatewayPropertiesFormat(); + } + this.innerProperties().withEntraJwtValidationConfigs(entraJwtValidationConfigs); + return this; + } + /** * Get the globalConfiguration property: Global Configuration. * diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayPropertiesFormat.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayPropertiesFormat.java index 923412f4afa3..19744210de96 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayPropertiesFormat.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayPropertiesFormat.java @@ -15,6 +15,7 @@ import com.azure.resourcemanager.network.models.ApplicationGatewayBackendHttpSettings; import com.azure.resourcemanager.network.models.ApplicationGatewayBackendSettings; import com.azure.resourcemanager.network.models.ApplicationGatewayCustomError; +import com.azure.resourcemanager.network.models.ApplicationGatewayEntraJwtValidationConfig; import com.azure.resourcemanager.network.models.ApplicationGatewayFrontendIpConfiguration; import com.azure.resourcemanager.network.models.ApplicationGatewayFrontendPort; import com.azure.resourcemanager.network.models.ApplicationGatewayGlobalConfiguration; @@ -226,6 +227,12 @@ public final class ApplicationGatewayPropertiesFormat implements JsonSerializabl */ private List loadDistributionPolicies; + /* + * Entra JWT validation configurations for the application gateway resource. For default limits, see [Application + * Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + */ + private List entraJwtValidationConfigs; + /* * Global Configuration. */ @@ -956,6 +963,31 @@ public List loadDistributionPolicies() return this; } + /** + * Get the entraJwtValidationConfigs property: Entra JWT validation configurations for the application gateway + * resource. For default limits, see [Application Gateway + * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @return the entraJwtValidationConfigs value. + */ + public List entraJwtValidationConfigs() { + return this.entraJwtValidationConfigs; + } + + /** + * Set the entraJwtValidationConfigs property: Entra JWT validation configurations for the application gateway + * resource. For default limits, see [Application Gateway + * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + * + * @param entraJwtValidationConfigs the entraJwtValidationConfigs value to set. + * @return the ApplicationGatewayPropertiesFormat object itself. + */ + public ApplicationGatewayPropertiesFormat + withEntraJwtValidationConfigs(List entraJwtValidationConfigs) { + this.entraJwtValidationConfigs = entraJwtValidationConfigs; + return this; + } + /** * Get the globalConfiguration property: Global Configuration. * @@ -1074,6 +1106,9 @@ public void validate() { if (loadDistributionPolicies() != null) { loadDistributionPolicies().forEach(e -> e.validate()); } + if (entraJwtValidationConfigs() != null) { + entraJwtValidationConfigs().forEach(e -> e.validate()); + } if (globalConfiguration() != null) { globalConfiguration().validate(); } @@ -1130,6 +1165,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("forceFirewallPolicyAssociation", this.forceFirewallPolicyAssociation); jsonWriter.writeArrayField("loadDistributionPolicies", this.loadDistributionPolicies, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("entraJWTValidationConfigs", this.entraJwtValidationConfigs, + (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("globalConfiguration", this.globalConfiguration); return jsonWriter.writeEndObject(); } @@ -1279,6 +1316,11 @@ public static ApplicationGatewayPropertiesFormat fromJson(JsonReader jsonReader) List loadDistributionPolicies = reader.readArray(reader1 -> ApplicationGatewayLoadDistributionPolicy.fromJson(reader1)); deserializedApplicationGatewayPropertiesFormat.loadDistributionPolicies = loadDistributionPolicies; + } else if ("entraJWTValidationConfigs".equals(fieldName)) { + List entraJwtValidationConfigs + = reader.readArray(reader1 -> ApplicationGatewayEntraJwtValidationConfig.fromJson(reader1)); + deserializedApplicationGatewayPropertiesFormat.entraJwtValidationConfigs + = entraJwtValidationConfigs; } else if ("globalConfiguration".equals(fieldName)) { deserializedApplicationGatewayPropertiesFormat.globalConfiguration = ApplicationGatewayGlobalConfiguration.fromJson(reader); diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayRequestRoutingRuleInner.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayRequestRoutingRuleInner.java index 8d3a0521dfe0..0331057dc5bf 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayRequestRoutingRuleInner.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayRequestRoutingRuleInner.java @@ -307,6 +307,32 @@ public ApplicationGatewayRequestRoutingRuleInner withLoadDistributionPolicy(SubR return this; } + /** + * Get the entraJwtValidationConfig property: Entra JWT validation configuration resource of the application + * gateway. + * + * @return the entraJwtValidationConfig value. + */ + public SubResource entraJwtValidationConfig() { + return this.innerProperties() == null ? null : this.innerProperties().entraJwtValidationConfig(); + } + + /** + * Set the entraJwtValidationConfig property: Entra JWT validation configuration resource of the application + * gateway. + * + * @param entraJwtValidationConfig the entraJwtValidationConfig value to set. + * @return the ApplicationGatewayRequestRoutingRuleInner object itself. + */ + public ApplicationGatewayRequestRoutingRuleInner + withEntraJwtValidationConfig(SubResource entraJwtValidationConfig) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationGatewayRequestRoutingRulePropertiesFormat(); + } + this.innerProperties().withEntraJwtValidationConfig(entraJwtValidationConfig); + return this; + } + /** * Get the provisioningState property: The provisioning state of the request routing rule resource. * diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayRequestRoutingRulePropertiesFormat.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayRequestRoutingRulePropertiesFormat.java index 6a36346080ee..10760a48b810 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayRequestRoutingRulePropertiesFormat.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayRequestRoutingRulePropertiesFormat.java @@ -65,6 +65,11 @@ public final class ApplicationGatewayRequestRoutingRulePropertiesFormat */ private SubResource loadDistributionPolicy; + /* + * Entra JWT validation configuration resource of the application gateway. + */ + private SubResource entraJwtValidationConfig; + /* * The provisioning state of the request routing rule resource. */ @@ -260,6 +265,29 @@ public SubResource loadDistributionPolicy() { return this; } + /** + * Get the entraJwtValidationConfig property: Entra JWT validation configuration resource of the application + * gateway. + * + * @return the entraJwtValidationConfig value. + */ + public SubResource entraJwtValidationConfig() { + return this.entraJwtValidationConfig; + } + + /** + * Set the entraJwtValidationConfig property: Entra JWT validation configuration resource of the application + * gateway. + * + * @param entraJwtValidationConfig the entraJwtValidationConfig value to set. + * @return the ApplicationGatewayRequestRoutingRulePropertiesFormat object itself. + */ + public ApplicationGatewayRequestRoutingRulePropertiesFormat + withEntraJwtValidationConfig(SubResource entraJwtValidationConfig) { + this.entraJwtValidationConfig = entraJwtValidationConfig; + return this; + } + /** * Get the provisioningState property: The provisioning state of the request routing rule resource. * @@ -292,6 +320,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("rewriteRuleSet", this.rewriteRuleSet); jsonWriter.writeJsonField("redirectConfiguration", this.redirectConfiguration); jsonWriter.writeJsonField("loadDistributionPolicy", this.loadDistributionPolicy); + jsonWriter.writeJsonField("entraJWTValidationConfig", this.entraJwtValidationConfig); return jsonWriter.writeEndObject(); } @@ -339,6 +368,9 @@ public static ApplicationGatewayRequestRoutingRulePropertiesFormat fromJson(Json } else if ("loadDistributionPolicy".equals(fieldName)) { deserializedApplicationGatewayRequestRoutingRulePropertiesFormat.loadDistributionPolicy = SubResource.fromJson(reader); + } else if ("entraJWTValidationConfig".equals(fieldName)) { + deserializedApplicationGatewayRequestRoutingRulePropertiesFormat.entraJwtValidationConfig + = SubResource.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedApplicationGatewayRequestRoutingRulePropertiesFormat.provisioningState = ProvisioningState.fromString(reader.getString()); diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/DdosCustomPolicyInner.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/DdosCustomPolicyInner.java index 8d0ababe7641..a581265ea6c3 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/DdosCustomPolicyInner.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/DdosCustomPolicyInner.java @@ -6,11 +6,14 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.core.management.SubResource; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.network.models.DdosDetectionRule; import com.azure.resourcemanager.network.models.ProvisioningState; import java.io.IOException; +import java.util.List; import java.util.Map; /** @@ -145,6 +148,54 @@ public ProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } + /** + * Get the detectionRules property: The list of DDoS detection rules associated with the custom policy. + * + * @return the detectionRules value. + */ + public List detectionRules() { + return this.innerProperties() == null ? null : this.innerProperties().detectionRules(); + } + + /** + * Set the detectionRules property: The list of DDoS detection rules associated with the custom policy. + * + * @param detectionRules the detectionRules value to set. + * @return the DdosCustomPolicyInner object itself. + */ + public DdosCustomPolicyInner withDetectionRules(List detectionRules) { + if (this.innerProperties() == null) { + this.innerProperties = new DdosCustomPolicyPropertiesFormat(); + } + this.innerProperties().withDetectionRules(detectionRules); + return this; + } + + /** + * Get the frontEndIpConfiguration property: The list of frontend IP configurations associated with the custom + * policy. + * + * @return the frontEndIpConfiguration value. + */ + public List frontEndIpConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().frontEndIpConfiguration(); + } + + /** + * Set the frontEndIpConfiguration property: The list of frontend IP configurations associated with the custom + * policy. + * + * @param frontEndIpConfiguration the frontEndIpConfiguration value to set. + * @return the DdosCustomPolicyInner object itself. + */ + public DdosCustomPolicyInner withFrontEndIpConfiguration(List frontEndIpConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new DdosCustomPolicyPropertiesFormat(); + } + this.innerProperties().withFrontEndIpConfiguration(frontEndIpConfiguration); + return this; + } + /** * Validates the instance. * diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/DdosCustomPolicyPropertiesFormat.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/DdosCustomPolicyPropertiesFormat.java index 7622a1591269..c9ecb5ac5c98 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/DdosCustomPolicyPropertiesFormat.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/DdosCustomPolicyPropertiesFormat.java @@ -4,18 +4,21 @@ package com.azure.resourcemanager.network.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.network.models.DdosDetectionRule; import com.azure.resourcemanager.network.models.ProvisioningState; import java.io.IOException; +import java.util.List; /** * DDoS custom policy properties. */ -@Immutable +@Fluent public final class DdosCustomPolicyPropertiesFormat implements JsonSerializable { /* * The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the @@ -28,6 +31,16 @@ public final class DdosCustomPolicyPropertiesFormat implements JsonSerializable< */ private ProvisioningState provisioningState; + /* + * The list of DDoS detection rules associated with the custom policy. + */ + private List detectionRules; + + /* + * The list of frontend IP configurations associated with the custom policy. + */ + private List frontEndIpConfiguration; + /** * Creates an instance of DdosCustomPolicyPropertiesFormat class. */ @@ -54,12 +67,57 @@ public ProvisioningState provisioningState() { return this.provisioningState; } + /** + * Get the detectionRules property: The list of DDoS detection rules associated with the custom policy. + * + * @return the detectionRules value. + */ + public List detectionRules() { + return this.detectionRules; + } + + /** + * Set the detectionRules property: The list of DDoS detection rules associated with the custom policy. + * + * @param detectionRules the detectionRules value to set. + * @return the DdosCustomPolicyPropertiesFormat object itself. + */ + public DdosCustomPolicyPropertiesFormat withDetectionRules(List detectionRules) { + this.detectionRules = detectionRules; + return this; + } + + /** + * Get the frontEndIpConfiguration property: The list of frontend IP configurations associated with the custom + * policy. + * + * @return the frontEndIpConfiguration value. + */ + public List frontEndIpConfiguration() { + return this.frontEndIpConfiguration; + } + + /** + * Set the frontEndIpConfiguration property: The list of frontend IP configurations associated with the custom + * policy. + * + * @param frontEndIpConfiguration the frontEndIpConfiguration value to set. + * @return the DdosCustomPolicyPropertiesFormat object itself. + */ + public DdosCustomPolicyPropertiesFormat withFrontEndIpConfiguration(List frontEndIpConfiguration) { + this.frontEndIpConfiguration = frontEndIpConfiguration; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (detectionRules() != null) { + detectionRules().forEach(e -> e.validate()); + } } /** @@ -68,6 +126,10 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("detectionRules", this.detectionRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("frontEndIpConfiguration", this.frontEndIpConfiguration, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -92,6 +154,14 @@ public static DdosCustomPolicyPropertiesFormat fromJson(JsonReader jsonReader) t } else if ("provisioningState".equals(fieldName)) { deserializedDdosCustomPolicyPropertiesFormat.provisioningState = ProvisioningState.fromString(reader.getString()); + } else if ("detectionRules".equals(fieldName)) { + List detectionRules + = reader.readArray(reader1 -> DdosDetectionRule.fromJson(reader1)); + deserializedDdosCustomPolicyPropertiesFormat.detectionRules = detectionRules; + } else if ("frontEndIpConfiguration".equals(fieldName)) { + List frontEndIpConfiguration + = reader.readArray(reader1 -> SubResource.fromJson(reader1)); + deserializedDdosCustomPolicyPropertiesFormat.frontEndIpConfiguration = frontEndIpConfiguration; } else { reader.skipChildren(); } diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/DdosDetectionRulePropertiesFormat.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/DdosDetectionRulePropertiesFormat.java new file mode 100644 index 000000000000..c1bb25442771 --- /dev/null +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/DdosDetectionRulePropertiesFormat.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.network.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.network.models.DdosDetectionMode; +import com.azure.resourcemanager.network.models.ProvisioningState; +import com.azure.resourcemanager.network.models.TrafficDetectionRule; +import java.io.IOException; + +/** + * DDoS detection rule properties. + */ +@Fluent +public final class DdosDetectionRulePropertiesFormat implements JsonSerializable { + /* + * The provisioning state of the DDoS detection rule. + */ + private ProvisioningState provisioningState; + + /* + * The detection mode for the DDoS detection rule. + */ + private DdosDetectionMode detectionMode; + + /* + * The traffic detection rule details. + */ + private TrafficDetectionRule trafficDetectionRule; + + /** + * Creates an instance of DdosDetectionRulePropertiesFormat class. + */ + public DdosDetectionRulePropertiesFormat() { + } + + /** + * Get the provisioningState property: The provisioning state of the DDoS detection rule. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the detectionMode property: The detection mode for the DDoS detection rule. + * + * @return the detectionMode value. + */ + public DdosDetectionMode detectionMode() { + return this.detectionMode; + } + + /** + * Set the detectionMode property: The detection mode for the DDoS detection rule. + * + * @param detectionMode the detectionMode value to set. + * @return the DdosDetectionRulePropertiesFormat object itself. + */ + public DdosDetectionRulePropertiesFormat withDetectionMode(DdosDetectionMode detectionMode) { + this.detectionMode = detectionMode; + return this; + } + + /** + * Get the trafficDetectionRule property: The traffic detection rule details. + * + * @return the trafficDetectionRule value. + */ + public TrafficDetectionRule trafficDetectionRule() { + return this.trafficDetectionRule; + } + + /** + * Set the trafficDetectionRule property: The traffic detection rule details. + * + * @param trafficDetectionRule the trafficDetectionRule value to set. + * @return the DdosDetectionRulePropertiesFormat object itself. + */ + public DdosDetectionRulePropertiesFormat withTrafficDetectionRule(TrafficDetectionRule trafficDetectionRule) { + this.trafficDetectionRule = trafficDetectionRule; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (trafficDetectionRule() != null) { + trafficDetectionRule().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("detectionMode", this.detectionMode == null ? null : this.detectionMode.toString()); + jsonWriter.writeJsonField("trafficDetectionRule", this.trafficDetectionRule); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DdosDetectionRulePropertiesFormat from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DdosDetectionRulePropertiesFormat if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DdosDetectionRulePropertiesFormat. + */ + public static DdosDetectionRulePropertiesFormat fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DdosDetectionRulePropertiesFormat deserializedDdosDetectionRulePropertiesFormat + = new DdosDetectionRulePropertiesFormat(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedDdosDetectionRulePropertiesFormat.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("detectionMode".equals(fieldName)) { + deserializedDdosDetectionRulePropertiesFormat.detectionMode + = DdosDetectionMode.fromString(reader.getString()); + } else if ("trafficDetectionRule".equals(fieldName)) { + deserializedDdosDetectionRulePropertiesFormat.trafficDetectionRule + = TrafficDetectionRule.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDdosDetectionRulePropertiesFormat; + }); + } +} diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/FlowLogInformationInner.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/FlowLogInformationInner.java index 726a87ce1cd9..272f134f4d6a 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/FlowLogInformationInner.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/FlowLogInformationInner.java @@ -167,6 +167,37 @@ public FlowLogInformationInner withEnabledFilteringCriteria(String enabledFilter return this; } + /** + * Get the recordTypes property: Optional field to filter network traffic logs based on flow states. Value of this + * field could be any comma separated combination string of letters B,C,E or D. B represents Begin, when a flow is + * created. C represents Continue for an ongoing flow generated at every five-minute interval. E represents End, + * when a flow is terminated. D represents Deny, when a flow is denied. If not specified, all network traffic will + * be logged. + * + * @return the recordTypes value. + */ + public String recordTypes() { + return this.innerProperties() == null ? null : this.innerProperties().recordTypes(); + } + + /** + * Set the recordTypes property: Optional field to filter network traffic logs based on flow states. Value of this + * field could be any comma separated combination string of letters B,C,E or D. B represents Begin, when a flow is + * created. C represents Continue for an ongoing flow generated at every five-minute interval. E represents End, + * when a flow is terminated. D represents Deny, when a flow is denied. If not specified, all network traffic will + * be logged. + * + * @param recordTypes the recordTypes value to set. + * @return the FlowLogInformationInner object itself. + */ + public FlowLogInformationInner withRecordTypes(String recordTypes) { + if (this.innerProperties() == null) { + this.innerProperties = new FlowLogProperties(); + } + this.innerProperties().withRecordTypes(recordTypes); + return this; + } + /** * Get the enabled property: Flag to enable/disable flow logging. * diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/FlowLogInner.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/FlowLogInner.java index b33f7dd2d2ca..be4031f44f81 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/FlowLogInner.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/FlowLogInner.java @@ -234,6 +234,37 @@ public FlowLogInner withEnabledFilteringCriteria(String enabledFilteringCriteria return this; } + /** + * Get the recordTypes property: Optional field to filter network traffic logs based on flow states. Value of this + * field could be any comma separated combination string of letters B,C,E or D. B represents Begin, when a flow is + * created. C represents Continue for an ongoing flow generated at every five-minute interval. E represents End, + * when a flow is terminated. D represents Deny, when a flow is denied. If not specified, all network traffic will + * be logged. + * + * @return the recordTypes value. + */ + public String recordTypes() { + return this.innerProperties() == null ? null : this.innerProperties().recordTypes(); + } + + /** + * Set the recordTypes property: Optional field to filter network traffic logs based on flow states. Value of this + * field could be any comma separated combination string of letters B,C,E or D. B represents Begin, when a flow is + * created. C represents Continue for an ongoing flow generated at every five-minute interval. E represents End, + * when a flow is terminated. D represents Deny, when a flow is denied. If not specified, all network traffic will + * be logged. + * + * @param recordTypes the recordTypes value to set. + * @return the FlowLogInner object itself. + */ + public FlowLogInner withRecordTypes(String recordTypes) { + if (this.innerProperties() == null) { + this.innerProperties = new FlowLogPropertiesFormat(); + } + this.innerProperties().withRecordTypes(recordTypes); + return this; + } + /** * Get the enabled property: Flag to enable/disable flow logging. * diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/FlowLogProperties.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/FlowLogProperties.java index 05c0df76a423..34ae35730845 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/FlowLogProperties.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/FlowLogProperties.java @@ -30,6 +30,14 @@ public final class FlowLogProperties implements JsonSerializable writer.writeJson(element)); jsonWriter.writeArrayField("manualPrivateLinkServiceConnections", this.manualPrivateLinkServiceConnections, @@ -321,6 +350,9 @@ public static PrivateEndpointPropertiesInner fromJson(JsonReader jsonReader) thr } else if ("provisioningState".equals(fieldName)) { deserializedPrivateEndpointPropertiesInner.provisioningState = ProvisioningState.fromString(reader.getString()); + } else if ("ipVersionType".equals(fieldName)) { + deserializedPrivateEndpointPropertiesInner.ipVersionType + = PrivateEndpointIpVersionType.fromString(reader.getString()); } else if ("privateLinkServiceConnections".equals(fieldName)) { List privateLinkServiceConnections = reader.readArray(reader1 -> PrivateLinkServiceConnection.fromJson(reader1)); diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AdminRuleCollectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AdminRuleCollectionsClientImpl.java index 4c740e38fa55..0c2e3c4e1056 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AdminRuleCollectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AdminRuleCollectionsClientImpl.java @@ -167,7 +167,7 @@ private Mono> listSinglePageAsync(String return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -218,7 +218,7 @@ private Mono> listSinglePageAsync(String return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -382,7 +382,7 @@ public Mono> getWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -431,7 +431,7 @@ private Mono> getWithResponseAsync(String res return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -542,7 +542,7 @@ public Mono> createOrUpdateWithResponseAsync( } else { ruleCollection.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -598,7 +598,7 @@ private Mono> createOrUpdateWithResponseAsync } else { ruleCollection.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -709,7 +709,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, @@ -761,7 +761,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AdminRulesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AdminRulesClientImpl.java index 1baccd83c33a..d0759241e583 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AdminRulesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AdminRulesClientImpl.java @@ -172,7 +172,7 @@ private Mono> listSinglePageAsync(String resou return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -230,7 +230,7 @@ private Mono> listSinglePageAsync(String resou return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -400,7 +400,7 @@ public Mono> getWithResponseAsync(String resourceGr if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -454,7 +454,7 @@ private Mono> getWithResponseAsync(String resourceG if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -572,7 +572,7 @@ public Mono> createOrUpdateWithResponseAsync(String } else { adminRule.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -632,7 +632,7 @@ private Mono> createOrUpdateWithResponseAsync(Strin } else { adminRule.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -750,7 +750,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, @@ -806,7 +806,7 @@ private Mono>> deleteWithResponseAsync(String resource if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewayPrivateEndpointConnectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewayPrivateEndpointConnectionsClientImpl.java index ae2bc16f167c..5afb62682715 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewayPrivateEndpointConnectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewayPrivateEndpointConnectionsClientImpl.java @@ -156,7 +156,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, @@ -198,7 +198,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, connectionName, @@ -392,7 +392,7 @@ public Mono>> updateWithResponseAsync(String resourceG } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, @@ -442,7 +442,7 @@ private Mono>> updateWithResponseAsync(String resource } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, connectionName, @@ -658,7 +658,7 @@ public ApplicationGatewayPrivateEndpointConnectionInner update(String resourceGr return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, @@ -701,7 +701,7 @@ private Mono> getWith return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, connectionName, @@ -792,7 +792,7 @@ public ApplicationGatewayPrivateEndpointConnectionInner get(String resourceGroup return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, @@ -834,7 +834,7 @@ public ApplicationGatewayPrivateEndpointConnectionInner get(String resourceGroup return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewayPrivateLinkResourcesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewayPrivateLinkResourcesClientImpl.java index 9ecc0dbc0051..26a6504adbb6 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewayPrivateLinkResourcesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewayPrivateLinkResourcesClientImpl.java @@ -113,7 +113,7 @@ Mono> listNext( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, @@ -155,7 +155,7 @@ Mono> listNext( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewayWafDynamicManifestsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewayWafDynamicManifestsClientImpl.java index a3c6ed673f6d..34b0af27c69a 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewayWafDynamicManifestsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewayWafDynamicManifestsClientImpl.java @@ -104,7 +104,7 @@ private Mono> get return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), location, apiVersion, @@ -140,7 +140,7 @@ private Mono> get return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewayWafDynamicManifestsDefaultsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewayWafDynamicManifestsDefaultsClientImpl.java index efeed00446bd..71006e229023 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewayWafDynamicManifestsDefaultsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewayWafDynamicManifestsDefaultsClientImpl.java @@ -91,7 +91,7 @@ public Mono> getWithRe return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), location, apiVersion, @@ -124,7 +124,7 @@ private Mono> getWithR return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), location, apiVersion, this.client.getSubscriptionId(), accept, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewaysClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewaysClientImpl.java index b444b9a31bed..b365eaa78a3a 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewaysClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewaysClientImpl.java @@ -298,7 +298,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, @@ -336,7 +336,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, apiVersion, @@ -505,7 +505,7 @@ public Mono> getByResourceGroupWithResponseAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -543,7 +543,7 @@ private Mono> getByResourceGroupWithResponseAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, @@ -634,7 +634,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -678,7 +678,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, apiVersion, @@ -871,7 +871,7 @@ public Mono> updateTagsWithResponseAsync(Strin } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, @@ -915,7 +915,7 @@ private Mono> updateTagsWithResponseAsync(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, apiVersion, @@ -999,7 +999,7 @@ private Mono> listByResourceGroupSinglePa return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1035,7 +1035,7 @@ private Mono> listByResourceGroupSinglePa return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1123,7 +1123,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1153,7 +1153,7 @@ private Mono> listSinglePageAsync(Context return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -1243,7 +1243,7 @@ public Mono>> startWithResponseAsync(String resourceGr return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.start(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, @@ -1281,7 +1281,7 @@ private Mono>> startWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.start(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, apiVersion, @@ -1449,7 +1449,7 @@ public Mono>> stopWithResponseAsync(String resourceGro return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.stop(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, @@ -1487,7 +1487,7 @@ private Mono>> stopWithResponseAsync(String resourceGr return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.stop(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, apiVersion, @@ -1657,7 +1657,7 @@ public Mono>> backendHealthWithResponseAsync(String re return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.backendHealth(this.client.getEndpoint(), resourceGroupName, @@ -1697,7 +1697,7 @@ private Mono>> backendHealthWithResponseAsync(String r return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.backendHealth(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, apiVersion, @@ -1940,7 +1940,7 @@ public Mono>> backendHealthOnDemandWithResponseAsync(S } else { probeRequest.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.backendHealthOnDemand(this.client.getEndpoint(), resourceGroupName, @@ -1988,7 +1988,7 @@ private Mono>> backendHealthOnDemandWithResponseAsync( } else { probeRequest.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.backendHealthOnDemand(this.client.getEndpoint(), resourceGroupName, applicationGatewayName, @@ -2251,7 +2251,7 @@ public Mono>> listAvailableServerVariablesWithResponseAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAvailableServerVariables(this.client.getEndpoint(), apiVersion, @@ -2279,7 +2279,7 @@ private Mono>> listAvailableServerVariablesWithResponseAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listAvailableServerVariables(this.client.getEndpoint(), apiVersion, @@ -2343,7 +2343,7 @@ public Mono>> listAvailableRequestHeadersWithResponseAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAvailableRequestHeaders(this.client.getEndpoint(), apiVersion, @@ -2371,7 +2371,7 @@ private Mono>> listAvailableRequestHeadersWithResponseAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listAvailableRequestHeaders(this.client.getEndpoint(), apiVersion, @@ -2435,7 +2435,7 @@ public Mono>> listAvailableResponseHeadersWithResponseAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAvailableResponseHeaders(this.client.getEndpoint(), apiVersion, @@ -2463,7 +2463,7 @@ private Mono>> listAvailableResponseHeadersWithResponseAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listAvailableResponseHeaders(this.client.getEndpoint(), apiVersion, @@ -2528,7 +2528,7 @@ public List listAvailableResponseHeaders() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAvailableWafRuleSets(this.client.getEndpoint(), apiVersion, @@ -2557,7 +2557,7 @@ public List listAvailableResponseHeaders() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listAvailableWafRuleSets(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -2622,7 +2622,7 @@ public Mono> listAvailableS return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAvailableSslOptions(this.client.getEndpoint(), apiVersion, @@ -2651,7 +2651,7 @@ public Mono> listAvailableS return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listAvailableSslOptions(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -2716,7 +2716,7 @@ public ApplicationGatewayAvailableSslOptionsInner listAvailableSslOptions() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAvailableSslPredefinedPolicies(this.client.getEndpoint(), apiVersion, @@ -2748,7 +2748,7 @@ public ApplicationGatewayAvailableSslOptionsInner listAvailableSslOptions() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2843,7 +2843,7 @@ public PagedIterable listAvailableSs return Mono .error(new IllegalArgumentException("Parameter predefinedPolicyName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getSslPredefinedPolicy(this.client.getEndpoint(), apiVersion, @@ -2877,7 +2877,7 @@ public PagedIterable listAvailableSs return Mono .error(new IllegalArgumentException("Parameter predefinedPolicyName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getSslPredefinedPolicy(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationSecurityGroupsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationSecurityGroupsClientImpl.java index 021a708cf420..a4c00d73a03e 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationSecurityGroupsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationSecurityGroupsClientImpl.java @@ -180,7 +180,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, @@ -218,7 +218,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, applicationSecurityGroupName, apiVersion, @@ -390,7 +390,7 @@ public Mono> getByResourceGroupWithRespo return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -429,7 +429,7 @@ private Mono> getByResourceGroupWithResp return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, applicationSecurityGroupName, @@ -522,7 +522,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -567,7 +567,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, applicationSecurityGroupName, @@ -766,7 +766,7 @@ public Mono> updateTagsWithResponseAsync } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, @@ -811,7 +811,7 @@ private Mono> updateTagsWithResponseAsyn } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, applicationSecurityGroupName, @@ -891,7 +891,7 @@ private Mono> listSinglePageAsync() return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -921,7 +921,7 @@ private Mono> listSinglePageAsync(C return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -1007,7 +1007,7 @@ public PagedIterable list(Context context) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1043,7 +1043,7 @@ public PagedIterable list(Context context) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailableDelegationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailableDelegationsClientImpl.java index 6ff4a2aae6e0..d4a9a140abae 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailableDelegationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailableDelegationsClientImpl.java @@ -102,7 +102,7 @@ private Mono> listSinglePageAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), location, apiVersion, @@ -136,7 +136,7 @@ private Mono> listSinglePageAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailableEndpointServicesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailableEndpointServicesClientImpl.java index 968d7ec055df..6f6c4ef7c739 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailableEndpointServicesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailableEndpointServicesClientImpl.java @@ -102,7 +102,7 @@ private Mono> listSinglePageAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), location, apiVersion, @@ -136,7 +136,7 @@ private Mono> listSinglePageAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailablePrivateEndpointTypesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailablePrivateEndpointTypesClientImpl.java index d1997617ef17..ff49bab4cc1d 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailablePrivateEndpointTypesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailablePrivateEndpointTypesClientImpl.java @@ -119,7 +119,7 @@ private Mono> listSinglePageAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), location, apiVersion, @@ -154,7 +154,7 @@ private Mono> listSinglePageAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -251,7 +251,7 @@ private Mono> listByResourceGro return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), location, resourceGroupName, @@ -291,7 +291,7 @@ private Mono> listByResourceGro return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailableResourceGroupDelegationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailableResourceGroupDelegationsClientImpl.java index b5eed9a3fc2e..08dfa65f956a 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailableResourceGroupDelegationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailableResourceGroupDelegationsClientImpl.java @@ -109,7 +109,7 @@ private Mono> listSinglePageAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), location, resourceGroupName, @@ -149,7 +149,7 @@ private Mono> listSinglePageAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailableServiceAliasesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailableServiceAliasesClientImpl.java index 44db628a4a6b..ccb888960d7b 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailableServiceAliasesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AvailableServiceAliasesClientImpl.java @@ -119,7 +119,7 @@ private Mono> listSinglePageAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), location, this.client.getSubscriptionId(), @@ -153,7 +153,7 @@ private Mono> listSinglePageAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -254,7 +254,7 @@ private Mono> listByResourceGroupSingl return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, location, @@ -294,7 +294,7 @@ private Mono> listByResourceGroupSingl return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AzureFirewallFqdnTagsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AzureFirewallFqdnTagsClientImpl.java index 92e7193226e9..57fcbf50b693 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AzureFirewallFqdnTagsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AzureFirewallFqdnTagsClientImpl.java @@ -97,7 +97,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -127,7 +127,7 @@ private Mono> listSinglePageAsync(Conte return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AzureFirewallsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AzureFirewallsClientImpl.java index d91ddd337193..4417963f16e2 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AzureFirewallsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AzureFirewallsClientImpl.java @@ -211,7 +211,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, azureFirewallName, @@ -249,7 +249,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, azureFirewallName, apiVersion, @@ -416,7 +416,7 @@ public Mono> getByResourceGroupWithResponseAsync(St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -454,7 +454,7 @@ private Mono> getByResourceGroupWithResponseAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, azureFirewallName, apiVersion, @@ -544,7 +544,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -588,7 +588,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, azureFirewallName, apiVersion, @@ -779,7 +779,7 @@ public Mono>> updateTagsWithResponseAsync(String resou } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, azureFirewallName, @@ -823,7 +823,7 @@ private Mono>> updateTagsWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, azureFirewallName, apiVersion, @@ -1002,7 +1002,7 @@ private Mono> listByResourceGroupSinglePageAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1038,7 +1038,7 @@ private Mono> listByResourceGroupSinglePageAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1126,7 +1126,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1156,7 +1156,7 @@ private Mono> listSinglePageAsync(Context cont return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -1247,7 +1247,7 @@ public Mono>> listLearnedPrefixesWithResponseAsync(Str return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listLearnedPrefixes(this.client.getEndpoint(), resourceGroupName, @@ -1286,7 +1286,7 @@ private Mono>> listLearnedPrefixesWithResponseAsync(St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listLearnedPrefixes(this.client.getEndpoint(), resourceGroupName, azureFirewallName, apiVersion, @@ -1467,7 +1467,7 @@ public Mono>> packetCaptureWithResponseAsync(String re } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.packetCapture(this.client.getEndpoint(), resourceGroupName, @@ -1511,7 +1511,7 @@ private Mono>> packetCaptureWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.packetCapture(this.client.getEndpoint(), resourceGroupName, azureFirewallName, apiVersion, @@ -1701,7 +1701,7 @@ public Mono>> packetCaptureOperationWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.packetCaptureOperation(this.client.getEndpoint(), resourceGroupName, @@ -1746,7 +1746,7 @@ private Mono>> packetCaptureOperationWithResponseAsync } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.packetCaptureOperation(this.client.getEndpoint(), resourceGroupName, azureFirewallName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/BastionHostsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/BastionHostsClientImpl.java index 1486fac8f2ce..cc4814f495b3 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/BastionHostsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/BastionHostsClientImpl.java @@ -176,7 +176,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, bastionHostname, @@ -214,7 +214,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, bastionHostname, apiVersion, @@ -381,7 +381,7 @@ public Mono> getByResourceGroupWithResponseAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -419,7 +419,7 @@ private Mono> getByResourceGroupWithResponseAsync(Str return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, bastionHostname, apiVersion, @@ -509,7 +509,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -553,7 +553,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, bastionHostname, apiVersion, @@ -744,7 +744,7 @@ public Mono>> updateTagsWithResponseAsync(String resou } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -788,7 +788,7 @@ private Mono>> updateTagsWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -961,7 +961,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -991,7 +991,7 @@ private Mono> listSinglePageAsync(Context contex return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -1076,7 +1076,7 @@ private Mono> listByResourceGroupSinglePageAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1112,7 +1112,7 @@ private Mono> listByResourceGroupSinglePageAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/BgpServiceCommunitiesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/BgpServiceCommunitiesClientImpl.java index db659034261d..fa91a419bba6 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/BgpServiceCommunitiesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/BgpServiceCommunitiesClientImpl.java @@ -97,7 +97,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -127,7 +127,7 @@ private Mono> listSinglePageAsync(Contex return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ConfigurationPolicyGroupsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ConfigurationPolicyGroupsClientImpl.java index 95e7f97e883e..033ffd8cf60e 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ConfigurationPolicyGroupsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ConfigurationPolicyGroupsClientImpl.java @@ -168,7 +168,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { vpnServerConfigurationPolicyGroupParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -222,7 +222,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { vpnServerConfigurationPolicyGroupParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -452,7 +452,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error( new IllegalArgumentException("Parameter configurationPolicyGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -496,7 +496,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter configurationPolicyGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -689,7 +689,7 @@ public Mono> getWithResponseAsy return Mono.error( new IllegalArgumentException("Parameter configurationPolicyGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -734,7 +734,7 @@ private Mono> getWithResponseAs return Mono.error( new IllegalArgumentException("Parameter configurationPolicyGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -826,7 +826,7 @@ public VpnServerConfigurationPolicyGroupInner get(String resourceGroupName, Stri return Mono.error( new IllegalArgumentException("Parameter vpnServerConfigurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByVpnServerConfiguration(this.client.getEndpoint(), @@ -868,7 +868,7 @@ private Mono> listByVpnSer return Mono.error( new IllegalArgumentException("Parameter vpnServerConfigurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ConnectionMonitorsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ConnectionMonitorsClientImpl.java index 880a292fcdfa..9032544f63ee 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ConnectionMonitorsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ConnectionMonitorsClientImpl.java @@ -183,7 +183,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -236,7 +236,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -499,7 +499,7 @@ public Mono> getWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -542,7 +542,7 @@ private Mono> getWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, networkWatcherName, connectionMonitorName, @@ -636,7 +636,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -679,7 +679,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, networkWatcherName, connectionMonitorName, @@ -873,7 +873,7 @@ public Mono> updateTagsWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -923,7 +923,7 @@ private Mono> updateTagsWithResponseAsync } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -1022,7 +1022,7 @@ public Mono>> stopWithResponseAsync(String resourceGro return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.stop(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -1065,7 +1065,7 @@ private Mono>> stopWithResponseAsync(String resourceGr return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.stop(this.client.getEndpoint(), resourceGroupName, networkWatcherName, connectionMonitorName, @@ -1247,7 +1247,7 @@ private Mono> listSinglePageAsync(St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -1287,7 +1287,7 @@ private Mono> listSinglePageAsync(St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ConnectivityConfigurationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ConnectivityConfigurationsClientImpl.java index 74fb277665f0..b65867753002 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ConnectivityConfigurationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ConnectivityConfigurationsClientImpl.java @@ -159,7 +159,7 @@ public Mono> getWithResponseAsync(Strin return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -204,7 +204,7 @@ private Mono> getWithResponseAsync(Stri return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -313,7 +313,7 @@ public Mono> createOrUpdateWithResponse } else { connectivityConfiguration.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -367,7 +367,7 @@ private Mono> createOrUpdateWithRespons } else { connectivityConfiguration.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -473,7 +473,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -520,7 +520,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -772,7 +772,7 @@ private Mono> listSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -818,7 +818,7 @@ private Mono> listSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/CustomIpPrefixesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/CustomIpPrefixesClientImpl.java index a11bf1e0957e..64883c58f4f0 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/CustomIpPrefixesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/CustomIpPrefixesClientImpl.java @@ -178,7 +178,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, customIpPrefixName, @@ -216,7 +216,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, customIpPrefixName, apiVersion, @@ -385,7 +385,7 @@ public Mono> getByResourceGroupWithResponseAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -425,7 +425,7 @@ private Mono> getByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, customIpPrefixName, apiVersion, @@ -518,7 +518,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -562,7 +562,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, customIpPrefixName, apiVersion, @@ -754,7 +754,7 @@ public Mono> updateTagsWithResponseAsync(String re } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, customIpPrefixName, @@ -798,7 +798,7 @@ private Mono> updateTagsWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, customIpPrefixName, apiVersion, @@ -875,7 +875,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -905,7 +905,7 @@ private Mono> listSinglePageAsync(Context con return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -990,7 +990,7 @@ private Mono> listByResourceGroupSinglePageAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1026,7 +1026,7 @@ private Mono> listByResourceGroupSinglePageAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DdosCustomPoliciesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DdosCustomPoliciesClientImpl.java index 2a4b80627b9f..9cfdafbadb71 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DdosCustomPoliciesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DdosCustomPoliciesClientImpl.java @@ -142,7 +142,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, ddosCustomPolicyName, @@ -180,7 +180,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, ddosCustomPolicyName, apiVersion, @@ -349,7 +349,7 @@ public Mono> getByResourceGroupWithResponseAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -388,7 +388,7 @@ private Mono> getByResourceGroupWithResponseAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, ddosCustomPolicyName, @@ -479,7 +479,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -524,7 +524,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, ddosCustomPolicyName, apiVersion, @@ -718,7 +718,7 @@ public Mono> updateTagsWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, @@ -763,7 +763,7 @@ private Mono> updateTagsWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, ddosCustomPolicyName, apiVersion, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DdosProtectionPlansClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DdosProtectionPlansClientImpl.java index 32e4bb65f550..410a8f7ea73f 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DdosProtectionPlansClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DdosProtectionPlansClientImpl.java @@ -180,7 +180,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, ddosProtectionPlanName, @@ -218,7 +218,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, ddosProtectionPlanName, apiVersion, @@ -388,7 +388,7 @@ public Mono> getByResourceGroupWithResponseAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -427,7 +427,7 @@ private Mono> getByResourceGroupWithResponseAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, ddosProtectionPlanName, @@ -519,7 +519,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -564,7 +564,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, ddosProtectionPlanName, apiVersion, @@ -758,7 +758,7 @@ public Mono> updateTagsWithResponseAsync(Strin } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, @@ -803,7 +803,7 @@ private Mono> updateTagsWithResponseAsync(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, ddosProtectionPlanName, apiVersion, @@ -881,7 +881,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -911,7 +911,7 @@ private Mono> listSinglePageAsync(Context return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -996,7 +996,7 @@ private Mono> listByResourceGroupSinglePa return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1032,7 +1032,7 @@ private Mono> listByResourceGroupSinglePa return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DefaultSecurityRulesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DefaultSecurityRulesClientImpl.java index c6e63c4a7a82..c6640bc8c0a4 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DefaultSecurityRulesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DefaultSecurityRulesClientImpl.java @@ -121,7 +121,7 @@ private Mono> listSinglePageAsync(String resour return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, networkSecurityGroupName, @@ -162,7 +162,7 @@ private Mono> listSinglePageAsync(String resour return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -273,7 +273,7 @@ public Mono> getWithResponseAsync(String resourceGro return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, networkSecurityGroupName, @@ -317,7 +317,7 @@ private Mono> getWithResponseAsync(String resourceGr return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, networkSecurityGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DscpConfigurationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DscpConfigurationsClientImpl.java index b0a3cd908e2d..70665f920bb7 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DscpConfigurationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/DscpConfigurationsClientImpl.java @@ -174,7 +174,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -219,7 +219,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, dscpConfigurationName, apiVersion, @@ -412,7 +412,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, dscpConfigurationName, @@ -450,7 +450,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, dscpConfigurationName, apiVersion, @@ -618,7 +618,7 @@ public Mono> getByResourceGroupWithResponseAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -656,7 +656,7 @@ private Mono> getByResourceGroupWithResponseAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, dscpConfigurationName, @@ -735,7 +735,7 @@ private Mono> listByResourceGroupSinglePag return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -770,7 +770,7 @@ private Mono> listByResourceGroupSinglePag return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -858,7 +858,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -888,7 +888,7 @@ private Mono> listSinglePageAsync(Context return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitAuthorizationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitAuthorizationsClientImpl.java index bac2eabc0da9..42dd890991cc 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitAuthorizationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitAuthorizationsClientImpl.java @@ -149,7 +149,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, circuitName, @@ -191,7 +191,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, circuitName, authorizationName, apiVersion, @@ -376,7 +376,7 @@ public Mono> getWithResponseAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, circuitName, @@ -419,7 +419,7 @@ private Mono> getWithResponseAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, circuitName, authorizationName, apiVersion, @@ -522,7 +522,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { authorizationParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, circuitName, @@ -575,7 +575,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { authorizationParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, circuitName, authorizationName, @@ -789,7 +789,7 @@ private Mono> listSinglePag return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, circuitName, apiVersion, @@ -829,7 +829,7 @@ private Mono> listSinglePag return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitConnectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitConnectionsClientImpl.java index 345ce4fb5a7c..fb1e228ecc74 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitConnectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitConnectionsClientImpl.java @@ -155,7 +155,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, circuitName, @@ -200,7 +200,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, connectionName, @@ -399,7 +399,7 @@ public Mono> getWithResponseAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, @@ -445,7 +445,7 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, connectionName, @@ -556,7 +556,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { expressRouteCircuitConnectionParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, circuitName, @@ -612,7 +612,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { expressRouteCircuitConnectionParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, @@ -851,7 +851,7 @@ private Mono> listSinglePageAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, @@ -895,7 +895,7 @@ private Mono> listSinglePageAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitPeeringsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitPeeringsClientImpl.java index 757dddb4a0d3..3939b76f2c63 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitPeeringsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitPeeringsClientImpl.java @@ -149,7 +149,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, circuitName, @@ -190,7 +190,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, apiVersion, @@ -372,7 +372,7 @@ public Mono> getWithResponseAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, @@ -414,7 +414,7 @@ private Mono> getWithResponseAsync(Str return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, apiVersion, @@ -513,7 +513,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { peeringParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, circuitName, @@ -562,7 +562,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { peeringParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, @@ -763,7 +763,7 @@ private Mono> listSinglePageAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, circuitName, apiVersion, @@ -803,7 +803,7 @@ private Mono> listSinglePageAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitsClientImpl.java index 6c98281fc66d..107c1f6ff4e6 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitsClientImpl.java @@ -227,7 +227,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, circuitName, @@ -264,7 +264,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, circuitName, apiVersion, @@ -430,7 +430,7 @@ public Mono> getByResourceGroupWithResponseAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -468,7 +468,7 @@ private Mono> getByResourceGroupWithResponseA return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, circuitName, apiVersion, @@ -557,7 +557,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, circuitName, @@ -600,7 +600,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, circuitName, apiVersion, @@ -791,7 +791,7 @@ public Mono> updateTagsWithResponseAsync(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, circuitName, @@ -834,7 +834,7 @@ private Mono> updateTagsWithResponseAsync(Str } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, circuitName, apiVersion, @@ -930,7 +930,7 @@ public Mono>> listArpTableWithResponseAsync(String res return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listArpTable(this.client.getEndpoint(), resourceGroupName, circuitName, @@ -976,7 +976,7 @@ private Mono>> listArpTableWithResponseAsync(String re return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listArpTable(this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, devicePath, @@ -1194,7 +1194,7 @@ public Mono>> listRoutesTableWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listRoutesTable(this.client.getEndpoint(), resourceGroupName, circuitName, @@ -1240,7 +1240,7 @@ private Mono>> listRoutesTableWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listRoutesTable(this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, @@ -1458,7 +1458,7 @@ public Mono>> listRoutesTableSummaryWithResponseAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listRoutesTableSummary(this.client.getEndpoint(), resourceGroupName, @@ -1504,7 +1504,7 @@ private Mono>> listRoutesTableSummaryWithResponseAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listRoutesTableSummary(this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, @@ -1719,7 +1719,7 @@ public Mono> getStatsWithResponseAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getStats(this.client.getEndpoint(), resourceGroupName, circuitName, @@ -1757,7 +1757,7 @@ private Mono> getStatsWithResponseAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getStats(this.client.getEndpoint(), resourceGroupName, circuitName, apiVersion, @@ -1845,7 +1845,7 @@ public Mono> getPeeringStatsWithResponse return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getPeeringStats(this.client.getEndpoint(), resourceGroupName, circuitName, @@ -1887,7 +1887,7 @@ private Mono> getPeeringStatsWithRespons return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getPeeringStats(this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, @@ -1971,7 +1971,7 @@ private Mono> listByResourceGroupSingleP return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -2007,7 +2007,7 @@ private Mono> listByResourceGroupSingleP return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2095,7 +2095,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -2125,7 +2125,7 @@ private Mono> listSinglePageAsync(Contex return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteConnectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteConnectionsClientImpl.java index 46404db9f300..971d5151a0d9 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteConnectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteConnectionsClientImpl.java @@ -150,7 +150,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { putExpressRouteConnectionParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -201,7 +201,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { putExpressRouteConnectionParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, expressRouteGatewayName, @@ -416,7 +416,7 @@ public Mono> getWithResponseAsync(String r return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, expressRouteGatewayName, @@ -459,7 +459,7 @@ private Mono> getWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, expressRouteGatewayName, connectionName, @@ -552,7 +552,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, @@ -594,7 +594,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, expressRouteGatewayName, connectionName, @@ -776,7 +776,7 @@ public Mono> listWithResponseAsync(Str return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, expressRouteGatewayName, @@ -814,7 +814,7 @@ private Mono> listWithResponseAsync(St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), resourceGroupName, expressRouteGatewayName, apiVersion, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCrossConnectionPeeringsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCrossConnectionPeeringsClientImpl.java index cf1fa0d8a8ba..a8fcdf2f29aa 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCrossConnectionPeeringsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCrossConnectionPeeringsClientImpl.java @@ -149,7 +149,7 @@ private Mono> listSingleP return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, crossConnectionName, @@ -191,7 +191,7 @@ private Mono> listSingleP return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -302,7 +302,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, crossConnectionName, @@ -344,7 +344,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, crossConnectionName, peeringName, @@ -529,7 +529,7 @@ public Mono> getWithResponseAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, crossConnectionName, @@ -572,7 +572,7 @@ private Mono> getWithResponseA return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, crossConnectionName, peeringName, apiVersion, @@ -674,7 +674,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { peeringParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -727,7 +727,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { peeringParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, crossConnectionName, peeringName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCrossConnectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCrossConnectionsClientImpl.java index 5c5b23a29f2d..28b335a53d77 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCrossConnectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCrossConnectionsClientImpl.java @@ -193,7 +193,7 @@ private Mono> listSinglePageAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -225,7 +225,7 @@ private Mono> listSinglePageAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -338,7 +338,7 @@ public PagedIterable list(String filter, Conte return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -374,7 +374,7 @@ public PagedIterable list(String filter, Conte return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -480,7 +480,7 @@ public PagedIterable listByResourceGroup(Strin return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -519,7 +519,7 @@ public PagedIterable listByResourceGroup(Strin return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, crossConnectionName, apiVersion, @@ -611,7 +611,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -656,7 +656,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, crossConnectionName, apiVersion, @@ -856,7 +856,7 @@ public Mono> updateTagsWithResponseAs } else { crossConnectionParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -903,7 +903,7 @@ private Mono> updateTagsWithResponseA } else { crossConnectionParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, crossConnectionName, apiVersion, @@ -1003,7 +1003,7 @@ public Mono>> listArpTableWithResponseAsync(String res return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1051,7 +1051,7 @@ private Mono>> listArpTableWithResponseAsync(String re return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listArpTable(this.client.getEndpoint(), resourceGroupName, crossConnectionName, peeringName, @@ -1274,7 +1274,7 @@ public Mono>> listRoutesTableSummaryWithResponseAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listRoutesTableSummary(this.client.getEndpoint(), resourceGroupName, @@ -1322,7 +1322,7 @@ private Mono>> listRoutesTableSummaryWithResponseAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listRoutesTableSummary(this.client.getEndpoint(), resourceGroupName, crossConnectionName, @@ -1549,7 +1549,7 @@ public Mono>> listRoutesTableWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1598,7 +1598,7 @@ private Mono>> listRoutesTableWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listRoutesTable(this.client.getEndpoint(), resourceGroupName, crossConnectionName, peeringName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteGatewaysClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteGatewaysClientImpl.java index 4cdd93c76523..005b229cee19 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteGatewaysClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteGatewaysClientImpl.java @@ -148,7 +148,7 @@ public Mono> listBySubscriptionWithRespon return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listBySubscription(this.client.getEndpoint(), apiVersion, @@ -175,7 +175,7 @@ private Mono> listBySubscriptionWithRespo return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listBySubscription(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -243,7 +243,7 @@ public Mono> listByResourceGroupWithRespo return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -276,7 +276,7 @@ private Mono> listByResourceGroupWithResp return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, apiVersion, @@ -363,7 +363,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { putExpressRouteGatewayParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -409,7 +409,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { putExpressRouteGatewayParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, expressRouteGatewayName, apiVersion, @@ -614,7 +614,7 @@ public Mono>> updateTagsWithResponseAsync(String resou } else { expressRouteGatewayParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -659,7 +659,7 @@ private Mono>> updateTagsWithResponseAsync(String reso } else { expressRouteGatewayParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -852,7 +852,7 @@ public Mono> getByResourceGroupWithResponseAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -890,7 +890,7 @@ private Mono> getByResourceGroupWithResponseA return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, expressRouteGatewayName, @@ -976,7 +976,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, @@ -1015,7 +1015,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, expressRouteGatewayName, apiVersion, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteLinksClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteLinksClientImpl.java index 97e4b02c6f51..ef9140267c9c 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteLinksClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteLinksClientImpl.java @@ -124,7 +124,7 @@ public Mono> getWithResponseAsync(String resourc if (linkName == null) { return Mono.error(new IllegalArgumentException("Parameter linkName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -166,7 +166,7 @@ private Mono> getWithResponseAsync(String resour if (linkName == null) { return Mono.error(new IllegalArgumentException("Parameter linkName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, resourceGroupName, @@ -254,7 +254,7 @@ private Mono> listSinglePageAsync(String re return Mono .error(new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -294,7 +294,7 @@ private Mono> listSinglePageAsync(String re return Mono .error(new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRoutePortAuthorizationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRoutePortAuthorizationsClientImpl.java index ccd3493b1ab1..e50cb23c1508 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRoutePortAuthorizationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRoutePortAuthorizationsClientImpl.java @@ -155,7 +155,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, expressRoutePortName, @@ -198,7 +198,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, expressRoutePortName, authorizationName, @@ -386,7 +386,7 @@ public Mono> getWithResponseAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, expressRoutePortName, @@ -430,7 +430,7 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, expressRoutePortName, authorizationName, @@ -534,7 +534,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { authorizationParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -587,7 +587,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { authorizationParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, expressRoutePortName, @@ -805,7 +805,7 @@ private Mono> listSinglePageAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, expressRoutePortName, @@ -846,7 +846,7 @@ private Mono> listSinglePageAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRoutePortsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRoutePortsClientImpl.java index bf7a6703b9f9..8901067cdf48 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRoutePortsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRoutePortsClientImpl.java @@ -195,7 +195,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -233,7 +233,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, resourceGroupName, @@ -401,7 +401,7 @@ public Mono> getByResourceGroupWithResponseAsync return Mono .error(new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), @@ -439,7 +439,7 @@ private Mono> getByResourceGroupWithResponseAsyn return Mono .error(new IllegalArgumentException("Parameter expressRoutePortName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -529,7 +529,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -573,7 +573,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -766,7 +766,7 @@ public Mono> updateTagsWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -810,7 +810,7 @@ private Mono> updateTagsWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -893,7 +893,7 @@ private Mono> listByResourceGroupSinglePage return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), @@ -928,7 +928,7 @@ private Mono> listByResourceGroupSinglePage return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1015,7 +1015,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -1044,7 +1044,7 @@ private Mono> listSinglePageAsync(Context c return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) @@ -1141,7 +1141,7 @@ public Mono> generateLoaWithRe } else { request.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.generateLoa(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -1187,7 +1187,7 @@ private Mono> generateLoaWithR } else { request.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.generateLoa(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRoutePortsLocationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRoutePortsLocationsClientImpl.java index 132be96538d3..cf25f9ea8d50 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRoutePortsLocationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRoutePortsLocationsClientImpl.java @@ -106,7 +106,7 @@ private Mono> listSinglePageAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -137,7 +137,7 @@ private Mono> listSinglePageAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) @@ -225,7 +225,7 @@ public Mono> getWithResponseAsync(Strin if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -257,7 +257,7 @@ private Mono> getWithResponseAsync(Stri if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, locationName, accept, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteProviderPortsLocationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteProviderPortsLocationsClientImpl.java index 22f643f4c801..cf3a7707d6d4 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteProviderPortsLocationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteProviderPortsLocationsClientImpl.java @@ -86,7 +86,7 @@ public Mono> listWithResponseA return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -116,7 +116,7 @@ private Mono> listWithResponse return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), filter, accept, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteServiceProvidersClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteServiceProvidersClientImpl.java index 8ec6fd1f681d..b3883f6fb384 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteServiceProvidersClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteServiceProvidersClientImpl.java @@ -97,7 +97,7 @@ private Mono> listSinglePageAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -127,7 +127,7 @@ private Mono> listSinglePageAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPoliciesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPoliciesClientImpl.java index 5eb6bf0e6ec0..91f87b1a18e6 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPoliciesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPoliciesClientImpl.java @@ -178,7 +178,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -216,7 +216,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, apiVersion, @@ -384,7 +384,7 @@ public Mono> getByResourceGroupWithResponseAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -423,7 +423,7 @@ private Mono> getByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, apiVersion, @@ -516,7 +516,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -560,7 +560,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, apiVersion, @@ -752,7 +752,7 @@ public Mono> updateTagsWithResponseAsync(String re } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -796,7 +796,7 @@ private Mono> updateTagsWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, apiVersion, @@ -879,7 +879,7 @@ private Mono> listByResourceGroupSinglePageAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -915,7 +915,7 @@ private Mono> listByResourceGroupSinglePageAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1003,7 +1003,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1033,7 +1033,7 @@ private Mono> listSinglePageAsync(Context con return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyDeploymentsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyDeploymentsClientImpl.java index bc645daaf4a1..292740fe0649 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyDeploymentsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyDeploymentsClientImpl.java @@ -101,7 +101,7 @@ public Mono>> deployWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.deploy(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -139,7 +139,7 @@ private Mono>> deployWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.deploy(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyDraftsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyDraftsClientImpl.java index 10c52eb7f185..7bd20e7f03e8 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyDraftsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyDraftsClientImpl.java @@ -128,7 +128,7 @@ public Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -172,7 +172,7 @@ private Mono> createOrUpdateWithResponseAsync } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -260,7 +260,7 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -298,7 +298,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -379,7 +379,7 @@ public Mono> getWithResponseAsync(String reso return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -417,7 +417,7 @@ private Mono> getWithResponseAsync(String res return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyIdpsSignaturesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyIdpsSignaturesClientImpl.java index 164c4cf558d3..8d9aa1754ded 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyIdpsSignaturesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyIdpsSignaturesClientImpl.java @@ -107,7 +107,7 @@ public Mono> listWithResponseAsync(String resourceGr } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -152,7 +152,7 @@ private Mono> listWithResponseAsync(String resourceG } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyIdpsSignaturesFilterValuesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyIdpsSignaturesFilterValuesClientImpl.java index 79c422ebdb6f..9f6b4e5b0344 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyIdpsSignaturesFilterValuesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyIdpsSignaturesFilterValuesClientImpl.java @@ -109,7 +109,7 @@ public Mono> listWithRespo } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -154,7 +154,7 @@ private Mono> listWithResp } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyIdpsSignaturesOverridesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyIdpsSignaturesOverridesClientImpl.java index be73246b9385..8f488889cda9 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyIdpsSignaturesOverridesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyIdpsSignaturesOverridesClientImpl.java @@ -142,7 +142,7 @@ public Mono> patchWithResponseAsync(String re } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.patch(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -187,7 +187,7 @@ private Mono> patchWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.patch(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -283,7 +283,7 @@ public Mono> putWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.put(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -328,7 +328,7 @@ private Mono> putWithResponseAsync(String res } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.put(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -418,7 +418,7 @@ public Mono> getWithResponseAsync(String reso return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -457,7 +457,7 @@ private Mono> getWithResponseAsync(String res return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -542,7 +542,7 @@ public Mono> listWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -581,7 +581,7 @@ private Mono> listWithResponseAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyRuleCollectionGroupDraftsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyRuleCollectionGroupDraftsClientImpl.java index 454a7e2256a2..8bf1e978a9e8 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyRuleCollectionGroupDraftsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyRuleCollectionGroupDraftsClientImpl.java @@ -131,7 +131,7 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -174,7 +174,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, ruleCollectionGroupName, @@ -272,7 +272,7 @@ public Mono> createOrUpdat } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -323,7 +323,7 @@ private Mono> createOrUpda } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -425,7 +425,7 @@ public Mono> getWithRespon return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -468,7 +468,7 @@ private Mono> getWithRespo return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, ruleCollectionGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyRuleCollectionGroupsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyRuleCollectionGroupsClientImpl.java index 4623541b2832..4230dfb779dd 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyRuleCollectionGroupsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPolicyRuleCollectionGroupsClientImpl.java @@ -156,7 +156,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -199,7 +199,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, ruleCollectionGroupName, @@ -387,7 +387,7 @@ public Mono> getWithResponseAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -431,7 +431,7 @@ private Mono> getWithResponseAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, ruleCollectionGroupName, @@ -531,7 +531,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -582,7 +582,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -789,7 +789,7 @@ private Mono> listSinglePa return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, firewallPolicyName, @@ -830,7 +830,7 @@ private Mono> listSinglePa return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FlowLogsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FlowLogsClientImpl.java index 063666866030..253515d997e7 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FlowLogsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FlowLogsClientImpl.java @@ -169,7 +169,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -218,7 +218,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, networkWatcherName, flowLogName, @@ -423,7 +423,7 @@ public Mono> updateTagsWithResponseAsync(String resourceG } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -471,7 +471,7 @@ private Mono> updateTagsWithResponseAsync(String resource } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, networkWatcherName, flowLogName, @@ -569,7 +569,7 @@ public Mono> getWithResponseAsync(String resourceGroupNam return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -611,7 +611,7 @@ private Mono> getWithResponseAsync(String resourceGroupNa return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, networkWatcherName, flowLogName, apiVersion, @@ -702,7 +702,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -744,7 +744,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, networkWatcherName, flowLogName, apiVersion, @@ -923,7 +923,7 @@ private Mono> listSinglePageAsync(String resourceGro return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -963,7 +963,7 @@ private Mono> listSinglePageAsync(String resourceGro return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/HubRouteTablesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/HubRouteTablesClientImpl.java index bfce89a01601..4e36e7fe25ac 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/HubRouteTablesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/HubRouteTablesClientImpl.java @@ -161,7 +161,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { routeTableParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -210,7 +210,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { routeTableParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -413,7 +413,7 @@ public Mono> getWithResponseAsync(String resourceGr if (routeTableName == null) { return Mono.error(new IllegalArgumentException("Parameter routeTableName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -455,7 +455,7 @@ private Mono> getWithResponseAsync(String resourceG if (routeTableName == null) { return Mono.error(new IllegalArgumentException("Parameter routeTableName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -545,7 +545,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (routeTableName == null) { return Mono.error(new IllegalArgumentException("Parameter routeTableName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -586,7 +586,7 @@ private Mono>> deleteWithResponseAsync(String resource if (routeTableName == null) { return Mono.error(new IllegalArgumentException("Parameter routeTableName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -766,7 +766,7 @@ private Mono> listSinglePageAsync(String resou if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -806,7 +806,7 @@ private Mono> listSinglePageAsync(String resou if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/HubVirtualNetworkConnectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/HubVirtualNetworkConnectionsClientImpl.java index d1cb7192c63e..72c7aaa79df4 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/HubVirtualNetworkConnectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/HubVirtualNetworkConnectionsClientImpl.java @@ -163,7 +163,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { hubVirtualNetworkConnectionParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -215,7 +215,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { hubVirtualNetworkConnectionParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -435,7 +435,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -476,7 +476,7 @@ private Mono>> deleteWithResponseAsync(String resource if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -660,7 +660,7 @@ public Mono> getWithResponseAsync(Str if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -702,7 +702,7 @@ private Mono> getWithResponseAsync(St if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -791,7 +791,7 @@ private Mono> listSinglePageAsyn if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -831,7 +831,7 @@ private Mono> listSinglePageAsyn if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/InboundNatRulesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/InboundNatRulesClientImpl.java index 3dd319910692..c0217c6b9975 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/InboundNatRulesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/InboundNatRulesClientImpl.java @@ -151,7 +151,7 @@ private Mono> listSinglePageAsync(String reso return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -192,7 +192,7 @@ private Mono> listSinglePageAsync(String reso return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -301,7 +301,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -344,7 +344,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, loadBalancerName, inboundNatRuleName, @@ -531,7 +531,7 @@ public Mono> getWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -576,7 +576,7 @@ private Mono> getWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, loadBalancerName, inboundNatRuleName, @@ -681,7 +681,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { inboundNatRuleParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -734,7 +734,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { inboundNatRuleParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, loadBalancerName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/InboundSecurityRuleOperationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/InboundSecurityRuleOperationsClientImpl.java index cc7b797a6128..2075292222d4 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/InboundSecurityRuleOperationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/InboundSecurityRuleOperationsClientImpl.java @@ -128,7 +128,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -180,7 +180,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, networkVirtualApplianceName, @@ -400,7 +400,7 @@ public Mono> getWithResponseAsync(String reso return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -444,7 +444,7 @@ private Mono> getWithResponseAsync(String res return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, networkVirtualApplianceName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/IpAllocationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/IpAllocationsClientImpl.java index 3579ab69fc40..bea122a85efd 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/IpAllocationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/IpAllocationsClientImpl.java @@ -176,7 +176,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, ipAllocationName, @@ -214,7 +214,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, ipAllocationName, apiVersion, @@ -383,7 +383,7 @@ public Mono> getByResourceGroupWithResponseAsync(Str return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -423,7 +423,7 @@ private Mono> getByResourceGroupWithResponseAsync(St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, ipAllocationName, apiVersion, @@ -516,7 +516,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -560,7 +560,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, ipAllocationName, apiVersion, @@ -751,7 +751,7 @@ public Mono> updateTagsWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, ipAllocationName, @@ -795,7 +795,7 @@ private Mono> updateTagsWithResponseAsync(String res } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, ipAllocationName, apiVersion, @@ -872,7 +872,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -902,7 +902,7 @@ private Mono> listSinglePageAsync(Context conte return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -987,7 +987,7 @@ private Mono> listByResourceGroupSinglePageAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1023,7 +1023,7 @@ private Mono> listByResourceGroupSinglePageAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/IpGroupsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/IpGroupsClientImpl.java index 5a2479e1e393..e074f7457c7d 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/IpGroupsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/IpGroupsClientImpl.java @@ -175,7 +175,7 @@ public Mono> getByResourceGroupWithResponseAsync(String r return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -214,7 +214,7 @@ private Mono> getByResourceGroupWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, ipGroupsName, apiVersion, @@ -307,7 +307,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, ipGroupsName, @@ -350,7 +350,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, ipGroupsName, apiVersion, @@ -539,7 +539,7 @@ public Mono> updateGroupsWithResponseAsync(String resourc } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateGroups(this.client.getEndpoint(), resourceGroupName, ipGroupsName, @@ -582,7 +582,7 @@ private Mono> updateGroupsWithResponseAsync(String resour } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateGroups(this.client.getEndpoint(), resourceGroupName, ipGroupsName, apiVersion, @@ -667,7 +667,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, ipGroupsName, @@ -704,7 +704,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, ipGroupsName, apiVersion, @@ -865,7 +865,7 @@ private Mono> listByResourceGroupSinglePageAsync(Str return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -901,7 +901,7 @@ private Mono> listByResourceGroupSinglePageAsync(Str return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -988,7 +988,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1017,7 +1017,7 @@ private Mono> listSinglePageAsync(Context context) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/IpamPoolsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/IpamPoolsClientImpl.java index 6c2ac752f209..e832dfb24dc9 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/IpamPoolsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/IpamPoolsClientImpl.java @@ -202,7 +202,7 @@ private Mono> listSinglePageAsync(String resourceGr return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -249,7 +249,7 @@ private Mono> listSinglePageAsync(String resourceGr return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -412,7 +412,7 @@ public Mono>> createWithResponseAsync(String resourceG } else { body.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -462,7 +462,7 @@ private Mono>> createWithResponseAsync(String resource } else { body.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -722,7 +722,7 @@ public Mono> updateWithResponseAsync(String resourceGrou if (body != null) { body.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -770,7 +770,7 @@ private Mono> updateWithResponseAsync(String resourceGro if (body != null) { body.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -869,7 +869,7 @@ public Mono> getWithResponseAsync(String resourceGroupNa if (poolName == null) { return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -911,7 +911,7 @@ private Mono> getWithResponseAsync(String resourceGroupN if (poolName == null) { return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1004,7 +1004,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (poolName == null) { return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -1048,7 +1048,7 @@ private Mono>> deleteWithResponseAsync(String resource if (poolName == null) { return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1287,7 +1287,7 @@ public Mono> getPoolUsageWithResponseAsync(String resou if (poolName == null) { return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getPoolUsage(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -1329,7 +1329,7 @@ private Mono> getPoolUsageWithResponseAsync(String reso if (poolName == null) { return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getPoolUsage(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1421,7 +1421,7 @@ private Mono> listAssociatedResourcesSingleP if (poolName == null) { return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1466,7 +1466,7 @@ private Mono> listAssociatedResourcesSingleP if (poolName == null) { return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerBackendAddressPoolsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerBackendAddressPoolsClientImpl.java index 25aa7ff950db..cda4154b8fbe 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerBackendAddressPoolsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerBackendAddressPoolsClientImpl.java @@ -152,7 +152,7 @@ private Mono> listSinglePageAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -193,7 +193,7 @@ private Mono> listSinglePageAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -303,7 +303,7 @@ public Mono> getWithResponseAsync(String resou return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -346,7 +346,7 @@ private Mono> getWithResponseAsync(String reso return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, loadBalancerName, backendAddressPoolName, @@ -446,7 +446,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -496,7 +496,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -703,7 +703,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -746,7 +746,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, loadBalancerName, backendAddressPoolName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerFrontendIpConfigurationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerFrontendIpConfigurationsClientImpl.java index 02506db6dab7..e6d13f2a38af 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerFrontendIpConfigurationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerFrontendIpConfigurationsClientImpl.java @@ -123,7 +123,7 @@ private Mono> listSinglePageAsync(St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -164,7 +164,7 @@ private Mono> listSinglePageAsync(St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -275,7 +275,7 @@ public Mono> getWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -319,7 +319,7 @@ private Mono> getWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, loadBalancerName, frontendIpConfigurationName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerLoadBalancingRulesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerLoadBalancingRulesClientImpl.java index 55613d32674c..93cba627632d 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerLoadBalancingRulesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerLoadBalancingRulesClientImpl.java @@ -138,7 +138,7 @@ private Mono> listSinglePageAsync(String r return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -179,7 +179,7 @@ private Mono> listSinglePageAsync(String r return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -290,7 +290,7 @@ public Mono> getWithResponseAsync(String resour return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -334,7 +334,7 @@ private Mono> getWithResponseAsync(String resou return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, loadBalancerName, loadBalancingRuleName, @@ -427,7 +427,7 @@ public Mono>> healthWithResponseAsync(String groupName return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.health(this.client.getEndpoint(), groupName, loadBalancerName, @@ -470,7 +470,7 @@ private Mono>> healthWithResponseAsync(String groupNam return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.health(this.client.getEndpoint(), groupName, loadBalancerName, loadBalancingRuleName, apiVersion, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerNetworkInterfacesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerNetworkInterfacesClientImpl.java index 26eaffa23266..8dfa47ec245a 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerNetworkInterfacesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerNetworkInterfacesClientImpl.java @@ -110,7 +110,7 @@ private Mono> listSinglePageAsync(String re return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -151,7 +151,7 @@ private Mono> listSinglePageAsync(String re return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerOutboundRulesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerOutboundRulesClientImpl.java index a9dbcd7c90fa..b4c99c81fb42 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerOutboundRulesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerOutboundRulesClientImpl.java @@ -120,7 +120,7 @@ private Mono> listSinglePageAsync(String resour return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -161,7 +161,7 @@ private Mono> listSinglePageAsync(String resour return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -270,7 +270,7 @@ public Mono> getWithResponseAsync(String resourceGro return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -314,7 +314,7 @@ private Mono> getWithResponseAsync(String resourceGr return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, loadBalancerName, outboundRuleName, apiVersion, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerProbesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerProbesClientImpl.java index cfbecb582964..cd5837561fd0 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerProbesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerProbesClientImpl.java @@ -118,7 +118,7 @@ private Mono> listSinglePageAsync(String resourceGroup return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -158,7 +158,7 @@ private Mono> listSinglePageAsync(String resourceGroup return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -265,7 +265,7 @@ public Mono> getWithResponseAsync(String resourceGroupName, return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -307,7 +307,7 @@ private Mono> getWithResponseAsync(String resourceGroupName return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, loadBalancerName, probeName, apiVersion, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancersClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancersClientImpl.java index f7338156302e..0fd270df564b 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancersClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancersClientImpl.java @@ -213,7 +213,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -251,7 +251,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, loadBalancerName, apiVersion, @@ -419,7 +419,7 @@ public Mono> getByResourceGroupWithResponseAsync(Str return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -458,7 +458,7 @@ private Mono> getByResourceGroupWithResponseAsync(St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, loadBalancerName, apiVersion, @@ -551,7 +551,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -595,7 +595,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, loadBalancerName, apiVersion, @@ -786,7 +786,7 @@ public Mono> updateTagsWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, loadBalancerName, @@ -830,7 +830,7 @@ private Mono> updateTagsWithResponseAsync(String res } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, loadBalancerName, apiVersion, @@ -907,7 +907,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -937,7 +937,7 @@ private Mono> listSinglePageAsync(Context conte return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -1022,7 +1022,7 @@ private Mono> listByResourceGroupSinglePageAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1058,7 +1058,7 @@ private Mono> listByResourceGroupSinglePageAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1157,7 +1157,7 @@ public Mono>> swapPublicIpAddressesWithResponseAsync(S } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.swapPublicIpAddresses(this.client.getEndpoint(), location, apiVersion, @@ -1195,7 +1195,7 @@ private Mono>> swapPublicIpAddressesWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.swapPublicIpAddresses(this.client.getEndpoint(), location, apiVersion, @@ -1376,7 +1376,7 @@ public Mono>> listInboundNatRulePortMappingsWithRespon } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listInboundNatRulePortMappings(this.client.getEndpoint(), groupName, @@ -1427,7 +1427,7 @@ private Mono>> listInboundNatRulePortMappingsWithRespo } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listInboundNatRulePortMappings(this.client.getEndpoint(), groupName, loadBalancerName, @@ -1642,7 +1642,7 @@ public Mono> migrateToIpBasedWithResponseAsync(Stri if (parameters != null) { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.migrateToIpBased(this.client.getEndpoint(), groupName, loadBalancerName, @@ -1684,7 +1684,7 @@ private Mono> migrateToIpBasedWithResponseAsync(Str if (parameters != null) { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.migrateToIpBased(this.client.getEndpoint(), groupName, loadBalancerName, apiVersion, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LocalNetworkGatewaysClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LocalNetworkGatewaysClientImpl.java index 22056d86d442..185855a57e07 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LocalNetworkGatewaysClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LocalNetworkGatewaysClientImpl.java @@ -170,7 +170,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -215,7 +215,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, localNetworkGatewayName, apiVersion, @@ -405,7 +405,7 @@ public Mono> getByResourceGroupWithResponseAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -444,7 +444,7 @@ private Mono> getByResourceGroupWithResponseA return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, localNetworkGatewayName, @@ -529,7 +529,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, @@ -567,7 +567,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, localNetworkGatewayName, apiVersion, @@ -743,7 +743,7 @@ public Mono> updateTagsWithResponseAsync(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, @@ -788,7 +788,7 @@ private Mono> updateTagsWithResponseAsync(Str } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, localNetworkGatewayName, apiVersion, @@ -872,7 +872,7 @@ private Mono> listByResourceGroupSingleP return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -908,7 +908,7 @@ private Mono> listByResourceGroupSingleP return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ManagementGroupNetworkManagerConnectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ManagementGroupNetworkManagerConnectionsClientImpl.java index 312509cc9f09..e6bab26b9d16 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ManagementGroupNetworkManagerConnectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ManagementGroupNetworkManagerConnectionsClientImpl.java @@ -147,7 +147,7 @@ public Mono> createOrUpdateWithResponseA } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), managementGroupId, @@ -188,7 +188,7 @@ private Mono> createOrUpdateWithResponse } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), managementGroupId, networkManagerConnectionName, @@ -276,7 +276,7 @@ public Mono> getWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter networkManagerConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), managementGroupId, @@ -311,7 +311,7 @@ private Mono> getWithResponseAsync(Strin return Mono.error( new IllegalArgumentException("Parameter networkManagerConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), managementGroupId, networkManagerConnectionName, apiVersion, @@ -390,7 +390,7 @@ public Mono> deleteWithResponseAsync(String managementGroupId, St return Mono.error( new IllegalArgumentException("Parameter networkManagerConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), managementGroupId, @@ -424,7 +424,7 @@ private Mono> deleteWithResponseAsync(String managementGroupId, S return Mono.error( new IllegalArgumentException("Parameter networkManagerConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), managementGroupId, networkManagerConnectionName, apiVersion, @@ -504,7 +504,7 @@ private Mono> listSinglePageAsync(S return Mono .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), managementGroupId, apiVersion, top, @@ -541,7 +541,7 @@ private Mono> listSinglePageAsync(S return Mono .error(new IllegalArgumentException("Parameter managementGroupId is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), managementGroupId, apiVersion, top, skipToken, accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NatGatewaysClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NatGatewaysClientImpl.java index d0508c5eab85..d698ad384d13 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NatGatewaysClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NatGatewaysClientImpl.java @@ -174,7 +174,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, natGatewayName, @@ -211,7 +211,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, natGatewayName, apiVersion, @@ -379,7 +379,7 @@ public Mono> getByResourceGroupWithResponseAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -418,7 +418,7 @@ private Mono> getByResourceGroupWithResponseAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, natGatewayName, apiVersion, @@ -510,7 +510,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, natGatewayName, @@ -553,7 +553,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, natGatewayName, apiVersion, @@ -742,7 +742,7 @@ public Mono> updateTagsWithResponseAsync(String resour } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, natGatewayName, @@ -785,7 +785,7 @@ private Mono> updateTagsWithResponseAsync(String resou } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, natGatewayName, apiVersion, @@ -862,7 +862,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -892,7 +892,7 @@ private Mono> listSinglePageAsync(Context context return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -977,7 +977,7 @@ private Mono> listByResourceGroupSinglePageAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1013,7 +1013,7 @@ private Mono> listByResourceGroupSinglePageAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NatRulesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NatRulesClientImpl.java index 16bd6b229efb..8fecaa261b3e 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NatRulesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NatRulesClientImpl.java @@ -150,7 +150,7 @@ public Mono> getWithResponseAsync(String resour if (natRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter natRuleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -191,7 +191,7 @@ private Mono> getWithResponseAsync(String resou if (natRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter natRuleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, gatewayName, @@ -288,7 +288,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { natRuleParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -336,7 +336,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { natRuleParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -537,7 +537,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (natRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter natRuleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -578,7 +578,7 @@ private Mono>> deleteWithResponseAsync(String resource if (natRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter natRuleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -756,7 +756,7 @@ private Mono> listByVpnGatewaySinglePageAs if (gatewayName == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByVpnGateway(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -796,7 +796,7 @@ private Mono> listByVpnGatewaySinglePageAs if (gatewayName == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkGroupsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkGroupsClientImpl.java index 5c2672e1b415..65f3b07b8067 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkGroupsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkGroupsClientImpl.java @@ -158,7 +158,7 @@ public Mono> getWithResponseAsync(String resourceGro return Mono .error(new IllegalArgumentException("Parameter networkGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -201,7 +201,7 @@ private Mono> getWithResponseAsync(String resourceGr return Mono .error(new IllegalArgumentException("Parameter networkGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -302,7 +302,7 @@ public Mono createOrUpdateWithResponseAsync } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -355,7 +355,7 @@ private Mono createOrUpdateWithResponseAsyn } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -461,7 +461,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter networkGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -506,7 +506,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter networkGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -748,7 +748,7 @@ private Mono> listSinglePageAsync(String resour return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -794,7 +794,7 @@ private Mono> listSinglePageAsync(String resour return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceIpConfigurationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceIpConfigurationsClientImpl.java index 1ab71a12ab09..a4b9643e08e7 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceIpConfigurationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceIpConfigurationsClientImpl.java @@ -121,7 +121,7 @@ private Mono> listSinglePage return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, networkInterfaceName, @@ -162,7 +162,7 @@ private Mono> listSinglePage return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -275,7 +275,7 @@ public Mono> getWithResponseAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, networkInterfaceName, @@ -319,7 +319,7 @@ private Mono> getWithResponseAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, networkInterfaceName, ipConfigurationName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceLoadBalancersClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceLoadBalancersClientImpl.java index 838c69a4adaf..3da4b601698d 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceLoadBalancersClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceLoadBalancersClientImpl.java @@ -111,7 +111,7 @@ private Mono> listSinglePageAsync(String resour return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, networkInterfaceName, @@ -152,7 +152,7 @@ private Mono> listSinglePageAsync(String resour return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceTapConfigurationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceTapConfigurationsClientImpl.java index 1cdb635a64be..3e22d5aa8a38 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceTapConfigurationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceTapConfigurationsClientImpl.java @@ -157,7 +157,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, networkInterfaceName, @@ -200,7 +200,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, networkInterfaceName, tapConfigurationName, @@ -388,7 +388,7 @@ public Mono> getWithResponseAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, networkInterfaceName, @@ -432,7 +432,7 @@ private Mono> getWithResponseAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, networkInterfaceName, tapConfigurationName, @@ -535,7 +535,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { tapConfigurationParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -588,7 +588,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { tapConfigurationParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, networkInterfaceName, @@ -800,7 +800,7 @@ private Mono> listSinglePag return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, networkInterfaceName, @@ -841,7 +841,7 @@ private Mono> listSinglePag return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfacesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfacesClientImpl.java index 5d0b9c3e728d..0db494dc575d 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfacesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfacesClientImpl.java @@ -339,7 +339,7 @@ private Mono> listCloudServiceRoleInstanceN return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listCloudServiceRoleInstanceNetworkInterfaces(this.client.getEndpoint(), @@ -386,7 +386,7 @@ private Mono> listCloudServiceRoleInstanceN return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -508,7 +508,7 @@ public PagedIterable listCloudServiceRoleInstanceNetworkI return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listCloudServiceNetworkInterfaces(this.client.getEndpoint(), @@ -549,7 +549,7 @@ private Mono> listCloudServiceNetworkInterf return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -672,7 +672,7 @@ public Mono> getCloudServiceNetworkInterfaceWith return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getCloudServiceNetworkInterface(this.client.getEndpoint(), @@ -724,7 +724,7 @@ private Mono> getCloudServiceNetworkInterfaceWit return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getCloudServiceNetworkInterface(this.client.getEndpoint(), resourceGroupName, cloudServiceName, @@ -822,7 +822,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, networkInterfaceName, @@ -860,7 +860,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, networkInterfaceName, apiVersion, @@ -1030,7 +1030,7 @@ public Mono> getByResourceGroupWithResponseAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1070,7 +1070,7 @@ private Mono> getByResourceGroupWithResponseAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, networkInterfaceName, @@ -1164,7 +1164,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -1209,7 +1209,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, networkInterfaceName, apiVersion, @@ -1403,7 +1403,7 @@ public Mono> updateTagsWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, @@ -1448,7 +1448,7 @@ private Mono> updateTagsWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, networkInterfaceName, apiVersion, @@ -1526,7 +1526,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1556,7 +1556,7 @@ private Mono> listSinglePageAsync(Context c return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -1641,7 +1641,7 @@ private Mono> listByResourceGroupSinglePage return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1677,7 +1677,7 @@ private Mono> listByResourceGroupSinglePage return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1777,7 +1777,7 @@ public Mono>> getEffectiveRouteTableWithResponseAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getEffectiveRouteTable(this.client.getEndpoint(), resourceGroupName, @@ -1816,7 +1816,7 @@ private Mono>> getEffectiveRouteTableWithResponseAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getEffectiveRouteTable(this.client.getEndpoint(), resourceGroupName, networkInterfaceName, @@ -1995,7 +1995,7 @@ public EffectiveRouteListResultInner getEffectiveRouteTable(String resourceGroup return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listEffectiveNetworkSecurityGroups(this.client.getEndpoint(), @@ -2034,7 +2034,7 @@ private Mono>> listEffectiveNetworkSecurityGroupsWithR return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listEffectiveNetworkSecurityGroups(this.client.getEndpoint(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagementClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagementClientImpl.java index f7d3b4450eb9..28164325d7cb 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagementClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagementClientImpl.java @@ -2879,7 +2879,7 @@ private Mono> putBastionShareableLinkSi } else { bslRequest.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil.withContext(context -> { Mono>> mono @@ -2935,7 +2935,7 @@ private Mono> putBastionShareableLinkSi } else { bslRequest.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.mergeContext(context); Mono>> mono @@ -3062,7 +3062,7 @@ public Mono>> deleteBastionShareableLinkWithResponseAs } else { bslRequest.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.deleteBastionShareableLink(this.getEndpoint(), resourceGroupName, @@ -3106,7 +3106,7 @@ private Mono>> deleteBastionShareableLinkWithResponseA } else { bslRequest.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.mergeContext(context); return service.deleteBastionShareableLink(this.getEndpoint(), resourceGroupName, bastionHostname, apiVersion, @@ -3296,7 +3296,7 @@ public Mono>> deleteBastionShareableLinkByTokenWithRes } else { bslTokenRequest.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.deleteBastionShareableLinkByToken(this.getEndpoint(), resourceGroupName, @@ -3342,7 +3342,7 @@ private Mono>> deleteBastionShareableLinkByTokenWithRe } else { bslTokenRequest.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.mergeContext(context); return service.deleteBastionShareableLinkByToken(this.getEndpoint(), resourceGroupName, bastionHostname, @@ -3534,7 +3534,7 @@ private Mono> getBastionShareableLinkSi } else { bslRequest.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getBastionShareableLink(this.getEndpoint(), resourceGroupName, @@ -3581,7 +3581,7 @@ private Mono> getBastionShareableLinkSi } else { bslRequest.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.mergeContext(context); return service @@ -3695,7 +3695,7 @@ private Mono> getActiveSessionsSinglePa return Mono.error( new IllegalArgumentException("Parameter this.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil.withContext(context -> { Mono>> mono @@ -3744,7 +3744,7 @@ private Mono> getActiveSessionsSinglePa return Mono.error( new IllegalArgumentException("Parameter this.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.mergeContext(context); Mono>> mono @@ -3865,7 +3865,7 @@ private Mono> disconnectActiveSessionsSi } else { sessionIds.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.disconnectActiveSessions(this.getEndpoint(), resourceGroupName, @@ -3912,7 +3912,7 @@ private Mono> disconnectActiveSessionsSi } else { sessionIds.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.mergeContext(context); return service @@ -4027,7 +4027,7 @@ public Mono> checkDnsNameAvailabilityWi return Mono.error( new IllegalArgumentException("Parameter this.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.checkDnsNameAvailability(this.getEndpoint(), location, domainNameLabel, @@ -4066,7 +4066,7 @@ private Mono> checkDnsNameAvailabilityW return Mono.error( new IllegalArgumentException("Parameter this.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.mergeContext(context); return service.checkDnsNameAvailability(this.getEndpoint(), location, domainNameLabel, apiVersion, @@ -4147,7 +4147,7 @@ public DnsNameAvailabilityResultInner checkDnsNameAvailability(String location, return Mono.error( new IllegalArgumentException("Parameter this.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.expressRouteProviderPort(this.getEndpoint(), providerport, apiVersion, @@ -4179,7 +4179,7 @@ private Mono> expressRouteProviderPortWi return Mono.error( new IllegalArgumentException("Parameter this.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.mergeContext(context); return service.expressRouteProviderPort(this.getEndpoint(), providerport, apiVersion, this.getSubscriptionId(), @@ -4269,7 +4269,7 @@ public ExpressRouteProviderPortInner expressRouteProviderPort(String providerpor } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listActiveConnectivityConfigurations(this.getEndpoint(), apiVersion, @@ -4317,7 +4317,7 @@ public ExpressRouteProviderPortInner expressRouteProviderPort(String providerpor } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.mergeContext(context); return service.listActiveConnectivityConfigurations(this.getEndpoint(), apiVersion, this.getSubscriptionId(), @@ -4423,7 +4423,7 @@ public Mono> listActiveSecurit } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listActiveSecurityAdminRules(this.getEndpoint(), apiVersion, @@ -4471,7 +4471,7 @@ private Mono> listActiveSecuri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.mergeContext(context); return service.listActiveSecurityAdminRules(this.getEndpoint(), apiVersion, this.getSubscriptionId(), @@ -4577,7 +4577,7 @@ public ActiveSecurityAdminRulesListResultInner listActiveSecurityAdminRules(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNetworkManagerEffectiveConnectivityConfigurations(this.getEndpoint(), @@ -4626,7 +4626,7 @@ public ActiveSecurityAdminRulesListResultInner listActiveSecurityAdminRules(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.mergeContext(context); return service.listNetworkManagerEffectiveConnectivityConfigurations(this.getEndpoint(), @@ -4737,7 +4737,7 @@ public ActiveSecurityAdminRulesListResultInner listActiveSecurityAdminRules(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNetworkManagerEffectiveSecurityAdminRules(this.getEndpoint(), @@ -4786,7 +4786,7 @@ public ActiveSecurityAdminRulesListResultInner listActiveSecurityAdminRules(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.mergeContext(context); return service.listNetworkManagerEffectiveSecurityAdminRules(this.getEndpoint(), this.getSubscriptionId(), @@ -4883,7 +4883,7 @@ public NetworkManagerEffectiveSecurityAdminRulesListResultInner listNetworkManag if (virtualWanName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualWanName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.supportedSecurityProviders(this.getEndpoint(), this.getSubscriptionId(), @@ -4920,7 +4920,7 @@ public NetworkManagerEffectiveSecurityAdminRulesListResultInner listNetworkManag if (virtualWanName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualWanName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.mergeContext(context); return service.supportedSecurityProviders(this.getEndpoint(), this.getSubscriptionId(), resourceGroupName, @@ -5014,7 +5014,7 @@ public Mono>> generatevirtualwanvpnserverconfiguration } else { vpnClientParams.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.generatevirtualwanvpnserverconfigurationvpnprofile(this.getEndpoint(), @@ -5062,7 +5062,7 @@ private Mono>> generatevirtualwanvpnserverconfiguratio } else { vpnClientParams.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.mergeContext(context); return service.generatevirtualwanvpnserverconfigurationvpnprofile(this.getEndpoint(), this.getSubscriptionId(), diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagerCommitsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagerCommitsClientImpl.java index 3c022a45c3d1..b5094b140788 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagerCommitsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagerCommitsClientImpl.java @@ -110,7 +110,7 @@ public Mono>> postWithResponseAsync(String resourceGro } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.post(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -154,7 +154,7 @@ private Mono>> postWithResponseAsync(String resourceGr } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.post(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagerDeploymentStatusOperationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagerDeploymentStatusOperationsClientImpl.java index f666a61f7571..bc6a110a7565 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagerDeploymentStatusOperationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagerDeploymentStatusOperationsClientImpl.java @@ -112,7 +112,7 @@ public Mono> listWithRes } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -160,7 +160,7 @@ private Mono> listWithRe } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagerRoutingConfigurationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagerRoutingConfigurationsClientImpl.java index 553e121459e7..e38fc8f3e3b2 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagerRoutingConfigurationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagerRoutingConfigurationsClientImpl.java @@ -158,7 +158,7 @@ private Mono> listSingleP return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -205,7 +205,7 @@ private Mono> listSingleP return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -354,7 +354,7 @@ public Mono> getWithResponseAs return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -397,7 +397,7 @@ private Mono> getWithResponseA return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -499,7 +499,7 @@ public Mono> createOrUpdateWit } else { routingConfiguration.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -551,7 +551,7 @@ private Mono> createOrUpdateWi } else { routingConfiguration.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -654,7 +654,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -700,7 +700,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagersClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagersClientImpl.java index 0f4bd73c0cfb..733d13692813 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagersClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagersClientImpl.java @@ -183,7 +183,7 @@ public Mono> getByResourceGroupWithResponseAsync(S return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), @@ -221,7 +221,7 @@ private Mono> getByResourceGroupWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -311,7 +311,7 @@ public Mono> createOrUpdateWithResponseAsync(Strin } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -355,7 +355,7 @@ private Mono> createOrUpdateWithResponseAsync(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -446,7 +446,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -486,7 +486,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -711,7 +711,7 @@ public Mono> patchWithResponseAsync(String resourc } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.patch(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -755,7 +755,7 @@ private Mono> patchWithResponseAsync(String resour } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.patch(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -838,7 +838,7 @@ private Mono> listSinglePageAsync(Integer top return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -874,7 +874,7 @@ private Mono> listSinglePageAsync(Integer top return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1001,7 +1001,7 @@ private Mono> listByResourceGroupSinglePageAs return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), @@ -1042,7 +1042,7 @@ private Mono> listByResourceGroupSinglePageAs return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkProfilesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkProfilesClientImpl.java index a7f7e4ead396..a104ebb0425d 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkProfilesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkProfilesClientImpl.java @@ -178,7 +178,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, networkProfileName, @@ -216,7 +216,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, networkProfileName, apiVersion, @@ -385,7 +385,7 @@ public Mono> getByResourceGroupWithResponseAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -425,7 +425,7 @@ private Mono> getByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, networkProfileName, apiVersion, @@ -518,7 +518,7 @@ public Mono> createOrUpdateWithResponseAsync(Strin } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -562,7 +562,7 @@ private Mono> createOrUpdateWithResponseAsync(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, networkProfileName, apiVersion, @@ -657,7 +657,7 @@ public Mono> updateTagsWithResponseAsync(String re } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, networkProfileName, @@ -701,7 +701,7 @@ private Mono> updateTagsWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, networkProfileName, apiVersion, @@ -778,7 +778,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -808,7 +808,7 @@ private Mono> listSinglePageAsync(Context con return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -893,7 +893,7 @@ private Mono> listByResourceGroupSinglePageAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -929,7 +929,7 @@ private Mono> listByResourceGroupSinglePageAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityGroupsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityGroupsClientImpl.java index c892612150c8..a8c4eb3abb9d 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityGroupsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityGroupsClientImpl.java @@ -180,7 +180,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, @@ -218,7 +218,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, networkSecurityGroupName, apiVersion, @@ -389,7 +389,7 @@ public Mono> getByResourceGroupWithResponseA return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -429,7 +429,7 @@ private Mono> getByResourceGroupWithResponse return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, networkSecurityGroupName, @@ -525,7 +525,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -569,7 +569,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, networkSecurityGroupName, @@ -764,7 +764,7 @@ public Mono> updateTagsWithResponseAsync(Str } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, @@ -808,7 +808,7 @@ private Mono> updateTagsWithResponseAsync(St } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, networkSecurityGroupName, apiVersion, @@ -886,7 +886,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -916,7 +916,7 @@ private Mono> listSinglePageAsync(Conte return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -1002,7 +1002,7 @@ public PagedIterable list(Context context) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1038,7 +1038,7 @@ private Mono> listByResourceGroupSingle return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterAccessRulesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterAccessRulesClientImpl.java index c4004f6ba92c..17c4cc49b0c4 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterAccessRulesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterAccessRulesClientImpl.java @@ -170,7 +170,7 @@ public Mono> getWithResponseAsync(String resourceGr if (accessRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter accessRuleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -218,7 +218,7 @@ private Mono> getWithResponseAsync(String resourceG if (accessRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter accessRuleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -326,7 +326,7 @@ public Mono> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -380,7 +380,7 @@ private Mono> createOrUpdateWithResponseAsync(Strin } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -486,7 +486,7 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St if (accessRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter accessRuleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -533,7 +533,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (accessRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter accessRuleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -635,7 +635,7 @@ private Mono> listSinglePageAsync(String resou if (profileName == null) { return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -686,7 +686,7 @@ private Mono> listSinglePageAsync(String resou if (profileName == null) { return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -850,7 +850,7 @@ public Mono> reconcileWithResponseAsync(String resourceGroupNam if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.reconcile(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -902,7 +902,7 @@ private Mono> reconcileWithResponseAsync(String resourceGroupNa if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.reconcile(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterAssociableResourceTypesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterAssociableResourceTypesClientImpl.java index 12e3fd041e57..b4c3e57a032e 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterAssociableResourceTypesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterAssociableResourceTypesClientImpl.java @@ -106,7 +106,7 @@ private Mono> listSinglePageAsyn if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), location, @@ -142,7 +142,7 @@ private Mono> listSinglePageAsyn if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterAssociationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterAssociationsClientImpl.java index e5283eb19c32..29a070dc09ee 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterAssociationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterAssociationsClientImpl.java @@ -173,7 +173,7 @@ public Mono> getWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter associationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -217,7 +217,7 @@ private Mono> getWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter associationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -319,7 +319,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -370,7 +370,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -580,7 +580,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter associationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -623,7 +623,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter associationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -812,7 +812,7 @@ private Mono> listSinglePageAsync(String reso return Mono.error( new IllegalArgumentException("Parameter networkSecurityPerimeterName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -858,7 +858,7 @@ private Mono> listSinglePageAsync(String reso return Mono.error( new IllegalArgumentException("Parameter networkSecurityPerimeterName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1011,7 +1011,7 @@ public Mono> reconcileWithResponseAsync(String resourceGroupNam if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.reconcile(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -1059,7 +1059,7 @@ private Mono> reconcileWithResponseAsync(String resourceGroupNa if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.reconcile(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterLinkReferencesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterLinkReferencesClientImpl.java index baa0ff74c8e7..56f3284d52e5 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterLinkReferencesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterLinkReferencesClientImpl.java @@ -147,7 +147,7 @@ public Mono> getWithResponseAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter linkReferenceName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -191,7 +191,7 @@ private Mono> getWithResponseAsync(String resour return Mono .error(new IllegalArgumentException("Parameter linkReferenceName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -287,7 +287,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter linkReferenceName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -330,7 +330,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter linkReferenceName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -520,7 +520,7 @@ private Mono> listSinglePageAsync(String re return Mono.error( new IllegalArgumentException("Parameter networkSecurityPerimeterName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -566,7 +566,7 @@ private Mono> listSinglePageAsync(String re return Mono.error( new IllegalArgumentException("Parameter networkSecurityPerimeterName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterLinksClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterLinksClientImpl.java index 616bb16391d8..fda9d1719915 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterLinksClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterLinksClientImpl.java @@ -156,7 +156,7 @@ public Mono> getWithResponseAsync(String resourceGroupNam if (linkName == null) { return Mono.error(new IllegalArgumentException("Parameter linkName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -198,7 +198,7 @@ private Mono> getWithResponseAsync(String resourceGroupNa if (linkName == null) { return Mono.error(new IllegalArgumentException("Parameter linkName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -296,7 +296,7 @@ public Mono> createOrUpdateWithResponseAsync(String resou } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -345,7 +345,7 @@ private Mono> createOrUpdateWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -443,7 +443,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (linkName == null) { return Mono.error(new IllegalArgumentException("Parameter linkName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -485,7 +485,7 @@ private Mono>> deleteWithResponseAsync(String resource if (linkName == null) { return Mono.error(new IllegalArgumentException("Parameter linkName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -673,7 +673,7 @@ private Mono> listSinglePageAsync(String resourceGro return Mono.error( new IllegalArgumentException("Parameter networkSecurityPerimeterName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -719,7 +719,7 @@ private Mono> listSinglePageAsync(String resourceGro return Mono.error( new IllegalArgumentException("Parameter networkSecurityPerimeterName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterLoggingConfigurationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterLoggingConfigurationsClientImpl.java index c8b098ddde47..166f25ad8335 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterLoggingConfigurationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterLoggingConfigurationsClientImpl.java @@ -155,7 +155,7 @@ public Mono> getWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter loggingConfigurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -198,7 +198,7 @@ private Mono> getWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter loggingConfigurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -300,7 +300,7 @@ public Mono> createOrUpdateWithResponseAs } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -351,7 +351,7 @@ private Mono> createOrUpdateWithResponseA } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -451,7 +451,7 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St return Mono.error( new IllegalArgumentException("Parameter loggingConfigurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -494,7 +494,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono.error( new IllegalArgumentException("Parameter loggingConfigurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -583,7 +583,7 @@ private Mono> listSinglePageAsync(St return Mono.error( new IllegalArgumentException("Parameter networkSecurityPerimeterName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -624,7 +624,7 @@ private Mono> listSinglePageAsync(St return Mono.error( new IllegalArgumentException("Parameter networkSecurityPerimeterName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterOperationStatusesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterOperationStatusesClientImpl.java index 1ff2749adc7d..a03415ac75f3 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterOperationStatusesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterOperationStatusesClientImpl.java @@ -96,7 +96,7 @@ public Mono> getWithResponseAsync(String lo if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, @@ -133,7 +133,7 @@ private Mono> getWithResponseAsync(String l if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, operationId, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterProfilesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterProfilesClientImpl.java index dcb3841e16b5..fe56c29ebbba 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterProfilesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterProfilesClientImpl.java @@ -151,7 +151,7 @@ public Mono> getWithResponseAsync(String resourceGroup if (profileName == null) { return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -193,7 +193,7 @@ private Mono> getWithResponseAsync(String resourceGrou if (profileName == null) { return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -292,7 +292,7 @@ public Mono> createOrUpdateWithResponseAsync(String re } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -341,7 +341,7 @@ private Mono> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -439,7 +439,7 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St if (profileName == null) { return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -481,7 +481,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (profileName == null) { return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -573,7 +573,7 @@ private Mono> listSinglePageAsync(String resource return Mono.error( new IllegalArgumentException("Parameter networkSecurityPerimeterName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -619,7 +619,7 @@ private Mono> listSinglePageAsync(String resource return Mono.error( new IllegalArgumentException("Parameter networkSecurityPerimeterName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterServiceTagsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterServiceTagsClientImpl.java index 9d5c603621e8..6fba0cc900f5 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterServiceTagsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimeterServiceTagsClientImpl.java @@ -102,7 +102,7 @@ private Mono> listSinglePageAsync(Str if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), location, @@ -136,7 +136,7 @@ private Mono> listSinglePageAsync(Str if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimetersClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimetersClientImpl.java index c31241c6b457..48ee11f8d28b 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimetersClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkSecurityPerimetersClientImpl.java @@ -186,7 +186,7 @@ public Mono> getByResourceGroupWithRespo return Mono.error( new IllegalArgumentException("Parameter networkSecurityPerimeterName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -226,7 +226,7 @@ private Mono> getByResourceGroupWithResp return Mono.error( new IllegalArgumentException("Parameter networkSecurityPerimeterName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -319,7 +319,7 @@ public Mono> createOrUpdateWithResponseA } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -364,7 +364,7 @@ private Mono> createOrUpdateWithResponse } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -456,7 +456,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error( new IllegalArgumentException("Parameter networkSecurityPerimeterName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -495,7 +495,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter networkSecurityPerimeterName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -722,7 +722,7 @@ public Mono> patchWithResponseAsync(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.patch(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -767,7 +767,7 @@ private Mono> patchWithResponseAsync(Str } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.patch(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -851,7 +851,7 @@ private Mono> listSinglePageAsync(I return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -887,7 +887,7 @@ private Mono> listSinglePageAsync(I return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1014,7 +1014,7 @@ public PagedIterable list(Integer top, String ski return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), @@ -1055,7 +1055,7 @@ public PagedIterable list(Integer top, String ski return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkVirtualApplianceConnectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkVirtualApplianceConnectionsClientImpl.java index 610613255ce6..9bd384b5ff51 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkVirtualApplianceConnectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkVirtualApplianceConnectionsClientImpl.java @@ -166,7 +166,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { networkVirtualApplianceConnectionParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -219,7 +219,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { networkVirtualApplianceConnectionParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -444,7 +444,7 @@ public Mono> getWithResponseAsy if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -487,7 +487,7 @@ private Mono> getWithResponseAs if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -580,7 +580,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -622,7 +622,7 @@ private Mono>> deleteWithResponseAsync(String resource if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -805,7 +805,7 @@ private Mono> listSinglePa return Mono.error( new IllegalArgumentException("Parameter networkVirtualApplianceName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -846,7 +846,7 @@ private Mono> listSinglePa return Mono.error( new IllegalArgumentException("Parameter networkVirtualApplianceName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkVirtualAppliancesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkVirtualAppliancesClientImpl.java index d179ffa84551..62f7ae565e81 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkVirtualAppliancesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkVirtualAppliancesClientImpl.java @@ -217,7 +217,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, @@ -255,7 +255,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, networkVirtualApplianceName, apiVersion, @@ -427,7 +427,7 @@ public Mono> getByResourceGroupWithRespon return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -467,7 +467,7 @@ private Mono> getByResourceGroupWithRespo return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, networkVirtualApplianceName, @@ -564,7 +564,7 @@ public Mono> updateTagsWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -608,7 +608,7 @@ private Mono> updateTagsWithResponseAsync } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -704,7 +704,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -748,7 +748,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, networkVirtualApplianceName, @@ -946,7 +946,7 @@ public Mono>> restartWithResponseAsync(String resource if (networkVirtualApplianceInstanceIds != null) { networkVirtualApplianceInstanceIds.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -992,7 +992,7 @@ private Mono>> restartWithResponseAsync(String resourc if (networkVirtualApplianceInstanceIds != null) { networkVirtualApplianceInstanceIds.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.restart(this.client.getEndpoint(), resourceGroupName, networkVirtualApplianceName, apiVersion, @@ -1255,7 +1255,7 @@ public Mono>> reimageWithResponseAsync(String resource if (networkVirtualApplianceInstanceIds != null) { networkVirtualApplianceInstanceIds.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1301,7 +1301,7 @@ private Mono>> reimageWithResponseAsync(String resourc if (networkVirtualApplianceInstanceIds != null) { networkVirtualApplianceInstanceIds.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.reimage(this.client.getEndpoint(), resourceGroupName, networkVirtualApplianceName, apiVersion, @@ -1563,7 +1563,7 @@ public Mono>> getBootDiagnosticLogsWithResponseAsync(S } else { request.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getBootDiagnosticLogs(this.client.getEndpoint(), resourceGroupName, @@ -1607,7 +1607,7 @@ private Mono>> getBootDiagnosticLogsWithResponseAsync( } else { request.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getBootDiagnosticLogs(this.client.getEndpoint(), resourceGroupName, networkVirtualApplianceName, @@ -1796,7 +1796,7 @@ public NetworkVirtualApplianceInstanceIdInner getBootDiagnosticLogs(String resou return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1832,7 +1832,7 @@ public NetworkVirtualApplianceInstanceIdInner getBootDiagnosticLogs(String resou return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1923,7 +1923,7 @@ private Mono> listSinglePageAsync() return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1953,7 +1953,7 @@ private Mono> listSinglePageAsync(Co return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkWatchersClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkWatchersClientImpl.java index 877a2bb58e08..2dea561b7acd 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkWatchersClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkWatchersClientImpl.java @@ -321,7 +321,7 @@ public Mono> createOrUpdateWithResponseAsync(Strin } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -365,7 +365,7 @@ private Mono> createOrUpdateWithResponseAsync(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, networkWatcherName, apiVersion, @@ -455,7 +455,7 @@ public Mono> getByResourceGroupWithResponseAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -494,7 +494,7 @@ private Mono> getByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, networkWatcherName, apiVersion, @@ -578,7 +578,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -616,7 +616,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, networkWatcherName, apiVersion, @@ -789,7 +789,7 @@ public Mono> updateTagsWithResponseAsync(String re } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -833,7 +833,7 @@ private Mono> updateTagsWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, networkWatcherName, apiVersion, @@ -916,7 +916,7 @@ private Mono> listByResourceGroupSinglePageAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -952,7 +952,7 @@ private Mono> listByResourceGroupSinglePageAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1038,7 +1038,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1068,7 +1068,7 @@ private Mono> listSinglePageAsync(Context con return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -1164,7 +1164,7 @@ public Mono> getTopologyWithResponseAsync(String resourc } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getTopology(this.client.getEndpoint(), resourceGroupName, @@ -1209,7 +1209,7 @@ private Mono> getTopologyWithResponseAsync(String resour } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getTopology(this.client.getEndpoint(), resourceGroupName, networkWatcherName, apiVersion, @@ -1305,7 +1305,7 @@ public Mono>> verifyIpFlowWithResponseAsync(String res } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.verifyIpFlow(this.client.getEndpoint(), resourceGroupName, @@ -1350,7 +1350,7 @@ private Mono>> verifyIpFlowWithResponseAsync(String re } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.verifyIpFlow(this.client.getEndpoint(), resourceGroupName, networkWatcherName, apiVersion, @@ -1543,7 +1543,7 @@ public Mono>> getNextHopWithResponseAsync(String resou } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getNextHop(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -1587,7 +1587,7 @@ private Mono>> getNextHopWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getNextHop(this.client.getEndpoint(), resourceGroupName, networkWatcherName, apiVersion, @@ -1779,7 +1779,7 @@ public Mono>> getVMSecurityRulesWithResponseAsync(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getVMSecurityRules(this.client.getEndpoint(), resourceGroupName, @@ -1824,7 +1824,7 @@ private Mono>> getVMSecurityRulesWithResponseAsync(Str } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getVMSecurityRules(this.client.getEndpoint(), resourceGroupName, networkWatcherName, apiVersion, @@ -2027,7 +2027,7 @@ public Mono>> getTroubleshootingWithResponseAsync(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getTroubleshooting(this.client.getEndpoint(), resourceGroupName, @@ -2072,7 +2072,7 @@ private Mono>> getTroubleshootingWithResponseAsync(Str } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getTroubleshooting(this.client.getEndpoint(), resourceGroupName, networkWatcherName, apiVersion, @@ -2266,7 +2266,7 @@ public Mono>> getTroubleshootingResultWithResponseAsyn } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getTroubleshootingResult(this.client.getEndpoint(), resourceGroupName, @@ -2311,7 +2311,7 @@ private Mono>> getTroubleshootingResultWithResponseAsy } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getTroubleshootingResult(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -2511,7 +2511,7 @@ public Mono>> setFlowLogConfigurationWithResponseAsync } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.setFlowLogConfiguration(this.client.getEndpoint(), resourceGroupName, @@ -2556,7 +2556,7 @@ private Mono>> setFlowLogConfigurationWithResponseAsyn } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.setFlowLogConfiguration(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -2757,7 +2757,7 @@ public Mono>> getFlowLogStatusWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getFlowLogStatus(this.client.getEndpoint(), resourceGroupName, @@ -2802,7 +2802,7 @@ private Mono>> getFlowLogStatusWithResponseAsync(Strin } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getFlowLogStatus(this.client.getEndpoint(), resourceGroupName, networkWatcherName, apiVersion, @@ -3003,7 +3003,7 @@ public Mono>> checkConnectivityWithResponseAsync(Strin } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.checkConnectivity(this.client.getEndpoint(), resourceGroupName, @@ -3049,7 +3049,7 @@ private Mono>> checkConnectivityWithResponseAsync(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.checkConnectivity(this.client.getEndpoint(), resourceGroupName, networkWatcherName, apiVersion, @@ -3254,7 +3254,7 @@ public Mono>> getAzureReachabilityReportWithResponseAs } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getAzureReachabilityReport(this.client.getEndpoint(), resourceGroupName, @@ -3299,7 +3299,7 @@ private Mono>> getAzureReachabilityReportWithResponseA } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getAzureReachabilityReport(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -3508,7 +3508,7 @@ public Mono>> listAvailableProvidersWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAvailableProviders(this.client.getEndpoint(), resourceGroupName, @@ -3554,7 +3554,7 @@ private Mono>> listAvailableProvidersWithResponseAsync } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listAvailableProviders(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -3763,7 +3763,7 @@ public Mono>> getNetworkConfigurationDiagnosticWithRes } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -3813,7 +3813,7 @@ private Mono>> getNetworkConfigurationDiagnosticWithRe } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getNetworkConfigurationDiagnostic(this.client.getEndpoint(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/OperationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/OperationsClientImpl.java index 0d5a8bac2cf7..2dd3833e827d 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/OperationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/OperationsClientImpl.java @@ -91,7 +91,7 @@ private Mono> listSinglePageAsync() { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -115,7 +115,7 @@ private Mono> listSinglePageAsync(Context context) return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/P2SVpnGatewaysClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/P2SVpnGatewaysClientImpl.java index 5ef87c201fdb..ba689f596de2 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/P2SVpnGatewaysClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/P2SVpnGatewaysClientImpl.java @@ -234,7 +234,7 @@ public Mono> getByResourceGroupWithResponseAsync(St if (gatewayName == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), @@ -271,7 +271,7 @@ private Mono> getByResourceGroupWithResponseAsync(S if (gatewayName == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -361,7 +361,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { p2SVpnGatewayParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -405,7 +405,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { p2SVpnGatewayParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -597,7 +597,7 @@ public Mono>> updateTagsWithResponseAsync(String resou } else { p2SVpnGatewayParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -641,7 +641,7 @@ private Mono>> updateTagsWithResponseAsync(String reso } else { p2SVpnGatewayParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -825,7 +825,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (gatewayName == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -862,7 +862,7 @@ private Mono>> deleteWithResponseAsync(String resource if (gatewayName == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1023,7 +1023,7 @@ private Mono> listByResourceGroupSinglePageAsy return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), @@ -1059,7 +1059,7 @@ private Mono> listByResourceGroupSinglePageAsy return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1147,7 +1147,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -1177,7 +1177,7 @@ private Mono> listSinglePageAsync(Context cont return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) @@ -1265,7 +1265,7 @@ public Mono>> resetWithResponseAsync(String resourceGr return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.reset(this.client.getEndpoint(), resourceGroupName, gatewayName, apiVersion, @@ -1302,7 +1302,7 @@ private Mono>> resetWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.reset(this.client.getEndpoint(), resourceGroupName, gatewayName, apiVersion, @@ -1478,7 +1478,7 @@ public Mono>> generateVpnProfileWithResponseAsync(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.generateVpnProfile(this.client.getEndpoint(), resourceGroupName, @@ -1522,7 +1522,7 @@ private Mono>> generateVpnProfileWithResponseAsync(Str } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.generateVpnProfile(this.client.getEndpoint(), resourceGroupName, gatewayName, apiVersion, @@ -1708,7 +1708,7 @@ public Mono>> getP2SVpnConnectionHealthWithResponseAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getP2SVpnConnectionHealth(this.client.getEndpoint(), resourceGroupName, @@ -1746,7 +1746,7 @@ private Mono>> getP2SVpnConnectionHealthWithResponseAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getP2SVpnConnectionHealth(this.client.getEndpoint(), resourceGroupName, gatewayName, apiVersion, @@ -1933,7 +1933,7 @@ public Mono>> getP2SVpnConnectionHealthDetailedWithRes } else { request.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getP2SVpnConnectionHealthDetailed(this.client.getEndpoint(), @@ -1978,7 +1978,7 @@ private Mono>> getP2SVpnConnectionHealthDetailedWithRe } else { request.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getP2SVpnConnectionHealthDetailed(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -2193,7 +2193,7 @@ public Mono>> disconnectP2SVpnConnectionsWithResponseA } else { request.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.disconnectP2SVpnConnections(this.client.getEndpoint(), @@ -2238,7 +2238,7 @@ private Mono>> disconnectP2SVpnConnectionsWithResponse } else { request.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.disconnectP2SVpnConnections(this.client.getEndpoint(), this.client.getSubscriptionId(), diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PacketCapturesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PacketCapturesClientImpl.java index 16c9e754a004..08022edafee7 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PacketCapturesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PacketCapturesClientImpl.java @@ -176,7 +176,7 @@ public Mono>> createWithResponseAsync(String resourceG } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -226,7 +226,7 @@ private Mono>> createWithResponseAsync(String resource } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), resourceGroupName, networkWatcherName, packetCaptureName, @@ -429,7 +429,7 @@ public Mono> getWithResponseAsync(String reso return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -472,7 +472,7 @@ private Mono> getWithResponseAsync(String res return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, networkWatcherName, packetCaptureName, @@ -565,7 +565,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -608,7 +608,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, networkWatcherName, packetCaptureName, @@ -793,7 +793,7 @@ public Mono>> stopWithResponseAsync(String resourceGro return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.stop(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -836,7 +836,7 @@ private Mono>> stopWithResponseAsync(String resourceGr return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.stop(this.client.getEndpoint(), resourceGroupName, networkWatcherName, packetCaptureName, @@ -1021,7 +1021,7 @@ public Mono>> getStatusWithResponseAsync(String resour return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getStatus(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -1064,7 +1064,7 @@ private Mono>> getStatusWithResponseAsync(String resou return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getStatus(this.client.getEndpoint(), resourceGroupName, networkWatcherName, packetCaptureName, @@ -1254,7 +1254,7 @@ private Mono> listSinglePageAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, networkWatcherName, @@ -1295,7 +1295,7 @@ private Mono> listSinglePageAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PeerExpressRouteCircuitConnectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PeerExpressRouteCircuitConnectionsClientImpl.java index b566152d0ae0..add9052c6270 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PeerExpressRouteCircuitConnectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PeerExpressRouteCircuitConnectionsClientImpl.java @@ -127,7 +127,7 @@ public Mono> getWithResponseAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, @@ -173,7 +173,7 @@ private Mono> getWithResponseAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, connectionName, @@ -271,7 +271,7 @@ private Mono> listSinglePa return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, circuitName, peeringName, @@ -315,7 +315,7 @@ private Mono> listSinglePa return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PrivateDnsZoneGroupsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PrivateDnsZoneGroupsClientImpl.java index 4bd7ee68bf1a..c3c5ff7a73c7 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PrivateDnsZoneGroupsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PrivateDnsZoneGroupsClientImpl.java @@ -157,7 +157,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, privateEndpointName, @@ -200,7 +200,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, privateEndpointName, @@ -389,7 +389,7 @@ public Mono> getWithResponseAsync(String reso return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, privateEndpointName, @@ -433,7 +433,7 @@ private Mono> getWithResponseAsync(String res return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, privateEndpointName, privateDnsZoneGroupName, @@ -535,7 +535,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -586,7 +586,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, privateEndpointName, @@ -792,7 +792,7 @@ private Mono> listSinglePageAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), privateEndpointName, resourceGroupName, @@ -833,7 +833,7 @@ private Mono> listSinglePageAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PrivateEndpointsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PrivateEndpointsClientImpl.java index 7cddccedfa54..30c89032fcd2 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PrivateEndpointsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PrivateEndpointsClientImpl.java @@ -166,7 +166,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, privateEndpointName, @@ -204,7 +204,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, privateEndpointName, apiVersion, @@ -374,7 +374,7 @@ public Mono> getByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -414,7 +414,7 @@ private Mono> getByResourceGroupWithResponseAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, privateEndpointName, apiVersion, @@ -507,7 +507,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -551,7 +551,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, privateEndpointName, apiVersion, @@ -732,7 +732,7 @@ private Mono> listByResourceGroupSinglePageA return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -768,7 +768,7 @@ private Mono> listByResourceGroupSinglePageA return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -856,7 +856,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -886,7 +886,7 @@ private Mono> listSinglePageAsync(Context co return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PrivateLinkServicesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PrivateLinkServicesClientImpl.java index 7bab44de9095..1f3ce098be12 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PrivateLinkServicesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PrivateLinkServicesClientImpl.java @@ -272,7 +272,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, serviceName, @@ -309,7 +309,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, serviceName, apiVersion, @@ -476,7 +476,7 @@ public Mono> getByResourceGroupWithResponseAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -515,7 +515,7 @@ private Mono> getByResourceGroupWithResponseAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, serviceName, apiVersion, @@ -607,7 +607,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serviceName, @@ -650,7 +650,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serviceName, apiVersion, @@ -831,7 +831,7 @@ private Mono> listByResourceGroupSinglePa return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -867,7 +867,7 @@ private Mono> listByResourceGroupSinglePa return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -955,7 +955,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -985,7 +985,7 @@ private Mono> listSinglePageAsync(Context return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -1082,7 +1082,7 @@ public Mono> getPrivateEndpointConnecti return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getPrivateEndpointConnection(this.client.getEndpoint(), resourceGroupName, @@ -1126,7 +1126,7 @@ private Mono> getPrivateEndpointConnect return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getPrivateEndpointConnection(this.client.getEndpoint(), resourceGroupName, serviceName, @@ -1233,7 +1233,7 @@ public Mono> updatePrivateEndpointConne } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updatePrivateEndpointConnection(this.client.getEndpoint(), @@ -1283,7 +1283,7 @@ private Mono> updatePrivateEndpointConn } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updatePrivateEndpointConnection(this.client.getEndpoint(), resourceGroupName, serviceName, @@ -1382,7 +1382,7 @@ public Mono>> deletePrivateEndpointConnectionWithRespo return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1425,7 +1425,7 @@ private Mono>> deletePrivateEndpointConnectionWithResp return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.deletePrivateEndpointConnection(this.client.getEndpoint(), resourceGroupName, serviceName, @@ -1610,7 +1610,7 @@ public void deletePrivateEndpointConnection(String resourceGroupName, String ser return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listPrivateEndpointConnections(this.client.getEndpoint(), resourceGroupName, @@ -1650,7 +1650,7 @@ public void deletePrivateEndpointConnection(String resourceGroupName, String ser return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1763,7 +1763,7 @@ public Mono>> checkPrivateLinkServiceVisibilityWithRes } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.checkPrivateLinkServiceVisibility(this.client.getEndpoint(), location, @@ -1802,7 +1802,7 @@ private Mono>> checkPrivateLinkServiceVisibilityWithRe } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.checkPrivateLinkServiceVisibility(this.client.getEndpoint(), location, apiVersion, @@ -1996,7 +1996,7 @@ public Mono>> checkPrivateLinkServiceVisibilityByResou } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.checkPrivateLinkServiceVisibilityByResourceGroup(this.client.getEndpoint(), @@ -2041,7 +2041,7 @@ private Mono>> checkPrivateLinkServiceVisibilityByReso } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.checkPrivateLinkServiceVisibilityByResourceGroup(this.client.getEndpoint(), location, @@ -2241,7 +2241,7 @@ public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibilityByReso return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAutoApprovedPrivateLinkServices(this.client.getEndpoint(), location, @@ -2277,7 +2277,7 @@ public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibilityByReso return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2387,7 +2387,7 @@ public PagedIterable listAutoApprovedPrivat return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -2430,7 +2430,7 @@ public PagedIterable listAutoApprovedPrivat return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PublicIpAddressesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PublicIpAddressesClientImpl.java index 5e6a77dfa57a..81e34788363c 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PublicIpAddressesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PublicIpAddressesClientImpl.java @@ -36,7 +36,9 @@ import com.azure.resourcemanager.network.fluent.PublicIpAddressesClient; import com.azure.resourcemanager.network.fluent.models.PublicIpAddressInner; import com.azure.resourcemanager.network.fluent.models.PublicIpDdosProtectionStatusResultInner; +import com.azure.resourcemanager.network.models.DisassociateCloudServicePublicIpRequest; import com.azure.resourcemanager.network.models.PublicIpAddressListResult; +import com.azure.resourcemanager.network.models.ReserveCloudServicePublicIpAddressRequest; import com.azure.resourcemanager.network.models.TagsObject; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; @@ -178,6 +180,28 @@ Mono>> ddosProtectionStatus(@HostParam("$host") String @PathParam("publicIpAddressName") String publicIpAddressName, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}/reserveCloudServicePublicIpAddress") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> reserveCloudServicePublicIpAddress(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("publicIpAddressName") String publicIpAddressName, + @BodyParam("application/json") ReserveCloudServicePublicIpAddressRequest parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}/disassociateCloudServiceReservedPublicIp") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> disassociateCloudServiceReservedPublicIp(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("publicIpAddressName") String publicIpAddressName, + @BodyParam("application/json") DisassociateCloudServicePublicIpRequest parameters, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/publicipaddresses") @ExpectedResponses({ 200 }) @@ -293,7 +317,7 @@ Mono> listVirtualMachineScaleSetVMPublicIpAd return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listCloudServicePublicIpAddresses(this.client.getEndpoint(), @@ -334,7 +358,7 @@ private Mono> listCloudServicePublicIpAddres return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -465,7 +489,7 @@ private Mono> listCloudServiceRoleInstancePu return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listCloudServiceRoleInstancePublicIpAddresses(this.client.getEndpoint(), @@ -523,7 +547,7 @@ private Mono> listCloudServiceRoleInstancePu return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -678,7 +702,7 @@ public Mono> getCloudServicePublicIpAddressWithRe return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getCloudServicePublicIpAddress(this.client.getEndpoint(), resourceGroupName, @@ -740,7 +764,7 @@ private Mono> getCloudServicePublicIpAddressWithR return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getCloudServicePublicIpAddress(this.client.getEndpoint(), resourceGroupName, cloudServiceName, @@ -847,7 +871,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, publicIpAddressName, @@ -885,7 +909,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, publicIpAddressName, apiVersion, @@ -1055,7 +1079,7 @@ public Mono> getByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1095,7 +1119,7 @@ private Mono> getByResourceGroupWithResponseAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, publicIpAddressName, apiVersion, @@ -1188,7 +1212,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -1232,7 +1256,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, publicIpAddressName, apiVersion, @@ -1424,7 +1448,7 @@ public Mono> updateTagsWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, @@ -1468,7 +1492,7 @@ private Mono> updateTagsWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, publicIpAddressName, apiVersion, @@ -1546,7 +1570,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1576,7 +1600,7 @@ private Mono> listSinglePageAsync(Context co return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -1661,7 +1685,7 @@ private Mono> listByResourceGroupSinglePageA return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1697,7 +1721,7 @@ private Mono> listByResourceGroupSinglePageA return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1797,7 +1821,7 @@ public Mono>> ddosProtectionStatusWithResponseAsync(St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.ddosProtectionStatus(this.client.getEndpoint(), resourceGroupName, @@ -1836,7 +1860,7 @@ private Mono>> ddosProtectionStatusWithResponseAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.ddosProtectionStatus(this.client.getEndpoint(), resourceGroupName, publicIpAddressName, @@ -1988,6 +2012,539 @@ public PublicIpDdosProtectionStatusResultInner ddosProtectionStatus(String resou return ddosProtectionStatusAsync(resourceGroupName, publicIpAddressName, context).block(); } + /** + * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is + * requested, reverts the allocation method to Dynamic. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 public IP address resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> reserveCloudServicePublicIpAddressWithResponseAsync( + String resourceGroupName, String publicIpAddressName, ReserveCloudServicePublicIpAddressRequest parameters) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (publicIpAddressName == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicIpAddressName 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 = "2025-03-01"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.reserveCloudServicePublicIpAddress(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, publicIpAddressName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is + * requested, reverts the allocation method to Dynamic. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 public IP address resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> reserveCloudServicePublicIpAddressWithResponseAsync( + String resourceGroupName, String publicIpAddressName, ReserveCloudServicePublicIpAddressRequest parameters, + Context context) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (publicIpAddressName == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicIpAddressName 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 = "2025-03-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.reserveCloudServicePublicIpAddress(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, publicIpAddressName, parameters, accept, context); + } + + /** + * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is + * requested, reverts the allocation method to Dynamic. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 {@link PollerFlux} for polling of public IP address resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, PublicIpAddressInner> + beginReserveCloudServicePublicIpAddressAsync(String resourceGroupName, String publicIpAddressName, + ReserveCloudServicePublicIpAddressRequest parameters) { + Mono>> mono + = reserveCloudServicePublicIpAddressWithResponseAsync(resourceGroupName, publicIpAddressName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PublicIpAddressInner.class, PublicIpAddressInner.class, this.client.getContext()); + } + + /** + * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is + * requested, reverts the allocation method to Dynamic. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 {@link PollerFlux} for polling of public IP address resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PublicIpAddressInner> + beginReserveCloudServicePublicIpAddressAsync(String resourceGroupName, String publicIpAddressName, + ReserveCloudServicePublicIpAddressRequest parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = reserveCloudServicePublicIpAddressWithResponseAsync(resourceGroupName, + publicIpAddressName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PublicIpAddressInner.class, PublicIpAddressInner.class, context); + } + + /** + * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is + * requested, reverts the allocation method to Dynamic. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 {@link SyncPoller} for polling of public IP address resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PublicIpAddressInner> beginReserveCloudServicePublicIpAddress( + String resourceGroupName, String publicIpAddressName, ReserveCloudServicePublicIpAddressRequest parameters) { + return this.beginReserveCloudServicePublicIpAddressAsync(resourceGroupName, publicIpAddressName, parameters) + .getSyncPoller(); + } + + /** + * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is + * requested, reverts the allocation method to Dynamic. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 {@link SyncPoller} for polling of public IP address resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PublicIpAddressInner> beginReserveCloudServicePublicIpAddress( + String resourceGroupName, String publicIpAddressName, ReserveCloudServicePublicIpAddressRequest parameters, + Context context) { + return this + .beginReserveCloudServicePublicIpAddressAsync(resourceGroupName, publicIpAddressName, parameters, context) + .getSyncPoller(); + } + + /** + * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is + * requested, reverts the allocation method to Dynamic. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 public IP address resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono reserveCloudServicePublicIpAddressAsync(String resourceGroupName, + String publicIpAddressName, ReserveCloudServicePublicIpAddressRequest parameters) { + return beginReserveCloudServicePublicIpAddressAsync(resourceGroupName, publicIpAddressName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is + * requested, reverts the allocation method to Dynamic. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 public IP address resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono reserveCloudServicePublicIpAddressAsync(String resourceGroupName, + String publicIpAddressName, ReserveCloudServicePublicIpAddressRequest parameters, Context context) { + return beginReserveCloudServicePublicIpAddressAsync(resourceGroupName, publicIpAddressName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is + * requested, reverts the allocation method to Dynamic. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 public IP address resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PublicIpAddressInner reserveCloudServicePublicIpAddress(String resourceGroupName, String publicIpAddressName, + ReserveCloudServicePublicIpAddressRequest parameters) { + return reserveCloudServicePublicIpAddressAsync(resourceGroupName, publicIpAddressName, parameters).block(); + } + + /** + * Reserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is + * requested, reverts the allocation method to Dynamic. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 public IP address resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PublicIpAddressInner reserveCloudServicePublicIpAddress(String resourceGroupName, String publicIpAddressName, + ReserveCloudServicePublicIpAddressRequest parameters, Context context) { + return reserveCloudServicePublicIpAddressAsync(resourceGroupName, publicIpAddressName, parameters, context) + .block(); + } + + /** + * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same + * Cloud Service frontend. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 public IP address resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> disassociateCloudServiceReservedPublicIpWithResponseAsync( + String resourceGroupName, String publicIpAddressName, DisassociateCloudServicePublicIpRequest parameters) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (publicIpAddressName == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicIpAddressName 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 = "2025-03-01"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.disassociateCloudServiceReservedPublicIp(this.client.getEndpoint(), + apiVersion, this.client.getSubscriptionId(), resourceGroupName, publicIpAddressName, parameters, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same + * Cloud Service frontend. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 public IP address resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> disassociateCloudServiceReservedPublicIpWithResponseAsync( + String resourceGroupName, String publicIpAddressName, DisassociateCloudServicePublicIpRequest parameters, + Context context) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (publicIpAddressName == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicIpAddressName 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 = "2025-03-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.disassociateCloudServiceReservedPublicIp(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, publicIpAddressName, parameters, accept, context); + } + + /** + * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same + * Cloud Service frontend. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 {@link PollerFlux} for polling of public IP address resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, PublicIpAddressInner> + beginDisassociateCloudServiceReservedPublicIpAsync(String resourceGroupName, String publicIpAddressName, + DisassociateCloudServicePublicIpRequest parameters) { + Mono>> mono = disassociateCloudServiceReservedPublicIpWithResponseAsync( + resourceGroupName, publicIpAddressName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PublicIpAddressInner.class, PublicIpAddressInner.class, this.client.getContext()); + } + + /** + * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same + * Cloud Service frontend. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 {@link PollerFlux} for polling of public IP address resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PublicIpAddressInner> + beginDisassociateCloudServiceReservedPublicIpAsync(String resourceGroupName, String publicIpAddressName, + DisassociateCloudServicePublicIpRequest parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = disassociateCloudServiceReservedPublicIpWithResponseAsync( + resourceGroupName, publicIpAddressName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PublicIpAddressInner.class, PublicIpAddressInner.class, context); + } + + /** + * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same + * Cloud Service frontend. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 {@link SyncPoller} for polling of public IP address resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PublicIpAddressInner> + beginDisassociateCloudServiceReservedPublicIp(String resourceGroupName, String publicIpAddressName, + DisassociateCloudServicePublicIpRequest parameters) { + return this + .beginDisassociateCloudServiceReservedPublicIpAsync(resourceGroupName, publicIpAddressName, parameters) + .getSyncPoller(); + } + + /** + * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same + * Cloud Service frontend. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 {@link SyncPoller} for polling of public IP address resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PublicIpAddressInner> + beginDisassociateCloudServiceReservedPublicIp(String resourceGroupName, String publicIpAddressName, + DisassociateCloudServicePublicIpRequest parameters, Context context) { + return this + .beginDisassociateCloudServiceReservedPublicIpAsync(resourceGroupName, publicIpAddressName, parameters, + context) + .getSyncPoller(); + } + + /** + * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same + * Cloud Service frontend. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 public IP address resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono disassociateCloudServiceReservedPublicIpAsync(String resourceGroupName, + String publicIpAddressName, DisassociateCloudServicePublicIpRequest parameters) { + return beginDisassociateCloudServiceReservedPublicIpAsync(resourceGroupName, publicIpAddressName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same + * Cloud Service frontend. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 public IP address resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono disassociateCloudServiceReservedPublicIpAsync(String resourceGroupName, + String publicIpAddressName, DisassociateCloudServicePublicIpRequest parameters, Context context) { + return beginDisassociateCloudServiceReservedPublicIpAsync(resourceGroupName, publicIpAddressName, parameters, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same + * Cloud Service frontend. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 public IP address resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PublicIpAddressInner disassociateCloudServiceReservedPublicIp(String resourceGroupName, + String publicIpAddressName, DisassociateCloudServicePublicIpRequest parameters) { + return disassociateCloudServiceReservedPublicIpAsync(resourceGroupName, publicIpAddressName, parameters) + .block(); + } + + /** + * Disassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same + * Cloud Service frontend. + * + * @param resourceGroupName The name of the resource group. + * @param publicIpAddressName The name of the public IP address. + * @param parameters Parameter that define which Public IP Address should be associated in place of given Public IP + * Address. + * @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 public IP address resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PublicIpAddressInner disassociateCloudServiceReservedPublicIp(String resourceGroupName, + String publicIpAddressName, DisassociateCloudServicePublicIpRequest parameters, Context context) { + return disassociateCloudServiceReservedPublicIpAsync(resourceGroupName, publicIpAddressName, parameters, + context).block(); + } + /** * Gets information about all public IP addresses on a virtual machine scale set level. * diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PublicIpPrefixesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PublicIpPrefixesClientImpl.java index b44acc696874..4a198f794234 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PublicIpPrefixesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/PublicIpPrefixesClientImpl.java @@ -178,7 +178,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, publicIpPrefixName, @@ -216,7 +216,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, publicIpPrefixName, apiVersion, @@ -385,7 +385,7 @@ public Mono> getByResourceGroupWithResponseAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -425,7 +425,7 @@ private Mono> getByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, publicIpPrefixName, apiVersion, @@ -518,7 +518,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -562,7 +562,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, publicIpPrefixName, apiVersion, @@ -754,7 +754,7 @@ public Mono> updateTagsWithResponseAsync(String re } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, publicIpPrefixName, @@ -798,7 +798,7 @@ private Mono> updateTagsWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, publicIpPrefixName, apiVersion, @@ -875,7 +875,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -905,7 +905,7 @@ private Mono> listSinglePageAsync(Context con return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -990,7 +990,7 @@ private Mono> listByResourceGroupSinglePageAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1026,7 +1026,7 @@ private Mono> listByResourceGroupSinglePageAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ReachabilityAnalysisIntentsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ReachabilityAnalysisIntentsClientImpl.java index d50d4f9cf898..d692acd33088 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ReachabilityAnalysisIntentsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ReachabilityAnalysisIntentsClientImpl.java @@ -163,7 +163,7 @@ private Mono> listSinglePageAsync if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -215,7 +215,7 @@ private Mono> listSinglePageAsync if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -382,7 +382,7 @@ public Mono> getWithResponseAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter reachabilityAnalysisIntentName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -429,7 +429,7 @@ private Mono> getWithResponseAsync(Str return Mono.error(new IllegalArgumentException( "Parameter reachabilityAnalysisIntentName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -540,7 +540,7 @@ public Mono> createWithResponseAsync(S } else { body.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), apiVersion, @@ -596,7 +596,7 @@ private Mono> createWithResponseAsync( } else { body.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -704,7 +704,7 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St return Mono.error(new IllegalArgumentException( "Parameter reachabilityAnalysisIntentName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, @@ -752,7 +752,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono.error(new IllegalArgumentException( "Parameter reachabilityAnalysisIntentName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ReachabilityAnalysisRunsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ReachabilityAnalysisRunsClientImpl.java index f19fa331fc0b..9ef2583c7743 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ReachabilityAnalysisRunsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ReachabilityAnalysisRunsClientImpl.java @@ -168,7 +168,7 @@ private Mono> listSinglePageAsync(St if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -220,7 +220,7 @@ private Mono> listSinglePageAsync(St if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -387,7 +387,7 @@ public Mono> getWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter reachabilityAnalysisRunName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -434,7 +434,7 @@ private Mono> getWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter reachabilityAnalysisRunName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -545,7 +545,7 @@ public Mono> createWithResponseAsync(Stri } else { body.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), apiVersion, @@ -601,7 +601,7 @@ private Mono> createWithResponseAsync(Str } else { body.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -708,7 +708,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error( new IllegalArgumentException("Parameter reachabilityAnalysisRunName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -756,7 +756,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter reachabilityAnalysisRunName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ResourceNavigationLinksClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ResourceNavigationLinksClientImpl.java index 8b1f5288c1a2..146fa3a98238 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ResourceNavigationLinksClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ResourceNavigationLinksClientImpl.java @@ -102,7 +102,7 @@ public Mono> listWithResponseAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, @@ -145,7 +145,7 @@ private Mono> listWithResponseA return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, subnetName, apiVersion, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RouteFilterRulesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RouteFilterRulesClientImpl.java index c6accc63984b..b43908dff4fd 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RouteFilterRulesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RouteFilterRulesClientImpl.java @@ -152,7 +152,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, routeFilterName, @@ -194,7 +194,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, routeFilterName, ruleName, apiVersion, @@ -377,7 +377,7 @@ public Mono> getWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, routeFilterName, ruleName, @@ -420,7 +420,7 @@ private Mono> getWithResponseAsync(String resourc return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, routeFilterName, ruleName, apiVersion, @@ -518,7 +518,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { routeFilterRuleParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -568,7 +568,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { routeFilterRuleParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, routeFilterName, ruleName, @@ -770,7 +770,7 @@ private Mono> listByRouteFilterSinglePageAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByRouteFilter(this.client.getEndpoint(), resourceGroupName, @@ -811,7 +811,7 @@ private Mono> listByRouteFilterSinglePageAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RouteFiltersClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RouteFiltersClientImpl.java index 0d63dde54d2c..1c3e1c6f0d93 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RouteFiltersClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RouteFiltersClientImpl.java @@ -176,7 +176,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, routeFilterName, @@ -214,7 +214,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, routeFilterName, apiVersion, @@ -382,7 +382,7 @@ public Mono> getByResourceGroupWithResponseAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -421,7 +421,7 @@ private Mono> getByResourceGroupWithResponseAsync(Str return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, routeFilterName, apiVersion, @@ -515,7 +515,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { routeFilterParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -560,7 +560,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { routeFilterParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, routeFilterName, apiVersion, @@ -752,7 +752,7 @@ public Mono> updateTagsWithResponseAsync(String resou } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, routeFilterName, @@ -796,7 +796,7 @@ private Mono> updateTagsWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, routeFilterName, apiVersion, @@ -879,7 +879,7 @@ private Mono> listByResourceGroupSinglePageAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -915,7 +915,7 @@ private Mono> listByResourceGroupSinglePageAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1003,7 +1003,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1033,7 +1033,7 @@ private Mono> listSinglePageAsync(Context contex return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RouteMapsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RouteMapsClientImpl.java index 188dbda6d262..da0269638fb5 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RouteMapsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RouteMapsClientImpl.java @@ -153,7 +153,7 @@ public Mono> getWithResponseAsync(String resourceGroupNa if (routeMapName == null) { return Mono.error(new IllegalArgumentException("Parameter routeMapName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -195,7 +195,7 @@ private Mono> getWithResponseAsync(String resourceGroupN if (routeMapName == null) { return Mono.error(new IllegalArgumentException("Parameter routeMapName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -293,7 +293,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { routeMapParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -342,7 +342,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { routeMapParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -543,7 +543,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (routeMapName == null) { return Mono.error(new IllegalArgumentException("Parameter routeMapName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -584,7 +584,7 @@ private Mono>> deleteWithResponseAsync(String resource if (routeMapName == null) { return Mono.error(new IllegalArgumentException("Parameter routeMapName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -763,7 +763,7 @@ private Mono> listSinglePageAsync(String resourceGr if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -803,7 +803,7 @@ private Mono> listSinglePageAsync(String resourceGr if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RouteTablesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RouteTablesClientImpl.java index 2a89f8672827..fd4fdc56bc91 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RouteTablesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RouteTablesClientImpl.java @@ -174,7 +174,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, routeTableName, @@ -211,7 +211,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, routeTableName, apiVersion, @@ -378,7 +378,7 @@ public Mono> getByResourceGroupWithResponseAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -416,7 +416,7 @@ private Mono> getByResourceGroupWithResponseAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, routeTableName, apiVersion, @@ -508,7 +508,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, routeTableName, @@ -551,7 +551,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, routeTableName, apiVersion, @@ -740,7 +740,7 @@ public Mono> updateTagsWithResponseAsync(String resour } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, routeTableName, @@ -783,7 +783,7 @@ private Mono> updateTagsWithResponseAsync(String resou } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, routeTableName, apiVersion, @@ -866,7 +866,7 @@ private Mono> listByResourceGroupSinglePageAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -902,7 +902,7 @@ private Mono> listByResourceGroupSinglePageAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -990,7 +990,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1020,7 +1020,7 @@ private Mono> listSinglePageAsync(Context context return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RoutesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RoutesClientImpl.java index a135ec36c0f6..a30403ba2e2c 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RoutesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RoutesClientImpl.java @@ -149,7 +149,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, routeTableName, @@ -190,7 +190,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, routeTableName, routeName, apiVersion, @@ -372,7 +372,7 @@ public Mono> getWithResponseAsync(String resourceGroupName, return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, routeTableName, routeName, @@ -414,7 +414,7 @@ private Mono> getWithResponseAsync(String resourceGroupName return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, routeTableName, routeName, apiVersion, @@ -511,7 +511,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { routeParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, routeTableName, @@ -559,7 +559,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { routeParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, routeTableName, routeName, @@ -752,7 +752,7 @@ private Mono> listSinglePageAsync(String resourceGroup return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, routeTableName, @@ -791,7 +791,7 @@ private Mono> listSinglePageAsync(String resourceGroup return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RoutingIntentsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RoutingIntentsClientImpl.java index f0d9abae7e59..48d53f78be6f 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RoutingIntentsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RoutingIntentsClientImpl.java @@ -163,7 +163,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { routingIntentParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -214,7 +214,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { routingIntentParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -422,7 +422,7 @@ public Mono> getWithResponseAsync(String resourceGr return Mono .error(new IllegalArgumentException("Parameter routingIntentName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -465,7 +465,7 @@ private Mono> getWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter routingIntentName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -557,7 +557,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter routingIntentName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -599,7 +599,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter routingIntentName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -779,7 +779,7 @@ private Mono> listSinglePageAsync(String resou if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -819,7 +819,7 @@ private Mono> listSinglePageAsync(String resou if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RoutingRuleCollectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RoutingRuleCollectionsClientImpl.java index a3ab6d1c12eb..be0824f13b7b 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RoutingRuleCollectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RoutingRuleCollectionsClientImpl.java @@ -167,7 +167,7 @@ private Mono> listSinglePageAsync(Stri return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -218,7 +218,7 @@ private Mono> listSinglePageAsync(Stri return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -380,7 +380,7 @@ public Mono> getWithResponseAsync(String re return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -429,7 +429,7 @@ private Mono> getWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -540,7 +540,7 @@ public Mono> createOrUpdateWithResponseAsyn } else { ruleCollection.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -596,7 +596,7 @@ private Mono> createOrUpdateWithResponseAsy } else { ruleCollection.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -707,7 +707,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, @@ -759,7 +759,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RoutingRulesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RoutingRulesClientImpl.java index 3f417fec03e3..602c2596abb4 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RoutingRulesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/RoutingRulesClientImpl.java @@ -172,7 +172,7 @@ private Mono> listSinglePageAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -230,7 +230,7 @@ private Mono> listSinglePageAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -400,7 +400,7 @@ public Mono> getWithResponseAsync(String resourceGrou if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -454,7 +454,7 @@ private Mono> getWithResponseAsync(String resourceGro if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -572,7 +572,7 @@ public Mono> createOrUpdateWithResponseAsync(String r } else { routingRule.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -632,7 +632,7 @@ private Mono> createOrUpdateWithResponseAsync(String } else { routingRule.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -750,7 +750,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, @@ -806,7 +806,7 @@ private Mono>> deleteWithResponseAsync(String resource if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ScopeConnectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ScopeConnectionsClientImpl.java index c6107f1686b3..0e485859a18b 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ScopeConnectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ScopeConnectionsClientImpl.java @@ -159,7 +159,7 @@ public Mono> createOrUpdateWithResponseAsync(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -208,7 +208,7 @@ private Mono> createOrUpdateWithResponseAsync(Str } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -308,7 +308,7 @@ public Mono> getWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter scopeConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -352,7 +352,7 @@ private Mono> getWithResponseAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter scopeConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -445,7 +445,7 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St return Mono .error(new IllegalArgumentException("Parameter scopeConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -488,7 +488,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono .error(new IllegalArgumentException("Parameter scopeConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -579,7 +579,7 @@ private Mono> listSinglePageAsync(String res return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -624,7 +624,7 @@ private Mono> listSinglePageAsync(String res return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityAdminConfigurationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityAdminConfigurationsClientImpl.java index fc48f79b759a..62dbc8d780e6 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityAdminConfigurationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityAdminConfigurationsClientImpl.java @@ -158,7 +158,7 @@ private Mono> listSinglePageAsync return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -204,7 +204,7 @@ private Mono> listSinglePageAsync return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -352,7 +352,7 @@ public Mono> getWithResponseAsync(Stri return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -396,7 +396,7 @@ private Mono> getWithResponseAsync(Str return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -499,7 +499,7 @@ public Mono> createOrUpdateWithRespons } else { securityAdminConfiguration.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -552,7 +552,7 @@ private Mono> createOrUpdateWithRespon } else { securityAdminConfiguration.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -655,7 +655,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -701,7 +701,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityPartnerProvidersClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityPartnerProvidersClientImpl.java index 43f6d138ed8a..de816f7cb326 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityPartnerProvidersClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityPartnerProvidersClientImpl.java @@ -180,7 +180,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, @@ -218,7 +218,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, securityPartnerProviderName, apiVersion, @@ -389,7 +389,7 @@ public Mono> getByResourceGroupWithRespon return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -428,7 +428,7 @@ private Mono> getByResourceGroupWithRespo return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, securityPartnerProviderName, @@ -520,7 +520,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -564,7 +564,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, securityPartnerProviderName, @@ -761,7 +761,7 @@ public Mono> updateTagsWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, @@ -805,7 +805,7 @@ private Mono> updateTagsWithResponseAsync } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, securityPartnerProviderName, apiVersion, @@ -891,7 +891,7 @@ public SecurityPartnerProviderInner updateTags(String resourceGroupName, String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -927,7 +927,7 @@ public SecurityPartnerProviderInner updateTags(String resourceGroupName, String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1018,7 +1018,7 @@ private Mono> listSinglePageAsync() return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1048,7 +1048,7 @@ private Mono> listSinglePageAsync(Co return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityRulesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityRulesClientImpl.java index 3976d7a89ab3..1472ccea7994 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityRulesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityRulesClientImpl.java @@ -154,7 +154,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -198,7 +198,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, networkSecurityGroupName, securityRuleName, @@ -385,7 +385,7 @@ public Mono> getWithResponseAsync(String resourceGro return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, networkSecurityGroupName, @@ -428,7 +428,7 @@ private Mono> getWithResponseAsync(String resourceGr return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, networkSecurityGroupName, securityRuleName, @@ -528,7 +528,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { securityRuleParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -580,7 +580,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { securityRuleParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, networkSecurityGroupName, @@ -785,7 +785,7 @@ private Mono> listSinglePageAsync(String resour return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, networkSecurityGroupName, @@ -826,7 +826,7 @@ private Mono> listSinglePageAsync(String resour return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityUserConfigurationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityUserConfigurationsClientImpl.java index f12f9187b752..8e3f26088180 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityUserConfigurationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityUserConfigurationsClientImpl.java @@ -158,7 +158,7 @@ private Mono> listSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -204,7 +204,7 @@ private Mono> listSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -352,7 +352,7 @@ public Mono> getWithResponseAsync(Strin return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -396,7 +396,7 @@ private Mono> getWithResponseAsync(Stri return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -498,7 +498,7 @@ public Mono> createOrUpdateWithResponse } else { securityUserConfiguration.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -551,7 +551,7 @@ private Mono> createOrUpdateWithRespons } else { securityUserConfiguration.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -653,7 +653,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -699,7 +699,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityUserRuleCollectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityUserRuleCollectionsClientImpl.java index b76b98172248..179575a33b6d 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityUserRuleCollectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityUserRuleCollectionsClientImpl.java @@ -167,7 +167,7 @@ private Mono> listSinglePageAsync return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -218,7 +218,7 @@ private Mono> listSinglePageAsync return Mono .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -380,7 +380,7 @@ public Mono> getWithResponseAsync(Stri return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -429,7 +429,7 @@ private Mono> getWithResponseAsync(Str return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -542,7 +542,7 @@ public Mono> createOrUpdateWithRespons } else { securityUserRuleCollection.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -600,7 +600,7 @@ private Mono> createOrUpdateWithRespon } else { securityUserRuleCollection.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -713,7 +713,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, @@ -765,7 +765,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityUserRulesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityUserRulesClientImpl.java index a78f36d0ac70..6102916f7f03 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityUserRulesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityUserRulesClientImpl.java @@ -172,7 +172,7 @@ private Mono> listSinglePageAsync(String re return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -229,7 +229,7 @@ private Mono> listSinglePageAsync(String re return Mono .error(new IllegalArgumentException("Parameter ruleCollectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -398,7 +398,7 @@ public Mono> getWithResponseAsync(String resourc if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -452,7 +452,7 @@ private Mono> getWithResponseAsync(String resour if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -571,7 +571,7 @@ public Mono> createOrUpdateWithResponseAsync(Str } else { securityUserRule.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), apiVersion, @@ -632,7 +632,7 @@ private Mono> createOrUpdateWithResponseAsync(St } else { securityUserRule.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -750,7 +750,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, @@ -806,7 +806,7 @@ private Mono>> deleteWithResponseAsync(String resource if (ruleName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceAssociationLinksClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceAssociationLinksClientImpl.java index fbdecf3b1302..48a0aa75d055 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceAssociationLinksClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceAssociationLinksClientImpl.java @@ -102,7 +102,7 @@ public Mono> listWithResponseAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, @@ -145,7 +145,7 @@ private Mono> listWithResponseA return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, subnetName, apiVersion, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceEndpointPoliciesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceEndpointPoliciesClientImpl.java index 18cb9cc2c77c..e6f21c6917ee 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceEndpointPoliciesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceEndpointPoliciesClientImpl.java @@ -180,7 +180,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, @@ -218,7 +218,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, serviceEndpointPolicyName, apiVersion, @@ -389,7 +389,7 @@ public Mono> getByResourceGroupWithResponse return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -429,7 +429,7 @@ private Mono> getByResourceGroupWithRespons return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, serviceEndpointPolicyName, @@ -526,7 +526,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -570,7 +570,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serviceEndpointPolicyName, @@ -765,7 +765,7 @@ public Mono> updateTagsWithResponseAsync(St } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, @@ -809,7 +809,7 @@ private Mono> updateTagsWithResponseAsync(S } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, serviceEndpointPolicyName, apiVersion, @@ -888,7 +888,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -918,7 +918,7 @@ private Mono> listSinglePageAsync(Cont return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -1004,7 +1004,7 @@ public PagedIterable list(Context context) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1040,7 +1040,7 @@ private Mono> listByResourceGroupSingl return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceEndpointPolicyDefinitionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceEndpointPolicyDefinitionsClientImpl.java index 997d97928334..199fc41b7b99 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceEndpointPolicyDefinitionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceEndpointPolicyDefinitionsClientImpl.java @@ -157,7 +157,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -201,7 +201,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, serviceEndpointPolicyName, @@ -395,7 +395,7 @@ public Mono> getWithResponseAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serviceEndpointPolicyName, @@ -439,7 +439,7 @@ private Mono> getWithResponseAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, serviceEndpointPolicyName, @@ -546,7 +546,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { serviceEndpointPolicyDefinitions.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -599,7 +599,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { serviceEndpointPolicyDefinitions.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, serviceEndpointPolicyName, @@ -826,7 +826,7 @@ public ServiceEndpointPolicyDefinitionInner createOrUpdate(String resourceGroupN return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -867,7 +867,7 @@ private Mono> listByResource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceTagInformationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceTagInformationsClientImpl.java index 3c6d8459f7bf..7ca7cf2900d7 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceTagInformationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceTagInformationsClientImpl.java @@ -109,7 +109,7 @@ private Mono> listSinglePageAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), location, apiVersion, @@ -148,7 +148,7 @@ private Mono> listSinglePageAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceTagsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceTagsClientImpl.java index fda70a08a4e6..5050f45a4a2d 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceTagsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ServiceTagsClientImpl.java @@ -91,7 +91,7 @@ public Mono> listWithResponseAsync(String l return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), location, apiVersion, @@ -125,7 +125,7 @@ private Mono> listWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), location, apiVersion, this.client.getSubscriptionId(), accept, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/StaticCidrsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/StaticCidrsClientImpl.java index 12dc24feb58d..58bc9a692284 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/StaticCidrsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/StaticCidrsClientImpl.java @@ -163,7 +163,7 @@ private Mono> listSinglePageAsync(String resource if (poolName == null) { return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -215,7 +215,7 @@ private Mono> listSinglePageAsync(String resource if (poolName == null) { return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -381,7 +381,7 @@ public Mono> createWithResponseAsync(String resourceGr if (body != null) { body.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -431,7 +431,7 @@ private Mono> createWithResponseAsync(String resourceG if (body != null) { body.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -536,7 +536,7 @@ public Mono> getWithResponseAsync(String resourceGroup if (staticCidrName == null) { return Mono.error(new IllegalArgumentException("Parameter staticCidrName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -582,7 +582,7 @@ private Mono> getWithResponseAsync(String resourceGrou if (staticCidrName == null) { return Mono.error(new IllegalArgumentException("Parameter staticCidrName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -683,7 +683,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (staticCidrName == null) { return Mono.error(new IllegalArgumentException("Parameter staticCidrName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -729,7 +729,7 @@ private Mono>> deleteWithResponseAsync(String resource if (staticCidrName == null) { return Mono.error(new IllegalArgumentException("Parameter staticCidrName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/StaticMembersClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/StaticMembersClientImpl.java index f837ed190268..a40b628562f8 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/StaticMembersClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/StaticMembersClientImpl.java @@ -161,7 +161,7 @@ public Mono> getWithResponseAsync(String resourceGro return Mono .error(new IllegalArgumentException("Parameter staticMemberName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -209,7 +209,7 @@ private Mono> getWithResponseAsync(String resourceGr return Mono .error(new IllegalArgumentException("Parameter staticMemberName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -319,7 +319,7 @@ public Mono> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -375,7 +375,7 @@ private Mono> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -482,7 +482,7 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St return Mono .error(new IllegalArgumentException("Parameter staticMemberName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -530,7 +530,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono .error(new IllegalArgumentException("Parameter staticMemberName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -633,7 +633,7 @@ private Mono> listSinglePageAsync(String resour return Mono .error(new IllegalArgumentException("Parameter networkGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -684,7 +684,7 @@ private Mono> listSinglePageAsync(String resour return Mono .error(new IllegalArgumentException("Parameter networkGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SubnetsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SubnetsClientImpl.java index 2c0ce27a37a7..6f21a609fa37 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SubnetsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SubnetsClientImpl.java @@ -175,7 +175,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, @@ -217,7 +217,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, subnetName, apiVersion, @@ -403,7 +403,7 @@ public Mono> getWithResponseAsync(String resourceGroupName return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, @@ -447,7 +447,7 @@ private Mono> getWithResponseAsync(String resourceGroupNam return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, subnetName, apiVersion, @@ -549,7 +549,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { subnetParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -600,7 +600,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { subnetParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, subnetName, @@ -811,7 +811,7 @@ public Mono>> prepareNetworkPoliciesWithResponseAsync( } else { prepareNetworkPoliciesRequestParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.prepareNetworkPolicies(this.client.getEndpoint(), resourceGroupName, @@ -863,7 +863,7 @@ private Mono>> prepareNetworkPoliciesWithResponseAsync } else { prepareNetworkPoliciesRequestParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.prepareNetworkPolicies(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, @@ -1088,7 +1088,7 @@ public Mono>> unprepareNetworkPoliciesWithResponseAsyn } else { unprepareNetworkPoliciesRequestParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.unprepareNetworkPolicies(this.client.getEndpoint(), resourceGroupName, @@ -1140,7 +1140,7 @@ private Mono>> unprepareNetworkPoliciesWithResponseAsy } else { unprepareNetworkPoliciesRequestParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.unprepareNetworkPolicies(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, @@ -1352,7 +1352,7 @@ private Mono> listSinglePageAsync(String resourceGrou return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, @@ -1393,7 +1393,7 @@ private Mono> listSinglePageAsync(String resourceGrou return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SubscriptionNetworkManagerConnectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SubscriptionNetworkManagerConnectionsClientImpl.java index 29567f9798d9..59a43799cb21 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SubscriptionNetworkManagerConnectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SubscriptionNetworkManagerConnectionsClientImpl.java @@ -145,7 +145,7 @@ Mono> listNext( } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -185,7 +185,7 @@ private Mono> createOrUpdateWithResponse } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -266,7 +266,7 @@ public Mono> getWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter networkManagerConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -300,7 +300,7 @@ private Mono> getWithResponseAsync(Strin return Mono.error( new IllegalArgumentException("Parameter networkManagerConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), networkManagerConnectionName, @@ -374,7 +374,7 @@ public Mono> deleteWithResponseAsync(String networkManagerConnect return Mono.error( new IllegalArgumentException("Parameter networkManagerConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -406,7 +406,7 @@ private Mono> deleteWithResponseAsync(String networkManagerConnec return Mono.error( new IllegalArgumentException("Parameter networkManagerConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), networkManagerConnectionName, @@ -479,7 +479,7 @@ private Mono> listSinglePageAsync(I return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -515,7 +515,7 @@ private Mono> listSinglePageAsync(I return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/UsagesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/UsagesClientImpl.java index c2422cc5f58b..8180ecc0f705 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/UsagesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/UsagesClientImpl.java @@ -100,7 +100,7 @@ private Mono> listSinglePageAsync(String location) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), location, apiVersion, @@ -134,7 +134,7 @@ private Mono> listSinglePageAsync(String location, Con return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VerifierWorkspacesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VerifierWorkspacesClientImpl.java index f3cca2066270..e74b37209dad 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VerifierWorkspacesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VerifierWorkspacesClientImpl.java @@ -171,7 +171,7 @@ private Mono> listSinglePageAsync(String r return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -217,7 +217,7 @@ private Mono> listSinglePageAsync(String r return Mono .error(new IllegalArgumentException("Parameter networkManagerName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -372,7 +372,7 @@ public Mono> getWithResponseAsync(String resour if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -414,7 +414,7 @@ private Mono> getWithResponseAsync(String resou if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -514,7 +514,7 @@ public Mono> createWithResponseAsync(String res } else { body.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -565,7 +565,7 @@ private Mono> createWithResponseAsync(String re } else { body.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -673,7 +673,7 @@ public Mono> updateWithResponseAsync(String res if (body != null) { body.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -723,7 +723,7 @@ private Mono> updateWithResponseAsync(String re if (body != null) { body.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -826,7 +826,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -871,7 +871,7 @@ private Mono>> deleteWithResponseAsync(String resource if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VipSwapsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VipSwapsClientImpl.java index af926ac25801..ee88582ec04d 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VipSwapsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VipSwapsClientImpl.java @@ -123,7 +123,7 @@ public Mono> getWithResponseAsync(String groupName, "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String singletonResource = "swap"; - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), groupName, resourceName, singletonResource, @@ -162,7 +162,7 @@ private Mono> getWithResponseAsync(String groupName, "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String singletonResource = "swap"; - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), groupName, resourceName, singletonResource, apiVersion, @@ -255,7 +255,7 @@ public Mono>> createWithResponseAsync(String groupName parameters.validate(); } final String singletonResource = "swap"; - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), groupName, resourceName, @@ -299,7 +299,7 @@ private Mono>> createWithResponseAsync(String groupNam parameters.validate(); } final String singletonResource = "swap"; - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), groupName, resourceName, singletonResource, apiVersion, @@ -484,7 +484,7 @@ public Mono> listWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), groupName, resourceName, apiVersion, @@ -522,7 +522,7 @@ private Mono> listWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), groupName, resourceName, apiVersion, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualApplianceSitesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualApplianceSitesClientImpl.java index 8cdbe1bcb160..43eb87c6ab49 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualApplianceSitesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualApplianceSitesClientImpl.java @@ -154,7 +154,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, @@ -196,7 +196,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, networkVirtualApplianceName, siteName, @@ -381,7 +381,7 @@ public Mono> getWithResponseAsync(String res return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, @@ -424,7 +424,7 @@ private Mono> getWithResponseAsync(String re return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, networkVirtualApplianceName, siteName, @@ -523,7 +523,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -572,7 +572,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, networkVirtualApplianceName, @@ -776,7 +776,7 @@ private Mono> listSinglePageAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, @@ -817,7 +817,7 @@ private Mono> listSinglePageAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualApplianceSkusClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualApplianceSkusClientImpl.java index 901e57c61fd8..5ac841e74f47 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualApplianceSkusClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualApplianceSkusClientImpl.java @@ -105,7 +105,7 @@ private Mono> listSinglePageAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -135,7 +135,7 @@ private Mono> listSinglePageAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) @@ -223,7 +223,7 @@ public Mono> getWithResponseAsync(Stri if (skuName == null) { return Mono.error(new IllegalArgumentException("Parameter skuName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -255,7 +255,7 @@ private Mono> getWithResponseAsync(Str if (skuName == null) { return Mono.error(new IllegalArgumentException("Parameter skuName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, skuName, accept, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualHubBgpConnectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualHubBgpConnectionsClientImpl.java index 4984c9273e18..86bc9d1640f0 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualHubBgpConnectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualHubBgpConnectionsClientImpl.java @@ -175,7 +175,7 @@ public Mono> getWithResponseAsync(String resourceGr if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -216,7 +216,7 @@ private Mono> getWithResponseAsync(String resourceG if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -312,7 +312,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -359,7 +359,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -558,7 +558,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -599,7 +599,7 @@ private Mono>> deleteWithResponseAsync(String resource if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -778,7 +778,7 @@ private Mono> listSinglePageAsync(String resou if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -817,7 +817,7 @@ private Mono> listSinglePageAsync(String resou if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -924,7 +924,7 @@ public Mono>> listLearnedRoutesWithResponseAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listLearnedRoutes(this.client.getEndpoint(), resourceGroupName, hubName, @@ -966,7 +966,7 @@ private Mono>> listLearnedRoutesWithResponseAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listLearnedRoutes(this.client.getEndpoint(), resourceGroupName, hubName, connectionName, @@ -1159,7 +1159,7 @@ public Mono>> listAdvertisedRoutesWithResponseAsync(St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAdvertisedRoutes(this.client.getEndpoint(), resourceGroupName, hubName, @@ -1201,7 +1201,7 @@ private Mono>> listAdvertisedRoutesWithResponseAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listAdvertisedRoutes(this.client.getEndpoint(), resourceGroupName, hubName, connectionName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualHubIpConfigurationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualHubIpConfigurationsClientImpl.java index fd605a4869fb..8f5aa8b2cc35 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualHubIpConfigurationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualHubIpConfigurationsClientImpl.java @@ -153,7 +153,7 @@ public Mono> getWithResponseAsync(String resou if (ipConfigName == null) { return Mono.error(new IllegalArgumentException("Parameter ipConfigName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -194,7 +194,7 @@ private Mono> getWithResponseAsync(String reso if (ipConfigName == null) { return Mono.error(new IllegalArgumentException("Parameter ipConfigName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -292,7 +292,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -340,7 +340,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -549,7 +549,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (ipConfigName == null) { return Mono.error(new IllegalArgumentException("Parameter ipConfigName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -590,7 +590,7 @@ private Mono>> deleteWithResponseAsync(String resource if (ipConfigName == null) { return Mono.error(new IllegalArgumentException("Parameter ipConfigName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -770,7 +770,7 @@ private Mono> listSinglePageAsync(String if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -810,7 +810,7 @@ private Mono> listSinglePageAsync(String if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualHubRouteTableV2SClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualHubRouteTableV2SClientImpl.java index 04f0c3f08a1d..e7f775996636 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualHubRouteTableV2SClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualHubRouteTableV2SClientImpl.java @@ -154,7 +154,7 @@ public Mono> getWithResponseAsync(String r if (routeTableName == null) { return Mono.error(new IllegalArgumentException("Parameter routeTableName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -195,7 +195,7 @@ private Mono> getWithResponseAsync(String if (routeTableName == null) { return Mono.error(new IllegalArgumentException("Parameter routeTableName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -293,7 +293,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { virtualHubRouteTableV2Parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -343,7 +343,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { virtualHubRouteTableV2Parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -553,7 +553,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (routeTableName == null) { return Mono.error(new IllegalArgumentException("Parameter routeTableName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -594,7 +594,7 @@ private Mono>> deleteWithResponseAsync(String resource if (routeTableName == null) { return Mono.error(new IllegalArgumentException("Parameter routeTableName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -774,7 +774,7 @@ private Mono> listSinglePageAsync(Str if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -814,7 +814,7 @@ private Mono> listSinglePageAsync(Str if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualHubsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualHubsClientImpl.java index ce3cdd5c1847..a86ae5f2e3db 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualHubsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualHubsClientImpl.java @@ -218,7 +218,7 @@ public Mono> getByResourceGroupWithResponseAsync(Strin if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), @@ -255,7 +255,7 @@ private Mono> getByResourceGroupWithResponseAsync(Stri if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -345,7 +345,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { virtualHubParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -389,7 +389,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { virtualHubParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -581,7 +581,7 @@ public Mono> updateTagsWithResponseAsync(String resour } else { virtualHubParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -625,7 +625,7 @@ private Mono> updateTagsWithResponseAsync(String resou } else { virtualHubParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -712,7 +712,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -749,7 +749,7 @@ private Mono>> deleteWithResponseAsync(String resource if (virtualHubName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualHubName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -911,7 +911,7 @@ private Mono> listByResourceGroupSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), @@ -947,7 +947,7 @@ private Mono> listByResourceGroupSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1035,7 +1035,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -1065,7 +1065,7 @@ private Mono> listSinglePageAsync(Context context return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) @@ -1159,7 +1159,7 @@ public Mono>> getEffectiveVirtualHubRoutesWithResponse if (effectiveRoutesParameters != null) { effectiveRoutesParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getEffectiveVirtualHubRoutes(this.client.getEndpoint(), @@ -1202,7 +1202,7 @@ private Mono>> getEffectiveVirtualHubRoutesWithRespons if (effectiveRoutesParameters != null) { effectiveRoutesParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getEffectiveVirtualHubRoutes(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -1453,7 +1453,7 @@ public Mono>> getInboundRoutesWithResponseAsync(String } else { getInboundRoutesParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getInboundRoutes(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -1498,7 +1498,7 @@ private Mono>> getInboundRoutesWithResponseAsync(Strin } else { getInboundRoutesParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getInboundRoutes(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1704,7 +1704,7 @@ public Mono>> getOutboundRoutesWithResponseAsync(Strin } else { getOutboundRoutesParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1750,7 +1750,7 @@ private Mono>> getOutboundRoutesWithResponseAsync(Stri } else { getOutboundRoutesParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getOutboundRoutes(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkGatewayConnectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkGatewayConnectionsClientImpl.java index 1cebe561f6ed..edd56f0931ff 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkGatewayConnectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkGatewayConnectionsClientImpl.java @@ -252,7 +252,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -298,7 +298,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayConnectionName, @@ -494,7 +494,7 @@ public VirtualNetworkGatewayConnectionInner createOrUpdate(String resourceGroupN return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -533,7 +533,7 @@ private Mono> getByResourceGroupW return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -622,7 +622,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, @@ -660,7 +660,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayConnectionName, @@ -839,7 +839,7 @@ public Mono>> updateTagsWithResponseAsync(String resou } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, @@ -885,7 +885,7 @@ private Mono>> updateTagsWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayConnectionName, @@ -1086,7 +1086,7 @@ public Mono>> setSharedKeyWithResponseAsync(String res } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.setSharedKey(this.client.getEndpoint(), resourceGroupName, @@ -1134,7 +1134,7 @@ private Mono>> setSharedKeyWithResponseAsync(String re } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.setSharedKey(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayConnectionName, @@ -1343,7 +1343,7 @@ public Mono> getSharedKeyWithResponseAsync(St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getSharedKey(this.client.getEndpoint(), resourceGroupName, @@ -1383,7 +1383,7 @@ private Mono> getSharedKeyWithResponseAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getSharedKey(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayConnectionName, @@ -1469,7 +1469,7 @@ public ConnectionSharedKeyInner getSharedKey(String resourceGroupName, String vi return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1506,7 +1506,7 @@ public ConnectionSharedKeyInner getSharedKey(String resourceGroupName, String vi return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1625,7 +1625,7 @@ public Mono>> resetSharedKeyWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.resetSharedKey(this.client.getEndpoint(), resourceGroupName, @@ -1674,7 +1674,7 @@ private Mono>> resetSharedKeyWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.resetSharedKey(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayConnectionName, @@ -1898,7 +1898,7 @@ public Mono>> startPacketCaptureWithResponseAsync(Stri if (parameters != null) { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.startPacketCapture(this.client.getEndpoint(), resourceGroupName, @@ -1942,7 +1942,7 @@ private Mono>> startPacketCaptureWithResponseAsync(Str if (parameters != null) { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.startPacketCapture(this.client.getEndpoint(), resourceGroupName, @@ -2182,7 +2182,7 @@ public Mono>> stopPacketCaptureWithResponseAsync(Strin } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.stopPacketCapture(this.client.getEndpoint(), resourceGroupName, @@ -2228,7 +2228,7 @@ private Mono>> stopPacketCaptureWithResponseAsync(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.stopPacketCapture(this.client.getEndpoint(), resourceGroupName, @@ -2427,7 +2427,7 @@ public Mono>> getIkeSasWithResponseAsync(String resour return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getIkeSas(this.client.getEndpoint(), resourceGroupName, @@ -2465,7 +2465,7 @@ private Mono>> getIkeSasWithResponseAsync(String resou return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getIkeSas(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayConnectionName, @@ -2640,7 +2640,7 @@ public Mono>> resetConnectionWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.resetConnection(this.client.getEndpoint(), resourceGroupName, @@ -2678,7 +2678,7 @@ private Mono>> resetConnectionWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.resetConnection(this.client.getEndpoint(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkGatewayNatRulesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkGatewayNatRulesClientImpl.java index 54e5e3248e58..935ce3ae504e 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkGatewayNatRulesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkGatewayNatRulesClientImpl.java @@ -157,7 +157,7 @@ public Mono> getWithResponseAsync(St if (natRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter natRuleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -200,7 +200,7 @@ private Mono> getWithResponseAsync(S if (natRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter natRuleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -301,7 +301,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { natRuleParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -353,7 +353,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { natRuleParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -565,7 +565,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (natRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter natRuleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -607,7 +607,7 @@ private Mono>> deleteWithResponseAsync(String resource if (natRuleName == null) { return Mono.error(new IllegalArgumentException("Parameter natRuleName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -790,7 +790,7 @@ public void delete(String resourceGroupName, String virtualNetworkGatewayName, S return Mono.error( new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.listByVirtualNetworkGateway(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, virtualNetworkGatewayName, apiVersion, accept, context)) @@ -830,7 +830,7 @@ private Mono> listByVirtualNetw return Mono.error( new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkGatewaysClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkGatewaysClientImpl.java index 21ea3ce6fe09..e2e0bcbabdbb 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkGatewaysClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkGatewaysClientImpl.java @@ -492,7 +492,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -537,7 +537,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, @@ -727,7 +727,7 @@ public Mono> getByResourceGroupWithResponse return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -766,7 +766,7 @@ private Mono> getByResourceGroupWithRespons return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, @@ -851,7 +851,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, @@ -889,7 +889,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, apiVersion, @@ -1065,7 +1065,7 @@ public Mono>> updateTagsWithResponseAsync(String resou } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, @@ -1110,7 +1110,7 @@ private Mono>> updateTagsWithResponseAsync(String reso } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, apiVersion, @@ -1293,7 +1293,7 @@ public VirtualNetworkGatewayInner updateTags(String resourceGroupName, String vi return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1329,7 +1329,7 @@ private Mono> listByResourceGroupSingl return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1429,7 +1429,7 @@ public PagedIterable listByResourceGroup(String reso return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listConnections(this.client.getEndpoint(), resourceGroupName, @@ -1471,7 +1471,7 @@ public PagedIterable listByResourceGroup(String reso return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1582,7 +1582,7 @@ public Mono>> resetWithResponseAsync(String resourceGr return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.reset(this.client.getEndpoint(), resourceGroupName, @@ -1623,7 +1623,7 @@ private Mono>> resetWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.reset(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, gatewayVip, @@ -1852,7 +1852,7 @@ public Mono>> resetVpnClientSharedKeyWithResponseAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.resetVpnClientSharedKey(this.client.getEndpoint(), resourceGroupName, @@ -1890,7 +1890,7 @@ private Mono>> resetVpnClientSharedKeyWithResponseAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.resetVpnClientSharedKey(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, @@ -2069,7 +2069,7 @@ public Mono>> generatevpnclientpackageWithResponseAsyn } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.generatevpnclientpackage(this.client.getEndpoint(), resourceGroupName, @@ -2113,7 +2113,7 @@ private Mono>> generatevpnclientpackageWithResponseAsy } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.generatevpnclientpackage(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, @@ -2309,7 +2309,7 @@ public Mono>> generateVpnProfileWithResponseAsync(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.generateVpnProfile(this.client.getEndpoint(), resourceGroupName, @@ -2354,7 +2354,7 @@ private Mono>> generateVpnProfileWithResponseAsync(Str } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.generateVpnProfile(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, @@ -2551,7 +2551,7 @@ public Mono>> getVpnProfilePackageUrlWithResponseAsync return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getVpnProfilePackageUrl(this.client.getEndpoint(), resourceGroupName, @@ -2591,7 +2591,7 @@ private Mono>> getVpnProfilePackageUrlWithResponseAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getVpnProfilePackageUrl(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, @@ -2782,7 +2782,7 @@ public Mono>> getBgpPeerStatusWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getBgpPeerStatus(this.client.getEndpoint(), resourceGroupName, @@ -2822,7 +2822,7 @@ private Mono>> getBgpPeerStatusWithResponseAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getBgpPeerStatus(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, peer, @@ -3050,7 +3050,7 @@ public Mono> supportedVpnDevicesWithResponseAsync(String resour return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.supportedVpnDevices(this.client.getEndpoint(), resourceGroupName, @@ -3089,7 +3089,7 @@ private Mono> supportedVpnDevicesWithResponseAsync(String resou return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.supportedVpnDevices(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, @@ -3174,7 +3174,7 @@ public Mono> listRadiusSecretsWithResp return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listRadiusSecrets(this.client.getEndpoint(), resourceGroupName, @@ -3213,7 +3213,7 @@ private Mono> listRadiusSecretsWithRes return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listRadiusSecrets(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, @@ -3301,7 +3301,7 @@ public Mono>> getLearnedRoutesWithResponseAsync(String return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getLearnedRoutes(this.client.getEndpoint(), resourceGroupName, @@ -3341,7 +3341,7 @@ private Mono>> getLearnedRoutesWithResponseAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getLearnedRoutes(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, @@ -3532,7 +3532,7 @@ public Mono>> getAdvertisedRoutesWithResponseAsync(Str return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getAdvertisedRoutes(this.client.getEndpoint(), resourceGroupName, @@ -3575,7 +3575,7 @@ private Mono>> getAdvertisedRoutesWithResponseAsync(St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getAdvertisedRoutes(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, @@ -3766,7 +3766,7 @@ public Mono>> getResiliencyInformationWithResponseAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getResiliencyInformation(this.client.getEndpoint(), resourceGroupName, @@ -3807,7 +3807,7 @@ private Mono>> getResiliencyInformationWithResponseAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getResiliencyInformation(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, @@ -4052,7 +4052,7 @@ public Mono>> getRoutesInformationWithResponseAsync(St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getRoutesInformation(this.client.getEndpoint(), resourceGroupName, @@ -4092,7 +4092,7 @@ private Mono>> getRoutesInformationWithResponseAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getRoutesInformation(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, @@ -4335,7 +4335,7 @@ public Mono>> setVpnclientIpsecParametersWithResponseA } else { vpnclientIpsecParams.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.setVpnclientIpsecParameters(this.client.getEndpoint(), resourceGroupName, @@ -4384,7 +4384,7 @@ private Mono>> setVpnclientIpsecParametersWithResponse } else { vpnclientIpsecParams.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.setVpnclientIpsecParameters(this.client.getEndpoint(), resourceGroupName, @@ -4604,7 +4604,7 @@ public Mono>> getVpnclientIpsecParametersWithResponseA return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getVpnclientIpsecParameters(this.client.getEndpoint(), resourceGroupName, @@ -4644,7 +4644,7 @@ private Mono>> getVpnclientIpsecParametersWithResponse return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getVpnclientIpsecParameters(this.client.getEndpoint(), resourceGroupName, @@ -4843,7 +4843,7 @@ public Mono> vpnDeviceConfigurationScriptWithResponseAsync(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.vpnDeviceConfigurationScript(this.client.getEndpoint(), resourceGroupName, @@ -4890,7 +4890,7 @@ private Mono> vpnDeviceConfigurationScriptWithResponseAsync(Str } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.vpnDeviceConfigurationScript(this.client.getEndpoint(), resourceGroupName, @@ -4989,7 +4989,7 @@ public Mono>> startPacketCaptureWithResponseAsync(Stri if (parameters != null) { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.startPacketCapture(this.client.getEndpoint(), resourceGroupName, @@ -5031,7 +5031,7 @@ private Mono>> startPacketCaptureWithResponseAsync(Str if (parameters != null) { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.startPacketCapture(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, @@ -5260,7 +5260,7 @@ public Mono>> stopPacketCaptureWithResponseAsync(Strin } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.stopPacketCapture(this.client.getEndpoint(), resourceGroupName, @@ -5304,7 +5304,7 @@ private Mono>> stopPacketCaptureWithResponseAsync(Stri } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.stopPacketCapture(this.client.getEndpoint(), resourceGroupName, virtualNetworkGatewayName, @@ -5497,7 +5497,7 @@ public Mono>> getFailoverAllTestDetailsWithResponseAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getFailoverAllTestDetails(this.client.getEndpoint(), resourceGroupName, @@ -5542,7 +5542,7 @@ private Mono>> getFailoverAllTestDetailsWithResponseAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getFailoverAllTestDetails(this.client.getEndpoint(), resourceGroupName, @@ -5774,7 +5774,7 @@ public Mono>> getFailoverSingleTestDetailsWithResponse return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getFailoverSingleTestDetails(this.client.getEndpoint(), resourceGroupName, @@ -5824,7 +5824,7 @@ private Mono>> getFailoverSingleTestDetailsWithRespons return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getFailoverSingleTestDetails(this.client.getEndpoint(), resourceGroupName, @@ -6056,7 +6056,7 @@ public Mono>> startExpressRouteSiteFailoverSimulationW return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.startExpressRouteSiteFailoverSimulation(this.client.getEndpoint(), @@ -6100,7 +6100,7 @@ private Mono>> startExpressRouteSiteFailoverSimulation return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.startExpressRouteSiteFailoverSimulation(this.client.getEndpoint(), resourceGroupName, @@ -6301,7 +6301,7 @@ public Mono>> stopExpressRouteSiteFailoverSimulationWi } else { stopParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.stopExpressRouteSiteFailoverSimulation(this.client.getEndpoint(), @@ -6348,7 +6348,7 @@ private Mono>> stopExpressRouteSiteFailoverSimulationW } else { stopParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.stopExpressRouteSiteFailoverSimulation(this.client.getEndpoint(), resourceGroupName, @@ -6553,7 +6553,7 @@ public Mono>> getVpnclientConnectionHealthWithResponse return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getVpnclientConnectionHealth(this.client.getEndpoint(), resourceGroupName, @@ -6593,7 +6593,7 @@ private Mono>> getVpnclientConnectionHealthWithRespons return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getVpnclientConnectionHealth(this.client.getEndpoint(), resourceGroupName, @@ -6803,7 +6803,7 @@ public Mono>> disconnectVirtualNetworkGatewayVpnConnec } else { request.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.disconnectVirtualNetworkGatewayVpnConnections(this.client.getEndpoint(), @@ -6848,7 +6848,7 @@ private Mono>> disconnectVirtualNetworkGatewayVpnConne } else { request.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.disconnectVirtualNetworkGatewayVpnConnections(this.client.getEndpoint(), @@ -7048,7 +7048,7 @@ public Mono>> invokePrepareMigrationWithResponseAsync( } else { migrationParams.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -7095,7 +7095,7 @@ private Mono>> invokePrepareMigrationWithResponseAsync } else { migrationParams.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.invokePrepareMigration(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -7290,7 +7290,7 @@ public Mono>> invokeExecuteMigrationWithResponseAsync( return Mono.error( new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -7329,7 +7329,7 @@ private Mono>> invokeExecuteMigrationWithResponseAsync return Mono.error( new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.invokeExecuteMigration(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -7502,7 +7502,7 @@ public Mono>> invokeCommitMigrationWithResponseAsync(S return Mono.error( new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -7541,7 +7541,7 @@ private Mono>> invokeCommitMigrationWithResponseAsync( return Mono.error( new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.invokeCommitMigration(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -7714,7 +7714,7 @@ public Mono>> invokeAbortMigrationWithResponseAsync(St return Mono.error( new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -7753,7 +7753,7 @@ private Mono>> invokeAbortMigrationWithResponseAsync(S return Mono.error( new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.invokeAbortMigration(this.client.getEndpoint(), this.client.getSubscriptionId(), diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkPeeringsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkPeeringsClientImpl.java index 10b7bd1ae0a6..98989770eb38 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkPeeringsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkPeeringsClientImpl.java @@ -158,7 +158,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, @@ -201,7 +201,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, @@ -390,7 +390,7 @@ public Mono> getWithResponseAsync(String re return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, @@ -434,7 +434,7 @@ private Mono> getWithResponseAsync(String r return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, @@ -541,7 +541,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { virtualNetworkPeeringParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -598,7 +598,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { virtualNetworkPeeringParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, @@ -882,7 +882,7 @@ private Mono> listSinglePageAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, @@ -923,7 +923,7 @@ private Mono> listSinglePageAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkTapsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkTapsClientImpl.java index aeed10dbc603..c71cf7dbe1d2 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkTapsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkTapsClientImpl.java @@ -174,7 +174,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, tapName, apiVersion, @@ -211,7 +211,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, tapName, apiVersion, @@ -376,7 +376,7 @@ public Mono> getByResourceGroupWithResponseAsyn return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, tapName, @@ -414,7 +414,7 @@ private Mono> getByResourceGroupWithResponseAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, tapName, apiVersion, @@ -503,7 +503,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, tapName, @@ -546,7 +546,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, tapName, apiVersion, @@ -736,7 +736,7 @@ public Mono> updateTagsWithResponseAsync(String } else { tapParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, tapName, @@ -779,7 +779,7 @@ private Mono> updateTagsWithResponseAsync(Strin } else { tapParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, tapName, apiVersion, @@ -856,7 +856,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -886,7 +886,7 @@ private Mono> listSinglePageAsync(Context return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -971,7 +971,7 @@ private Mono> listByResourceGroupSinglePag return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1007,7 +1007,7 @@ private Mono> listByResourceGroupSinglePag return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworksClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworksClientImpl.java index d0bf44ef144f..9cd466e475a0 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworksClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworksClientImpl.java @@ -229,7 +229,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, @@ -267,7 +267,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, apiVersion, @@ -436,7 +436,7 @@ public Mono> getByResourceGroupWithResponseAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -476,7 +476,7 @@ private Mono> getByResourceGroupWithResponseAsync( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, apiVersion, @@ -569,7 +569,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -613,7 +613,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, apiVersion, @@ -805,7 +805,7 @@ public Mono> updateTagsWithResponseAsync(String re } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, @@ -849,7 +849,7 @@ private Mono> updateTagsWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, apiVersion, @@ -926,7 +926,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -956,7 +956,7 @@ private Mono> listSinglePageAsync(Context con return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -1041,7 +1041,7 @@ private Mono> listByResourceGroupSinglePageAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -1077,7 +1077,7 @@ private Mono> listByResourceGroupSinglePageAs return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1181,7 +1181,7 @@ public Mono> checkIpAddressAvailabili return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.checkIpAddressAvailability(this.client.getEndpoint(), resourceGroupName, @@ -1224,7 +1224,7 @@ private Mono> checkIpAddressAvailabil return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.checkIpAddressAvailability(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, @@ -1316,7 +1316,7 @@ private Mono> listUsageSinglePageAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listUsage(this.client.getEndpoint(), resourceGroupName, virtualNetworkName, @@ -1357,7 +1357,7 @@ private Mono> listUsageSinglePageAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1467,7 +1467,7 @@ private Mono> listDdosPro return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil.withContext(context -> { Mono>> mono = service @@ -1521,7 +1521,7 @@ private Mono> listDdosPro return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); Mono>> mono = service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualRouterPeeringsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualRouterPeeringsClientImpl.java index eda15b90646c..a8cad2611455 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualRouterPeeringsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualRouterPeeringsClientImpl.java @@ -152,7 +152,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, virtualRouterName, @@ -194,7 +194,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, virtualRouterName, peeringName, apiVersion, @@ -379,7 +379,7 @@ public Mono> getWithResponseAsync(String res return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, virtualRouterName, @@ -422,7 +422,7 @@ private Mono> getWithResponseAsync(String re return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, virtualRouterName, peeringName, apiVersion, @@ -520,7 +520,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -569,7 +569,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, virtualRouterName, peeringName, @@ -768,7 +768,7 @@ private Mono> listSinglePageAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, virtualRouterName, @@ -809,7 +809,7 @@ private Mono> listSinglePageAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualRoutersClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualRoutersClientImpl.java index 2676b1023aee..bed25f4d19fc 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualRoutersClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualRoutersClientImpl.java @@ -165,7 +165,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, virtualRouterName, @@ -203,7 +203,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, virtualRouterName, apiVersion, @@ -371,7 +371,7 @@ public Mono> getByResourceGroupWithResponseAsync(St return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -410,7 +410,7 @@ private Mono> getByResourceGroupWithResponseAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, virtualRouterName, apiVersion, @@ -503,7 +503,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, @@ -547,7 +547,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, virtualRouterName, apiVersion, @@ -727,7 +727,7 @@ private Mono> listByResourceGroupSinglePageAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -763,7 +763,7 @@ private Mono> listByResourceGroupSinglePageAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -851,7 +851,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -881,7 +881,7 @@ private Mono> listSinglePageAsync(Context cont return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualWansClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualWansClientImpl.java index 5c457ae3eed4..7d49da2104e1 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualWansClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualWansClientImpl.java @@ -178,7 +178,7 @@ public Mono> getByResourceGroupWithResponseAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -215,7 +215,7 @@ private Mono> getByResourceGroupWithResponseAsync(Stri return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, virtualWanName, apiVersion, @@ -304,7 +304,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { wanParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -347,7 +347,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { wanParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -537,7 +537,7 @@ public Mono> updateTagsWithResponseAsync(String resour } else { wanParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -580,7 +580,7 @@ private Mono> updateTagsWithResponseAsync(String resou } else { wanParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -666,7 +666,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (virtualWanName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualWanName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -703,7 +703,7 @@ private Mono>> deleteWithResponseAsync(String resource if (virtualWanName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualWanName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -865,7 +865,7 @@ private Mono> listByResourceGroupSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), @@ -901,7 +901,7 @@ private Mono> listByResourceGroupSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -989,7 +989,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -1019,7 +1019,7 @@ private Mono> listSinglePageAsync(Context context return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnConnectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnConnectionsClientImpl.java index 184744e70957..724350164b86 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnConnectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnConnectionsClientImpl.java @@ -176,7 +176,7 @@ public Mono> getWithResponseAsync(String resourceGr if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -217,7 +217,7 @@ private Mono> getWithResponseAsync(String resourceG if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, gatewayName, @@ -314,7 +314,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { vpnConnectionParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -362,7 +362,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { vpnConnectionParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -564,7 +564,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -605,7 +605,7 @@ private Mono>> deleteWithResponseAsync(String resource if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -793,7 +793,7 @@ public Mono>> startPacketCaptureWithResponseAsync(Stri if (parameters != null) { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -842,7 +842,7 @@ private Mono>> startPacketCaptureWithResponseAsync(Str if (parameters != null) { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.startPacketCapture(this.client.getEndpoint(), resourceGroupName, gatewayName, vpnConnectionName, @@ -1092,7 +1092,7 @@ public Mono>> stopPacketCaptureWithResponseAsync(Strin if (parameters != null) { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.stopPacketCapture(this.client.getEndpoint(), resourceGroupName, gatewayName, @@ -1139,7 +1139,7 @@ private Mono>> stopPacketCaptureWithResponseAsync(Stri if (parameters != null) { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.stopPacketCapture(this.client.getEndpoint(), resourceGroupName, gatewayName, vpnConnectionName, @@ -1374,7 +1374,7 @@ private Mono> listByVpnGatewaySinglePageAsync( if (gatewayName == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByVpnGateway(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -1414,7 +1414,7 @@ private Mono> listByVpnGatewaySinglePageAsync( if (gatewayName == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnGatewaysClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnGatewaysClientImpl.java index bdea0ca137ce..b86184e398c9 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnGatewaysClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnGatewaysClientImpl.java @@ -209,7 +209,7 @@ public Mono> getByResourceGroupWithResponseAsync(Strin if (gatewayName == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), @@ -246,7 +246,7 @@ private Mono> getByResourceGroupWithResponseAsync(Stri if (gatewayName == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -336,7 +336,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { vpnGatewayParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -380,7 +380,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { vpnGatewayParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -572,7 +572,7 @@ public Mono>> updateTagsWithResponseAsync(String resou } else { vpnGatewayParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -616,7 +616,7 @@ private Mono>> updateTagsWithResponseAsync(String reso } else { vpnGatewayParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -798,7 +798,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (gatewayName == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -835,7 +835,7 @@ private Mono>> deleteWithResponseAsync(String resource if (gatewayName == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1001,7 +1001,7 @@ public Mono>> resetWithResponseAsync(String resourceGr return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.reset(this.client.getEndpoint(), resourceGroupName, gatewayName, @@ -1039,7 +1039,7 @@ private Mono>> resetWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.reset(this.client.getEndpoint(), resourceGroupName, gatewayName, ipConfigurationId, apiVersion, @@ -1262,7 +1262,7 @@ public Mono>> startPacketCaptureWithResponseAsync(Stri if (parameters != null) { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.startPacketCapture(this.client.getEndpoint(), resourceGroupName, @@ -1303,7 +1303,7 @@ private Mono>> startPacketCaptureWithResponseAsync(Str if (parameters != null) { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.startPacketCapture(this.client.getEndpoint(), resourceGroupName, gatewayName, apiVersion, @@ -1527,7 +1527,7 @@ public Mono>> stopPacketCaptureWithResponseAsync(Strin if (parameters != null) { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.stopPacketCapture(this.client.getEndpoint(), resourceGroupName, gatewayName, @@ -1568,7 +1568,7 @@ private Mono>> stopPacketCaptureWithResponseAsync(Stri if (parameters != null) { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.stopPacketCapture(this.client.getEndpoint(), resourceGroupName, gatewayName, apiVersion, @@ -1783,7 +1783,7 @@ private Mono> listByResourceGroupSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), @@ -1819,7 +1819,7 @@ private Mono> listByResourceGroupSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1907,7 +1907,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -1937,7 +1937,7 @@ private Mono> listSinglePageAsync(Context context return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnLinkConnectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnLinkConnectionsClientImpl.java index ed4c14f6c2a4..e8b8593c0a6f 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnLinkConnectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnLinkConnectionsClientImpl.java @@ -203,7 +203,7 @@ public Mono>> resetConnectionWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter linkConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.resetConnection(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -249,7 +249,7 @@ private Mono>> resetConnectionWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter linkConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.resetConnection(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -453,7 +453,7 @@ private Mono> getAllSharedKeysSing return Mono .error(new IllegalArgumentException("Parameter linkConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getAllSharedKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -503,7 +503,7 @@ private Mono> getAllSharedKeysSing return Mono .error(new IllegalArgumentException("Parameter linkConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -630,7 +630,7 @@ public Mono> getDefaultSharedKeyWithRes return Mono .error(new IllegalArgumentException("Parameter linkConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -679,7 +679,7 @@ private Mono> getDefaultSharedKeyWithRe return Mono .error(new IllegalArgumentException("Parameter linkConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getDefaultSharedKey(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -791,7 +791,7 @@ public Mono>> setOrInitDefaultSharedKeyWithResponseAsy } else { connectionSharedKeyParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.setOrInitDefaultSharedKey(this.client.getEndpoint(), @@ -848,7 +848,7 @@ private Mono>> setOrInitDefaultSharedKeyWithResponseAs } else { connectionSharedKeyParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.setOrInitDefaultSharedKey(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -1093,7 +1093,7 @@ public Mono> listDefaultSharedKeyWithRe return Mono .error(new IllegalArgumentException("Parameter linkConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1142,7 +1142,7 @@ private Mono> listDefaultSharedKeyWithR return Mono .error(new IllegalArgumentException("Parameter linkConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listDefaultSharedKey(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -1244,7 +1244,7 @@ public Mono>> getIkeSasWithResponseAsync(String resour return Mono .error(new IllegalArgumentException("Parameter linkConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getIkeSas(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -1290,7 +1290,7 @@ private Mono>> getIkeSasWithResponseAsync(String resou return Mono .error(new IllegalArgumentException("Parameter linkConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getIkeSas(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1489,7 +1489,7 @@ private Mono> listByVpnConnectionSingl if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1534,7 +1534,7 @@ private Mono> listByVpnConnectionSingl if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnServerConfigurationsAssociatedWithVirtualWansClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnServerConfigurationsAssociatedWithVirtualWansClientImpl.java index 03442609e10a..1775ca853877 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnServerConfigurationsAssociatedWithVirtualWansClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnServerConfigurationsAssociatedWithVirtualWansClientImpl.java @@ -104,7 +104,7 @@ public Mono>> listWithResponseAsync(String resourceGro if (virtualWanName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualWanName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -142,7 +142,7 @@ private Mono>> listWithResponseAsync(String resourceGr if (virtualWanName == null) { return Mono.error(new IllegalArgumentException("Parameter virtualWanName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnServerConfigurationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnServerConfigurationsClientImpl.java index eed1d0aca671..ffc5bcb51ef4 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnServerConfigurationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnServerConfigurationsClientImpl.java @@ -195,7 +195,7 @@ public Mono> getByResourceGroupWithRespons return Mono.error( new IllegalArgumentException("Parameter vpnServerConfigurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -234,7 +234,7 @@ private Mono> getByResourceGroupWithRespon return Mono.error( new IllegalArgumentException("Parameter vpnServerConfigurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -326,7 +326,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { vpnServerConfigurationParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -373,7 +373,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { vpnServerConfigurationParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -580,7 +580,7 @@ public Mono> updateTagsWithResponseAsync(S } else { vpnServerConfigurationParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -626,7 +626,7 @@ private Mono> updateTagsWithResponseAsync( } else { vpnServerConfigurationParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -717,7 +717,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error( new IllegalArgumentException("Parameter vpnServerConfigurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -755,7 +755,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter vpnServerConfigurationName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -920,7 +920,7 @@ public void delete(String resourceGroupName, String vpnServerConfigurationName, return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), @@ -956,7 +956,7 @@ public void delete(String resourceGroupName, String vpnServerConfigurationName, return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1046,7 +1046,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -1076,7 +1076,7 @@ private Mono> listSinglePageAsync(Con return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) @@ -1169,7 +1169,7 @@ public Mono> listRadiusSecretsWithResp return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listRadiusSecrets(this.client.getEndpoint(), resourceGroupName, @@ -1208,7 +1208,7 @@ private Mono> listRadiusSecretsWithRes return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.listRadiusSecrets(this.client.getEndpoint(), resourceGroupName, vpnServerConfigurationName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnSiteLinkConnectionsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnSiteLinkConnectionsClientImpl.java index 996418c5b2f4..79dbb60e9259 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnSiteLinkConnectionsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnSiteLinkConnectionsClientImpl.java @@ -106,7 +106,7 @@ public Mono> getWithResponseAsync(String re return Mono .error(new IllegalArgumentException("Parameter linkConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -152,7 +152,7 @@ private Mono> getWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter linkConnectionName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, gatewayName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnSiteLinksClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnSiteLinksClientImpl.java index 4b4e2324d81c..ac5f9a42540f 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnSiteLinksClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnSiteLinksClientImpl.java @@ -123,7 +123,7 @@ public Mono> getWithResponseAsync(String resourceGrou return Mono .error(new IllegalArgumentException("Parameter vpnSiteLinkName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -165,7 +165,7 @@ private Mono> getWithResponseAsync(String resourceGro return Mono .error(new IllegalArgumentException("Parameter vpnSiteLinkName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, vpnSiteName, @@ -252,7 +252,7 @@ private Mono> listByVpnSiteSinglePageAsync(Strin if (vpnSiteName == null) { return Mono.error(new IllegalArgumentException("Parameter vpnSiteName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByVpnSite(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -292,7 +292,7 @@ private Mono> listByVpnSiteSinglePageAsync(Strin if (vpnSiteName == null) { return Mono.error(new IllegalArgumentException("Parameter vpnSiteName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnSitesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnSitesClientImpl.java index e18f510061bd..70d979c9c1b7 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnSitesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnSitesClientImpl.java @@ -174,7 +174,7 @@ public Mono> getByResourceGroupWithResponseAsync(String r if (vpnSiteName == null) { return Mono.error(new IllegalArgumentException("Parameter vpnSiteName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), @@ -211,7 +211,7 @@ private Mono> getByResourceGroupWithResponseAsync(String if (vpnSiteName == null) { return Mono.error(new IllegalArgumentException("Parameter vpnSiteName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -301,7 +301,7 @@ public Mono>> createOrUpdateWithResponseAsync(String r } else { vpnSiteParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -345,7 +345,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { vpnSiteParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -536,7 +536,7 @@ public Mono> updateTagsWithResponseAsync(String resourceG } else { vpnSiteParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -580,7 +580,7 @@ private Mono> updateTagsWithResponseAsync(String resource } else { vpnSiteParameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateTags(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -666,7 +666,7 @@ public Mono>> deleteWithResponseAsync(String resourceG if (vpnSiteName == null) { return Mono.error(new IllegalArgumentException("Parameter vpnSiteName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -703,7 +703,7 @@ private Mono>> deleteWithResponseAsync(String resource if (vpnSiteName == null) { return Mono.error(new IllegalArgumentException("Parameter vpnSiteName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -864,7 +864,7 @@ private Mono> listByResourceGroupSinglePageAsync(Str return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), @@ -900,7 +900,7 @@ private Mono> listByResourceGroupSinglePageAsync(Str return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -988,7 +988,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -1018,7 +1018,7 @@ private Mono> listSinglePageAsync(Context context) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnSitesConfigurationsClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnSitesConfigurationsClientImpl.java index 79a3be4ac94c..bdbffecb162d 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnSitesConfigurationsClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnSitesConfigurationsClientImpl.java @@ -109,7 +109,7 @@ public Mono>> downloadWithResponseAsync(String resourc } else { request.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.download(this.client.getEndpoint(), this.client.getSubscriptionId(), @@ -152,7 +152,7 @@ private Mono>> downloadWithResponseAsync(String resour } else { request.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.download(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/WebApplicationFirewallPoliciesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/WebApplicationFirewallPoliciesClientImpl.java index 843e14e902e0..3ec284d2de98 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/WebApplicationFirewallPoliciesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/WebApplicationFirewallPoliciesClientImpl.java @@ -162,7 +162,7 @@ Mono> listAllNext( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, @@ -198,7 +198,7 @@ Mono> listAllNext( return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -292,7 +292,7 @@ private Mono> listSinglePageAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -322,7 +322,7 @@ private Mono> listSinglePageAsy return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) @@ -412,7 +412,7 @@ public PagedIterable list(Context context) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, policyName, @@ -450,7 +450,7 @@ public PagedIterable list(Context context) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, policyName, @@ -541,7 +541,7 @@ public Mono> createOrUpdateWithRespo } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, policyName, @@ -585,7 +585,7 @@ private Mono> createOrUpdateWithResp } else { parameters.validate(); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, policyName, @@ -672,7 +672,7 @@ public Mono>> deleteWithResponseAsync(String resourceG return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, policyName, @@ -709,7 +709,7 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), resourceGroupName, policyName, this.client.getSubscriptionId(), diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/WebCategoriesClientImpl.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/WebCategoriesClientImpl.java index 988c64025419..0b7dc335df91 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/WebCategoriesClientImpl.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/WebCategoriesClientImpl.java @@ -110,7 +110,7 @@ public Mono> getWithResponseAsync(String name, S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), name, apiVersion, @@ -142,7 +142,7 @@ private Mono> getWithResponseAsync(String name, return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), name, apiVersion, this.client.getSubscriptionId(), expand, accept, @@ -213,7 +213,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -243,7 +243,7 @@ private Mono> listSinglePageAsync(Context c return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2025-01-01"; + final String apiVersion = "2025-03-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayClientAuthConfiguration.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayClientAuthConfiguration.java index 9700708bdf13..65984f363b7d 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayClientAuthConfiguration.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayClientAuthConfiguration.java @@ -27,6 +27,11 @@ public final class ApplicationGatewayClientAuthConfiguration */ private ApplicationGatewayClientRevocationOptions verifyClientRevocation; + /* + * Verify client Authentication mode. + */ + private ApplicationGatewayClientAuthVerificationModes verifyClientAuthMode; + /** * Creates an instance of ApplicationGatewayClientAuthConfiguration class. */ @@ -74,6 +79,27 @@ public ApplicationGatewayClientRevocationOptions verifyClientRevocation() { return this; } + /** + * Get the verifyClientAuthMode property: Verify client Authentication mode. + * + * @return the verifyClientAuthMode value. + */ + public ApplicationGatewayClientAuthVerificationModes verifyClientAuthMode() { + return this.verifyClientAuthMode; + } + + /** + * Set the verifyClientAuthMode property: Verify client Authentication mode. + * + * @param verifyClientAuthMode the verifyClientAuthMode value to set. + * @return the ApplicationGatewayClientAuthConfiguration object itself. + */ + public ApplicationGatewayClientAuthConfiguration + withVerifyClientAuthMode(ApplicationGatewayClientAuthVerificationModes verifyClientAuthMode) { + this.verifyClientAuthMode = verifyClientAuthMode; + return this; + } + /** * Validates the instance. * @@ -91,6 +117,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("verifyClientCertIssuerDN", this.verifyClientCertIssuerDN); jsonWriter.writeStringField("verifyClientRevocation", this.verifyClientRevocation == null ? null : this.verifyClientRevocation.toString()); + jsonWriter.writeStringField("verifyClientAuthMode", + this.verifyClientAuthMode == null ? null : this.verifyClientAuthMode.toString()); return jsonWriter.writeEndObject(); } @@ -116,6 +144,9 @@ public static ApplicationGatewayClientAuthConfiguration fromJson(JsonReader json } else if ("verifyClientRevocation".equals(fieldName)) { deserializedApplicationGatewayClientAuthConfiguration.verifyClientRevocation = ApplicationGatewayClientRevocationOptions.fromString(reader.getString()); + } else if ("verifyClientAuthMode".equals(fieldName)) { + deserializedApplicationGatewayClientAuthConfiguration.verifyClientAuthMode + = ApplicationGatewayClientAuthVerificationModes.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayClientAuthVerificationModes.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayClientAuthVerificationModes.java new file mode 100644 index 000000000000..72a6adab7b82 --- /dev/null +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayClientAuthVerificationModes.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.network.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Verify client Authentication mode. + */ +public final class ApplicationGatewayClientAuthVerificationModes + extends ExpandableStringEnum { + /** + * Static value Strict for ApplicationGatewayClientAuthVerificationModes. + */ + public static final ApplicationGatewayClientAuthVerificationModes STRICT = fromString("Strict"); + + /** + * Static value Passthrough for ApplicationGatewayClientAuthVerificationModes. + */ + public static final ApplicationGatewayClientAuthVerificationModes PASSTHROUGH = fromString("Passthrough"); + + /** + * Creates a new instance of ApplicationGatewayClientAuthVerificationModes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ApplicationGatewayClientAuthVerificationModes() { + } + + /** + * Creates or finds a ApplicationGatewayClientAuthVerificationModes from its string representation. + * + * @param name a name to look for. + * @return the corresponding ApplicationGatewayClientAuthVerificationModes. + */ + public static ApplicationGatewayClientAuthVerificationModes fromString(String name) { + return fromString(name, ApplicationGatewayClientAuthVerificationModes.class); + } + + /** + * Gets known ApplicationGatewayClientAuthVerificationModes values. + * + * @return known ApplicationGatewayClientAuthVerificationModes values. + */ + public static Collection values() { + return values(ApplicationGatewayClientAuthVerificationModes.class); + } +} diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayEntraJwtValidationConfig.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayEntraJwtValidationConfig.java new file mode 100644 index 000000000000..c94456f05baa --- /dev/null +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayEntraJwtValidationConfig.java @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.network.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.network.fluent.models.ApplicationGatewayEntraJwtValidationConfigPropertiesFormat; +import java.io.IOException; +import java.util.List; + +/** + * Entra JWT Validation Configuration of an application gateway. + */ +@Fluent +public final class ApplicationGatewayEntraJwtValidationConfig extends SubResource { + /* + * Properties of the application gateway entra jwt validation configuration. + */ + private ApplicationGatewayEntraJwtValidationConfigPropertiesFormat innerProperties; + + /* + * Name of the entra jwt validation configuration that is unique within an application gateway. + */ + private String name; + + /* + * A unique read-only string that changes whenever the resource is updated. + */ + private String etag; + + /** + * Creates an instance of ApplicationGatewayEntraJwtValidationConfig class. + */ + public ApplicationGatewayEntraJwtValidationConfig() { + } + + /** + * Get the innerProperties property: Properties of the application gateway entra jwt validation configuration. + * + * @return the innerProperties value. + */ + private ApplicationGatewayEntraJwtValidationConfigPropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the name property: Name of the entra jwt validation configuration that is unique within an application + * gateway. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the entra jwt validation configuration that is unique within an application + * gateway. + * + * @param name the name value to set. + * @return the ApplicationGatewayEntraJwtValidationConfig object itself. + */ + public ApplicationGatewayEntraJwtValidationConfig withName(String name) { + this.name = name; + return this; + } + + /** + * Get the etag property: A unique read-only string that changes whenever the resource is updated. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * {@inheritDoc} + */ + @Override + public ApplicationGatewayEntraJwtValidationConfig withId(String id) { + super.withId(id); + return this; + } + + /** + * Get the unAuthorizedRequestAction property: Unauthorized request action. + * + * @return the unAuthorizedRequestAction value. + */ + public ApplicationGatewayUnAuthorizedRequestAction unAuthorizedRequestAction() { + return this.innerProperties() == null ? null : this.innerProperties().unAuthorizedRequestAction(); + } + + /** + * Set the unAuthorizedRequestAction property: Unauthorized request action. + * + * @param unAuthorizedRequestAction the unAuthorizedRequestAction value to set. + * @return the ApplicationGatewayEntraJwtValidationConfig object itself. + */ + public ApplicationGatewayEntraJwtValidationConfig + withUnAuthorizedRequestAction(ApplicationGatewayUnAuthorizedRequestAction unAuthorizedRequestAction) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationGatewayEntraJwtValidationConfigPropertiesFormat(); + } + this.innerProperties().withUnAuthorizedRequestAction(unAuthorizedRequestAction); + return this; + } + + /** + * Get the tenantId property: The Tenant ID of the Microsoft Entra ID application. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The Tenant ID of the Microsoft Entra ID application. + * + * @param tenantId the tenantId value to set. + * @return the ApplicationGatewayEntraJwtValidationConfig object itself. + */ + public ApplicationGatewayEntraJwtValidationConfig withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationGatewayEntraJwtValidationConfigPropertiesFormat(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + + /** + * Get the clientId property: The Client ID of the Microsoft Entra ID application. + * + * @return the clientId value. + */ + public String clientId() { + return this.innerProperties() == null ? null : this.innerProperties().clientId(); + } + + /** + * Set the clientId property: The Client ID of the Microsoft Entra ID application. + * + * @param clientId the clientId value to set. + * @return the ApplicationGatewayEntraJwtValidationConfig object itself. + */ + public ApplicationGatewayEntraJwtValidationConfig withClientId(String clientId) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationGatewayEntraJwtValidationConfigPropertiesFormat(); + } + this.innerProperties().withClientId(clientId); + return this; + } + + /** + * Get the audiences property: List of acceptable audience claims that can be present in the token (aud claim). A + * maximum of 5 audiences are permitted. + * + * @return the audiences value. + */ + public List audiences() { + return this.innerProperties() == null ? null : this.innerProperties().audiences(); + } + + /** + * Set the audiences property: List of acceptable audience claims that can be present in the token (aud claim). A + * maximum of 5 audiences are permitted. + * + * @param audiences the audiences value to set. + * @return the ApplicationGatewayEntraJwtValidationConfig object itself. + */ + public ApplicationGatewayEntraJwtValidationConfig withAudiences(List audiences) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationGatewayEntraJwtValidationConfigPropertiesFormat(); + } + this.innerProperties().withAudiences(audiences); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the entra jwt validation configuration resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", id()); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ApplicationGatewayEntraJwtValidationConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ApplicationGatewayEntraJwtValidationConfig if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ApplicationGatewayEntraJwtValidationConfig. + */ + public static ApplicationGatewayEntraJwtValidationConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ApplicationGatewayEntraJwtValidationConfig deserializedApplicationGatewayEntraJwtValidationConfig + = new ApplicationGatewayEntraJwtValidationConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedApplicationGatewayEntraJwtValidationConfig.withId(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedApplicationGatewayEntraJwtValidationConfig.innerProperties + = ApplicationGatewayEntraJwtValidationConfigPropertiesFormat.fromJson(reader); + } else if ("name".equals(fieldName)) { + deserializedApplicationGatewayEntraJwtValidationConfig.name = reader.getString(); + } else if ("etag".equals(fieldName)) { + deserializedApplicationGatewayEntraJwtValidationConfig.etag = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedApplicationGatewayEntraJwtValidationConfig; + }); + } +} diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayUnAuthorizedRequestAction.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayUnAuthorizedRequestAction.java new file mode 100644 index 000000000000..55322e652ea9 --- /dev/null +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayUnAuthorizedRequestAction.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.network.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Unauthorized request action. + */ +public final class ApplicationGatewayUnAuthorizedRequestAction + extends ExpandableStringEnum { + /** + * Static value Deny for ApplicationGatewayUnAuthorizedRequestAction. + */ + public static final ApplicationGatewayUnAuthorizedRequestAction DENY = fromString("Deny"); + + /** + * Static value Allow for ApplicationGatewayUnAuthorizedRequestAction. + */ + public static final ApplicationGatewayUnAuthorizedRequestAction ALLOW = fromString("Allow"); + + /** + * Creates a new instance of ApplicationGatewayUnAuthorizedRequestAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ApplicationGatewayUnAuthorizedRequestAction() { + } + + /** + * Creates or finds a ApplicationGatewayUnAuthorizedRequestAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding ApplicationGatewayUnAuthorizedRequestAction. + */ + public static ApplicationGatewayUnAuthorizedRequestAction fromString(String name) { + return fromString(name, ApplicationGatewayUnAuthorizedRequestAction.class); + } + + /** + * Gets known ApplicationGatewayUnAuthorizedRequestAction values. + * + * @return known ApplicationGatewayUnAuthorizedRequestAction values. + */ + public static Collection values() { + return values(ApplicationGatewayUnAuthorizedRequestAction.class); + } +} diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayWafRuleSensitivityTypes.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayWafRuleSensitivityTypes.java index 33077d209ced..b89d313ade9c 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayWafRuleSensitivityTypes.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayWafRuleSensitivityTypes.java @@ -12,11 +12,6 @@ */ public final class ApplicationGatewayWafRuleSensitivityTypes extends ExpandableStringEnum { - /** - * Static value None for ApplicationGatewayWafRuleSensitivityTypes. - */ - public static final ApplicationGatewayWafRuleSensitivityTypes NONE = fromString("None"); - /** * Static value Low for ApplicationGatewayWafRuleSensitivityTypes. */ diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/DdosDetectionMode.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/DdosDetectionMode.java new file mode 100644 index 000000000000..d2b068d9ee90 --- /dev/null +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/DdosDetectionMode.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.network.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The detection mode for the DDoS detection rule. + */ +public final class DdosDetectionMode extends ExpandableStringEnum { + /** + * Static value TrafficThreshold for DdosDetectionMode. + */ + public static final DdosDetectionMode TRAFFIC_THRESHOLD = fromString("TrafficThreshold"); + + /** + * Creates a new instance of DdosDetectionMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DdosDetectionMode() { + } + + /** + * Creates or finds a DdosDetectionMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding DdosDetectionMode. + */ + public static DdosDetectionMode fromString(String name) { + return fromString(name, DdosDetectionMode.class); + } + + /** + * Gets known DdosDetectionMode values. + * + * @return known DdosDetectionMode values. + */ + public static Collection values() { + return values(DdosDetectionMode.class); + } +} diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/DdosDetectionRule.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/DdosDetectionRule.java new file mode 100644 index 000000000000..407bb283cef4 --- /dev/null +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/DdosDetectionRule.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.network.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.network.fluent.models.DdosDetectionRulePropertiesFormat; +import java.io.IOException; + +/** + * A DDoS detection rule resource. + */ +@Fluent +public final class DdosDetectionRule extends SubResource { + /* + * The name of the DDoS detection rule. + */ + private String name; + + /* + * A unique read-only string that changes whenever the resource is updated. + */ + private String etag; + + /* + * The resource type. + */ + private String type; + + /* + * Properties of the DDoS detection rule. + */ + private DdosDetectionRulePropertiesFormat innerProperties; + + /** + * Creates an instance of DdosDetectionRule class. + */ + public DdosDetectionRule() { + } + + /** + * Get the name property: The name of the DDoS detection rule. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the DDoS detection rule. + * + * @param name the name value to set. + * @return the DdosDetectionRule object itself. + */ + public DdosDetectionRule withName(String name) { + this.name = name; + return this; + } + + /** + * Get the etag property: A unique read-only string that changes whenever the resource is updated. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Get the type property: The resource type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the innerProperties property: Properties of the DDoS detection rule. + * + * @return the innerProperties value. + */ + private DdosDetectionRulePropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * {@inheritDoc} + */ + @Override + public DdosDetectionRule withId(String id) { + super.withId(id); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the DDoS detection rule. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the detectionMode property: The detection mode for the DDoS detection rule. + * + * @return the detectionMode value. + */ + public DdosDetectionMode detectionMode() { + return this.innerProperties() == null ? null : this.innerProperties().detectionMode(); + } + + /** + * Set the detectionMode property: The detection mode for the DDoS detection rule. + * + * @param detectionMode the detectionMode value to set. + * @return the DdosDetectionRule object itself. + */ + public DdosDetectionRule withDetectionMode(DdosDetectionMode detectionMode) { + if (this.innerProperties() == null) { + this.innerProperties = new DdosDetectionRulePropertiesFormat(); + } + this.innerProperties().withDetectionMode(detectionMode); + return this; + } + + /** + * Get the trafficDetectionRule property: The traffic detection rule details. + * + * @return the trafficDetectionRule value. + */ + public TrafficDetectionRule trafficDetectionRule() { + return this.innerProperties() == null ? null : this.innerProperties().trafficDetectionRule(); + } + + /** + * Set the trafficDetectionRule property: The traffic detection rule details. + * + * @param trafficDetectionRule the trafficDetectionRule value to set. + * @return the DdosDetectionRule object itself. + */ + public DdosDetectionRule withTrafficDetectionRule(TrafficDetectionRule trafficDetectionRule) { + if (this.innerProperties() == null) { + this.innerProperties = new DdosDetectionRulePropertiesFormat(); + } + this.innerProperties().withTrafficDetectionRule(trafficDetectionRule); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", id()); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DdosDetectionRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DdosDetectionRule if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DdosDetectionRule. + */ + public static DdosDetectionRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DdosDetectionRule deserializedDdosDetectionRule = new DdosDetectionRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDdosDetectionRule.withId(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedDdosDetectionRule.name = reader.getString(); + } else if ("etag".equals(fieldName)) { + deserializedDdosDetectionRule.etag = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDdosDetectionRule.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDdosDetectionRule.innerProperties = DdosDetectionRulePropertiesFormat.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDdosDetectionRule; + }); + } +} diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/DdosTrafficType.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/DdosTrafficType.java new file mode 100644 index 000000000000..51b18227573e --- /dev/null +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/DdosTrafficType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.network.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The traffic type (one of Tcp, Udp, TcpSyn) that the detection rule will be applied upon. + */ +public final class DdosTrafficType extends ExpandableStringEnum { + /** + * Static value Tcp for DdosTrafficType. + */ + public static final DdosTrafficType TCP = fromString("Tcp"); + + /** + * Static value Udp for DdosTrafficType. + */ + public static final DdosTrafficType UDP = fromString("Udp"); + + /** + * Static value TcpSyn for DdosTrafficType. + */ + public static final DdosTrafficType TCP_SYN = fromString("TcpSyn"); + + /** + * Creates a new instance of DdosTrafficType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DdosTrafficType() { + } + + /** + * Creates or finds a DdosTrafficType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DdosTrafficType. + */ + public static DdosTrafficType fromString(String name) { + return fromString(name, DdosTrafficType.class); + } + + /** + * Gets known DdosTrafficType values. + * + * @return known DdosTrafficType values. + */ + public static Collection values() { + return values(DdosTrafficType.class); + } +} diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/DisassociateCloudServicePublicIpRequest.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/DisassociateCloudServicePublicIpRequest.java new file mode 100644 index 000000000000..a1fe1dba1db2 --- /dev/null +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/DisassociateCloudServicePublicIpRequest.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.network.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The request for DisassociateCloudServicePublicIpOperation. + */ +@Fluent +public final class DisassociateCloudServicePublicIpRequest + implements JsonSerializable { + /* + * ARM ID of the Standalone Public IP to associate. This is of the form : + * /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/ + * {publicIpAddressName} + */ + private String publicIpArmId; + + /** + * Creates an instance of DisassociateCloudServicePublicIpRequest class. + */ + public DisassociateCloudServicePublicIpRequest() { + } + + /** + * Get the publicIpArmId property: ARM ID of the Standalone Public IP to associate. This is of the form : + * /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}. + * + * @return the publicIpArmId value. + */ + public String publicIpArmId() { + return this.publicIpArmId; + } + + /** + * Set the publicIpArmId property: ARM ID of the Standalone Public IP to associate. This is of the form : + * /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}. + * + * @param publicIpArmId the publicIpArmId value to set. + * @return the DisassociateCloudServicePublicIpRequest object itself. + */ + public DisassociateCloudServicePublicIpRequest withPublicIpArmId(String publicIpArmId) { + this.publicIpArmId = publicIpArmId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (publicIpArmId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property publicIpArmId in model DisassociateCloudServicePublicIpRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DisassociateCloudServicePublicIpRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("publicIpArmId", this.publicIpArmId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DisassociateCloudServicePublicIpRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DisassociateCloudServicePublicIpRequest if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DisassociateCloudServicePublicIpRequest. + */ + public static DisassociateCloudServicePublicIpRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DisassociateCloudServicePublicIpRequest deserializedDisassociateCloudServicePublicIpRequest + = new DisassociateCloudServicePublicIpRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicIpArmId".equals(fieldName)) { + deserializedDisassociateCloudServicePublicIpRequest.publicIpArmId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDisassociateCloudServicePublicIpRequest; + }); + } +} diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/IsRollback.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/IsRollback.java new file mode 100644 index 000000000000..901bf69df463 --- /dev/null +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/IsRollback.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.network.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * When true, reverts from Static to Dynamic allocation (undo reservation). + */ +public final class IsRollback extends ExpandableStringEnum { + /** + * Static value true for IsRollback. + */ + public static final IsRollback TRUE = fromString("true"); + + /** + * Static value false for IsRollback. + */ + public static final IsRollback FALSE = fromString("false"); + + /** + * Creates a new instance of IsRollback value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IsRollback() { + } + + /** + * Creates or finds a IsRollback from its string representation. + * + * @param name a name to look for. + * @return the corresponding IsRollback. + */ + public static IsRollback fromString(String name) { + return fromString(name, IsRollback.class); + } + + /** + * Gets known IsRollback values. + * + * @return known IsRollback values. + */ + public static Collection values() { + return values(IsRollback.class); + } +} diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/PrivateEndpointIpVersionType.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/PrivateEndpointIpVersionType.java new file mode 100644 index 000000000000..64e01c942f4e --- /dev/null +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/PrivateEndpointIpVersionType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.network.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the IP version type for the private IPs of the private endpoint. If not defined, this defaults to IPv4. + */ +public final class PrivateEndpointIpVersionType extends ExpandableStringEnum { + /** + * Static value IPv4 for PrivateEndpointIpVersionType. + */ + public static final PrivateEndpointIpVersionType IPV4 = fromString("IPv4"); + + /** + * Static value IPv6 for PrivateEndpointIpVersionType. + */ + public static final PrivateEndpointIpVersionType IPV6 = fromString("IPv6"); + + /** + * Static value DualStack for PrivateEndpointIpVersionType. + */ + public static final PrivateEndpointIpVersionType DUAL_STACK = fromString("DualStack"); + + /** + * Creates a new instance of PrivateEndpointIpVersionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateEndpointIpVersionType() { + } + + /** + * Creates or finds a PrivateEndpointIpVersionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrivateEndpointIpVersionType. + */ + public static PrivateEndpointIpVersionType fromString(String name) { + return fromString(name, PrivateEndpointIpVersionType.class); + } + + /** + * Gets known PrivateEndpointIpVersionType values. + * + * @return known PrivateEndpointIpVersionType values. + */ + public static Collection values() { + return values(PrivateEndpointIpVersionType.class); + } +} diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ReserveCloudServicePublicIpAddressRequest.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ReserveCloudServicePublicIpAddressRequest.java new file mode 100644 index 000000000000..15dfb499a798 --- /dev/null +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ReserveCloudServicePublicIpAddressRequest.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.network.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The request for ReserveCloudServicePublicIpAddressOperation. + */ +@Fluent +public final class ReserveCloudServicePublicIpAddressRequest + implements JsonSerializable { + /* + * When true, reverts from Static to Dynamic allocation (undo reservation). + */ + private IsRollback isRollback; + + /** + * Creates an instance of ReserveCloudServicePublicIpAddressRequest class. + */ + public ReserveCloudServicePublicIpAddressRequest() { + } + + /** + * Get the isRollback property: When true, reverts from Static to Dynamic allocation (undo reservation). + * + * @return the isRollback value. + */ + public IsRollback isRollback() { + return this.isRollback; + } + + /** + * Set the isRollback property: When true, reverts from Static to Dynamic allocation (undo reservation). + * + * @param isRollback the isRollback value to set. + * @return the ReserveCloudServicePublicIpAddressRequest object itself. + */ + public ReserveCloudServicePublicIpAddressRequest withIsRollback(IsRollback isRollback) { + this.isRollback = isRollback; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (isRollback() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property isRollback in model ReserveCloudServicePublicIpAddressRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ReserveCloudServicePublicIpAddressRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("isRollback", this.isRollback == null ? null : this.isRollback.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReserveCloudServicePublicIpAddressRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReserveCloudServicePublicIpAddressRequest if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ReserveCloudServicePublicIpAddressRequest. + */ + public static ReserveCloudServicePublicIpAddressRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReserveCloudServicePublicIpAddressRequest deserializedReserveCloudServicePublicIpAddressRequest + = new ReserveCloudServicePublicIpAddressRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isRollback".equals(fieldName)) { + deserializedReserveCloudServicePublicIpAddressRequest.isRollback + = IsRollback.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedReserveCloudServicePublicIpAddressRequest; + }); + } +} diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/SensitivityType.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/SensitivityType.java index 1542ac61400f..e87ee25910e5 100644 --- a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/SensitivityType.java +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/SensitivityType.java @@ -11,11 +11,6 @@ * Defines the sensitivity for the rule. */ public final class SensitivityType extends ExpandableStringEnum { - /** - * Static value None for SensitivityType. - */ - public static final SensitivityType NONE = fromString("None"); - /** * Static value Low for SensitivityType. */ diff --git a/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/TrafficDetectionRule.java b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/TrafficDetectionRule.java new file mode 100644 index 000000000000..162a124e3d47 --- /dev/null +++ b/sdk/network/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/TrafficDetectionRule.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.network.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Ddos Custom Policy traffic detection rule. + */ +@Fluent +public final class TrafficDetectionRule implements JsonSerializable { + /* + * The traffic type (one of Tcp, Udp, TcpSyn) that the detection rule will be applied upon. + */ + private DdosTrafficType trafficType; + + /* + * The customized packets per second threshold. + */ + private Integer packetsPerSecond; + + /** + * Creates an instance of TrafficDetectionRule class. + */ + public TrafficDetectionRule() { + } + + /** + * Get the trafficType property: The traffic type (one of Tcp, Udp, TcpSyn) that the detection rule will be applied + * upon. + * + * @return the trafficType value. + */ + public DdosTrafficType trafficType() { + return this.trafficType; + } + + /** + * Set the trafficType property: The traffic type (one of Tcp, Udp, TcpSyn) that the detection rule will be applied + * upon. + * + * @param trafficType the trafficType value to set. + * @return the TrafficDetectionRule object itself. + */ + public TrafficDetectionRule withTrafficType(DdosTrafficType trafficType) { + this.trafficType = trafficType; + return this; + } + + /** + * Get the packetsPerSecond property: The customized packets per second threshold. + * + * @return the packetsPerSecond value. + */ + public Integer packetsPerSecond() { + return this.packetsPerSecond; + } + + /** + * Set the packetsPerSecond property: The customized packets per second threshold. + * + * @param packetsPerSecond the packetsPerSecond value to set. + * @return the TrafficDetectionRule object itself. + */ + public TrafficDetectionRule withPacketsPerSecond(Integer packetsPerSecond) { + this.packetsPerSecond = packetsPerSecond; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("trafficType", this.trafficType == null ? null : this.trafficType.toString()); + jsonWriter.writeNumberField("packetsPerSecond", this.packetsPerSecond); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrafficDetectionRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrafficDetectionRule if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the TrafficDetectionRule. + */ + public static TrafficDetectionRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrafficDetectionRule deserializedTrafficDetectionRule = new TrafficDetectionRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("trafficType".equals(fieldName)) { + deserializedTrafficDetectionRule.trafficType = DdosTrafficType.fromString(reader.getString()); + } else if ("packetsPerSecond".equals(fieldName)) { + deserializedTrafficDetectionRule.packetsPerSecond = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedTrafficDetectionRule; + }); + } +} diff --git a/sdk/resourcemanager/api-specs.json b/sdk/resourcemanager/api-specs.json index 81cd232d3531..833033f96d01 100644 --- a/sdk/resourcemanager/api-specs.json +++ b/sdk/resourcemanager/api-specs.json @@ -174,7 +174,7 @@ "dir": "../network/azure-resourcemanager-network", "source": "specification/network/resource-manager/readme.md", "package": "com.azure.resourcemanager.network", - "args": "--tag=package-2025-01-01 --add-inner=ApplicationGatewayIpConfiguration,ApplicationGatewayPathRule,ApplicationGatewayProbe,ApplicationGatewayRedirectConfiguration,ApplicationGatewayRequestRoutingRule,ApplicationGatewaySslCertificate,ApplicationGatewayUrlPathMap,ApplicationGatewayAuthenticationCertificate,VirtualNetworkGatewayIpConfiguration,ConnectionMonitor,PacketCapture,ApplicationGateway,ApplicationGatewayListener --enable-sync-stack=false", + "args": "--tag=package-2025-03-01 --add-inner=ApplicationGatewayIpConfiguration,ApplicationGatewayPathRule,ApplicationGatewayProbe,ApplicationGatewayRedirectConfiguration,ApplicationGatewayRequestRoutingRule,ApplicationGatewaySslCertificate,ApplicationGatewayUrlPathMap,ApplicationGatewayAuthenticationCertificate,VirtualNetworkGatewayIpConfiguration,ConnectionMonitor,PacketCapture,ApplicationGateway,ApplicationGatewayListener --enable-sync-stack=false", "note": "Run DeprecateApplicationGatewaySku to deprecate v1 sku/tier in ApplicationGatewaySku." }, "network-hybrid": { diff --git a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md index eb859893c9d3..9697c6016574 100644 --- a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md @@ -18,7 +18,7 @@ #### Dependency Updates -- Updated `api-version` to `2025-01-01`. +- Updated `api-version` to `2025-03-01`. #### Features Added diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index 765fce727bc3..f15b4fec2906 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -107,7 +107,7 @@ com.azure.resourcemanager azure-resourcemanager-network - 2.56.0 + 2.57.0 com.azure.resourcemanager diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRuleCollectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRuleCollectionsCreateOrUpdateSamples.java index 967980672441..91adfa5b8d10 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRuleCollectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRuleCollectionsCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class AdminRuleCollectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerAdminRuleCollectionPut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRuleCollectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRuleCollectionsDeleteSamples.java index 3032faa756ac..76104b742949 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRuleCollectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRuleCollectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class AdminRuleCollectionsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerAdminRuleCollectionDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRuleCollectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRuleCollectionsGetSamples.java index c6c56fbd0fec..9ec94c05633b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRuleCollectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRuleCollectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class AdminRuleCollectionsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerAdminRuleCollectionGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRuleCollectionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRuleCollectionsListSamples.java index 57cb50a25bde..eebd84384d29 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRuleCollectionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRuleCollectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class AdminRuleCollectionsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerAdminRuleCollectionList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRulesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRulesCreateOrUpdateSamples.java index 625e553490e2..10654026af83 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRulesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRulesCreateOrUpdateSamples.java @@ -17,7 +17,7 @@ */ public final class AdminRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerAdminRulePut_NetworkGroupSource.json */ /** @@ -50,7 +50,7 @@ public final class AdminRulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerAdminRulePut. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRulePut. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRulesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRulesDeleteSamples.java index 0569a4aab5c5..e20c227ab37e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRulesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRulesDeleteSamples.java @@ -10,7 +10,7 @@ public final class AdminRulesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerAdminRuleDelete + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleDelete * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRulesGetSamples.java index 29ae6c626c37..5ee3962ad31c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRulesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRulesGetSamples.java @@ -9,7 +9,7 @@ */ public final class AdminRulesGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerDefaultAdminRuleGet.json */ /** @@ -28,7 +28,7 @@ public static void getsSecurityDefaultAdminRule(com.azure.resourcemanager.AzureR /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerAdminRuleGet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleGet. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRulesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRulesListSamples.java index 853b146ccc4e..1861b9481674 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRulesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AdminRulesListSamples.java @@ -10,7 +10,7 @@ public final class AdminRulesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerAdminRuleList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerAdminRuleList. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateEndpointConnectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateEndpointConnectionsDeleteSamples.java index 7710cebd769e..9bf0f2968c24 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateEndpointConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationGatewayPrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationGatewayPrivateEndpointConnectionDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateEndpointConnectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateEndpointConnectionsGetSamples.java index 38621dd32b64..da2831f49bfd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateEndpointConnectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateEndpointConnectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationGatewayPrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationGatewayPrivateEndpointConnectionGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateEndpointConnectionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateEndpointConnectionsListSamples.java index 1f1afc79b737..3c48b1b5f81a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateEndpointConnectionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateEndpointConnectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationGatewayPrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationGatewayPrivateEndpointConnectionList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateEndpointConnectionsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateEndpointConnectionsUpdateSamples.java index a02db5489d2b..7d9e93f61763 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateEndpointConnectionsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateEndpointConnectionsUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class ApplicationGatewayPrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationGatewayPrivateEndpointConnectionUpdate.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateLinkResourcesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateLinkResourcesListSamples.java index 8e2af08c3189..ec58a28fc3be 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateLinkResourcesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayPrivateLinkResourcesListSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationGatewayPrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationGatewayPrivateLinkResourceList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayWafDynamicManifestsDefaultGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayWafDynamicManifestsDefaultGetSamples.java index dc50aed5e0b2..5173594ad46f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayWafDynamicManifestsDefaultGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayWafDynamicManifestsDefaultGetSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationGatewayWafDynamicManifestsDefaultGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * GetApplicationGatewayWafDynamicManifestsDefault.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayWafDynamicManifestsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayWafDynamicManifestsGetSamples.java index 053ae191c1d5..fc216d855822 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayWafDynamicManifestsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewayWafDynamicManifestsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationGatewayWafDynamicManifestsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * GetApplicationGatewayWafDynamicManifests.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysBackendHealthOnDemandSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysBackendHealthOnDemandSamples.java index ad27a0793d08..4116d8058c74 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysBackendHealthOnDemandSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysBackendHealthOnDemandSamples.java @@ -13,7 +13,7 @@ */ public final class ApplicationGatewaysBackendHealthOnDemandSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationGatewayBackendHealthTest.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysBackendHealthSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysBackendHealthSamples.java index bf76bc2d62fe..2cab17030180 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysBackendHealthSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysBackendHealthSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationGatewaysBackendHealthSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationGatewayBackendHealthGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysCreateOrUpdateSamples.java index 2e78ab71eaa6..02373d932f44 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysCreateOrUpdateSamples.java @@ -14,6 +14,7 @@ import com.azure.resourcemanager.network.models.ApplicationGatewayBackendHttpSettings; import com.azure.resourcemanager.network.models.ApplicationGatewayClientAuthConfiguration; import com.azure.resourcemanager.network.models.ApplicationGatewayCookieBasedAffinity; +import com.azure.resourcemanager.network.models.ApplicationGatewayEntraJwtValidationConfig; import com.azure.resourcemanager.network.models.ApplicationGatewayFrontendIpConfiguration; import com.azure.resourcemanager.network.models.ApplicationGatewayFrontendPort; import com.azure.resourcemanager.network.models.ApplicationGatewayGlobalConfiguration; @@ -35,6 +36,7 @@ import com.azure.resourcemanager.network.models.ApplicationGatewayTier; import com.azure.resourcemanager.network.models.ApplicationGatewayTrustedClientCertificate; import com.azure.resourcemanager.network.models.ApplicationGatewayTrustedRootCertificate; +import com.azure.resourcemanager.network.models.ApplicationGatewayUnAuthorizedRequestAction; import com.azure.resourcemanager.network.models.ApplicationGatewayUrlConfiguration; import com.azure.resourcemanager.network.models.ManagedServiceIdentity; import com.azure.resourcemanager.network.models.ManagedServiceIdentityUserAssignedIdentities; @@ -49,7 +51,7 @@ public final class ApplicationGatewaysCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ApplicationGatewayCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayCreate.json */ /** * Sample code: Create Application Gateway. @@ -147,7 +149,9 @@ public static void createApplicationGateway(com.azure.resourcemanager.AzureResou .withHttpListener(new SubResource().withId( "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/httpListeners/appgwhl")) .withRewriteRuleSet(new SubResource().withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/rewriteRuleSets/rewriteRuleSet1")))) + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/rewriteRuleSets/rewriteRuleSet1")) + .withEntraJwtValidationConfig(new SubResource().withId( + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/entraJWTValidationConfigs/entraJWTValidationConfig1")))) .withRewriteRuleSets( Arrays .asList(new ApplicationGatewayRewriteRuleSet().withName("rewriteRuleSet1") @@ -169,6 +173,11 @@ public static void createApplicationGateway(com.azure.resourcemanager.AzureResou .withHeaderValue("max-age=31536000"))) .withUrlConfiguration( new ApplicationGatewayUrlConfiguration().withModifiedPath("/abc"))))))) + .withEntraJwtValidationConfigs( + Arrays.asList(new ApplicationGatewayEntraJwtValidationConfig().withName("entraJWTValidationConfig1") + .withUnAuthorizedRequestAction(ApplicationGatewayUnAuthorizedRequestAction.DENY) + .withTenantId("70a036f6-8e4d-4615-bad6-149c02e7720d") + .withClientId("37293f5a-97b3-451d-b786-f532d711c9ff"))) .withGlobalConfiguration(new ApplicationGatewayGlobalConfiguration().withEnableRequestBuffering(true) .withEnableResponseBuffering(true)), com.azure.core.util.Context.NONE); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysDeleteSamples.java index 83e1867ceb3c..0c49f9f73412 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysDeleteSamples.java @@ -10,7 +10,7 @@ public final class ApplicationGatewaysDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ApplicationGatewayDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayDelete.json */ /** * Sample code: Delete ApplicationGateway. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysGetByResourceGroupSamples.java index 91e959e712a3..d080fccd4497 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ApplicationGatewaysGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ApplicationGatewayGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayGet.json */ /** * Sample code: Get ApplicationGateway. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysGetSslPredefinedPolicySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysGetSslPredefinedPolicySamples.java index 1090a3be6ca2..013130466448 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysGetSslPredefinedPolicySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysGetSslPredefinedPolicySamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationGatewaysGetSslPredefinedPolicySamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableRequestHeadersSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableRequestHeadersSamples.java index c8c165fecc76..94fa914cfc21 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableRequestHeadersSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableRequestHeadersSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationGatewaysListAvailableRequestHeadersSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationGatewayAvailableRequestHeadersGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableResponseHeadersSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableResponseHeadersSamples.java index c6d279e3e81e..238f82e0b92e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableResponseHeadersSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableResponseHeadersSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationGatewaysListAvailableResponseHeadersSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationGatewayAvailableResponseHeadersGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableServerVariablesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableServerVariablesSamples.java index 073d82cbeb50..33b522a67e78 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableServerVariablesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableServerVariablesSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationGatewaysListAvailableServerVariablesSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationGatewayAvailableServerVariablesGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableSslOptionsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableSslOptionsSamples.java index f470fcf0310a..0caf87f33237 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableSslOptionsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableSslOptionsSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationGatewaysListAvailableSslOptionsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationGatewayAvailableSslOptionsGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableSslPredefinedPoliciesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableSslPredefinedPoliciesSamples.java index 93c14cfc1621..b5008c049cf3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableSslPredefinedPoliciesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableSslPredefinedPoliciesSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationGatewaysListAvailableSslPredefinedPoliciesSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableWafRuleSetsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableWafRuleSetsSamples.java index e42da9aa3f91..86b87e44842a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableWafRuleSetsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListAvailableWafRuleSetsSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationGatewaysListAvailableWafRuleSetsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationGatewayAvailableWafRuleSetsGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListByResourceGroupSamples.java index 7ceb80002fb9..771b6f611c87 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ApplicationGatewaysListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ApplicationGatewayList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayList.json */ /** * Sample code: Lists all application gateways in a resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListSamples.java index 4fa87e5d41e5..88317fce65b5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysListSamples.java @@ -10,7 +10,7 @@ public final class ApplicationGatewaysListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ApplicationGatewayListAll. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayListAll. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysStartSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysStartSamples.java index 9536d97eb658..1ac691f86fe3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysStartSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysStartSamples.java @@ -10,7 +10,7 @@ public final class ApplicationGatewaysStartSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ApplicationGatewayStart.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayStart.json */ /** * Sample code: Start Application Gateway. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysStopSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysStopSamples.java index 01c6d64255a1..5b60d6ce3e73 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysStopSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysStopSamples.java @@ -10,7 +10,7 @@ public final class ApplicationGatewaysStopSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ApplicationGatewayStop.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayStop.json */ /** * Sample code: Stop Application Gateway. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysUpdateTagsSamples.java index 96dada9a7df5..46e50175c19f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationGatewaysUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class ApplicationGatewaysUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ApplicationGatewayUpdateTags. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationGatewayUpdateTags. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsCreateOrUpdateSamples.java index c54f954c48a4..d8e8777eb025 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class ApplicationSecurityGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationSecurityGroupCreate.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsDeleteSamples.java index ec75fe420435..9a30f507fb17 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationSecurityGroupsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationSecurityGroupDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsGetByResourceGroupSamples.java index 7d113bc9f7c9..83795513a063 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ApplicationSecurityGroupsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ApplicationSecurityGroupGet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupGet. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsListByResourceGroupSamples.java index 38123354c52b..4823c9f25b11 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ApplicationSecurityGroupsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ApplicationSecurityGroupList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ApplicationSecurityGroupList. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsListSamples.java index c0accb610ddb..c918871adcc7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsListSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationSecurityGroupsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationSecurityGroupListAll.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsUpdateTagsSamples.java index ba4ff4d425a4..bc65c90d1ebb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ApplicationSecurityGroupsUpdateTagsSamples.java @@ -13,7 +13,7 @@ */ public final class ApplicationSecurityGroupsUpdateTagsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ApplicationSecurityGroupUpdateTags.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableDelegationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableDelegationsListSamples.java index d3d789d06383..2f0df2b75dc1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableDelegationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableDelegationsListSamples.java @@ -9,7 +9,7 @@ */ public final class AvailableDelegationsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AvailableDelegationsSubscriptionGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableEndpointServicesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableEndpointServicesListSamples.java index 5a6f6ebe41e8..d988e44b637a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableEndpointServicesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableEndpointServicesListSamples.java @@ -10,7 +10,7 @@ public final class AvailableEndpointServicesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/EndpointServicesList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/EndpointServicesList.json */ /** * Sample code: EndpointServicesList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailablePrivateEndpointTypesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailablePrivateEndpointTypesListByResourceGroupSamples.java index 675217ca56ab..f4a26c021552 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailablePrivateEndpointTypesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailablePrivateEndpointTypesListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class AvailablePrivateEndpointTypesListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AvailablePrivateEndpointTypesResourceGroupGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailablePrivateEndpointTypesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailablePrivateEndpointTypesListSamples.java index 48e281e6901f..cee4715f0a6b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailablePrivateEndpointTypesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailablePrivateEndpointTypesListSamples.java @@ -9,7 +9,7 @@ */ public final class AvailablePrivateEndpointTypesListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AvailablePrivateEndpointTypesGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableResourceGroupDelegationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableResourceGroupDelegationsListSamples.java index 3935607c98fb..2ad9e4e0bbde 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableResourceGroupDelegationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableResourceGroupDelegationsListSamples.java @@ -9,7 +9,7 @@ */ public final class AvailableResourceGroupDelegationsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AvailableDelegationsResourceGroupGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableServiceAliasesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableServiceAliasesListByResourceGroupSamples.java index 9a239b0dd9ac..23321a73baf1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableServiceAliasesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableServiceAliasesListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class AvailableServiceAliasesListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AvailableServiceAliasesListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableServiceAliasesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableServiceAliasesListSamples.java index f8b5729e42d2..4029219d490f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableServiceAliasesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AvailableServiceAliasesListSamples.java @@ -10,7 +10,7 @@ public final class AvailableServiceAliasesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/AvailableServiceAliasesList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AvailableServiceAliasesList. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallFqdnTagsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallFqdnTagsListSamples.java index 024c22473744..45c187f92135 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallFqdnTagsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallFqdnTagsListSamples.java @@ -9,7 +9,7 @@ */ public final class AzureFirewallFqdnTagsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AzureFirewallFqdnTagsListBySubscription.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsCreateOrUpdateSamples.java index 476c3c3b1b1d..81bee69db524 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsCreateOrUpdateSamples.java @@ -36,7 +36,7 @@ public final class AzureFirewallsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/AzureFirewallPutWithIpGroups. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPutWithIpGroups. * json */ /** @@ -121,7 +121,7 @@ public static void createAzureFirewallWithIpGroups(com.azure.resourcemanager.Azu /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/AzureFirewallPutWithZones. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPutWithZones. * json */ /** @@ -206,7 +206,7 @@ public static void createAzureFirewallWithZones(com.azure.resourcemanager.AzureR /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/AzureFirewallPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPut.json */ /** * Sample code: Create Azure Firewall. @@ -289,7 +289,7 @@ public static void createAzureFirewall(com.azure.resourcemanager.AzureResourceMa } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AzureFirewallPutWithAdditionalProperties.json */ /** @@ -376,7 +376,7 @@ public static void createAzureFirewall(com.azure.resourcemanager.AzureResourceMa /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/AzureFirewallPutInHub.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPutInHub.json */ /** * Sample code: Create Azure Firewall in virtual Hub. @@ -405,7 +405,7 @@ public static void createAzureFirewallInVirtualHub(com.azure.resourcemanager.Azu } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AzureFirewallPutWithMgmtSubnet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsDeleteSamples.java index a0c78c7c8035..8002fd11af5e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsDeleteSamples.java @@ -10,7 +10,7 @@ public final class AzureFirewallsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/AzureFirewallDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallDelete.json */ /** * Sample code: Delete Azure Firewall. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsGetByResourceGroupSamples.java index 192267927370..e2524835a0b1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class AzureFirewallsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AzureFirewallGetWithAdditionalProperties.json */ /** @@ -27,7 +27,7 @@ public static void getAzureFirewallWithAdditionalProperties(com.azure.resourcema /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/AzureFirewallGetWithIpGroups. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallGetWithIpGroups. * json */ /** @@ -45,7 +45,7 @@ public static void getAzureFirewallWithIpGroups(com.azure.resourcemanager.AzureR /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/AzureFirewallGetWithZones. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallGetWithZones. * json */ /** @@ -62,7 +62,7 @@ public static void getAzureFirewallWithZones(com.azure.resourcemanager.AzureReso } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AzureFirewallGetWithMgmtSubnet.json */ /** @@ -80,7 +80,7 @@ public static void getAzureFirewallWithManagementSubnet(com.azure.resourcemanage /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/AzureFirewallGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallGet.json */ /** * Sample code: Get Azure Firewall. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsListByResourceGroupSamples.java index 1f7b134d8711..59a50418e674 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class AzureFirewallsListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AzureFirewallListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsListLearnedPrefixesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsListLearnedPrefixesSamples.java index d854fc706b7f..4402881565c4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsListLearnedPrefixesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsListLearnedPrefixesSamples.java @@ -9,7 +9,7 @@ */ public final class AzureFirewallsListLearnedPrefixesSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AzureFirewallListLearnedIPPrefixes.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsListSamples.java index 989f54d3b798..1cd3498a5b2b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsListSamples.java @@ -9,7 +9,7 @@ */ public final class AzureFirewallsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AzureFirewallListBySubscription.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsPacketCaptureOperationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsPacketCaptureOperationSamples.java index fe4b4ca1bd99..5f753d919160 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsPacketCaptureOperationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsPacketCaptureOperationSamples.java @@ -17,7 +17,7 @@ */ public final class AzureFirewallsPacketCaptureOperationSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AzureFirewallPacketCaptureOperation.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsPacketCaptureSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsPacketCaptureSamples.java index 9abf6cb858d4..57b86d23340a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsPacketCaptureSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsPacketCaptureSamples.java @@ -17,7 +17,7 @@ public final class AzureFirewallsPacketCaptureSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/AzureFirewallPacketCapture. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallPacketCapture. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsUpdateTagsSamples.java index 15e73a82e03c..558bd9fde3dc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/AzureFirewallsUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class AzureFirewallsUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/AzureFirewallUpdateTags.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureFirewallUpdateTags.json */ /** * Sample code: Update Azure Firewall Tags. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsCreateOrUpdateSamples.java index 29663f459f95..8e90dab6244e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsCreateOrUpdateSamples.java @@ -17,7 +17,7 @@ public final class BastionHostsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/BastionHostPutWithPrivateOnly + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostPutWithPrivateOnly * .json */ /** @@ -40,7 +40,7 @@ public static void createBastionHostWithPrivateOnly(com.azure.resourcemanager.Az /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/BastionHostDeveloperPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostDeveloperPut.json */ /** * Sample code: Create Developer Bastion Host. @@ -63,7 +63,7 @@ public static void createDeveloperBastionHost(com.azure.resourcemanager.AzureRes /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/BastionHostPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostPut.json */ /** * Sample code: Create Bastion Host. @@ -87,7 +87,7 @@ public static void createBastionHost(com.azure.resourcemanager.AzureResourceMana /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/BastionHostPutWithZones.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostPutWithZones.json */ /** * Sample code: Create Bastion Host With Zones. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsDeleteSamples.java index ef433a682e0a..4d0b75225350 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsDeleteSamples.java @@ -10,7 +10,7 @@ public final class BastionHostsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/BastionHostDeveloperDelete. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostDeveloperDelete. * json */ /** @@ -28,7 +28,7 @@ public static void deleteDeveloperBastionHost(com.azure.resourcemanager.AzureRes /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/BastionHostDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostDelete.json */ /** * Sample code: Delete Bastion Host. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsGetByResourceGroupSamples.java index ce2a54285c58..7390c377077c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class BastionHostsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/BastionHostDeveloperGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostDeveloperGet.json */ /** * Sample code: Get Developer Bastion Host. @@ -27,7 +27,7 @@ public static void getDeveloperBastionHost(com.azure.resourcemanager.AzureResour /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/BastionHostGetWithZones.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostGetWithZones.json */ /** * Sample code: Get Bastion Host With Zones. @@ -44,7 +44,7 @@ public static void getBastionHostWithZones(com.azure.resourcemanager.AzureResour /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/BastionHostGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostGet.json */ /** * Sample code: Get Bastion Host. @@ -61,7 +61,7 @@ public static void getBastionHost(com.azure.resourcemanager.AzureResourceManager /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/BastionHostGetWithPrivateOnly + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostGetWithPrivateOnly * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsListByResourceGroupSamples.java index 8bcb28a95977..bdb259910dec 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class BastionHostsListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * BastionHostListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsListSamples.java index 4c1bbef6996d..f5cebb88af0a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsListSamples.java @@ -10,7 +10,7 @@ public final class BastionHostsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/BastionHostListBySubscription + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostListBySubscription * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsUpdateTagsSamples.java index 21b36fb9772b..8431df29944c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BastionHostsUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class BastionHostsUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/BastionHostPatch.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/BastionHostPatch.json */ /** * Sample code: Patch Bastion Host. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BgpServiceCommunitiesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BgpServiceCommunitiesListSamples.java index 06975f733216..5745829f8d9c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BgpServiceCommunitiesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/BgpServiceCommunitiesListSamples.java @@ -10,7 +10,7 @@ public final class BgpServiceCommunitiesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ServiceCommunityList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceCommunityList.json */ /** * Sample code: ServiceCommunityList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConfigurationPolicyGroupsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConfigurationPolicyGroupsCreateOrUpdateSamples.java index 0e6a28f09a0e..cf6cb7c17e82 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConfigurationPolicyGroupsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConfigurationPolicyGroupsCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ public final class ConfigurationPolicyGroupsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ConfigurationPolicyGroupPut. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupPut. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConfigurationPolicyGroupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConfigurationPolicyGroupsDeleteSamples.java index e8c6bb2e6564..2520eeb00f29 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConfigurationPolicyGroupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConfigurationPolicyGroupsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ConfigurationPolicyGroupsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ConfigurationPolicyGroupDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConfigurationPolicyGroupsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConfigurationPolicyGroupsGetSamples.java index df4a79530c6c..981ff278ab72 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConfigurationPolicyGroupsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConfigurationPolicyGroupsGetSamples.java @@ -10,7 +10,7 @@ public final class ConfigurationPolicyGroupsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ConfigurationPolicyGroupGet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ConfigurationPolicyGroupGet. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConfigurationPolicyGroupsListByVpnServerConfigurationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConfigurationPolicyGroupsListByVpnServerConfigurationSamples.java index d1903a75166b..10d216d7cb3e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConfigurationPolicyGroupsListByVpnServerConfigurationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConfigurationPolicyGroupsListByVpnServerConfigurationSamples.java @@ -9,7 +9,7 @@ */ public final class ConfigurationPolicyGroupsListByVpnServerConfigurationSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ConfigurationPolicyGroupListByVpnServerConfiguration.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsCreateOrUpdateSamples.java index 51a1610922d8..decf91195a1a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsCreateOrUpdateSamples.java @@ -25,7 +25,7 @@ */ public final class ConnectionMonitorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherConnectionMonitorCreate.json */ /** @@ -56,7 +56,7 @@ public static void createConnectionMonitorV1(com.azure.resourcemanager.AzureReso } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherConnectionMonitorCreateWithArcNetwork.json */ /** @@ -100,7 +100,7 @@ public static void createConnectionMonitorWithArcNetwork(com.azure.resourcemanag } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherConnectionMonitorV2Create.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsDeleteSamples.java index 0ad312730dd8..1d513e5b59d8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectionMonitorsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherConnectionMonitorDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsGetSamples.java index 42d1625cb104..c3ef9b5fafc9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectionMonitorsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherConnectionMonitorGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsListSamples.java index 6de242baae85..15eca2678d53 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsListSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectionMonitorsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherConnectionMonitorList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsStopSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsStopSamples.java index 9a90679bc758..1e3af73fa7fd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsStopSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsStopSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectionMonitorsStopSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherConnectionMonitorStop.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsUpdateTagsSamples.java index 7958afb214c2..59de9c4e0b6f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectionMonitorsUpdateTagsSamples.java @@ -13,7 +13,7 @@ */ public final class ConnectionMonitorsUpdateTagsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherConnectionMonitorUpdateTags.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectivityConfigurationsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectivityConfigurationsCreateOrUpdateSamples.java index aa18b0d1065d..eac63930b89d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectivityConfigurationsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectivityConfigurationsCreateOrUpdateSamples.java @@ -23,7 +23,7 @@ */ public final class ConnectivityConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerConnectivityConfigurationPut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectivityConfigurationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectivityConfigurationsDeleteSamples.java index f0cc82122d34..86dddd196a9f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectivityConfigurationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectivityConfigurationsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectivityConfigurationsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerConnectivityConfigurationDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectivityConfigurationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectivityConfigurationsGetSamples.java index 60ea6d9086e3..bea0cf2f66ca 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectivityConfigurationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectivityConfigurationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectivityConfigurationsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerConnectivityConfigurationGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectivityConfigurationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectivityConfigurationsListSamples.java index 85418b2d9bef..8821ce2f593c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectivityConfigurationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ConnectivityConfigurationsListSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectivityConfigurationsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerConnectivityConfigurationList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesCreateOrUpdateSamples.java index dd5ea76e63b0..562bf7e22612 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class CustomIpPrefixesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * CustomIpPrefixCreateCustomizedValues.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesDeleteSamples.java index 24ad581a60c7..09be5a091904 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesDeleteSamples.java @@ -10,7 +10,7 @@ public final class CustomIpPrefixesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/CustomIpPrefixDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixDelete.json */ /** * Sample code: Delete custom IP prefix. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesGetByResourceGroupSamples.java index a9c0e3d6491d..977911f92eea 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class CustomIpPrefixesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/CustomIpPrefixGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixGet.json */ /** * Sample code: Get custom IP prefix. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesListByResourceGroupSamples.java index 4954139a5eda..974e33f052fb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class CustomIpPrefixesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/CustomIpPrefixList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixList.json */ /** * Sample code: List resource group Custom IP prefixes. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesListSamples.java index 11ab60908e71..3748975439a1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesListSamples.java @@ -10,7 +10,7 @@ public final class CustomIpPrefixesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/CustomIpPrefixListAll.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixListAll.json */ /** * Sample code: List all custom IP prefixes. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesUpdateTagsSamples.java index 3f8605ef5504..a6ffa0ab941e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/CustomIpPrefixesUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class CustomIpPrefixesUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/CustomIpPrefixUpdateTags.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CustomIpPrefixUpdateTags.json */ /** * Sample code: Update public IP address tags. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosCustomPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosCustomPoliciesCreateOrUpdateSamples.java index e620f4653a44..81c440ccfbc9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosCustomPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosCustomPoliciesCreateOrUpdateSamples.java @@ -5,6 +5,11 @@ package com.azure.resourcemanager.network.generated; import com.azure.resourcemanager.network.fluent.models.DdosCustomPolicyInner; +import com.azure.resourcemanager.network.models.DdosDetectionMode; +import com.azure.resourcemanager.network.models.DdosDetectionRule; +import com.azure.resourcemanager.network.models.DdosTrafficType; +import com.azure.resourcemanager.network.models.TrafficDetectionRule; +import java.util.Arrays; /** * Samples for DdosCustomPolicies CreateOrUpdate. @@ -12,7 +17,7 @@ public final class DdosCustomPoliciesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/DdosCustomPolicyCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyCreate.json */ /** * Sample code: Create DDoS custom policy. @@ -24,7 +29,12 @@ public static void createDDoSCustomPolicy(com.azure.resourcemanager.AzureResourc .manager() .serviceClient() .getDdosCustomPolicies() - .createOrUpdate("rg1", "test-ddos-custom-policy", new DdosCustomPolicyInner().withLocation("centraluseuap"), + .createOrUpdate("rg1", "test-ddos-custom-policy", + new DdosCustomPolicyInner().withLocation("centraluseuap") + .withDetectionRules(Arrays.asList(new DdosDetectionRule().withName("detectionRuleTcp") + .withDetectionMode(DdosDetectionMode.TRAFFIC_THRESHOLD) + .withTrafficDetectionRule(new TrafficDetectionRule().withTrafficType(DdosTrafficType.TCP) + .withPacketsPerSecond(1000000)))), com.azure.core.util.Context.NONE); } } diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosCustomPoliciesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosCustomPoliciesDeleteSamples.java index 3fdceb348f76..d2a84cf81924 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosCustomPoliciesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosCustomPoliciesDeleteSamples.java @@ -10,7 +10,7 @@ public final class DdosCustomPoliciesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/DdosCustomPolicyDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyDelete.json */ /** * Sample code: Delete DDoS custom policy. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosCustomPoliciesGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosCustomPoliciesGetByResourceGroupSamples.java index 72c4ce2cec2e..96d46cbefea4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosCustomPoliciesGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosCustomPoliciesGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class DdosCustomPoliciesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/DdosCustomPolicyGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyGet.json */ /** * Sample code: Get DDoS custom policy. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosCustomPoliciesUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosCustomPoliciesUpdateTagsSamples.java index 160689197247..16f1d0e297d2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosCustomPoliciesUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosCustomPoliciesUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class DdosCustomPoliciesUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/DdosCustomPolicyUpdateTags. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyUpdateTags. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansCreateOrUpdateSamples.java index 1125cb65609a..b70fbe3fd3bc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ public final class DdosProtectionPlansCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/DdosProtectionPlanCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanCreate.json */ /** * Sample code: Create DDoS protection plan. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansDeleteSamples.java index 1f6ac3afdc3b..a3ef19d19785 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansDeleteSamples.java @@ -10,7 +10,7 @@ public final class DdosProtectionPlansDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/DdosProtectionPlanDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanDelete.json */ /** * Sample code: Delete DDoS protection plan. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansGetByResourceGroupSamples.java index 081034017359..12e083732aeb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class DdosProtectionPlansGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/DdosProtectionPlanGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanGet.json */ /** * Sample code: Get DDoS protection plan. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansListByResourceGroupSamples.java index d6b491e4bff6..e6a4b33cd129 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class DdosProtectionPlansListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/DdosProtectionPlanList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanList.json */ /** * Sample code: List DDoS protection plans in resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansListSamples.java index fa96dabd9d8d..6e7c79fe8f8d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansListSamples.java @@ -10,7 +10,7 @@ public final class DdosProtectionPlansListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/DdosProtectionPlanListAll. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanListAll. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansUpdateTagsSamples.java index 5c1187ed7a72..64292da52447 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DdosProtectionPlansUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class DdosProtectionPlansUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/DdosProtectionPlanUpdateTags. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosProtectionPlanUpdateTags. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DefaultSecurityRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DefaultSecurityRulesGetSamples.java index 569e612e536c..122afc574428 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DefaultSecurityRulesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DefaultSecurityRulesGetSamples.java @@ -10,7 +10,7 @@ public final class DefaultSecurityRulesGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/DefaultSecurityRuleGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DefaultSecurityRuleGet.json */ /** * Sample code: DefaultSecurityRuleGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DefaultSecurityRulesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DefaultSecurityRulesListSamples.java index 131cb107004d..796282934863 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DefaultSecurityRulesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DefaultSecurityRulesListSamples.java @@ -10,7 +10,7 @@ public final class DefaultSecurityRulesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/DefaultSecurityRuleList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DefaultSecurityRuleList.json */ /** * Sample code: DefaultSecurityRuleList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationCreateOrUpdateSamples.java index 130a7332cb09..daa972dfc25d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationCreateOrUpdateSamples.java @@ -17,7 +17,7 @@ public final class DscpConfigurationCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/DscpConfigurationCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationCreate.json */ /** * Sample code: Create DSCP Configuration. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationDeleteSamples.java index 3aea4202d354..1b27c8953329 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationDeleteSamples.java @@ -10,7 +10,7 @@ public final class DscpConfigurationDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/DscpConfigurationDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationDelete.json */ /** * Sample code: Delete DSCP Configuration. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationGetByResourceGroupSamples.java index 50b4b55af426..600e036b26ee 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class DscpConfigurationGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/DscpConfigurationGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationGet.json */ /** * Sample code: Get Dscp Configuration. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationListByResourceGroupSamples.java index 3d59db5f506f..3466dd3a5dc7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class DscpConfigurationListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/DscpConfigurationList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationList.json */ /** * Sample code: Get Dscp Configuration. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationListSamples.java index d869feb76ad4..6007127634c6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/DscpConfigurationListSamples.java @@ -10,7 +10,7 @@ public final class DscpConfigurationListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/DscpConfigurationListAll.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DscpConfigurationListAll.json */ /** * Sample code: List all network interfaces. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitAuthorizationsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitAuthorizationsCreateOrUpdateSamples.java index f3a6f6eaa48a..672fd6e5a9ef 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitAuthorizationsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitAuthorizationsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class ExpressRouteCircuitAuthorizationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitAuthorizationCreate.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitAuthorizationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitAuthorizationsDeleteSamples.java index d62d9733ef12..fba8353e335e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitAuthorizationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitAuthorizationsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCircuitAuthorizationsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitAuthorizationDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitAuthorizationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitAuthorizationsGetSamples.java index 0c438ddee6b0..fabc1e637099 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitAuthorizationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitAuthorizationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCircuitAuthorizationsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitAuthorizationGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitAuthorizationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitAuthorizationsListSamples.java index b675d2a5088b..1c5b062234d1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitAuthorizationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitAuthorizationsListSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCircuitAuthorizationsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitAuthorizationList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitConnectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitConnectionsCreateOrUpdateSamples.java index 221080fb3726..1aa0a85bba1e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitConnectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitConnectionsCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ExpressRouteCircuitConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitConnectionCreate.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitConnectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitConnectionsDeleteSamples.java index e237879430d9..e5feedeb6a0b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitConnectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCircuitConnectionsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitConnectionDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitConnectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitConnectionsGetSamples.java index f7130f6d683b..7b3a0399092f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitConnectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitConnectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCircuitConnectionsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitConnectionGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitConnectionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitConnectionsListSamples.java index 52b19b870ea2..de7c11d13706 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitConnectionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitConnectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCircuitConnectionsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitConnectionList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitPeeringsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitPeeringsCreateOrUpdateSamples.java index cfe6c71399ed..17f5503d2732 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitPeeringsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitPeeringsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class ExpressRouteCircuitPeeringsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitPeeringCreate.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitPeeringsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitPeeringsDeleteSamples.java index 6486d5554ee8..1e0a925d37e2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitPeeringsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitPeeringsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCircuitPeeringsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitPeeringDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitPeeringsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitPeeringsGetSamples.java index 33837c1911f3..d2463772f150 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitPeeringsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitPeeringsGetSamples.java @@ -10,7 +10,7 @@ public final class ExpressRouteCircuitPeeringsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRouteCircuitPeeringGet + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitPeeringGet * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitPeeringsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitPeeringsListSamples.java index 66e82014a047..ea2ee319ae51 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitPeeringsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitPeeringsListSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCircuitPeeringsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitPeeringList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsCreateOrUpdateSamples.java index ee4c1a3f4c79..dc2c49ce703d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsCreateOrUpdateSamples.java @@ -18,7 +18,7 @@ public final class ExpressRouteCircuitsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRouteCircuitCreate. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitCreate. * json */ /** @@ -47,7 +47,7 @@ public static void createExpressRouteCircuit(com.azure.resourcemanager.AzureReso } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitCreateOnExpressRoutePort.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsDeleteSamples.java index e02432ff59bc..9604c9473c2c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsDeleteSamples.java @@ -10,7 +10,7 @@ public final class ExpressRouteCircuitsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRouteCircuitDelete. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitDelete. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsGetByResourceGroupSamples.java index 4005e3242a4a..41825eee63cf 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ExpressRouteCircuitsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRouteCircuitGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitGet.json */ /** * Sample code: Get ExpressRouteCircuit. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsGetPeeringStatsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsGetPeeringStatsSamples.java index 41ee630dc7c6..6c1d51148f21 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsGetPeeringStatsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsGetPeeringStatsSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCircuitsGetPeeringStatsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitPeeringStats.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsGetStatsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsGetStatsSamples.java index 1ffca3a8c29a..3181c7fe823e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsGetStatsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsGetStatsSamples.java @@ -10,7 +10,7 @@ public final class ExpressRouteCircuitsGetStatsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRouteCircuitStats.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitStats.json */ /** * Sample code: Get ExpressRoute Circuit Traffic Stats. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListArpTableSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListArpTableSamples.java index 7c37212f4a20..989a5dfcf464 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListArpTableSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListArpTableSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCircuitsListArpTableSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitARPTableList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListByResourceGroupSamples.java index 95dbbaa41fa1..e4cce43519b7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCircuitsListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListRoutesTableSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListRoutesTableSamples.java index 6ac47ba6402b..0bc66085cb9f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListRoutesTableSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListRoutesTableSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCircuitsListRoutesTableSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitRouteTableList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListRoutesTableSummarySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListRoutesTableSummarySamples.java index 9babfdaa2ed4..5bbea6064f57 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListRoutesTableSummarySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListRoutesTableSummarySamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCircuitsListRoutesTableSummarySamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitRouteTableSummaryList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListSamples.java index a1da90ded31d..59de18f354b5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsListSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCircuitsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCircuitListBySubscription.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsUpdateTagsSamples.java index 914f0087c2bc..5120ab12bb08 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCircuitsUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class ExpressRouteCircuitsUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRouteCircuitUpdateTags + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteCircuitUpdateTags * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteConnectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteConnectionsCreateOrUpdateSamples.java index 7430685605a6..d96f965484b2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteConnectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteConnectionsCreateOrUpdateSamples.java @@ -17,7 +17,7 @@ public final class ExpressRouteConnectionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRouteConnectionCreate. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionCreate. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteConnectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteConnectionsDeleteSamples.java index 268c317bca5c..4101ebb80231 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteConnectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteConnectionsDeleteSamples.java @@ -10,7 +10,7 @@ public final class ExpressRouteConnectionsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRouteConnectionDelete. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionDelete. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteConnectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteConnectionsGetSamples.java index 792266506163..ec268e3a3b82 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteConnectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteConnectionsGetSamples.java @@ -10,7 +10,7 @@ public final class ExpressRouteConnectionsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRouteConnectionGet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionGet. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteConnectionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteConnectionsListSamples.java index 3b064ae592e7..66f5282fa24d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteConnectionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteConnectionsListSamples.java @@ -10,7 +10,7 @@ public final class ExpressRouteConnectionsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRouteConnectionList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteConnectionList. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionPeeringsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionPeeringsCreateOrUpdateSamples.java index 518db96dac31..cbcb19ca0f25 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionPeeringsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionPeeringsCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class ExpressRouteCrossConnectionPeeringsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCrossConnectionBgpPeeringCreate.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionPeeringsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionPeeringsDeleteSamples.java index ac5c63da0064..1a8ff146a6b9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionPeeringsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionPeeringsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCrossConnectionPeeringsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCrossConnectionBgpPeeringDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionPeeringsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionPeeringsGetSamples.java index 20f1385cfd39..d09b5697bfb1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionPeeringsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionPeeringsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCrossConnectionPeeringsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCrossConnectionBgpPeeringGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionPeeringsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionPeeringsListSamples.java index fe859363aac2..250010a57df6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionPeeringsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionPeeringsListSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCrossConnectionPeeringsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCrossConnectionBgpPeeringList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsCreateOrUpdateSamples.java index b1f62e18bf5f..7e0353ce1ec5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class ExpressRouteCrossConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCrossConnectionUpdate.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsGetByResourceGroupSamples.java index eeaf75889ef1..752e6c8cdf9d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCrossConnectionsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCrossConnectionGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListArpTableSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListArpTableSamples.java index eb6e263738ff..986eb3eafe57 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListArpTableSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListArpTableSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCrossConnectionsListArpTableSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCrossConnectionsArpTable.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListByResourceGroupSamples.java index e751427bff28..b231636ad2fb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCrossConnectionsListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCrossConnectionListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListRoutesTableSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListRoutesTableSamples.java index c9901ce03d72..41fb57a37c27 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListRoutesTableSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListRoutesTableSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCrossConnectionsListRoutesTableSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCrossConnectionsRouteTable.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListRoutesTableSummarySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListRoutesTableSummarySamples.java index 70df0a2a3aa2..0c8a96eb2336 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListRoutesTableSummarySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListRoutesTableSummarySamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCrossConnectionsListRoutesTableSummarySamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCrossConnectionsRouteTableSummary.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListSamples.java index 1b50d24dea2c..091408428547 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteCrossConnectionsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCrossConnectionList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsUpdateTagsSamples.java index 7d9d20ccf3d9..1c4e7f741cf0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteCrossConnectionsUpdateTagsSamples.java @@ -13,7 +13,7 @@ */ public final class ExpressRouteCrossConnectionsUpdateTagsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteCrossConnectionUpdateTags.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysCreateOrUpdateSamples.java index e6453cdecf1f..ed918d80f888 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ public final class ExpressRouteGatewaysCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRouteGatewayCreate. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayCreate. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysDeleteSamples.java index d064faf8e87e..162aea070be7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysDeleteSamples.java @@ -10,7 +10,7 @@ public final class ExpressRouteGatewaysDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRouteGatewayDelete. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayDelete. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysGetByResourceGroupSamples.java index 5336dfe485c1..f78b3a13745c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ExpressRouteGatewaysGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRouteGatewayGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayGet.json */ /** * Sample code: ExpressRouteGatewayGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysListByResourceGroupSamples.java index 0d9059a4e7ac..dcff73e3e622 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteGatewaysListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteGatewayListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysListBySubscriptionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysListBySubscriptionSamples.java index f40d7fa4813e..4fee8618cc45 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysListBySubscriptionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysListBySubscriptionSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRouteGatewaysListBySubscriptionSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRouteGatewayListBySubscription.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysUpdateTagsSamples.java index 953c17e70196..8c5df22a1c32 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteGatewaysUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class ExpressRouteGatewaysUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRouteGatewayUpdateTags + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteGatewayUpdateTags * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteLinksGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteLinksGetSamples.java index d6b4ce2af8f7..4095712bf896 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteLinksGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteLinksGetSamples.java @@ -10,7 +10,7 @@ public final class ExpressRouteLinksGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRouteLinkGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteLinkGet.json */ /** * Sample code: ExpressRouteLinkGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteLinksListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteLinksListSamples.java index fdf7eed6ad6c..b040b2a27a30 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteLinksListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteLinksListSamples.java @@ -10,7 +10,7 @@ public final class ExpressRouteLinksListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRouteLinkList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteLinkList.json */ /** * Sample code: ExpressRouteLinkGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortAuthorizationsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortAuthorizationsCreateOrUpdateSamples.java index 5ef64e22a127..699d239fb02c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortAuthorizationsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortAuthorizationsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class ExpressRoutePortAuthorizationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRoutePortAuthorizationCreate.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortAuthorizationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortAuthorizationsDeleteSamples.java index 61324efe14f0..06185530ee56 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortAuthorizationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortAuthorizationsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRoutePortAuthorizationsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRoutePortAuthorizationDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortAuthorizationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortAuthorizationsGetSamples.java index cef227cb8ce1..ecaf70026331 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortAuthorizationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortAuthorizationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRoutePortAuthorizationsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRoutePortAuthorizationGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortAuthorizationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortAuthorizationsListSamples.java index b0b66acc605a..de16a020241a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortAuthorizationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortAuthorizationsListSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRoutePortAuthorizationsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRoutePortAuthorizationList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsCreateOrUpdateSamples.java index a1cd0d598aa7..4128c96012d7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsCreateOrUpdateSamples.java @@ -17,7 +17,7 @@ public final class ExpressRoutePortsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRoutePortUpdateLink. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortUpdateLink. * json */ /** @@ -41,7 +41,7 @@ public static void expressRoutePortUpdateLink(com.azure.resourcemanager.AzureRes /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRoutePortCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortCreate.json */ /** * Sample code: ExpressRoutePortCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsDeleteSamples.java index c730b35b6793..49e19bb86ddc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsDeleteSamples.java @@ -10,7 +10,7 @@ public final class ExpressRoutePortsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRoutePortDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortDelete.json */ /** * Sample code: ExpressRoutePortDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsGenerateLoaSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsGenerateLoaSamples.java index 1b85fc3ed769..ed96f22fe7d1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsGenerateLoaSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsGenerateLoaSamples.java @@ -12,7 +12,7 @@ public final class ExpressRoutePortsGenerateLoaSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/GenerateExpressRoutePortsLOA. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GenerateExpressRoutePortsLOA. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsGetByResourceGroupSamples.java index d350242e126a..ccc6566c52b6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ExpressRoutePortsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRoutePortGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortGet.json */ /** * Sample code: ExpressRoutePortGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsListByResourceGroupSamples.java index ddee2305bd38..70defbed40b0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ExpressRoutePortsListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ExpressRoutePortListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsListSamples.java index d516f99ff78e..d1b59cb3d348 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsListSamples.java @@ -10,7 +10,7 @@ public final class ExpressRoutePortsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRoutePortList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortList.json */ /** * Sample code: ExpressRoutePortList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsLocationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsLocationsGetSamples.java index 1d78c35015e4..94f02616fa5d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsLocationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsLocationsGetSamples.java @@ -10,7 +10,7 @@ public final class ExpressRoutePortsLocationsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRoutePortsLocationGet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortsLocationGet. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsLocationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsLocationsListSamples.java index 01c5a6579f8e..069f0ec8b553 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsLocationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsLocationsListSamples.java @@ -10,7 +10,7 @@ public final class ExpressRoutePortsLocationsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRoutePortsLocationList + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortsLocationList * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsUpdateTagsSamples.java index e43cef0783b0..b717f3dbb7d0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRoutePortsUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class ExpressRoutePortsUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRoutePortUpdateTags. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRoutePortUpdateTags. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteProviderPortsLocationListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteProviderPortsLocationListSamples.java index 239a96707dc1..3752f686c3cb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteProviderPortsLocationListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteProviderPortsLocationListSamples.java @@ -10,7 +10,7 @@ public final class ExpressRouteProviderPortsLocationListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/expressRouteProviderPortList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/expressRouteProviderPortList. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteServiceProvidersListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteServiceProvidersListSamples.java index b45c8d72b65f..2c171bbaad63 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteServiceProvidersListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ExpressRouteServiceProvidersListSamples.java @@ -10,7 +10,7 @@ public final class ExpressRouteServiceProvidersListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ExpressRouteProviderList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ExpressRouteProviderList.json */ /** * Sample code: List ExpressRoute providers. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesCreateOrUpdateSamples.java index 95973bc8eb97..e872889dd22a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesCreateOrUpdateSamples.java @@ -36,7 +36,7 @@ public final class FirewallPoliciesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/FirewallPolicyPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyPut.json */ /** * Sample code: Create FirewallPolicy. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesDeleteSamples.java index 67ba45ecc220..3c6f13dd7f7b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesDeleteSamples.java @@ -10,7 +10,7 @@ public final class FirewallPoliciesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/FirewallPolicyDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDelete.json */ /** * Sample code: Delete Firewall Policy. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesGetByResourceGroupSamples.java index 213dfd555cae..75566dc6bd74 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class FirewallPoliciesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/FirewallPolicyGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyGet.json */ /** * Sample code: Get FirewallPolicy. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesListByResourceGroupSamples.java index 65173f528316..ce6273a32440 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class FirewallPoliciesListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesListSamples.java index e2430056c00d..05f9832cd8b6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesListSamples.java @@ -9,7 +9,7 @@ */ public final class FirewallPoliciesListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyListBySubscription.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesUpdateTagsSamples.java index 2823327a7bfd..070c55c08e9e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPoliciesUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class FirewallPoliciesUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/FirewallPolicyPatch.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyPatch.json */ /** * Sample code: Update FirewallPolicy Tags. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyDeploymentsDeploySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyDeploymentsDeploySamples.java index 8ca1a1382a36..867136bbb817 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyDeploymentsDeploySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyDeploymentsDeploySamples.java @@ -10,7 +10,7 @@ public final class FirewallPolicyDeploymentsDeploySamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/FirewallPolicyDraftDeploy. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftDeploy. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyDraftsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyDraftsCreateOrUpdateSamples.java index 167e475ba866..9f569eb79a88 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyDraftsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyDraftsCreateOrUpdateSamples.java @@ -30,7 +30,7 @@ public final class FirewallPolicyDraftsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/FirewallPolicyDraftPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftPut.json */ /** * Sample code: create or update firewall policy draft. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyDraftsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyDraftsDeleteSamples.java index 3de2d1fd67ae..f57b4d56f0a8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyDraftsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyDraftsDeleteSamples.java @@ -10,7 +10,7 @@ public final class FirewallPolicyDraftsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/FirewallPolicyDraftDelete. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftDelete. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyDraftsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyDraftsGetSamples.java index f8b124bd9672..6764fb4977e3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyDraftsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyDraftsGetSamples.java @@ -10,7 +10,7 @@ public final class FirewallPolicyDraftsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/FirewallPolicyDraftGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/FirewallPolicyDraftGet.json */ /** * Sample code: get firewall policy draft. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesFilterValuesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesFilterValuesListSamples.java index 03650b4799a8..928e85a3f128 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesFilterValuesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesFilterValuesListSamples.java @@ -11,7 +11,7 @@ */ public final class FirewallPolicyIdpsSignaturesFilterValuesListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyQuerySignatureOverridesFilterValues.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesListSamples.java index 00e4ab6e8d11..8960885fed9f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesListSamples.java @@ -15,7 +15,7 @@ */ public final class FirewallPolicyIdpsSignaturesListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyQuerySignatureOverrides.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesOverridesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesOverridesGetSamples.java index 413908ca0597..1b5ef8c114ed 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesOverridesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesOverridesGetSamples.java @@ -9,7 +9,7 @@ */ public final class FirewallPolicyIdpsSignaturesOverridesGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicySignatureOverridesGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesOverridesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesOverridesListSamples.java index dde9d7fefceb..dc0cf8bf1c1b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesOverridesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesOverridesListSamples.java @@ -9,7 +9,7 @@ */ public final class FirewallPolicyIdpsSignaturesOverridesListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicySignatureOverridesList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesOverridesPatchSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesOverridesPatchSamples.java index 093b7bba3d8f..fc21591f4b41 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesOverridesPatchSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesOverridesPatchSamples.java @@ -14,7 +14,7 @@ */ public final class FirewallPolicyIdpsSignaturesOverridesPatchSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicySignatureOverridesPatch.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesOverridesPutSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesOverridesPutSamples.java index 60a69327b64a..7ea5bc789083 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesOverridesPutSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyIdpsSignaturesOverridesPutSamples.java @@ -14,7 +14,7 @@ */ public final class FirewallPolicyIdpsSignaturesOverridesPutSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicySignatureOverridesPut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSamples.java index 9684fe2b2121..9dbdabb3e73a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSamples.java @@ -17,7 +17,7 @@ */ public final class FirewallPolicyRuleCollectionGroupDraftsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyRuleCollectionGroupDraftPut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupDraftsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupDraftsDeleteSamples.java index ac6b9db27cb7..ab01d3d2f03e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupDraftsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupDraftsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class FirewallPolicyRuleCollectionGroupDraftsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyRuleCollectionGroupDraftDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupDraftsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupDraftsGetSamples.java index 203544421b8f..5e7d4170c52b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupDraftsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupDraftsGetSamples.java @@ -9,7 +9,7 @@ */ public final class FirewallPolicyRuleCollectionGroupDraftsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyRuleCollectionGroupDraftGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupsCreateOrUpdateSamples.java index d03fc8baab6b..35ed58c8e3a4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupsCreateOrUpdateSamples.java @@ -25,7 +25,7 @@ */ public final class FirewallPolicyRuleCollectionGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyRuleCollectionGroupPut.json */ /** @@ -54,7 +54,7 @@ public static void createFirewallPolicyRuleCollectionGroup(com.azure.resourceman } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json */ /** @@ -85,7 +85,7 @@ public static void createFirewallPolicyRuleCollectionGroup(com.azure.resourceman } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyNatRuleCollectionGroupPut.json */ /** @@ -119,7 +119,7 @@ public static void createFirewallPolicyRuleCollectionGroup(com.azure.resourceman } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json */ /** @@ -150,7 +150,7 @@ public static void createFirewallPolicyRuleCollectionGroup(com.azure.resourceman } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupsDeleteSamples.java index 7be146a65f40..8ec1bfaf9781 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class FirewallPolicyRuleCollectionGroupsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyRuleCollectionGroupDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupsGetSamples.java index bc7e2457ed7c..60434bf193cc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupsGetSamples.java @@ -9,7 +9,7 @@ */ public final class FirewallPolicyRuleCollectionGroupsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyNatRuleCollectionGroupGet.json */ /** @@ -26,7 +26,7 @@ public static void getFirewallPolicyNatRuleCollectionGroup(com.azure.resourceman } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json */ /** @@ -44,7 +44,7 @@ public static void getFirewallPolicyNatRuleCollectionGroup(com.azure.resourceman } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyRuleCollectionGroupGet.json */ /** @@ -61,7 +61,7 @@ public static void getFirewallPolicyRuleCollectionGroup(com.azure.resourcemanage } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupsListSamples.java index 2227ba259f2a..c44a2b4d32e7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FirewallPolicyRuleCollectionGroupsListSamples.java @@ -9,7 +9,7 @@ */ public final class FirewallPolicyRuleCollectionGroupsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyRuleCollectionGroupList.json */ /** @@ -27,7 +27,7 @@ public static void listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPol } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyRuleCollectionGroupWithIpGroupsList.json */ /** @@ -45,7 +45,7 @@ public static void listAllFirewallPolicyRuleCollectionGroupsWithIpGroupsForAGive } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsCreateOrUpdateSamples.java index 1dd243ecad71..0943be3a3ede 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsCreateOrUpdateSamples.java @@ -19,7 +19,7 @@ public final class FlowLogsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkWatcherFlowLogCreate. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogCreate. * json */ /** @@ -42,6 +42,7 @@ public static void createOrUpdateFlowLog(com.azure.resourcemanager.AzureResource .withStorageId( "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe") .withEnabledFilteringCriteria("srcIP=158.255.7.8 || dstPort=56891") + .withRecordTypes("B,E") .withEnabled(true) .withFormat(new FlowLogFormatParameters().withType(FlowLogFormatType.JSON).withVersion(1)), com.azure.core.util.Context.NONE); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsDeleteSamples.java index b9c95e791164..1c2d78b999a8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsDeleteSamples.java @@ -10,7 +10,7 @@ public final class FlowLogsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkWatcherFlowLogDelete. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogDelete. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsGetSamples.java index a0282707d504..d460b1a7f5ee 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsGetSamples.java @@ -10,7 +10,7 @@ public final class FlowLogsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkWatcherFlowLogGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogGet.json */ /** * Sample code: Get flow log. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsListSamples.java index 0e256af5d955..5207aec6235b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsListSamples.java @@ -10,7 +10,7 @@ public final class FlowLogsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkWatcherFlowLogList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherFlowLogList. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsUpdateTagsSamples.java index 9a9b58e1a9fb..2a246f922941 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/FlowLogsUpdateTagsSamples.java @@ -13,7 +13,7 @@ */ public final class FlowLogsUpdateTagsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherFlowLogUpdateTags.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubRouteTablesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubRouteTablesCreateOrUpdateSamples.java index f4a3b895fa68..c0a3e40fd985 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubRouteTablesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubRouteTablesCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ public final class HubRouteTablesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/HubRouteTablePut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTablePut.json */ /** * Sample code: RouteTablePut. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubRouteTablesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubRouteTablesDeleteSamples.java index 2a9a8bcd54f6..99e7d1ffabfe 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubRouteTablesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubRouteTablesDeleteSamples.java @@ -10,7 +10,7 @@ public final class HubRouteTablesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/HubRouteTableDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTableDelete.json */ /** * Sample code: RouteTableDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubRouteTablesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubRouteTablesGetSamples.java index f1b4bf35a238..3eabcb43ba15 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubRouteTablesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubRouteTablesGetSamples.java @@ -10,7 +10,7 @@ public final class HubRouteTablesGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/HubRouteTableGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTableGet.json */ /** * Sample code: RouteTableGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubRouteTablesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubRouteTablesListSamples.java index f3139612ec9e..2e9a4f040ec4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubRouteTablesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubRouteTablesListSamples.java @@ -10,7 +10,7 @@ public final class HubRouteTablesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/HubRouteTableList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/HubRouteTableList.json */ /** * Sample code: RouteTableList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubVirtualNetworkConnectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubVirtualNetworkConnectionsCreateOrUpdateSamples.java index a245e4a44b3d..2e6e50684b5f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubVirtualNetworkConnectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubVirtualNetworkConnectionsCreateOrUpdateSamples.java @@ -19,7 +19,7 @@ */ public final class HubVirtualNetworkConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * HubVirtualNetworkConnectionPut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubVirtualNetworkConnectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubVirtualNetworkConnectionsDeleteSamples.java index 5c4bbf2eecd5..a2a5ceb1b15a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubVirtualNetworkConnectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubVirtualNetworkConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class HubVirtualNetworkConnectionsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * HubVirtualNetworkConnectionDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubVirtualNetworkConnectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubVirtualNetworkConnectionsGetSamples.java index 39d40ed3df40..c55f96e91626 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubVirtualNetworkConnectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubVirtualNetworkConnectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class HubVirtualNetworkConnectionsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * HubVirtualNetworkConnectionGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubVirtualNetworkConnectionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubVirtualNetworkConnectionsListSamples.java index 9872ec53876e..c18e8c2d566a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubVirtualNetworkConnectionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/HubVirtualNetworkConnectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class HubVirtualNetworkConnectionsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * HubVirtualNetworkConnectionList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundNatRulesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundNatRulesCreateOrUpdateSamples.java index 92aa4554c65f..e291741b6a32 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundNatRulesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundNatRulesCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ public final class InboundNatRulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/InboundNatRuleCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleCreate.json */ /** * Sample code: InboundNatRuleCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundNatRulesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundNatRulesDeleteSamples.java index 2b3b7722d764..5c0a775db4e9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundNatRulesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundNatRulesDeleteSamples.java @@ -10,7 +10,7 @@ public final class InboundNatRulesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/InboundNatRuleDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleDelete.json */ /** * Sample code: InboundNatRuleDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundNatRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundNatRulesGetSamples.java index 283fbba5f522..099dd1618839 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundNatRulesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundNatRulesGetSamples.java @@ -10,7 +10,7 @@ public final class InboundNatRulesGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/InboundNatRuleGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleGet.json */ /** * Sample code: InboundNatRuleGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundNatRulesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundNatRulesListSamples.java index 233c1f5286d6..06d5f57cdbe5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundNatRulesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundNatRulesListSamples.java @@ -10,7 +10,7 @@ public final class InboundNatRulesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/InboundNatRuleList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundNatRuleList.json */ /** * Sample code: InboundNatRuleList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundSecurityRuleOperationCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundSecurityRuleOperationCreateOrUpdateSamples.java index 73fc810d5a82..74c2bf6ece27 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundSecurityRuleOperationCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundSecurityRuleOperationCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ public final class InboundSecurityRuleOperationCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/InboundSecurityRulePut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundSecurityRulePut.json */ /** * Sample code: Create Network Virtual Appliance Inbound Security Rules. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundSecurityRuleOperationGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundSecurityRuleOperationGetSamples.java index ee4030560caa..84d7421c357b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundSecurityRuleOperationGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/InboundSecurityRuleOperationGetSamples.java @@ -10,7 +10,7 @@ public final class InboundSecurityRuleOperationGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/InboundSecurityRuleGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/InboundSecurityRuleGet.json */ /** * Sample code: Create Network Virtual Appliance Inbound Security Rules. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsCreateOrUpdateSamples.java index d63fa39ea0c7..171103e392fe 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ public final class IpAllocationsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/IpAllocationCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationCreate.json */ /** * Sample code: Create IpAllocation. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsDeleteSamples.java index dc60cf9d8d4c..fe1915154b35 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsDeleteSamples.java @@ -10,7 +10,7 @@ public final class IpAllocationsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/IpAllocationDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationDelete.json */ /** * Sample code: Delete IpAllocation. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsGetByResourceGroupSamples.java index 5053641476a7..833aa8b1473c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class IpAllocationsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/IpAllocationGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationGet.json */ /** * Sample code: Get IpAllocation. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsListByResourceGroupSamples.java index a64832f0d186..2946105264bb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class IpAllocationsListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * IpAllocationListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsListSamples.java index 135dd6f0ef93..59e280f143e3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsListSamples.java @@ -10,7 +10,7 @@ public final class IpAllocationsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/IpAllocationList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationList.json */ /** * Sample code: List all IpAllocations. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsUpdateTagsSamples.java index d58dafee5939..325477f0bf1e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpAllocationsUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class IpAllocationsUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/IpAllocationUpdateTags.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpAllocationUpdateTags.json */ /** * Sample code: Update virtual network tags. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsCreateOrUpdateSamples.java index 94a8d6ae8558..b347acb9e591 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ public final class IpGroupsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/IpGroupsCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsCreate.json */ /** * Sample code: CreateOrUpdate_IpGroups. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsDeleteSamples.java index cbd491dcf8f7..1508b9ca132c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsDeleteSamples.java @@ -10,7 +10,7 @@ public final class IpGroupsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/IpGroupsDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsDelete.json */ /** * Sample code: Delete_IpGroups. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsGetByResourceGroupSamples.java index 32240e8fa2ac..5d3df1ecad9d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class IpGroupsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/IpGroupsGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsGet.json */ /** * Sample code: Get_IpGroups. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsListByResourceGroupSamples.java index 9f075a76845b..088a1314a54b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class IpGroupsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/IpGroupsListByResourceGroup. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsListByResourceGroup. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsListSamples.java index 4c941e18e805..9caa2159852c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsListSamples.java @@ -10,7 +10,7 @@ public final class IpGroupsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/IpGroupsListBySubscription. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsListBySubscription. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsUpdateGroupsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsUpdateGroupsSamples.java index 2c6b5f804587..bc49bd137801 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsUpdateGroupsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpGroupsUpdateGroupsSamples.java @@ -14,7 +14,7 @@ public final class IpGroupsUpdateGroupsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/IpGroupsUpdateTags.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpGroupsUpdateTags.json */ /** * Sample code: Update_IpGroups. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsCreateSamples.java index d1b4388d8bbc..3b3b3ef282b3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsCreateSamples.java @@ -14,7 +14,7 @@ public final class IpamPoolsCreateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/IpamPools_Create.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Create.json */ /** * Sample code: IpamPools_Create. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsDeleteSamples.java index ea9a37ae0707..314602b6c1ca 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsDeleteSamples.java @@ -10,7 +10,7 @@ public final class IpamPoolsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/IpamPools_Delete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Delete.json */ /** * Sample code: IpamPools_Delete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsGetPoolUsageSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsGetPoolUsageSamples.java index 6553ae422e8e..d066efe339d1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsGetPoolUsageSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsGetPoolUsageSamples.java @@ -10,7 +10,7 @@ public final class IpamPoolsGetPoolUsageSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/IpamPools_GetPoolUsage.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_GetPoolUsage.json */ /** * Sample code: IpamPools_GetPoolUsage. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsGetSamples.java index 79bf18d5abf5..9ccef5761a0d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsGetSamples.java @@ -10,7 +10,7 @@ public final class IpamPoolsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/IpamPools_Get.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Get.json */ /** * Sample code: IpamPools_Get. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsListAssociatedResourcesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsListAssociatedResourcesSamples.java index 197a8443863e..c4b6db2c7031 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsListAssociatedResourcesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsListAssociatedResourcesSamples.java @@ -9,7 +9,7 @@ */ public final class IpamPoolsListAssociatedResourcesSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * IpamPools_ListAssociatedResources.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsListSamples.java index ea8048a0d311..2ab7af5059b2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsListSamples.java @@ -10,7 +10,7 @@ public final class IpamPoolsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/IpamPools_List.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_List.json */ /** * Sample code: IpamPools_List. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsUpdateSamples.java index 18353835edb5..a7049f1e31d5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/IpamPoolsUpdateSamples.java @@ -10,7 +10,7 @@ public final class IpamPoolsUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/IpamPools_Update.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/IpamPools_Update.json */ /** * Sample code: IpamPools_Update. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerBackendAddressPoolsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerBackendAddressPoolsCreateOrUpdateSamples.java index 6a3e2efe3908..10aa5f91ce72 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerBackendAddressPoolsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerBackendAddressPoolsCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class LoadBalancerBackendAddressPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LBBackendAddressPoolWithBackendAddressesPut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerBackendAddressPoolsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerBackendAddressPoolsDeleteSamples.java index 3d59cc8a3fd7..30f075299410 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerBackendAddressPoolsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerBackendAddressPoolsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class LoadBalancerBackendAddressPoolsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LoadBalancerBackendAddressPoolDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerBackendAddressPoolsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerBackendAddressPoolsGetSamples.java index 8c7785c893b8..bc58127dc31f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerBackendAddressPoolsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerBackendAddressPoolsGetSamples.java @@ -9,7 +9,7 @@ */ public final class LoadBalancerBackendAddressPoolsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LoadBalancerBackendAddressPoolGet.json */ /** @@ -26,7 +26,7 @@ public static void loadBalancerBackendAddressPoolGet(com.azure.resourcemanager.A } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LBBackendAddressPoolWithBackendAddressesGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerBackendAddressPoolsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerBackendAddressPoolsListSamples.java index 0cb05082690d..75f33920af1e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerBackendAddressPoolsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerBackendAddressPoolsListSamples.java @@ -9,7 +9,7 @@ */ public final class LoadBalancerBackendAddressPoolsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LBBackendAddressPoolListWithBackendAddressesPoolType.json */ /** @@ -27,7 +27,7 @@ public static void loadBalancerWithBackendAddressPoolContainingBackendAddresses( } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LoadBalancerBackendAddressPoolList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerFrontendIpConfigurationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerFrontendIpConfigurationsGetSamples.java index 9e041d78124f..e619ba99b02a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerFrontendIpConfigurationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerFrontendIpConfigurationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class LoadBalancerFrontendIpConfigurationsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LoadBalancerFrontendIPConfigurationGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerFrontendIpConfigurationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerFrontendIpConfigurationsListSamples.java index d430febd352a..588f9675a041 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerFrontendIpConfigurationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerFrontendIpConfigurationsListSamples.java @@ -9,7 +9,7 @@ */ public final class LoadBalancerFrontendIpConfigurationsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LoadBalancerFrontendIPConfigurationList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerLoadBalancingRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerLoadBalancingRulesGetSamples.java index b83b71ecf358..f10483ca712a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerLoadBalancingRulesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerLoadBalancingRulesGetSamples.java @@ -9,7 +9,7 @@ */ public final class LoadBalancerLoadBalancingRulesGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LoadBalancerLoadBalancingRuleGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerLoadBalancingRulesHealthSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerLoadBalancingRulesHealthSamples.java index 091820a5f649..a431ee1552f7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerLoadBalancingRulesHealthSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerLoadBalancingRulesHealthSamples.java @@ -10,7 +10,7 @@ public final class LoadBalancerLoadBalancingRulesHealthSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LoadBalancerHealth.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerHealth.json */ /** * Sample code: Query load balancing rule health. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerLoadBalancingRulesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerLoadBalancingRulesListSamples.java index 7097222a43ce..4cb2cd5095eb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerLoadBalancingRulesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerLoadBalancingRulesListSamples.java @@ -9,7 +9,7 @@ */ public final class LoadBalancerLoadBalancingRulesListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LoadBalancerLoadBalancingRuleList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerNetworkInterfacesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerNetworkInterfacesListSamples.java index 0a8ed50b128b..4a3181ff1bbd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerNetworkInterfacesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerNetworkInterfacesListSamples.java @@ -9,7 +9,7 @@ */ public final class LoadBalancerNetworkInterfacesListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LoadBalancerNetworkInterfaceListVmss.json */ /** @@ -26,7 +26,7 @@ public static void loadBalancerNetworkInterfaceListVmss(com.azure.resourcemanage } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LoadBalancerNetworkInterfaceListSimple.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerOutboundRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerOutboundRulesGetSamples.java index a9fe2565c332..b49d5b72278f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerOutboundRulesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerOutboundRulesGetSamples.java @@ -10,7 +10,7 @@ public final class LoadBalancerOutboundRulesGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LoadBalancerOutboundRuleGet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerOutboundRuleGet. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerOutboundRulesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerOutboundRulesListSamples.java index 60d52043bf12..f19a7bcbadab 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerOutboundRulesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerOutboundRulesListSamples.java @@ -10,7 +10,7 @@ public final class LoadBalancerOutboundRulesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LoadBalancerOutboundRuleList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerOutboundRuleList. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerProbesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerProbesGetSamples.java index 7986c3db7845..93d3ff2fcd10 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerProbesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerProbesGetSamples.java @@ -10,7 +10,7 @@ public final class LoadBalancerProbesGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LoadBalancerProbeGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerProbeGet.json */ /** * Sample code: LoadBalancerProbeGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerProbesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerProbesListSamples.java index 2e1bc3de7b37..d7e719cb6ebe 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerProbesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancerProbesListSamples.java @@ -10,7 +10,7 @@ public final class LoadBalancerProbesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LoadBalancerProbeList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerProbeList.json */ /** * Sample code: LoadBalancerProbeList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersCreateOrUpdateSamples.java index c653a3decb25..3b6f4198f1e7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersCreateOrUpdateSamples.java @@ -36,7 +36,7 @@ */ public final class LoadBalancersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LoadBalancerCreateWithSyncModePropertyOnPool.json */ /** @@ -92,7 +92,7 @@ public final class LoadBalancersCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json */ /** @@ -141,7 +141,7 @@ public static void createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWi } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LoadBalancerCreateWithInboundNatPool.json */ /** @@ -184,7 +184,7 @@ public static void createLoadBalancerWithInboundNatPool(com.azure.resourcemanage /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LoadBalancerCreateWithZones. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateWithZones. * json */ /** @@ -237,7 +237,7 @@ public static void createLoadBalancerWithFrontendIPInZone1(com.azure.resourceman } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LoadBalancerCreateWithOutboundRules.json */ /** @@ -296,7 +296,7 @@ public static void createLoadBalancerWithOutboundRules(com.azure.resourcemanager } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json */ /** @@ -351,7 +351,7 @@ public static void createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWi /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LoadBalancerCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreate.json */ /** * Sample code: Create load balancer. @@ -404,7 +404,7 @@ public static void createLoadBalancer(com.azure.resourcemanager.AzureResourceMan /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LoadBalancerCreateGlobalTier. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateGlobalTier. * json */ /** @@ -453,7 +453,7 @@ public static void createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInI } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LoadBalancerCreateGatewayLoadBalancerConsumer.json */ /** @@ -509,7 +509,7 @@ public static void createLoadBalancerWithGatewayLoadBalancerConsumerConfigured( /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LoadBalancerCreateStandardSku + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerCreateStandardSku * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersDeleteSamples.java index 37e142b666a0..206a8cda0e31 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersDeleteSamples.java @@ -10,7 +10,7 @@ public final class LoadBalancersDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LoadBalancerDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerDelete.json */ /** * Sample code: Delete load balancer. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersGetByResourceGroupSamples.java index ffaa4218882e..7b982993d006 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class LoadBalancersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LoadBalancerGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerGet.json */ /** * Sample code: Get load balancer. @@ -26,7 +26,7 @@ public static void getLoadBalancer(com.azure.resourcemanager.AzureResourceManage } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LoadBalancerGetInboundNatRulePortMapping.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersListByResourceGroupSamples.java index f132d8b206fc..68e719206879 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class LoadBalancersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LoadBalancerList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerList.json */ /** * Sample code: List load balancers in resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersListInboundNatRulePortMappingsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersListInboundNatRulePortMappingsSamples.java index e14131f7b4f7..569d27200d67 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersListInboundNatRulePortMappingsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersListInboundNatRulePortMappingsSamples.java @@ -11,7 +11,7 @@ */ public final class LoadBalancersListInboundNatRulePortMappingsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * QueryInboundNatRulePortMapping.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersListSamples.java index d195f24aa3bb..43657f119b2b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersListSamples.java @@ -10,7 +10,7 @@ public final class LoadBalancersListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LoadBalancerListAll.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerListAll.json */ /** * Sample code: List all load balancers. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersMigrateToIpBasedSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersMigrateToIpBasedSamples.java index 9d41d82dcff0..2b4b48aec7a8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersMigrateToIpBasedSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersMigrateToIpBasedSamples.java @@ -13,7 +13,7 @@ public final class LoadBalancersMigrateToIpBasedSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/MigrateLoadBalancerToIPBased. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/MigrateLoadBalancerToIPBased. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersSwapPublicIpAddressesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersSwapPublicIpAddressesSamples.java index 7392f2222a28..880541879125 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersSwapPublicIpAddressesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersSwapPublicIpAddressesSamples.java @@ -14,7 +14,7 @@ */ public final class LoadBalancersSwapPublicIpAddressesSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * LoadBalancersSwapPublicIpAddresses.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersUpdateTagsSamples.java index 9fd742a555c1..a718049ae1b9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LoadBalancersUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class LoadBalancersUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LoadBalancerUpdateTags.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LoadBalancerUpdateTags.json */ /** * Sample code: Update load balancer tags. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysCreateOrUpdateSamples.java index a489d6362706..ad200a461ce5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ public final class LocalNetworkGatewaysCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LocalNetworkGatewayCreate. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayCreate. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysDeleteSamples.java index 87de63841a43..5cdc069b0bce 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysDeleteSamples.java @@ -10,7 +10,7 @@ public final class LocalNetworkGatewaysDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LocalNetworkGatewayDelete. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayDelete. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysGetByResourceGroupSamples.java index f65e09674eea..cfa311aeb23b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class LocalNetworkGatewaysGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LocalNetworkGatewayGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayGet.json */ /** * Sample code: GetLocalNetworkGateway. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysListByResourceGroupSamples.java index 85bff7f16a67..aa8131d418c2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class LocalNetworkGatewaysListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LocalNetworkGatewayList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayList.json */ /** * Sample code: ListLocalNetworkGateways. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysUpdateTagsSamples.java index 8086e25608fc..e5dfc96deffb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/LocalNetworkGatewaysUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class LocalNetworkGatewaysUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/LocalNetworkGatewayUpdateTags + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/LocalNetworkGatewayUpdateTags * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ManagementGroupNetworkManagerConnectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ManagementGroupNetworkManagerConnectionsCreateOrUpdateSamples.java index d7e2d7da774a..94a4f1882c34 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ManagementGroupNetworkManagerConnectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ManagementGroupNetworkManagerConnectionsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class ManagementGroupNetworkManagerConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerConnectionManagementGroupPut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ManagementGroupNetworkManagerConnectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ManagementGroupNetworkManagerConnectionsDeleteSamples.java index 9ce5267f3e44..36819255e675 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ManagementGroupNetworkManagerConnectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ManagementGroupNetworkManagerConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ManagementGroupNetworkManagerConnectionsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerConnectionManagementGroupDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ManagementGroupNetworkManagerConnectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ManagementGroupNetworkManagerConnectionsGetSamples.java index 0ea6a0267b57..eab356183b69 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ManagementGroupNetworkManagerConnectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ManagementGroupNetworkManagerConnectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ManagementGroupNetworkManagerConnectionsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerConnectionManagementGroupGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ManagementGroupNetworkManagerConnectionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ManagementGroupNetworkManagerConnectionsListSamples.java index 515ba01b8399..14f80eb49fc5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ManagementGroupNetworkManagerConnectionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ManagementGroupNetworkManagerConnectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagementGroupNetworkManagerConnectionsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerConnectionManagementGroupList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysCreateOrUpdateSamples.java index 69fda3b0e536..33dfe46ac441 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ public final class NatGatewaysCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NatGatewayCreateOrUpdate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayCreateOrUpdate.json */ /** * Sample code: Create nat gateway. @@ -38,7 +38,7 @@ public static void createNatGateway(com.azure.resourcemanager.AzureResourceManag } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NatGatewayCreateOrUpdateStandardV2Sku.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysDeleteSamples.java index 9de29d837c2d..c1e4bd6be6a6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysDeleteSamples.java @@ -10,7 +10,7 @@ public final class NatGatewaysDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NatGatewayDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayDelete.json */ /** * Sample code: Delete nat gateway. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysGetByResourceGroupSamples.java index 7d5c9e0457c9..8f0758e3adcf 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class NatGatewaysGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NatGatewayGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayGet.json */ /** * Sample code: Get nat gateway. @@ -27,7 +27,7 @@ public static void getNatGateway(com.azure.resourcemanager.AzureResourceManager /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NatGatewayGetStandardV2Sku. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayGetStandardV2Sku. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysListByResourceGroupSamples.java index 911f7a934236..2e3ee31e6538 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class NatGatewaysListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NatGatewayList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayList.json */ /** * Sample code: List nat gateways in resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysListSamples.java index 9c8c0bf1241d..b47a3167290f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysListSamples.java @@ -10,7 +10,7 @@ public final class NatGatewaysListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NatGatewayListAll.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayListAll.json */ /** * Sample code: List all nat gateways. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysUpdateTagsSamples.java index 1a7e0234ef08..12ced5223694 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatGatewaysUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class NatGatewaysUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NatGatewayUpdateTags.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatGatewayUpdateTags.json */ /** * Sample code: Update nat gateway tags. @@ -31,7 +31,7 @@ public static void updateNatGatewayTags(com.azure.resourcemanager.AzureResourceM } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NatGatewayUpdateTagsStandardV2Sku.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatRulesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatRulesCreateOrUpdateSamples.java index f7591a92a039..9d34ad991783 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatRulesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatRulesCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ public final class NatRulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NatRulePut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRulePut.json */ /** * Sample code: NatRulePut. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatRulesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatRulesDeleteSamples.java index 6063ee2a5ace..c740aded0fd5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatRulesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatRulesDeleteSamples.java @@ -10,7 +10,7 @@ public final class NatRulesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NatRuleDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRuleDelete.json */ /** * Sample code: NatRuleDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatRulesGetSamples.java index d71c48c06f84..ca0426b75ce4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatRulesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatRulesGetSamples.java @@ -10,7 +10,7 @@ public final class NatRulesGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NatRuleGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRuleGet.json */ /** * Sample code: NatRuleGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatRulesListByVpnGatewaySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatRulesListByVpnGatewaySamples.java index 015d1d1cf6c4..5c7f52dec6cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatRulesListByVpnGatewaySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NatRulesListByVpnGatewaySamples.java @@ -10,7 +10,7 @@ public final class NatRulesListByVpnGatewaySamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NatRuleList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NatRuleList.json */ /** * Sample code: NatRuleList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkGroupsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkGroupsCreateOrUpdateSamples.java index a3721fed778f..43ee7013034d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkGroupsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkGroupsCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ public final class NetworkGroupsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerGroupPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupPut.json */ /** * Sample code: NetworkGroupsPut. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkGroupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkGroupsDeleteSamples.java index 137af53e6ad7..38d97cf21ac5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkGroupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkGroupsDeleteSamples.java @@ -10,7 +10,7 @@ public final class NetworkGroupsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerGroupDelete. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupDelete. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkGroupsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkGroupsGetSamples.java index 0fce6c86c3e9..16ebce6669aa 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkGroupsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkGroupsGetSamples.java @@ -10,7 +10,7 @@ public final class NetworkGroupsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerGroupGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupGet.json */ /** * Sample code: NetworkGroupsGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkGroupsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkGroupsListSamples.java index b811b2ec1ed4..d86f465ce359 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkGroupsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkGroupsListSamples.java @@ -10,7 +10,7 @@ public final class NetworkGroupsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerGroupList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGroupList.json */ /** * Sample code: NetworkGroupsList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceIpConfigurationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceIpConfigurationsGetSamples.java index 8d8fe0824222..e799e8d37b04 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceIpConfigurationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceIpConfigurationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkInterfaceIpConfigurationsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkInterfaceIPConfigurationGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceIpConfigurationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceIpConfigurationsListSamples.java index 9ced82cdd938..bfb3306dd0f4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceIpConfigurationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceIpConfigurationsListSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkInterfaceIpConfigurationsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkInterfaceIPConfigurationList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceLoadBalancersListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceLoadBalancersListSamples.java index 4017370518f4..981d1e443108 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceLoadBalancersListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceLoadBalancersListSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkInterfaceLoadBalancersListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkInterfaceLoadBalancerList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceTapConfigurationsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceTapConfigurationsCreateOrUpdateSamples.java index cb8819947f1b..ce6462dd9cc2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceTapConfigurationsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceTapConfigurationsCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class NetworkInterfaceTapConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkInterfaceTapConfigurationCreate.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceTapConfigurationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceTapConfigurationsDeleteSamples.java index a8afaf82631a..42a69ab70f10 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceTapConfigurationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceTapConfigurationsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkInterfaceTapConfigurationsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkInterfaceTapConfigurationDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceTapConfigurationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceTapConfigurationsGetSamples.java index 6dc2cd9b8652..8df04f386c7a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceTapConfigurationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceTapConfigurationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkInterfaceTapConfigurationsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkInterfaceTapConfigurationGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceTapConfigurationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceTapConfigurationsListSamples.java index 90a547c774e8..a75dbdf4fd57 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceTapConfigurationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceTapConfigurationsListSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkInterfaceTapConfigurationsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkInterfaceTapConfigurationList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesCreateOrUpdateSamples.java index 7773c49bd5d3..01230f798556 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ */ public final class NetworkInterfacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkInterfaceCreateGatewayLoadBalancerConsumer.json */ /** @@ -43,7 +43,7 @@ public static void createNetworkInterfaceWithGatewayLoadBalancerConsumerConfigur /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkInterfaceCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceCreate.json */ /** * Sample code: Create network interface. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesDeleteSamples.java index 53fa576207ea..45149c97f734 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesDeleteSamples.java @@ -10,7 +10,7 @@ public final class NetworkInterfacesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkInterfaceDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceDelete.json */ /** * Sample code: Delete network interface. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetByResourceGroupSamples.java index 2e5b805e14f8..85fabd114446 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class NetworkInterfacesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkInterfaceGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceGet.json */ /** * Sample code: Get network interface. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetCloudServiceNetworkInterfaceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetCloudServiceNetworkInterfaceSamples.java index 2f56ac2b588b..2deecf028319 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetCloudServiceNetworkInterfaceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetCloudServiceNetworkInterfaceSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkInterfacesGetCloudServiceNetworkInterfaceSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * CloudServiceNetworkInterfaceGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetEffectiveRouteTableSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetEffectiveRouteTableSamples.java index 88bf82faa483..9d93643faff9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetEffectiveRouteTableSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetEffectiveRouteTableSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkInterfacesGetEffectiveRouteTableSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkInterfaceEffectiveRouteTableList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationSamples.java index 8af36e11afff..ac0eb462e45a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkInterfacesGetVirtualMachineScaleSetIpConfigurationSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VmssNetworkInterfaceIpConfigGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSamples.java index 5797d97d89f0..4648d356edf0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSamples.java @@ -10,7 +10,7 @@ public final class NetworkInterfacesGetVirtualMachineScaleSetNetworkInterfaceSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VmssNetworkInterfaceGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceGet.json */ /** * Sample code: Get virtual machine scale set network interface. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListByResourceGroupSamples.java index b3714e55abf8..ba83e90ed848 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class NetworkInterfacesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkInterfaceList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceList.json */ /** * Sample code: List network interfaces in resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListCloudServiceNetworkInterfacesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListCloudServiceNetworkInterfacesSamples.java index 35de0514da45..8e0ca32bc154 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListCloudServiceNetworkInterfacesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListCloudServiceNetworkInterfacesSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkInterfacesListCloudServiceNetworkInterfacesSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * CloudServiceNetworkInterfaceList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSamples.java index acd1b92d704f..26278d85b6a7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkInterfacesListCloudServiceRoleInstanceNetworkInterfacesSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * CloudServiceRoleInstanceNetworkInterfaceList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListEffectiveNetworkSecurityGroupsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListEffectiveNetworkSecurityGroupsSamples.java index 827edc631640..d01108e4c661 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListEffectiveNetworkSecurityGroupsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListEffectiveNetworkSecurityGroupsSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkInterfacesListEffectiveNetworkSecurityGroupsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkInterfaceEffectiveNSGList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListSamples.java index 01534cb4abe9..c45bac465635 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListSamples.java @@ -10,7 +10,7 @@ public final class NetworkInterfacesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkInterfaceListAll.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceListAll.json */ /** * Sample code: List all network interfaces. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsSamples.java index 52133e88ce41..7720f61062be 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkInterfacesListVirtualMachineScaleSetIpConfigurationsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VmssNetworkInterfaceIpConfigList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesSamples.java index 781c415d773f..5fd7be9e7691 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesSamples.java @@ -10,7 +10,7 @@ public final class NetworkInterfacesListVirtualMachineScaleSetNetworkInterfacesSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VmssNetworkInterfaceList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssNetworkInterfaceList.json */ /** * Sample code: List virtual machine scale set network interfaces. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSamples.java index 50af0d7be50d..422b02e18f0c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSamples.java @@ -10,7 +10,7 @@ public final class NetworkInterfacesListVirtualMachineScaleSetVMNetworkInterfacesSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VmssVmNetworkInterfaceList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssVmNetworkInterfaceList. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesUpdateTagsSamples.java index dffdf232840b..c238ab430f87 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfacesUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class NetworkInterfacesUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkInterfaceUpdateTags. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkInterfaceUpdateTags. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerCommitsPostSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerCommitsPostSamples.java index 160e89aba85a..cccdb613372f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerCommitsPostSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerCommitsPostSamples.java @@ -14,7 +14,7 @@ public final class NetworkManagerCommitsPostSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerCommitPost.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerCommitPost.json */ /** * Sample code: NetworkManageCommitPost. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerDeploymentStatusOperationListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerDeploymentStatusOperationListSamples.java index f78291a8d6af..ea173b4b9121 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerDeploymentStatusOperationListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerDeploymentStatusOperationListSamples.java @@ -13,7 +13,7 @@ */ public final class NetworkManagerDeploymentStatusOperationListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerDeploymentStatusList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerRoutingConfigurationsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerRoutingConfigurationsCreateOrUpdateSamples.java index 26d6b38d2ec2..fa3a1281ea4e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerRoutingConfigurationsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerRoutingConfigurationsCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class NetworkManagerRoutingConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerRoutingConfigurationPut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerRoutingConfigurationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerRoutingConfigurationsDeleteSamples.java index f8372ce59fbb..26e8cc9e1c7b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerRoutingConfigurationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerRoutingConfigurationsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkManagerRoutingConfigurationsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerRoutingConfigurationDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerRoutingConfigurationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerRoutingConfigurationsGetSamples.java index 623f0a38b38d..3822a2f37bb0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerRoutingConfigurationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerRoutingConfigurationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkManagerRoutingConfigurationsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerRoutingConfigurationGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerRoutingConfigurationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerRoutingConfigurationsListSamples.java index 2ed81bc47908..3b4078e73c74 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerRoutingConfigurationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagerRoutingConfigurationsListSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkManagerRoutingConfigurationsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerRoutingConfigurationList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersCreateOrUpdateSamples.java index 409bf0065258..5418b5212246 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ public final class NetworkManagersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerPut.json */ /** * Sample code: Put Network Manager. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersDeleteSamples.java index f66238b75d0c..12e0500468da 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersDeleteSamples.java @@ -10,7 +10,7 @@ public final class NetworkManagersDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerDelete.json */ /** * Sample code: NetworkManagersDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersGetByResourceGroupSamples.java index 6ca5cb82d867..3e8b1f39c53c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class NetworkManagersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerGet.json */ /** * Sample code: NetworkManagersGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersListByResourceGroupSamples.java index 5b994d3d7990..a242ad04235e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class NetworkManagersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerList.json */ /** * Sample code: List Network Manager. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersListSamples.java index dfa37d8d1ef1..c4d1eb427411 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersListSamples.java @@ -10,7 +10,7 @@ public final class NetworkManagersListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerListAll.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerListAll.json */ /** * Sample code: NetworkManagersList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersPatchSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersPatchSamples.java index c8d4f642b78a..cfc20430d3d0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersPatchSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkManagersPatchSamples.java @@ -14,7 +14,7 @@ public final class NetworkManagersPatchSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerPatch.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerPatch.json */ /** * Sample code: NetworkManagesPatch. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesCreateOrUpdateSamples.java index 15f60561424a..0ee70adf7058 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class NetworkProfilesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkProfileCreateConfigOnly.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesDeleteSamples.java index 5908021f213b..4b3fbfe9ec8b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesDeleteSamples.java @@ -10,7 +10,7 @@ public final class NetworkProfilesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkProfileDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileDelete.json */ /** * Sample code: Delete network profile. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesGetByResourceGroupSamples.java index 5bce0c4c5b14..cdbeb1e3a0f7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkProfilesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkProfileGetWithContainerNic.json */ /** @@ -28,7 +28,7 @@ public final class NetworkProfilesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkProfileGetConfigOnly. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileGetConfigOnly. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesListByResourceGroupSamples.java index bcbc0e3c3101..77ab329a4d2c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class NetworkProfilesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkProfileList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileList.json */ /** * Sample code: List resource group network profiles. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesListSamples.java index 2ee55d2db51c..02bbae28bb90 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesListSamples.java @@ -10,7 +10,7 @@ public final class NetworkProfilesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkProfileListAll.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileListAll.json */ /** * Sample code: List all network profiles. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesUpdateTagsSamples.java index 9c2291292bd3..8920943cbab2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkProfilesUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class NetworkProfilesUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkProfileUpdateTags.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkProfileUpdateTags.json */ /** * Sample code: Update network profile tags. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsCreateOrUpdateSamples.java index d63d3961910a..7b34fb671f8e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ */ public final class NetworkSecurityGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkSecurityGroupCreateWithRule.json */ /** @@ -45,7 +45,7 @@ public static void createNetworkSecurityGroupWithRule(com.azure.resourcemanager. /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkSecurityGroupCreate. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupCreate. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsDeleteSamples.java index 0f6cafdbb2af..95a1bc76da70 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsDeleteSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityGroupsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkSecurityGroupDelete. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupDelete. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsGetByResourceGroupSamples.java index f4c7397ab6a4..111c9cce0276 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityGroupsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkSecurityGroupGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupGet.json */ /** * Sample code: Get network security group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsListByResourceGroupSamples.java index a25b96f2871b..4d809f34cc08 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityGroupsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkSecurityGroupList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupList.json */ /** * Sample code: List network security groups in resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsListSamples.java index 3394e0876479..b556153ee197 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsListSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityGroupsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkSecurityGroupListAll. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupListAll. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsUpdateTagsSamples.java index dba58d815f5d..78f87be1d2cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityGroupsUpdateTagsSamples.java @@ -13,7 +13,7 @@ */ public final class NetworkSecurityGroupsUpdateTagsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkSecurityGroupUpdateTags.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesCreateOrUpdateSamples.java index 3e8191017ffb..ec392499f155 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ public final class NetworkSecurityPerimeterAccessRulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspAccessRulePut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRulePut.json */ /** * Sample code: NspAccessRulePut. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesDeleteSamples.java index c3bd22c551c0..7a86b0aed17e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesDeleteSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterAccessRulesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspAccessRuleDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleDelete.json */ /** * Sample code: NspAccessRulesDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesGetSamples.java index 6f786d9b7389..981e1d82e21d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesGetSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterAccessRulesGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspAccessRuleGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleGet.json */ /** * Sample code: NspAccessRuleGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesListSamples.java index 9d707325d44e..2a27e10df5a6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesListSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterAccessRulesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspAccessRuleList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleList.json */ /** * Sample code: NspAccessRulesList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesReconcileSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesReconcileSamples.java index ddd73e6adab0..1d9f3a31689b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesReconcileSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAccessRulesReconcileSamples.java @@ -14,7 +14,7 @@ public final class NetworkSecurityPerimeterAccessRulesReconcileSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspAccessRuleReconcile.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAccessRuleReconcile.json */ /** * Sample code: NspAccessRuleReconcile. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociableResourceTypesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociableResourceTypesListSamples.java index 14219fd2ee3d..136655423696 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociableResourceTypesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociableResourceTypesListSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkSecurityPerimeterAssociableResourceTypesListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PerimeterAssociableResourcesList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsCreateOrUpdateSamples.java index 1a74ed9b4bbd..ded398c840df 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ public final class NetworkSecurityPerimeterAssociationsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspAssociationPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationPut.json */ /** * Sample code: NspAssociationPut. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsDeleteSamples.java index 1ddad7df1cb2..10216bd204ac 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsDeleteSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterAssociationsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspAssociationDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationDelete.json */ /** * Sample code: NspAssociationDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsGetSamples.java index 8c7bdbe32a3e..a7230c786c6f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsGetSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterAssociationsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspAssociationGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationGet.json */ /** * Sample code: NspAssociationGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsListSamples.java index 1c954227335b..f776a7322ea1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsListSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterAssociationsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspAssociationList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationList.json */ /** * Sample code: NspAssociationList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsReconcileSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsReconcileSamples.java index edb05017bba8..658dad4306f4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsReconcileSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterAssociationsReconcileSamples.java @@ -14,7 +14,7 @@ public final class NetworkSecurityPerimeterAssociationsReconcileSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspAssociationReconcile.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspAssociationReconcile.json */ /** * Sample code: NspAssociationReconcile. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinkReferencesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinkReferencesDeleteSamples.java index 25ca709f890f..79b04a471e93 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinkReferencesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinkReferencesDeleteSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterLinkReferencesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspLinkReferenceDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkReferenceDelete.json */ /** * Sample code: NspLinkReferenceDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinkReferencesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinkReferencesGetSamples.java index cb66b4d77e4d..66612bc52653 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinkReferencesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinkReferencesGetSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterLinkReferencesGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspLinkReferenceGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkReferenceGet.json */ /** * Sample code: NspLinkReferencesGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinkReferencesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinkReferencesListSamples.java index b1d0fe0b8282..053d7ae62c14 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinkReferencesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinkReferencesListSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterLinkReferencesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspLinkReferenceList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkReferenceList.json */ /** * Sample code: NspLinkReferenceList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinksCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinksCreateOrUpdateSamples.java index 740891a21950..e9271afc6476 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinksCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinksCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ public final class NetworkSecurityPerimeterLinksCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspLinkPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkPut.json */ /** * Sample code: NspLinksPut. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinksDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinksDeleteSamples.java index f97bd0340676..dfa290eada68 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinksDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinksDeleteSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterLinksDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspLinkDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkDelete.json */ /** * Sample code: NspLinkDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinksGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinksGetSamples.java index 48d11c64994d..85520fe54907 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinksGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinksGetSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterLinksGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspLinkGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkGet.json */ /** * Sample code: NspLinksGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinksListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinksListSamples.java index 1ef11af431e3..26c69f50638e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinksListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLinksListSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterLinksListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspLinkList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLinkList.json */ /** * Sample code: NspLinkList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSamples.java index 51df1266b93d..d898f7209980 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ public final class NetworkSecurityPerimeterLoggingConfigurationsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspLoggingConfigurationPut. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationPut. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLoggingConfigurationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLoggingConfigurationsDeleteSamples.java index a6b37d287d03..d20a909801eb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLoggingConfigurationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLoggingConfigurationsDeleteSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterLoggingConfigurationsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspLoggingConfigurationDelete + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationDelete * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLoggingConfigurationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLoggingConfigurationsGetSamples.java index 87bd4c435778..f595168146b5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLoggingConfigurationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLoggingConfigurationsGetSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterLoggingConfigurationsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspLoggingConfigurationGet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationGet. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLoggingConfigurationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLoggingConfigurationsListSamples.java index 56ae205bc320..c941bd3ec337 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLoggingConfigurationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterLoggingConfigurationsListSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterLoggingConfigurationsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspLoggingConfigurationList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspLoggingConfigurationList. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterOperationStatusesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterOperationStatusesGetSamples.java index 0f985435de86..fc6e3ea5ffdf 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterOperationStatusesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterOperationStatusesGetSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterOperationStatusesGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspOperationStatusGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspOperationStatusGet.json */ /** * Sample code: NspOperationStatusGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterProfilesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterProfilesCreateOrUpdateSamples.java index 8b7d64671447..c95d9a3ba964 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterProfilesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterProfilesCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ public final class NetworkSecurityPerimeterProfilesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspProfilePut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfilePut.json */ /** * Sample code: NspProfilesPut. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterProfilesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterProfilesDeleteSamples.java index bb0f3ca8c109..c72d39418f3a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterProfilesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterProfilesDeleteSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterProfilesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspProfileDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfileDelete.json */ /** * Sample code: NspProfilesDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterProfilesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterProfilesGetSamples.java index f3a417426829..ca0d19bd9149 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterProfilesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterProfilesGetSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterProfilesGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspProfileGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfileGet.json */ /** * Sample code: NspProfilesGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterProfilesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterProfilesListSamples.java index 582b44b850e3..34b6987e0dfd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterProfilesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterProfilesListSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterProfilesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspProfileList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspProfileList.json */ /** * Sample code: NspProfilesList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterServiceTagsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterServiceTagsListSamples.java index 388bc5094e5c..69cbf5a1ea12 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterServiceTagsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimeterServiceTagsListSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterServiceTagsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NspServiceTagsList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NspServiceTagsList.json */ /** * Sample code: NSPServiceTagsList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersCreateOrUpdateSamples.java index 56a9ebaf3d61..e53a3d6c7be3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ public final class NetworkSecurityPerimetersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkSecurityPerimeterPut. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterPut. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersDeleteSamples.java index 970cf848749d..1ec7e45788cb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkSecurityPerimetersDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkSecurityPerimeterDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersGetByResourceGroupSamples.java index 62d769524dba..8113dd3a4688 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimetersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkSecurityPerimeterGet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterGet. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersListByResourceGroupSamples.java index bebd547d40e5..56d15cad1af4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimetersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkSecurityPerimeterList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterList. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersListSamples.java index bff477a1148d..d25578db7c00 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersListSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkSecurityPerimetersListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkSecurityPerimeterListAll.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersPatchSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersPatchSamples.java index 71da76827eb8..f6fc6b8da9e7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersPatchSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkSecurityPerimetersPatchSamples.java @@ -14,7 +14,7 @@ public final class NetworkSecurityPerimetersPatchSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkSecurityPerimeterPatch + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityPerimeterPatch * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualApplianceConnectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualApplianceConnectionsCreateOrUpdateSamples.java index 040a3cf90be9..7a9c8c410007 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualApplianceConnectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualApplianceConnectionsCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class NetworkVirtualApplianceConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceConnectionPut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualApplianceConnectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualApplianceConnectionsDeleteSamples.java index 9e3af62cdf4a..bb3e76d5f74d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualApplianceConnectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualApplianceConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkVirtualApplianceConnectionsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceConnectionDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualApplianceConnectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualApplianceConnectionsGetSamples.java index 317f5af5e4e4..ba52f8e0bd0a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualApplianceConnectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualApplianceConnectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkVirtualApplianceConnectionsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceConnectionGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualApplianceConnectionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualApplianceConnectionsListSamples.java index 0b2d6d25fd2b..bd026e30a84b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualApplianceConnectionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualApplianceConnectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkVirtualApplianceConnectionsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceConnectionList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesCreateOrUpdateSamples.java index a5f4ead10daf..7dd4c53b4f9f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesCreateOrUpdateSamples.java @@ -31,7 +31,7 @@ */ public final class NetworkVirtualAppliancesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceVnetAdditionalPublicPut.json */ /** @@ -78,7 +78,7 @@ public static void createNVAInVNetWithPrivateNicPublicNicAdditionalPublicNic( } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceVnetNetworkProfilePut.json */ /** @@ -150,7 +150,7 @@ public static void createNVAInVNetWithPrivateNicPublicNicIncludingNetworkProfile } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceSaaSPut.json */ /** @@ -173,7 +173,7 @@ public static void createSaaSNetworkVirtualAppliance(com.azure.resourcemanager.A } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceVnetAdditionalPrivatePut.json */ /** @@ -220,7 +220,7 @@ public static void createNVAInVNetWithPrivateNicPublicNicAdditionalPrivateNic( } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceVnetIngressPut.json */ /** @@ -264,7 +264,7 @@ public static void createNVAInVNetWithPrivateNicPublicNicIncludingInternetIngres } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceVnetBasicPut.json */ /** @@ -306,7 +306,7 @@ public static void createNVAInVNetWithPrivateNicPublicNic(com.azure.resourcemana /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkVirtualAppliancePut. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualAppliancePut. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesDeleteSamples.java index 60537d5664a3..730e81a68fb8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesDeleteSamples.java @@ -10,7 +10,7 @@ public final class NetworkVirtualAppliancesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkVirtualApplianceDelete + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceDelete * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesGetBootDiagnosticLogsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesGetBootDiagnosticLogsSamples.java index 6b1d90c39112..2d41a7dc0b85 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesGetBootDiagnosticLogsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesGetBootDiagnosticLogsSamples.java @@ -11,7 +11,7 @@ */ public final class NetworkVirtualAppliancesGetBootDiagnosticLogsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceBootDiagnostics.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesGetByResourceGroupSamples.java index 3e81518d1919..ef823286be6e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class NetworkVirtualAppliancesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkVirtualApplianceGet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceGet. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesListByResourceGroupSamples.java index af3fd998f127..941f07aa9fe5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkVirtualAppliancesListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesListSamples.java index 2bef96b23a39..2a15c1534ecb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesListSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkVirtualAppliancesListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceListBySubscription.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesReimageSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesReimageSamples.java index e0fdad5ff9f8..74118156fe04 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesReimageSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesReimageSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkVirtualAppliancesReimageSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceSpecificReimage.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesRestartSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesRestartSamples.java index 717fe79b261c..c67eedc8c5e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesRestartSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesRestartSamples.java @@ -9,7 +9,7 @@ */ public final class NetworkVirtualAppliancesRestartSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceSpecificRestart.json */ /** @@ -27,7 +27,7 @@ public final class NetworkVirtualAppliancesRestartSamples { } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceEmptyRestart.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesUpdateTagsSamples.java index ac686fe143e9..326518738bc8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkVirtualAppliancesUpdateTagsSamples.java @@ -13,7 +13,7 @@ */ public final class NetworkVirtualAppliancesUpdateTagsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceUpdateTags.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersCheckConnectivitySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersCheckConnectivitySamples.java index 442abd0eab04..dde9bec1694e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersCheckConnectivitySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersCheckConnectivitySamples.java @@ -14,7 +14,7 @@ */ public final class NetworkWatchersCheckConnectivitySamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherConnectivityCheck.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersCreateOrUpdateSamples.java index 43d45b6c5a66..f2e49c8b3fca 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ public final class NetworkWatchersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkWatcherCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherCreate.json */ /** * Sample code: Create network watcher. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersDeleteSamples.java index e795c8fb2b75..7534e65bed05 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersDeleteSamples.java @@ -10,7 +10,7 @@ public final class NetworkWatchersDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkWatcherDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherDelete.json */ /** * Sample code: Delete network watcher. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetAzureReachabilityReportSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetAzureReachabilityReportSamples.java index 3e2076a397f2..2ef420baf95d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetAzureReachabilityReportSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetAzureReachabilityReportSamples.java @@ -14,7 +14,7 @@ */ public final class NetworkWatchersGetAzureReachabilityReportSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherAzureReachabilityReportGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetByResourceGroupSamples.java index 6718259bc23a..04a51c989c10 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class NetworkWatchersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkWatcherGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherGet.json */ /** * Sample code: Get network watcher. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetFlowLogStatusSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetFlowLogStatusSamples.java index ea28ba6a79cf..6c2c76f4ecf6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetFlowLogStatusSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetFlowLogStatusSamples.java @@ -11,7 +11,7 @@ */ public final class NetworkWatchersGetFlowLogStatusSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherFlowLogStatusQuery.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetNetworkConfigurationDiagnosticSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetNetworkConfigurationDiagnosticSamples.java index f95df4374e56..18152e979f5c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetNetworkConfigurationDiagnosticSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetNetworkConfigurationDiagnosticSamples.java @@ -14,7 +14,7 @@ */ public final class NetworkWatchersGetNetworkConfigurationDiagnosticSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherNetworkConfigurationDiagnostic.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetNextHopSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetNextHopSamples.java index 24d823e87e21..d9931c05b232 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetNextHopSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetNextHopSamples.java @@ -12,7 +12,7 @@ public final class NetworkWatchersGetNextHopSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkWatcherNextHopGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherNextHopGet.json */ /** * Sample code: Get next hop. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetTopologySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetTopologySamples.java index b39bf4ded02c..79879991464c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetTopologySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetTopologySamples.java @@ -12,7 +12,7 @@ public final class NetworkWatchersGetTopologySamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkWatcherTopologyGet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherTopologyGet. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetTroubleshootingResultSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetTroubleshootingResultSamples.java index 6ece95a03d78..827068e34254 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetTroubleshootingResultSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetTroubleshootingResultSamples.java @@ -11,7 +11,7 @@ */ public final class NetworkWatchersGetTroubleshootingResultSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherTroubleshootResultQuery.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetTroubleshootingSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetTroubleshootingSamples.java index e7f2a27fca5e..fde9e1449da7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetTroubleshootingSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetTroubleshootingSamples.java @@ -12,7 +12,7 @@ public final class NetworkWatchersGetTroubleshootingSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkWatcherTroubleshootGet + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherTroubleshootGet * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetVMSecurityRulesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetVMSecurityRulesSamples.java index e1bfd4859fb2..594b471ed21f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetVMSecurityRulesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersGetVMSecurityRulesSamples.java @@ -11,7 +11,7 @@ */ public final class NetworkWatchersGetVMSecurityRulesSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherSecurityGroupViewGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersListAvailableProvidersSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersListAvailableProvidersSamples.java index fde8800356a7..f83fdee05745 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersListAvailableProvidersSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersListAvailableProvidersSamples.java @@ -12,7 +12,7 @@ */ public final class NetworkWatchersListAvailableProvidersSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherAvailableProvidersListGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersListByResourceGroupSamples.java index d7080ec72915..18cd4683ba0c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class NetworkWatchersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkWatcherList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherList.json */ /** * Sample code: List network watchers. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersListSamples.java index d4f1542334f7..48de14e3e2b4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersListSamples.java @@ -10,7 +10,7 @@ public final class NetworkWatchersListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkWatcherListAll.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherListAll.json */ /** * Sample code: List all network watchers. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersSetFlowLogConfigurationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersSetFlowLogConfigurationSamples.java index 3f1d832e5268..29900a2b3adb 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersSetFlowLogConfigurationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersSetFlowLogConfigurationSamples.java @@ -16,7 +16,7 @@ */ public final class NetworkWatchersSetFlowLogConfigurationSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherFlowLogConfigure.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersUpdateTagsSamples.java index ec94c1332b4e..e127b324741c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class NetworkWatchersUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkWatcherUpdateTags.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherUpdateTags.json */ /** * Sample code: Update network watcher tags. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersVerifyIpFlowSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersVerifyIpFlowSamples.java index bcd05cf6262c..d2336a3ee7f4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersVerifyIpFlowSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkWatchersVerifyIpFlowSamples.java @@ -14,7 +14,7 @@ public final class NetworkWatchersVerifyIpFlowSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkWatcherIpFlowVerify. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkWatcherIpFlowVerify. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/OperationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/OperationsListSamples.java index 79d403c6e9b8..523df6ae6442 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/OperationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/OperationsListSamples.java @@ -10,7 +10,7 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/OperationList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/OperationList.json */ /** * Sample code: Get a list of operations for a resource provider. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysCreateOrUpdateSamples.java index 1c1db65fdcf9..5b11a3349a98 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysCreateOrUpdateSamples.java @@ -21,7 +21,7 @@ public final class P2SVpnGatewaysCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/P2SVpnGatewayPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayPut.json */ /** * Sample code: P2SVpnGatewayPut. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysDeleteSamples.java index dc5bee8ddf4d..dee99fe0360c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysDeleteSamples.java @@ -10,7 +10,7 @@ public final class P2SVpnGatewaysDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/P2SVpnGatewayDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayDelete.json */ /** * Sample code: P2SVpnGatewayDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysDisconnectP2SVpnConnectionsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysDisconnectP2SVpnConnectionsSamples.java index 69009b37a88d..7c32230e7941 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysDisconnectP2SVpnConnectionsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysDisconnectP2SVpnConnectionsSamples.java @@ -12,7 +12,7 @@ */ public final class P2SVpnGatewaysDisconnectP2SVpnConnectionsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * P2sVpnGatewaysDisconnectP2sVpnConnections.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysGenerateVpnProfileSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysGenerateVpnProfileSamples.java index ee738477e065..d9200702245a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysGenerateVpnProfileSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysGenerateVpnProfileSamples.java @@ -12,7 +12,7 @@ */ public final class P2SVpnGatewaysGenerateVpnProfileSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * P2SVpnGatewayGenerateVpnProfile.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysGetByResourceGroupSamples.java index ea1ba37766a0..024ae973f143 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class P2SVpnGatewaysGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/P2SVpnGatewayGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayGet.json */ /** * Sample code: P2SVpnGatewayGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedSamples.java index 303ced7cf756..5a480223877e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedSamples.java @@ -12,7 +12,7 @@ */ public final class P2SVpnGatewaysGetP2SVpnConnectionHealthDetailedSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * P2SVpnGatewayGetConnectionHealthDetailed.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysGetP2SVpnConnectionHealthSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysGetP2SVpnConnectionHealthSamples.java index 86d0aae32078..a6ba053a53c4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysGetP2SVpnConnectionHealthSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysGetP2SVpnConnectionHealthSamples.java @@ -9,7 +9,7 @@ */ public final class P2SVpnGatewaysGetP2SVpnConnectionHealthSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * P2SVpnGatewayGetConnectionHealth.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysListByResourceGroupSamples.java index 6fc7f824e019..696efe68a395 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class P2SVpnGatewaysListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * P2SVpnGatewayListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysListSamples.java index 28f2b1b89e0f..4860793f67f9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysListSamples.java @@ -10,7 +10,7 @@ public final class P2SVpnGatewaysListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/P2SVpnGatewayList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayList.json */ /** * Sample code: P2SVpnGatewayListBySubscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysResetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysResetSamples.java index c3195d7d94b7..da1d64e02d6f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysResetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysResetSamples.java @@ -10,7 +10,7 @@ public final class P2SVpnGatewaysResetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/P2SVpnGatewayReset.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayReset.json */ /** * Sample code: ResetP2SVpnGateway. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysUpdateTagsSamples.java index ccae5cd0d479..37f6f11ecb35 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/P2SVpnGatewaysUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class P2SVpnGatewaysUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/P2SVpnGatewayUpdateTags.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/P2SVpnGatewayUpdateTags.json */ /** * Sample code: P2SVpnGatewayUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesCreateSamples.java index c73b0625bd06..397d3cb42699 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesCreateSamples.java @@ -15,7 +15,7 @@ */ public final class PacketCapturesCreateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherPacketCaptureCreate.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesDeleteSamples.java index 640a9489a520..9b54d44befb9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class PacketCapturesDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherPacketCaptureDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesGetSamples.java index cbe86e2ff9dc..ab727b9c8e26 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesGetSamples.java @@ -9,7 +9,7 @@ */ public final class PacketCapturesGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherPacketCaptureGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesGetStatusSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesGetStatusSamples.java index 01681cff80ec..e08001185fee 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesGetStatusSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesGetStatusSamples.java @@ -9,7 +9,7 @@ */ public final class PacketCapturesGetStatusSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherPacketCaptureQueryStatus.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesListSamples.java index 5d74b4c8115e..af42ef5e2694 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesListSamples.java @@ -9,7 +9,7 @@ */ public final class PacketCapturesListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherPacketCapturesList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesStopSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesStopSamples.java index fae015c2f614..53b7ad83a56b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesStopSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PacketCapturesStopSamples.java @@ -9,7 +9,7 @@ */ public final class PacketCapturesStopSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkWatcherPacketCaptureStop.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PeerExpressRouteCircuitConnectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PeerExpressRouteCircuitConnectionsGetSamples.java index 5ca8916f8423..0087abdddf79 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PeerExpressRouteCircuitConnectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PeerExpressRouteCircuitConnectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class PeerExpressRouteCircuitConnectionsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PeerExpressRouteCircuitConnectionGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PeerExpressRouteCircuitConnectionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PeerExpressRouteCircuitConnectionsListSamples.java index e454fea5aada..7264e58d1e35 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PeerExpressRouteCircuitConnectionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PeerExpressRouteCircuitConnectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class PeerExpressRouteCircuitConnectionsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PeerExpressRouteCircuitConnectionList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateDnsZoneGroupsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateDnsZoneGroupsCreateOrUpdateSamples.java index a6abec32abc4..4b862a2cfe52 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateDnsZoneGroupsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateDnsZoneGroupsCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class PrivateDnsZoneGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PrivateEndpointDnsZoneGroupCreate.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateDnsZoneGroupsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateDnsZoneGroupsDeleteSamples.java index f7e9c2ca623d..656a6b0f060d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateDnsZoneGroupsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateDnsZoneGroupsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateDnsZoneGroupsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PrivateEndpointDnsZoneGroupDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateDnsZoneGroupsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateDnsZoneGroupsGetSamples.java index 3235dd2226bf..9ef6536232ed 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateDnsZoneGroupsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateDnsZoneGroupsGetSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateDnsZoneGroupsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PrivateEndpointDnsZoneGroupGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateDnsZoneGroupsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateDnsZoneGroupsListSamples.java index 07838e9b477f..ce1a5e46f87f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateDnsZoneGroupsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateDnsZoneGroupsListSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateDnsZoneGroupsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PrivateEndpointDnsZoneGroupList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsCreateOrUpdateSamples.java index 2d749b17db8e..08db011d7035 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsCreateOrUpdateSamples.java @@ -8,6 +8,7 @@ import com.azure.resourcemanager.network.fluent.models.PrivateEndpointInner; import com.azure.resourcemanager.network.fluent.models.SubnetInner; import com.azure.resourcemanager.network.models.PrivateEndpointIpConfiguration; +import com.azure.resourcemanager.network.models.PrivateEndpointIpVersionType; import com.azure.resourcemanager.network.models.PrivateLinkServiceConnection; import java.util.Arrays; @@ -17,7 +18,7 @@ public final class PrivateEndpointsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PrivateEndpointCreateWithASG. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointCreateWithASG. * json */ /** @@ -46,7 +47,7 @@ public final class PrivateEndpointsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PrivateEndpointCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointCreate.json */ /** * Sample code: Create private endpoint. @@ -61,6 +62,7 @@ public static void createPrivateEndpoint(com.azure.resourcemanager.AzureResource .createOrUpdate("rg1", "testPe", new PrivateEndpointInner().withLocation("eastus2euap") .withSubnet(new SubnetInner().withId( "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet")) + .withIpVersionType(PrivateEndpointIpVersionType.IPV4) .withPrivateLinkServiceConnections(Arrays.asList(new PrivateLinkServiceConnection() .withPrivateLinkServiceId( "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls") @@ -74,7 +76,7 @@ public static void createPrivateEndpoint(com.azure.resourcemanager.AzureResource } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PrivateEndpointCreateForManualApproval.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsDeleteSamples.java index f219d967abd6..d59eef8b05f0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsDeleteSamples.java @@ -10,7 +10,7 @@ public final class PrivateEndpointsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PrivateEndpointDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointDelete.json */ /** * Sample code: Delete private endpoint. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsGetByResourceGroupSamples.java index 7c9b7170417f..4c6e7846dc00 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class PrivateEndpointsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PrivateEndpointGetWithASG. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointGetWithASG. * json */ /** @@ -28,7 +28,7 @@ public final class PrivateEndpointsGetByResourceGroupSamples { } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PrivateEndpointGetForManualApproval.json */ /** @@ -47,7 +47,7 @@ public final class PrivateEndpointsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PrivateEndpointGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointGet.json */ /** * Sample code: Get private endpoint. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsListByResourceGroupSamples.java index fab2cee4a7a9..04704ba342c3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class PrivateEndpointsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PrivateEndpointList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointList.json */ /** * Sample code: List private endpoints in resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsListSamples.java index 1a59ad0e6047..70d35895e262 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateEndpointsListSamples.java @@ -10,7 +10,7 @@ public final class PrivateEndpointsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PrivateEndpointListAll.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateEndpointListAll.json */ /** * Sample code: List all private endpoints. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSamples.java index 5d2fcfd15bfe..44353deb9f9b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSamples.java @@ -11,7 +11,7 @@ */ public final class PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * CheckPrivateLinkServiceVisibilityByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesCheckPrivateLinkServiceVisibilitySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesCheckPrivateLinkServiceVisibilitySamples.java index b705c81280fe..05dd163613ac 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesCheckPrivateLinkServiceVisibilitySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesCheckPrivateLinkServiceVisibilitySamples.java @@ -11,7 +11,7 @@ */ public final class PrivateLinkServicesCheckPrivateLinkServiceVisibilitySamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * CheckPrivateLinkServiceVisibility.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesCreateOrUpdateSamples.java index d5b853651b2b..ee9573b4cf2e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesCreateOrUpdateSamples.java @@ -20,7 +20,7 @@ public final class PrivateLinkServicesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PrivateLinkServiceCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceCreate.json */ /** * Sample code: Create private link service. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesDeletePrivateEndpointConnectionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesDeletePrivateEndpointConnectionSamples.java index c2ae680c0ccb..27f9610bea64 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesDeletePrivateEndpointConnectionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesDeletePrivateEndpointConnectionSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateLinkServicesDeletePrivateEndpointConnectionSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PrivateLinkServiceDeletePrivateEndpointConnection.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesDeleteSamples.java index b7846ebbde03..7eba9cad0dc4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesDeleteSamples.java @@ -10,7 +10,7 @@ public final class PrivateLinkServicesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PrivateLinkServiceDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceDelete.json */ /** * Sample code: Delete private link service. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesGetByResourceGroupSamples.java index 08f5524e7e8e..454d364f22bd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class PrivateLinkServicesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PrivateLinkServiceGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceGet.json */ /** * Sample code: Get private link service. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesGetPrivateEndpointConnectionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesGetPrivateEndpointConnectionSamples.java index 81e7720fedc6..e59af6c242ee 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesGetPrivateEndpointConnectionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesGetPrivateEndpointConnectionSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateLinkServicesGetPrivateEndpointConnectionSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PrivateLinkServiceGetPrivateEndpointConnection.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSamples.java index 645ed9956775..ab22045219b2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateLinkServicesListAutoApprovedPrivateLinkServicesByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AutoApprovedPrivateLinkServicesResourceGroupGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListAutoApprovedPrivateLinkServicesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListAutoApprovedPrivateLinkServicesSamples.java index ab8931102beb..f28e17d6223d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListAutoApprovedPrivateLinkServicesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListAutoApprovedPrivateLinkServicesSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateLinkServicesListAutoApprovedPrivateLinkServicesSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AutoApprovedPrivateLinkServicesGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListByResourceGroupSamples.java index bd1c618173e1..c754f766c02b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class PrivateLinkServicesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PrivateLinkServiceList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceList.json */ /** * Sample code: List private link service in resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListPrivateEndpointConnectionsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListPrivateEndpointConnectionsSamples.java index 6bdf5333977f..adce3f180a5a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListPrivateEndpointConnectionsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListPrivateEndpointConnectionsSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateLinkServicesListPrivateEndpointConnectionsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PrivateLinkServiceListPrivateEndpointConnection.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListSamples.java index eeb94bc5df83..bee9f0bb4e34 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesListSamples.java @@ -10,7 +10,7 @@ public final class PrivateLinkServicesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PrivateLinkServiceListAll. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PrivateLinkServiceListAll. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesUpdatePrivateEndpointConnectionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesUpdatePrivateEndpointConnectionSamples.java index 31417b5a804a..b59a9d7b8cb9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesUpdatePrivateEndpointConnectionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PrivateLinkServicesUpdatePrivateEndpointConnectionSamples.java @@ -12,7 +12,7 @@ */ public final class PrivateLinkServicesUpdatePrivateEndpointConnectionSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PrivateLinkServiceUpdatePrivateEndpointConnection.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesCreateOrUpdateSamples.java index f0c57f0f8cbe..13eb65fc5827 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesCreateOrUpdateSamples.java @@ -19,7 +19,7 @@ public final class PublicIpAddressesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PublicIpAddressCreateDns.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressCreateDns.json */ /** * Sample code: Create public IP address DNS. @@ -38,7 +38,7 @@ public static void createPublicIPAddressDNS(com.azure.resourcemanager.AzureResou } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PublicIpAddressCreateCustomizedValues.json */ /** @@ -63,7 +63,7 @@ public static void createPublicIPAddressAllocationMethod(com.azure.resourcemanag /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PublicIpAddressCreateDefaults + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressCreateDefaults * .json */ /** @@ -81,7 +81,7 @@ public static void createPublicIPAddressDefaults(com.azure.resourcemanager.Azure } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PublicIpAddressCreateDnsWithDomainNameLabelScope.json */ /** @@ -103,7 +103,7 @@ public static void createPublicIPAddressDefaults(com.azure.resourcemanager.Azure } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PublicIpAddressCreateDefaultsStandardV2Sku.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesDdosProtectionStatusSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesDdosProtectionStatusSamples.java index 885bb2fe9cc6..0567f93efec0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesDdosProtectionStatusSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesDdosProtectionStatusSamples.java @@ -9,7 +9,7 @@ */ public final class PublicIpAddressesDdosProtectionStatusSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PublicIpAddressGetDdosProtectionStatus.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesDeleteSamples.java index dcdff4dfb2f5..0ff496fd5041 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesDeleteSamples.java @@ -10,7 +10,7 @@ public final class PublicIpAddressesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PublicIpAddressDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressDelete.json */ /** * Sample code: Delete public IP address. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesDisassociateCloudServiceReservedPublicIpSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesDisassociateCloudServiceReservedPublicIpSamples.java new file mode 100644 index 000000000000..cbe6c3fba304 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesDisassociateCloudServiceReservedPublicIpSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.network.generated; + +import com.azure.resourcemanager.network.models.DisassociateCloudServicePublicIpRequest; + +/** + * Samples for PublicIpAddresses DisassociateCloudServiceReservedPublicIp. + */ +public final class PublicIpAddressesDisassociateCloudServiceReservedPublicIpSamples { + /* + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ + * PublicIpAddressDisassociateCloudServiceReservedPublicIp.json + */ + /** + * Sample code: Disassociate public IP address. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void disassociatePublicIPAddress(com.azure.resourcemanager.AzureResourceManager azure) { + azure.networks() + .manager() + .serviceClient() + .getPublicIpAddresses() + .disassociateCloudServiceReservedPublicIp("rg1", "pip1", + new DisassociateCloudServicePublicIpRequest().withPublicIpArmId( + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/publicIpAddresses/pip2"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesGetByResourceGroupSamples.java index cfe496053ff2..e00d3422184e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class PublicIpAddressesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PublicIpAddressGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressGet.json */ /** * Sample code: Get public IP address. @@ -26,7 +26,7 @@ public static void getPublicIPAddress(com.azure.resourcemanager.AzureResourceMan } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PublicIpAddressGetStandardV2Sku.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesGetCloudServicePublicIpAddressSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesGetCloudServicePublicIpAddressSamples.java index b2b460af3055..ff4b16cebdd4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesGetCloudServicePublicIpAddressSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesGetCloudServicePublicIpAddressSamples.java @@ -10,7 +10,7 @@ public final class PublicIpAddressesGetCloudServicePublicIpAddressSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/CloudServicePublicIpGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServicePublicIpGet.json */ /** * Sample code: GetVMSSPublicIP. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesGetVirtualMachineScaleSetPublicIpAddressSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesGetVirtualMachineScaleSetPublicIpAddressSamples.java index 98c435b09c4b..7253985511e8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesGetVirtualMachineScaleSetPublicIpAddressSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesGetVirtualMachineScaleSetPublicIpAddressSamples.java @@ -10,7 +10,7 @@ public final class PublicIpAddressesGetVirtualMachineScaleSetPublicIpAddressSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VmssPublicIpGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssPublicIpGet.json */ /** * Sample code: GetVMSSPublicIP. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListByResourceGroupSamples.java index c41ccef95b8c..06ac8baa46a8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class PublicIpAddressesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PublicIpAddressList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressList.json */ /** * Sample code: List resource group public IP addresses. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListCloudServicePublicIpAddressesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListCloudServicePublicIpAddressesSamples.java index 01a022e9159a..3f276c106a9a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListCloudServicePublicIpAddressesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListCloudServicePublicIpAddressesSamples.java @@ -10,7 +10,7 @@ public final class PublicIpAddressesListCloudServicePublicIpAddressesSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/CloudServicePublicIpListAll. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServicePublicIpListAll. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListCloudServiceRoleInstancePublicIpAddressesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListCloudServiceRoleInstancePublicIpAddressesSamples.java index 051c40f7c880..54b195e28301 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListCloudServiceRoleInstancePublicIpAddressesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListCloudServiceRoleInstancePublicIpAddressesSamples.java @@ -9,7 +9,7 @@ */ public final class PublicIpAddressesListCloudServiceRoleInstancePublicIpAddressesSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * CloudServiceRoleInstancePublicIpList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListSamples.java index f5d5798155fc..114f56861107 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListSamples.java @@ -10,7 +10,7 @@ public final class PublicIpAddressesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PublicIpAddressListAll.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressListAll.json */ /** * Sample code: List all public IP addresses. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListVirtualMachineScaleSetPublicIpAddressesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListVirtualMachineScaleSetPublicIpAddressesSamples.java index a4dff6948bb4..2878cc97d637 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListVirtualMachineScaleSetPublicIpAddressesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListVirtualMachineScaleSetPublicIpAddressesSamples.java @@ -10,7 +10,7 @@ public final class PublicIpAddressesListVirtualMachineScaleSetPublicIpAddressesSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VmssPublicIpListAll.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssPublicIpListAll.json */ /** * Sample code: ListVMSSPublicIP. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListVirtualMachineScaleSetVMPublicIpAddressesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListVirtualMachineScaleSetVMPublicIpAddressesSamples.java index 24a43325fbc1..146db11f5a4b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListVirtualMachineScaleSetVMPublicIpAddressesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesListVirtualMachineScaleSetVMPublicIpAddressesSamples.java @@ -10,7 +10,7 @@ public final class PublicIpAddressesListVirtualMachineScaleSetVMPublicIpAddressesSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VmssVmPublicIpList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VmssVmPublicIpList.json */ /** * Sample code: ListVMSSVMPublicIP. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesReserveCloudServicePublicIpAddressSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesReserveCloudServicePublicIpAddressSamples.java new file mode 100644 index 000000000000..f8fdc954bde3 --- /dev/null +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesReserveCloudServicePublicIpAddressSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.network.generated; + +import com.azure.resourcemanager.network.models.IsRollback; +import com.azure.resourcemanager.network.models.ReserveCloudServicePublicIpAddressRequest; + +/** + * Samples for PublicIpAddresses ReserveCloudServicePublicIpAddress. + */ +public final class PublicIpAddressesReserveCloudServicePublicIpAddressSamples { + /* + * x-ms-original-file: + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressReserve.json + */ + /** + * Sample code: Reserve public IP address. + * + * @param azure The entry point for accessing resource management APIs in Azure. + */ + public static void reservePublicIPAddress(com.azure.resourcemanager.AzureResourceManager azure) { + azure.networks() + .manager() + .serviceClient() + .getPublicIpAddresses() + .reserveCloudServicePublicIpAddress("rg1", "test-ip", + new ReserveCloudServicePublicIpAddressRequest().withIsRollback(IsRollback.FALSE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesUpdateTagsSamples.java index b94f0e84bb33..6d60c8127e13 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpAddressesUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class PublicIpAddressesUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PublicIpAddressUpdateTags. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpAddressUpdateTags. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesCreateOrUpdateSamples.java index 3f59c8e51176..4a049b964701 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class PublicIpPrefixesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PublicIpPrefixCreateDefaultsStandardV2Sku.json */ /** @@ -38,7 +38,7 @@ public final class PublicIpPrefixesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PublicIpPrefixCreateDefaults. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixCreateDefaults. * json */ /** @@ -59,7 +59,7 @@ public static void createPublicIPPrefixDefaults(com.azure.resourcemanager.AzureR } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PublicIpPrefixCreateCustomizedValues.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesDeleteSamples.java index aa47c128b2da..9dee99122001 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesDeleteSamples.java @@ -10,7 +10,7 @@ public final class PublicIpPrefixesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PublicIpPrefixDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixDelete.json */ /** * Sample code: Delete public IP prefix. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesGetByResourceGroupSamples.java index 7b968ff80508..7767b98ab903 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class PublicIpPrefixesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * PublicIpPrefixGetStandardV2Sku.json */ /** @@ -27,7 +27,7 @@ public static void getPublicIPPrefixWithStandardV2Sku(com.azure.resourcemanager. /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PublicIpPrefixGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixGet.json */ /** * Sample code: Get public IP prefix. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesListByResourceGroupSamples.java index 9af513d79101..3fdaff8a2b83 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class PublicIpPrefixesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PublicIpPrefixList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixList.json */ /** * Sample code: List resource group public IP prefixes. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesListSamples.java index 2cd39221b28c..60b5be428a04 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesListSamples.java @@ -10,7 +10,7 @@ public final class PublicIpPrefixesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PublicIpPrefixListAll.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixListAll.json */ /** * Sample code: List all public IP prefixes. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesUpdateTagsSamples.java index 2d68e82f9562..f5b54e3aa331 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/PublicIpPrefixesUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class PublicIpPrefixesUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/PublicIpPrefixUpdateTags.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/PublicIpPrefixUpdateTags.json */ /** * Sample code: Update public IP prefix tags. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisIntentsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisIntentsCreateSamples.java index 913d8c420e0f..674f2ab003db 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisIntentsCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisIntentsCreateSamples.java @@ -16,7 +16,7 @@ public final class ReachabilityAnalysisIntentsCreateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ReachabilityAnalysisIntentPut + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentPut * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisIntentsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisIntentsDeleteSamples.java index 05410edf187a..cbf58351c788 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisIntentsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisIntentsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ReachabilityAnalysisIntentsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ReachabilityAnalysisIntentDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisIntentsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisIntentsGetSamples.java index 107a86948537..9f129ed901da 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisIntentsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisIntentsGetSamples.java @@ -10,7 +10,7 @@ public final class ReachabilityAnalysisIntentsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ReachabilityAnalysisIntentGet + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisIntentGet * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisIntentsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisIntentsListSamples.java index 01ea55d7f718..745e0b1bb9e9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisIntentsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisIntentsListSamples.java @@ -9,7 +9,7 @@ */ public final class ReachabilityAnalysisIntentsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ReachabilityAnalysisIntentList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisRunsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisRunsCreateSamples.java index f84d6557585f..0b1ce4edd648 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisRunsCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisRunsCreateSamples.java @@ -13,7 +13,7 @@ public final class ReachabilityAnalysisRunsCreateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ReachabilityAnalysisRunPut. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunPut. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisRunsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisRunsDeleteSamples.java index 72956e53515f..978a78710f12 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisRunsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisRunsDeleteSamples.java @@ -10,7 +10,7 @@ public final class ReachabilityAnalysisRunsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ReachabilityAnalysisRunDelete + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunDelete * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisRunsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisRunsGetSamples.java index 24e1c68e6565..efe3824ea42b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisRunsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisRunsGetSamples.java @@ -10,7 +10,7 @@ public final class ReachabilityAnalysisRunsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ReachabilityAnalysisRunGet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunGet. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisRunsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisRunsListSamples.java index 0dbe3d77a819..785eb0132189 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisRunsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ReachabilityAnalysisRunsListSamples.java @@ -10,7 +10,7 @@ public final class ReachabilityAnalysisRunsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ReachabilityAnalysisRunList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ReachabilityAnalysisRunList. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ResourceNavigationLinksListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ResourceNavigationLinksListSamples.java index c4eb6bd13bb9..20523dd6ff07 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ResourceNavigationLinksListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ResourceNavigationLinksListSamples.java @@ -9,7 +9,7 @@ */ public final class ResourceNavigationLinksListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGetResourceNavigationLinks.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFilterRulesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFilterRulesCreateOrUpdateSamples.java index 0cd88746bf12..53754045f8d9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFilterRulesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFilterRulesCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ public final class RouteFilterRulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteFilterRuleCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleCreate.json */ /** * Sample code: RouteFilterRuleCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFilterRulesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFilterRulesDeleteSamples.java index 3356fd253658..3328707b7ff4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFilterRulesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFilterRulesDeleteSamples.java @@ -10,7 +10,7 @@ public final class RouteFilterRulesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteFilterRuleDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleDelete.json */ /** * Sample code: RouteFilterRuleDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFilterRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFilterRulesGetSamples.java index 1fbd202cc3c1..f0dee67f842b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFilterRulesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFilterRulesGetSamples.java @@ -10,7 +10,7 @@ public final class RouteFilterRulesGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteFilterRuleGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterRuleGet.json */ /** * Sample code: RouteFilterRuleGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFilterRulesListByRouteFilterSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFilterRulesListByRouteFilterSamples.java index 6dfbff34ea2c..efebc4f4cbac 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFilterRulesListByRouteFilterSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFilterRulesListByRouteFilterSamples.java @@ -9,7 +9,7 @@ */ public final class RouteFilterRulesListByRouteFilterSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * RouteFilterRuleListByRouteFilter.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersCreateOrUpdateSamples.java index bfb489bb50a8..bd7fe07718e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersCreateOrUpdateSamples.java @@ -18,7 +18,7 @@ public final class RouteFiltersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteFilterCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterCreate.json */ /** * Sample code: RouteFilterCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersDeleteSamples.java index 67a37b66ccf2..0e0490228f9e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersDeleteSamples.java @@ -10,7 +10,7 @@ public final class RouteFiltersDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteFilterDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterDelete.json */ /** * Sample code: RouteFilterDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersGetByResourceGroupSamples.java index dc07028fc6ea..6e2e41c838b0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class RouteFiltersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteFilterGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterGet.json */ /** * Sample code: RouteFilterGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersListByResourceGroupSamples.java index ddee17c1cb5f..9c3837320b77 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class RouteFiltersListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * RouteFilterListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersListSamples.java index 8199f5f6dc2b..e50bef0b035a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersListSamples.java @@ -10,7 +10,7 @@ public final class RouteFiltersListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteFilterList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterList.json */ /** * Sample code: RouteFilterList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersUpdateTagsSamples.java index d9acb1c64e2e..182586982fc3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteFiltersUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class RouteFiltersUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteFilterUpdateTags.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteFilterUpdateTags.json */ /** * Sample code: Update route filter tags. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteMapsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteMapsCreateOrUpdateSamples.java index ebd5eb506276..f4a740ecb7fe 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteMapsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteMapsCreateOrUpdateSamples.java @@ -20,7 +20,7 @@ public final class RouteMapsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteMapPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapPut.json */ /** * Sample code: RouteMapPut. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteMapsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteMapsDeleteSamples.java index 8b9aa4f65ee4..a29415ce8c31 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteMapsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteMapsDeleteSamples.java @@ -10,7 +10,7 @@ public final class RouteMapsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteMapDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapDelete.json */ /** * Sample code: RouteMapDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteMapsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteMapsGetSamples.java index 94265945a0f0..a98fdf355a03 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteMapsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteMapsGetSamples.java @@ -10,7 +10,7 @@ public final class RouteMapsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteMapGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapGet.json */ /** * Sample code: RouteMapGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteMapsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteMapsListSamples.java index 8613be6dd6ae..45be1aa46fb5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteMapsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteMapsListSamples.java @@ -10,7 +10,7 @@ public final class RouteMapsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteMapList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteMapList.json */ /** * Sample code: RouteMapList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesCreateOrUpdateSamples.java index 3976cb008e42..0c0597ccf1e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ public final class RouteTablesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteTableCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableCreate.json */ /** * Sample code: Create route table. @@ -33,7 +33,7 @@ public static void createRouteTable(com.azure.resourcemanager.AzureResourceManag /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteTableCreateWithRoute. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableCreateWithRoute. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesDeleteSamples.java index 26f85a6aa15a..673ebcc0d86c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesDeleteSamples.java @@ -10,7 +10,7 @@ public final class RouteTablesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteTableDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableDelete.json */ /** * Sample code: Delete route table. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesGetByResourceGroupSamples.java index 12bab88d452a..ad4eb30a450e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class RouteTablesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteTableGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableGet.json */ /** * Sample code: Get route table. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesListByResourceGroupSamples.java index 8a60f21a9a8b..a61050d49bae 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class RouteTablesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteTableList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableList.json */ /** * Sample code: List route tables in resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesListSamples.java index df7b8b722199..8de7ec7b7ea7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesListSamples.java @@ -10,7 +10,7 @@ public final class RouteTablesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteTableListAll.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableListAll.json */ /** * Sample code: List all route tables. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesUpdateTagsSamples.java index 85146f8c6b0d..ca6653debf7c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RouteTablesUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class RouteTablesUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteTableUpdateTags.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableUpdateTags.json */ /** * Sample code: Update route table tags. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutesCreateOrUpdateSamples.java index 52a78ad42e83..60fd90bb0173 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutesCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ public final class RoutesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteTableRouteCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteCreate.json */ /** * Sample code: Create route. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutesDeleteSamples.java index f9b406e90479..1477dd477af0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutesDeleteSamples.java @@ -10,7 +10,7 @@ public final class RoutesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteTableRouteDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteDelete.json */ /** * Sample code: Delete route. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutesGetSamples.java index b5551291ed45..5379de381695 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutesGetSamples.java @@ -10,7 +10,7 @@ public final class RoutesGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteTableRouteGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteGet.json */ /** * Sample code: Get route. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutesListSamples.java index 956f9b16ee66..13365e3683e3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutesListSamples.java @@ -10,7 +10,7 @@ public final class RoutesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RouteTableRouteList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RouteTableRouteList.json */ /** * Sample code: List routes. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingIntentCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingIntentCreateOrUpdateSamples.java index 2a99ac78ac6a..2276241c0cb7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingIntentCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingIntentCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ public final class RoutingIntentCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RoutingIntentPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentPut.json */ /** * Sample code: RouteTablePut. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingIntentDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingIntentDeleteSamples.java index c5bab38ef6a0..86ee9e9e5784 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingIntentDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingIntentDeleteSamples.java @@ -10,7 +10,7 @@ public final class RoutingIntentDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RoutingIntentDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentDelete.json */ /** * Sample code: RouteTableDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingIntentGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingIntentGetSamples.java index 9ed0d0fbc789..d0745e11fe66 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingIntentGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingIntentGetSamples.java @@ -10,7 +10,7 @@ public final class RoutingIntentGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RoutingIntentGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentGet.json */ /** * Sample code: RouteTableGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingIntentListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingIntentListSamples.java index cb2847e8f592..950bdd4b583c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingIntentListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingIntentListSamples.java @@ -10,7 +10,7 @@ public final class RoutingIntentListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/RoutingIntentList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/RoutingIntentList.json */ /** * Sample code: RoutingIntentList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRuleCollectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRuleCollectionsCreateOrUpdateSamples.java index e258508f4f61..8c50194dcfe7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRuleCollectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRuleCollectionsCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class RoutingRuleCollectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerRoutingRuleCollectionPut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRuleCollectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRuleCollectionsDeleteSamples.java index 36b1420c068b..44a54ef58d04 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRuleCollectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRuleCollectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class RoutingRuleCollectionsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerRoutingRuleCollectionDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRuleCollectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRuleCollectionsGetSamples.java index d82e0fdaf5ee..96698399edb1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRuleCollectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRuleCollectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class RoutingRuleCollectionsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerRoutingRuleCollectionGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRuleCollectionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRuleCollectionsListSamples.java index 189630ab0e44..513349786bc4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRuleCollectionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRuleCollectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class RoutingRuleCollectionsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerRoutingRuleCollectionList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRulesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRulesCreateOrUpdateSamples.java index 648d837bc7ce..bffc93a50d23 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRulesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRulesCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ public final class RoutingRulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerRoutingRulePut. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRulePut. * json */ /** @@ -42,7 +42,7 @@ public static void createAnRoutingRule(com.azure.resourcemanager.AzureResourceMa /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerRoutingRulePut. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRulePut. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRulesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRulesDeleteSamples.java index 612fb4826e62..03528fec70d1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRulesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRulesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class RoutingRulesDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerRoutingRuleDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRulesGetSamples.java index ef357f7b6ca6..488592cbb4b1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRulesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRulesGetSamples.java @@ -10,7 +10,7 @@ public final class RoutingRulesGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerRoutingRuleGet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleGet. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRulesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRulesListSamples.java index 80f6d9c5a31d..04530a2a1fde 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRulesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/RoutingRulesListSamples.java @@ -10,7 +10,7 @@ public final class RoutingRulesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerRoutingRuleList + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerRoutingRuleList * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ScopeConnectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ScopeConnectionsCreateOrUpdateSamples.java index a7cec04ba647..e0adc7a11263 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ScopeConnectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ScopeConnectionsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class ScopeConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerScopeConnectionPut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ScopeConnectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ScopeConnectionsDeleteSamples.java index 35b017fce75a..4c47949996ec 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ScopeConnectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ScopeConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ScopeConnectionsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerScopeConnectionDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ScopeConnectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ScopeConnectionsGetSamples.java index ac1772394ecd..7c05509d33a8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ScopeConnectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ScopeConnectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ScopeConnectionsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerScopeConnectionGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ScopeConnectionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ScopeConnectionsListSamples.java index a03fbeec7781..26f75b42b09f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ScopeConnectionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ScopeConnectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class ScopeConnectionsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerScopeConnectionList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityAdminConfigurationsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityAdminConfigurationsCreateOrUpdateSamples.java index 872a0e0f181a..6f749cd73890 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityAdminConfigurationsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityAdminConfigurationsCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class SecurityAdminConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerSecurityAdminConfigurationPut_ManualAggregation.json */ /** @@ -37,7 +37,7 @@ public final class SecurityAdminConfigurationsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerSecurityAdminConfigurationPut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityAdminConfigurationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityAdminConfigurationsDeleteSamples.java index 4ee9c03e30e9..509ad5f97d4e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityAdminConfigurationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityAdminConfigurationsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityAdminConfigurationsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerSecurityAdminConfigurationDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityAdminConfigurationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityAdminConfigurationsGetSamples.java index 91b4ef486f4f..dd4c0e019bd1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityAdminConfigurationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityAdminConfigurationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityAdminConfigurationsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerSecurityAdminConfigurationGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityAdminConfigurationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityAdminConfigurationsListSamples.java index f9644136f94c..6280839eb282 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityAdminConfigurationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityAdminConfigurationsListSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityAdminConfigurationsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerSecurityAdminConfigurationList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersCreateOrUpdateSamples.java index f617df46da13..549ef7acc068 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ public final class SecurityPartnerProvidersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/SecurityPartnerProviderPut. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderPut. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersDeleteSamples.java index 64807d01a256..1d81be36beef 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersDeleteSamples.java @@ -10,7 +10,7 @@ public final class SecurityPartnerProvidersDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/SecurityPartnerProviderDelete + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderDelete * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersGetByResourceGroupSamples.java index eea96338caff..3f04951f9339 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class SecurityPartnerProvidersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/SecurityPartnerProviderGet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SecurityPartnerProviderGet. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersListByResourceGroupSamples.java index d80089477dc7..4642e96d4de3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityPartnerProvidersListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * SecurityPartnerProviderListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersListSamples.java index f6432e2d6986..05ab341a4aef 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersListSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityPartnerProvidersListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * SecurityPartnerProviderListBySubscription.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersUpdateTagsSamples.java index 34d9d576f034..cdee83b5dd3b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityPartnerProvidersUpdateTagsSamples.java @@ -13,7 +13,7 @@ */ public final class SecurityPartnerProvidersUpdateTagsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * SecurityPartnerProviderUpdateTags.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityRulesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityRulesCreateOrUpdateSamples.java index 6bde39d074c9..5afda0927c37 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityRulesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityRulesCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class SecurityRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkSecurityGroupRuleCreate.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityRulesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityRulesDeleteSamples.java index 284dc8e347c1..e8a5b7535aac 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityRulesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityRulesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityRulesDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkSecurityGroupRuleDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityRulesGetSamples.java index 51ba02a43aec..14161b336874 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityRulesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityRulesGetSamples.java @@ -10,7 +10,7 @@ public final class SecurityRulesGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkSecurityGroupRuleGet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleGet. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityRulesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityRulesListSamples.java index a5bbff253650..eebb66211f03 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityRulesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityRulesListSamples.java @@ -10,7 +10,7 @@ public final class SecurityRulesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkSecurityGroupRuleList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkSecurityGroupRuleList. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserConfigurationsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserConfigurationsCreateOrUpdateSamples.java index 666274e3ed1e..98ff7ad4c799 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserConfigurationsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserConfigurationsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class SecurityUserConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerSecurityUserConfigurationPut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserConfigurationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserConfigurationsDeleteSamples.java index e76d90cd9f5f..8fe8d848f329 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserConfigurationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserConfigurationsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityUserConfigurationsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerSecurityUserConfigurationDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserConfigurationsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserConfigurationsGetSamples.java index 06dbc0d996c5..53ff92454028 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserConfigurationsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserConfigurationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityUserConfigurationsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerSecurityUserConfigurationGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserConfigurationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserConfigurationsListSamples.java index 9cd9549a7b31..eefb4d1f0ec8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserConfigurationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserConfigurationsListSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityUserConfigurationsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerSecurityUserConfigurationList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRuleCollectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRuleCollectionsCreateOrUpdateSamples.java index 045d640bcff8..b782d57e1c03 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRuleCollectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRuleCollectionsCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class SecurityUserRuleCollectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerSecurityUserRuleCollectionPut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRuleCollectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRuleCollectionsDeleteSamples.java index 542690e222b5..27701aff57c7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRuleCollectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRuleCollectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityUserRuleCollectionsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerSecurityUserRuleCollectionDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRuleCollectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRuleCollectionsGetSamples.java index 6b8f01dfffcf..f05ba1552dae 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRuleCollectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRuleCollectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityUserRuleCollectionsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerSecurityUserRuleCollectionGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRuleCollectionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRuleCollectionsListSamples.java index 76d1ac8fa2b3..43dfa8086ef0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRuleCollectionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRuleCollectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityUserRuleCollectionsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerSecurityUserRuleCollectionList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRulesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRulesCreateOrUpdateSamples.java index 554da9b23e3f..9aefdd0f45dd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRulesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRulesCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ */ public final class SecurityUserRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerSecurityUserRulePut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRulesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRulesDeleteSamples.java index 983e9f985ead..d1837f244559 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRulesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRulesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityUserRulesDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerSecurityUserRuleDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRulesGetSamples.java index dd3afa8eb39f..ac3a055492ac 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRulesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRulesGetSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityUserRulesGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerSecurityUserRuleGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRulesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRulesListSamples.java index 6ee28e669abc..c22d119a877d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRulesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SecurityUserRulesListSamples.java @@ -9,7 +9,7 @@ */ public final class SecurityUserRulesListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerSecurityUserRuleList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceAssociationLinksListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceAssociationLinksListSamples.java index 068d8b585696..26634780d631 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceAssociationLinksListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceAssociationLinksListSamples.java @@ -9,7 +9,7 @@ */ public final class ServiceAssociationLinksListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGetServiceAssociationLinks.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesCreateOrUpdateSamples.java index 821a9f54def6..e3bfa97d53e5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ public final class ServiceEndpointPoliciesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ServiceEndpointPolicyCreate. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyCreate. * json */ /** @@ -32,7 +32,7 @@ public static void createServiceEndpointPolicy(com.azure.resourcemanager.AzureRe } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ServiceEndpointPolicyCreateWithDefinition.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesDeleteSamples.java index 02903e7fccdd..8da547039bfe 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesDeleteSamples.java @@ -10,7 +10,7 @@ public final class ServiceEndpointPoliciesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ServiceEndpointPolicyDelete. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyDelete. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesGetByResourceGroupSamples.java index 13e1df3f8ce2..bf2d22f6b9a4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ServiceEndpointPoliciesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ServiceEndpointPolicyGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyGet.json */ /** * Sample code: Get service endPoint Policy. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesListByResourceGroupSamples.java index b5c91a2cd09c..1b5e641465b5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ServiceEndpointPoliciesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ServiceEndpointPolicyList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyList. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesListSamples.java index 804a55260bb5..deece0c7a97e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesListSamples.java @@ -10,7 +10,7 @@ public final class ServiceEndpointPoliciesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ServiceEndpointPolicyListAll. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceEndpointPolicyListAll. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesUpdateTagsSamples.java index 02ff03611a62..ec5a93fa6f2d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPoliciesUpdateTagsSamples.java @@ -13,7 +13,7 @@ */ public final class ServiceEndpointPoliciesUpdateTagsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ServiceEndpointPolicyUpdateTags.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPolicyDefinitionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPolicyDefinitionsCreateOrUpdateSamples.java index 6b26b1868486..a9561a9d012d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPolicyDefinitionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPolicyDefinitionsCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class ServiceEndpointPolicyDefinitionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ServiceEndpointPolicyDefinitionCreate.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPolicyDefinitionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPolicyDefinitionsDeleteSamples.java index 136c50b3b1f0..778b209c5587 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPolicyDefinitionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPolicyDefinitionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ServiceEndpointPolicyDefinitionsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ServiceEndpointPolicyDefinitionDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPolicyDefinitionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPolicyDefinitionsGetSamples.java index 3e209c149454..84d84b8032e3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPolicyDefinitionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPolicyDefinitionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ServiceEndpointPolicyDefinitionsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ServiceEndpointPolicyDefinitionGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPolicyDefinitionsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPolicyDefinitionsListByResourceGroupSamples.java index 3767768700e8..956095ee93cc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPolicyDefinitionsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceEndpointPolicyDefinitionsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ServiceEndpointPolicyDefinitionsListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ServiceEndpointPolicyDefinitionList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceTagInformationListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceTagInformationListSamples.java index 6e4b4a7affbf..e8602c2e6878 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceTagInformationListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceTagInformationListSamples.java @@ -9,7 +9,7 @@ */ public final class ServiceTagInformationListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ServiceTagInformationListResultWithNoAddressPrefixes.json */ /** @@ -26,7 +26,7 @@ public static void getListOfServiceTagsWithNoAddressPrefixes(com.azure.resourcem } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ServiceTagInformationListResult.json */ /** @@ -43,7 +43,7 @@ public static void getListOfServiceTags(com.azure.resourcemanager.AzureResourceM } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * ServiceTagInformationListResultWithTagname.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceTagsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceTagsListSamples.java index 9242b0803eb5..99fd8e1d1afe 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceTagsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/ServiceTagsListSamples.java @@ -10,7 +10,7 @@ public final class ServiceTagsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ServiceTagsList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ServiceTagsList.json */ /** * Sample code: Get list of service tags. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticCidrsCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticCidrsCreateSamples.java index 8cea82f984a5..510addf187d1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticCidrsCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticCidrsCreateSamples.java @@ -10,7 +10,7 @@ public final class StaticCidrsCreateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/StaticCidrs_Create.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_Create.json */ /** * Sample code: StaticCidrs_Create. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticCidrsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticCidrsDeleteSamples.java index 1ac27f29474b..910f31aa8313 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticCidrsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticCidrsDeleteSamples.java @@ -10,7 +10,7 @@ public final class StaticCidrsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/StaticCidrs_Delete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_Delete.json */ /** * Sample code: StaticCidrs_Delete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticCidrsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticCidrsGetSamples.java index 139dcfe8d7ef..db69f214c844 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticCidrsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticCidrsGetSamples.java @@ -10,7 +10,7 @@ public final class StaticCidrsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/StaticCidrs_Get.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_Get.json */ /** * Sample code: StaticCidrs_Get. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticCidrsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticCidrsListSamples.java index 03620f39a873..d851aa8f9aad 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticCidrsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticCidrsListSamples.java @@ -10,7 +10,7 @@ public final class StaticCidrsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/StaticCidrs_List.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/StaticCidrs_List.json */ /** * Sample code: StaticCidrs_List. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticMembersCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticMembersCreateOrUpdateSamples.java index 0b848e2bd6b2..7f80af018113 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticMembersCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticMembersCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ public final class StaticMembersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerStaticMemberPut + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberPut * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticMembersDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticMembersDeleteSamples.java index 8284ce222ccf..beb7eb5037e5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticMembersDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticMembersDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class StaticMembersDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerStaticMemberDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticMembersGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticMembersGetSamples.java index c74d770b9b9c..596ce13cbf9d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticMembersGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticMembersGetSamples.java @@ -10,7 +10,7 @@ public final class StaticMembersGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkManagerStaticMemberGet + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkManagerStaticMemberGet * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticMembersListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticMembersListSamples.java index dcb31e57ffaa..cb6b15c1b53f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticMembersListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/StaticMembersListSamples.java @@ -9,7 +9,7 @@ */ public final class StaticMembersListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerStaticMemberList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsCreateOrUpdateSamples.java index 57206950131d..edaaefac95e0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ public final class SubnetsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/SubnetCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetCreate.json */ /** * Sample code: Create subnet. @@ -32,7 +32,7 @@ public static void createSubnet(com.azure.resourcemanager.AzureResourceManager a } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * SubnetCreateServiceEndpointNetworkIdentifier.json */ /** @@ -56,7 +56,7 @@ public static void createSubnet(com.azure.resourcemanager.AzureResourceManager a /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/SubnetCreateServiceEndpoint. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetCreateServiceEndpoint. * json */ /** @@ -78,7 +78,7 @@ public static void createSubnetWithServiceEndpoints(com.azure.resourcemanager.Az /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/SubnetCreateWithDelegation. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetCreateWithDelegation. * json */ /** @@ -97,7 +97,7 @@ public static void createSubnetWithADelegation(com.azure.resourcemanager.AzureRe /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/SubnetCreateWithSharingScope. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetCreateWithSharingScope. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsDeleteSamples.java index e34f298b1de8..443d66a8718f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsDeleteSamples.java @@ -10,7 +10,7 @@ public final class SubnetsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/SubnetDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetDelete.json */ /** * Sample code: Delete subnet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsGetSamples.java index 5b954b1c3d6e..79281e05e621 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsGetSamples.java @@ -10,7 +10,7 @@ public final class SubnetsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/SubnetGetWithSharingScope. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetGetWithSharingScope. * json */ /** @@ -28,7 +28,7 @@ public static void getSubnetWithSharingScope(com.azure.resourcemanager.AzureReso /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/SubnetGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetGet.json */ /** * Sample code: Get subnet. @@ -45,7 +45,7 @@ public static void getSubnet(com.azure.resourcemanager.AzureResourceManager azur /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/SubnetGetWithDelegation.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetGetWithDelegation.json */ /** * Sample code: Get subnet with a delegation. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsListSamples.java index a1a0edb9b11c..368fec80f1e9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsListSamples.java @@ -10,7 +10,7 @@ public final class SubnetsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/SubnetList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetList.json */ /** * Sample code: List subnets. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsPrepareNetworkPoliciesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsPrepareNetworkPoliciesSamples.java index ab3578bcfc7e..edd243b73fc1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsPrepareNetworkPoliciesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsPrepareNetworkPoliciesSamples.java @@ -12,7 +12,7 @@ public final class SubnetsPrepareNetworkPoliciesSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/SubnetPrepareNetworkPolicies. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/SubnetPrepareNetworkPolicies. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsUnprepareNetworkPoliciesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsUnprepareNetworkPoliciesSamples.java index d51486774f53..2a80153cb70c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsUnprepareNetworkPoliciesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubnetsUnprepareNetworkPoliciesSamples.java @@ -11,7 +11,7 @@ */ public final class SubnetsUnprepareNetworkPoliciesSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * SubnetUnprepareNetworkPolicies.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubscriptionNetworkManagerConnectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubscriptionNetworkManagerConnectionsCreateOrUpdateSamples.java index ff56e24ec059..9e04f8b0e4c9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubscriptionNetworkManagerConnectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubscriptionNetworkManagerConnectionsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class SubscriptionNetworkManagerConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerConnectionSubscriptionPut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubscriptionNetworkManagerConnectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubscriptionNetworkManagerConnectionsDeleteSamples.java index 748cb3394299..cdbb88942a6a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubscriptionNetworkManagerConnectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubscriptionNetworkManagerConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class SubscriptionNetworkManagerConnectionsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerConnectionSubscriptionDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubscriptionNetworkManagerConnectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubscriptionNetworkManagerConnectionsGetSamples.java index fd2e0dbaeff6..3ccbe08a7955 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubscriptionNetworkManagerConnectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubscriptionNetworkManagerConnectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class SubscriptionNetworkManagerConnectionsGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerConnectionSubscriptionGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubscriptionNetworkManagerConnectionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubscriptionNetworkManagerConnectionsListSamples.java index 4c74e550c6e9..60fed0bc7afe 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubscriptionNetworkManagerConnectionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/SubscriptionNetworkManagerConnectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class SubscriptionNetworkManagerConnectionsListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkManagerConnectionSubscriptionList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/UsagesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/UsagesListSamples.java index 9517cb78faae..1c3592a7cdd2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/UsagesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/UsagesListSamples.java @@ -10,7 +10,7 @@ public final class UsagesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/UsageList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/UsageList.json */ /** * Sample code: List usages. @@ -23,7 +23,7 @@ public static void listUsages(com.azure.resourcemanager.AzureResourceManager azu /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/UsageListSpacedLocation.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/UsageListSpacedLocation.json */ /** * Sample code: List usages spaced location. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesCreateSamples.java index 68aa9abb321a..976cadd92878 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesCreateSamples.java @@ -13,7 +13,7 @@ public final class VerifierWorkspacesCreateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VerifierWorkspacePut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspacePut.json */ /** * Sample code: VerifierWorkspaceCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesDeleteSamples.java index b77cf7c37ad8..d74411aa20a2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesDeleteSamples.java @@ -10,7 +10,7 @@ public final class VerifierWorkspacesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VerifierWorkspaceDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspaceDelete.json */ /** * Sample code: VerifierWorkspaceDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesGetSamples.java index 6ee3efda832e..0513770ace07 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesGetSamples.java @@ -10,7 +10,7 @@ public final class VerifierWorkspacesGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VerifierWorkspaceGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspaceGet.json */ /** * Sample code: VerifierWorkspaceGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesListSamples.java index ebc2d6531c2b..9612ee14aeaa 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesListSamples.java @@ -10,7 +10,7 @@ public final class VerifierWorkspacesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VerifierWorkspaceList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspaceList.json */ /** * Sample code: VerifierWorkspaceList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesUpdateSamples.java index c7abf852d276..5c556804bb17 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VerifierWorkspacesUpdateSamples.java @@ -10,7 +10,7 @@ public final class VerifierWorkspacesUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VerifierWorkspacePatch.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VerifierWorkspacePatch.json */ /** * Sample code: VerifierWorkspacePatch. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VipSwapCreateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VipSwapCreateSamples.java index 32082c62b063..17a1c611ab46 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VipSwapCreateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VipSwapCreateSamples.java @@ -14,7 +14,7 @@ public final class VipSwapCreateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/CloudServiceSwapPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceSwapPut.json */ /** * Sample code: Put vip swap operation. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VipSwapGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VipSwapGetSamples.java index ac96299d5002..5001b933aa36 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VipSwapGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VipSwapGetSamples.java @@ -10,7 +10,7 @@ public final class VipSwapGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/CloudServiceSwapGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceSwapGet.json */ /** * Sample code: Get swap resource. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VipSwapListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VipSwapListSamples.java index d91e0045fd05..d119dbf83034 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VipSwapListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VipSwapListSamples.java @@ -10,7 +10,7 @@ public final class VipSwapListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/CloudServiceSwapList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/CloudServiceSwapList.json */ /** * Sample code: Get swap resource list. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSitesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSitesCreateOrUpdateSamples.java index 28dc4c2e6780..abfde6c9b8b0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSitesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSitesCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class VirtualApplianceSitesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceSitePut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSitesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSitesDeleteSamples.java index cd7acb36f2db..0208aef8046b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSitesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSitesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualApplianceSitesDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceSiteDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSitesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSitesGetSamples.java index b8798290f937..22967a8d4105 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSitesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSitesGetSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualApplianceSitesGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceSiteGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSitesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSitesListSamples.java index b52b76af678f..98b18208b3e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSitesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSitesListSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualApplianceSitesListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceSiteList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSkusGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSkusGetSamples.java index 15e9f169f3f9..42fbfb0dd9a6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSkusGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSkusGetSamples.java @@ -10,7 +10,7 @@ public final class VirtualApplianceSkusGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/NetworkVirtualApplianceSkuGet + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/NetworkVirtualApplianceSkuGet * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSkusListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSkusListSamples.java index 7a417e3f8f87..65855ac6967c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSkusListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualApplianceSkusListSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualApplianceSkusListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * NetworkVirtualApplianceSkuList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsCreateOrUpdateSamples.java index 87f1eb8ee33b..6dad1ae5b601 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ public final class VirtualHubBgpConnectionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualHubBgpConnectionPut. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionPut. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsDeleteSamples.java index c217ac7adc89..ad3f5c768b1b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsDeleteSamples.java @@ -10,7 +10,7 @@ public final class VirtualHubBgpConnectionsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualHubBgpConnectionDelete + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionDelete * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsGetSamples.java index 60a27fa74183..1dc4f5b627ec 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsGetSamples.java @@ -10,7 +10,7 @@ public final class VirtualHubBgpConnectionsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualHubBgpConnectionGet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionGet. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsListAdvertisedRoutesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsListAdvertisedRoutesSamples.java index 118c448f3e04..c1c319be722e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsListAdvertisedRoutesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsListAdvertisedRoutesSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualHubBgpConnectionsListAdvertisedRoutesSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualRouterPeerListAdvertisedRoute.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsListLearnedRoutesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsListLearnedRoutesSamples.java index cda91a8caf04..e14adfbb07ca 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsListLearnedRoutesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsListLearnedRoutesSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualHubBgpConnectionsListLearnedRoutesSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualRouterPeerListLearnedRoute.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsListSamples.java index b198b1ea90a9..8f8c0671b237 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubBgpConnectionsListSamples.java @@ -10,7 +10,7 @@ public final class VirtualHubBgpConnectionsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualHubBgpConnectionList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubBgpConnectionList. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubIpConfigurationCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubIpConfigurationCreateOrUpdateSamples.java index 3655ece1c40a..ba1ffbfb6339 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubIpConfigurationCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubIpConfigurationCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ public final class VirtualHubIpConfigurationCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualHubIpConfigurationPut. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationPut. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubIpConfigurationDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubIpConfigurationDeleteSamples.java index 2815737165e7..4e1b4cc5e8d7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubIpConfigurationDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubIpConfigurationDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualHubIpConfigurationDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualHubIpConfigurationDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubIpConfigurationGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubIpConfigurationGetSamples.java index 8686c914dd57..05702d2bcae2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubIpConfigurationGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubIpConfigurationGetSamples.java @@ -10,7 +10,7 @@ public final class VirtualHubIpConfigurationGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualHubIpConfigurationGet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationGet. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubIpConfigurationListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubIpConfigurationListSamples.java index f9548fc79426..c1a63c533b9d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubIpConfigurationListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubIpConfigurationListSamples.java @@ -10,7 +10,7 @@ public final class VirtualHubIpConfigurationListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualHubIpConfigurationList + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubIpConfigurationList * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubRouteTableV2SCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubRouteTableV2SCreateOrUpdateSamples.java index 2c1265047905..0225a5416e63 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubRouteTableV2SCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubRouteTableV2SCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ public final class VirtualHubRouteTableV2SCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualHubRouteTableV2Put. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2Put. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubRouteTableV2SDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubRouteTableV2SDeleteSamples.java index 9c0f5e6996bb..980fd513e01c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubRouteTableV2SDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubRouteTableV2SDeleteSamples.java @@ -10,7 +10,7 @@ public final class VirtualHubRouteTableV2SDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualHubRouteTableV2Delete. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2Delete. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubRouteTableV2SGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubRouteTableV2SGetSamples.java index ed7d11a330b3..591d0a3ada31 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubRouteTableV2SGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubRouteTableV2SGetSamples.java @@ -10,7 +10,7 @@ public final class VirtualHubRouteTableV2SGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualHubRouteTableV2Get. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2Get. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubRouteTableV2SListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubRouteTableV2SListSamples.java index f6021c955fa8..6f6fbcdbf955 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubRouteTableV2SListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubRouteTableV2SListSamples.java @@ -10,7 +10,7 @@ public final class VirtualHubRouteTableV2SListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualHubRouteTableV2List. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubRouteTableV2List. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsCreateOrUpdateSamples.java index 8170f74e4e19..2363476dfecc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ public final class VirtualHubsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualHubPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubPut.json */ /** * Sample code: VirtualHubPut. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsDeleteSamples.java index 68f4d4ea3ef6..b4877dae6df0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsDeleteSamples.java @@ -10,7 +10,7 @@ public final class VirtualHubsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualHubDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubDelete.json */ /** * Sample code: VirtualHubDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsGetByResourceGroupSamples.java index ff8c648ccd3e..6ebf1750ad86 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VirtualHubsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualHubGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubGet.json */ /** * Sample code: VirtualHubGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsGetEffectiveVirtualHubRoutesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsGetEffectiveVirtualHubRoutesSamples.java index 624d25f3f8f6..cfdfa3e67780 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsGetEffectiveVirtualHubRoutesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsGetEffectiveVirtualHubRoutesSamples.java @@ -11,7 +11,7 @@ */ public final class VirtualHubsGetEffectiveVirtualHubRoutesSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * EffectiveRoutesListForRouteTable.json */ /** @@ -30,7 +30,7 @@ public static void effectiveRoutesForARouteTableResource(com.azure.resourcemanag } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * EffectiveRoutesListForConnection.json */ /** @@ -49,7 +49,7 @@ public static void effectiveRoutesForAConnectionResource(com.azure.resourcemanag } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * EffectiveRoutesListForVirtualHub.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsGetInboundRoutesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsGetInboundRoutesSamples.java index dd60402a36d6..d08329ccf16b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsGetInboundRoutesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsGetInboundRoutesSamples.java @@ -12,7 +12,7 @@ public final class VirtualHubsGetInboundRoutesSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/GetInboundRoutes.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetInboundRoutes.json */ /** * Sample code: Inbound Routes for the Virtual Hub on a Particular Connection. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsGetOutboundRoutesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsGetOutboundRoutesSamples.java index ab56a7d1f9dc..d3a24d5d07a0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsGetOutboundRoutesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsGetOutboundRoutesSamples.java @@ -12,7 +12,7 @@ public final class VirtualHubsGetOutboundRoutesSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/GetOutboundRoutes.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/GetOutboundRoutes.json */ /** * Sample code: Outbound Routes for the Virtual Hub on a Particular Connection. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsListByResourceGroupSamples.java index ebfbf2819f1f..b438b02885d6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VirtualHubsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualHubListByResourceGroup + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubListByResourceGroup * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsListSamples.java index e7048c331179..9f7fb259a668 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsListSamples.java @@ -10,7 +10,7 @@ public final class VirtualHubsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualHubList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubList.json */ /** * Sample code: VirtualHubList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsUpdateTagsSamples.java index 3bcdfd29a684..d7db3e379401 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualHubsUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class VirtualHubsUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualHubUpdateTags.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualHubUpdateTags.json */ /** * Sample code: VirtualHubUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsCreateOrUpdateSamples.java index 359015f75e1b..3be9ccafdab5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsCreateOrUpdateSamples.java @@ -33,7 +33,7 @@ */ public final class VirtualNetworkGatewayConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayConnectionCreate.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsDeleteSamples.java index 48a760a3f3d0..4214894e7051 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewayConnectionsDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayConnectionDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsGetByResourceGroupSamples.java index 1feaae2f938e..e90107454730 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewayConnectionsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayConnectionGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsGetIkeSasSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsGetIkeSasSamples.java index 104bf549b36d..997320ad4576 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsGetIkeSasSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsGetIkeSasSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewayConnectionsGetIkeSasSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayConnectionGetIkeSas.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsGetSharedKeySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsGetSharedKeySamples.java index f8921240ac00..b92e48eb31c2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsGetSharedKeySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsGetSharedKeySamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewayConnectionsGetSharedKeySamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayConnectionGetSharedKey.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsListByResourceGroupSamples.java index a1082503b1a4..401ca8139a8c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewayConnectionsListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayConnectionsList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsResetConnectionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsResetConnectionSamples.java index e28b2c3debd7..97e71555fff2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsResetConnectionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsResetConnectionSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewayConnectionsResetConnectionSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayConnectionReset.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsResetSharedKeySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsResetSharedKeySamples.java index 0f86e19ec94f..c6086b6ef169 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsResetSharedKeySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsResetSharedKeySamples.java @@ -11,7 +11,7 @@ */ public final class VirtualNetworkGatewayConnectionsResetSharedKeySamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayConnectionResetSharedKey.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsSetSharedKeySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsSetSharedKeySamples.java index 223c5cd10cca..01148500d573 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsSetSharedKeySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsSetSharedKeySamples.java @@ -11,7 +11,7 @@ */ public final class VirtualNetworkGatewayConnectionsSetSharedKeySamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayConnectionSetSharedKey.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsStartPacketCaptureSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsStartPacketCaptureSamples.java index 27672f8b1ff3..b8f0770f5a53 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsStartPacketCaptureSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsStartPacketCaptureSamples.java @@ -11,7 +11,7 @@ */ public final class VirtualNetworkGatewayConnectionsStartPacketCaptureSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayConnectionStartPacketCapture.json */ /** @@ -29,7 +29,7 @@ public static void startPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFil } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsStopPacketCaptureSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsStopPacketCaptureSamples.java index 42561d518d19..d54603530fd2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsStopPacketCaptureSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsStopPacketCaptureSamples.java @@ -11,7 +11,7 @@ */ public final class VirtualNetworkGatewayConnectionsStopPacketCaptureSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayConnectionStopPacketCapture.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsUpdateTagsSamples.java index 9ffc8d28f9fa..70ddc70e224d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayConnectionsUpdateTagsSamples.java @@ -13,7 +13,7 @@ */ public final class VirtualNetworkGatewayConnectionsUpdateTagsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayConnectionUpdateTags.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayNatRulesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayNatRulesCreateOrUpdateSamples.java index eced9f74a891..3601519bf7c9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayNatRulesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayNatRulesCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class VirtualNetworkGatewayNatRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayNatRulePut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayNatRulesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayNatRulesDeleteSamples.java index a89221e964d0..b50f9af25603 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayNatRulesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayNatRulesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewayNatRulesDeleteSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayNatRuleDelete.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayNatRulesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayNatRulesGetSamples.java index cb94784149c3..cc7c46122f3b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayNatRulesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayNatRulesGetSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewayNatRulesGetSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayNatRuleGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySamples.java index 82d245f426c0..1ecdaff1537e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewaySamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayNatRuleList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysCreateOrUpdateSamples.java index 916aa6369780..71efaa44094d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysCreateOrUpdateSamples.java @@ -9,12 +9,15 @@ import com.azure.resourcemanager.network.fluent.models.VirtualNetworkGatewayIpConfigurationInner; import com.azure.resourcemanager.network.fluent.models.VirtualNetworkGatewayNatRuleInner; import com.azure.resourcemanager.network.models.AddressSpace; +import com.azure.resourcemanager.network.models.AdminState; import com.azure.resourcemanager.network.models.BgpSettings; import com.azure.resourcemanager.network.models.IpAllocationMethod; import com.azure.resourcemanager.network.models.ManagedServiceIdentity; import com.azure.resourcemanager.network.models.ManagedServiceIdentityUserAssignedIdentities; import com.azure.resourcemanager.network.models.RadiusServer; import com.azure.resourcemanager.network.models.ResourceIdentityType; +import com.azure.resourcemanager.network.models.VirtualNetworkGatewayAutoScaleBounds; +import com.azure.resourcemanager.network.models.VirtualNetworkGatewayAutoScaleConfiguration; import com.azure.resourcemanager.network.models.VirtualNetworkGatewaySku; import com.azure.resourcemanager.network.models.VirtualNetworkGatewaySkuName; import com.azure.resourcemanager.network.models.VirtualNetworkGatewaySkuTier; @@ -35,7 +38,7 @@ public final class VirtualNetworkGatewaysCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkGatewayUpdate. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayUpdate. * json */ /** @@ -99,7 +102,7 @@ public static void updateVirtualNetworkGateway(com.azure.resourcemanager.AzureRe } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkScalableGatewayUpdate.json */ /** @@ -113,9 +116,11 @@ public static void updateVirtualNetworkScalableGateway(com.azure.resourcemanager .serviceClient() .getVirtualNetworkGateways() .createOrUpdate("rg1", "ergw", new VirtualNetworkGatewayInner().withLocation("centralus") + .withAutoScaleConfiguration(new VirtualNetworkGatewayAutoScaleConfiguration() + .withBounds(new VirtualNetworkGatewayAutoScaleBounds().withMin(2).withMax(3))) .withIpConfigurations(Arrays.asList(new VirtualNetworkGatewayIpConfigurationInner() .withName("gwipconfig1") - .withPrivateIpAllocationMethod(IpAllocationMethod.STATIC) + .withPrivateIpAllocationMethod(IpAllocationMethod.DYNAMIC) .withSubnet(new SubResource().withId( "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet")) .withPublicIpAddress(new SubResource().withId( @@ -127,25 +132,12 @@ public static void updateVirtualNetworkScalableGateway(com.azure.resourcemanager .withDisableIpSecReplayProtection(false) .withSku(new VirtualNetworkGatewaySku().withName(VirtualNetworkGatewaySkuName.ER_GW_SCALE) .withTier(VirtualNetworkGatewaySkuTier.ER_GW_SCALE)) - .withNatRules(Arrays.asList(new VirtualNetworkGatewayNatRuleInner().withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/ergw/natRules/natRule1") - .withName("natRule1") - .withTypePropertiesType(VpnNatRuleType.STATIC) - .withMode(VpnNatRuleMode.EGRESS_SNAT) - .withInternalMappings(Arrays.asList(new VpnNatRuleMapping().withAddressSpace("10.10.0.0/24"))) - .withExternalMappings(Arrays.asList(new VpnNatRuleMapping().withAddressSpace("50.0.0.0/24"))) - .withIpConfigurationId(""), - new VirtualNetworkGatewayNatRuleInner().withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/ergw/natRules/natRule2") - .withName("natRule2") - .withTypePropertiesType(VpnNatRuleType.STATIC) - .withMode(VpnNatRuleMode.INGRESS_SNAT) - .withInternalMappings(Arrays.asList(new VpnNatRuleMapping().withAddressSpace("20.10.0.0/24"))) - .withExternalMappings(Arrays.asList(new VpnNatRuleMapping().withAddressSpace("30.0.0.0/24"))) - .withIpConfigurationId(""))) + .withVirtualNetworkGatewayPolicyGroups(Arrays.asList()) + .withNatRules(Arrays.asList()) .withEnableBgpRouteTranslationForNat(false) .withAllowVirtualWanTraffic(false) - .withAllowRemoteVnetTraffic(false), com.azure.core.util.Context.NONE); + .withAllowRemoteVnetTraffic(false) + .withAdminState(AdminState.ENABLED), com.azure.core.util.Context.NONE); } // Use "Map.of" if available diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysDeleteSamples.java index 8ef3914569e2..3477473ce1e4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysDeleteSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworkGatewaysDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkGatewayDelete. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayDelete. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSamples.java index 71f6cc99d3e9..067c129bfba5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSamples.java @@ -12,7 +12,7 @@ */ public final class VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewaysDisconnectP2sVpnConnections.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGenerateVpnProfileSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGenerateVpnProfileSamples.java index 68c6e3cb2a48..0f91a9ca7bb9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGenerateVpnProfileSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGenerateVpnProfileSamples.java @@ -11,7 +11,7 @@ */ public final class VirtualNetworkGatewaysGenerateVpnProfileSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayGenerateVpnProfile.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGeneratevpnclientpackageSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGeneratevpnclientpackageSamples.java index 67a254556e86..b80cca91ed7f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGeneratevpnclientpackageSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGeneratevpnclientpackageSamples.java @@ -11,7 +11,7 @@ */ public final class VirtualNetworkGatewaysGeneratevpnclientpackageSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayGenerateVpnClientPackage.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetAdvertisedRoutesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetAdvertisedRoutesSamples.java index 3cb43d45702a..fe80e48feb1c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetAdvertisedRoutesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetAdvertisedRoutesSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysGetAdvertisedRoutesSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayGetAdvertisedRoutes.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetBgpPeerStatusSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetBgpPeerStatusSamples.java index 54a543c5046b..05d02adca028 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetBgpPeerStatusSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetBgpPeerStatusSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysGetBgpPeerStatusSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayGetBGPPeerStatus.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetByResourceGroupSamples.java index aeea05789705..936703a6f785 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworkGatewaysGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkGatewayGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayGet.json */ /** * Sample code: GetVirtualNetworkGateway. @@ -26,7 +26,7 @@ public static void getVirtualNetworkGateway(com.azure.resourcemanager.AzureResou } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkScalableGatewayGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetFailoverAllTestDetailsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetFailoverAllTestDetailsSamples.java index dc0984dd065e..2bec3d51d97b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetFailoverAllTestDetailsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetFailoverAllTestDetailsSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysGetFailoverAllTestDetailsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayGetFailoverAllTestsDetails.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetFailoverSingleTestDetailsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetFailoverSingleTestDetailsSamples.java index 90cd97be4613..7f1bdc62a208 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetFailoverSingleTestDetailsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetFailoverSingleTestDetailsSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysGetFailoverSingleTestDetailsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayGetFailoverSingleTestDetails.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetLearnedRoutesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetLearnedRoutesSamples.java index 99485f39acc8..ce6329af0057 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetLearnedRoutesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetLearnedRoutesSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysGetLearnedRoutesSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayLearnedRoutes.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetResiliencyInformationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetResiliencyInformationSamples.java index cf1854b15554..b996af2ae5c6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetResiliencyInformationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetResiliencyInformationSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysGetResiliencyInformationSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayGetResiliencyInformation.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetRoutesInformationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetRoutesInformationSamples.java index d8a2550a445f..dbb9e4344960 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetRoutesInformationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetRoutesInformationSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysGetRoutesInformationSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayGetRoutesInformation.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetVpnProfilePackageUrlSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetVpnProfilePackageUrlSamples.java index 58543a6acaab..22e48f0549e1 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetVpnProfilePackageUrlSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetVpnProfilePackageUrlSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysGetVpnProfilePackageUrlSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayGetVpnProfilePackageUrl.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetVpnclientConnectionHealthSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetVpnclientConnectionHealthSamples.java index 89e38445b410..1b60c9a47f75 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetVpnclientConnectionHealthSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetVpnclientConnectionHealthSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysGetVpnclientConnectionHealthSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayGetVpnclientConnectionHealth.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetVpnclientIpsecParametersSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetVpnclientIpsecParametersSamples.java index edd680d9226b..ae8b7035998d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetVpnclientIpsecParametersSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysGetVpnclientIpsecParametersSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysGetVpnclientIpsecParametersSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayGetVpnClientIpsecParameters.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysInvokeAbortMigrationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysInvokeAbortMigrationSamples.java index 95e8ad1acfd9..0b680aa2f005 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysInvokeAbortMigrationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysInvokeAbortMigrationSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysInvokeAbortMigrationSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayAbortMigration.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysInvokeCommitMigrationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysInvokeCommitMigrationSamples.java index cdc3c993a70b..b5f75616ef9a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysInvokeCommitMigrationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysInvokeCommitMigrationSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysInvokeCommitMigrationSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayCommitMigration.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysInvokeExecuteMigrationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysInvokeExecuteMigrationSamples.java index 72b09c04bc2a..5e37d573111f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysInvokeExecuteMigrationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysInvokeExecuteMigrationSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysInvokeExecuteMigrationSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayExecuteMigration.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysInvokePrepareMigrationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysInvokePrepareMigrationSamples.java index e30ba90bab0c..1d520fd74996 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysInvokePrepareMigrationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysInvokePrepareMigrationSamples.java @@ -12,7 +12,7 @@ */ public final class VirtualNetworkGatewaysInvokePrepareMigrationSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayPrepareMigration.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysListByResourceGroupSamples.java index be2867387278..4bc0a8e90596 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworkGatewaysListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkGatewayList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayList. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysListConnectionsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysListConnectionsSamples.java index 5859d05a8d69..c563c7b27773 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysListConnectionsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysListConnectionsSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysListConnectionsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewaysListConnections.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysListRadiusSecretsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysListRadiusSecretsSamples.java index bef620f08ee4..8a9be2a5dae9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysListRadiusSecretsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysListRadiusSecretsSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysListRadiusSecretsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AllVirtualNetworkGatewayRadiusServerSecretsList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysResetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysResetSamples.java index f1e9e64a5e9b..bc5dd1c81769 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysResetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysResetSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworkGatewaysResetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkGatewayReset. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGatewayReset. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysResetVpnClientSharedKeySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysResetVpnClientSharedKeySamples.java index 602255f05ebe..b28595705554 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysResetVpnClientSharedKeySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysResetVpnClientSharedKeySamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysResetVpnClientSharedKeySamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayResetVpnClientSharedKey.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysSetVpnclientIpsecParametersSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysSetVpnclientIpsecParametersSamples.java index 8c79d7ae9922..e7b24c73294a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysSetVpnclientIpsecParametersSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysSetVpnclientIpsecParametersSamples.java @@ -17,7 +17,7 @@ */ public final class VirtualNetworkGatewaysSetVpnclientIpsecParametersSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewaySetVpnClientIpsecParameters.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSamples.java index 053d1a79dd61..cc03b9bca27e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysStartExpressRouteSiteFailoverSimulationSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayStartSiteFailoverSimulation.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysStartPacketCaptureSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysStartPacketCaptureSamples.java index 1fab470adbe5..b139b480764d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysStartPacketCaptureSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysStartPacketCaptureSamples.java @@ -11,7 +11,7 @@ */ public final class VirtualNetworkGatewaysStartPacketCaptureSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayStartPacketCaptureFilterData.json */ /** @@ -31,7 +31,7 @@ public final class VirtualNetworkGatewaysStartPacketCaptureSamples { } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayStartPacketCapture.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSamples.java index 5941a8422565..7436530f0e80 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSamples.java @@ -13,7 +13,7 @@ */ public final class VirtualNetworkGatewaysStopExpressRouteSiteFailoverSimulationSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayStopSiteFailoverSimulation.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysStopPacketCaptureSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysStopPacketCaptureSamples.java index 09d1856f1db0..af6327b0defe 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysStopPacketCaptureSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysStopPacketCaptureSamples.java @@ -11,7 +11,7 @@ */ public final class VirtualNetworkGatewaysStopPacketCaptureSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayStopPacketCapture.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysSupportedVpnDevicesSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysSupportedVpnDevicesSamples.java index 5edc62ebc5bb..ec0c20282e15 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysSupportedVpnDevicesSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysSupportedVpnDevicesSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworkGatewaysSupportedVpnDevicesSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewaySupportedVpnDevice.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysUpdateTagsSamples.java index bedb7c8a2d1a..8613b3a3965d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysUpdateTagsSamples.java @@ -13,7 +13,7 @@ */ public final class VirtualNetworkGatewaysUpdateTagsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayUpdateTags.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysVpnDeviceConfigurationScriptSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysVpnDeviceConfigurationScriptSamples.java index 6bf51ef6d259..a6352a69bbae 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysVpnDeviceConfigurationScriptSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkGatewaysVpnDeviceConfigurationScriptSamples.java @@ -11,7 +11,7 @@ */ public final class VirtualNetworkGatewaysVpnDeviceConfigurationScriptSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGatewayVpnDeviceConfigurationScript.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkPeeringsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkPeeringsCreateOrUpdateSamples.java index b903bd51baaa..8d1fd40096bf 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkPeeringsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkPeeringsCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class VirtualNetworkPeeringsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkSubnetPeeringSync.json */ /** @@ -39,7 +39,7 @@ public static void syncSubnetPeering(com.azure.resourcemanager.AzureResourceMana } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkV6SubnetPeeringCreate.json */ /** @@ -67,7 +67,7 @@ public static void createV6SubnetPeering(com.azure.resourcemanager.AzureResource /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkPeeringSync. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringSync. * json */ /** @@ -92,7 +92,7 @@ public static void syncPeering(com.azure.resourcemanager.AzureResourceManager az /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkPeeringCreate. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringCreate. * json */ /** @@ -116,7 +116,7 @@ public static void createPeering(com.azure.resourcemanager.AzureResourceManager } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json */ /** @@ -141,7 +141,7 @@ public static void createPeering(com.azure.resourcemanager.AzureResourceManager } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkSubnetPeeringCreate.json */ /** @@ -168,7 +168,7 @@ public static void createSubnetPeering(com.azure.resourcemanager.AzureResourceMa } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkV6SubnetPeeringSync.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkPeeringsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkPeeringsDeleteSamples.java index a8449f9545b1..bb3babe061b5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkPeeringsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkPeeringsDeleteSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworkPeeringsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkPeeringDelete. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringDelete. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkPeeringsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkPeeringsGetSamples.java index ff5021425073..543a0c9713e8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkPeeringsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkPeeringsGetSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworkPeeringsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkPeeringGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringGet.json */ /** * Sample code: Get peering. @@ -26,7 +26,7 @@ public static void getPeering(com.azure.resourcemanager.AzureResourceManager azu } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json */ /** @@ -44,7 +44,7 @@ public static void getPeering(com.azure.resourcemanager.AzureResourceManager azu } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkSubnetPeeringGet.json */ /** @@ -61,7 +61,7 @@ public static void getSubnetPeering(com.azure.resourcemanager.AzureResourceManag } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkV6SubnetPeeringGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkPeeringsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkPeeringsListSamples.java index ed623ff7e7e7..fc35eb0d6364 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkPeeringsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkPeeringsListSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworkPeeringsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkPeeringList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkPeeringList. * json */ /** @@ -27,7 +27,7 @@ public static void listPeerings(com.azure.resourcemanager.AzureResourceManager a } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsCreateOrUpdateSamples.java index a84323b1492d..64f9b721b409 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ public final class VirtualNetworkTapsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkTapCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapCreate.json */ /** * Sample code: Create Virtual Network Tap. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsDeleteSamples.java index c85153c34c10..102bff0994b6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsDeleteSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworkTapsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkTapDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapDelete.json */ /** * Sample code: Delete Virtual Network Tap resource. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsGetByResourceGroupSamples.java index 7815d1d6de8b..5da14770b076 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworkTapsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkTapGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapGet.json */ /** * Sample code: Get Virtual Network Tap. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsListByResourceGroupSamples.java index 2742f1934f53..e378b3ea8e34 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworkTapsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkTapList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapList.json */ /** * Sample code: List virtual network taps in resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsListSamples.java index ec30cac42997..71d73add1e15 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsListSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworkTapsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkTapListAll.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapListAll.json */ /** * Sample code: List all virtual network taps. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsUpdateTagsSamples.java index 15300e70b382..4ce59578af28 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworkTapsUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class VirtualNetworkTapsUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkTapUpdateTags. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkTapUpdateTags. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksCheckIpAddressAvailabilitySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksCheckIpAddressAvailabilitySamples.java index 1c5b073aa1d2..e6895b305792 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksCheckIpAddressAvailabilitySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksCheckIpAddressAvailabilitySamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworksCheckIpAddressAvailabilitySamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkCheckIPAddressAvailability.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksCreateOrUpdateSamples.java index 4ce3c91c5e27..bfbd95212918 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksCreateOrUpdateSamples.java @@ -22,7 +22,7 @@ public final class VirtualNetworksCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkCreateSubnet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreateSubnet. * json */ /** @@ -43,7 +43,7 @@ public static void createVirtualNetworkWithSubnet(com.azure.resourcemanager.Azur } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkCreateWithIpamPool.json */ /** @@ -70,7 +70,7 @@ public static void createVirtualNetworkWithIpamPool(com.azure.resourcemanager.Az } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkCreateWithBgpCommunities.json */ /** @@ -92,7 +92,7 @@ public static void createVirtualNetworkWithBgpCommunities(com.azure.resourcemana } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkCreateSubnetWithAddressPrefixes.json */ /** @@ -115,7 +115,7 @@ public static void createVirtualNetworkWithBgpCommunities(com.azure.resourcemana } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkCreateSubnetWithDelegation.json */ /** @@ -138,7 +138,7 @@ public static void createVirtualNetworkWithDelegatedSubnets(com.azure.resourcema } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkCreateWithEncryption.json */ /** @@ -162,7 +162,7 @@ public static void createVirtualNetworkWithEncryption(com.azure.resourcemanager. /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkCreate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkCreate.json */ /** * Sample code: Create virtual network. @@ -182,7 +182,7 @@ public static void createVirtualNetwork(com.azure.resourcemanager.AzureResourceM } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkCreateServiceEndpointPolicy.json */ /** @@ -208,7 +208,7 @@ public static void createVirtualNetworkWithServiceEndpointsAndServiceEndpointPol } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkCreateServiceEndpoints.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksDeleteSamples.java index e838a77c3703..8276a4feae26 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksDeleteSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworksDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkDelete.json */ /** * Sample code: Delete virtual network. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksGetByResourceGroupSamples.java index a9b8a5916e1a..7e9f12c6b3cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworksGetByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGetWithSubnetDelegation.json */ /** @@ -26,7 +26,7 @@ public static void getVirtualNetworkWithADelegatedSubnet(com.azure.resourcemanag } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGetWithServiceAssociationLink.json */ /** @@ -45,7 +45,7 @@ public static void getVirtualNetworkWithADelegatedSubnet(com.azure.resourcemanag /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkGet.json */ /** * Sample code: Get virtual network. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksListByResourceGroupSamples.java index 6f2a3eb30f18..2e122d76f6ea 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworksListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkList.json */ /** * Sample code: List virtual networks in resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksListDdosProtectionStatusSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksListDdosProtectionStatusSamples.java index 1af145c555c6..5d33b362d21b 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksListDdosProtectionStatusSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksListDdosProtectionStatusSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualNetworksListDdosProtectionStatusSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualNetworkGetDdosProtectionStatus.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksListSamples.java index d47c17df33ae..44eca717a9aa 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksListSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworksListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkListAll.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkListAll.json */ /** * Sample code: List all virtual networks. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksListUsageSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksListUsageSamples.java index e01a1c6fb63d..7d0609f550a8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksListUsageSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksListUsageSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworksListUsageSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkListUsage.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkListUsage.json */ /** * Sample code: VnetGetUsage. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksUpdateTagsSamples.java index 9c6501fe1a1a..9719d0cf2592 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualNetworksUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class VirtualNetworksUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualNetworkUpdateTags.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualNetworkUpdateTags.json */ /** * Sample code: Update virtual network tags. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRouterPeeringsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRouterPeeringsCreateOrUpdateSamples.java index f7d759a93475..185fa17e8897 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRouterPeeringsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRouterPeeringsCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ public final class VirtualRouterPeeringsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualRouterPeeringPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringPut.json */ /** * Sample code: Create Virtual Router Peering. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRouterPeeringsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRouterPeeringsDeleteSamples.java index e8f774a7f2f4..ef3899fcc925 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRouterPeeringsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRouterPeeringsDeleteSamples.java @@ -10,7 +10,7 @@ public final class VirtualRouterPeeringsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualRouterPeeringDelete. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringDelete. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRouterPeeringsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRouterPeeringsGetSamples.java index 9d15790cd491..05b757f25095 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRouterPeeringsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRouterPeeringsGetSamples.java @@ -10,7 +10,7 @@ public final class VirtualRouterPeeringsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualRouterPeeringGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringGet.json */ /** * Sample code: Get Virtual Router Peering. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRouterPeeringsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRouterPeeringsListSamples.java index 64615041ce15..33ff843636de 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRouterPeeringsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRouterPeeringsListSamples.java @@ -10,7 +10,7 @@ public final class VirtualRouterPeeringsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualRouterPeeringList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPeeringList.json */ /** * Sample code: List all Virtual Router Peerings for a given Virtual Router. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersCreateOrUpdateSamples.java index adbb8ea7ca17..dc0dbc4a5dc9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ public final class VirtualRoutersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualRouterPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterPut.json */ /** * Sample code: Create VirtualRouter. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersDeleteSamples.java index 46b3e83041ce..09e133fcf059 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersDeleteSamples.java @@ -10,7 +10,7 @@ public final class VirtualRoutersDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualRouterDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterDelete.json */ /** * Sample code: Delete VirtualRouter. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersGetByResourceGroupSamples.java index 3d8633488e05..9e4042b15a03 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VirtualRoutersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualRouterGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualRouterGet.json */ /** * Sample code: Get VirtualRouter. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersListByResourceGroupSamples.java index a08ec9279fc5..e61fa2f85477 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualRoutersListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualRouterListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersListSamples.java index 21e98123402a..d5bee9273670 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualRoutersListSamples.java @@ -9,7 +9,7 @@ */ public final class VirtualRoutersListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VirtualRouterListBySubscription.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansCreateOrUpdateSamples.java index 88bc8c5b1cf4..78c56f88b334 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ public final class VirtualWansCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualWANPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANPut.json */ /** * Sample code: VirtualWANCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansDeleteSamples.java index babd088b4930..bc687b6bc292 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansDeleteSamples.java @@ -10,7 +10,7 @@ public final class VirtualWansDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualWANDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANDelete.json */ /** * Sample code: VirtualWANDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansGetByResourceGroupSamples.java index af4297c34254..d358f1ef0b98 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VirtualWansGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualWANGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANGet.json */ /** * Sample code: VirtualWANGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansListByResourceGroupSamples.java index cadecb904639..b4d5d88482ed 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VirtualWansListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualWANListByResourceGroup + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANListByResourceGroup * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansListSamples.java index 09df635fb011..b66bf809d069 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansListSamples.java @@ -10,7 +10,7 @@ public final class VirtualWansListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualWANList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANList.json */ /** * Sample code: VirtualWANList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansUpdateTagsSamples.java index ec4d2fc74908..c2c90f6870f6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VirtualWansUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class VirtualWansUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VirtualWANUpdateTags.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VirtualWANUpdateTags.json */ /** * Sample code: VirtualWANUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsCreateOrUpdateSamples.java index 61b75a192243..68aae4f2aee6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsCreateOrUpdateSamples.java @@ -19,7 +19,7 @@ public final class VpnConnectionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnConnectionPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionPut.json */ /** * Sample code: VpnConnectionPut. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsDeleteSamples.java index da7fc0200622..d349e8420492 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsDeleteSamples.java @@ -10,7 +10,7 @@ public final class VpnConnectionsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnConnectionDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionDelete.json */ /** * Sample code: VpnConnectionDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsGetSamples.java index 29cb2250b4e7..b5498690f64a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsGetSamples.java @@ -10,7 +10,7 @@ public final class VpnConnectionsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnConnectionGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionGet.json */ /** * Sample code: VpnConnectionGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsListByVpnGatewaySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsListByVpnGatewaySamples.java index 2eb33631cd6e..a73ff58b9d08 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsListByVpnGatewaySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsListByVpnGatewaySamples.java @@ -10,7 +10,7 @@ public final class VpnConnectionsListByVpnGatewaySamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnConnectionList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnConnectionList.json */ /** * Sample code: VpnConnectionList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsStartPacketCaptureSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsStartPacketCaptureSamples.java index c219d1ac4e89..40bc08d07606 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsStartPacketCaptureSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsStartPacketCaptureSamples.java @@ -12,7 +12,7 @@ */ public final class VpnConnectionsStartPacketCaptureSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VpnConnectionStartPacketCaptureFilterData.json */ /** @@ -34,7 +34,7 @@ public final class VpnConnectionsStartPacketCaptureSamples { } /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VpnConnectionStartPacketCapture.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsStopPacketCaptureSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsStopPacketCaptureSamples.java index 2415c4600f61..806f538a01d8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsStopPacketCaptureSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnConnectionsStopPacketCaptureSamples.java @@ -12,7 +12,7 @@ */ public final class VpnConnectionsStopPacketCaptureSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VpnConnectionStopPacketCapture.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysCreateOrUpdateSamples.java index 464fb67253a0..fbf72179a727 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysCreateOrUpdateSamples.java @@ -25,7 +25,7 @@ public final class VpnGatewaysCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnGatewayPut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayPut.json */ /** * Sample code: VpnGatewayPut. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysDeleteSamples.java index b78d473e70f2..df56ab069b2c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysDeleteSamples.java @@ -10,7 +10,7 @@ public final class VpnGatewaysDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnGatewayDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayDelete.json */ /** * Sample code: VpnGatewayDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysGetByResourceGroupSamples.java index 82106374ee30..73d0e2401057 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VpnGatewaysGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnGatewayGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayGet.json */ /** * Sample code: VpnGatewayGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysListByResourceGroupSamples.java index 8e4da8bf2c8b..08fdfac52264 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VpnGatewaysListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnGatewayListByResourceGroup + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayListByResourceGroup * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysListSamples.java index 5e8de0358296..cc4b8b5715f2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysListSamples.java @@ -10,7 +10,7 @@ public final class VpnGatewaysListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnGatewayList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayList.json */ /** * Sample code: VpnGatewayListBySubscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysResetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysResetSamples.java index ed4b61a26763..3114ad11b5fd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysResetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysResetSamples.java @@ -10,7 +10,7 @@ public final class VpnGatewaysResetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnGatewayReset.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayReset.json */ /** * Sample code: ResetVpnGateway. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysStartPacketCaptureSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysStartPacketCaptureSamples.java index f9407efcf2bb..6c7bd4cb6a38 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysStartPacketCaptureSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysStartPacketCaptureSamples.java @@ -11,7 +11,7 @@ */ public final class VpnGatewaysStartPacketCaptureSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VpnGatewayStartPacketCaptureFilterData.json */ /** @@ -31,7 +31,7 @@ public static void startPacketCaptureOnVpnGatewayWithFilter(com.azure.resourcema /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnGatewayStartPacketCapture. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayStartPacketCapture. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysStopPacketCaptureSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysStopPacketCaptureSamples.java index af3aa940d6ed..b34da170a35c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysStopPacketCaptureSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysStopPacketCaptureSamples.java @@ -12,7 +12,7 @@ public final class VpnGatewaysStopPacketCaptureSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnGatewayStopPacketCapture. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayStopPacketCapture. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysUpdateTagsSamples.java index 15e8fa4da9fd..e4bbaa23f4a2 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class VpnGatewaysUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnGatewayUpdateTags.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnGatewayUpdateTags.json */ /** * Sample code: VpnGatewayUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsGetAllSharedKeysSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsGetAllSharedKeysSamples.java index 6b481a7eb479..0e2f86a00cb8 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsGetAllSharedKeysSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsGetAllSharedKeysSamples.java @@ -9,7 +9,7 @@ */ public final class VpnLinkConnectionsGetAllSharedKeysSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VpnSiteLinkConnectionSharedKeysGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsGetDefaultSharedKeySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsGetDefaultSharedKeySamples.java index 507b39dc67b4..7128c3ff8e8e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsGetDefaultSharedKeySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsGetDefaultSharedKeySamples.java @@ -9,7 +9,7 @@ */ public final class VpnLinkConnectionsGetDefaultSharedKeySamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VpnSiteLinkConnectionDefaultSharedKeyGet.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsGetIkeSasSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsGetIkeSasSamples.java index 1e789fa1ae1b..380503174685 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsGetIkeSasSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsGetIkeSasSamples.java @@ -9,7 +9,7 @@ */ public final class VpnLinkConnectionsGetIkeSasSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VpnSiteLinkConnectionGetIkeSas.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsListByVpnConnectionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsListByVpnConnectionSamples.java index 93cc093ea042..8c04950989f5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsListByVpnConnectionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsListByVpnConnectionSamples.java @@ -10,7 +10,7 @@ public final class VpnLinkConnectionsListByVpnConnectionSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnSiteLinkConnectionList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionList. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsListDefaultSharedKeySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsListDefaultSharedKeySamples.java index c3a5244bd3d9..d39bcf0f749d 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsListDefaultSharedKeySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsListDefaultSharedKeySamples.java @@ -9,7 +9,7 @@ */ public final class VpnLinkConnectionsListDefaultSharedKeySamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VpnSiteLinkConnectionDefaultSharedKeyList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsResetConnectionSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsResetConnectionSamples.java index f9472efd064d..0ae1f82cdaa6 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsResetConnectionSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsResetConnectionSamples.java @@ -10,7 +10,7 @@ public final class VpnLinkConnectionsResetConnectionSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnSiteLinkConnectionReset. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionReset. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsSetOrInitDefaultSharedKeySamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsSetOrInitDefaultSharedKeySamples.java index 952cd9b3a4fb..03bca5ed7680 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsSetOrInitDefaultSharedKeySamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnLinkConnectionsSetOrInitDefaultSharedKeySamples.java @@ -12,7 +12,7 @@ */ public final class VpnLinkConnectionsSetOrInitDefaultSharedKeySamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VpnSiteLinkConnectionDefaultSharedKeyPut.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsAssociatedWithVirtualWanListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsAssociatedWithVirtualWanListSamples.java index c8327b75723d..9c704bd88c8e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsAssociatedWithVirtualWanListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsAssociatedWithVirtualWanListSamples.java @@ -9,7 +9,7 @@ */ public final class VpnServerConfigurationsAssociatedWithVirtualWanListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * GetVirtualWanVpnServerConfigurations.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsCreateOrUpdateSamples.java index b8bfe8b05a54..564beb12e0d9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsCreateOrUpdateSamples.java @@ -31,7 +31,7 @@ public final class VpnServerConfigurationsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnServerConfigurationPut. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationPut. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsDeleteSamples.java index e13ee414bdf2..0e1523839dcf 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsDeleteSamples.java @@ -10,7 +10,7 @@ public final class VpnServerConfigurationsDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnServerConfigurationDelete. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationDelete. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsGetByResourceGroupSamples.java index da4bce26b342..83618cca06ca 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VpnServerConfigurationsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnServerConfigurationGet. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationGet. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsListByResourceGroupSamples.java index 20bf1ed251e2..84b11862ef49 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class VpnServerConfigurationsListByResourceGroupSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VpnServerConfigurationListByResourceGroup.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsListRadiusSecretsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsListRadiusSecretsSamples.java index 76b7375f4ad5..86dabb84a954 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsListRadiusSecretsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsListRadiusSecretsSamples.java @@ -9,7 +9,7 @@ */ public final class VpnServerConfigurationsListRadiusSecretsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AllVpnServerConfigurationRadiusServerSecretsList.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsListSamples.java index 7c3db5588e76..43bbc239c5cd 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsListSamples.java @@ -10,7 +10,7 @@ public final class VpnServerConfigurationsListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnServerConfigurationList. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnServerConfigurationList. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsUpdateTagsSamples.java index ef8f674c3277..3cbb02bcc86f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnServerConfigurationsUpdateTagsSamples.java @@ -13,7 +13,7 @@ */ public final class VpnServerConfigurationsUpdateTagsSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * VpnServerConfigurationUpdateTags.json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSiteLinkConnectionsGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSiteLinkConnectionsGetSamples.java index be9feebf6962..d88d2c59cbb4 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSiteLinkConnectionsGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSiteLinkConnectionsGetSamples.java @@ -10,7 +10,7 @@ public final class VpnSiteLinkConnectionsGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnSiteLinkConnectionGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkConnectionGet.json */ /** * Sample code: VpnSiteLinkConnectionGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSiteLinksGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSiteLinksGetSamples.java index a461447de3a9..dbd763162a8e 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSiteLinksGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSiteLinksGetSamples.java @@ -10,7 +10,7 @@ public final class VpnSiteLinksGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnSiteLinkGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkGet.json */ /** * Sample code: VpnSiteGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSiteLinksListByVpnSiteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSiteLinksListByVpnSiteSamples.java index 9d4244a87292..706f67637362 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSiteLinksListByVpnSiteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSiteLinksListByVpnSiteSamples.java @@ -10,7 +10,7 @@ public final class VpnSiteLinksListByVpnSiteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnSiteLinkListByVpnSite.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteLinkListByVpnSite.json */ /** * Sample code: VpnSiteLinkListByVpnSite. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesConfigurationDownloadSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesConfigurationDownloadSamples.java index 051b46d736f1..6d7d524147b7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesConfigurationDownloadSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesConfigurationDownloadSamples.java @@ -13,7 +13,7 @@ public final class VpnSitesConfigurationDownloadSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnSitesConfigurationDownload + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSitesConfigurationDownload * .json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesCreateOrUpdateSamples.java index ea18b308ba28..3d350a7b5f73 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesCreateOrUpdateSamples.java @@ -22,7 +22,7 @@ public final class VpnSitesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnSitePut.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSitePut.json */ /** * Sample code: VpnSiteCreate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesDeleteSamples.java index db8ed677e092..9d45e7970fc7 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesDeleteSamples.java @@ -10,7 +10,7 @@ public final class VpnSitesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnSiteDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteDelete.json */ /** * Sample code: VpnSiteDelete. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesGetByResourceGroupSamples.java index f121d3c1f186..d98010b04a39 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VpnSitesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnSiteGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteGet.json */ /** * Sample code: VpnSiteGet. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesListByResourceGroupSamples.java index de64d1ea7258..5ecb847eee71 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VpnSitesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnSiteListByResourceGroup. + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteListByResourceGroup. * json */ /** diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesListSamples.java index fdbdda678046..4101ff95bd0f 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesListSamples.java @@ -10,7 +10,7 @@ public final class VpnSitesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnSiteList.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteList.json */ /** * Sample code: VpnSiteList. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesUpdateTagsSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesUpdateTagsSamples.java index c7a5f87e5d01..3ec0279e8db5 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesUpdateTagsSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnSitesUpdateTagsSamples.java @@ -14,7 +14,7 @@ public final class VpnSitesUpdateTagsSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/VpnSiteUpdateTags.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/VpnSiteUpdateTags.json */ /** * Sample code: VpnSiteUpdate. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesCreateOrUpdateSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesCreateOrUpdateSamples.java index d5b05fee3ca0..ec030a030a3a 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesCreateOrUpdateSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesCreateOrUpdateSamples.java @@ -48,7 +48,7 @@ public final class WebApplicationFirewallPoliciesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/WafPolicyCreateOrUpdate.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyCreateOrUpdate.json */ /** * Sample code: Creates or updates a WAF policy within a resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesDeleteSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesDeleteSamples.java index d3f4efca6808..1c9dbc1f5af9 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesDeleteSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesDeleteSamples.java @@ -10,7 +10,7 @@ public final class WebApplicationFirewallPoliciesDeleteSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/WafPolicyDelete.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyDelete.json */ /** * Sample code: Deletes a WAF policy within a resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesGetByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesGetByResourceGroupSamples.java index 5196657618f6..01d70081e5c0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesGetByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class WebApplicationFirewallPoliciesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/WafPolicyGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyGet.json */ /** * Sample code: Gets a WAF policy within a resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesListByResourceGroupSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesListByResourceGroupSamples.java index 3215e798de2c..51b8bf29f9ab 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesListByResourceGroupSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class WebApplicationFirewallPoliciesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/WafListPolicies.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafListPolicies.json */ /** * Sample code: Lists all WAF policies in a resource group. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesListSamples.java index 32199cad1a2f..dc994d7fe327 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebApplicationFirewallPoliciesListSamples.java @@ -10,7 +10,7 @@ public final class WebApplicationFirewallPoliciesListSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/WafListAllPolicies.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafListAllPolicies.json */ /** * Sample code: Lists all WAF policies in a subscription. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebCategoriesGetSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebCategoriesGetSamples.java index 72127f056f50..5ae0bc1209e3 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebCategoriesGetSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebCategoriesGetSamples.java @@ -10,7 +10,7 @@ public final class WebCategoriesGetSamples { /* * x-ms-original-file: - * specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/AzureWebCategoryGet.json + * specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/AzureWebCategoryGet.json */ /** * Sample code: Get Azure Web Category by name. diff --git a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebCategoriesListSamples.java b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebCategoriesListSamples.java index 455274f7d11f..3ee794539953 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebCategoriesListSamples.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/WebCategoriesListSamples.java @@ -9,7 +9,7 @@ */ public final class WebCategoriesListSamples { /* - * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-01-01/examples/ + * x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/ * AzureWebCategoriesListBySubscription.json */ /** From 552560126bf86b6b52f3d9e90d893a9405cee687 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 20 Nov 2025 04:26:09 -0800 Subject: [PATCH 05/26] Increment package versions for network releases (#47339) --- eng/versioning/version_client.txt | 3 +-- sdk/compute/azure-resourcemanager-compute/pom.xml | 2 +- .../azure-resourcemanager-computefleet/pom.xml | 2 +- .../azure-resourcemanager-containerinstance/pom.xml | 2 +- sdk/cosmos/azure-resourcemanager-cosmos/pom.xml | 2 +- sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml | 2 +- sdk/network/azure-resourcemanager-network/CHANGELOG.md | 10 ++++++++++ sdk/network/azure-resourcemanager-network/pom.xml | 2 +- .../azure-resourcemanager-privatedns/pom.xml | 2 +- sdk/resourcemanager/azure-resourcemanager/pom.xml | 2 +- 10 files changed, 19 insertions(+), 10 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index f4707bf77292..ef0d1024d395 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -286,7 +286,7 @@ com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.53.4;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-keyvault;2.54.0;2.55.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-monitor;2.53.4;2.54.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-msi;2.53.4;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-network;2.56.0;2.57.0 +com.azure.resourcemanager:azure-resourcemanager-network;2.57.0;2.58.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-privatedns;2.53.4;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-resources;2.53.5;2.54.0-beta.1 @@ -551,7 +551,6 @@ unreleased_com.azure.v2:azure-core;2.0.0-beta.1 unreleased_com.azure.v2:azure-identity;2.0.0-beta.1 unreleased_com.azure.v2:azure-data-appconfiguration;2.0.0-beta.1 unreleased_io.clientcore:http-netty4;1.0.0-beta.1 -unreleased_com.azure.resourcemanager:azure-resourcemanager-network;2.57.0 # Released Beta dependencies: Copy the entry from above, prepend "beta_", remove the current # version and set the version to the released beta. Released beta dependencies are only valid diff --git a/sdk/compute/azure-resourcemanager-compute/pom.xml b/sdk/compute/azure-resourcemanager-compute/pom.xml index c70376d41a5c..5ad94dbbeb09 100644 --- a/sdk/compute/azure-resourcemanager-compute/pom.xml +++ b/sdk/compute/azure-resourcemanager-compute/pom.xml @@ -81,7 +81,7 @@ com.azure.resourcemanager azure-resourcemanager-network - 2.56.0 + 2.57.0 com.azure.resourcemanager diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/pom.xml b/sdk/computefleet/azure-resourcemanager-computefleet/pom.xml index 34cad61bdefd..c53681987aa4 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/pom.xml +++ b/sdk/computefleet/azure-resourcemanager-computefleet/pom.xml @@ -84,7 +84,7 @@ com.azure.resourcemanager azure-resourcemanager-network - 2.56.0 + 2.57.0 test diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml b/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml index 74cd2f3e965a..60d58341ef26 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml @@ -80,7 +80,7 @@ com.azure.resourcemanager azure-resourcemanager-network - 2.56.0 + 2.57.0 com.azure diff --git a/sdk/cosmos/azure-resourcemanager-cosmos/pom.xml b/sdk/cosmos/azure-resourcemanager-cosmos/pom.xml index f46805ca262b..3121fdd8d200 100644 --- a/sdk/cosmos/azure-resourcemanager-cosmos/pom.xml +++ b/sdk/cosmos/azure-resourcemanager-cosmos/pom.xml @@ -79,7 +79,7 @@ com.azure.resourcemanager azure-resourcemanager-network - 2.56.0 + 2.57.0 test diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml b/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml index 8c7da72a3b4f..1d0e62b9e295 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml @@ -84,7 +84,7 @@ com.azure.resourcemanager azure-resourcemanager-network - 2.56.0 + 2.57.0 test diff --git a/sdk/network/azure-resourcemanager-network/CHANGELOG.md b/sdk/network/azure-resourcemanager-network/CHANGELOG.md index 22b603e1bd71..20171c3339bd 100644 --- a/sdk/network/azure-resourcemanager-network/CHANGELOG.md +++ b/sdk/network/azure-resourcemanager-network/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 2.58.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 2.57.0 (2025-11-19) ### Other Changes diff --git a/sdk/network/azure-resourcemanager-network/pom.xml b/sdk/network/azure-resourcemanager-network/pom.xml index c6afdbe3a218..3af6d25c2da4 100644 --- a/sdk/network/azure-resourcemanager-network/pom.xml +++ b/sdk/network/azure-resourcemanager-network/pom.xml @@ -14,7 +14,7 @@ com.azure.resourcemanager azure-resourcemanager-network - 2.57.0 + 2.58.0-beta.1 jar Microsoft Azure SDK for Network Management diff --git a/sdk/privatedns/azure-resourcemanager-privatedns/pom.xml b/sdk/privatedns/azure-resourcemanager-privatedns/pom.xml index e304885183aa..22e968545506 100644 --- a/sdk/privatedns/azure-resourcemanager-privatedns/pom.xml +++ b/sdk/privatedns/azure-resourcemanager-privatedns/pom.xml @@ -66,7 +66,7 @@ com.azure.resourcemanager azure-resourcemanager-network - 2.56.0 + 2.57.0 test diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index f15b4fec2906..71ec0b11ccef 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -107,7 +107,7 @@ com.azure.resourcemanager azure-resourcemanager-network - 2.57.0 + 2.57.0 com.azure.resourcemanager From e411a2ec1740dd0fb17b110b36aeb6f921761a12 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 20 Nov 2025 13:02:47 -0800 Subject: [PATCH 06/26] Bump cspell from 9.2.1 to 9.3.2 in /eng/common/spelling (#47341) Bumps [cspell](https://github.com/streetsidesoftware/cspell/tree/HEAD/packages/cspell) from 9.2.1 to 9.3.2. - [Release notes](https://github.com/streetsidesoftware/cspell/releases) - [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell/commits/v9.3.2/packages/cspell) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- eng/common/spelling/package-lock.json | 944 ++++++++++++-------------- eng/common/spelling/package.json | 2 +- 2 files changed, 427 insertions(+), 519 deletions(-) diff --git a/eng/common/spelling/package-lock.json b/eng/common/spelling/package-lock.json index a028f4a1110e..d8c4a8faaa92 100644 --- a/eng/common/spelling/package-lock.json +++ b/eng/common/spelling/package-lock.json @@ -8,41 +8,40 @@ "name": "cspell-version-pin", "version": "1.0.0", "dependencies": { - "cspell": "^9.2.1" + "cspell": "^9.3.2" } }, "node_modules/@cspell/cspell-bundled-dicts": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-9.2.1.tgz", - "integrity": "sha512-85gHoZh3rgZ/EqrHIr1/I4OLO53fWNp6JZCqCdgaT7e3sMDaOOG6HoSxCvOnVspXNIf/1ZbfTCDMx9x79Xq0AQ==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-9.3.2.tgz", + "integrity": "sha512-OmKzq/0FATHU671GKMzBrTyLdm25Wnziva7h4ylumVn1wnwWsXGef5bgXD7iuApqfqH9SzxsU0NtTB8m8vwEHQ==", "dependencies": { "@cspell/dict-ada": "^4.1.1", "@cspell/dict-al": "^1.1.1", - "@cspell/dict-aws": "^4.0.15", - "@cspell/dict-bash": "^4.2.1", - "@cspell/dict-companies": "^3.2.5", - "@cspell/dict-cpp": "^6.0.12", + "@cspell/dict-aws": "^4.0.16", + "@cspell/dict-bash": "^4.2.2", + "@cspell/dict-companies": "^3.2.7", + "@cspell/dict-cpp": "^6.0.14", "@cspell/dict-cryptocurrencies": "^5.0.5", "@cspell/dict-csharp": "^4.0.7", "@cspell/dict-css": "^4.0.18", "@cspell/dict-dart": "^2.3.1", - "@cspell/dict-data-science": "^2.0.9", + "@cspell/dict-data-science": "^2.0.11", "@cspell/dict-django": "^4.1.5", "@cspell/dict-docker": "^1.1.16", "@cspell/dict-dotnet": "^5.0.10", "@cspell/dict-elixir": "^4.0.8", - "@cspell/dict-en_us": "^4.4.18", - "@cspell/dict-en-common-misspellings": "^2.1.5", - "@cspell/dict-en-gb-mit": "^3.1.8", - "@cspell/dict-filetypes": "^3.0.13", + "@cspell/dict-en_us": "^4.4.24", + "@cspell/dict-en-common-misspellings": "^2.1.8", + "@cspell/dict-en-gb-mit": "^3.1.14", + "@cspell/dict-filetypes": "^3.0.14", "@cspell/dict-flutter": "^1.1.1", "@cspell/dict-fonts": "^4.0.5", "@cspell/dict-fsharp": "^1.1.1", "@cspell/dict-fullstack": "^3.2.7", "@cspell/dict-gaming-terms": "^1.1.2", "@cspell/dict-git": "^3.0.7", - "@cspell/dict-golang": "^6.0.23", + "@cspell/dict-golang": "^6.0.24", "@cspell/dict-google": "^1.0.9", "@cspell/dict-haskell": "^4.0.6", "@cspell/dict-html": "^4.0.12", @@ -58,54 +57,52 @@ "@cspell/dict-markdown": "^2.0.12", "@cspell/dict-monkeyc": "^1.0.11", "@cspell/dict-node": "^5.0.8", - "@cspell/dict-npm": "^5.2.15", - "@cspell/dict-php": "^4.0.15", + "@cspell/dict-npm": "^5.2.22", + "@cspell/dict-php": "^4.1.0", "@cspell/dict-powershell": "^5.0.15", "@cspell/dict-public-licenses": "^2.0.15", - "@cspell/dict-python": "^4.2.19", + "@cspell/dict-python": "^4.2.21", "@cspell/dict-r": "^2.1.1", "@cspell/dict-ruby": "^5.0.9", "@cspell/dict-rust": "^4.0.12", "@cspell/dict-scala": "^5.0.8", - "@cspell/dict-shell": "^1.1.1", - "@cspell/dict-software-terms": "^5.1.7", + "@cspell/dict-shell": "^1.1.2", + "@cspell/dict-software-terms": "^5.1.13", "@cspell/dict-sql": "^2.2.1", "@cspell/dict-svelte": "^1.0.7", "@cspell/dict-swift": "^2.0.6", "@cspell/dict-terraform": "^1.1.3", "@cspell/dict-typescript": "^3.2.3", - "@cspell/dict-vue": "^3.0.5" + "@cspell/dict-vue": "^3.0.5", + "@cspell/dict-zig": "^1.0.0" }, "engines": { "node": ">=20" } }, "node_modules/@cspell/cspell-json-reporter": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-json-reporter/-/cspell-json-reporter-9.2.1.tgz", - "integrity": "sha512-LiiIWzLP9h2etKn0ap6g2+HrgOGcFEF/hp5D8ytmSL5sMxDcV13RrmJCEMTh1axGyW0SjQEFjPnYzNpCL1JjGA==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-json-reporter/-/cspell-json-reporter-9.3.2.tgz", + "integrity": "sha512-YRgpeHN9uY8kUlIw9q+8zJ0tRTAJMbfBTGzCq9Puah09NeMWlRMFPUkXVrkdic6NA7etboZ+zEdoZwRO9EmhiA==", "dependencies": { - "@cspell/cspell-types": "9.2.1" + "@cspell/cspell-types": "9.3.2" }, "engines": { "node": ">=20" } }, "node_modules/@cspell/cspell-pipe": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-9.2.1.tgz", - "integrity": "sha512-2N1H63If5cezLqKToY/YSXon4m4REg/CVTFZr040wlHRbbQMh5EF3c7tEC/ue3iKAQR4sm52ihfqo1n4X6kz+g==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-9.3.2.tgz", + "integrity": "sha512-REF7ibG79WLEynIMUss/IRDCdYEb1nlE1rj/gt2CbPFzLa6t5MRwW2lajEvXS6/WgbMtsTVHAWi3ALqJzCwxng==", "engines": { "node": ">=20" } }, "node_modules/@cspell/cspell-resolver": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-9.2.1.tgz", - "integrity": "sha512-fRPQ6GWU5eyh8LN1TZblc7t24TlGhJprdjJkfZ+HjQo+6ivdeBPT7pC7pew6vuMBQPS1oHBR36hE0ZnJqqkCeg==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-9.3.2.tgz", + "integrity": "sha512-jLN2Aa/vxm8+IBvTd884SwPEfjxnDwIEPBT3hmqgLlKuUHQ3FMG27lsM4Ik9L2KWBXMgV/wGz4BaxfhKI41Ttw==", "dependencies": { "global-directory": "^4.0.1" }, @@ -114,19 +111,17 @@ } }, "node_modules/@cspell/cspell-service-bus": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-9.2.1.tgz", - "integrity": "sha512-k4M6bqdvWbcGSbcfLD7Lf4coZVObsISDW+sm/VaWp9aZ7/uwiz1IuGUxL9WO4JIdr9CFEf7Ivmvd2txZpVOCIA==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-9.3.2.tgz", + "integrity": "sha512-/rB8LazM0JzKL+AvZa5fEpLutmwy5QFMpzw8HJd+rDGkzb5r79hURWSRo84QArgaskUqA9XlOHSieDE9pt+WAA==", "engines": { "node": ">=20" } }, "node_modules/@cspell/cspell-types": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-9.2.1.tgz", - "integrity": "sha512-FQHgQYdTHkcpxT0u1ddLIg5Cc5ePVDcLg9+b5Wgaubmc5I0tLotgYj8c/mvStWuKsuZIs6sUopjJrE91wk6Onw==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-9.3.2.tgz", + "integrity": "sha512-l4H8bMAmdzCbXHO8y1JZiAKszrPEiuLFKWrbhCacHF0iP+PIc/yuQp7cO70m0p70vArRfih6kgGyHFaCy47CfA==", "engines": { "node": ">=20" } @@ -134,239 +129,200 @@ "node_modules/@cspell/dict-ada": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/@cspell/dict-ada/-/dict-ada-4.1.1.tgz", - "integrity": "sha512-E+0YW9RhZod/9Qy2gxfNZiHJjCYFlCdI69br1eviQQWB8yOTJX0JHXLs79kOYhSW0kINPVUdvddEBe6Lu6CjGQ==", - "license": "MIT" + "integrity": "sha512-E+0YW9RhZod/9Qy2gxfNZiHJjCYFlCdI69br1eviQQWB8yOTJX0JHXLs79kOYhSW0kINPVUdvddEBe6Lu6CjGQ==" }, "node_modules/@cspell/dict-al": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@cspell/dict-al/-/dict-al-1.1.1.tgz", - "integrity": "sha512-sD8GCaZetgQL4+MaJLXqbzWcRjfKVp8x+px3HuCaaiATAAtvjwUQ5/Iubiqwfd1boIh2Y1/3EgM3TLQ7Q8e0wQ==", - "license": "MIT" + "integrity": "sha512-sD8GCaZetgQL4+MaJLXqbzWcRjfKVp8x+px3HuCaaiATAAtvjwUQ5/Iubiqwfd1boIh2Y1/3EgM3TLQ7Q8e0wQ==" }, "node_modules/@cspell/dict-aws": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@cspell/dict-aws/-/dict-aws-4.0.15.tgz", - "integrity": "sha512-aPY7VVR5Os4rz36EaqXBAEy14wR4Rqv+leCJ2Ug/Gd0IglJpM30LalF3e2eJChnjje3vWoEC0Rz3+e5gpZG+Kg==", - "license": "MIT" + "version": "4.0.16", + "resolved": "https://registry.npmjs.org/@cspell/dict-aws/-/dict-aws-4.0.16.tgz", + "integrity": "sha512-a681zShZbtTo947NvTYGLer95ZDQw1ROKvIFydak1e0OlfFCsNdtcYTupn0nbbYs53c9AO7G2DU8AcNEAnwXPA==" }, "node_modules/@cspell/dict-bash": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@cspell/dict-bash/-/dict-bash-4.2.1.tgz", - "integrity": "sha512-SBnzfAyEAZLI9KFS7DUG6Xc1vDFuLllY3jz0WHvmxe8/4xV3ufFE3fGxalTikc1VVeZgZmxYiABw4iGxVldYEg==", - "license": "MIT", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-bash/-/dict-bash-4.2.2.tgz", + "integrity": "sha512-kyWbwtX3TsCf5l49gGQIZkRLaB/P8g73GDRm41Zu8Mv51kjl2H7Au0TsEvHv7jzcsRLS6aUYaZv6Zsvk1fOz+Q==", "dependencies": { - "@cspell/dict-shell": "1.1.1" + "@cspell/dict-shell": "1.1.2" } }, "node_modules/@cspell/dict-companies": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.2.5.tgz", - "integrity": "sha512-H51R0w7c6RwJJPqH7Gs65tzP6ouZsYDEHmmol6MIIk0kQaOIBuFP2B3vIxHLUr2EPRVFZsMW8Ni7NmVyaQlwsg==", - "license": "MIT" + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.2.7.tgz", + "integrity": "sha512-fEyr3LmpFKTaD0LcRhB4lfW1AmULYBqzg4gWAV0dQCv06l+TsA+JQ+3pZJbUcoaZirtgsgT3dL3RUjmGPhUH0A==" }, "node_modules/@cspell/dict-cpp": { - "version": "6.0.12", - "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-6.0.12.tgz", - "integrity": "sha512-N4NsCTttVpMqQEYbf0VQwCj6np+pJESov0WieCN7R/0aByz4+MXEiDieWWisaiVi8LbKzs1mEj4ZTw5K/6O2UQ==", - "license": "MIT" + "version": "6.0.14", + "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-6.0.14.tgz", + "integrity": "sha512-dkmpSwvVfVdtoZ4mW/CK2Ep1v8mJlp6uiKpMNbSMOdJl4kq28nQS4vKNIX3B2bJa0Ha5iHHu+1mNjiLeO3g7Xg==" }, "node_modules/@cspell/dict-cryptocurrencies": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/@cspell/dict-cryptocurrencies/-/dict-cryptocurrencies-5.0.5.tgz", - "integrity": "sha512-R68hYYF/rtlE6T/dsObStzN5QZw+0aQBinAXuWCVqwdS7YZo0X33vGMfChkHaiCo3Z2+bkegqHlqxZF4TD3rUA==", - "license": "MIT" + "integrity": "sha512-R68hYYF/rtlE6T/dsObStzN5QZw+0aQBinAXuWCVqwdS7YZo0X33vGMfChkHaiCo3Z2+bkegqHlqxZF4TD3rUA==" }, "node_modules/@cspell/dict-csharp": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/@cspell/dict-csharp/-/dict-csharp-4.0.7.tgz", - "integrity": "sha512-H16Hpu8O/1/lgijFt2lOk4/nnldFtQ4t8QHbyqphqZZVE5aS4J/zD/WvduqnLY21aKhZS6jo/xF5PX9jyqPKUA==", - "license": "MIT" + "integrity": "sha512-H16Hpu8O/1/lgijFt2lOk4/nnldFtQ4t8QHbyqphqZZVE5aS4J/zD/WvduqnLY21aKhZS6jo/xF5PX9jyqPKUA==" }, "node_modules/@cspell/dict-css": { "version": "4.0.18", "resolved": "https://registry.npmjs.org/@cspell/dict-css/-/dict-css-4.0.18.tgz", - "integrity": "sha512-EF77RqROHL+4LhMGW5NTeKqfUd/e4OOv6EDFQ/UQQiFyWuqkEKyEz0NDILxOFxWUEVdjT2GQ2cC7t12B6pESwg==", - "license": "MIT" + "integrity": "sha512-EF77RqROHL+4LhMGW5NTeKqfUd/e4OOv6EDFQ/UQQiFyWuqkEKyEz0NDILxOFxWUEVdjT2GQ2cC7t12B6pESwg==" }, "node_modules/@cspell/dict-dart": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/@cspell/dict-dart/-/dict-dart-2.3.1.tgz", - "integrity": "sha512-xoiGnULEcWdodXI6EwVyqpZmpOoh8RA2Xk9BNdR7DLamV/QMvEYn8KJ7NlRiTSauJKPNkHHQ5EVHRM6sTS7jdg==", - "license": "MIT" + "integrity": "sha512-xoiGnULEcWdodXI6EwVyqpZmpOoh8RA2Xk9BNdR7DLamV/QMvEYn8KJ7NlRiTSauJKPNkHHQ5EVHRM6sTS7jdg==" }, "node_modules/@cspell/dict-data-science": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@cspell/dict-data-science/-/dict-data-science-2.0.9.tgz", - "integrity": "sha512-wTOFMlxv06veIwKdXUwdGxrQcK44Zqs426m6JGgHIB/GqvieZQC5n0UI+tUm5OCxuNyo4OV6mylT4cRMjtKtWQ==", - "license": "MIT" + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@cspell/dict-data-science/-/dict-data-science-2.0.11.tgz", + "integrity": "sha512-Dt+83nVCcF+dQyvFSaZjCKt1H5KbsVJFtH2X7VUfmIzQu8xCnV1fUmkhBzGJ+NiFs99Oy9JA6I9EjeqExzXk7g==" }, "node_modules/@cspell/dict-django": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/@cspell/dict-django/-/dict-django-4.1.5.tgz", - "integrity": "sha512-AvTWu99doU3T8ifoMYOMLW2CXKvyKLukPh1auOPwFGHzueWYvBBN+OxF8wF7XwjTBMMeRleVdLh3aWCDEX/ZWg==", - "license": "MIT" + "integrity": "sha512-AvTWu99doU3T8ifoMYOMLW2CXKvyKLukPh1auOPwFGHzueWYvBBN+OxF8wF7XwjTBMMeRleVdLh3aWCDEX/ZWg==" }, "node_modules/@cspell/dict-docker": { "version": "1.1.16", "resolved": "https://registry.npmjs.org/@cspell/dict-docker/-/dict-docker-1.1.16.tgz", - "integrity": "sha512-UiVQ5RmCg6j0qGIxrBnai3pIB+aYKL3zaJGvXk1O/ertTKJif9RZikKXCEgqhaCYMweM4fuLqWSVmw3hU164Iw==", - "license": "MIT" + "integrity": "sha512-UiVQ5RmCg6j0qGIxrBnai3pIB+aYKL3zaJGvXk1O/ertTKJif9RZikKXCEgqhaCYMweM4fuLqWSVmw3hU164Iw==" }, "node_modules/@cspell/dict-dotnet": { "version": "5.0.10", "resolved": "https://registry.npmjs.org/@cspell/dict-dotnet/-/dict-dotnet-5.0.10.tgz", - "integrity": "sha512-ooar8BP/RBNP1gzYfJPStKEmpWy4uv/7JCq6FOnJLeD1yyfG3d/LFMVMwiJo+XWz025cxtkM3wuaikBWzCqkmg==", - "license": "MIT" + "integrity": "sha512-ooar8BP/RBNP1gzYfJPStKEmpWy4uv/7JCq6FOnJLeD1yyfG3d/LFMVMwiJo+XWz025cxtkM3wuaikBWzCqkmg==" }, "node_modules/@cspell/dict-elixir": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/@cspell/dict-elixir/-/dict-elixir-4.0.8.tgz", - "integrity": "sha512-CyfphrbMyl4Ms55Vzuj+mNmd693HjBFr9hvU+B2YbFEZprE5AG+EXLYTMRWrXbpds4AuZcvN3deM2XVB80BN/Q==", - "license": "MIT" + "integrity": "sha512-CyfphrbMyl4Ms55Vzuj+mNmd693HjBFr9hvU+B2YbFEZprE5AG+EXLYTMRWrXbpds4AuZcvN3deM2XVB80BN/Q==" }, "node_modules/@cspell/dict-en_us": { - "version": "4.4.19", - "resolved": "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.4.19.tgz", - "integrity": "sha512-JYYgzhGqSGuIMNY1cTlmq3zrNpehrExMHqLmLnSM2jEGFeHydlL+KLBwBYxMy4e73w+p1+o/rmAiGsMj9g3MCw==", - "license": "MIT" + "version": "4.4.24", + "resolved": "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.4.24.tgz", + "integrity": "sha512-JE+/H2YicHJTneRmgH4GSI21rS+1yGZVl1jfOQgl8iHLC+yTTMtCvueNDMK94CgJACzYAoCsQB70MqiFJJfjLQ==" }, "node_modules/@cspell/dict-en-common-misspellings": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@cspell/dict-en-common-misspellings/-/dict-en-common-misspellings-2.1.6.tgz", - "integrity": "sha512-xV9yryOqZizbSqxRS7kSVRrxVEyWHUqwdY56IuT7eAWGyTCJNmitXzXa4p+AnEbhL+AB2WLynGVSbNoUC3ceFA==", - "license": "CC BY-SA 4.0" + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@cspell/dict-en-common-misspellings/-/dict-en-common-misspellings-2.1.8.tgz", + "integrity": "sha512-vDsjRFPQGuAADAiitf82z9Mz3DcqKZi6V5hPAEIFkLLKjFVBcjUsSq59SfL59ElIFb76MtBO0BLifdEbBj+DoQ==" }, "node_modules/@cspell/dict-en-gb-mit": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@cspell/dict-en-gb-mit/-/dict-en-gb-mit-3.1.9.tgz", - "integrity": "sha512-1lSnphnHTOxnpNLpPLg1XXv8df3hs4oL0LJ6dkQ0IqNROl8Jzl6PD55BDTlKy4YOAA76dJlePB0wyrxB+VVKbg==", - "license": "MIT" + "version": "3.1.14", + "resolved": "https://registry.npmjs.org/@cspell/dict-en-gb-mit/-/dict-en-gb-mit-3.1.14.tgz", + "integrity": "sha512-b+vEerlHP6rnNf30tmTJb7JZnOq4WAslYUvexOz/L3gDna9YJN3bAnwRJ3At3bdcOcMG7PTv3Pi+C73IR22lNg==" }, "node_modules/@cspell/dict-filetypes": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/@cspell/dict-filetypes/-/dict-filetypes-3.0.13.tgz", - "integrity": "sha512-g6rnytIpQlMNKGJT1JKzWkC+b3xCliDKpQ3ANFSq++MnR4GaLiifaC4JkVON11Oh/UTplYOR1nY3BR4X30bswA==", - "license": "MIT" + "version": "3.0.14", + "resolved": "https://registry.npmjs.org/@cspell/dict-filetypes/-/dict-filetypes-3.0.14.tgz", + "integrity": "sha512-KSXaSMYYNMLLdHEnju1DyRRH3eQWPRYRnOXpuHUdOh2jC44VgQoxyMU7oB3NAhDhZKBPCihabzECsAGFbdKfEA==" }, "node_modules/@cspell/dict-flutter": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@cspell/dict-flutter/-/dict-flutter-1.1.1.tgz", - "integrity": "sha512-UlOzRcH2tNbFhZmHJN48Za/2/MEdRHl2BMkCWZBYs+30b91mWvBfzaN4IJQU7dUZtowKayVIF9FzvLZtZokc5A==", - "license": "MIT" + "integrity": "sha512-UlOzRcH2tNbFhZmHJN48Za/2/MEdRHl2BMkCWZBYs+30b91mWvBfzaN4IJQU7dUZtowKayVIF9FzvLZtZokc5A==" }, "node_modules/@cspell/dict-fonts": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/@cspell/dict-fonts/-/dict-fonts-4.0.5.tgz", - "integrity": "sha512-BbpkX10DUX/xzHs6lb7yzDf/LPjwYIBJHJlUXSBXDtK/1HaeS+Wqol4Mlm2+NAgZ7ikIE5DQMViTgBUY3ezNoQ==", - "license": "MIT" + "integrity": "sha512-BbpkX10DUX/xzHs6lb7yzDf/LPjwYIBJHJlUXSBXDtK/1HaeS+Wqol4Mlm2+NAgZ7ikIE5DQMViTgBUY3ezNoQ==" }, "node_modules/@cspell/dict-fsharp": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@cspell/dict-fsharp/-/dict-fsharp-1.1.1.tgz", - "integrity": "sha512-imhs0u87wEA4/cYjgzS0tAyaJpwG7vwtC8UyMFbwpmtw+/bgss+osNfyqhYRyS/ehVCWL17Ewx2UPkexjKyaBA==", - "license": "MIT" + "integrity": "sha512-imhs0u87wEA4/cYjgzS0tAyaJpwG7vwtC8UyMFbwpmtw+/bgss+osNfyqhYRyS/ehVCWL17Ewx2UPkexjKyaBA==" }, "node_modules/@cspell/dict-fullstack": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/@cspell/dict-fullstack/-/dict-fullstack-3.2.7.tgz", - "integrity": "sha512-IxEk2YAwAJKYCUEgEeOg3QvTL4XLlyArJElFuMQevU1dPgHgzWElFevN5lsTFnvMFA1riYsVinqJJX0BanCFEg==", - "license": "MIT" + "integrity": "sha512-IxEk2YAwAJKYCUEgEeOg3QvTL4XLlyArJElFuMQevU1dPgHgzWElFevN5lsTFnvMFA1riYsVinqJJX0BanCFEg==" }, "node_modules/@cspell/dict-gaming-terms": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@cspell/dict-gaming-terms/-/dict-gaming-terms-1.1.2.tgz", - "integrity": "sha512-9XnOvaoTBscq0xuD6KTEIkk9hhdfBkkvJAIsvw3JMcnp1214OCGW8+kako5RqQ2vTZR3Tnf3pc57o7VgkM0q1Q==", - "license": "MIT" + "integrity": "sha512-9XnOvaoTBscq0xuD6KTEIkk9hhdfBkkvJAIsvw3JMcnp1214OCGW8+kako5RqQ2vTZR3Tnf3pc57o7VgkM0q1Q==" }, "node_modules/@cspell/dict-git": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/@cspell/dict-git/-/dict-git-3.0.7.tgz", - "integrity": "sha512-odOwVKgfxCQfiSb+nblQZc4ErXmnWEnv8XwkaI4sNJ7cNmojnvogYVeMqkXPjvfrgEcizEEA4URRD2Ms5PDk1w==", - "license": "MIT" + "integrity": "sha512-odOwVKgfxCQfiSb+nblQZc4ErXmnWEnv8XwkaI4sNJ7cNmojnvogYVeMqkXPjvfrgEcizEEA4URRD2Ms5PDk1w==" }, "node_modules/@cspell/dict-golang": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.23.tgz", - "integrity": "sha512-oXqUh/9dDwcmVlfUF5bn3fYFqbUzC46lXFQmi5emB0vYsyQXdNWsqi6/yH3uE7bdRE21nP7Yo0mR1jjFNyLamg==", - "license": "MIT" + "version": "6.0.24", + "resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.24.tgz", + "integrity": "sha512-rY7PlC3MsHozmjrZWi0HQPUl0BVCV0+mwK0rnMT7pOIXqOe4tWCYMULDIsEk4F0gbIxb5badd2dkCPDYjLnDgA==" }, "node_modules/@cspell/dict-google": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@cspell/dict-google/-/dict-google-1.0.9.tgz", - "integrity": "sha512-biL65POqialY0i4g6crj7pR6JnBkbsPovB2WDYkj3H4TuC/QXv7Pu5pdPxeUJA6TSCHI7T5twsO4VSVyRxD9CA==", - "license": "MIT" + "integrity": "sha512-biL65POqialY0i4g6crj7pR6JnBkbsPovB2WDYkj3H4TuC/QXv7Pu5pdPxeUJA6TSCHI7T5twsO4VSVyRxD9CA==" }, "node_modules/@cspell/dict-haskell": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@cspell/dict-haskell/-/dict-haskell-4.0.6.tgz", - "integrity": "sha512-ib8SA5qgftExpYNjWhpYIgvDsZ/0wvKKxSP+kuSkkak520iPvTJumEpIE+qPcmJQo4NzdKMN8nEfaeci4OcFAQ==", - "license": "MIT" + "integrity": "sha512-ib8SA5qgftExpYNjWhpYIgvDsZ/0wvKKxSP+kuSkkak520iPvTJumEpIE+qPcmJQo4NzdKMN8nEfaeci4OcFAQ==" }, "node_modules/@cspell/dict-html": { "version": "4.0.12", "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-4.0.12.tgz", - "integrity": "sha512-JFffQ1dDVEyJq6tCDWv0r/RqkdSnV43P2F/3jJ9rwLgdsOIXwQbXrz6QDlvQLVvNSnORH9KjDtenFTGDyzfCaA==", - "license": "MIT" + "integrity": "sha512-JFffQ1dDVEyJq6tCDWv0r/RqkdSnV43P2F/3jJ9rwLgdsOIXwQbXrz6QDlvQLVvNSnORH9KjDtenFTGDyzfCaA==" }, "node_modules/@cspell/dict-html-symbol-entities": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@cspell/dict-html-symbol-entities/-/dict-html-symbol-entities-4.0.4.tgz", - "integrity": "sha512-afea+0rGPDeOV9gdO06UW183Qg6wRhWVkgCFwiO3bDupAoyXRuvupbb5nUyqSTsLXIKL8u8uXQlJ9pkz07oVXw==", - "license": "MIT" + "integrity": "sha512-afea+0rGPDeOV9gdO06UW183Qg6wRhWVkgCFwiO3bDupAoyXRuvupbb5nUyqSTsLXIKL8u8uXQlJ9pkz07oVXw==" }, "node_modules/@cspell/dict-java": { "version": "5.0.12", "resolved": "https://registry.npmjs.org/@cspell/dict-java/-/dict-java-5.0.12.tgz", - "integrity": "sha512-qPSNhTcl7LGJ5Qp6VN71H8zqvRQK04S08T67knMq9hTA8U7G1sTKzLmBaDOFhq17vNX/+rT+rbRYp+B5Nwza1A==", - "license": "MIT" + "integrity": "sha512-qPSNhTcl7LGJ5Qp6VN71H8zqvRQK04S08T67knMq9hTA8U7G1sTKzLmBaDOFhq17vNX/+rT+rbRYp+B5Nwza1A==" }, "node_modules/@cspell/dict-julia": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@cspell/dict-julia/-/dict-julia-1.1.1.tgz", - "integrity": "sha512-WylJR9TQ2cgwd5BWEOfdO3zvDB+L7kYFm0I9u0s9jKHWQ6yKmfKeMjU9oXxTBxIufhCXm92SKwwVNAC7gjv+yA==", - "license": "MIT" + "integrity": "sha512-WylJR9TQ2cgwd5BWEOfdO3zvDB+L7kYFm0I9u0s9jKHWQ6yKmfKeMjU9oXxTBxIufhCXm92SKwwVNAC7gjv+yA==" }, "node_modules/@cspell/dict-k8s": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/@cspell/dict-k8s/-/dict-k8s-1.0.12.tgz", - "integrity": "sha512-2LcllTWgaTfYC7DmkMPOn9GsBWsA4DZdlun4po8s2ysTP7CPEnZc1ZfK6pZ2eI4TsZemlUQQ+NZxMe9/QutQxg==", - "license": "MIT" + "integrity": "sha512-2LcllTWgaTfYC7DmkMPOn9GsBWsA4DZdlun4po8s2ysTP7CPEnZc1ZfK6pZ2eI4TsZemlUQQ+NZxMe9/QutQxg==" }, "node_modules/@cspell/dict-kotlin": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@cspell/dict-kotlin/-/dict-kotlin-1.1.1.tgz", - "integrity": "sha512-J3NzzfgmxRvEeOe3qUXnSJQCd38i/dpF9/t3quuWh6gXM+krsAXP75dY1CzDmS8mrJAlBdVBeAW5eAZTD8g86Q==", - "license": "MIT" + "integrity": "sha512-J3NzzfgmxRvEeOe3qUXnSJQCd38i/dpF9/t3quuWh6gXM+krsAXP75dY1CzDmS8mrJAlBdVBeAW5eAZTD8g86Q==" }, "node_modules/@cspell/dict-latex": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@cspell/dict-latex/-/dict-latex-4.0.4.tgz", - "integrity": "sha512-YdTQhnTINEEm/LZgTzr9Voz4mzdOXH7YX+bSFs3hnkUHCUUtX/mhKgf1CFvZ0YNM2afjhQcmLaR9bDQVyYBvpA==", - "license": "MIT" + "integrity": "sha512-YdTQhnTINEEm/LZgTzr9Voz4mzdOXH7YX+bSFs3hnkUHCUUtX/mhKgf1CFvZ0YNM2afjhQcmLaR9bDQVyYBvpA==" }, "node_modules/@cspell/dict-lorem-ipsum": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/@cspell/dict-lorem-ipsum/-/dict-lorem-ipsum-4.0.5.tgz", - "integrity": "sha512-9a4TJYRcPWPBKkQAJ/whCu4uCAEgv/O2xAaZEI0n4y1/l18Yyx8pBKoIX5QuVXjjmKEkK7hi5SxyIsH7pFEK9Q==", - "license": "MIT" + "integrity": "sha512-9a4TJYRcPWPBKkQAJ/whCu4uCAEgv/O2xAaZEI0n4y1/l18Yyx8pBKoIX5QuVXjjmKEkK7hi5SxyIsH7pFEK9Q==" }, "node_modules/@cspell/dict-lua": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/@cspell/dict-lua/-/dict-lua-4.0.8.tgz", - "integrity": "sha512-N4PkgNDMu9JVsRu7JBS/3E/dvfItRgk9w5ga2dKq+JupP2Y3lojNaAVFhXISh4Y0a6qXDn2clA6nvnavQ/jjLA==", - "license": "MIT" + "integrity": "sha512-N4PkgNDMu9JVsRu7JBS/3E/dvfItRgk9w5ga2dKq+JupP2Y3lojNaAVFhXISh4Y0a6qXDn2clA6nvnavQ/jjLA==" }, "node_modules/@cspell/dict-makefile": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@cspell/dict-makefile/-/dict-makefile-1.0.5.tgz", - "integrity": "sha512-4vrVt7bGiK8Rx98tfRbYo42Xo2IstJkAF4tLLDMNQLkQ86msDlYSKG1ZCk8Abg+EdNcFAjNhXIiNO+w4KflGAQ==", - "license": "MIT" + "integrity": "sha512-4vrVt7bGiK8Rx98tfRbYo42Xo2IstJkAF4tLLDMNQLkQ86msDlYSKG1ZCk8Abg+EdNcFAjNhXIiNO+w4KflGAQ==" }, "node_modules/@cspell/dict-markdown": { "version": "2.0.12", "resolved": "https://registry.npmjs.org/@cspell/dict-markdown/-/dict-markdown-2.0.12.tgz", "integrity": "sha512-ufwoliPijAgWkD/ivAMC+A9QD895xKiJRF/fwwknQb7kt7NozTLKFAOBtXGPJAB4UjhGBpYEJVo2elQ0FCAH9A==", - "license": "MIT", "peerDependencies": { "@cspell/dict-css": "^4.0.18", "@cspell/dict-html": "^4.0.12", @@ -377,127 +333,112 @@ "node_modules/@cspell/dict-monkeyc": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@cspell/dict-monkeyc/-/dict-monkeyc-1.0.11.tgz", - "integrity": "sha512-7Q1Ncu0urALI6dPTrEbSTd//UK0qjRBeaxhnm8uY5fgYNFYAG+u4gtnTIo59S6Bw5P++4H3DiIDYoQdY/lha8w==", - "license": "MIT" + "integrity": "sha512-7Q1Ncu0urALI6dPTrEbSTd//UK0qjRBeaxhnm8uY5fgYNFYAG+u4gtnTIo59S6Bw5P++4H3DiIDYoQdY/lha8w==" }, "node_modules/@cspell/dict-node": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/@cspell/dict-node/-/dict-node-5.0.8.tgz", - "integrity": "sha512-AirZcN2i84ynev3p2/1NCPEhnNsHKMz9zciTngGoqpdItUb2bDt1nJBjwlsrFI78GZRph/VaqTVFwYikmncpXg==", - "license": "MIT" + "integrity": "sha512-AirZcN2i84ynev3p2/1NCPEhnNsHKMz9zciTngGoqpdItUb2bDt1nJBjwlsrFI78GZRph/VaqTVFwYikmncpXg==" }, "node_modules/@cspell/dict-npm": { - "version": "5.2.17", - "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.2.17.tgz", - "integrity": "sha512-0yp7lBXtN3CtxBrpvTu/yAuPdOHR2ucKzPxdppc3VKO068waZNpKikn1NZCzBS3dIAFGVITzUPtuTXxt9cxnSg==", - "license": "MIT" + "version": "5.2.22", + "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.2.22.tgz", + "integrity": "sha512-bepGmmRv7KmxULqfw88G9wxkpIAQA96YyrfKpfg4RHnQLxpmzoRnZGtK5S9JH7Hlf5LEd1gkOF7dtCE6cek67w==" }, "node_modules/@cspell/dict-php": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.0.15.tgz", - "integrity": "sha512-iepGB2gtToMWSTvybesn4/lUp4LwXcEm0s8vasJLP76WWVkq1zYjmeS+WAIzNgsuURyZ/9mGqhS0CWMuo74ODw==", - "license": "MIT" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.1.0.tgz", + "integrity": "sha512-dTDeabyOj7eFvn2Q4Za3uVXM2+SzeFMqX8ly2P0XTo4AzbCmI2hulFD/QIADwWmwiRrInbbf8cxwFHNIYrXl4w==" }, "node_modules/@cspell/dict-powershell": { "version": "5.0.15", "resolved": "https://registry.npmjs.org/@cspell/dict-powershell/-/dict-powershell-5.0.15.tgz", - "integrity": "sha512-l4S5PAcvCFcVDMJShrYD0X6Huv9dcsQPlsVsBGbH38wvuN7gS7+GxZFAjTNxDmTY1wrNi1cCatSg6Pu2BW4rgg==", - "license": "MIT" + "integrity": "sha512-l4S5PAcvCFcVDMJShrYD0X6Huv9dcsQPlsVsBGbH38wvuN7gS7+GxZFAjTNxDmTY1wrNi1cCatSg6Pu2BW4rgg==" }, "node_modules/@cspell/dict-public-licenses": { "version": "2.0.15", "resolved": "https://registry.npmjs.org/@cspell/dict-public-licenses/-/dict-public-licenses-2.0.15.tgz", - "integrity": "sha512-cJEOs901H13Pfy0fl4dCD1U+xpWIMaEPq8MeYU83FfDZvellAuSo4GqWCripfIqlhns/L6+UZEIJSOZnjgy7Wg==", - "license": "MIT" + "integrity": "sha512-cJEOs901H13Pfy0fl4dCD1U+xpWIMaEPq8MeYU83FfDZvellAuSo4GqWCripfIqlhns/L6+UZEIJSOZnjgy7Wg==" }, "node_modules/@cspell/dict-python": { - "version": "4.2.19", - "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.2.19.tgz", - "integrity": "sha512-9S2gTlgILp1eb6OJcVZeC8/Od83N8EqBSg5WHVpx97eMMJhifOzePkE0kDYjyHMtAFznCQTUu0iQEJohNQ5B0A==", - "license": "MIT", + "version": "4.2.21", + "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.2.21.tgz", + "integrity": "sha512-M9OgwXWhpZqEZqKU2psB2DFsT8q5SwEahkQeIpNIRWIErjwG7I9yYhhfvPz6s5gMCMhhb3hqcPJTnmdgqGrQyg==", "dependencies": { - "@cspell/dict-data-science": "^2.0.9" + "@cspell/dict-data-science": "^2.0.11" } }, "node_modules/@cspell/dict-r": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@cspell/dict-r/-/dict-r-2.1.1.tgz", - "integrity": "sha512-71Ka+yKfG4ZHEMEmDxc6+blFkeTTvgKbKAbwiwQAuKl3zpqs1Y0vUtwW2N4b3LgmSPhV3ODVY0y4m5ofqDuKMw==", - "license": "MIT" + "integrity": "sha512-71Ka+yKfG4ZHEMEmDxc6+blFkeTTvgKbKAbwiwQAuKl3zpqs1Y0vUtwW2N4b3LgmSPhV3ODVY0y4m5ofqDuKMw==" }, "node_modules/@cspell/dict-ruby": { "version": "5.0.9", "resolved": "https://registry.npmjs.org/@cspell/dict-ruby/-/dict-ruby-5.0.9.tgz", - "integrity": "sha512-H2vMcERMcANvQshAdrVx0XoWaNX8zmmiQN11dZZTQAZaNJ0xatdJoSqY8C8uhEMW89bfgpN+NQgGuDXW2vmXEw==", - "license": "MIT" + "integrity": "sha512-H2vMcERMcANvQshAdrVx0XoWaNX8zmmiQN11dZZTQAZaNJ0xatdJoSqY8C8uhEMW89bfgpN+NQgGuDXW2vmXEw==" }, "node_modules/@cspell/dict-rust": { "version": "4.0.12", "resolved": "https://registry.npmjs.org/@cspell/dict-rust/-/dict-rust-4.0.12.tgz", - "integrity": "sha512-z2QiH+q9UlNhobBJArvILRxV8Jz0pKIK7gqu4TgmEYyjiu1TvnGZ1tbYHeu9w3I/wOP6UMDoCBTty5AlYfW0mw==", - "license": "MIT" + "integrity": "sha512-z2QiH+q9UlNhobBJArvILRxV8Jz0pKIK7gqu4TgmEYyjiu1TvnGZ1tbYHeu9w3I/wOP6UMDoCBTty5AlYfW0mw==" }, "node_modules/@cspell/dict-scala": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/@cspell/dict-scala/-/dict-scala-5.0.8.tgz", - "integrity": "sha512-YdftVmumv8IZq9zu1gn2U7A4bfM2yj9Vaupydotyjuc+EEZZSqAafTpvW/jKLWji2TgybM1L2IhmV0s/Iv9BTw==", - "license": "MIT" + "integrity": "sha512-YdftVmumv8IZq9zu1gn2U7A4bfM2yj9Vaupydotyjuc+EEZZSqAafTpvW/jKLWji2TgybM1L2IhmV0s/Iv9BTw==" }, "node_modules/@cspell/dict-shell": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@cspell/dict-shell/-/dict-shell-1.1.1.tgz", - "integrity": "sha512-T37oYxE7OV1x/1D4/13Y8JZGa1QgDCXV7AVt3HLXjn0Fe3TaNDvf5sU0fGnXKmBPqFFrHdpD3uutAQb1dlp15g==", - "license": "MIT" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-shell/-/dict-shell-1.1.2.tgz", + "integrity": "sha512-WqOUvnwcHK1X61wAfwyXq04cn7KYyskg90j4lLg3sGGKMW9Sq13hs91pqrjC44Q+lQLgCobrTkMDw9Wyl9nRFA==" }, "node_modules/@cspell/dict-software-terms": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-5.1.8.tgz", - "integrity": "sha512-iwCHLP11OmVHEX2MzE8EPxpPw7BelvldxWe5cJ3xXIDL8TjF2dBTs2noGcrqnZi15SLYIlO8897BIOa33WHHZA==", - "license": "MIT" + "version": "5.1.13", + "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-5.1.13.tgz", + "integrity": "sha512-bmWMOpqzCmmKFHM9hFC6o+GP20t2+uTuwksR3a6crHQqvNv3revzwQHorsWvSYx75xsdcvRYrAz7PqPEV/FG1g==" }, "node_modules/@cspell/dict-sql": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@cspell/dict-sql/-/dict-sql-2.2.1.tgz", - "integrity": "sha512-qDHF8MpAYCf4pWU8NKbnVGzkoxMNrFqBHyG/dgrlic5EQiKANCLELYtGlX5auIMDLmTf1inA0eNtv74tyRJ/vg==", - "license": "MIT" + "integrity": "sha512-qDHF8MpAYCf4pWU8NKbnVGzkoxMNrFqBHyG/dgrlic5EQiKANCLELYtGlX5auIMDLmTf1inA0eNtv74tyRJ/vg==" }, "node_modules/@cspell/dict-svelte": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/@cspell/dict-svelte/-/dict-svelte-1.0.7.tgz", - "integrity": "sha512-hGZsGqP0WdzKkdpeVLBivRuSNzOTvN036EBmpOwxH+FTY2DuUH7ecW+cSaMwOgmq5JFSdTcbTNFlNC8HN8lhaQ==", - "license": "MIT" + "integrity": "sha512-hGZsGqP0WdzKkdpeVLBivRuSNzOTvN036EBmpOwxH+FTY2DuUH7ecW+cSaMwOgmq5JFSdTcbTNFlNC8HN8lhaQ==" }, "node_modules/@cspell/dict-swift": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@cspell/dict-swift/-/dict-swift-2.0.6.tgz", - "integrity": "sha512-PnpNbrIbex2aqU1kMgwEKvCzgbkHtj3dlFLPMqW1vSniop7YxaDTtvTUO4zA++ugYAEL+UK8vYrBwDPTjjvSnA==", - "license": "MIT" + "integrity": "sha512-PnpNbrIbex2aqU1kMgwEKvCzgbkHtj3dlFLPMqW1vSniop7YxaDTtvTUO4zA++ugYAEL+UK8vYrBwDPTjjvSnA==" }, "node_modules/@cspell/dict-terraform": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@cspell/dict-terraform/-/dict-terraform-1.1.3.tgz", - "integrity": "sha512-gr6wxCydwSFyyBKhBA2xkENXtVFToheqYYGFvlMZXWjviynXmh+NK/JTvTCk/VHk3+lzbO9EEQKee6VjrAUSbA==", - "license": "MIT" + "integrity": "sha512-gr6wxCydwSFyyBKhBA2xkENXtVFToheqYYGFvlMZXWjviynXmh+NK/JTvTCk/VHk3+lzbO9EEQKee6VjrAUSbA==" }, "node_modules/@cspell/dict-typescript": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/@cspell/dict-typescript/-/dict-typescript-3.2.3.tgz", - "integrity": "sha512-zXh1wYsNljQZfWWdSPYwQhpwiuW0KPW1dSd8idjMRvSD0aSvWWHoWlrMsmZeRl4qM4QCEAjua8+cjflm41cQBg==", - "license": "MIT" + "integrity": "sha512-zXh1wYsNljQZfWWdSPYwQhpwiuW0KPW1dSd8idjMRvSD0aSvWWHoWlrMsmZeRl4qM4QCEAjua8+cjflm41cQBg==" }, "node_modules/@cspell/dict-vue": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/@cspell/dict-vue/-/dict-vue-3.0.5.tgz", - "integrity": "sha512-Mqutb8jbM+kIcywuPQCCaK5qQHTdaByoEO2J9LKFy3sqAdiBogNkrplqUK0HyyRFgCfbJUgjz3N85iCMcWH0JA==", - "license": "MIT" + "integrity": "sha512-Mqutb8jbM+kIcywuPQCCaK5qQHTdaByoEO2J9LKFy3sqAdiBogNkrplqUK0HyyRFgCfbJUgjz3N85iCMcWH0JA==" + }, + "node_modules/@cspell/dict-zig": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-zig/-/dict-zig-1.0.0.tgz", + "integrity": "sha512-XibBIxBlVosU06+M6uHWkFeT0/pW5WajDRYdXG2CgHnq85b0TI/Ks0FuBJykmsgi2CAD3Qtx8UHFEtl/DSFnAQ==" }, "node_modules/@cspell/dynamic-import": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-9.2.1.tgz", - "integrity": "sha512-izYQbk7ck0ffNA1gf7Gi3PkUEjj+crbYeyNK1hxHx5A+GuR416ozs0aEyp995KI2v9HZlXscOj3SC3wrWzHZeA==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-9.3.2.tgz", + "integrity": "sha512-au7FyuIHUNI2r9sO3pUBKVTeD/v7c9x/nPUStaAK1bG4rdKt4w+/jUY2IaldAraW5w29z528BboXbiV87SM1kw==", "dependencies": { - "@cspell/url": "9.2.1", + "@cspell/url": "9.3.2", "import-meta-resolve": "^4.2.0" }, "engines": { @@ -505,28 +446,25 @@ } }, "node_modules/@cspell/filetypes": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-9.2.1.tgz", - "integrity": "sha512-Dy1y1pQ+7hi2gPs+jERczVkACtYbUHcLodXDrzpipoxgOtVxMcyZuo+84WYHImfu0gtM0wU2uLObaVgMSTnytw==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-9.3.2.tgz", + "integrity": "sha512-0bUxQlmJPRHZrRQD7adbc4lFizO8tGD/6+1cBgU3kV3+NVrpr12y4jU8twCSChhYibZyPr7bnvhkM3cQgb8RzA==", "engines": { "node": ">=20" } }, "node_modules/@cspell/strong-weak-map": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-9.2.1.tgz", - "integrity": "sha512-1HsQWZexvJSjDocVnbeAWjjgqWE/0op/txxzDPvDqI2sE6pY0oO4Cinj2I8z+IP+m6/E6yjPxdb23ydbQbPpJQ==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-9.3.2.tgz", + "integrity": "sha512-pFcmOTWCoFMRETb9PCkCmaiZiLb5i2qOZmGH/p/tFEH8kIYhMGfhaulnXwKwS+Ke6PKceQd2YL98bGmo8hL4aQ==", "engines": { "node": ">=20" } }, "node_modules/@cspell/url": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/url/-/url-9.2.1.tgz", - "integrity": "sha512-9EHCoGKtisPNsEdBQ28tKxKeBmiVS3D4j+AN8Yjr+Dmtu+YACKGWiMOddNZG2VejQNIdFx7FwzU00BGX68ELhA==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/url/-/url-9.3.2.tgz", + "integrity": "sha512-TobUlZl7Z7VehhNOMNAg1ABuGizieseftlG94OZJ934JptOhK8TC/1o2ldKrbDH50jyt6E7rPTMV2BW/vWuTzQ==", "engines": { "node": ">=20" } @@ -534,14 +472,12 @@ "node_modules/array-timsort": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/array-timsort/-/array-timsort-1.0.3.tgz", - "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==", - "license": "MIT" + "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==" }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "license": "MIT", "engines": { "node": ">=6" } @@ -577,7 +513,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/clear-module/-/clear-module-4.1.2.tgz", "integrity": "sha512-LWAxzHqdHsAZlPlEyJ2Poz6AIs384mPeqLVCru2p0BrP9G/kVGuhNyZYClLO6cXlnuJjzC8xtsJIuMjKqLXoAw==", - "license": "MIT", "dependencies": { "parent-module": "^2.0.0", "resolve-from": "^5.0.0" @@ -590,10 +525,9 @@ } }, "node_modules/commander": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.1.tgz", - "integrity": "sha512-2JkV3gUZUVrbNA+1sjBOYLsMZ5cEEl8GTFP2a4AVz5hvasAMCQ1D2l2le/cX+pV4N6ZU17zjUahLpIXRrnWL8A==", - "license": "MIT", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.2.tgz", + "integrity": "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ==", "engines": { "node": ">=20" } @@ -602,7 +536,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/comment-json/-/comment-json-4.4.1.tgz", "integrity": "sha512-r1To31BQD5060QdkC+Iheai7gHwoSZobzunqkf2/kQ6xIAfJyrKNAFUwdKvkK7Qgu7pVTKQEa7ok7Ed3ycAJgg==", - "license": "MIT", "dependencies": { "array-timsort": "^1.0.3", "core-util-is": "^1.0.3", @@ -615,33 +548,31 @@ "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "license": "MIT" + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/cspell": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell/-/cspell-9.2.1.tgz", - "integrity": "sha512-PoKGKE9Tl87Sn/jwO4jvH7nTqe5Xrsz2DeJT5CkulY7SoL2fmsAqfbImQOFS2S0s36qD98t6VO+Ig2elEEcHew==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell/-/cspell-9.3.2.tgz", + "integrity": "sha512-3xFyVSTYrYa/QJzLfzsCRMkMXqOsytP8E26DuGrVMJQoLPFmbOXNNtnMu4wrtr17QVloxpvutW77U4vb2L/LDQ==", "dependencies": { - "@cspell/cspell-json-reporter": "9.2.1", - "@cspell/cspell-pipe": "9.2.1", - "@cspell/cspell-types": "9.2.1", - "@cspell/dynamic-import": "9.2.1", - "@cspell/url": "9.2.1", - "chalk": "^5.6.0", - "chalk-template": "^1.1.0", - "commander": "^14.0.0", - "cspell-config-lib": "9.2.1", - "cspell-dictionary": "9.2.1", - "cspell-gitignore": "9.2.1", - "cspell-glob": "9.2.1", - "cspell-io": "9.2.1", - "cspell-lib": "9.2.1", + "@cspell/cspell-json-reporter": "9.3.2", + "@cspell/cspell-pipe": "9.3.2", + "@cspell/cspell-types": "9.3.2", + "@cspell/dynamic-import": "9.3.2", + "@cspell/url": "9.3.2", + "chalk": "^5.6.2", + "chalk-template": "^1.1.2", + "commander": "^14.0.2", + "cspell-config-lib": "9.3.2", + "cspell-dictionary": "9.3.2", + "cspell-gitignore": "9.3.2", + "cspell-glob": "9.3.2", + "cspell-io": "9.3.2", + "cspell-lib": "9.3.2", "fast-json-stable-stringify": "^2.1.0", "flatted": "^3.3.3", - "semver": "^7.7.2", - "tinyglobby": "^0.2.14" + "semver": "^7.7.3", + "tinyglobby": "^0.2.15" }, "bin": { "cspell": "bin.mjs", @@ -655,14 +586,13 @@ } }, "node_modules/cspell-config-lib": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-9.2.1.tgz", - "integrity": "sha512-qqhaWW+0Ilc7493lXAlXjziCyeEmQbmPMc1XSJw2EWZmzb+hDvLdFGHoX18QU67yzBtu5hgQsJDEDZKvVDTsRA==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-9.3.2.tgz", + "integrity": "sha512-zXhmA4rqgWQRTVijI+g/mgiep76TvTO4d+P3CHwcqLG57BKVzoW+jkO4qDLC+Neh4b8+CcNWEIr3w16BfuEJAA==", "dependencies": { - "@cspell/cspell-types": "9.2.1", - "comment-json": "^4.2.5", - "smol-toml": "^1.4.2", + "@cspell/cspell-types": "9.3.2", + "comment-json": "^4.4.1", + "smol-toml": "^1.5.2", "yaml": "^2.8.1" }, "engines": { @@ -670,29 +600,27 @@ } }, "node_modules/cspell-dictionary": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-9.2.1.tgz", - "integrity": "sha512-0hQVFySPsoJ0fONmDPwCWGSG6SGj4ERolWdx4t42fzg5zMs+VYGXpQW4BJneQ5Tfxy98Wx8kPhmh/9E8uYzLTw==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-9.3.2.tgz", + "integrity": "sha512-E3YhOhZzZt1a+AEbFV2B3THCyZ576PDg0mDNUDrU1Y65SyIhf4DC6itfPoAb6R3FI/DI218RqWZg/FTT8lJ2gA==", "dependencies": { - "@cspell/cspell-pipe": "9.2.1", - "@cspell/cspell-types": "9.2.1", - "cspell-trie-lib": "9.2.1", - "fast-equals": "^5.2.2" + "@cspell/cspell-pipe": "9.3.2", + "@cspell/cspell-types": "9.3.2", + "cspell-trie-lib": "9.3.2", + "fast-equals": "^5.3.3" }, "engines": { "node": ">=20" } }, "node_modules/cspell-gitignore": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-9.2.1.tgz", - "integrity": "sha512-WPnDh03gXZoSqVyXq4L7t9ljx6lTDvkiSRUudb125egEK5e9s04csrQpLI3Yxcnc1wQA2nzDr5rX9XQVvCHf7g==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-9.3.2.tgz", + "integrity": "sha512-G2bLR+Dfb9GX4Sdm75GfCCa9V/sQYkRbLckuCuVmJxvcDB0xfczAtb6TfAXIziF3oUI6cOB1g+PoNLWBelcK5w==", "dependencies": { - "@cspell/url": "9.2.1", - "cspell-glob": "9.2.1", - "cspell-io": "9.2.1" + "@cspell/url": "9.3.2", + "cspell-glob": "9.3.2", + "cspell-io": "9.3.2" }, "bin": { "cspell-gitignore": "bin.mjs" @@ -702,12 +630,11 @@ } }, "node_modules/cspell-glob": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-9.2.1.tgz", - "integrity": "sha512-CrT/6ld3rXhB36yWFjrx1SrMQzwDrGOLr+wYEnrWI719/LTYWWCiMFW7H+qhsJDTsR+ku8+OAmfRNBDXvh9mnQ==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-9.3.2.tgz", + "integrity": "sha512-TuSupENEKyOCupOUZ3vnPxaTOghxY/rD1JIkb8e5kjzRprYVilO/rYqEk/52iLwJVd+4Npe8fNhR3KhU7u/UUg==", "dependencies": { - "@cspell/url": "9.2.1", + "@cspell/url": "9.3.2", "picomatch": "^4.0.3" }, "engines": { @@ -715,13 +642,12 @@ } }, "node_modules/cspell-grammar": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-9.2.1.tgz", - "integrity": "sha512-10RGFG7ZTQPdwyW2vJyfmC1t8813y8QYRlVZ8jRHWzer9NV8QWrGnL83F+gTPXiKR/lqiW8WHmFlXR4/YMV+JQ==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-9.3.2.tgz", + "integrity": "sha512-ysonrFu9vJvF/derDlEjUfmvLeCfNOWPh00t6Yh093AKrJFoWQiyaS/5bEN/uB5/n1sa4k3ItnWvuTp3+YuZsA==", "dependencies": { - "@cspell/cspell-pipe": "9.2.1", - "@cspell/cspell-types": "9.2.1" + "@cspell/cspell-pipe": "9.3.2", + "@cspell/cspell-types": "9.3.2" }, "bin": { "cspell-grammar": "bin.mjs" @@ -731,43 +657,39 @@ } }, "node_modules/cspell-io": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-9.2.1.tgz", - "integrity": "sha512-v9uWXtRzB+RF/Mzg5qMzpb8/yt+1bwtTt2rZftkLDLrx5ybVvy6rhRQK05gFWHmWVtWEe0P/pIxaG2Vz92C8Ag==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-9.3.2.tgz", + "integrity": "sha512-ahoULCp0j12TyXXmIcdO/7x65A/2mzUQO1IkOC65OXEbNT+evt0yswSO5Nr1F6kCHDuEKc46EZWwsYAzj78pMg==", "dependencies": { - "@cspell/cspell-service-bus": "9.2.1", - "@cspell/url": "9.2.1" + "@cspell/cspell-service-bus": "9.3.2", + "@cspell/url": "9.3.2" }, "engines": { "node": ">=20" } }, "node_modules/cspell-lib": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-9.2.1.tgz", - "integrity": "sha512-KeB6NHcO0g1knWa7sIuDippC3gian0rC48cvO0B0B0QwhOxNxWVp8cSmkycXjk4ijBZNa++IwFjeK/iEqMdahQ==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-9.3.2.tgz", + "integrity": "sha512-kdk11kib68zNANNICuOA8h4oA9kENQUAdeX/uvT4+7eHbHHV8WSgjXm4k4o/pRIbg164UJTX/XxKb/65ftn5jw==", "dependencies": { - "@cspell/cspell-bundled-dicts": "9.2.1", - "@cspell/cspell-pipe": "9.2.1", - "@cspell/cspell-resolver": "9.2.1", - "@cspell/cspell-types": "9.2.1", - "@cspell/dynamic-import": "9.2.1", - "@cspell/filetypes": "9.2.1", - "@cspell/strong-weak-map": "9.2.1", - "@cspell/url": "9.2.1", + "@cspell/cspell-bundled-dicts": "9.3.2", + "@cspell/cspell-pipe": "9.3.2", + "@cspell/cspell-resolver": "9.3.2", + "@cspell/cspell-types": "9.3.2", + "@cspell/dynamic-import": "9.3.2", + "@cspell/filetypes": "9.3.2", + "@cspell/strong-weak-map": "9.3.2", + "@cspell/url": "9.3.2", "clear-module": "^4.1.2", - "comment-json": "^4.2.5", - "cspell-config-lib": "9.2.1", - "cspell-dictionary": "9.2.1", - "cspell-glob": "9.2.1", - "cspell-grammar": "9.2.1", - "cspell-io": "9.2.1", - "cspell-trie-lib": "9.2.1", + "cspell-config-lib": "9.3.2", + "cspell-dictionary": "9.3.2", + "cspell-glob": "9.3.2", + "cspell-grammar": "9.3.2", + "cspell-io": "9.3.2", + "cspell-trie-lib": "9.3.2", "env-paths": "^3.0.0", - "fast-equals": "^5.2.2", - "gensequence": "^7.0.0", + "gensequence": "^8.0.8", "import-fresh": "^3.3.1", "resolve-from": "^5.0.0", "vscode-languageserver-textdocument": "^1.0.12", @@ -779,14 +701,13 @@ } }, "node_modules/cspell-trie-lib": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-9.2.1.tgz", - "integrity": "sha512-qOtbL+/tUzGFHH0Uq2wi7sdB9iTy66QNx85P7DKeRdX9ZH53uQd7qC4nEk+/JPclx1EgXX26svxr0jTGISJhLw==", - "license": "MIT", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-9.3.2.tgz", + "integrity": "sha512-1Af7Mq9jIccFQyJl/ZCcqQbtJwuDqpQVkk8xfs/92x4OI6gW1iTVRMtsrh0RTw1HZoR8aQD7tRRCiLPf/D+UiQ==", "dependencies": { - "@cspell/cspell-pipe": "9.2.1", - "@cspell/cspell-types": "9.2.1", - "gensequence": "^7.0.0" + "@cspell/cspell-pipe": "9.3.2", + "@cspell/cspell-types": "9.3.2", + "gensequence": "^8.0.8" }, "engines": { "node": ">=20" @@ -796,7 +717,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz", "integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==", - "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -808,7 +728,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -818,10 +737,9 @@ } }, "node_modules/fast-equals": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.3.2.tgz", - "integrity": "sha512-6rxyATwPCkaFIL3JLqw8qXqMpIZ942pTX/tbQFkRsDGblS8tNGtlUauA/+mt6RUfqn/4MoEr+WDkYoIQbibWuQ==", - "license": "MIT", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.3.3.tgz", + "integrity": "sha512-/boTcHZeIAQ2r/tL11voclBHDeP9WPxLt+tyAbVSyyXuUFyh0Tne7gJZTqGbxnvj79TjLdCXLOY7UIPhyG5MTw==", "engines": { "node": ">=6.0.0" } @@ -855,19 +773,17 @@ "license": "ISC" }, "node_modules/gensequence": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-7.0.0.tgz", - "integrity": "sha512-47Frx13aZh01afHJTB3zTtKIlFI6vWY+MYCN9Qpew6i52rfKjnhCF/l1YlC8UmEMvvntZZ6z4PiCcmyuedR2aQ==", - "license": "MIT", + "version": "8.0.8", + "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-8.0.8.tgz", + "integrity": "sha512-omMVniXEXpdx/vKxGnPRoO2394Otlze28TyxECbFVyoSpZ9H3EO7lemjcB12OpQJzRW4e5tt/dL1rOxry6aMHg==", "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/global-directory": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/global-directory/-/global-directory-4.0.1.tgz", "integrity": "sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==", - "license": "MIT", "dependencies": { "ini": "4.1.1" }, @@ -882,7 +798,6 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", - "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -898,7 +813,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -910,7 +824,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "license": "MIT", "engines": { "node": ">=4" } @@ -919,7 +832,6 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.2.0.tgz", "integrity": "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==", - "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -929,7 +841,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz", "integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==", - "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -938,7 +849,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-2.0.0.tgz", "integrity": "sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg==", - "license": "MIT", "dependencies": { "callsites": "^3.1.0" }, @@ -962,7 +872,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "license": "MIT", "engines": { "node": ">=8" } @@ -980,10 +889,9 @@ } }, "node_modules/smol-toml": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.4.2.tgz", - "integrity": "sha512-rInDH6lCNiEyn3+hH8KVGFdbjc099j47+OSgbMrfDYX1CmXLfdKd7qi6IfcWj2wFxvSVkuI46M+wPGYfEOEj6g==", - "license": "BSD-3-Clause", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.5.2.tgz", + "integrity": "sha512-QlaZEqcAH3/RtNyet1IPIYPsEWAaYyXXv1Krsi+1L/QHppjX4Ifm8MQsBISz9vE8cHicIq3clogsheili5vhaQ==", "engines": { "node": ">= 18" }, @@ -1010,20 +918,17 @@ "node_modules/vscode-languageserver-textdocument": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", - "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==", - "license": "MIT" + "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==" }, "node_modules/vscode-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.1.0.tgz", - "integrity": "sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==", - "license": "MIT" + "integrity": "sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==" }, "node_modules/xdg-basedir": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", - "license": "MIT", "engines": { "node": ">=12" }, @@ -1035,7 +940,6 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", - "license": "ISC", "bin": { "yaml": "bin.mjs" }, @@ -1046,36 +950,36 @@ }, "dependencies": { "@cspell/cspell-bundled-dicts": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-9.2.1.tgz", - "integrity": "sha512-85gHoZh3rgZ/EqrHIr1/I4OLO53fWNp6JZCqCdgaT7e3sMDaOOG6HoSxCvOnVspXNIf/1ZbfTCDMx9x79Xq0AQ==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-9.3.2.tgz", + "integrity": "sha512-OmKzq/0FATHU671GKMzBrTyLdm25Wnziva7h4ylumVn1wnwWsXGef5bgXD7iuApqfqH9SzxsU0NtTB8m8vwEHQ==", "requires": { "@cspell/dict-ada": "^4.1.1", "@cspell/dict-al": "^1.1.1", - "@cspell/dict-aws": "^4.0.15", - "@cspell/dict-bash": "^4.2.1", - "@cspell/dict-companies": "^3.2.5", - "@cspell/dict-cpp": "^6.0.12", + "@cspell/dict-aws": "^4.0.16", + "@cspell/dict-bash": "^4.2.2", + "@cspell/dict-companies": "^3.2.7", + "@cspell/dict-cpp": "^6.0.14", "@cspell/dict-cryptocurrencies": "^5.0.5", "@cspell/dict-csharp": "^4.0.7", "@cspell/dict-css": "^4.0.18", "@cspell/dict-dart": "^2.3.1", - "@cspell/dict-data-science": "^2.0.9", + "@cspell/dict-data-science": "^2.0.11", "@cspell/dict-django": "^4.1.5", "@cspell/dict-docker": "^1.1.16", "@cspell/dict-dotnet": "^5.0.10", "@cspell/dict-elixir": "^4.0.8", - "@cspell/dict-en_us": "^4.4.18", - "@cspell/dict-en-common-misspellings": "^2.1.5", - "@cspell/dict-en-gb-mit": "^3.1.8", - "@cspell/dict-filetypes": "^3.0.13", + "@cspell/dict-en_us": "^4.4.24", + "@cspell/dict-en-common-misspellings": "^2.1.8", + "@cspell/dict-en-gb-mit": "^3.1.14", + "@cspell/dict-filetypes": "^3.0.14", "@cspell/dict-flutter": "^1.1.1", "@cspell/dict-fonts": "^4.0.5", "@cspell/dict-fsharp": "^1.1.1", "@cspell/dict-fullstack": "^3.2.7", "@cspell/dict-gaming-terms": "^1.1.2", "@cspell/dict-git": "^3.0.7", - "@cspell/dict-golang": "^6.0.23", + "@cspell/dict-golang": "^6.0.24", "@cspell/dict-google": "^1.0.9", "@cspell/dict-haskell": "^4.0.6", "@cspell/dict-html": "^4.0.12", @@ -1091,55 +995,56 @@ "@cspell/dict-markdown": "^2.0.12", "@cspell/dict-monkeyc": "^1.0.11", "@cspell/dict-node": "^5.0.8", - "@cspell/dict-npm": "^5.2.15", - "@cspell/dict-php": "^4.0.15", + "@cspell/dict-npm": "^5.2.22", + "@cspell/dict-php": "^4.1.0", "@cspell/dict-powershell": "^5.0.15", "@cspell/dict-public-licenses": "^2.0.15", - "@cspell/dict-python": "^4.2.19", + "@cspell/dict-python": "^4.2.21", "@cspell/dict-r": "^2.1.1", "@cspell/dict-ruby": "^5.0.9", "@cspell/dict-rust": "^4.0.12", "@cspell/dict-scala": "^5.0.8", - "@cspell/dict-shell": "^1.1.1", - "@cspell/dict-software-terms": "^5.1.7", + "@cspell/dict-shell": "^1.1.2", + "@cspell/dict-software-terms": "^5.1.13", "@cspell/dict-sql": "^2.2.1", "@cspell/dict-svelte": "^1.0.7", "@cspell/dict-swift": "^2.0.6", "@cspell/dict-terraform": "^1.1.3", "@cspell/dict-typescript": "^3.2.3", - "@cspell/dict-vue": "^3.0.5" + "@cspell/dict-vue": "^3.0.5", + "@cspell/dict-zig": "^1.0.0" } }, "@cspell/cspell-json-reporter": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-json-reporter/-/cspell-json-reporter-9.2.1.tgz", - "integrity": "sha512-LiiIWzLP9h2etKn0ap6g2+HrgOGcFEF/hp5D8ytmSL5sMxDcV13RrmJCEMTh1axGyW0SjQEFjPnYzNpCL1JjGA==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-json-reporter/-/cspell-json-reporter-9.3.2.tgz", + "integrity": "sha512-YRgpeHN9uY8kUlIw9q+8zJ0tRTAJMbfBTGzCq9Puah09NeMWlRMFPUkXVrkdic6NA7etboZ+zEdoZwRO9EmhiA==", "requires": { - "@cspell/cspell-types": "9.2.1" + "@cspell/cspell-types": "9.3.2" } }, "@cspell/cspell-pipe": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-9.2.1.tgz", - "integrity": "sha512-2N1H63If5cezLqKToY/YSXon4m4REg/CVTFZr040wlHRbbQMh5EF3c7tEC/ue3iKAQR4sm52ihfqo1n4X6kz+g==" + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-9.3.2.tgz", + "integrity": "sha512-REF7ibG79WLEynIMUss/IRDCdYEb1nlE1rj/gt2CbPFzLa6t5MRwW2lajEvXS6/WgbMtsTVHAWi3ALqJzCwxng==" }, "@cspell/cspell-resolver": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-9.2.1.tgz", - "integrity": "sha512-fRPQ6GWU5eyh8LN1TZblc7t24TlGhJprdjJkfZ+HjQo+6ivdeBPT7pC7pew6vuMBQPS1oHBR36hE0ZnJqqkCeg==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-9.3.2.tgz", + "integrity": "sha512-jLN2Aa/vxm8+IBvTd884SwPEfjxnDwIEPBT3hmqgLlKuUHQ3FMG27lsM4Ik9L2KWBXMgV/wGz4BaxfhKI41Ttw==", "requires": { "global-directory": "^4.0.1" } }, "@cspell/cspell-service-bus": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-9.2.1.tgz", - "integrity": "sha512-k4M6bqdvWbcGSbcfLD7Lf4coZVObsISDW+sm/VaWp9aZ7/uwiz1IuGUxL9WO4JIdr9CFEf7Ivmvd2txZpVOCIA==" + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-9.3.2.tgz", + "integrity": "sha512-/rB8LazM0JzKL+AvZa5fEpLutmwy5QFMpzw8HJd+rDGkzb5r79hURWSRo84QArgaskUqA9XlOHSieDE9pt+WAA==" }, "@cspell/cspell-types": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-9.2.1.tgz", - "integrity": "sha512-FQHgQYdTHkcpxT0u1ddLIg5Cc5ePVDcLg9+b5Wgaubmc5I0tLotgYj8c/mvStWuKsuZIs6sUopjJrE91wk6Onw==" + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-9.3.2.tgz", + "integrity": "sha512-l4H8bMAmdzCbXHO8y1JZiAKszrPEiuLFKWrbhCacHF0iP+PIc/yuQp7cO70m0p70vArRfih6kgGyHFaCy47CfA==" }, "@cspell/dict-ada": { "version": "4.1.1", @@ -1152,27 +1057,27 @@ "integrity": "sha512-sD8GCaZetgQL4+MaJLXqbzWcRjfKVp8x+px3HuCaaiATAAtvjwUQ5/Iubiqwfd1boIh2Y1/3EgM3TLQ7Q8e0wQ==" }, "@cspell/dict-aws": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@cspell/dict-aws/-/dict-aws-4.0.15.tgz", - "integrity": "sha512-aPY7VVR5Os4rz36EaqXBAEy14wR4Rqv+leCJ2Ug/Gd0IglJpM30LalF3e2eJChnjje3vWoEC0Rz3+e5gpZG+Kg==" + "version": "4.0.16", + "resolved": "https://registry.npmjs.org/@cspell/dict-aws/-/dict-aws-4.0.16.tgz", + "integrity": "sha512-a681zShZbtTo947NvTYGLer95ZDQw1ROKvIFydak1e0OlfFCsNdtcYTupn0nbbYs53c9AO7G2DU8AcNEAnwXPA==" }, "@cspell/dict-bash": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@cspell/dict-bash/-/dict-bash-4.2.1.tgz", - "integrity": "sha512-SBnzfAyEAZLI9KFS7DUG6Xc1vDFuLllY3jz0WHvmxe8/4xV3ufFE3fGxalTikc1VVeZgZmxYiABw4iGxVldYEg==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-bash/-/dict-bash-4.2.2.tgz", + "integrity": "sha512-kyWbwtX3TsCf5l49gGQIZkRLaB/P8g73GDRm41Zu8Mv51kjl2H7Au0TsEvHv7jzcsRLS6aUYaZv6Zsvk1fOz+Q==", "requires": { - "@cspell/dict-shell": "1.1.1" + "@cspell/dict-shell": "1.1.2" } }, "@cspell/dict-companies": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.2.5.tgz", - "integrity": "sha512-H51R0w7c6RwJJPqH7Gs65tzP6ouZsYDEHmmol6MIIk0kQaOIBuFP2B3vIxHLUr2EPRVFZsMW8Ni7NmVyaQlwsg==" + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.2.7.tgz", + "integrity": "sha512-fEyr3LmpFKTaD0LcRhB4lfW1AmULYBqzg4gWAV0dQCv06l+TsA+JQ+3pZJbUcoaZirtgsgT3dL3RUjmGPhUH0A==" }, "@cspell/dict-cpp": { - "version": "6.0.12", - "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-6.0.12.tgz", - "integrity": "sha512-N4NsCTttVpMqQEYbf0VQwCj6np+pJESov0WieCN7R/0aByz4+MXEiDieWWisaiVi8LbKzs1mEj4ZTw5K/6O2UQ==" + "version": "6.0.14", + "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-6.0.14.tgz", + "integrity": "sha512-dkmpSwvVfVdtoZ4mW/CK2Ep1v8mJlp6uiKpMNbSMOdJl4kq28nQS4vKNIX3B2bJa0Ha5iHHu+1mNjiLeO3g7Xg==" }, "@cspell/dict-cryptocurrencies": { "version": "5.0.5", @@ -1195,9 +1100,9 @@ "integrity": "sha512-xoiGnULEcWdodXI6EwVyqpZmpOoh8RA2Xk9BNdR7DLamV/QMvEYn8KJ7NlRiTSauJKPNkHHQ5EVHRM6sTS7jdg==" }, "@cspell/dict-data-science": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@cspell/dict-data-science/-/dict-data-science-2.0.9.tgz", - "integrity": "sha512-wTOFMlxv06veIwKdXUwdGxrQcK44Zqs426m6JGgHIB/GqvieZQC5n0UI+tUm5OCxuNyo4OV6mylT4cRMjtKtWQ==" + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@cspell/dict-data-science/-/dict-data-science-2.0.11.tgz", + "integrity": "sha512-Dt+83nVCcF+dQyvFSaZjCKt1H5KbsVJFtH2X7VUfmIzQu8xCnV1fUmkhBzGJ+NiFs99Oy9JA6I9EjeqExzXk7g==" }, "@cspell/dict-django": { "version": "4.1.5", @@ -1220,24 +1125,24 @@ "integrity": "sha512-CyfphrbMyl4Ms55Vzuj+mNmd693HjBFr9hvU+B2YbFEZprE5AG+EXLYTMRWrXbpds4AuZcvN3deM2XVB80BN/Q==" }, "@cspell/dict-en_us": { - "version": "4.4.19", - "resolved": "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.4.19.tgz", - "integrity": "sha512-JYYgzhGqSGuIMNY1cTlmq3zrNpehrExMHqLmLnSM2jEGFeHydlL+KLBwBYxMy4e73w+p1+o/rmAiGsMj9g3MCw==" + "version": "4.4.24", + "resolved": "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.4.24.tgz", + "integrity": "sha512-JE+/H2YicHJTneRmgH4GSI21rS+1yGZVl1jfOQgl8iHLC+yTTMtCvueNDMK94CgJACzYAoCsQB70MqiFJJfjLQ==" }, "@cspell/dict-en-common-misspellings": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@cspell/dict-en-common-misspellings/-/dict-en-common-misspellings-2.1.6.tgz", - "integrity": "sha512-xV9yryOqZizbSqxRS7kSVRrxVEyWHUqwdY56IuT7eAWGyTCJNmitXzXa4p+AnEbhL+AB2WLynGVSbNoUC3ceFA==" + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@cspell/dict-en-common-misspellings/-/dict-en-common-misspellings-2.1.8.tgz", + "integrity": "sha512-vDsjRFPQGuAADAiitf82z9Mz3DcqKZi6V5hPAEIFkLLKjFVBcjUsSq59SfL59ElIFb76MtBO0BLifdEbBj+DoQ==" }, "@cspell/dict-en-gb-mit": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@cspell/dict-en-gb-mit/-/dict-en-gb-mit-3.1.9.tgz", - "integrity": "sha512-1lSnphnHTOxnpNLpPLg1XXv8df3hs4oL0LJ6dkQ0IqNROl8Jzl6PD55BDTlKy4YOAA76dJlePB0wyrxB+VVKbg==" + "version": "3.1.14", + "resolved": "https://registry.npmjs.org/@cspell/dict-en-gb-mit/-/dict-en-gb-mit-3.1.14.tgz", + "integrity": "sha512-b+vEerlHP6rnNf30tmTJb7JZnOq4WAslYUvexOz/L3gDna9YJN3bAnwRJ3At3bdcOcMG7PTv3Pi+C73IR22lNg==" }, "@cspell/dict-filetypes": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/@cspell/dict-filetypes/-/dict-filetypes-3.0.13.tgz", - "integrity": "sha512-g6rnytIpQlMNKGJT1JKzWkC+b3xCliDKpQ3ANFSq++MnR4GaLiifaC4JkVON11Oh/UTplYOR1nY3BR4X30bswA==" + "version": "3.0.14", + "resolved": "https://registry.npmjs.org/@cspell/dict-filetypes/-/dict-filetypes-3.0.14.tgz", + "integrity": "sha512-KSXaSMYYNMLLdHEnju1DyRRH3eQWPRYRnOXpuHUdOh2jC44VgQoxyMU7oB3NAhDhZKBPCihabzECsAGFbdKfEA==" }, "@cspell/dict-flutter": { "version": "1.1.1", @@ -1270,9 +1175,9 @@ "integrity": "sha512-odOwVKgfxCQfiSb+nblQZc4ErXmnWEnv8XwkaI4sNJ7cNmojnvogYVeMqkXPjvfrgEcizEEA4URRD2Ms5PDk1w==" }, "@cspell/dict-golang": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.23.tgz", - "integrity": "sha512-oXqUh/9dDwcmVlfUF5bn3fYFqbUzC46lXFQmi5emB0vYsyQXdNWsqi6/yH3uE7bdRE21nP7Yo0mR1jjFNyLamg==" + "version": "6.0.24", + "resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.24.tgz", + "integrity": "sha512-rY7PlC3MsHozmjrZWi0HQPUl0BVCV0+mwK0rnMT7pOIXqOe4tWCYMULDIsEk4F0gbIxb5badd2dkCPDYjLnDgA==" }, "@cspell/dict-google": { "version": "1.0.9", @@ -1351,14 +1256,14 @@ "integrity": "sha512-AirZcN2i84ynev3p2/1NCPEhnNsHKMz9zciTngGoqpdItUb2bDt1nJBjwlsrFI78GZRph/VaqTVFwYikmncpXg==" }, "@cspell/dict-npm": { - "version": "5.2.17", - "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.2.17.tgz", - "integrity": "sha512-0yp7lBXtN3CtxBrpvTu/yAuPdOHR2ucKzPxdppc3VKO068waZNpKikn1NZCzBS3dIAFGVITzUPtuTXxt9cxnSg==" + "version": "5.2.22", + "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.2.22.tgz", + "integrity": "sha512-bepGmmRv7KmxULqfw88G9wxkpIAQA96YyrfKpfg4RHnQLxpmzoRnZGtK5S9JH7Hlf5LEd1gkOF7dtCE6cek67w==" }, "@cspell/dict-php": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.0.15.tgz", - "integrity": "sha512-iepGB2gtToMWSTvybesn4/lUp4LwXcEm0s8vasJLP76WWVkq1zYjmeS+WAIzNgsuURyZ/9mGqhS0CWMuo74ODw==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.1.0.tgz", + "integrity": "sha512-dTDeabyOj7eFvn2Q4Za3uVXM2+SzeFMqX8ly2P0XTo4AzbCmI2hulFD/QIADwWmwiRrInbbf8cxwFHNIYrXl4w==" }, "@cspell/dict-powershell": { "version": "5.0.15", @@ -1371,11 +1276,11 @@ "integrity": "sha512-cJEOs901H13Pfy0fl4dCD1U+xpWIMaEPq8MeYU83FfDZvellAuSo4GqWCripfIqlhns/L6+UZEIJSOZnjgy7Wg==" }, "@cspell/dict-python": { - "version": "4.2.19", - "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.2.19.tgz", - "integrity": "sha512-9S2gTlgILp1eb6OJcVZeC8/Od83N8EqBSg5WHVpx97eMMJhifOzePkE0kDYjyHMtAFznCQTUu0iQEJohNQ5B0A==", + "version": "4.2.21", + "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.2.21.tgz", + "integrity": "sha512-M9OgwXWhpZqEZqKU2psB2DFsT8q5SwEahkQeIpNIRWIErjwG7I9yYhhfvPz6s5gMCMhhb3hqcPJTnmdgqGrQyg==", "requires": { - "@cspell/dict-data-science": "^2.0.9" + "@cspell/dict-data-science": "^2.0.11" } }, "@cspell/dict-r": { @@ -1399,14 +1304,14 @@ "integrity": "sha512-YdftVmumv8IZq9zu1gn2U7A4bfM2yj9Vaupydotyjuc+EEZZSqAafTpvW/jKLWji2TgybM1L2IhmV0s/Iv9BTw==" }, "@cspell/dict-shell": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@cspell/dict-shell/-/dict-shell-1.1.1.tgz", - "integrity": "sha512-T37oYxE7OV1x/1D4/13Y8JZGa1QgDCXV7AVt3HLXjn0Fe3TaNDvf5sU0fGnXKmBPqFFrHdpD3uutAQb1dlp15g==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-shell/-/dict-shell-1.1.2.tgz", + "integrity": "sha512-WqOUvnwcHK1X61wAfwyXq04cn7KYyskg90j4lLg3sGGKMW9Sq13hs91pqrjC44Q+lQLgCobrTkMDw9Wyl9nRFA==" }, "@cspell/dict-software-terms": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-5.1.8.tgz", - "integrity": "sha512-iwCHLP11OmVHEX2MzE8EPxpPw7BelvldxWe5cJ3xXIDL8TjF2dBTs2noGcrqnZi15SLYIlO8897BIOa33WHHZA==" + "version": "5.1.13", + "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-5.1.13.tgz", + "integrity": "sha512-bmWMOpqzCmmKFHM9hFC6o+GP20t2+uTuwksR3a6crHQqvNv3revzwQHorsWvSYx75xsdcvRYrAz7PqPEV/FG1g==" }, "@cspell/dict-sql": { "version": "2.2.1", @@ -1438,29 +1343,34 @@ "resolved": "https://registry.npmjs.org/@cspell/dict-vue/-/dict-vue-3.0.5.tgz", "integrity": "sha512-Mqutb8jbM+kIcywuPQCCaK5qQHTdaByoEO2J9LKFy3sqAdiBogNkrplqUK0HyyRFgCfbJUgjz3N85iCMcWH0JA==" }, + "@cspell/dict-zig": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-zig/-/dict-zig-1.0.0.tgz", + "integrity": "sha512-XibBIxBlVosU06+M6uHWkFeT0/pW5WajDRYdXG2CgHnq85b0TI/Ks0FuBJykmsgi2CAD3Qtx8UHFEtl/DSFnAQ==" + }, "@cspell/dynamic-import": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-9.2.1.tgz", - "integrity": "sha512-izYQbk7ck0ffNA1gf7Gi3PkUEjj+crbYeyNK1hxHx5A+GuR416ozs0aEyp995KI2v9HZlXscOj3SC3wrWzHZeA==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-9.3.2.tgz", + "integrity": "sha512-au7FyuIHUNI2r9sO3pUBKVTeD/v7c9x/nPUStaAK1bG4rdKt4w+/jUY2IaldAraW5w29z528BboXbiV87SM1kw==", "requires": { - "@cspell/url": "9.2.1", + "@cspell/url": "9.3.2", "import-meta-resolve": "^4.2.0" } }, "@cspell/filetypes": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-9.2.1.tgz", - "integrity": "sha512-Dy1y1pQ+7hi2gPs+jERczVkACtYbUHcLodXDrzpipoxgOtVxMcyZuo+84WYHImfu0gtM0wU2uLObaVgMSTnytw==" + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-9.3.2.tgz", + "integrity": "sha512-0bUxQlmJPRHZrRQD7adbc4lFizO8tGD/6+1cBgU3kV3+NVrpr12y4jU8twCSChhYibZyPr7bnvhkM3cQgb8RzA==" }, "@cspell/strong-weak-map": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-9.2.1.tgz", - "integrity": "sha512-1HsQWZexvJSjDocVnbeAWjjgqWE/0op/txxzDPvDqI2sE6pY0oO4Cinj2I8z+IP+m6/E6yjPxdb23ydbQbPpJQ==" + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-9.3.2.tgz", + "integrity": "sha512-pFcmOTWCoFMRETb9PCkCmaiZiLb5i2qOZmGH/p/tFEH8kIYhMGfhaulnXwKwS+Ke6PKceQd2YL98bGmo8hL4aQ==" }, "@cspell/url": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@cspell/url/-/url-9.2.1.tgz", - "integrity": "sha512-9EHCoGKtisPNsEdBQ28tKxKeBmiVS3D4j+AN8Yjr+Dmtu+YACKGWiMOddNZG2VejQNIdFx7FwzU00BGX68ELhA==" + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@cspell/url/-/url-9.3.2.tgz", + "integrity": "sha512-TobUlZl7Z7VehhNOMNAg1ABuGizieseftlG94OZJ934JptOhK8TC/1o2ldKrbDH50jyt6E7rPTMV2BW/vWuTzQ==" }, "array-timsort": { "version": "1.0.3", @@ -1495,9 +1405,9 @@ } }, "commander": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.1.tgz", - "integrity": "sha512-2JkV3gUZUVrbNA+1sjBOYLsMZ5cEEl8GTFP2a4AVz5hvasAMCQ1D2l2le/cX+pV4N6ZU17zjUahLpIXRrnWL8A==" + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.2.tgz", + "integrity": "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ==" }, "comment-json": { "version": "4.4.1", @@ -1515,113 +1425,111 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "cspell": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell/-/cspell-9.2.1.tgz", - "integrity": "sha512-PoKGKE9Tl87Sn/jwO4jvH7nTqe5Xrsz2DeJT5CkulY7SoL2fmsAqfbImQOFS2S0s36qD98t6VO+Ig2elEEcHew==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell/-/cspell-9.3.2.tgz", + "integrity": "sha512-3xFyVSTYrYa/QJzLfzsCRMkMXqOsytP8E26DuGrVMJQoLPFmbOXNNtnMu4wrtr17QVloxpvutW77U4vb2L/LDQ==", "requires": { - "@cspell/cspell-json-reporter": "9.2.1", - "@cspell/cspell-pipe": "9.2.1", - "@cspell/cspell-types": "9.2.1", - "@cspell/dynamic-import": "9.2.1", - "@cspell/url": "9.2.1", - "chalk": "^5.6.0", - "chalk-template": "^1.1.0", - "commander": "^14.0.0", - "cspell-config-lib": "9.2.1", - "cspell-dictionary": "9.2.1", - "cspell-gitignore": "9.2.1", - "cspell-glob": "9.2.1", - "cspell-io": "9.2.1", - "cspell-lib": "9.2.1", + "@cspell/cspell-json-reporter": "9.3.2", + "@cspell/cspell-pipe": "9.3.2", + "@cspell/cspell-types": "9.3.2", + "@cspell/dynamic-import": "9.3.2", + "@cspell/url": "9.3.2", + "chalk": "^5.6.2", + "chalk-template": "^1.1.2", + "commander": "^14.0.2", + "cspell-config-lib": "9.3.2", + "cspell-dictionary": "9.3.2", + "cspell-gitignore": "9.3.2", + "cspell-glob": "9.3.2", + "cspell-io": "9.3.2", + "cspell-lib": "9.3.2", "fast-json-stable-stringify": "^2.1.0", "flatted": "^3.3.3", - "semver": "^7.7.2", - "tinyglobby": "^0.2.14" + "semver": "^7.7.3", + "tinyglobby": "^0.2.15" } }, "cspell-config-lib": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-9.2.1.tgz", - "integrity": "sha512-qqhaWW+0Ilc7493lXAlXjziCyeEmQbmPMc1XSJw2EWZmzb+hDvLdFGHoX18QU67yzBtu5hgQsJDEDZKvVDTsRA==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-9.3.2.tgz", + "integrity": "sha512-zXhmA4rqgWQRTVijI+g/mgiep76TvTO4d+P3CHwcqLG57BKVzoW+jkO4qDLC+Neh4b8+CcNWEIr3w16BfuEJAA==", "requires": { - "@cspell/cspell-types": "9.2.1", - "comment-json": "^4.2.5", - "smol-toml": "^1.4.2", + "@cspell/cspell-types": "9.3.2", + "comment-json": "^4.4.1", + "smol-toml": "^1.5.2", "yaml": "^2.8.1" } }, "cspell-dictionary": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-9.2.1.tgz", - "integrity": "sha512-0hQVFySPsoJ0fONmDPwCWGSG6SGj4ERolWdx4t42fzg5zMs+VYGXpQW4BJneQ5Tfxy98Wx8kPhmh/9E8uYzLTw==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-9.3.2.tgz", + "integrity": "sha512-E3YhOhZzZt1a+AEbFV2B3THCyZ576PDg0mDNUDrU1Y65SyIhf4DC6itfPoAb6R3FI/DI218RqWZg/FTT8lJ2gA==", "requires": { - "@cspell/cspell-pipe": "9.2.1", - "@cspell/cspell-types": "9.2.1", - "cspell-trie-lib": "9.2.1", - "fast-equals": "^5.2.2" + "@cspell/cspell-pipe": "9.3.2", + "@cspell/cspell-types": "9.3.2", + "cspell-trie-lib": "9.3.2", + "fast-equals": "^5.3.3" } }, "cspell-gitignore": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-9.2.1.tgz", - "integrity": "sha512-WPnDh03gXZoSqVyXq4L7t9ljx6lTDvkiSRUudb125egEK5e9s04csrQpLI3Yxcnc1wQA2nzDr5rX9XQVvCHf7g==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-9.3.2.tgz", + "integrity": "sha512-G2bLR+Dfb9GX4Sdm75GfCCa9V/sQYkRbLckuCuVmJxvcDB0xfczAtb6TfAXIziF3oUI6cOB1g+PoNLWBelcK5w==", "requires": { - "@cspell/url": "9.2.1", - "cspell-glob": "9.2.1", - "cspell-io": "9.2.1" + "@cspell/url": "9.3.2", + "cspell-glob": "9.3.2", + "cspell-io": "9.3.2" } }, "cspell-glob": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-9.2.1.tgz", - "integrity": "sha512-CrT/6ld3rXhB36yWFjrx1SrMQzwDrGOLr+wYEnrWI719/LTYWWCiMFW7H+qhsJDTsR+ku8+OAmfRNBDXvh9mnQ==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-9.3.2.tgz", + "integrity": "sha512-TuSupENEKyOCupOUZ3vnPxaTOghxY/rD1JIkb8e5kjzRprYVilO/rYqEk/52iLwJVd+4Npe8fNhR3KhU7u/UUg==", "requires": { - "@cspell/url": "9.2.1", + "@cspell/url": "9.3.2", "picomatch": "^4.0.3" } }, "cspell-grammar": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-9.2.1.tgz", - "integrity": "sha512-10RGFG7ZTQPdwyW2vJyfmC1t8813y8QYRlVZ8jRHWzer9NV8QWrGnL83F+gTPXiKR/lqiW8WHmFlXR4/YMV+JQ==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-9.3.2.tgz", + "integrity": "sha512-ysonrFu9vJvF/derDlEjUfmvLeCfNOWPh00t6Yh093AKrJFoWQiyaS/5bEN/uB5/n1sa4k3ItnWvuTp3+YuZsA==", "requires": { - "@cspell/cspell-pipe": "9.2.1", - "@cspell/cspell-types": "9.2.1" + "@cspell/cspell-pipe": "9.3.2", + "@cspell/cspell-types": "9.3.2" } }, "cspell-io": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-9.2.1.tgz", - "integrity": "sha512-v9uWXtRzB+RF/Mzg5qMzpb8/yt+1bwtTt2rZftkLDLrx5ybVvy6rhRQK05gFWHmWVtWEe0P/pIxaG2Vz92C8Ag==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-9.3.2.tgz", + "integrity": "sha512-ahoULCp0j12TyXXmIcdO/7x65A/2mzUQO1IkOC65OXEbNT+evt0yswSO5Nr1F6kCHDuEKc46EZWwsYAzj78pMg==", "requires": { - "@cspell/cspell-service-bus": "9.2.1", - "@cspell/url": "9.2.1" + "@cspell/cspell-service-bus": "9.3.2", + "@cspell/url": "9.3.2" } }, "cspell-lib": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-9.2.1.tgz", - "integrity": "sha512-KeB6NHcO0g1knWa7sIuDippC3gian0rC48cvO0B0B0QwhOxNxWVp8cSmkycXjk4ijBZNa++IwFjeK/iEqMdahQ==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-9.3.2.tgz", + "integrity": "sha512-kdk11kib68zNANNICuOA8h4oA9kENQUAdeX/uvT4+7eHbHHV8WSgjXm4k4o/pRIbg164UJTX/XxKb/65ftn5jw==", "requires": { - "@cspell/cspell-bundled-dicts": "9.2.1", - "@cspell/cspell-pipe": "9.2.1", - "@cspell/cspell-resolver": "9.2.1", - "@cspell/cspell-types": "9.2.1", - "@cspell/dynamic-import": "9.2.1", - "@cspell/filetypes": "9.2.1", - "@cspell/strong-weak-map": "9.2.1", - "@cspell/url": "9.2.1", + "@cspell/cspell-bundled-dicts": "9.3.2", + "@cspell/cspell-pipe": "9.3.2", + "@cspell/cspell-resolver": "9.3.2", + "@cspell/cspell-types": "9.3.2", + "@cspell/dynamic-import": "9.3.2", + "@cspell/filetypes": "9.3.2", + "@cspell/strong-weak-map": "9.3.2", + "@cspell/url": "9.3.2", "clear-module": "^4.1.2", - "comment-json": "^4.2.5", - "cspell-config-lib": "9.2.1", - "cspell-dictionary": "9.2.1", - "cspell-glob": "9.2.1", - "cspell-grammar": "9.2.1", - "cspell-io": "9.2.1", - "cspell-trie-lib": "9.2.1", + "cspell-config-lib": "9.3.2", + "cspell-dictionary": "9.3.2", + "cspell-glob": "9.3.2", + "cspell-grammar": "9.3.2", + "cspell-io": "9.3.2", + "cspell-trie-lib": "9.3.2", "env-paths": "^3.0.0", - "fast-equals": "^5.2.2", - "gensequence": "^7.0.0", + "gensequence": "^8.0.8", "import-fresh": "^3.3.1", "resolve-from": "^5.0.0", "vscode-languageserver-textdocument": "^1.0.12", @@ -1630,13 +1538,13 @@ } }, "cspell-trie-lib": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-9.2.1.tgz", - "integrity": "sha512-qOtbL+/tUzGFHH0Uq2wi7sdB9iTy66QNx85P7DKeRdX9ZH53uQd7qC4nEk+/JPclx1EgXX26svxr0jTGISJhLw==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-9.3.2.tgz", + "integrity": "sha512-1Af7Mq9jIccFQyJl/ZCcqQbtJwuDqpQVkk8xfs/92x4OI6gW1iTVRMtsrh0RTw1HZoR8aQD7tRRCiLPf/D+UiQ==", "requires": { - "@cspell/cspell-pipe": "9.2.1", - "@cspell/cspell-types": "9.2.1", - "gensequence": "^7.0.0" + "@cspell/cspell-pipe": "9.3.2", + "@cspell/cspell-types": "9.3.2", + "gensequence": "^8.0.8" } }, "env-paths": { @@ -1650,9 +1558,9 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, "fast-equals": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.3.2.tgz", - "integrity": "sha512-6rxyATwPCkaFIL3JLqw8qXqMpIZ942pTX/tbQFkRsDGblS8tNGtlUauA/+mt6RUfqn/4MoEr+WDkYoIQbibWuQ==" + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.3.3.tgz", + "integrity": "sha512-/boTcHZeIAQ2r/tL11voclBHDeP9WPxLt+tyAbVSyyXuUFyh0Tne7gJZTqGbxnvj79TjLdCXLOY7UIPhyG5MTw==" }, "fast-json-stable-stringify": { "version": "2.1.0", @@ -1671,9 +1579,9 @@ "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==" }, "gensequence": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-7.0.0.tgz", - "integrity": "sha512-47Frx13aZh01afHJTB3zTtKIlFI6vWY+MYCN9Qpew6i52rfKjnhCF/l1YlC8UmEMvvntZZ6z4PiCcmyuedR2aQ==" + "version": "8.0.8", + "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-8.0.8.tgz", + "integrity": "sha512-omMVniXEXpdx/vKxGnPRoO2394Otlze28TyxECbFVyoSpZ9H3EO7lemjcB12OpQJzRW4e5tt/dL1rOxry6aMHg==" }, "global-directory": { "version": "4.0.1", @@ -1741,9 +1649,9 @@ "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==" }, "smol-toml": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.4.2.tgz", - "integrity": "sha512-rInDH6lCNiEyn3+hH8KVGFdbjc099j47+OSgbMrfDYX1CmXLfdKd7qi6IfcWj2wFxvSVkuI46M+wPGYfEOEj6g==" + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.5.2.tgz", + "integrity": "sha512-QlaZEqcAH3/RtNyet1IPIYPsEWAaYyXXv1Krsi+1L/QHppjX4Ifm8MQsBISz9vE8cHicIq3clogsheili5vhaQ==" }, "tinyglobby": { "version": "0.2.15", diff --git a/eng/common/spelling/package.json b/eng/common/spelling/package.json index 610f0abc413b..5e906545311f 100644 --- a/eng/common/spelling/package.json +++ b/eng/common/spelling/package.json @@ -2,6 +2,6 @@ "name": "cspell-version-pin", "version": "1.0.0", "dependencies": { - "cspell": "^9.2.1" + "cspell": "^9.3.2" } } From ba9b59c5a8417d9784b30ec839766d700f614792 Mon Sep 17 00:00:00 2001 From: Scott Beddall <45376673+scbedd@users.noreply.github.com> Date: Thu, 20 Nov 2025 17:11:04 -0800 Subject: [PATCH 07/26] adding engsys repo owner to codeowners file (#47344) --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 77e41da3ae4e..cc48f47218db 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -918,7 +918,7 @@ /common/perf-test-core/ @alzimmermsft @srnagar @g2vinay @Azure/azure-java-sdk # PRLabel: %common -/.vscode/ @alzimmermsft @srnagar @g2vinay @conniey @rujche @netyyyy @saragluna @moarychan @Azure/azure-java-sdk +/.vscode/ @alzimmermsft @srnagar @g2vinay @conniey @rujche @netyyyy @saragluna @moarychan @Azure/azure-java-sdk @raych1 # ServiceLabel: %common # AzureSdkOwners: @alzimmermsft @srnagar From 154dbe5028d323b6bcd729c4096c1e6a5d95a0f9 Mon Sep 17 00:00:00 2001 From: xitzhang Date: Thu, 20 Nov 2025 17:20:27 -0800 Subject: [PATCH 08/26] [VoiceLive] Fix MCP error (#47325) * [VoiceLive] Fix MCP error * update code owner * update spell words * update format --------- Co-authored-by: Xiting Zhang --- .github/CODEOWNERS | 2 +- .vscode/cspell.json | 4 +- sdk/ai/azure-ai-voicelive/CHANGELOG.md | 26 +- .../voicelive/models/AvatarConfigTypes.java | 57 +++++ .../voicelive/models/AvatarConfiguration.java | 100 ++++++++ .../models/AvatarOutputProtocol.java | 57 +++++ .../voicelive/models/AzurePersonalVoice.java | 233 ++++++++++++++++++ .../voicelive/models/CachedTokenDetails.java | 48 +++- .../ai/voicelive/models/ContentPartType.java | 6 + .../voicelive/models/InputTokenDetails.java | 58 +++-- .../ai/voicelive/models/MessageItem.java | 6 +- .../ai/voicelive/models/OpenAIVoiceName.java | 12 + .../models/PhotoAvatarBaseModes.java | 51 ++++ .../models/RequestImageContentPart.java | 141 +++++++++++ .../models/RequestImageContentPartDetail.java | 63 +++++ .../models/ResponseCreateParams.java | 37 +++ .../ServerEventResponseMcpCallCompleted.java | 132 ++++++++++ .../ServerEventResponseMcpCallFailed.java | 132 ++++++++++ .../ServerEventResponseMcpCallInProgress.java | 132 ++++++++++ .../ai/voicelive/models/SessionUpdate.java | 6 + .../models/VoiceLiveContentPart.java | 4 +- ...azure-ai-voicelive_apiview_properties.json | 8 + .../META-INF/azure-ai-voicelive_metadata.json | 2 +- .../models/AvatarConfigTypesTest.java | 76 ++++++ .../models/AvatarOutputProtocolTest.java | 76 ++++++ .../ai/voicelive/models/OpenAIVoiceTest.java | 4 + .../models/PhotoAvatarBaseModesTest.java | 66 +++++ .../RequestImageContentPartDetailTest.java | 98 ++++++++ .../models/RequestImageContentPartTest.java | 141 +++++++++++ ...rverEventResponseMcpCallLifecycleTest.java | 146 +++++++++++ sdk/ai/azure-ai-voicelive/tsp-location.yaml | 2 +- 31 files changed, 1882 insertions(+), 44 deletions(-) create mode 100644 sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AvatarConfigTypes.java create mode 100644 sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AvatarOutputProtocol.java create mode 100644 sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/PhotoAvatarBaseModes.java create mode 100644 sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/RequestImageContentPart.java create mode 100644 sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/RequestImageContentPartDetail.java create mode 100644 sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallCompleted.java create mode 100644 sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallFailed.java create mode 100644 sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallInProgress.java create mode 100644 sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/AvatarConfigTypesTest.java create mode 100644 sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/AvatarOutputProtocolTest.java create mode 100644 sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/PhotoAvatarBaseModesTest.java create mode 100644 sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/RequestImageContentPartDetailTest.java create mode 100644 sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/RequestImageContentPartTest.java create mode 100644 sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallLifecycleTest.java diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index cc48f47218db..bded1b15a829 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -92,7 +92,7 @@ /sdk/ai/azure-ai-inference/ @dargilco @jhakulin @glharper @Azure/azure-java-sdk # PRLabel: %Voice Live -/sdk/ai/azure-ai-voicelive/ @rhurey @xitzhang +/sdk/ai/azure-ai-voicelive/ @rhurey @xitzhang @amber-yujueWang # ServiceLabel: %AKS # ServiceOwners: @Azure/aks-pm diff --git a/.vscode/cspell.json b/.vscode/cspell.json index fc897f3fafb6..b692e840c4cc 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -873,7 +873,9 @@ "words": [ "Dexec", "viseme", - "VISEME" + "VISEME", + "webrtc", + "WEBRTC" ] }, { diff --git a/sdk/ai/azure-ai-voicelive/CHANGELOG.md b/sdk/ai/azure-ai-voicelive/CHANGELOG.md index 5416f30a6e61..ac7b58ba06f6 100644 --- a/sdk/ai/azure-ai-voicelive/CHANGELOG.md +++ b/sdk/ai/azure-ai-voicelive/CHANGELOG.md @@ -4,11 +4,27 @@ ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Added image input support for multimodal conversations: + - `RequestImageContentPart` for including images in conversation messages with URL references + - `RequestImageContentPartDetail` enum for controlling image detail level (auto, low, high) + - `ContentPartType.INPUT_IMAGE` discriminator for image content parts +- Added avatar configuration enhancements: + - `AvatarConfiguration` class for configuring avatar streaming and behavior with ICE servers, character selection, style, and video parameters + - `AvatarConfigTypes` enum for video and photo avatar types + - `AvatarOutputProtocol` enum supporting WebRTC and WebSocket protocols + - `PhotoAvatarBaseModes` enum with VASA-1 model support +- Added token usage tracking improvements: + - `CachedTokenDetails` for tracking cached text, audio, and image tokens + - Enhanced `InputTokenDetails` with image token tracking and cached token details +- Added MCP call lifecycle events: + - `ServerEventResponseMcpCallInProgress` for tracking ongoing MCP calls + - `ServerEventResponseMcpCallCompleted` for successful MCP call completion + - `ServerEventResponseMcpCallFailed` for failed MCP calls +- Added two new OpenAI voices: `OpenAIVoiceName.MARIN` and `OpenAIVoiceName.CEDAR` +- Enhanced `AzurePersonalVoice` with additional customization options: + - Custom lexicon URL support for pronunciation customization + - Locale preferences with `preferLocales` for multilingual scenarios + - Voice style, pitch, rate, and volume controls for fine-tuned voice characteristics ## 1.0.0-beta.2 (2025-11-14) diff --git a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AvatarConfigTypes.java b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AvatarConfigTypes.java new file mode 100644 index 000000000000..69dfacd03650 --- /dev/null +++ b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AvatarConfigTypes.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Avatar config types. + */ +public final class AvatarConfigTypes extends ExpandableStringEnum { + + /** + * Video avatar. + */ + @Generated + public static final AvatarConfigTypes VIDEO_AVATAR = fromString("video-avatar"); + + /** + * Photo avatar. + */ + @Generated + public static final AvatarConfigTypes PHOTO_AVATAR = fromString("photo-avatar"); + + /** + * Creates a new instance of AvatarConfigTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public AvatarConfigTypes() { + } + + /** + * Creates or finds a AvatarConfigTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding AvatarConfigTypes. + */ + @Generated + public static AvatarConfigTypes fromString(String name) { + return fromString(name, AvatarConfigTypes.class); + } + + /** + * Gets known AvatarConfigTypes values. + * + * @return known AvatarConfigTypes values. + */ + @Generated + public static Collection values() { + return values(AvatarConfigTypes.class); + } +} diff --git a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AvatarConfiguration.java b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AvatarConfiguration.java index 6fb53e33f01e..d5a6b8e618a0 100644 --- a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AvatarConfiguration.java +++ b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AvatarConfiguration.java @@ -155,9 +155,13 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("character", this.character); jsonWriter.writeBooleanField("customized", this.customized); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); jsonWriter.writeArrayField("ice_servers", this.iceServers, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("style", this.style); + jsonWriter.writeStringField("model", this.model == null ? null : this.model.toString()); jsonWriter.writeJsonField("video", this.video); + jsonWriter.writeStringField("output_protocol", + this.outputProtocol == null ? null : this.outputProtocol.toString()); return jsonWriter.writeEndObject(); } @@ -175,9 +179,12 @@ public static AvatarConfiguration fromJson(JsonReader jsonReader) throws IOExcep return jsonReader.readObject(reader -> { String character = null; boolean customized = false; + AvatarConfigTypes type = null; List iceServers = null; String style = null; + PhotoAvatarBaseModes model = null; VideoParams video = null; + AvatarOutputProtocol outputProtocol = null; while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -185,21 +192,114 @@ public static AvatarConfiguration fromJson(JsonReader jsonReader) throws IOExcep character = reader.getString(); } else if ("customized".equals(fieldName)) { customized = reader.getBoolean(); + } else if ("type".equals(fieldName)) { + type = AvatarConfigTypes.fromString(reader.getString()); } else if ("ice_servers".equals(fieldName)) { iceServers = reader.readArray(reader1 -> IceServer.fromJson(reader1)); } else if ("style".equals(fieldName)) { style = reader.getString(); + } else if ("model".equals(fieldName)) { + model = PhotoAvatarBaseModes.fromString(reader.getString()); } else if ("video".equals(fieldName)) { video = VideoParams.fromJson(reader); + } else if ("output_protocol".equals(fieldName)) { + outputProtocol = AvatarOutputProtocol.fromString(reader.getString()); } else { reader.skipChildren(); } } AvatarConfiguration deserializedAvatarConfiguration = new AvatarConfiguration(character, customized); + deserializedAvatarConfiguration.type = type; deserializedAvatarConfiguration.iceServers = iceServers; deserializedAvatarConfiguration.style = style; + deserializedAvatarConfiguration.model = model; deserializedAvatarConfiguration.video = video; + deserializedAvatarConfiguration.outputProtocol = outputProtocol; return deserializedAvatarConfiguration; }); } + + /* + * Type of avatar to use. + */ + @Generated + private AvatarConfigTypes type; + + /* + * Base model to use for the avatar. Required for photo avatar. + */ + @Generated + private PhotoAvatarBaseModes model; + + /* + * Output protocol for avatar streaming. Default is 'webrtc'. + */ + @Generated + private AvatarOutputProtocol outputProtocol; + + /** + * Get the type property: Type of avatar to use. + * + * @return the type value. + */ + @Generated + public AvatarConfigTypes getType() { + return this.type; + } + + /** + * Set the type property: Type of avatar to use. + * + * @param type the type value to set. + * @return the AvatarConfiguration object itself. + */ + @Generated + public AvatarConfiguration setType(AvatarConfigTypes type) { + this.type = type; + return this; + } + + /** + * Get the model property: Base model to use for the avatar. Required for photo avatar. + * + * @return the model value. + */ + @Generated + public PhotoAvatarBaseModes getModel() { + return this.model; + } + + /** + * Set the model property: Base model to use for the avatar. Required for photo avatar. + * + * @param model the model value to set. + * @return the AvatarConfiguration object itself. + */ + @Generated + public AvatarConfiguration setModel(PhotoAvatarBaseModes model) { + this.model = model; + return this; + } + + /** + * Get the outputProtocol property: Output protocol for avatar streaming. Default is 'webrtc'. + * + * @return the outputProtocol value. + */ + @Generated + public AvatarOutputProtocol getOutputProtocol() { + return this.outputProtocol; + } + + /** + * Set the outputProtocol property: Output protocol for avatar streaming. Default is 'webrtc'. + * + * @param outputProtocol the outputProtocol value to set. + * @return the AvatarConfiguration object itself. + */ + @Generated + public AvatarConfiguration setOutputProtocol(AvatarOutputProtocol outputProtocol) { + this.outputProtocol = outputProtocol; + return this; + } } diff --git a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AvatarOutputProtocol.java b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AvatarOutputProtocol.java new file mode 100644 index 000000000000..0eccd2b0a365 --- /dev/null +++ b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AvatarOutputProtocol.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Avatar config output protocols. + */ +public final class AvatarOutputProtocol extends ExpandableStringEnum { + + /** + * WebRTC protocol, output the audio/video streams via WebRTC. + */ + @Generated + public static final AvatarOutputProtocol WEBRTC = fromString("webrtc"); + + /** + * WebSocket protocol, output the video frames over WebSocket. + */ + @Generated + public static final AvatarOutputProtocol WEBSOCKET = fromString("websocket"); + + /** + * Creates a new instance of AvatarOutputProtocol value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public AvatarOutputProtocol() { + } + + /** + * Creates or finds a AvatarOutputProtocol from its string representation. + * + * @param name a name to look for. + * @return the corresponding AvatarOutputProtocol. + */ + @Generated + public static AvatarOutputProtocol fromString(String name) { + return fromString(name, AvatarOutputProtocol.class); + } + + /** + * Gets known AvatarOutputProtocol values. + * + * @return known AvatarOutputProtocol values. + */ + @Generated + public static Collection values() { + return values(AvatarOutputProtocol.class); + } +} diff --git a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzurePersonalVoice.java b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzurePersonalVoice.java index e776c6e318ba..e174a11111b3 100644 --- a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzurePersonalVoice.java +++ b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/AzurePersonalVoice.java @@ -9,6 +9,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * Azure personal voice configuration. @@ -116,6 +117,14 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("model", this.model == null ? null : this.model.toString()); jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); jsonWriter.writeNumberField("temperature", this.temperature); + jsonWriter.writeStringField("custom_lexicon_url", this.customLexiconUrl); + jsonWriter.writeArrayField("prefer_locales", this.preferLocales, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("locale", this.locale); + jsonWriter.writeStringField("style", this.style); + jsonWriter.writeStringField("pitch", this.pitch); + jsonWriter.writeStringField("rate", this.rate); + jsonWriter.writeStringField("volume", this.volume); return jsonWriter.writeEndObject(); } @@ -135,6 +144,13 @@ public static AzurePersonalVoice fromJson(JsonReader jsonReader) throws IOExcept PersonalVoiceModels model = null; AzureVoiceType type = AzureVoiceType.AZURE_PERSONAL; Double temperature = null; + String customLexiconUrl = null; + List preferLocales = null; + String locale = null; + String style = null; + String pitch = null; + String rate = null; + String volume = null; while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -146,6 +162,20 @@ public static AzurePersonalVoice fromJson(JsonReader jsonReader) throws IOExcept type = AzureVoiceType.fromString(reader.getString()); } else if ("temperature".equals(fieldName)) { temperature = reader.getNullable(JsonReader::getDouble); + } else if ("custom_lexicon_url".equals(fieldName)) { + customLexiconUrl = reader.getString(); + } else if ("prefer_locales".equals(fieldName)) { + preferLocales = reader.readArray(reader1 -> reader1.getString()); + } else if ("locale".equals(fieldName)) { + locale = reader.getString(); + } else if ("style".equals(fieldName)) { + style = reader.getString(); + } else if ("pitch".equals(fieldName)) { + pitch = reader.getString(); + } else if ("rate".equals(fieldName)) { + rate = reader.getString(); + } else if ("volume".equals(fieldName)) { + volume = reader.getString(); } else { reader.skipChildren(); } @@ -153,7 +183,210 @@ public static AzurePersonalVoice fromJson(JsonReader jsonReader) throws IOExcept AzurePersonalVoice deserializedAzurePersonalVoice = new AzurePersonalVoice(name, model); deserializedAzurePersonalVoice.type = type; deserializedAzurePersonalVoice.temperature = temperature; + deserializedAzurePersonalVoice.customLexiconUrl = customLexiconUrl; + deserializedAzurePersonalVoice.preferLocales = preferLocales; + deserializedAzurePersonalVoice.locale = locale; + deserializedAzurePersonalVoice.style = style; + deserializedAzurePersonalVoice.pitch = pitch; + deserializedAzurePersonalVoice.rate = rate; + deserializedAzurePersonalVoice.volume = volume; return deserializedAzurePersonalVoice; }); } + + /* + * The custom_lexicon_url property. + */ + @Generated + private String customLexiconUrl; + + /* + * The prefer_locales property. + */ + @Generated + private List preferLocales; + + /* + * The locale property. + */ + @Generated + private String locale; + + /* + * The style property. + */ + @Generated + private String style; + + /* + * The pitch property. + */ + @Generated + private String pitch; + + /* + * The rate property. + */ + @Generated + private String rate; + + /* + * The volume property. + */ + @Generated + private String volume; + + /** + * Get the customLexiconUrl property: The custom_lexicon_url property. + * + * @return the customLexiconUrl value. + */ + @Generated + public String getCustomLexiconUrl() { + return this.customLexiconUrl; + } + + /** + * Set the customLexiconUrl property: The custom_lexicon_url property. + * + * @param customLexiconUrl the customLexiconUrl value to set. + * @return the AzurePersonalVoice object itself. + */ + @Generated + public AzurePersonalVoice setCustomLexiconUrl(String customLexiconUrl) { + this.customLexiconUrl = customLexiconUrl; + return this; + } + + /** + * Get the preferLocales property: The prefer_locales property. + * + * @return the preferLocales value. + */ + @Generated + public List getPreferLocales() { + return this.preferLocales; + } + + /** + * Set the preferLocales property: The prefer_locales property. + * + * @param preferLocales the preferLocales value to set. + * @return the AzurePersonalVoice object itself. + */ + @Generated + public AzurePersonalVoice setPreferLocales(List preferLocales) { + this.preferLocales = preferLocales; + return this; + } + + /** + * Get the locale property: The locale property. + * + * @return the locale value. + */ + @Generated + public String getLocale() { + return this.locale; + } + + /** + * Set the locale property: The locale property. + * + * @param locale the locale value to set. + * @return the AzurePersonalVoice object itself. + */ + @Generated + public AzurePersonalVoice setLocale(String locale) { + this.locale = locale; + return this; + } + + /** + * Get the style property: The style property. + * + * @return the style value. + */ + @Generated + public String getStyle() { + return this.style; + } + + /** + * Set the style property: The style property. + * + * @param style the style value to set. + * @return the AzurePersonalVoice object itself. + */ + @Generated + public AzurePersonalVoice setStyle(String style) { + this.style = style; + return this; + } + + /** + * Get the pitch property: The pitch property. + * + * @return the pitch value. + */ + @Generated + public String getPitch() { + return this.pitch; + } + + /** + * Set the pitch property: The pitch property. + * + * @param pitch the pitch value to set. + * @return the AzurePersonalVoice object itself. + */ + @Generated + public AzurePersonalVoice setPitch(String pitch) { + this.pitch = pitch; + return this; + } + + /** + * Get the rate property: The rate property. + * + * @return the rate value. + */ + @Generated + public String getRate() { + return this.rate; + } + + /** + * Set the rate property: The rate property. + * + * @param rate the rate value to set. + * @return the AzurePersonalVoice object itself. + */ + @Generated + public AzurePersonalVoice setRate(String rate) { + this.rate = rate; + return this; + } + + /** + * Get the volume property: The volume property. + * + * @return the volume value. + */ + @Generated + public String getVolume() { + return this.volume; + } + + /** + * Set the volume property: The volume property. + * + * @param volume the volume value to set. + * @return the AzurePersonalVoice object itself. + */ + @Generated + public AzurePersonalVoice setVolume(String volume) { + this.volume = volume; + return this; + } } diff --git a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/CachedTokenDetails.java b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/CachedTokenDetails.java index a20602b3b818..f0fdc5121d97 100644 --- a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/CachedTokenDetails.java +++ b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/CachedTokenDetails.java @@ -29,18 +29,6 @@ public final class CachedTokenDetails implements JsonSerializable { int textTokens = 0; int audioTokens = 0; + int imageTokens = 0; while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -94,11 +84,43 @@ public static CachedTokenDetails fromJson(JsonReader jsonReader) throws IOExcept textTokens = reader.getInt(); } else if ("audio_tokens".equals(fieldName)) { audioTokens = reader.getInt(); + } else if ("image_tokens".equals(fieldName)) { + imageTokens = reader.getInt(); } else { reader.skipChildren(); } } - return new CachedTokenDetails(textTokens, audioTokens); + return new CachedTokenDetails(textTokens, audioTokens, imageTokens); }); } + + /* + * Number of cached image tokens. + */ + @Generated + private final int imageTokens; + + /** + * Creates an instance of CachedTokenDetails class. + * + * @param textTokens the textTokens value to set. + * @param audioTokens the audioTokens value to set. + * @param imageTokens the imageTokens value to set. + */ + @Generated + private CachedTokenDetails(int textTokens, int audioTokens, int imageTokens) { + this.textTokens = textTokens; + this.audioTokens = audioTokens; + this.imageTokens = imageTokens; + } + + /** + * Get the imageTokens property: Number of cached image tokens. + * + * @return the imageTokens value. + */ + @Generated + public int getImageTokens() { + return this.imageTokens; + } } diff --git a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ContentPartType.java b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ContentPartType.java index f00bc7bae437..14311f8808a8 100644 --- a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ContentPartType.java +++ b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ContentPartType.java @@ -66,4 +66,10 @@ public static ContentPartType fromString(String name) { public static Collection values() { return values(ContentPartType.class); } + + /** + * Static value input_image for ContentPartType. + */ + @Generated + public static final ContentPartType INPUT_IMAGE = fromString("input_image"); } diff --git a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/InputTokenDetails.java b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/InputTokenDetails.java index 46808cf599ba..2fe3c8d502fc 100644 --- a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/InputTokenDetails.java +++ b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/InputTokenDetails.java @@ -41,23 +41,6 @@ public final class InputTokenDetails implements JsonSerializable values() { return values(OpenAIVoiceName.class); } + + /** + * Marin voice. + */ + @Generated + public static final OpenAIVoiceName MARIN = fromString("marin"); + + /** + * Cedar voice. + */ + @Generated + public static final OpenAIVoiceName CEDAR = fromString("cedar"); } diff --git a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/PhotoAvatarBaseModes.java b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/PhotoAvatarBaseModes.java new file mode 100644 index 000000000000..c1d3466ff2e4 --- /dev/null +++ b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/PhotoAvatarBaseModes.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Photo avatar base modes. + */ +public final class PhotoAvatarBaseModes extends ExpandableStringEnum { + + /** + * VASA-1 model. + */ + @Generated + public static final PhotoAvatarBaseModes VASA_1 = fromString("vasa-1"); + + /** + * Creates a new instance of PhotoAvatarBaseModes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public PhotoAvatarBaseModes() { + } + + /** + * Creates or finds a PhotoAvatarBaseModes from its string representation. + * + * @param name a name to look for. + * @return the corresponding PhotoAvatarBaseModes. + */ + @Generated + public static PhotoAvatarBaseModes fromString(String name) { + return fromString(name, PhotoAvatarBaseModes.class); + } + + /** + * Gets known PhotoAvatarBaseModes values. + * + * @return known PhotoAvatarBaseModes values. + */ + @Generated + public static Collection values() { + return values(PhotoAvatarBaseModes.class); + } +} diff --git a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/RequestImageContentPart.java b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/RequestImageContentPart.java new file mode 100644 index 000000000000..2023e2e109dc --- /dev/null +++ b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/RequestImageContentPart.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Input image content part. + */ +@Fluent +public final class RequestImageContentPart extends VoiceLiveContentPart { + + /* + * The type property. + */ + @Generated + private ContentPartType type = ContentPartType.INPUT_IMAGE; + + /* + * The url property. + */ + @Generated + private String url; + + /* + * The detail property. + */ + @Generated + private RequestImageContentPartDetail detail; + + /** + * Creates an instance of RequestImageContentPart class. + */ + @Generated + public RequestImageContentPart() { + } + + /** + * Get the type property: The type property. + * + * @return the type value. + */ + @Generated + @Override + public ContentPartType getType() { + return this.type; + } + + /** + * Get the url property: The url property. + * + * @return the url value. + */ + @Generated + public String getUrl() { + return this.url; + } + + /** + * Set the url property: The url property. + * + * @param url the url value to set. + * @return the RequestImageContentPart object itself. + */ + @Generated + public RequestImageContentPart setUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the detail property: The detail property. + * + * @return the detail value. + */ + @Generated + public RequestImageContentPartDetail getDetail() { + return this.detail; + } + + /** + * Set the detail property: The detail property. + * + * @param detail the detail value to set. + * @return the RequestImageContentPart object itself. + */ + @Generated + public RequestImageContentPart setDetail(RequestImageContentPartDetail detail) { + this.detail = detail; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("url", this.url); + jsonWriter.writeStringField("detail", this.detail == null ? null : this.detail.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RequestImageContentPart from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RequestImageContentPart if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the RequestImageContentPart. + */ + @Generated + public static RequestImageContentPart fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RequestImageContentPart deserializedRequestImageContentPart = new RequestImageContentPart(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("type".equals(fieldName)) { + deserializedRequestImageContentPart.type = ContentPartType.fromString(reader.getString()); + } else if ("url".equals(fieldName)) { + deserializedRequestImageContentPart.url = reader.getString(); + } else if ("detail".equals(fieldName)) { + deserializedRequestImageContentPart.detail + = RequestImageContentPartDetail.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + return deserializedRequestImageContentPart; + }); + } +} diff --git a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/RequestImageContentPartDetail.java b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/RequestImageContentPartDetail.java new file mode 100644 index 000000000000..6e29ff9ef2f8 --- /dev/null +++ b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/RequestImageContentPartDetail.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies an image's detail level. Can be 'auto', 'low', 'high', or an unknown future value. + */ +public final class RequestImageContentPartDetail extends ExpandableStringEnum { + + /** + * Automatically select an appropriate detail level. + */ + @Generated + public static final RequestImageContentPartDetail AUTO = fromString("auto"); + + /** + * Use a lower detail level to reduce bandwidth or cost. + */ + @Generated + public static final RequestImageContentPartDetail LOW = fromString("low"); + + /** + * Use a higher detail level—potentially more resource-intensive. + */ + @Generated + public static final RequestImageContentPartDetail HIGH = fromString("high"); + + /** + * Creates a new instance of RequestImageContentPartDetail value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public RequestImageContentPartDetail() { + } + + /** + * Creates or finds a RequestImageContentPartDetail from its string representation. + * + * @param name a name to look for. + * @return the corresponding RequestImageContentPartDetail. + */ + @Generated + public static RequestImageContentPartDetail fromString(String name) { + return fromString(name, RequestImageContentPartDetail.class); + } + + /** + * Gets known RequestImageContentPartDetail values. + * + * @return known RequestImageContentPartDetail values. + */ + @Generated + public static Collection values() { + return values(RequestImageContentPartDetail.class); + } +} diff --git a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseCreateParams.java b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseCreateParams.java index e45ec19c3579..8e7f7089f3ca 100644 --- a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseCreateParams.java +++ b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ResponseCreateParams.java @@ -418,6 +418,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeFieldName("max_output_tokens"); this.maxOutputTokens.writeTo(jsonWriter); } + jsonWriter.writeJsonField("pre_generated_assistant_message", this.preGeneratedAssistantMessage); return jsonWriter.writeEndObject(); } @@ -471,6 +472,9 @@ public static ResponseCreateParams fromJson(JsonReader jsonReader) throws IOExce } else if ("max_output_tokens".equals(fieldName)) { deserializedResponseCreateParams.maxOutputTokens = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())); + } else if ("pre_generated_assistant_message".equals(fieldName)) { + deserializedResponseCreateParams.preGeneratedAssistantMessage + = AssistantMessageItem.fromJson(reader); } else { reader.skipChildren(); } @@ -505,4 +509,37 @@ public ResponseCreateParams setMaxOutputTokens(BinaryData maxOutputTokens) { this.maxOutputTokens = maxOutputTokens; return this; } + + /* + * Create the response with pre-generated assistant message. The message item would be + * added into the conversation history and returned with synthesized audio output in the created response. + */ + @Generated + private AssistantMessageItem preGeneratedAssistantMessage; + + /** + * Get the preGeneratedAssistantMessage property: Create the response with pre-generated assistant message. The + * message item would be + * added into the conversation history and returned with synthesized audio output in the created response. + * + * @return the preGeneratedAssistantMessage value. + */ + @Generated + public AssistantMessageItem getPreGeneratedAssistantMessage() { + return this.preGeneratedAssistantMessage; + } + + /** + * Set the preGeneratedAssistantMessage property: Create the response with pre-generated assistant message. The + * message item would be + * added into the conversation history and returned with synthesized audio output in the created response. + * + * @param preGeneratedAssistantMessage the preGeneratedAssistantMessage value to set. + * @return the ResponseCreateParams object itself. + */ + @Generated + public ResponseCreateParams setPreGeneratedAssistantMessage(AssistantMessageItem preGeneratedAssistantMessage) { + this.preGeneratedAssistantMessage = preGeneratedAssistantMessage; + return this; + } } diff --git a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallCompleted.java b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallCompleted.java new file mode 100644 index 000000000000..c98be999611e --- /dev/null +++ b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallCompleted.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Indicates the MCP call has completed. + */ +@Immutable +public final class ServerEventResponseMcpCallCompleted extends SessionUpdate { + + /* + * The type of event. + */ + @Generated + private ServerEventType type = ServerEventType.RESPONSE_MCP_CALL_COMPLETED; + + /* + * The ID of the item associated with the event. + */ + @Generated + private final String itemId; + + /* + * The index of the output associated with the event. + */ + @Generated + private final int outputIndex; + + /** + * Creates an instance of ServerEventResponseMcpCallCompleted class. + * + * @param itemId the itemId value to set. + * @param outputIndex the outputIndex value to set. + */ + @Generated + private ServerEventResponseMcpCallCompleted(String itemId, int outputIndex) { + this.itemId = itemId; + this.outputIndex = outputIndex; + } + + /** + * Get the type property: The type of event. + * + * @return the type value. + */ + @Generated + @Override + public ServerEventType getType() { + return this.type; + } + + /** + * Get the itemId property: The ID of the item associated with the event. + * + * @return the itemId value. + */ + @Generated + public String getItemId() { + return this.itemId; + } + + /** + * Get the outputIndex property: The index of the output associated with the event. + * + * @return the outputIndex value. + */ + @Generated + public int getOutputIndex() { + return this.outputIndex; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("event_id", getEventId()); + jsonWriter.writeStringField("item_id", this.itemId); + jsonWriter.writeIntField("output_index", this.outputIndex); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerEventResponseMcpCallCompleted from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerEventResponseMcpCallCompleted if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerEventResponseMcpCallCompleted. + */ + @Generated + public static ServerEventResponseMcpCallCompleted fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String eventId = null; + String itemId = null; + int outputIndex = 0; + ServerEventType type = ServerEventType.RESPONSE_MCP_CALL_COMPLETED; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("event_id".equals(fieldName)) { + eventId = reader.getString(); + } else if ("item_id".equals(fieldName)) { + itemId = reader.getString(); + } else if ("output_index".equals(fieldName)) { + outputIndex = reader.getInt(); + } else if ("type".equals(fieldName)) { + type = ServerEventType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + ServerEventResponseMcpCallCompleted deserializedServerEventResponseMcpCallCompleted + = new ServerEventResponseMcpCallCompleted(itemId, outputIndex); + deserializedServerEventResponseMcpCallCompleted.setEventId(eventId); + deserializedServerEventResponseMcpCallCompleted.type = type; + return deserializedServerEventResponseMcpCallCompleted; + }); + } +} diff --git a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallFailed.java b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallFailed.java new file mode 100644 index 000000000000..84362a744497 --- /dev/null +++ b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallFailed.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Indicates the MCP call has failed. + */ +@Immutable +public final class ServerEventResponseMcpCallFailed extends SessionUpdate { + + /* + * The type of event. + */ + @Generated + private ServerEventType type = ServerEventType.RESPONSE_MCP_CALL_FAILED; + + /* + * The ID of the item associated with the event. + */ + @Generated + private final String itemId; + + /* + * The index of the output associated with the event. + */ + @Generated + private final int outputIndex; + + /** + * Creates an instance of ServerEventResponseMcpCallFailed class. + * + * @param itemId the itemId value to set. + * @param outputIndex the outputIndex value to set. + */ + @Generated + private ServerEventResponseMcpCallFailed(String itemId, int outputIndex) { + this.itemId = itemId; + this.outputIndex = outputIndex; + } + + /** + * Get the type property: The type of event. + * + * @return the type value. + */ + @Generated + @Override + public ServerEventType getType() { + return this.type; + } + + /** + * Get the itemId property: The ID of the item associated with the event. + * + * @return the itemId value. + */ + @Generated + public String getItemId() { + return this.itemId; + } + + /** + * Get the outputIndex property: The index of the output associated with the event. + * + * @return the outputIndex value. + */ + @Generated + public int getOutputIndex() { + return this.outputIndex; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("event_id", getEventId()); + jsonWriter.writeStringField("item_id", this.itemId); + jsonWriter.writeIntField("output_index", this.outputIndex); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerEventResponseMcpCallFailed from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerEventResponseMcpCallFailed if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerEventResponseMcpCallFailed. + */ + @Generated + public static ServerEventResponseMcpCallFailed fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String eventId = null; + String itemId = null; + int outputIndex = 0; + ServerEventType type = ServerEventType.RESPONSE_MCP_CALL_FAILED; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("event_id".equals(fieldName)) { + eventId = reader.getString(); + } else if ("item_id".equals(fieldName)) { + itemId = reader.getString(); + } else if ("output_index".equals(fieldName)) { + outputIndex = reader.getInt(); + } else if ("type".equals(fieldName)) { + type = ServerEventType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + ServerEventResponseMcpCallFailed deserializedServerEventResponseMcpCallFailed + = new ServerEventResponseMcpCallFailed(itemId, outputIndex); + deserializedServerEventResponseMcpCallFailed.setEventId(eventId); + deserializedServerEventResponseMcpCallFailed.type = type; + return deserializedServerEventResponseMcpCallFailed; + }); + } +} diff --git a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallInProgress.java b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallInProgress.java new file mode 100644 index 000000000000..ed930eea6188 --- /dev/null +++ b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallInProgress.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.ai.voicelive.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Indicates the MCP call running. + */ +@Immutable +public final class ServerEventResponseMcpCallInProgress extends SessionUpdate { + + /* + * The type of event. + */ + @Generated + private ServerEventType type = ServerEventType.RESPONSE_MCP_CALL_IN_PROGRESS; + + /* + * The ID of the item associated with the event. + */ + @Generated + private final String itemId; + + /* + * The index of the output associated with the event. + */ + @Generated + private final int outputIndex; + + /** + * Creates an instance of ServerEventResponseMcpCallInProgress class. + * + * @param itemId the itemId value to set. + * @param outputIndex the outputIndex value to set. + */ + @Generated + private ServerEventResponseMcpCallInProgress(String itemId, int outputIndex) { + this.itemId = itemId; + this.outputIndex = outputIndex; + } + + /** + * Get the type property: The type of event. + * + * @return the type value. + */ + @Generated + @Override + public ServerEventType getType() { + return this.type; + } + + /** + * Get the itemId property: The ID of the item associated with the event. + * + * @return the itemId value. + */ + @Generated + public String getItemId() { + return this.itemId; + } + + /** + * Get the outputIndex property: The index of the output associated with the event. + * + * @return the outputIndex value. + */ + @Generated + public int getOutputIndex() { + return this.outputIndex; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("event_id", getEventId()); + jsonWriter.writeStringField("item_id", this.itemId); + jsonWriter.writeIntField("output_index", this.outputIndex); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerEventResponseMcpCallInProgress from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerEventResponseMcpCallInProgress if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerEventResponseMcpCallInProgress. + */ + @Generated + public static ServerEventResponseMcpCallInProgress fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String eventId = null; + String itemId = null; + int outputIndex = 0; + ServerEventType type = ServerEventType.RESPONSE_MCP_CALL_IN_PROGRESS; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("event_id".equals(fieldName)) { + eventId = reader.getString(); + } else if ("item_id".equals(fieldName)) { + itemId = reader.getString(); + } else if ("output_index".equals(fieldName)) { + outputIndex = reader.getInt(); + } else if ("type".equals(fieldName)) { + type = ServerEventType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + ServerEventResponseMcpCallInProgress deserializedServerEventResponseMcpCallInProgress + = new ServerEventResponseMcpCallInProgress(itemId, outputIndex); + deserializedServerEventResponseMcpCallInProgress.setEventId(eventId); + deserializedServerEventResponseMcpCallInProgress.type = type; + return deserializedServerEventResponseMcpCallInProgress; + }); + } +} diff --git a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionUpdate.java b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionUpdate.java index dfcd094a6215..291e833c648d 100644 --- a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionUpdate.java +++ b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/SessionUpdate.java @@ -186,6 +186,12 @@ public static SessionUpdate fromJson(JsonReader jsonReader) throws IOException { return ServerEventResponseMcpCallArgumentsDelta.fromJson(readerToUse.reset()); } else if ("response.mcp_call_arguments.done".equals(discriminatorValue)) { return ServerEventResponseMcpCallArgumentsDone.fromJson(readerToUse.reset()); + } else if ("response.mcp_call.in_progress".equals(discriminatorValue)) { + return ServerEventResponseMcpCallInProgress.fromJson(readerToUse.reset()); + } else if ("response.mcp_call.completed".equals(discriminatorValue)) { + return ServerEventResponseMcpCallCompleted.fromJson(readerToUse.reset()); + } else if ("response.mcp_call.failed".equals(discriminatorValue)) { + return ServerEventResponseMcpCallFailed.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/VoiceLiveContentPart.java b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/VoiceLiveContentPart.java index 2311310b0201..a4e1e9dee141 100644 --- a/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/VoiceLiveContentPart.java +++ b/sdk/ai/azure-ai-voicelive/src/main/java/com/azure/ai/voicelive/models/VoiceLiveContentPart.java @@ -77,7 +77,9 @@ public static VoiceLiveContentPart fromJson(JsonReader jsonReader) throws IOExce } } // Use the discriminator value to determine which subtype should be deserialized. - if ("input_text".equals(discriminatorValue)) { + if ("input_image".equals(discriminatorValue)) { + return RequestImageContentPart.fromJson(readerToUse.reset()); + } else if ("input_text".equals(discriminatorValue)) { return RequestTextContentPart.fromJson(readerToUse.reset()); } else if ("input_audio".equals(discriminatorValue)) { return RequestAudioContentPart.fromJson(readerToUse.reset()); diff --git a/sdk/ai/azure-ai-voicelive/src/main/resources/META-INF/azure-ai-voicelive_apiview_properties.json b/sdk/ai/azure-ai-voicelive/src/main/resources/META-INF/azure-ai-voicelive_apiview_properties.json index f840c4745270..6bf263f967ae 100644 --- a/sdk/ai/azure-ai-voicelive/src/main/resources/META-INF/azure-ai-voicelive_apiview_properties.json +++ b/sdk/ai/azure-ai-voicelive/src/main/resources/META-INF/azure-ai-voicelive_apiview_properties.json @@ -10,7 +10,9 @@ "com.azure.ai.voicelive.models.AudioNoiseReduction": "VoiceLive.AudioNoiseReduction", "com.azure.ai.voicelive.models.AudioNoiseReductionType": "VoiceLive.AudioNoiseReduction.type.anonymous", "com.azure.ai.voicelive.models.AudioTimestampType": "VoiceLive.AudioTimestampType", + "com.azure.ai.voicelive.models.AvatarConfigTypes": "VoiceLive.AvatarConfigTypes", "com.azure.ai.voicelive.models.AvatarConfiguration": "VoiceLive.AvatarConfig", + "com.azure.ai.voicelive.models.AvatarOutputProtocol": "VoiceLive.AvatarOutputProtocol", "com.azure.ai.voicelive.models.AzureCustomVoice": "VoiceLive.AzureCustomVoice", "com.azure.ai.voicelive.models.AzurePersonalVoice": "VoiceLive.AzurePersonalVoice", "com.azure.ai.voicelive.models.AzureSemanticEouDetection": "VoiceLive.AzureSemanticDetection", @@ -69,7 +71,10 @@ "com.azure.ai.voicelive.models.OutputTextContentPart": "VoiceLive.OutputTextContentPart", "com.azure.ai.voicelive.models.OutputTokenDetails": "VoiceLive.OutputTokenDetails", "com.azure.ai.voicelive.models.PersonalVoiceModels": "VoiceLive.PersonalVoiceModels", + "com.azure.ai.voicelive.models.PhotoAvatarBaseModes": "VoiceLive.PhotoAvatarBaseModes", "com.azure.ai.voicelive.models.RequestAudioContentPart": "VoiceLive.RequestAudioContentPart", + "com.azure.ai.voicelive.models.RequestImageContentPart": "VoiceLive.RequestImageContentPart", + "com.azure.ai.voicelive.models.RequestImageContentPartDetail": "VoiceLive.RequestImageContentPartDetail", "com.azure.ai.voicelive.models.RequestTextContentPart": "VoiceLive.RequestTextContentPart", "com.azure.ai.voicelive.models.RespondingAgentOptions": "VoiceLive.AgentConfig", "com.azure.ai.voicelive.models.ResponseAudioContentPart": "VoiceLive.ResponseAudioContentPart", @@ -96,6 +101,9 @@ "com.azure.ai.voicelive.models.ServerEventMcpListToolsInProgress": "VoiceLive.ServerEventMcpListToolsInProgress", "com.azure.ai.voicelive.models.ServerEventResponseMcpCallArgumentsDelta": "VoiceLive.ServerEventResponseMcpCallArgumentsDelta", "com.azure.ai.voicelive.models.ServerEventResponseMcpCallArgumentsDone": "VoiceLive.ServerEventResponseMcpCallArgumentsDone", + "com.azure.ai.voicelive.models.ServerEventResponseMcpCallCompleted": "VoiceLive.ServerEventResponseMcpCallCompleted", + "com.azure.ai.voicelive.models.ServerEventResponseMcpCallFailed": "VoiceLive.ServerEventResponseMcpCallFailed", + "com.azure.ai.voicelive.models.ServerEventResponseMcpCallInProgress": "VoiceLive.ServerEventResponseMcpCallInProgress", "com.azure.ai.voicelive.models.ServerEventType": "VoiceLive.ServerEventType", "com.azure.ai.voicelive.models.ServerVadTurnDetection": "VoiceLive.ServerVad", "com.azure.ai.voicelive.models.SessionResponse": "VoiceLive.Response", diff --git a/sdk/ai/azure-ai-voicelive/src/main/resources/META-INF/azure-ai-voicelive_metadata.json b/sdk/ai/azure-ai-voicelive/src/main/resources/META-INF/azure-ai-voicelive_metadata.json index 6fecea6439ce..a47de149bab1 100644 --- a/sdk/ai/azure-ai-voicelive/src/main/resources/META-INF/azure-ai-voicelive_metadata.json +++ b/sdk/ai/azure-ai-voicelive/src/main/resources/META-INF/azure-ai-voicelive_metadata.json @@ -1 +1 @@ -{"flavor":"azure","crossLanguageDefinitions":{"com.azure.ai.voicelive.models.AnimationOptions":"VoiceLive.Animation","com.azure.ai.voicelive.models.AnimationOutputType":"VoiceLive.AnimationOutputType","com.azure.ai.voicelive.models.AssistantMessageItem":"VoiceLive.AssistantMessageItem","com.azure.ai.voicelive.models.AudioEchoCancellation":"VoiceLive.AudioEchoCancellation","com.azure.ai.voicelive.models.AudioInputTranscriptionOptions":"VoiceLive.AudioInputTranscriptionOptions","com.azure.ai.voicelive.models.AudioInputTranscriptionOptionsModel":"VoiceLive.AudioInputTranscriptionOptions.model.anonymous","com.azure.ai.voicelive.models.AudioNoiseReduction":"VoiceLive.AudioNoiseReduction","com.azure.ai.voicelive.models.AudioNoiseReductionType":"VoiceLive.AudioNoiseReduction.type.anonymous","com.azure.ai.voicelive.models.AudioTimestampType":"VoiceLive.AudioTimestampType","com.azure.ai.voicelive.models.AvatarConfiguration":"VoiceLive.AvatarConfig","com.azure.ai.voicelive.models.AzureCustomVoice":"VoiceLive.AzureCustomVoice","com.azure.ai.voicelive.models.AzurePersonalVoice":"VoiceLive.AzurePersonalVoice","com.azure.ai.voicelive.models.AzureSemanticEouDetection":"VoiceLive.AzureSemanticDetection","com.azure.ai.voicelive.models.AzureSemanticEouDetectionEn":"VoiceLive.AzureSemanticDetectionEn","com.azure.ai.voicelive.models.AzureSemanticEouDetectionMultilingual":"VoiceLive.AzureSemanticDetectionMultilingual","com.azure.ai.voicelive.models.AzureSemanticVadTurnDetection":"VoiceLive.AzureSemanticVad","com.azure.ai.voicelive.models.AzureSemanticVadTurnDetectionEn":"VoiceLive.AzureSemanticVadEn","com.azure.ai.voicelive.models.AzureSemanticVadTurnDetectionMultilingual":"VoiceLive.AzureSemanticVadMultilingual","com.azure.ai.voicelive.models.AzureStandardVoice":"VoiceLive.AzureStandardVoice","com.azure.ai.voicelive.models.AzureVoice":"VoiceLive.AzureVoice","com.azure.ai.voicelive.models.AzureVoiceType":"VoiceLive.AzureVoiceType","com.azure.ai.voicelive.models.CachedTokenDetails":"VoiceLive.CachedTokenDetails","com.azure.ai.voicelive.models.ClientEvent":"VoiceLive.ClientEvent","com.azure.ai.voicelive.models.ClientEventConversationItemCreate":"VoiceLive.ClientEventConversationItemCreate","com.azure.ai.voicelive.models.ClientEventConversationItemDelete":"VoiceLive.ClientEventConversationItemDelete","com.azure.ai.voicelive.models.ClientEventConversationItemRetrieve":"VoiceLive.ClientEventConversationItemRetrieve","com.azure.ai.voicelive.models.ClientEventConversationItemTruncate":"VoiceLive.ClientEventConversationItemTruncate","com.azure.ai.voicelive.models.ClientEventInputAudioBufferAppend":"VoiceLive.ClientEventInputAudioBufferAppend","com.azure.ai.voicelive.models.ClientEventInputAudioBufferClear":"VoiceLive.ClientEventInputAudioBufferClear","com.azure.ai.voicelive.models.ClientEventInputAudioBufferCommit":"VoiceLive.ClientEventInputAudioBufferCommit","com.azure.ai.voicelive.models.ClientEventInputAudioClear":"VoiceLive.ClientEventInputAudioClear","com.azure.ai.voicelive.models.ClientEventInputAudioTurnAppend":"VoiceLive.ClientEventInputAudioTurnAppend","com.azure.ai.voicelive.models.ClientEventInputAudioTurnCancel":"VoiceLive.ClientEventInputAudioTurnCancel","com.azure.ai.voicelive.models.ClientEventInputAudioTurnEnd":"VoiceLive.ClientEventInputAudioTurnEnd","com.azure.ai.voicelive.models.ClientEventInputAudioTurnStart":"VoiceLive.ClientEventInputAudioTurnStart","com.azure.ai.voicelive.models.ClientEventResponseCancel":"VoiceLive.ClientEventResponseCancel","com.azure.ai.voicelive.models.ClientEventResponseCreate":"VoiceLive.ClientEventResponseCreate","com.azure.ai.voicelive.models.ClientEventSessionAvatarConnect":"VoiceLive.ClientEventSessionAvatarConnect","com.azure.ai.voicelive.models.ClientEventSessionUpdate":"VoiceLive.ClientEventSessionUpdate","com.azure.ai.voicelive.models.ClientEventType":"VoiceLive.ClientEventType","com.azure.ai.voicelive.models.ContentPartType":"VoiceLive.ContentPartType","com.azure.ai.voicelive.models.ConversationRequestItem":"VoiceLive.ConversationRequestItem","com.azure.ai.voicelive.models.EouDetection":"VoiceLive.EouDetection","com.azure.ai.voicelive.models.EouDetectionModel":"VoiceLive.EouDetection.model.anonymous","com.azure.ai.voicelive.models.EouThresholdLevel":"VoiceLive.EouThresholdLevel","com.azure.ai.voicelive.models.FunctionCallItem":"VoiceLive.FunctionCallItem","com.azure.ai.voicelive.models.FunctionCallOutputItem":"VoiceLive.FunctionCallOutputItem","com.azure.ai.voicelive.models.IceServer":"VoiceLive.IceServer","com.azure.ai.voicelive.models.InputAudioContentPart":"VoiceLive.InputAudioContentPart","com.azure.ai.voicelive.models.InputAudioFormat":"VoiceLive.InputAudioFormat","com.azure.ai.voicelive.models.InputTextContentPart":"VoiceLive.InputTextContentPart","com.azure.ai.voicelive.models.InputTokenDetails":"VoiceLive.InputTokenDetails","com.azure.ai.voicelive.models.InteractionModality":"VoiceLive.Modality","com.azure.ai.voicelive.models.ItemParamStatus":"VoiceLive.ItemParamStatus","com.azure.ai.voicelive.models.ItemType":"VoiceLive.ItemType","com.azure.ai.voicelive.models.LogProbProperties":"VoiceLive.LogProbProperties","com.azure.ai.voicelive.models.MCPApprovalResponseRequestItem":"VoiceLive.MCPApprovalResponseRequestItem","com.azure.ai.voicelive.models.MCPApprovalType":"VoiceLive.MCPApprovalType","com.azure.ai.voicelive.models.MCPServer":"VoiceLive.MCPServer","com.azure.ai.voicelive.models.MCPTool":"VoiceLive.MCPTool","com.azure.ai.voicelive.models.MessageContentPart":"VoiceLive.MessageContentPart","com.azure.ai.voicelive.models.MessageItem":"VoiceLive.MessageItem","com.azure.ai.voicelive.models.OpenAIVoice":"VoiceLive.OpenAIVoice","com.azure.ai.voicelive.models.OpenAIVoiceName":"VoiceLive.OAIVoice","com.azure.ai.voicelive.models.OutputAudioFormat":"VoiceLive.OutputAudioFormat","com.azure.ai.voicelive.models.OutputTextContentPart":"VoiceLive.OutputTextContentPart","com.azure.ai.voicelive.models.OutputTokenDetails":"VoiceLive.OutputTokenDetails","com.azure.ai.voicelive.models.PersonalVoiceModels":"VoiceLive.PersonalVoiceModels","com.azure.ai.voicelive.models.RequestAudioContentPart":"VoiceLive.RequestAudioContentPart","com.azure.ai.voicelive.models.RequestTextContentPart":"VoiceLive.RequestTextContentPart","com.azure.ai.voicelive.models.RespondingAgentOptions":"VoiceLive.AgentConfig","com.azure.ai.voicelive.models.ResponseAudioContentPart":"VoiceLive.ResponseAudioContentPart","com.azure.ai.voicelive.models.ResponseCancelledDetails":"VoiceLive.ResponseCancelledDetails","com.azure.ai.voicelive.models.ResponseCancelledDetailsReason":"VoiceLive.ResponseCancelledDetails.reason.anonymous","com.azure.ai.voicelive.models.ResponseCreateParams":"VoiceLive.ResponseCreateParams","com.azure.ai.voicelive.models.ResponseFailedDetails":"VoiceLive.ResponseFailedDetails","com.azure.ai.voicelive.models.ResponseFunctionCallItem":"VoiceLive.ResponseFunctionCallItem","com.azure.ai.voicelive.models.ResponseFunctionCallOutputItem":"VoiceLive.ResponseFunctionCallOutputItem","com.azure.ai.voicelive.models.ResponseIncompleteDetails":"VoiceLive.ResponseIncompleteDetails","com.azure.ai.voicelive.models.ResponseIncompleteDetailsReason":"VoiceLive.ResponseIncompleteDetails.reason.anonymous","com.azure.ai.voicelive.models.ResponseItemObject":null,"com.azure.ai.voicelive.models.ResponseMCPApprovalRequestItem":"VoiceLive.ResponseMCPApprovalRequestItem","com.azure.ai.voicelive.models.ResponseMCPApprovalResponseItem":"VoiceLive.ResponseMCPApprovalResponseItem","com.azure.ai.voicelive.models.ResponseMCPCallItem":"VoiceLive.ResponseMCPCallItem","com.azure.ai.voicelive.models.ResponseMCPListToolItem":"VoiceLive.ResponseMCPListToolItem","com.azure.ai.voicelive.models.ResponseMessageRole":"VoiceLive.MessageRole","com.azure.ai.voicelive.models.ResponseObject":null,"com.azure.ai.voicelive.models.ResponseStatusDetails":"VoiceLive.ResponseStatusDetails","com.azure.ai.voicelive.models.ResponseTextContentPart":"VoiceLive.ResponseTextContentPart","com.azure.ai.voicelive.models.ResponseTokenStatistics":"VoiceLive.TokenUsage","com.azure.ai.voicelive.models.ServerEventMcpListToolsCompleted":"VoiceLive.ServerEventMcpListToolsCompleted","com.azure.ai.voicelive.models.ServerEventMcpListToolsFailed":"VoiceLive.ServerEventMcpListToolsFailed","com.azure.ai.voicelive.models.ServerEventMcpListToolsInProgress":"VoiceLive.ServerEventMcpListToolsInProgress","com.azure.ai.voicelive.models.ServerEventResponseMcpCallArgumentsDelta":"VoiceLive.ServerEventResponseMcpCallArgumentsDelta","com.azure.ai.voicelive.models.ServerEventResponseMcpCallArgumentsDone":"VoiceLive.ServerEventResponseMcpCallArgumentsDone","com.azure.ai.voicelive.models.ServerEventType":"VoiceLive.ServerEventType","com.azure.ai.voicelive.models.ServerVadTurnDetection":"VoiceLive.ServerVad","com.azure.ai.voicelive.models.SessionResponse":"VoiceLive.Response","com.azure.ai.voicelive.models.SessionResponseItem":"VoiceLive.ResponseItem","com.azure.ai.voicelive.models.SessionResponseItemStatus":"VoiceLive.ResponseItemStatus","com.azure.ai.voicelive.models.SessionResponseMessageItem":"VoiceLive.ResponseMessageItem","com.azure.ai.voicelive.models.SessionResponseStatus":"VoiceLive.ResponseStatus","com.azure.ai.voicelive.models.SessionUpdate":"VoiceLive.ServerEvent","com.azure.ai.voicelive.models.SessionUpdateAvatarConnecting":"VoiceLive.ServerEventSessionAvatarConnecting","com.azure.ai.voicelive.models.SessionUpdateConversationItemCreated":"VoiceLive.ServerEventConversationItemCreated","com.azure.ai.voicelive.models.SessionUpdateConversationItemDeleted":"VoiceLive.ServerEventConversationItemDeleted","com.azure.ai.voicelive.models.SessionUpdateConversationItemInputAudioTranscriptionCompleted":"VoiceLive.ServerEventConversationItemInputAudioTranscriptionCompleted","com.azure.ai.voicelive.models.SessionUpdateConversationItemInputAudioTranscriptionDelta":"VoiceLive.ServerEventConversationItemInputAudioTranscriptionDelta","com.azure.ai.voicelive.models.SessionUpdateConversationItemInputAudioTranscriptionFailed":"VoiceLive.ServerEventConversationItemInputAudioTranscriptionFailed","com.azure.ai.voicelive.models.SessionUpdateConversationItemRetrieved":"VoiceLive.ServerEventConversationItemRetrieved","com.azure.ai.voicelive.models.SessionUpdateConversationItemTruncated":"VoiceLive.ServerEventConversationItemTruncated","com.azure.ai.voicelive.models.SessionUpdateError":"VoiceLive.ServerEventError","com.azure.ai.voicelive.models.SessionUpdateErrorDetails":"VoiceLive.ServerEventErrorDetails","com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferCleared":"VoiceLive.ServerEventInputAudioBufferCleared","com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferCommitted":"VoiceLive.ServerEventInputAudioBufferCommitted","com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferSpeechStarted":"VoiceLive.ServerEventInputAudioBufferSpeechStarted","com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferSpeechStopped":"VoiceLive.ServerEventInputAudioBufferSpeechStopped","com.azure.ai.voicelive.models.SessionUpdateResponseAnimationBlendshapeDelta":"VoiceLive.ServerEventResponseAnimationBlendshapeDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAnimationBlendshapeDone":"VoiceLive.ServerEventResponseAnimationBlendshapeDone","com.azure.ai.voicelive.models.SessionUpdateResponseAnimationVisemeDelta":"VoiceLive.ServerEventResponseAnimationVisemeDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAnimationVisemeDone":"VoiceLive.ServerEventResponseAnimationVisemeDone","com.azure.ai.voicelive.models.SessionUpdateResponseAudioDelta":"VoiceLive.ServerEventResponseAudioDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAudioDone":"VoiceLive.ServerEventResponseAudioDone","com.azure.ai.voicelive.models.SessionUpdateResponseAudioTimestampDelta":"VoiceLive.ServerEventResponseAudioTimestampDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAudioTimestampDone":"VoiceLive.ServerEventResponseAudioTimestampDone","com.azure.ai.voicelive.models.SessionUpdateResponseAudioTranscriptDelta":"VoiceLive.ServerEventResponseAudioTranscriptDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAudioTranscriptDone":"VoiceLive.ServerEventResponseAudioTranscriptDone","com.azure.ai.voicelive.models.SessionUpdateResponseContentPartAdded":"VoiceLive.ServerEventResponseContentPartAdded","com.azure.ai.voicelive.models.SessionUpdateResponseContentPartDone":"VoiceLive.ServerEventResponseContentPartDone","com.azure.ai.voicelive.models.SessionUpdateResponseCreated":"VoiceLive.ServerEventResponseCreated","com.azure.ai.voicelive.models.SessionUpdateResponseDone":"VoiceLive.ServerEventResponseDone","com.azure.ai.voicelive.models.SessionUpdateResponseFunctionCallArgumentsDelta":"VoiceLive.ServerEventResponseFunctionCallArgumentsDelta","com.azure.ai.voicelive.models.SessionUpdateResponseFunctionCallArgumentsDone":"VoiceLive.ServerEventResponseFunctionCallArgumentsDone","com.azure.ai.voicelive.models.SessionUpdateResponseOutputItemAdded":"VoiceLive.ServerEventResponseOutputItemAdded","com.azure.ai.voicelive.models.SessionUpdateResponseOutputItemDone":"VoiceLive.ServerEventResponseOutputItemDone","com.azure.ai.voicelive.models.SessionUpdateResponseTextDelta":"VoiceLive.ServerEventResponseTextDelta","com.azure.ai.voicelive.models.SessionUpdateResponseTextDone":"VoiceLive.ServerEventResponseTextDone","com.azure.ai.voicelive.models.SessionUpdateSessionCreated":"VoiceLive.ServerEventSessionCreated","com.azure.ai.voicelive.models.SessionUpdateSessionUpdated":"VoiceLive.ServerEventSessionUpdated","com.azure.ai.voicelive.models.SystemMessageItem":"VoiceLive.SystemMessageItem","com.azure.ai.voicelive.models.ToolChoiceFunctionSelection":"VoiceLive.ToolChoiceFunctionObject","com.azure.ai.voicelive.models.ToolChoiceLiteral":"VoiceLive.ToolChoiceLiteral","com.azure.ai.voicelive.models.ToolChoiceSelection":"VoiceLive.ToolChoiceObject","com.azure.ai.voicelive.models.ToolType":"VoiceLive.ToolType","com.azure.ai.voicelive.models.TurnDetection":"VoiceLive.TurnDetection","com.azure.ai.voicelive.models.TurnDetectionType":"VoiceLive.TurnDetectionType","com.azure.ai.voicelive.models.UserMessageItem":"VoiceLive.UserMessageItem","com.azure.ai.voicelive.models.VideoBackground":"VoiceLive.Background","com.azure.ai.voicelive.models.VideoCrop":"VoiceLive.VideoCrop","com.azure.ai.voicelive.models.VideoParams":"VoiceLive.VideoParams","com.azure.ai.voicelive.models.VideoParamsCodec":null,"com.azure.ai.voicelive.models.VideoResolution":"VoiceLive.VideoResolution","com.azure.ai.voicelive.models.VoiceLiveContentPart":"VoiceLive.ContentPart","com.azure.ai.voicelive.models.VoiceLiveErrorDetails":"VoiceLive.VoiceLiveErrorDetails","com.azure.ai.voicelive.models.VoiceLiveFunctionDefinition":"VoiceLive.FunctionTool","com.azure.ai.voicelive.models.VoiceLiveSessionOptions":"VoiceLive.RequestSession","com.azure.ai.voicelive.models.VoiceLiveSessionResponse":"VoiceLive.ResponseSession","com.azure.ai.voicelive.models.VoiceLiveToolDefinition":"VoiceLive.Tool"},"generatedFiles":["src/main/java/com/azure/ai/voicelive/implementation/package-info.java","src/main/java/com/azure/ai/voicelive/models/AnimationOptions.java","src/main/java/com/azure/ai/voicelive/models/AnimationOutputType.java","src/main/java/com/azure/ai/voicelive/models/AssistantMessageItem.java","src/main/java/com/azure/ai/voicelive/models/AudioEchoCancellation.java","src/main/java/com/azure/ai/voicelive/models/AudioInputTranscriptionOptions.java","src/main/java/com/azure/ai/voicelive/models/AudioInputTranscriptionOptionsModel.java","src/main/java/com/azure/ai/voicelive/models/AudioNoiseReduction.java","src/main/java/com/azure/ai/voicelive/models/AudioNoiseReductionType.java","src/main/java/com/azure/ai/voicelive/models/AudioTimestampType.java","src/main/java/com/azure/ai/voicelive/models/AvatarConfiguration.java","src/main/java/com/azure/ai/voicelive/models/AzureCustomVoice.java","src/main/java/com/azure/ai/voicelive/models/AzurePersonalVoice.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticEouDetection.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticEouDetectionEn.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticEouDetectionMultilingual.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetection.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetectionEn.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetectionMultilingual.java","src/main/java/com/azure/ai/voicelive/models/AzureStandardVoice.java","src/main/java/com/azure/ai/voicelive/models/AzureVoice.java","src/main/java/com/azure/ai/voicelive/models/AzureVoiceType.java","src/main/java/com/azure/ai/voicelive/models/CachedTokenDetails.java","src/main/java/com/azure/ai/voicelive/models/ClientEvent.java","src/main/java/com/azure/ai/voicelive/models/ClientEventConversationItemCreate.java","src/main/java/com/azure/ai/voicelive/models/ClientEventConversationItemDelete.java","src/main/java/com/azure/ai/voicelive/models/ClientEventConversationItemRetrieve.java","src/main/java/com/azure/ai/voicelive/models/ClientEventConversationItemTruncate.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioBufferAppend.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioBufferClear.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioBufferCommit.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioClear.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioTurnAppend.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioTurnCancel.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioTurnEnd.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioTurnStart.java","src/main/java/com/azure/ai/voicelive/models/ClientEventResponseCancel.java","src/main/java/com/azure/ai/voicelive/models/ClientEventResponseCreate.java","src/main/java/com/azure/ai/voicelive/models/ClientEventSessionAvatarConnect.java","src/main/java/com/azure/ai/voicelive/models/ClientEventSessionUpdate.java","src/main/java/com/azure/ai/voicelive/models/ClientEventType.java","src/main/java/com/azure/ai/voicelive/models/ContentPartType.java","src/main/java/com/azure/ai/voicelive/models/ConversationRequestItem.java","src/main/java/com/azure/ai/voicelive/models/EouDetection.java","src/main/java/com/azure/ai/voicelive/models/EouDetectionModel.java","src/main/java/com/azure/ai/voicelive/models/EouThresholdLevel.java","src/main/java/com/azure/ai/voicelive/models/FunctionCallItem.java","src/main/java/com/azure/ai/voicelive/models/FunctionCallOutputItem.java","src/main/java/com/azure/ai/voicelive/models/IceServer.java","src/main/java/com/azure/ai/voicelive/models/InputAudioContentPart.java","src/main/java/com/azure/ai/voicelive/models/InputAudioFormat.java","src/main/java/com/azure/ai/voicelive/models/InputTextContentPart.java","src/main/java/com/azure/ai/voicelive/models/InputTokenDetails.java","src/main/java/com/azure/ai/voicelive/models/InteractionModality.java","src/main/java/com/azure/ai/voicelive/models/ItemParamStatus.java","src/main/java/com/azure/ai/voicelive/models/ItemType.java","src/main/java/com/azure/ai/voicelive/models/LogProbProperties.java","src/main/java/com/azure/ai/voicelive/models/MCPApprovalResponseRequestItem.java","src/main/java/com/azure/ai/voicelive/models/MCPApprovalType.java","src/main/java/com/azure/ai/voicelive/models/MCPServer.java","src/main/java/com/azure/ai/voicelive/models/MCPTool.java","src/main/java/com/azure/ai/voicelive/models/MessageContentPart.java","src/main/java/com/azure/ai/voicelive/models/MessageItem.java","src/main/java/com/azure/ai/voicelive/models/OpenAIVoice.java","src/main/java/com/azure/ai/voicelive/models/OpenAIVoiceName.java","src/main/java/com/azure/ai/voicelive/models/OutputAudioFormat.java","src/main/java/com/azure/ai/voicelive/models/OutputTextContentPart.java","src/main/java/com/azure/ai/voicelive/models/OutputTokenDetails.java","src/main/java/com/azure/ai/voicelive/models/PersonalVoiceModels.java","src/main/java/com/azure/ai/voicelive/models/RequestAudioContentPart.java","src/main/java/com/azure/ai/voicelive/models/RequestTextContentPart.java","src/main/java/com/azure/ai/voicelive/models/RespondingAgentOptions.java","src/main/java/com/azure/ai/voicelive/models/ResponseAudioContentPart.java","src/main/java/com/azure/ai/voicelive/models/ResponseCancelledDetails.java","src/main/java/com/azure/ai/voicelive/models/ResponseCancelledDetailsReason.java","src/main/java/com/azure/ai/voicelive/models/ResponseCreateParams.java","src/main/java/com/azure/ai/voicelive/models/ResponseFailedDetails.java","src/main/java/com/azure/ai/voicelive/models/ResponseFunctionCallItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseFunctionCallOutputItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseIncompleteDetails.java","src/main/java/com/azure/ai/voicelive/models/ResponseIncompleteDetailsReason.java","src/main/java/com/azure/ai/voicelive/models/ResponseItemObject.java","src/main/java/com/azure/ai/voicelive/models/ResponseMCPApprovalRequestItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseMCPApprovalResponseItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseMCPCallItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseMCPListToolItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseMessageRole.java","src/main/java/com/azure/ai/voicelive/models/ResponseObject.java","src/main/java/com/azure/ai/voicelive/models/ResponseStatusDetails.java","src/main/java/com/azure/ai/voicelive/models/ResponseTextContentPart.java","src/main/java/com/azure/ai/voicelive/models/ResponseTokenStatistics.java","src/main/java/com/azure/ai/voicelive/models/ServerEventMcpListToolsCompleted.java","src/main/java/com/azure/ai/voicelive/models/ServerEventMcpListToolsFailed.java","src/main/java/com/azure/ai/voicelive/models/ServerEventMcpListToolsInProgress.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallArgumentsDelta.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallArgumentsDone.java","src/main/java/com/azure/ai/voicelive/models/ServerEventType.java","src/main/java/com/azure/ai/voicelive/models/ServerVadTurnDetection.java","src/main/java/com/azure/ai/voicelive/models/SessionResponse.java","src/main/java/com/azure/ai/voicelive/models/SessionResponseItem.java","src/main/java/com/azure/ai/voicelive/models/SessionResponseItemStatus.java","src/main/java/com/azure/ai/voicelive/models/SessionResponseMessageItem.java","src/main/java/com/azure/ai/voicelive/models/SessionResponseStatus.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdate.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateAvatarConnecting.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemCreated.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemDeleted.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemInputAudioTranscriptionCompleted.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemInputAudioTranscriptionDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemInputAudioTranscriptionFailed.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemRetrieved.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemTruncated.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateError.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateErrorDetails.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateInputAudioBufferCleared.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateInputAudioBufferCommitted.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateInputAudioBufferSpeechStarted.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateInputAudioBufferSpeechStopped.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAnimationBlendshapeDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAnimationBlendshapeDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAnimationVisemeDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAnimationVisemeDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioTimestampDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioTimestampDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioTranscriptDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioTranscriptDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseContentPartAdded.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseContentPartDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseCreated.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseFunctionCallArgumentsDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseFunctionCallArgumentsDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseOutputItemAdded.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseOutputItemDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseTextDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseTextDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateSessionCreated.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateSessionUpdated.java","src/main/java/com/azure/ai/voicelive/models/SystemMessageItem.java","src/main/java/com/azure/ai/voicelive/models/ToolChoiceFunctionSelection.java","src/main/java/com/azure/ai/voicelive/models/ToolChoiceLiteral.java","src/main/java/com/azure/ai/voicelive/models/ToolChoiceSelection.java","src/main/java/com/azure/ai/voicelive/models/ToolType.java","src/main/java/com/azure/ai/voicelive/models/TurnDetection.java","src/main/java/com/azure/ai/voicelive/models/TurnDetectionType.java","src/main/java/com/azure/ai/voicelive/models/UserMessageItem.java","src/main/java/com/azure/ai/voicelive/models/VideoBackground.java","src/main/java/com/azure/ai/voicelive/models/VideoCrop.java","src/main/java/com/azure/ai/voicelive/models/VideoParams.java","src/main/java/com/azure/ai/voicelive/models/VideoParamsCodec.java","src/main/java/com/azure/ai/voicelive/models/VideoResolution.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveContentPart.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveErrorDetails.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveFunctionDefinition.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveSessionOptions.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveSessionResponse.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveToolDefinition.java","src/main/java/com/azure/ai/voicelive/models/package-info.java","src/main/java/com/azure/ai/voicelive/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","crossLanguageDefinitions":{"com.azure.ai.voicelive.models.AnimationOptions":"VoiceLive.Animation","com.azure.ai.voicelive.models.AnimationOutputType":"VoiceLive.AnimationOutputType","com.azure.ai.voicelive.models.AssistantMessageItem":"VoiceLive.AssistantMessageItem","com.azure.ai.voicelive.models.AudioEchoCancellation":"VoiceLive.AudioEchoCancellation","com.azure.ai.voicelive.models.AudioInputTranscriptionOptions":"VoiceLive.AudioInputTranscriptionOptions","com.azure.ai.voicelive.models.AudioInputTranscriptionOptionsModel":"VoiceLive.AudioInputTranscriptionOptions.model.anonymous","com.azure.ai.voicelive.models.AudioNoiseReduction":"VoiceLive.AudioNoiseReduction","com.azure.ai.voicelive.models.AudioNoiseReductionType":"VoiceLive.AudioNoiseReduction.type.anonymous","com.azure.ai.voicelive.models.AudioTimestampType":"VoiceLive.AudioTimestampType","com.azure.ai.voicelive.models.AvatarConfigTypes":"VoiceLive.AvatarConfigTypes","com.azure.ai.voicelive.models.AvatarConfiguration":"VoiceLive.AvatarConfig","com.azure.ai.voicelive.models.AvatarOutputProtocol":"VoiceLive.AvatarOutputProtocol","com.azure.ai.voicelive.models.AzureCustomVoice":"VoiceLive.AzureCustomVoice","com.azure.ai.voicelive.models.AzurePersonalVoice":"VoiceLive.AzurePersonalVoice","com.azure.ai.voicelive.models.AzureSemanticEouDetection":"VoiceLive.AzureSemanticDetection","com.azure.ai.voicelive.models.AzureSemanticEouDetectionEn":"VoiceLive.AzureSemanticDetectionEn","com.azure.ai.voicelive.models.AzureSemanticEouDetectionMultilingual":"VoiceLive.AzureSemanticDetectionMultilingual","com.azure.ai.voicelive.models.AzureSemanticVadTurnDetection":"VoiceLive.AzureSemanticVad","com.azure.ai.voicelive.models.AzureSemanticVadTurnDetectionEn":"VoiceLive.AzureSemanticVadEn","com.azure.ai.voicelive.models.AzureSemanticVadTurnDetectionMultilingual":"VoiceLive.AzureSemanticVadMultilingual","com.azure.ai.voicelive.models.AzureStandardVoice":"VoiceLive.AzureStandardVoice","com.azure.ai.voicelive.models.AzureVoice":"VoiceLive.AzureVoice","com.azure.ai.voicelive.models.AzureVoiceType":"VoiceLive.AzureVoiceType","com.azure.ai.voicelive.models.CachedTokenDetails":"VoiceLive.CachedTokenDetails","com.azure.ai.voicelive.models.ClientEvent":"VoiceLive.ClientEvent","com.azure.ai.voicelive.models.ClientEventConversationItemCreate":"VoiceLive.ClientEventConversationItemCreate","com.azure.ai.voicelive.models.ClientEventConversationItemDelete":"VoiceLive.ClientEventConversationItemDelete","com.azure.ai.voicelive.models.ClientEventConversationItemRetrieve":"VoiceLive.ClientEventConversationItemRetrieve","com.azure.ai.voicelive.models.ClientEventConversationItemTruncate":"VoiceLive.ClientEventConversationItemTruncate","com.azure.ai.voicelive.models.ClientEventInputAudioBufferAppend":"VoiceLive.ClientEventInputAudioBufferAppend","com.azure.ai.voicelive.models.ClientEventInputAudioBufferClear":"VoiceLive.ClientEventInputAudioBufferClear","com.azure.ai.voicelive.models.ClientEventInputAudioBufferCommit":"VoiceLive.ClientEventInputAudioBufferCommit","com.azure.ai.voicelive.models.ClientEventInputAudioClear":"VoiceLive.ClientEventInputAudioClear","com.azure.ai.voicelive.models.ClientEventInputAudioTurnAppend":"VoiceLive.ClientEventInputAudioTurnAppend","com.azure.ai.voicelive.models.ClientEventInputAudioTurnCancel":"VoiceLive.ClientEventInputAudioTurnCancel","com.azure.ai.voicelive.models.ClientEventInputAudioTurnEnd":"VoiceLive.ClientEventInputAudioTurnEnd","com.azure.ai.voicelive.models.ClientEventInputAudioTurnStart":"VoiceLive.ClientEventInputAudioTurnStart","com.azure.ai.voicelive.models.ClientEventResponseCancel":"VoiceLive.ClientEventResponseCancel","com.azure.ai.voicelive.models.ClientEventResponseCreate":"VoiceLive.ClientEventResponseCreate","com.azure.ai.voicelive.models.ClientEventSessionAvatarConnect":"VoiceLive.ClientEventSessionAvatarConnect","com.azure.ai.voicelive.models.ClientEventSessionUpdate":"VoiceLive.ClientEventSessionUpdate","com.azure.ai.voicelive.models.ClientEventType":"VoiceLive.ClientEventType","com.azure.ai.voicelive.models.ContentPartType":"VoiceLive.ContentPartType","com.azure.ai.voicelive.models.ConversationRequestItem":"VoiceLive.ConversationRequestItem","com.azure.ai.voicelive.models.EouDetection":"VoiceLive.EouDetection","com.azure.ai.voicelive.models.EouDetectionModel":"VoiceLive.EouDetection.model.anonymous","com.azure.ai.voicelive.models.EouThresholdLevel":"VoiceLive.EouThresholdLevel","com.azure.ai.voicelive.models.FunctionCallItem":"VoiceLive.FunctionCallItem","com.azure.ai.voicelive.models.FunctionCallOutputItem":"VoiceLive.FunctionCallOutputItem","com.azure.ai.voicelive.models.IceServer":"VoiceLive.IceServer","com.azure.ai.voicelive.models.InputAudioContentPart":"VoiceLive.InputAudioContentPart","com.azure.ai.voicelive.models.InputAudioFormat":"VoiceLive.InputAudioFormat","com.azure.ai.voicelive.models.InputTextContentPart":"VoiceLive.InputTextContentPart","com.azure.ai.voicelive.models.InputTokenDetails":"VoiceLive.InputTokenDetails","com.azure.ai.voicelive.models.InteractionModality":"VoiceLive.Modality","com.azure.ai.voicelive.models.ItemParamStatus":"VoiceLive.ItemParamStatus","com.azure.ai.voicelive.models.ItemType":"VoiceLive.ItemType","com.azure.ai.voicelive.models.LogProbProperties":"VoiceLive.LogProbProperties","com.azure.ai.voicelive.models.MCPApprovalResponseRequestItem":"VoiceLive.MCPApprovalResponseRequestItem","com.azure.ai.voicelive.models.MCPApprovalType":"VoiceLive.MCPApprovalType","com.azure.ai.voicelive.models.MCPServer":"VoiceLive.MCPServer","com.azure.ai.voicelive.models.MCPTool":"VoiceLive.MCPTool","com.azure.ai.voicelive.models.MessageContentPart":"VoiceLive.MessageContentPart","com.azure.ai.voicelive.models.MessageItem":"VoiceLive.MessageItem","com.azure.ai.voicelive.models.OpenAIVoice":"VoiceLive.OpenAIVoice","com.azure.ai.voicelive.models.OpenAIVoiceName":"VoiceLive.OAIVoice","com.azure.ai.voicelive.models.OutputAudioFormat":"VoiceLive.OutputAudioFormat","com.azure.ai.voicelive.models.OutputTextContentPart":"VoiceLive.OutputTextContentPart","com.azure.ai.voicelive.models.OutputTokenDetails":"VoiceLive.OutputTokenDetails","com.azure.ai.voicelive.models.PersonalVoiceModels":"VoiceLive.PersonalVoiceModels","com.azure.ai.voicelive.models.PhotoAvatarBaseModes":"VoiceLive.PhotoAvatarBaseModes","com.azure.ai.voicelive.models.RequestAudioContentPart":"VoiceLive.RequestAudioContentPart","com.azure.ai.voicelive.models.RequestImageContentPart":"VoiceLive.RequestImageContentPart","com.azure.ai.voicelive.models.RequestImageContentPartDetail":"VoiceLive.RequestImageContentPartDetail","com.azure.ai.voicelive.models.RequestTextContentPart":"VoiceLive.RequestTextContentPart","com.azure.ai.voicelive.models.RespondingAgentOptions":"VoiceLive.AgentConfig","com.azure.ai.voicelive.models.ResponseAudioContentPart":"VoiceLive.ResponseAudioContentPart","com.azure.ai.voicelive.models.ResponseCancelledDetails":"VoiceLive.ResponseCancelledDetails","com.azure.ai.voicelive.models.ResponseCancelledDetailsReason":"VoiceLive.ResponseCancelledDetails.reason.anonymous","com.azure.ai.voicelive.models.ResponseCreateParams":"VoiceLive.ResponseCreateParams","com.azure.ai.voicelive.models.ResponseFailedDetails":"VoiceLive.ResponseFailedDetails","com.azure.ai.voicelive.models.ResponseFunctionCallItem":"VoiceLive.ResponseFunctionCallItem","com.azure.ai.voicelive.models.ResponseFunctionCallOutputItem":"VoiceLive.ResponseFunctionCallOutputItem","com.azure.ai.voicelive.models.ResponseIncompleteDetails":"VoiceLive.ResponseIncompleteDetails","com.azure.ai.voicelive.models.ResponseIncompleteDetailsReason":"VoiceLive.ResponseIncompleteDetails.reason.anonymous","com.azure.ai.voicelive.models.ResponseItemObject":null,"com.azure.ai.voicelive.models.ResponseMCPApprovalRequestItem":"VoiceLive.ResponseMCPApprovalRequestItem","com.azure.ai.voicelive.models.ResponseMCPApprovalResponseItem":"VoiceLive.ResponseMCPApprovalResponseItem","com.azure.ai.voicelive.models.ResponseMCPCallItem":"VoiceLive.ResponseMCPCallItem","com.azure.ai.voicelive.models.ResponseMCPListToolItem":"VoiceLive.ResponseMCPListToolItem","com.azure.ai.voicelive.models.ResponseMessageRole":"VoiceLive.MessageRole","com.azure.ai.voicelive.models.ResponseObject":null,"com.azure.ai.voicelive.models.ResponseStatusDetails":"VoiceLive.ResponseStatusDetails","com.azure.ai.voicelive.models.ResponseTextContentPart":"VoiceLive.ResponseTextContentPart","com.azure.ai.voicelive.models.ResponseTokenStatistics":"VoiceLive.TokenUsage","com.azure.ai.voicelive.models.ServerEventMcpListToolsCompleted":"VoiceLive.ServerEventMcpListToolsCompleted","com.azure.ai.voicelive.models.ServerEventMcpListToolsFailed":"VoiceLive.ServerEventMcpListToolsFailed","com.azure.ai.voicelive.models.ServerEventMcpListToolsInProgress":"VoiceLive.ServerEventMcpListToolsInProgress","com.azure.ai.voicelive.models.ServerEventResponseMcpCallArgumentsDelta":"VoiceLive.ServerEventResponseMcpCallArgumentsDelta","com.azure.ai.voicelive.models.ServerEventResponseMcpCallArgumentsDone":"VoiceLive.ServerEventResponseMcpCallArgumentsDone","com.azure.ai.voicelive.models.ServerEventResponseMcpCallCompleted":"VoiceLive.ServerEventResponseMcpCallCompleted","com.azure.ai.voicelive.models.ServerEventResponseMcpCallFailed":"VoiceLive.ServerEventResponseMcpCallFailed","com.azure.ai.voicelive.models.ServerEventResponseMcpCallInProgress":"VoiceLive.ServerEventResponseMcpCallInProgress","com.azure.ai.voicelive.models.ServerEventType":"VoiceLive.ServerEventType","com.azure.ai.voicelive.models.ServerVadTurnDetection":"VoiceLive.ServerVad","com.azure.ai.voicelive.models.SessionResponse":"VoiceLive.Response","com.azure.ai.voicelive.models.SessionResponseItem":"VoiceLive.ResponseItem","com.azure.ai.voicelive.models.SessionResponseItemStatus":"VoiceLive.ResponseItemStatus","com.azure.ai.voicelive.models.SessionResponseMessageItem":"VoiceLive.ResponseMessageItem","com.azure.ai.voicelive.models.SessionResponseStatus":"VoiceLive.ResponseStatus","com.azure.ai.voicelive.models.SessionUpdate":"VoiceLive.ServerEvent","com.azure.ai.voicelive.models.SessionUpdateAvatarConnecting":"VoiceLive.ServerEventSessionAvatarConnecting","com.azure.ai.voicelive.models.SessionUpdateConversationItemCreated":"VoiceLive.ServerEventConversationItemCreated","com.azure.ai.voicelive.models.SessionUpdateConversationItemDeleted":"VoiceLive.ServerEventConversationItemDeleted","com.azure.ai.voicelive.models.SessionUpdateConversationItemInputAudioTranscriptionCompleted":"VoiceLive.ServerEventConversationItemInputAudioTranscriptionCompleted","com.azure.ai.voicelive.models.SessionUpdateConversationItemInputAudioTranscriptionDelta":"VoiceLive.ServerEventConversationItemInputAudioTranscriptionDelta","com.azure.ai.voicelive.models.SessionUpdateConversationItemInputAudioTranscriptionFailed":"VoiceLive.ServerEventConversationItemInputAudioTranscriptionFailed","com.azure.ai.voicelive.models.SessionUpdateConversationItemRetrieved":"VoiceLive.ServerEventConversationItemRetrieved","com.azure.ai.voicelive.models.SessionUpdateConversationItemTruncated":"VoiceLive.ServerEventConversationItemTruncated","com.azure.ai.voicelive.models.SessionUpdateError":"VoiceLive.ServerEventError","com.azure.ai.voicelive.models.SessionUpdateErrorDetails":"VoiceLive.ServerEventErrorDetails","com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferCleared":"VoiceLive.ServerEventInputAudioBufferCleared","com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferCommitted":"VoiceLive.ServerEventInputAudioBufferCommitted","com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferSpeechStarted":"VoiceLive.ServerEventInputAudioBufferSpeechStarted","com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferSpeechStopped":"VoiceLive.ServerEventInputAudioBufferSpeechStopped","com.azure.ai.voicelive.models.SessionUpdateResponseAnimationBlendshapeDelta":"VoiceLive.ServerEventResponseAnimationBlendshapeDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAnimationBlendshapeDone":"VoiceLive.ServerEventResponseAnimationBlendshapeDone","com.azure.ai.voicelive.models.SessionUpdateResponseAnimationVisemeDelta":"VoiceLive.ServerEventResponseAnimationVisemeDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAnimationVisemeDone":"VoiceLive.ServerEventResponseAnimationVisemeDone","com.azure.ai.voicelive.models.SessionUpdateResponseAudioDelta":"VoiceLive.ServerEventResponseAudioDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAudioDone":"VoiceLive.ServerEventResponseAudioDone","com.azure.ai.voicelive.models.SessionUpdateResponseAudioTimestampDelta":"VoiceLive.ServerEventResponseAudioTimestampDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAudioTimestampDone":"VoiceLive.ServerEventResponseAudioTimestampDone","com.azure.ai.voicelive.models.SessionUpdateResponseAudioTranscriptDelta":"VoiceLive.ServerEventResponseAudioTranscriptDelta","com.azure.ai.voicelive.models.SessionUpdateResponseAudioTranscriptDone":"VoiceLive.ServerEventResponseAudioTranscriptDone","com.azure.ai.voicelive.models.SessionUpdateResponseContentPartAdded":"VoiceLive.ServerEventResponseContentPartAdded","com.azure.ai.voicelive.models.SessionUpdateResponseContentPartDone":"VoiceLive.ServerEventResponseContentPartDone","com.azure.ai.voicelive.models.SessionUpdateResponseCreated":"VoiceLive.ServerEventResponseCreated","com.azure.ai.voicelive.models.SessionUpdateResponseDone":"VoiceLive.ServerEventResponseDone","com.azure.ai.voicelive.models.SessionUpdateResponseFunctionCallArgumentsDelta":"VoiceLive.ServerEventResponseFunctionCallArgumentsDelta","com.azure.ai.voicelive.models.SessionUpdateResponseFunctionCallArgumentsDone":"VoiceLive.ServerEventResponseFunctionCallArgumentsDone","com.azure.ai.voicelive.models.SessionUpdateResponseOutputItemAdded":"VoiceLive.ServerEventResponseOutputItemAdded","com.azure.ai.voicelive.models.SessionUpdateResponseOutputItemDone":"VoiceLive.ServerEventResponseOutputItemDone","com.azure.ai.voicelive.models.SessionUpdateResponseTextDelta":"VoiceLive.ServerEventResponseTextDelta","com.azure.ai.voicelive.models.SessionUpdateResponseTextDone":"VoiceLive.ServerEventResponseTextDone","com.azure.ai.voicelive.models.SessionUpdateSessionCreated":"VoiceLive.ServerEventSessionCreated","com.azure.ai.voicelive.models.SessionUpdateSessionUpdated":"VoiceLive.ServerEventSessionUpdated","com.azure.ai.voicelive.models.SystemMessageItem":"VoiceLive.SystemMessageItem","com.azure.ai.voicelive.models.ToolChoiceFunctionSelection":"VoiceLive.ToolChoiceFunctionObject","com.azure.ai.voicelive.models.ToolChoiceLiteral":"VoiceLive.ToolChoiceLiteral","com.azure.ai.voicelive.models.ToolChoiceSelection":"VoiceLive.ToolChoiceObject","com.azure.ai.voicelive.models.ToolType":"VoiceLive.ToolType","com.azure.ai.voicelive.models.TurnDetection":"VoiceLive.TurnDetection","com.azure.ai.voicelive.models.TurnDetectionType":"VoiceLive.TurnDetectionType","com.azure.ai.voicelive.models.UserMessageItem":"VoiceLive.UserMessageItem","com.azure.ai.voicelive.models.VideoBackground":"VoiceLive.Background","com.azure.ai.voicelive.models.VideoCrop":"VoiceLive.VideoCrop","com.azure.ai.voicelive.models.VideoParams":"VoiceLive.VideoParams","com.azure.ai.voicelive.models.VideoParamsCodec":null,"com.azure.ai.voicelive.models.VideoResolution":"VoiceLive.VideoResolution","com.azure.ai.voicelive.models.VoiceLiveContentPart":"VoiceLive.ContentPart","com.azure.ai.voicelive.models.VoiceLiveErrorDetails":"VoiceLive.VoiceLiveErrorDetails","com.azure.ai.voicelive.models.VoiceLiveFunctionDefinition":"VoiceLive.FunctionTool","com.azure.ai.voicelive.models.VoiceLiveSessionOptions":"VoiceLive.RequestSession","com.azure.ai.voicelive.models.VoiceLiveSessionResponse":"VoiceLive.ResponseSession","com.azure.ai.voicelive.models.VoiceLiveToolDefinition":"VoiceLive.Tool"},"generatedFiles":["src/main/java/com/azure/ai/voicelive/implementation/package-info.java","src/main/java/com/azure/ai/voicelive/models/AnimationOptions.java","src/main/java/com/azure/ai/voicelive/models/AnimationOutputType.java","src/main/java/com/azure/ai/voicelive/models/AssistantMessageItem.java","src/main/java/com/azure/ai/voicelive/models/AudioEchoCancellation.java","src/main/java/com/azure/ai/voicelive/models/AudioInputTranscriptionOptions.java","src/main/java/com/azure/ai/voicelive/models/AudioInputTranscriptionOptionsModel.java","src/main/java/com/azure/ai/voicelive/models/AudioNoiseReduction.java","src/main/java/com/azure/ai/voicelive/models/AudioNoiseReductionType.java","src/main/java/com/azure/ai/voicelive/models/AudioTimestampType.java","src/main/java/com/azure/ai/voicelive/models/AvatarConfigTypes.java","src/main/java/com/azure/ai/voicelive/models/AvatarConfiguration.java","src/main/java/com/azure/ai/voicelive/models/AvatarOutputProtocol.java","src/main/java/com/azure/ai/voicelive/models/AzureCustomVoice.java","src/main/java/com/azure/ai/voicelive/models/AzurePersonalVoice.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticEouDetection.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticEouDetectionEn.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticEouDetectionMultilingual.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetection.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetectionEn.java","src/main/java/com/azure/ai/voicelive/models/AzureSemanticVadTurnDetectionMultilingual.java","src/main/java/com/azure/ai/voicelive/models/AzureStandardVoice.java","src/main/java/com/azure/ai/voicelive/models/AzureVoice.java","src/main/java/com/azure/ai/voicelive/models/AzureVoiceType.java","src/main/java/com/azure/ai/voicelive/models/CachedTokenDetails.java","src/main/java/com/azure/ai/voicelive/models/ClientEvent.java","src/main/java/com/azure/ai/voicelive/models/ClientEventConversationItemCreate.java","src/main/java/com/azure/ai/voicelive/models/ClientEventConversationItemDelete.java","src/main/java/com/azure/ai/voicelive/models/ClientEventConversationItemRetrieve.java","src/main/java/com/azure/ai/voicelive/models/ClientEventConversationItemTruncate.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioBufferAppend.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioBufferClear.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioBufferCommit.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioClear.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioTurnAppend.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioTurnCancel.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioTurnEnd.java","src/main/java/com/azure/ai/voicelive/models/ClientEventInputAudioTurnStart.java","src/main/java/com/azure/ai/voicelive/models/ClientEventResponseCancel.java","src/main/java/com/azure/ai/voicelive/models/ClientEventResponseCreate.java","src/main/java/com/azure/ai/voicelive/models/ClientEventSessionAvatarConnect.java","src/main/java/com/azure/ai/voicelive/models/ClientEventSessionUpdate.java","src/main/java/com/azure/ai/voicelive/models/ClientEventType.java","src/main/java/com/azure/ai/voicelive/models/ContentPartType.java","src/main/java/com/azure/ai/voicelive/models/ConversationRequestItem.java","src/main/java/com/azure/ai/voicelive/models/EouDetection.java","src/main/java/com/azure/ai/voicelive/models/EouDetectionModel.java","src/main/java/com/azure/ai/voicelive/models/EouThresholdLevel.java","src/main/java/com/azure/ai/voicelive/models/FunctionCallItem.java","src/main/java/com/azure/ai/voicelive/models/FunctionCallOutputItem.java","src/main/java/com/azure/ai/voicelive/models/IceServer.java","src/main/java/com/azure/ai/voicelive/models/InputAudioContentPart.java","src/main/java/com/azure/ai/voicelive/models/InputAudioFormat.java","src/main/java/com/azure/ai/voicelive/models/InputTextContentPart.java","src/main/java/com/azure/ai/voicelive/models/InputTokenDetails.java","src/main/java/com/azure/ai/voicelive/models/InteractionModality.java","src/main/java/com/azure/ai/voicelive/models/ItemParamStatus.java","src/main/java/com/azure/ai/voicelive/models/ItemType.java","src/main/java/com/azure/ai/voicelive/models/LogProbProperties.java","src/main/java/com/azure/ai/voicelive/models/MCPApprovalResponseRequestItem.java","src/main/java/com/azure/ai/voicelive/models/MCPApprovalType.java","src/main/java/com/azure/ai/voicelive/models/MCPServer.java","src/main/java/com/azure/ai/voicelive/models/MCPTool.java","src/main/java/com/azure/ai/voicelive/models/MessageContentPart.java","src/main/java/com/azure/ai/voicelive/models/MessageItem.java","src/main/java/com/azure/ai/voicelive/models/OpenAIVoice.java","src/main/java/com/azure/ai/voicelive/models/OpenAIVoiceName.java","src/main/java/com/azure/ai/voicelive/models/OutputAudioFormat.java","src/main/java/com/azure/ai/voicelive/models/OutputTextContentPart.java","src/main/java/com/azure/ai/voicelive/models/OutputTokenDetails.java","src/main/java/com/azure/ai/voicelive/models/PersonalVoiceModels.java","src/main/java/com/azure/ai/voicelive/models/PhotoAvatarBaseModes.java","src/main/java/com/azure/ai/voicelive/models/RequestAudioContentPart.java","src/main/java/com/azure/ai/voicelive/models/RequestImageContentPart.java","src/main/java/com/azure/ai/voicelive/models/RequestImageContentPartDetail.java","src/main/java/com/azure/ai/voicelive/models/RequestTextContentPart.java","src/main/java/com/azure/ai/voicelive/models/RespondingAgentOptions.java","src/main/java/com/azure/ai/voicelive/models/ResponseAudioContentPart.java","src/main/java/com/azure/ai/voicelive/models/ResponseCancelledDetails.java","src/main/java/com/azure/ai/voicelive/models/ResponseCancelledDetailsReason.java","src/main/java/com/azure/ai/voicelive/models/ResponseCreateParams.java","src/main/java/com/azure/ai/voicelive/models/ResponseFailedDetails.java","src/main/java/com/azure/ai/voicelive/models/ResponseFunctionCallItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseFunctionCallOutputItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseIncompleteDetails.java","src/main/java/com/azure/ai/voicelive/models/ResponseIncompleteDetailsReason.java","src/main/java/com/azure/ai/voicelive/models/ResponseItemObject.java","src/main/java/com/azure/ai/voicelive/models/ResponseMCPApprovalRequestItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseMCPApprovalResponseItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseMCPCallItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseMCPListToolItem.java","src/main/java/com/azure/ai/voicelive/models/ResponseMessageRole.java","src/main/java/com/azure/ai/voicelive/models/ResponseObject.java","src/main/java/com/azure/ai/voicelive/models/ResponseStatusDetails.java","src/main/java/com/azure/ai/voicelive/models/ResponseTextContentPart.java","src/main/java/com/azure/ai/voicelive/models/ResponseTokenStatistics.java","src/main/java/com/azure/ai/voicelive/models/ServerEventMcpListToolsCompleted.java","src/main/java/com/azure/ai/voicelive/models/ServerEventMcpListToolsFailed.java","src/main/java/com/azure/ai/voicelive/models/ServerEventMcpListToolsInProgress.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallArgumentsDelta.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallArgumentsDone.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallCompleted.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallFailed.java","src/main/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallInProgress.java","src/main/java/com/azure/ai/voicelive/models/ServerEventType.java","src/main/java/com/azure/ai/voicelive/models/ServerVadTurnDetection.java","src/main/java/com/azure/ai/voicelive/models/SessionResponse.java","src/main/java/com/azure/ai/voicelive/models/SessionResponseItem.java","src/main/java/com/azure/ai/voicelive/models/SessionResponseItemStatus.java","src/main/java/com/azure/ai/voicelive/models/SessionResponseMessageItem.java","src/main/java/com/azure/ai/voicelive/models/SessionResponseStatus.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdate.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateAvatarConnecting.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemCreated.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemDeleted.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemInputAudioTranscriptionCompleted.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemInputAudioTranscriptionDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemInputAudioTranscriptionFailed.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemRetrieved.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateConversationItemTruncated.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateError.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateErrorDetails.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateInputAudioBufferCleared.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateInputAudioBufferCommitted.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateInputAudioBufferSpeechStarted.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateInputAudioBufferSpeechStopped.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAnimationBlendshapeDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAnimationBlendshapeDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAnimationVisemeDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAnimationVisemeDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioTimestampDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioTimestampDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioTranscriptDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseAudioTranscriptDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseContentPartAdded.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseContentPartDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseCreated.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseFunctionCallArgumentsDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseFunctionCallArgumentsDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseOutputItemAdded.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseOutputItemDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseTextDelta.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateResponseTextDone.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateSessionCreated.java","src/main/java/com/azure/ai/voicelive/models/SessionUpdateSessionUpdated.java","src/main/java/com/azure/ai/voicelive/models/SystemMessageItem.java","src/main/java/com/azure/ai/voicelive/models/ToolChoiceFunctionSelection.java","src/main/java/com/azure/ai/voicelive/models/ToolChoiceLiteral.java","src/main/java/com/azure/ai/voicelive/models/ToolChoiceSelection.java","src/main/java/com/azure/ai/voicelive/models/ToolType.java","src/main/java/com/azure/ai/voicelive/models/TurnDetection.java","src/main/java/com/azure/ai/voicelive/models/TurnDetectionType.java","src/main/java/com/azure/ai/voicelive/models/UserMessageItem.java","src/main/java/com/azure/ai/voicelive/models/VideoBackground.java","src/main/java/com/azure/ai/voicelive/models/VideoCrop.java","src/main/java/com/azure/ai/voicelive/models/VideoParams.java","src/main/java/com/azure/ai/voicelive/models/VideoParamsCodec.java","src/main/java/com/azure/ai/voicelive/models/VideoResolution.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveContentPart.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveErrorDetails.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveFunctionDefinition.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveSessionOptions.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveSessionResponse.java","src/main/java/com/azure/ai/voicelive/models/VoiceLiveToolDefinition.java","src/main/java/com/azure/ai/voicelive/models/package-info.java","src/main/java/com/azure/ai/voicelive/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/AvatarConfigTypesTest.java b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/AvatarConfigTypesTest.java new file mode 100644 index 000000000000..c6423cf9642e --- /dev/null +++ b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/AvatarConfigTypesTest.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.voicelive.models; + +import org.junit.jupiter.api.Test; + +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Unit tests for {@link AvatarConfigTypes}. + */ +class AvatarConfigTypesTest { + + @Test + void testVideoAvatarConstant() { + // Assert + assertNotNull(AvatarConfigTypes.VIDEO_AVATAR); + assertEquals("video-avatar", AvatarConfigTypes.VIDEO_AVATAR.toString()); + } + + @Test + void testPhotoAvatarConstant() { + // Assert + assertNotNull(AvatarConfigTypes.PHOTO_AVATAR); + assertEquals("photo-avatar", AvatarConfigTypes.PHOTO_AVATAR.toString()); + } + + @Test + void testFromString() { + // Act + AvatarConfigTypes videoAvatar = AvatarConfigTypes.fromString("video-avatar"); + AvatarConfigTypes photoAvatar = AvatarConfigTypes.fromString("photo-avatar"); + + // Assert + assertEquals(AvatarConfigTypes.VIDEO_AVATAR, videoAvatar); + assertEquals(AvatarConfigTypes.PHOTO_AVATAR, photoAvatar); + } + + @Test + void testValues() { + // Act + Collection values = AvatarConfigTypes.values(); + + // Assert + assertNotNull(values); + assertTrue(values.size() >= 2); + assertTrue(values.contains(AvatarConfigTypes.VIDEO_AVATAR)); + assertTrue(values.contains(AvatarConfigTypes.PHOTO_AVATAR)); + } + + @Test + void testEquality() { + // Act + AvatarConfigTypes type1 = AvatarConfigTypes.fromString("video-avatar"); + AvatarConfigTypes type2 = AvatarConfigTypes.VIDEO_AVATAR; + + // Assert + assertEquals(type1, type2); + assertEquals(type1.hashCode(), type2.hashCode()); + } + + @Test + void testCustomValue() { + // Act + AvatarConfigTypes custom = AvatarConfigTypes.fromString("custom-avatar"); + + // Assert + assertNotNull(custom); + assertEquals("custom-avatar", custom.toString()); + } +} diff --git a/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/AvatarOutputProtocolTest.java b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/AvatarOutputProtocolTest.java new file mode 100644 index 000000000000..7f03b84e825c --- /dev/null +++ b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/AvatarOutputProtocolTest.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.voicelive.models; + +import org.junit.jupiter.api.Test; + +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Unit tests for {@link AvatarOutputProtocol}. + */ +class AvatarOutputProtocolTest { + + @Test + void testWebRTCConstant() { + // Assert + assertNotNull(AvatarOutputProtocol.WEBRTC); + assertEquals("webrtc", AvatarOutputProtocol.WEBRTC.toString()); + } + + @Test + void testWebSocketConstant() { + // Assert + assertNotNull(AvatarOutputProtocol.WEBSOCKET); + assertEquals("websocket", AvatarOutputProtocol.WEBSOCKET.toString()); + } + + @Test + void testFromString() { + // Act + AvatarOutputProtocol webrtc = AvatarOutputProtocol.fromString("webrtc"); + AvatarOutputProtocol websocket = AvatarOutputProtocol.fromString("websocket"); + + // Assert + assertEquals(AvatarOutputProtocol.WEBRTC, webrtc); + assertEquals(AvatarOutputProtocol.WEBSOCKET, websocket); + } + + @Test + void testValues() { + // Act + Collection values = AvatarOutputProtocol.values(); + + // Assert + assertNotNull(values); + assertTrue(values.size() >= 2); + assertTrue(values.contains(AvatarOutputProtocol.WEBRTC)); + assertTrue(values.contains(AvatarOutputProtocol.WEBSOCKET)); + } + + @Test + void testEquality() { + // Act + AvatarOutputProtocol protocol1 = AvatarOutputProtocol.fromString("webrtc"); + AvatarOutputProtocol protocol2 = AvatarOutputProtocol.WEBRTC; + + // Assert + assertEquals(protocol1, protocol2); + assertEquals(protocol1.hashCode(), protocol2.hashCode()); + } + + @Test + void testCustomValue() { + // Act + AvatarOutputProtocol custom = AvatarOutputProtocol.fromString("custom-protocol"); + + // Assert + assertNotNull(custom); + assertEquals("custom-protocol", custom.toString()); + } +} diff --git a/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/OpenAIVoiceTest.java b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/OpenAIVoiceTest.java index 5c7aaa583d53..2d83ba4ab829 100644 --- a/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/OpenAIVoiceTest.java +++ b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/OpenAIVoiceTest.java @@ -46,10 +46,14 @@ void testGetName() { OpenAIVoice alloyVoice = new OpenAIVoice(OpenAIVoiceName.ALLOY); OpenAIVoice echoVoice = new OpenAIVoice(OpenAIVoiceName.ECHO); OpenAIVoice shimmerVoice = new OpenAIVoice(OpenAIVoiceName.SHIMMER); + OpenAIVoice marinVoice = new OpenAIVoice(OpenAIVoiceName.MARIN); + OpenAIVoice cedarVoice = new OpenAIVoice(OpenAIVoiceName.CEDAR); assertEquals(OpenAIVoiceName.ALLOY, alloyVoice.getName()); assertEquals(OpenAIVoiceName.ECHO, echoVoice.getName()); assertEquals(OpenAIVoiceName.SHIMMER, shimmerVoice.getName()); + assertEquals(OpenAIVoiceName.MARIN, marinVoice.getName()); + assertEquals(OpenAIVoiceName.CEDAR, cedarVoice.getName()); } @Test diff --git a/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/PhotoAvatarBaseModesTest.java b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/PhotoAvatarBaseModesTest.java new file mode 100644 index 000000000000..b99dfdbfc30b --- /dev/null +++ b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/PhotoAvatarBaseModesTest.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.voicelive.models; + +import org.junit.jupiter.api.Test; + +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Unit tests for {@link PhotoAvatarBaseModes}. + */ +class PhotoAvatarBaseModesTest { + + @Test + void testVasa1Constant() { + // Assert + assertNotNull(PhotoAvatarBaseModes.VASA_1); + assertEquals("vasa-1", PhotoAvatarBaseModes.VASA_1.toString()); + } + + @Test + void testFromString() { + // Act + PhotoAvatarBaseModes vasa1 = PhotoAvatarBaseModes.fromString("vasa-1"); + + // Assert + assertEquals(PhotoAvatarBaseModes.VASA_1, vasa1); + } + + @Test + void testValues() { + // Act + Collection values = PhotoAvatarBaseModes.values(); + + // Assert + assertNotNull(values); + assertTrue(values.size() >= 1); + assertTrue(values.contains(PhotoAvatarBaseModes.VASA_1)); + } + + @Test + void testEquality() { + // Act + PhotoAvatarBaseModes mode1 = PhotoAvatarBaseModes.fromString("vasa-1"); + PhotoAvatarBaseModes mode2 = PhotoAvatarBaseModes.VASA_1; + + // Assert + assertEquals(mode1, mode2); + assertEquals(mode1.hashCode(), mode2.hashCode()); + } + + @Test + void testCustomValue() { + // Act + PhotoAvatarBaseModes custom = PhotoAvatarBaseModes.fromString("vasa-2"); + + // Assert + assertNotNull(custom); + assertEquals("vasa-2", custom.toString()); + } +} diff --git a/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/RequestImageContentPartDetailTest.java b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/RequestImageContentPartDetailTest.java new file mode 100644 index 000000000000..37642b9782af --- /dev/null +++ b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/RequestImageContentPartDetailTest.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.voicelive.models; + +import org.junit.jupiter.api.Test; + +import java.util.Collection; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Unit tests for {@link RequestImageContentPartDetail}. + */ +class RequestImageContentPartDetailTest { + + @Test + void testAutoConstant() { + // Assert + assertNotNull(RequestImageContentPartDetail.AUTO); + assertEquals("auto", RequestImageContentPartDetail.AUTO.toString()); + } + + @Test + void testLowConstant() { + // Assert + assertNotNull(RequestImageContentPartDetail.LOW); + assertEquals("low", RequestImageContentPartDetail.LOW.toString()); + } + + @Test + void testHighConstant() { + // Assert + assertNotNull(RequestImageContentPartDetail.HIGH); + assertEquals("high", RequestImageContentPartDetail.HIGH.toString()); + } + + @Test + void testFromString() { + // Act + RequestImageContentPartDetail auto = RequestImageContentPartDetail.fromString("auto"); + RequestImageContentPartDetail low = RequestImageContentPartDetail.fromString("low"); + RequestImageContentPartDetail high = RequestImageContentPartDetail.fromString("high"); + + // Assert + assertEquals(RequestImageContentPartDetail.AUTO, auto); + assertEquals(RequestImageContentPartDetail.LOW, low); + assertEquals(RequestImageContentPartDetail.HIGH, high); + } + + @Test + void testValues() { + // Act + Collection values = RequestImageContentPartDetail.values(); + + // Assert + assertNotNull(values); + assertTrue(values.size() >= 3); + assertTrue(values.contains(RequestImageContentPartDetail.AUTO)); + assertTrue(values.contains(RequestImageContentPartDetail.LOW)); + assertTrue(values.contains(RequestImageContentPartDetail.HIGH)); + } + + @Test + void testEquality() { + // Act + RequestImageContentPartDetail detail1 = RequestImageContentPartDetail.fromString("high"); + RequestImageContentPartDetail detail2 = RequestImageContentPartDetail.HIGH; + + // Assert + assertEquals(detail1, detail2); + assertEquals(detail1.hashCode(), detail2.hashCode()); + } + + @Test + void testCustomValue() { + // Act + RequestImageContentPartDetail custom = RequestImageContentPartDetail.fromString("custom-detail"); + + // Assert + assertNotNull(custom); + assertEquals("custom-detail", custom.toString()); + } + + @Test + void testCaseSensitivity() { + // Act + RequestImageContentPartDetail lowercase = RequestImageContentPartDetail.fromString("high"); + RequestImageContentPartDetail uppercase = RequestImageContentPartDetail.fromString("HIGH"); + + // Assert + // ExpandableStringEnum is case-sensitive + assertEquals("high", lowercase.toString()); + assertEquals("HIGH", uppercase.toString()); + } +} diff --git a/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/RequestImageContentPartTest.java b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/RequestImageContentPartTest.java new file mode 100644 index 000000000000..11757ce01d11 --- /dev/null +++ b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/RequestImageContentPartTest.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.voicelive.models; + +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; + +/** + * Unit tests for {@link RequestImageContentPart}. + */ +class RequestImageContentPartTest { + + @Test + void testConstructor() { + // Act + RequestImageContentPart imagePart = new RequestImageContentPart(); + + // Assert + assertNotNull(imagePart); + assertEquals(ContentPartType.INPUT_IMAGE, imagePart.getType()); + } + + @Test + void testSetAndGetUrl() { + // Arrange + RequestImageContentPart imagePart = new RequestImageContentPart(); + String imageUrl = "https://example.com/image.jpg"; + + // Act + RequestImageContentPart result = imagePart.setUrl(imageUrl); + + // Assert + assertEquals(imageUrl, imagePart.getUrl()); + assertEquals(imagePart, result); // Fluent API + } + + @Test + void testSetAndGetDetail() { + // Arrange + RequestImageContentPart imagePart = new RequestImageContentPart(); + + // Act + RequestImageContentPart result = imagePart.setDetail(RequestImageContentPartDetail.HIGH); + + // Assert + assertEquals(RequestImageContentPartDetail.HIGH, imagePart.getDetail()); + assertEquals(imagePart, result); // Fluent API + } + + @Test + void testFromJsonWithUrl() { + // Arrange + String json = "{\"type\":\"input_image\",\"url\":\"https://example.com/test.png\"}"; + BinaryData data = BinaryData.fromString(json); + + // Act + RequestImageContentPart imagePart = data.toObject(RequestImageContentPart.class); + + // Assert + assertNotNull(imagePart); + assertEquals(ContentPartType.INPUT_IMAGE, imagePart.getType()); + assertEquals("https://example.com/test.png", imagePart.getUrl()); + assertNull(imagePart.getDetail()); + } + + @Test + void testFromJsonWithAllFields() { + // Arrange + String json = "{\"type\":\"input_image\",\"url\":\"https://example.com/image.jpg\",\"detail\":\"high\"}"; + BinaryData data = BinaryData.fromString(json); + + // Act + RequestImageContentPart imagePart = data.toObject(RequestImageContentPart.class); + + // Assert + assertNotNull(imagePart); + assertEquals(ContentPartType.INPUT_IMAGE, imagePart.getType()); + assertEquals("https://example.com/image.jpg", imagePart.getUrl()); + assertEquals(RequestImageContentPartDetail.HIGH, imagePart.getDetail()); + } + + @Test + void testJsonRoundTrip() { + // Arrange + RequestImageContentPart original = new RequestImageContentPart().setUrl("https://example.com/photo.png") + .setDetail(RequestImageContentPartDetail.AUTO); + + // Act + BinaryData data = BinaryData.fromObject(original); + RequestImageContentPart deserialized = data.toObject(RequestImageContentPart.class); + + // Assert + assertNotNull(deserialized); + assertEquals(original.getType(), deserialized.getType()); + assertEquals(original.getUrl(), deserialized.getUrl()); + assertEquals(original.getDetail(), deserialized.getDetail()); + } + + @Test + void testWithLowDetail() { + // Arrange + String json = "{\"type\":\"input_image\",\"url\":\"https://example.com/low-res.jpg\",\"detail\":\"low\"}"; + BinaryData data = BinaryData.fromString(json); + + // Act + RequestImageContentPart imagePart = data.toObject(RequestImageContentPart.class); + + // Assert + assertEquals(RequestImageContentPartDetail.LOW, imagePart.getDetail()); + } + + @Test + void testWithAutoDetail() { + // Arrange + String json = "{\"type\":\"input_image\",\"url\":\"https://example.com/auto.jpg\",\"detail\":\"auto\"}"; + BinaryData data = BinaryData.fromString(json); + + // Act + RequestImageContentPart imagePart = data.toObject(RequestImageContentPart.class); + + // Assert + assertEquals(RequestImageContentPartDetail.AUTO, imagePart.getDetail()); + } + + @Test + void testFluentApi() { + // Act + RequestImageContentPart imagePart = new RequestImageContentPart().setUrl("https://example.com/fluent.png") + .setDetail(RequestImageContentPartDetail.HIGH); + + // Assert + assertNotNull(imagePart); + assertEquals("https://example.com/fluent.png", imagePart.getUrl()); + assertEquals(RequestImageContentPartDetail.HIGH, imagePart.getDetail()); + } +} diff --git a/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallLifecycleTest.java b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallLifecycleTest.java new file mode 100644 index 000000000000..5031598ddbfb --- /dev/null +++ b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/models/ServerEventResponseMcpCallLifecycleTest.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.voicelive.models; + +import com.azure.core.util.BinaryData; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +/** + * Unit tests for MCP call lifecycle events: + * {@link ServerEventResponseMcpCallInProgress}, + * {@link ServerEventResponseMcpCallCompleted}, + * {@link ServerEventResponseMcpCallFailed}. + */ +class ServerEventResponseMcpCallLifecycleTest { + + @Test + void testServerEventResponseMcpCallInProgress() { + // Arrange + String json + = "{\"type\":\"response.mcp_call.in_progress\",\"event_id\":\"event123\",\"item_id\":\"item456\",\"output_index\":0}"; + BinaryData data = BinaryData.fromString(json); + + // Act + ServerEventResponseMcpCallInProgress event = data.toObject(ServerEventResponseMcpCallInProgress.class); + + // Assert + assertNotNull(event); + assertEquals(ServerEventType.RESPONSE_MCP_CALL_IN_PROGRESS, event.getType()); + assertEquals("event123", event.getEventId()); + assertEquals("item456", event.getItemId()); + assertEquals(0, event.getOutputIndex()); + } + + @Test + void testServerEventResponseMcpCallCompleted() { + // Arrange + String json + = "{\"type\":\"response.mcp_call.completed\",\"event_id\":\"event789\",\"item_id\":\"item012\",\"output_index\":1}"; + BinaryData data = BinaryData.fromString(json); + + // Act + ServerEventResponseMcpCallCompleted event = data.toObject(ServerEventResponseMcpCallCompleted.class); + + // Assert + assertNotNull(event); + assertEquals(ServerEventType.RESPONSE_MCP_CALL_COMPLETED, event.getType()); + assertEquals("event789", event.getEventId()); + assertEquals("item012", event.getItemId()); + assertEquals(1, event.getOutputIndex()); + } + + @Test + void testServerEventResponseMcpCallFailed() { + // Arrange + String json + = "{\"type\":\"response.mcp_call.failed\",\"event_id\":\"event345\",\"item_id\":\"item678\",\"output_index\":2}"; + BinaryData data = BinaryData.fromString(json); + + // Act + ServerEventResponseMcpCallFailed event = data.toObject(ServerEventResponseMcpCallFailed.class); + + // Assert + assertNotNull(event); + assertEquals(ServerEventType.RESPONSE_MCP_CALL_FAILED, event.getType()); + assertEquals("event345", event.getEventId()); + assertEquals("item678", event.getItemId()); + assertEquals(2, event.getOutputIndex()); + } + + @Test + void testInProgressJsonRoundTrip() { + // Arrange + String json + = "{\"type\":\"response.mcp_call.in_progress\",\"event_id\":\"evt1\",\"item_id\":\"itm1\",\"output_index\":0}"; + BinaryData originalData = BinaryData.fromString(json); + ServerEventResponseMcpCallInProgress event = originalData.toObject(ServerEventResponseMcpCallInProgress.class); + + // Act + BinaryData serialized = BinaryData.fromObject(event); + ServerEventResponseMcpCallInProgress deserialized + = serialized.toObject(ServerEventResponseMcpCallInProgress.class); + + // Assert + assertEquals(event.getType(), deserialized.getType()); + assertEquals(event.getEventId(), deserialized.getEventId()); + assertEquals(event.getItemId(), deserialized.getItemId()); + assertEquals(event.getOutputIndex(), deserialized.getOutputIndex()); + } + + @Test + void testCompletedJsonRoundTrip() { + // Arrange + String json + = "{\"type\":\"response.mcp_call.completed\",\"event_id\":\"evt2\",\"item_id\":\"itm2\",\"output_index\":3}"; + BinaryData originalData = BinaryData.fromString(json); + ServerEventResponseMcpCallCompleted event = originalData.toObject(ServerEventResponseMcpCallCompleted.class); + + // Act + BinaryData serialized = BinaryData.fromObject(event); + ServerEventResponseMcpCallCompleted deserialized + = serialized.toObject(ServerEventResponseMcpCallCompleted.class); + + // Assert + assertEquals(event.getType(), deserialized.getType()); + assertEquals(event.getEventId(), deserialized.getEventId()); + assertEquals(event.getItemId(), deserialized.getItemId()); + assertEquals(event.getOutputIndex(), deserialized.getOutputIndex()); + } + + @Test + void testFailedJsonRoundTrip() { + // Arrange + String json + = "{\"type\":\"response.mcp_call.failed\",\"event_id\":\"evt3\",\"item_id\":\"itm3\",\"output_index\":5}"; + BinaryData originalData = BinaryData.fromString(json); + ServerEventResponseMcpCallFailed event = originalData.toObject(ServerEventResponseMcpCallFailed.class); + + // Act + BinaryData serialized = BinaryData.fromObject(event); + ServerEventResponseMcpCallFailed deserialized = serialized.toObject(ServerEventResponseMcpCallFailed.class); + + // Assert + assertEquals(event.getType(), deserialized.getType()); + assertEquals(event.getEventId(), deserialized.getEventId()); + assertEquals(event.getItemId(), deserialized.getItemId()); + assertEquals(event.getOutputIndex(), deserialized.getOutputIndex()); + } + + @Test + void testMultipleOutputIndices() { + // Test with various output indices + for (int i = 0; i < 10; i++) { + String json = String.format( + "{\"type\":\"response.mcp_call.in_progress\",\"event_id\":\"evt%d\",\"item_id\":\"itm%d\",\"output_index\":%d}", + i, i, i); + BinaryData data = BinaryData.fromString(json); + ServerEventResponseMcpCallInProgress event = data.toObject(ServerEventResponseMcpCallInProgress.class); + + assertEquals(i, event.getOutputIndex()); + } + } +} diff --git a/sdk/ai/azure-ai-voicelive/tsp-location.yaml b/sdk/ai/azure-ai-voicelive/tsp-location.yaml index 38e3fcaebb6d..31a8a277dd97 100644 --- a/sdk/ai/azure-ai-voicelive/tsp-location.yaml +++ b/sdk/ai/azure-ai-voicelive/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/ai/data-plane/VoiceLive -commit: 883a23fc948acf69cbe61c160a35c850196cad9b +commit: a8b0baa97b3c15c2dca2abd87951734f35a04e87 repo: Azure/azure-rest-api-specs additionalDirectories: From 3efc4a555c3711a9da6161d393c4148f764d5f8c Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 21 Nov 2025 11:31:09 -0800 Subject: [PATCH 09/26] Sync eng/common directory with azure-sdk-tools for PR 13009 (#47348) * Used another way to construct package info array * Filtered out empty string for PackageInfoFiles --------- Co-authored-by: ray chen --- eng/common/pipelines/templates/steps/create-apireview.yml | 2 +- .../pipelines/templates/steps/validate-all-packages.yml | 2 +- eng/common/scripts/Create-APIReview.ps1 | 5 +++-- eng/common/scripts/Validate-All-Packages.ps1 | 5 +++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/eng/common/pipelines/templates/steps/create-apireview.yml b/eng/common/pipelines/templates/steps/create-apireview.yml index 6942abd0baa6..288c775aac76 100644 --- a/eng/common/pipelines/templates/steps/create-apireview.yml +++ b/eng/common/pipelines/templates/steps/create-apireview.yml @@ -41,7 +41,7 @@ steps: inputs: filePath: ${{ parameters.SourceRootPath }}/eng/common/scripts/Create-APIReview.ps1 arguments: > - -PackageInfoFiles ('${{ convertToJson(parameters.PackageInfoFiles) }}' | ConvertFrom-Json -NoEnumerate) + -PackageInfoFiles @('${{ join(''',''', parameters.PackageInfoFiles) }}') -ArtifactList ('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Select-Object Name) -ArtifactPath '${{parameters.ArtifactPath}}' -ArtifactName ${{ parameters.ArtifactName }} diff --git a/eng/common/pipelines/templates/steps/validate-all-packages.yml b/eng/common/pipelines/templates/steps/validate-all-packages.yml index ab75877a02da..ae09d268a940 100644 --- a/eng/common/pipelines/templates/steps/validate-all-packages.yml +++ b/eng/common/pipelines/templates/steps/validate-all-packages.yml @@ -34,7 +34,7 @@ steps: -BuildDefinition $(System.CollectionUri)$(System.TeamProject)/_build?definitionId=$(System.DefinitionId) ` -PipelineUrl $(System.CollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId) ` -IsReleaseBuild $$(SetAsReleaseBuild) ` - -PackageInfoFiles ('${{ convertToJson(parameters.PackageInfoFiles) }}' | ConvertFrom-Json -NoEnumerate) + -PackageInfoFiles @('${{ join(''',''', parameters.PackageInfoFiles) }}') workingDirectory: $(Pipeline.Workspace) displayName: Validate packages and update work items continueOnError: true diff --git a/eng/common/scripts/Create-APIReview.ps1 b/eng/common/scripts/Create-APIReview.ps1 index 5d112d71a0a4..ff98d4570485 100644 --- a/eng/common/scripts/Create-APIReview.ps1 +++ b/eng/common/scripts/Create-APIReview.ps1 @@ -373,7 +373,8 @@ elseif ($ArtifactList -and $ArtifactList.Count -gt 0) { elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0) { # Lowest Priority: Direct PackageInfoFiles (new method) Write-Host "Using PackageInfoFiles parameter with $($PackageInfoFiles.Count) files" - $ProcessedPackageInfoFiles = $PackageInfoFiles # Use as-is + # Filter out empty strings or whitespace-only entries + $ProcessedPackageInfoFiles = $PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } } else { Write-Error "No package information provided. Please provide either 'PackageName', 'ArtifactList', or 'PackageInfoFiles' parameters." @@ -382,7 +383,7 @@ else { # Validate that we have package info files to process if (-not $ProcessedPackageInfoFiles -or $ProcessedPackageInfoFiles.Count -eq 0) { - Write-Error "No package info files found after processing parameters." + Write-Error "No package info files found after processing parameters. Or PackageInfoFiles parameter contains only empty or whitespace entries, please check the artifact settings." exit 1 } diff --git a/eng/common/scripts/Validate-All-Packages.ps1 b/eng/common/scripts/Validate-All-Packages.ps1 index a27fd4652d93..24cfdc85468b 100644 --- a/eng/common/scripts/Validate-All-Packages.ps1 +++ b/eng/common/scripts/Validate-All-Packages.ps1 @@ -282,12 +282,13 @@ elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0) { # Direct PackageInfoFiles (new method) Write-Host "Using PackageInfoFiles parameter with $($PackageInfoFiles.Count) files" - $ProcessedPackageInfoFiles = $PackageInfoFiles + # Filter out empty strings or whitespace-only entries + $ProcessedPackageInfoFiles = $PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } } # Validate that we have package info files to process if (-not $ProcessedPackageInfoFiles -or $ProcessedPackageInfoFiles.Count -eq 0) { - Write-Error "No package info files found after processing parameters." + Write-Error "No package info files found after processing parameters. Or PackageInfoFiles parameter contains only empty or whitespace entries, please check the artifact settings." exit 1 } From 433c001ea480741a84370af9b0aee8d21b109cdb Mon Sep 17 00:00:00 2001 From: Ray Chen Date: Fri, 21 Nov 2025 11:32:49 -0800 Subject: [PATCH 10/26] Pass package info to the API review and package validation pipelines (#47335) * Passed the package info for apireview and validate package pipeline * Added test pipeline variable to patch release pipeline * Fixed JSON conversion error on windows os * Used compile time variable format * Escaped forward slash in path * Used parameter instead * Escaped forward slash * replaced the backslash * Updated test pipeline input * Updated yml to use the array object * Dynamic loaded the artifact for set test pipeline version template * Apply suggestions from code review * Apply suggestions from code review * Added display name for testPipeline parameter * Reverted change of set-test-pipeline-version template reference --- eng/pipelines/patch-release.yml | 8 ++++++++ eng/pipelines/templates/jobs/ci.yml | 8 ++++++-- .../templates/stages/archetype-java-release-batch.yml | 4 +++- .../templates/stages/archetype-java-release-patch.yml | 4 +++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/patch-release.yml b/eng/pipelines/patch-release.yml index 1cff7999a982..f7c486ea04b0 100644 --- a/eng/pipelines/patch-release.yml +++ b/eng/pipelines/patch-release.yml @@ -1,8 +1,16 @@ trigger: none pr: none + +parameters: +- name: TestPipeline + displayName: Test Run Without Version Changes + type: boolean + default: false + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client-patch.yml parameters: + TestPipeline: ${{ parameters.TestPipeline }} artifacts: - name: azure-sdk-template groupId: com.azure diff --git a/eng/pipelines/templates/jobs/ci.yml b/eng/pipelines/templates/jobs/ci.yml index d25e167b10bf..633498c91e28 100644 --- a/eng/pipelines/templates/jobs/ci.yml +++ b/eng/pipelines/templates/jobs/ci.yml @@ -260,13 +260,17 @@ jobs: - template: /eng/common/pipelines/templates/steps/create-apireview.yml parameters: - Artifacts: ${{parameters.ReleaseArtifacts}} + PackageInfoFiles: + - ${{ each artifact in parameters.ReleaseArtifacts }}: + - $(Build.ArtifactStagingDirectory)/PackageInfo/${{artifact.name}}.json - template: /eng/common/pipelines/templates/steps/detect-api-changes.yml - template: /eng/common/pipelines/templates/steps/validate-all-packages.yml parameters: - Artifacts: ${{ parameters.Artifacts }} + PackageInfoFiles: + - ${{ each artifact in parameters.Artifacts }}: + - $(Build.ArtifactStagingDirectory)/PackageInfo/${{artifact.name}}.json - template: /eng/pipelines/templates/steps/post-job-cleanup.yml diff --git a/eng/pipelines/templates/stages/archetype-java-release-batch.yml b/eng/pipelines/templates/stages/archetype-java-release-batch.yml index d87608095663..2d76d4878abb 100644 --- a/eng/pipelines/templates/stages/archetype-java-release-batch.yml +++ b/eng/pipelines/templates/stages/archetype-java-release-batch.yml @@ -271,8 +271,10 @@ stages: - template: /eng/common/pipelines/templates/steps/create-apireview.yml parameters: + PackageInfoFiles: + - ${{ each artifact in parameters.Artifacts }}: + - $(Pipeline.Workspace)/packages-signed/PackageInfo/${{artifact.name}}.json ArtifactPath: $(Pipeline.Workspace)/packages-signed - Artifacts: ${{parameters.Artifacts}} ConfigFileDir: $(Pipeline.Workspace)/packages-signed/PackageInfo MarkPackageAsShipped: true ArtifactName: packages-signed diff --git a/eng/pipelines/templates/stages/archetype-java-release-patch.yml b/eng/pipelines/templates/stages/archetype-java-release-patch.yml index 7e0decaa3fab..9ca73fa9331a 100644 --- a/eng/pipelines/templates/stages/archetype-java-release-patch.yml +++ b/eng/pipelines/templates/stages/archetype-java-release-patch.yml @@ -170,8 +170,10 @@ stages: ArtifactPath: $(Pipeline.Workspace)/packages-signed - template: /eng/common/pipelines/templates/steps/create-apireview.yml parameters: + PackageInfoFiles: + - ${{ each artifact in parameters.Artifacts }}: + - $(Pipeline.Workspace)/packages-signed/PackageInfo/${{artifact.name}}.json ArtifactPath: $(Pipeline.Workspace)/packages-signed - Artifacts: ${{parameters.Artifacts}} ConfigFileDir: $(Pipeline.Workspace)/packages-signed/PackageInfo MarkPackageAsShipped: true ArtifactName: packages-signed From fc17cb3e415af87bb4ce9c10d2aece5c67876780 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 21 Nov 2025 15:20:18 -0800 Subject: [PATCH 11/26] Sync eng/common directory with azure-sdk-tools for PR 12976 (#47351) --- .../instructions/azsdk-tools/verify-setup.instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/instructions/azsdk-tools/verify-setup.instructions.md b/eng/common/instructions/azsdk-tools/verify-setup.instructions.md index 38d6a5b40db4..be401efcd406 100644 --- a/eng/common/instructions/azsdk-tools/verify-setup.instructions.md +++ b/eng/common/instructions/azsdk-tools/verify-setup.instructions.md @@ -16,4 +16,4 @@ The user can specify multiple languages to check. If the user wants to check all ## Output Display results in a user-friendly and concise format, highlighting any missing dependencies that need to be addressed and how to resolve them. -WHENEVER Python related requirements fail, ALWAYS ASK the user if they have set the `AZSDKTOOLS_PYTHON_VENV_PATH` system environment variable to their desired virtual environment. This tool can only check requirements in the venv path specified by that environment variable. +When Python tool requirements fail, inform the user about the `AZSDKTOOLS_PYTHON_VENV_PATH` environment variable if they have setup issues. The verify-setup tool can only check Python requirements within the virtual environment specified by this environment variable. From 0719adfb2283be17321b5667d9b96bd2f39a8b4e Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Sun, 23 Nov 2025 23:22:15 -0800 Subject: [PATCH 12/26] [Automation] Generate Fluent Lite from Swagger postgresql#package-flexibleserver-2025-08-01 (#47328) * [Automation] External Change * [Automation] Generate Fluent Lite from Swagger postgresql#package-flexibleserver-2025-08-01 * fix test after break * simplify changelog * nit, changelog --------- Co-authored-by: Weidong Xu --- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 286 +- .../README.md | 22 +- .../SAMPLE.md | 3026 +++++++++-------- .../pom.xml | 5 +- .../PostgreSqlManager.java | 328 +- ... AdministratorsMicrosoftEntrasClient.java} | 185 +- ...vancedThreatProtectionSettingsClient.java} | 88 +- ...> BackupsAutomaticAndOnDemandsClient.java} | 149 +- .../BackupsLongTermRetentionsClient.java | 302 ++ ...ava => CapabilitiesByLocationsClient.java} | 25 +- ....java => CapabilitiesByServersClient.java} | 27 +- ...lesClient.java => CapturedLogsClient.java} | 24 +- .../fluent/CheckNameAvailabilitiesClient.java | 70 - ...ckNameAvailabilityWithLocationsClient.java | 74 - .../fluent/ConfigurationsClient.java | 191 +- .../fluent/DatabasesClient.java | 139 +- .../fluent/FirewallRulesClient.java | 107 +- .../fluent/FlexibleServersClient.java | 198 -- .../fluent/MigrationsClient.java | 361 +- .../fluent/NameAvailabilitiesClient.java | 136 + .../fluent/OperationsClient.java | 12 +- .../fluent/PostgreSqlManagementClient.java | 115 +- ...java => PrivateDnsZoneSuffixesClient.java} | 29 +- ...ateEndpointConnectionOperationsClient.java | 242 -- .../PrivateEndpointConnectionsClient.java | 237 +- .../fluent/ReplicasClient.java | 6 +- .../fluent/ResourceProvidersClient.java | 93 - .../ServerThreatProtectionSettingsClient.java | 175 +- .../fluent/ServersClient.java | 187 +- .../fluent/TuningConfigurationsClient.java | 540 --- .../fluent/TuningIndexesClient.java | 82 - .../TuningOptionsOperationsClient.java} | 124 +- .../fluent/VirtualEndpointsClient.java | 253 +- .../VirtualNetworkSubnetUsagesClient.java | 27 +- ... => AdministratorMicrosoftEntraInner.java} | 88 +- ...dministratorMicrosoftEntraProperties.java} | 75 +- ...tratorMicrosoftEntraPropertiesForAdd.java} | 63 +- ...edThreatProtectionSettingsModelInner.java} | 60 +- ...edThreatProtectionSettingsProperties.java} | 53 +- ...a => BackupAutomaticAndOnDemandInner.java} | 76 +- ...BackupAutomaticAndOnDemandProperties.java} | 67 +- ...ckupsLongTermRetentionOperationInner.java} | 64 +- ...ackupsLongTermRetentionResponseInner.java} | 56 +- ...sLongTermRetentionResponseProperties.java} | 29 +- .../fluent/models/CapabilityInner.java | 381 +++ ...ogFileInner.java => CapturedLogInner.java} | 80 +- ...erties.java => CapturedLogProperties.java} | 70 +- .../fluent/models/ConfigurationInner.java | 42 +- .../models/ConfigurationProperties.java | 66 +- .../fluent/models/DatabaseInner.java | 14 +- .../fluent/models/DatabaseProperties.java | 14 +- .../fluent/models/FirewallRuleInner.java | 18 +- .../fluent/models/FirewallRuleProperties.java | 18 +- .../models/FlexibleServerCapabilityInner.java | 373 -- .../IndexRecommendationResourceInner.java | 368 -- .../models/LtrPreBackupResponseInner.java | 9 +- ...ResourceInner.java => MigrationInner.java} | 336 +- ...va => MigrationNameAvailabilityInner.java} | 67 +- ...operties.java => MigrationProperties.java} | 412 +-- ....java => MigrationPropertiesForPatch.java} | 306 +- ...r.java => NameAvailabilityModelInner.java} | 49 +- .../models/ObjectRecommendationInner.java | 289 ++ ...va => ObjectRecommendationProperties.java} | 181 +- .../fluent/models/OperationInner.java | 18 +- .../fluent/models/QuotaUsageInner.java | 8 +- .../fluent/models/ServerInner.java | 110 +- .../fluent/models/ServerProperties.java | 143 +- ...ate.java => ServerPropertiesForPatch.java} | 245 +- .../models/SessionDetailsResourceInner.java | 233 -- .../fluent/models/SessionResourceInner.java | 261 -- ...urceInner.java => TuningOptionsInner.java} | 30 +- ...ceInner.java => VirtualEndpointInner.java} | 52 +- .../VirtualEndpointResourceProperties.java | 16 +- ... VirtualNetworkSubnetUsageModelInner.java} | 28 +- .../fluent/models/package-info.java | 6 +- .../fluent/package-info.java | 6 +- .../ActiveDirectoryAdministratorImpl.java | 132 - .../AdministratorMicrosoftEntraImpl.java | 179 + ...inistratorsMicrosoftEntrasClientImpl.java} | 354 +- ...=> AdministratorsMicrosoftEntrasImpl.java} | 50 +- ...edThreatProtectionSettingsClientImpl.java} | 332 +- .../AdvancedThreatProtectionSettingsImpl.java | 77 + ...cedThreatProtectionSettingsModelImpl.java} | 48 +- ...va => BackupAutomaticAndOnDemandImpl.java} | 16 +- ...ckupsAutomaticAndOnDemandsClientImpl.java} | 275 +- .../BackupsAutomaticAndOnDemandsImpl.java | 101 + .../implementation/BackupsImpl.java | 95 - ...ackupsLongTermRetentionOperationImpl.java} | 12 +- ...BackupsLongTermRetentionResponseImpl.java} | 12 +- .../BackupsLongTermRetentionsClientImpl.java | 909 +++++ .../BackupsLongTermRetentionsImpl.java | 126 + ...=> CapabilitiesByLocationsClientImpl.java} | 130 +- ....java => CapabilitiesByLocationsImpl.java} | 30 +- ...a => CapabilitiesByServersClientImpl.java} | 115 +- ...pl.java => CapabilitiesByServersImpl.java} | 30 +- ...apabilityImpl.java => CapabilityImpl.java} | 46 +- ...{LogFileImpl.java => CapturedLogImpl.java} | 12 +- ...tImpl.java => CapturedLogsClientImpl.java} | 107 +- ...ilitiesImpl.java => CapturedLogsImpl.java} | 32 +- .../CheckNameAvailabilitiesClientImpl.java | 179 - .../CheckNameAvailabilitiesImpl.java | 58 - ...meAvailabilityWithLocationsClientImpl.java | 194 -- ...heckNameAvailabilityWithLocationsImpl.java | 58 - .../implementation/ConfigurationImpl.java | 13 +- .../ConfigurationsClientImpl.java | 290 +- .../implementation/DatabasesClientImpl.java | 228 +- .../FirewallRulesClientImpl.java | 176 +- .../FlexibleServersClientImpl.java | 480 --- .../implementation/FlexibleServersImpl.java | 84 - .../LtrBackupOperationsImpl.java | 71 - ...onResourceImpl.java => MigrationImpl.java} | 152 +- ...ava => MigrationNameAvailabilityImpl.java} | 12 +- .../implementation/MigrationsClientImpl.java | 799 +++-- .../implementation/MigrationsImpl.java | 156 +- .../NameAvailabilitiesClientImpl.java | 316 ++ .../NameAvailabilitiesImpl.java | 79 + ...pl.java => NameAvailabilityModelImpl.java} | 12 +- ...mpl.java => ObjectRecommendationImpl.java} | 32 +- .../implementation/OperationsClientImpl.java | 51 +- .../PostgreSqlManagementClientImpl.java | 286 +- ... => PrivateDnsZoneSuffixesClientImpl.java} | 61 +- ...l.java => PrivateDnsZoneSuffixesImpl.java} | 22 +- ...ndpointConnectionOperationsClientImpl.java | 623 ---- ...ivateEndpointConnectionOperationsImpl.java | 65 - .../PrivateEndpointConnectionsClientImpl.java | 611 +++- .../PrivateEndpointConnectionsImpl.java | 31 + .../PrivateLinkResourcesClientImpl.java | 28 +- .../implementation/QuotaUsagesClientImpl.java | 30 +- .../implementation/ReplicasClientImpl.java | 30 +- .../ResourceProvidersClientImpl.java | 224 -- .../implementation/ResourceProvidersImpl.java | 61 - .../implementation/ServerImpl.java | 103 +- ...verThreatProtectionSettingsClientImpl.java | 550 +-- .../ServerThreatProtectionSettingsImpl.java | 91 +- .../implementation/ServersClientImpl.java | 366 +- .../SessionDetailsResourceImpl.java | 52 - .../implementation/SessionResourceImpl.java | 56 - .../TuningConfigurationsClientImpl.java | 1735 ---------- .../TuningConfigurationsImpl.java | 102 - .../TuningIndexesClientImpl.java | 409 --- .../implementation/TuningIndexesImpl.java | 53 - .../TuningOptionsClientImpl.java | 490 --- .../implementation/TuningOptionsImpl.java | 57 +- .../TuningOptionsOperationsClientImpl.java | 824 +++++ .../TuningOptionsOperationsImpl.java | 87 + .../TuningOptionsResourceImpl.java | 45 - ...urceImpl.java => VirtualEndpointImpl.java} | 39 +- .../VirtualEndpointsClientImpl.java | 396 +-- .../implementation/VirtualEndpointsImpl.java | 39 +- ...> VirtualNetworkSubnetUsageModelImpl.java} | 12 +- .../VirtualNetworkSubnetUsagesClientImpl.java | 43 +- .../VirtualNetworkSubnetUsagesImpl.java | 18 +- .../implementation/package-info.java | 6 +- .../models/ActiveDirectoryAdministrator.java | 187 - .../models/ActiveDirectoryAuthEnum.java | 51 - .../models/AdminCredentials.java | 14 +- .../models/AdminCredentialsForPatch.java | 121 + .../models/AdministratorListResult.java | 128 - .../models/AdministratorMicrosoftEntra.java | 267 ++ ...va => AdministratorMicrosoftEntraAdd.java} | 69 +- .../AdministratorMicrosoftEntraList.java | 129 + ...ava => AdministratorsMicrosoftEntras.java} | 67 +- ... => AdvancedThreatProtectionSettings.java} | 45 +- .../AdvancedThreatProtectionSettingsList.java | 118 + ...dvancedThreatProtectionSettingsModel.java} | 78 +- .../models/ArmServerKeyType.java | 51 - .../models/AuthConfig.java | 34 +- .../models/AuthConfigForPatch.java | 151 + .../AzureManagedDiskPerformanceTier.java | 111 + .../AzureManagedDiskPerformanceTiers.java | 111 - .../models/Backup.java | 21 +- ...p.java => BackupAutomaticAndOnDemand.java} | 19 +- .../BackupAutomaticAndOnDemandList.java | 129 + .../models/BackupForPatch.java | 144 + .../models/BackupType.java | 51 + ...java => BackupsAutomaticAndOnDemands.java} | 57 +- ...=> BackupsLongTermRetentionOperation.java} | 12 +- ...a => BackupsLongTermRetentionRequest.java} | 40 +- ... => BackupsLongTermRetentionResponse.java} | 11 +- .../BackupsLongTermRetentions.java} | 97 +- ...mRetentionsCheckPrerequisitesHeaders.java} | 12 +- ...RetentionsCheckPrerequisitesResponse.java} | 15 +- .../models/Cancel.java | 51 + .../models/CancelEnum.java | 51 - ...ties.java => CapabilitiesByLocations.java} | 16 +- ...lities.java => CapabilitiesByServers.java} | 18 +- .../models/Capability.java | 138 + ...iesListResult.java => CapabilityList.java} | 55 +- .../models/{LogFile.java => CapturedLog.java} | 16 +- .../models/CapturedLogList.java | 127 + .../{LogFiles.java => CapturedLogs.java} | 16 +- .../models/CheckNameAvailabilities.java | 37 - .../CheckNameAvailabilityWithLocations.java | 39 - .../models/Cluster.java | 34 +- .../models/ConfigTuningRequestParameter.java | 179 - .../models/Configuration.java | 54 +- .../models/ConfigurationDataType.java | 12 +- .../models/ConfigurationForUpdate.java | 42 +- ...ListResult.java => ConfigurationList.java} | 46 +- .../models/Configurations.java | 33 +- .../models/CreateMode.java | 2 +- .../models/CreateModeForPatch.java | 51 + .../models/CreateModeForUpdate.java | 51 - .../models/DataEncryption.java | 98 +- .../models/DataEncryptionType.java | 51 + .../models/Database.java | 12 +- ...abaseListResult.java => DatabaseList.java} | 44 +- ...tatus.java => DatabaseMigrationState.java} | 211 +- .../models/Databases.java | 44 +- .../models/DbLevelValidationStatus.java | 22 +- .../models/DbServerMetadata.java | 23 +- .../models/EncryptionKeyStatus.java | 52 + .../FastProvisioningEditionCapability.java | 23 +- .../models/FastProvisioningSupport.java | 53 + .../models/FastProvisioningSupportedEnum.java | 53 - .../models/FeatureStatus.java | 51 + .../models/FirewallRule.java | 34 +- ...eListResult.java => FirewallRuleList.java} | 46 +- .../models/FirewallRules.java | 40 +- .../models/FlexibleServerCapability.java | 134 - .../models/FlexibleServers.java | 72 - .../models/GeoBackupSupportedEnum.java | 52 - .../models/GeoRedundantBackupEnum.java | 51 - .../models/GeographicallyRedundantBackup.java | 51 + .../GeographicallyRedundantBackupSupport.java | 54 + .../models/HaMode.java | 51 - .../models/HighAvailability.java | 26 +- .../models/HighAvailabilityForPatch.java | 141 + .../models/HighAvailabilityMode.java | 7 +- .../models/HighAvailabilityState.java | 71 + .../models/IdentityType.java | 2 +- .../models/ImpactRecord.java | 18 +- .../models/IndexRecommendationListResult.java | 132 - .../models/KeyStatusEnum.java | 51 - .../models/LocationRestricted.java | 52 + .../LogicalReplicationOnSourceDbEnum.java | 51 - .../LogicalReplicationOnSourceServer.java | 51 + .../models/LtrServerBackupOperationList.java | 12 +- .../models/MaintenanceWindow.java | 24 +- .../models/MaintenanceWindowForPatch.java | 177 + .../models/MicrosoftEntraAuth.java | 51 + .../models/MigrateRolesAndPermissions.java | 51 + .../models/MigrateRolesEnum.java | 51 - ...{MigrationResource.java => Migration.java} | 483 +-- .../models/MigrationDatabaseState.java | 71 + .../models/MigrationDbState.java | 71 - ...urceListResult.java => MigrationList.java} | 59 +- .../models/MigrationMode.java | 2 +- ...ce.java => MigrationNameAvailability.java} | 18 +- .../models/MigrationOption.java | 2 +- .../models/MigrationResourceForPatch.java | 164 +- .../models/MigrationSecretParameters.java | 26 +- .../MigrationSecretParametersForPatch.java | 158 + .../models/MigrationState.java | 2 +- .../models/MigrationStatus.java | 16 +- ...onSubState.java => MigrationSubstate.java} | 72 +- ...ils.java => MigrationSubstateDetails.java} | 60 +- .../models/Migrations.java | 130 +- .../models/NameAvailabilities.java | 68 + ...bility.java => NameAvailabilityModel.java} | 16 +- .../models/Network.java | 49 +- ...esource.java => ObjectRecommendation.java} | 49 +- ....java => ObjectRecommendationDetails.java} | 62 +- ...ult.java => ObjectRecommendationList.java} | 57 +- ...mmendationPropertiesAnalyzedWorkload.java} | 64 +- ...ationPropertiesImplementationDetails.java} | 43 +- .../models/OnlineResizeSupportedEnum.java | 53 - .../models/OnlineStorageResizeSupport.java | 54 + .../models/Operation.java | 8 +- .../models/OperationDisplay.java | 16 +- ...tionListResult.java => OperationList.java} | 41 +- .../models/OperationOrigin.java | 2 +- .../models/Operations.java | 8 +- .../models/Origin.java | 51 - .../OverwriteDatabasesOnTargetServer.java | 52 + .../models/OverwriteDbsInTargetEnum.java | 52 - .../models/PasswordAuthEnum.java | 51 - .../models/PasswordBasedAuth.java | 51 + .../models/PostgresMajorVersion.java | 81 + .../models/PrincipalType.java | 2 +- ...fixes.java => PrivateDnsZoneSuffixes.java} | 16 +- ...ava => PrivateEndpointConnectionList.java} | 49 +- .../PrivateEndpointConnectionOperations.java | 69 - .../models/PrivateEndpointConnections.java | 65 +- ...sult.java => PrivateLinkResourceList.java} | 41 +- .../models/QuotaUsage.java | 2 +- ...gesListResult.java => QuotaUsageList.java} | 40 +- .../models/ReadReplicaPromoteMode.java | 12 +- .../models/ReadReplicaPromoteOption.java | 52 + .../models/RecommendationType.java | 51 - .../models/RecommendationTypeEnum.java | 5 + .../RecommendationTypeParameterEnum.java | 61 + .../models/Replica.java | 50 +- .../models/Replicas.java | 4 +- .../models/ReplicationPromoteOption.java | 51 - .../models/ReplicationRole.java | 2 +- .../models/ReplicationState.java | 4 +- .../models/ResourceProviders.java | 50 - .../models/RestartParameter.java | 11 +- .../models/RestrictedEnum.java | 52 - .../models/Server.java | 235 +- ...lity.java => ServerEditionCapability.java} | 53 +- ...rverForUpdate.java => ServerForPatch.java} | 225 +- .../models/ServerHAState.java | 71 - ...{ServerListResult.java => ServerList.java} | 38 +- .../ServerPublicNetworkAccessState.java | 3 +- .../models/ServerSku.java | 17 +- .../models/ServerSkuCapability.java | 42 +- .../models/ServerState.java | 2 +- .../ServerThreatProtectionListResult.java | 105 - .../ServerThreatProtectionSettings.java | 88 +- .../models/ServerVersion.java | 76 - .../models/ServerVersionCapability.java | 15 +- .../models/Servers.java | 42 +- .../models/SessionDetailsResource.java | 62 - .../models/SessionResource.java | 68 - .../models/SessionsListResult.java | 131 - .../postgresqlflexibleserver/models/Sku.java | 14 +- .../models/SkuForPatch.java | 121 + .../models/SkuTier.java | 2 +- .../models/SourceType.java | 8 +- .../models/SslMode.java | 4 +- .../models/StartDataMigration.java | 51 + .../models/StartDataMigrationEnum.java | 51 - .../models/Storage.java | 61 +- .../models/StorageAutoGrow.java | 3 +- .../models/StorageAutoGrowthSupport.java | 53 + .../StorageAutoGrowthSupportedEnum.java | 53 - .../models/StorageEditionCapability.java | 14 +- .../models/StorageMbCapability.java | 34 +- .../models/StorageTierCapability.java | 10 +- .../models/StorageType.java | 4 +- .../models/SupportedFeature.java | 16 +- .../models/SupportedFeatureStatusEnum.java | 51 - .../models/ThreatProtectionState.java | 4 +- .../models/TriggerCutover.java | 51 + .../models/TriggerCutoverEnum.java | 51 - .../models/TuningIndexes.java | 43 - .../models/TuningOptionEnum.java | 51 - .../models/TuningOptionParameterEnum.java | 51 + .../models/TuningOptions.java | 64 +- ...ListResult.java => TuningOptionsList.java} | 52 +- .../models/TuningOptionsListResult.java | 131 - .../models/TuningOptionsOperations.java | 97 + .../models/TuningOptionsResource.java | 49 - .../models/UserAssignedIdentity.java | 26 +- .../models/UserIdentity.java | 18 +- .../models/ValidationDetails.java | 18 +- .../models/ValidationMessage.java | 4 +- .../models/ValidationSummaryItem.java | 6 +- ...ointResource.java => VirtualEndpoint.java} | 71 +- .../VirtualEndpointResourceForPatch.java | 16 +- .../models/VirtualEndpointType.java | 2 +- .../models/VirtualEndpoints.java | 60 +- ...tResult.java => VirtualEndpointsList.java} | 53 +- .../models/VirtualEndpointsListResult.java | 128 - ...va => VirtualNetworkSubnetUsageModel.java} | 10 +- .../models/VirtualNetworkSubnetUsages.java | 12 +- ...eRedundantHaAndGeoBackupSupportedEnum.java | 54 - .../models/ZoneRedundantHaSupportedEnum.java | 53 - ...dGeographicallyRedundantBackupSupport.java | 59 + .../ZoneRedundantHighAvailabilitySupport.java | 54 + .../models/package-info.java | 6 +- .../package-info.java | 6 +- .../proxy-config.json | 2 +- .../AdministratorsDeleteSamples.java | 26 - .../generated/AdministratorsGetSamples.java | 26 - .../AdministratorsListByServerSamples.java | 25 - ...sMicrosoftEntraCreateOrUpdateSamples.java} | 18 +- ...istratorsMicrosoftEntraDeleteSamples.java} | 16 +- ...dministratorsMicrosoftEntraGetSamples.java | 27 + ...torsMicrosoftEntraListByServerSamples.java | 26 + ...edThreatProtectionSettingsGetSamples.java} | 16 +- ...ProtectionSettingsListByServerSamples.java | 26 + ...kupsAutomaticAndOnDemandCreateSamples.java | 27 + ...upsAutomaticAndOnDemandDeleteSamples.java} | 17 +- ...BackupsAutomaticAndOnDemandGetSamples.java | 27 + ...tomaticAndOnDemandListByServerSamples.java | 26 + .../generated/BackupsDeleteSamples.java | 25 - .../generated/BackupsGetSamples.java | 27 - .../generated/BackupsListByServerSamples.java | 25 - ...rmRetentionCheckPrerequisitesSamples.java} | 19 +- .../BackupsLongTermRetentionGetSamples.java | 27 + ...sLongTermRetentionListByServerSamples.java | 26 + ...BackupsLongTermRetentionStartSamples.java} | 21 +- .../CapabilitiesByLocationListSamples.java | 25 + .../CapabilitiesByServerListSamples.java | 25 + ...a => CapturedLogsListByServerSamples.java} | 15 +- .../CheckNameAvailabilityExecuteSamples.java | 28 - ...vailabilityWithLocationExecuteSamples.java | 28 - .../generated/ConfigurationsGetSamples.java | 11 +- .../ConfigurationsListByServerSamples.java | 12 +- .../generated/ConfigurationsPutSamples.java | 12 +- .../ConfigurationsUpdateSamples.java | 14 +- .../generated/DatabasesCreateSamples.java | 8 +- .../generated/DatabasesDeleteSamples.java | 12 +- .../generated/DatabasesGetSamples.java | 12 +- .../DatabasesListByServerSamples.java | 8 +- .../FirewallRulesCreateOrUpdateSamples.java | 14 +- .../generated/FirewallRulesDeleteSamples.java | 11 +- .../generated/FirewallRulesGetSamples.java | 13 +- .../FirewallRulesListByServerSamples.java | 11 +- ...GetPrivateDnsZoneSuffixExecuteSamples.java | 25 - ...cationBasedCapabilitiesExecuteSamples.java | 24 - .../LogFilesListByServerSamples.java | 25 - .../LtrBackupOperationsGetSamples.java | 25 - ...ples.java => MigrationsCancelSamples.java} | 15 +- ...igrationsCheckNameAvailabilitySamples.java | 31 + .../generated/MigrationsCreateSamples.java | 183 +- .../generated/MigrationsGetSamples.java | 60 +- .../MigrationsListByTargetServerSamples.java | 12 +- .../generated/MigrationsUpdateSamples.java | 38 +- .../NameAvailabilityCheckGloballySamples.java | 31 + ...eAvailabilityCheckWithLocationSamples.java | 31 + .../generated/OperationsListSamples.java | 9 +- ...va => PrivateDnsZoneSuffixGetSamples.java} | 14 +- ...ivateEndpointConnectionsDeleteSamples.java | 28 + .../PrivateEndpointConnectionsGetSamples.java | 10 +- ...ndpointConnectionsListByServerSamples.java | 11 +- ...vateEndpointConnectionsUpdateSamples.java} | 17 +- .../PrivateLinkResourcesGetSamples.java | 6 +- ...ivateLinkResourcesListByServerSamples.java | 5 +- .../generated/QuotaUsagesListSamples.java | 10 +- .../ReplicasListByServerSamples.java | 8 +- ...CheckMigrationNameAvailabilitySamples.java | 31 - ...otectionSettingsCreateOrUpdateSamples.java | 33 - ...ProtectionSettingsListByServerSamples.java | 26 - .../ServersCreateOrUpdateSamples.java | 431 +++ .../generated/ServersCreateSamples.java | 307 -- .../generated/ServersDeleteSamples.java | 10 +- .../ServersGetByResourceGroupSamples.java | 35 +- .../ServersListByResourceGroupSamples.java | 10 +- .../generated/ServersListSamples.java | 9 +- .../generated/ServersRestartSamples.java | 29 +- .../generated/ServersStartSamples.java | 10 +- .../generated/ServersStopSamples.java | 9 +- .../generated/ServersUpdateSamples.java | 249 +- .../TuningConfigurationDisableSamples.java | 28 - .../TuningConfigurationEnableSamples.java | 28 - ...onfigurationListSessionDetailsSamples.java | 29 - ...uningConfigurationListSessionsSamples.java | 28 - ...uningConfigurationStartSessionSamples.java | 32 - ...TuningConfigurationStopSessionSamples.java | 28 - ...TuningIndexListRecommendationsSamples.java | 47 - .../generated/TuningOptionsGetSamples.java | 27 - .../TuningOptionsListByServerSamples.java | 25 - .../TuningOptionsOperationGetSamples.java | 29 + ...ngOptionsOperationListByServerSamples.java | 26 + ...nsOperationListRecommendationsSamples.java | 81 + .../VirtualEndpointsCreateSamples.java | 12 +- .../VirtualEndpointsDeleteSamples.java | 8 +- .../generated/VirtualEndpointsGetSamples.java | 11 +- .../VirtualEndpointsListByServerSamples.java | 11 +- .../VirtualEndpointsUpdateSamples.java | 15 +- ...VirtualNetworkSubnetUsageListSamples.java} | 18 +- .../PostgreSqlManagerTests.java | 24 +- .../AdministratorMicrosoftEntraAddTests.java | 35 + ...AdministratorMicrosoftEntraInnerTests.java | 37 + .../AdministratorMicrosoftEntraListTests.java | 54 + ...orMicrosoftEntraPropertiesForAddTests.java | 35 + ...istratorMicrosoftEntraPropertiesTests.java | 37 + .../AdministratorsDeleteMockTests.java | 33 - ...crosoftEntrasCreateOrUpdateMockTests.java} | 28 +- ...rosoftEntrasGetWithResponseMockTests.java} | 18 +- ...MicrosoftEntrasListByServerMockTests.java} | 18 +- ...tionSettingsGetWithResponseMockTests.java} | 13 +- ...tectionSettingsListByServerMockTests.java} | 10 +- ...ncedThreatProtectionSettingsListTests.java | 26 + ...reatProtectionSettingsModelInnerTests.java | 28 + ...reatProtectionSettingsPropertiesTests.java | 28 + .../BackupAutomaticAndOnDemandInnerTests.java | 34 + .../BackupAutomaticAndOnDemandListTests.java | 40 + ...upAutomaticAndOnDemandPropertiesTests.java | 35 + .../generated/BackupForPatchTests.java | 30 + .../generated/BackupRequestBaseTests.java | 27 + .../generated/BackupSettingsTests.java | 25 + .../generated/BackupStoreDetailsTests.java | 26 + .../generated/BackupTests.java | 30 + ...AutomaticAndOnDemandsCreateMockTests.java} | 18 +- ...AndOnDemandsGetWithResponseMockTests.java} | 18 +- ...ticAndOnDemandsListByServerMockTests.java} | 18 +- .../BackupsLongTermRetentionRequestTests.java | 33 + ...gTermRetentionResponsePropertiesTests.java | 26 + ...ckPrerequisitesWithResponseMockTests.java} | 20 +- .../CapabilitiesByLocationsListMockTests.java | 39 + .../CapabilitiesByServersListMockTests.java | 39 + .../generated/CapabilityBaseTests.java | 22 + .../generated/CapabilityInnerTests.java | 26 + .../generated/CapabilityListTests.java | 26 + .../generated/CapturedLogInnerTests.java | 39 + .../generated/CapturedLogListTests.java | 45 + .../generated/CapturedLogPropertiesTests.java | 40 + ...=> CapturedLogsListByServerMockTests.java} | 20 +- .../CheckNameAvailabilityRequestTests.java | 28 + .../CheckNameAvailabilityResponseTests.java | 33 + .../generated/ClusterTests.java | 27 + .../ConfigurationForUpdateTests.java | 28 + .../generated/ConfigurationInnerTests.java | 28 + .../generated/ConfigurationListTests.java | 37 + .../ConfigurationPropertiesTests.java | 29 + ...onfigurationsGetWithResponseMockTests.java | 8 +- .../ConfigurationsListByServerMockTests.java | 8 +- .../generated/ConfigurationsPutMockTests.java | 14 +- .../generated/DatabaseInnerTests.java | 28 + .../generated/DatabaseListTests.java | 37 + .../DatabaseMigrationStateTests.java | 73 + .../generated/DatabasePropertiesTests.java | 27 + .../generated/DatabasesCreateMockTests.java | 14 +- .../generated/DatabasesDeleteMockTests.java | 33 - .../DatabasesGetWithResponseMockTests.java | 8 +- .../DatabasesListByServerMockTests.java | 8 +- .../DbLevelValidationStatusTests.java | 81 + .../generated/DbServerMetadataTests.java | 36 + .../generated/DelegatedSubnetUsageTests.java | 23 + ...astProvisioningEditionCapabilityTests.java | 23 + .../generated/FirewallRuleInnerTests.java | 28 + .../generated/FirewallRuleListTests.java | 35 + .../FirewallRulePropertiesTests.java | 29 + .../FirewallRulesCreateOrUpdateMockTests.java | 14 +- .../FirewallRulesDeleteMockTests.java | 33 - ...FirewallRulesGetWithResponseMockTests.java | 8 +- .../FirewallRulesListByServerMockTests.java | 8 +- .../HighAvailabilityForPatchTests.java | 30 + .../generated/HighAvailabilityTests.java | 31 + .../generated/ImpactRecordTests.java | 35 + ...tionBasedCapabilitiesExecuteMockTests.java | 39 - .../generated/LtrPreBackupRequestTests.java | 27 + .../LtrPreBackupResponseInnerTests.java | 25 + .../MaintenanceWindowForPatchTests.java | 36 + .../generated/MaintenanceWindowTests.java | 35 + .../MigrationNameAvailabilityInnerTests.java | 29 + .../generated/MigrationStatusTests.java | 23 + .../MigrationSubstateDetailsTests.java | 217 ++ ...ameAvailabilityWithResponseMockTests.java} | 20 +- ...MigrationsDeleteWithResponseMockTests.java | 34 - ...esCheckGloballyWithResponseMockTests.java} | 17 +- ...eckWithLocationWithResponseMockTests.java} | 18 +- .../NameAvailabilityModelInnerTests.java | 33 + .../generated/NamePropertyTests.java | 27 + .../generated/NetworkTests.java | 33 + .../ObjectRecommendationDetailsTests.java | 45 + .../ObjectRecommendationInnerTests.java | 26 + .../ObjectRecommendationListTests.java | 32 + ...dationPropertiesAnalyzedWorkloadTests.java | 34 + ...nPropertiesImplementationDetailsTests.java | 30 + .../ObjectRecommendationPropertiesTests.java | 67 + .../generated/OperationDisplayTests.java | 23 + .../generated/OperationInnerTests.java | 26 + .../generated/OperationListTests.java | 33 + .../generated/OperationsListMockTests.java | 2 +- ...ZoneSuffixesGetWithResponseMockTests.java} | 11 +- .../PrivateEndpointConnectionInnerTests.java | 40 + .../PrivateEndpointConnectionListTests.java | 26 + ...vateEndpointConnectionPropertiesTests.java | 40 + ...ntConnectionsGetWithResponseMockTests.java | 8 +- ...pointConnectionsListByServerMockTests.java | 8 +- ...teEndpointConnectionsUpdateMockTests.java} | 4 +- .../generated/PrivateEndpointTests.java | 21 + .../PrivateLinkResourceInnerTests.java | 28 + .../PrivateLinkResourceListTests.java | 26 + .../PrivateLinkResourcePropertiesTests.java | 28 + ...LinkResourcesGetWithResponseMockTests.java | 6 +- ...ateLinkResourcesListByServerMockTests.java | 6 +- ...rivateLinkServiceConnectionStateTests.java | 34 + .../generated/QuotaUsageInnerTests.java | 42 + .../generated/QuotaUsageListTests.java | 26 + .../generated/QuotaUsagesListMockTests.java | 16 +- .../generated/ReplicaTests.java | 35 + .../generated/RestartParameterTests.java | 30 + .../ServerCapabilitiesListMockTests.java | 39 - .../ServerEditionCapabilityTests.java | 23 + .../generated/ServerSkuCapabilityTests.java | 23 + .../generated/ServerSkuTests.java | 28 + ...ectionSettingsCreateOrUpdateMockTests.java | 8 +- .../ServerVersionCapabilityTests.java | 23 + .../generated/ServersDeleteMockTests.java | 33 - .../generated/ServersRestartMockTests.java | 38 - .../generated/ServersStartMockTests.java | 33 - .../generated/ServersStopMockTests.java | 33 - .../generated/SkuForPatchTests.java | 28 + .../generated/SkuTests.java | 27 + .../StorageEditionCapabilityTests.java | 23 + .../generated/StorageMbCapabilityTests.java | 23 + .../generated/StorageTests.java | 44 + .../generated/StorageTierCapabilityTests.java | 23 + .../generated/SupportedFeatureTests.java | 22 + ...igurationsListSessionDetailsMockTests.java | 46 - ...ngConfigurationsListSessionsMockTests.java | 46 - ...ngIndexesListRecommendationsMockTests.java | 40 - .../generated/TuningOptionsInnerTests.java | 23 + .../generated/TuningOptionsListTests.java | 30 + ...nsOperationsGetWithResponseMockTests.java} | 13 +- ...tionsOperationsListByServerMockTests.java} | 10 +- ...perationsListRecommendationsMockTests.java | 42 + .../generated/UserAssignedIdentityTests.java | 54 + .../generated/UserIdentityTests.java | 27 + .../generated/ValidationDetailsTests.java | 114 + .../generated/ValidationMessageTests.java | 29 + .../generated/ValidationSummaryItemTests.java | 40 + .../generated/VirtualEndpointInnerTests.java | 31 + .../VirtualEndpointResourceForPatchTests.java | 32 + ...irtualEndpointResourcePropertiesTests.java | 33 + .../VirtualEndpointsCreateMockTests.java | 14 +- ...tualEndpointsGetWithResponseMockTests.java | 10 +- ...VirtualEndpointsListByServerMockTests.java | 10 +- .../generated/VirtualEndpointsListTests.java | 36 + ...tualNetworkSubnetUsageModelInnerTests.java | 23 + ...rtualNetworkSubnetUsageParameterTests.java | 26 + ...ubnetUsagesListWithResponseMockTests.java} | 14 +- 610 files changed, 23389 insertions(+), 23021 deletions(-) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/{AdministratorsClient.java => AdministratorsMicrosoftEntrasClient.java} (63%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/{TuningOptionsClient.java => AdvancedThreatProtectionSettingsClient.java} (61%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/{BackupsClient.java => BackupsAutomaticAndOnDemandsClient.java} (73%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsLongTermRetentionsClient.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/{LocationBasedCapabilitiesClient.java => CapabilitiesByLocationsClient.java} (67%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/{ServerCapabilitiesClient.java => CapabilitiesByServersClient.java} (68%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/{LogFilesClient.java => CapturedLogsClient.java} (73%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilityWithLocationsClient.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FlexibleServersClient.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/NameAvailabilitiesClient.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/{GetPrivateDnsZoneSuffixesClient.java => PrivateDnsZoneSuffixesClient.java} (68%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionOperationsClient.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ResourceProvidersClient.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningConfigurationsClient.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningIndexesClient.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/{models/TuningConfigurations.java => fluent/TuningOptionsOperationsClient.java} (56%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{ActiveDirectoryAdministratorInner.java => AdministratorMicrosoftEntraInner.java} (60%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{AdministratorProperties.java => AdministratorMicrosoftEntraProperties.java} (51%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{AdministratorPropertiesForAdd.java => AdministratorMicrosoftEntraPropertiesForAdd.java} (51%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{ServerThreatProtectionSettingsModelInner.java => AdvancedThreatProtectionSettingsModelInner.java} (61%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{ServerThreatProtectionProperties.java => AdvancedThreatProtectionSettingsProperties.java} (55%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{ServerBackupInner.java => BackupAutomaticAndOnDemandInner.java} (62%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{ServerBackupProperties.java => BackupAutomaticAndOnDemandProperties.java} (56%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{LtrServerBackupOperationInner.java => BackupsLongTermRetentionOperationInner.java} (78%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{LtrBackupResponseInner.java => BackupsLongTermRetentionResponseInner.java} (78%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{LtrPreBackupResponseProperties.java => BackupsLongTermRetentionResponseProperties.java} (67%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapabilityInner.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{LogFileInner.java => CapturedLogInner.java} (69%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{LogFileProperties.java => CapturedLogProperties.java} (65%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FlexibleServerCapabilityInner.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/IndexRecommendationResourceInner.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{MigrationResourceInner.java => MigrationInner.java} (57%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{MigrationNameAvailabilityResourceInner.java => MigrationNameAvailabilityInner.java} (62%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{MigrationResourceProperties.java => MigrationProperties.java} (53%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{MigrationResourcePropertiesForPatch.java => MigrationPropertiesForPatch.java} (53%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{NameAvailabilityInner.java => NameAvailabilityModelInner.java} (58%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationInner.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{IndexRecommendationResourceProperties.java => ObjectRecommendationProperties.java} (55%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{ServerPropertiesForUpdate.java => ServerPropertiesForPatch.java} (53%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SessionDetailsResourceInner.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SessionResourceInner.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{TuningOptionsResourceInner.java => TuningOptionsInner.java} (71%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{VirtualEndpointResourceInner.java => VirtualEndpointInner.java} (72%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/{VirtualNetworkSubnetUsageResultInner.java => VirtualNetworkSubnetUsageModelInner.java} (72%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ActiveDirectoryAdministratorImpl.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorMicrosoftEntraImpl.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{AdministratorsClientImpl.java => AdministratorsMicrosoftEntrasClientImpl.java} (74%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{AdministratorsImpl.java => AdministratorsMicrosoftEntrasImpl.java} (78%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{LtrBackupOperationsClientImpl.java => AdvancedThreatProtectionSettingsClientImpl.java} (71%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{ServerThreatProtectionSettingsModelImpl.java => AdvancedThreatProtectionSettingsModelImpl.java} (66%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{ServerBackupImpl.java => BackupAutomaticAndOnDemandImpl.java} (78%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{BackupsClientImpl.java => BackupsAutomaticAndOnDemandsClientImpl.java} (82%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsImpl.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{LtrServerBackupOperationImpl.java => BackupsLongTermRetentionOperationImpl.java} (84%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{LtrBackupResponseImpl.java => BackupsLongTermRetentionResponseImpl.java} (82%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsClientImpl.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsImpl.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{LocationBasedCapabilitiesClientImpl.java => CapabilitiesByLocationsClientImpl.java} (68%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{LogFilesImpl.java => CapabilitiesByLocationsImpl.java} (60%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{ServerCapabilitiesClientImpl.java => CapabilitiesByServersClientImpl.java} (75%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{LocationBasedCapabilitiesImpl.java => CapabilitiesByServersImpl.java} (57%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{FlexibleServerCapabilityImpl.java => CapabilityImpl.java} (74%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{LogFileImpl.java => CapturedLogImpl.java} (87%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{LogFilesClientImpl.java => CapturedLogsClientImpl.java} (78%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{ServerCapabilitiesImpl.java => CapturedLogsImpl.java} (56%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsClientImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersClientImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsImpl.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{MigrationResourceImpl.java => MigrationImpl.java} (70%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{MigrationNameAvailabilityResourceImpl.java => MigrationNameAvailabilityImpl.java} (76%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesClientImpl.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesImpl.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{NameAvailabilityImpl.java => NameAvailabilityModelImpl.java} (81%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{IndexRecommendationResourceImpl.java => ObjectRecommendationImpl.java} (78%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{GetPrivateDnsZoneSuffixesClientImpl.java => PrivateDnsZoneSuffixesClientImpl.java} (66%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{GetPrivateDnsZoneSuffixesImpl.java => PrivateDnsZoneSuffixesImpl.java} (63%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsClientImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersClientImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/SessionDetailsResourceImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/SessionResourceImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningConfigurationsClientImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningConfigurationsImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningIndexesClientImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningIndexesImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsClientImpl.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsClientImpl.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsImpl.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsResourceImpl.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{VirtualEndpointResourceImpl.java => VirtualEndpointImpl.java} (80%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/{VirtualNetworkSubnetUsageResultImpl.java => VirtualNetworkSubnetUsageModelImpl.java} (78%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministrator.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAuthEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentialsForPatch.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorListResult.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntra.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{ActiveDirectoryAdministratorAdd.java => AdministratorMicrosoftEntraAdd.java} (52%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraList.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{Administrators.java => AdministratorsMicrosoftEntras.java} (64%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{LtrBackupOperations.java => AdvancedThreatProtectionSettings.java} (60%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsList.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{ServerThreatProtectionSettingsModel.java => AdvancedThreatProtectionSettingsModel.java} (58%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ArmServerKeyType.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfigForPatch.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTier.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTiers.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{ServerBackup.java => BackupAutomaticAndOnDemand.java} (72%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemandList.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupForPatch.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupType.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{Backups.java => BackupsAutomaticAndOnDemands.java} (70%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{LtrServerBackupOperation.java => BackupsLongTermRetentionOperation.java} (88%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{LtrBackupRequest.java => BackupsLongTermRetentionRequest.java} (63%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{LtrBackupResponse.java => BackupsLongTermRetentionResponse.java} (85%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/{fluent/LtrBackupOperationsClient.java => models/BackupsLongTermRetentions.java} (52%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{FlexibleServersTriggerLtrPreBackupHeaders.java => BackupsLongTermRetentionsCheckPrerequisitesHeaders.java} (72%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{FlexibleServersTriggerLtrPreBackupResponse.java => BackupsLongTermRetentionsCheckPrerequisitesResponse.java} (60%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cancel.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CancelEnum.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{LocationBasedCapabilities.java => CapabilitiesByLocations.java} (65%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{ServerCapabilities.java => CapabilitiesByServers.java} (65%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Capability.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{CapabilitiesListResult.java => CapabilityList.java} (55%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{LogFile.java => CapturedLog.java} (80%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogList.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{LogFiles.java => CapturedLogs.java} (70%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilities.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityWithLocations.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigTuningRequestParameter.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{ConfigurationListResult.java => ConfigurationList.java} (62%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForPatch.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForUpdate.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryptionType.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{DatabaseListResult.java => DatabaseList.java} (63%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{DbMigrationStatus.java => DatabaseMigrationState.java} (60%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/EncryptionKeyStatus.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupport.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupportedEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FeatureStatus.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{FirewallRuleListResult.java => FirewallRuleList.java} (62%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerCapability.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServers.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoBackupSupportedEnum.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoRedundantBackupEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackup.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackupSupport.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HaMode.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityForPatch.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityState.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationListResult.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/KeyStatusEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationRestricted.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceDbEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceServer.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindowForPatch.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MicrosoftEntraAuth.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesAndPermissions.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesEnum.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{MigrationResource.java => Migration.java} (51%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDatabaseState.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDbState.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{MigrationResourceListResult.java => MigrationList.java} (53%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{MigrationNameAvailabilityResource.java => MigrationNameAvailability.java} (65%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParametersForPatch.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{MigrationSubState.java => MigrationSubstate.java} (51%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{MigrationSubStateDetails.java => MigrationSubstateDetails.java} (63%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilities.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{NameAvailability.java => NameAvailabilityModel.java} (67%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{IndexRecommendationResource.java => ObjectRecommendation.java} (59%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{IndexRecommendationDetails.java => ObjectRecommendationDetails.java} (70%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{SessionDetailsListResult.java => ObjectRecommendationList.java} (56%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{IndexRecommendationResourcePropertiesAnalyzedWorkload.java => ObjectRecommendationPropertiesAnalyzedWorkload.java} (55%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{IndexRecommendationResourcePropertiesImplementationDetails.java => ObjectRecommendationPropertiesImplementationDetails.java} (54%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineResizeSupportedEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineStorageResizeSupport.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{OperationListResult.java => OperationList.java} (64%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Origin.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDatabasesOnTargetServer.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDbsInTargetEnum.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordAuthEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordBasedAuth.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PostgresMajorVersion.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{GetPrivateDnsZoneSuffixes.java => PrivateDnsZoneSuffixes.java} (69%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{PrivateEndpointConnectionListResult.java => PrivateEndpointConnectionList.java} (58%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionOperations.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{PrivateLinkResourceListResult.java => PrivateLinkResourceList.java} (64%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{QuotaUsagesListResult.java => QuotaUsageList.java} (66%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteOption.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationType.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeParameterEnum.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationPromoteOption.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ResourceProviders.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestrictedEnum.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{FlexibleServerEditionCapability.java => ServerEditionCapability.java} (65%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{ServerForUpdate.java => ServerForPatch.java} (57%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerHAState.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{ServerListResult.java => ServerList.java} (70%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionListResult.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersion.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionDetailsResource.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionResource.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionsListResult.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuForPatch.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigration.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigrationEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupport.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupportedEnum.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeatureStatusEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TriggerCutover.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TriggerCutoverEnum.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningIndexes.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionParameterEnum.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{LogFileListResult.java => TuningOptionsList.java} (61%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsListResult.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsOperations.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsResource.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{VirtualEndpointResource.java => VirtualEndpoint.java} (66%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{ServerBackupListResult.java => VirtualEndpointsList.java} (57%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointsListResult.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/{VirtualNetworkSubnetUsageResult.java => VirtualNetworkSubnetUsageModel.java} (83%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHaAndGeoBackupSupportedEnum.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHaSupportedEnum.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilitySupport.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsDeleteSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsGetSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsListByServerSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{AdministratorsCreateSamples.java => AdministratorsMicrosoftEntraCreateOrUpdateSamples.java} (58%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{PrivateEndpointConnectionOperationDeleteSamples.java => AdministratorsMicrosoftEntraDeleteSamples.java} (51%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraGetSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraListByServerSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{ServerThreatProtectionSettingsGetSamples.java => AdvancedThreatProtectionSettingsGetSamples.java} (56%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandCreateSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{LtrBackupOperationsListByServerSamples.java => BackupsAutomaticAndOnDemandDeleteSamples.java} (50%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandGetSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandListByServerSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsDeleteSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsGetSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsListByServerSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{FlexibleServerTriggerLtrPreBackupSamples.java => BackupsLongTermRetentionCheckPrerequisitesSamples.java} (50%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionGetSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionListByServerSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{FlexibleServerStartLtrBackupSamples.java => BackupsLongTermRetentionStartSamples.java} (56%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationListSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServerListSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{BackupsCreateSamples.java => CapturedLogsListByServerSamples.java} (54%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityExecuteSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityWithLocationExecuteSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/GetPrivateDnsZoneSuffixExecuteSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LocationBasedCapabilitiesExecuteSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LogFilesListByServerSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrBackupOperationsGetSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{MigrationsDeleteSamples.java => MigrationsCancelSamples.java} (54%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilitySamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckGloballySamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckWithLocationSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{ServerCapabilitiesListSamples.java => PrivateDnsZoneSuffixGetSamples.java} (56%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsDeleteSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{PrivateEndpointConnectionOperationUpdateSamples.java => PrivateEndpointConnectionsUpdateSamples.java} (75%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ResourceProviderCheckMigrationNameAvailabilitySamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsListByServerSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateOrUpdateSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationDisableSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationEnableSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationListSessionDetailsSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationListSessionsSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationStartSessionSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationStopSessionSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningIndexListRecommendationsSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsGetSamples.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListByServerSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationGetSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListByServerSamples.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListRecommendationsSamples.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{VirtualNetworkSubnetUsageExecuteSamples.java => VirtualNetworkSubnetUsageListSamples.java} (50%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraAddTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesForAddTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsDeleteMockTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{AdministratorsCreateMockTests.java => AdministratorsMicrosoftEntrasCreateOrUpdateMockTests.java} (58%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{AdministratorsGetWithResponseMockTests.java => AdministratorsMicrosoftEntrasGetWithResponseMockTests.java} (64%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{AdministratorsListByServerMockTests.java => AdministratorsMicrosoftEntrasListByServerMockTests.java} (66%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{ServerThreatProtectionSettingsGetWithResponseMockTests.java => AdvancedThreatProtectionSettingsGetWithResponseMockTests.java} (72%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{ServerThreatProtectionSettingsListByServerMockTests.java => AdvancedThreatProtectionSettingsListByServerMockTests.java} (78%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsModelInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsPropertiesTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandPropertiesTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupForPatchTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupRequestBaseTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupSettingsTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupStoreDetailsTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{BackupsCreateMockTests.java => BackupsAutomaticAndOnDemandsCreateMockTests.java} (68%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{BackupsGetWithResponseMockTests.java => BackupsAutomaticAndOnDemandsGetWithResponseMockTests.java} (67%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{BackupsListByServerMockTests.java => BackupsAutomaticAndOnDemandsListByServerMockTests.java} (68%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionRequestTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionResponsePropertiesTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{FlexibleServersTriggerLtrPreBackupWithResponseMockTests.java => BackupsLongTermRetentionsCheckPrerequisitesWithResponseMockTests.java} (70%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationsListMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServersListMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityBaseTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogPropertiesTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{LogFilesListByServerMockTests.java => CapturedLogsListByServerMockTests.java} (63%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityRequestTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityResponseTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ClusterTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationForUpdateTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationPropertiesTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseMigrationStateTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasePropertiesTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbLevelValidationStatusTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbServerMetadataTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DelegatedSubnetUsageTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FastProvisioningEditionCapabilityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulePropertiesTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityForPatchTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ImpactRecordTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LocationBasedCapabilitiesExecuteMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupRequestTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupResponseInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowForPatchTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationNameAvailabilityInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationStatusTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationSubstateDetailsTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{ResourceProvidersCheckMigrationNameAvailabilityWithRMockTests.java => MigrationsCheckNameAvailabilityWithResponseMockTests.java} (64%) delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsDeleteWithResponseMockTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{CheckNameAvailabilityWithLocationsExecuteWithResponseMockTests.java => NameAvailabilitiesCheckGloballyWithResponseMockTests.java} (70%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{CheckNameAvailabilitiesExecuteWithResponseMockTests.java => NameAvailabilitiesCheckWithLocationWithResponseMockTests.java} (71%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityModelInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NamePropertyTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NetworkTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationDetailsTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesAnalyzedWorkloadTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesImplementationDetailsTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationDisplayTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationListTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{GetPrivateDnsZoneSuffixesExecuteWithResponseMockTests.java => PrivateDnsZoneSuffixesGetWithResponseMockTests.java} (75%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionPropertiesTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{PrivateEndpointConnectionOperationsUpdateMockTests.java => PrivateEndpointConnectionsUpdateMockTests.java} (96%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcePropertiesTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkServiceConnectionStateTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicaTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/RestartParameterTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerCapabilitiesListMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerEditionCapabilityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuCapabilityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerVersionCapabilityTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteMockTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartMockTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartMockTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuForPatchTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageEditionCapabilityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageMbCapabilityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTierCapabilityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SupportedFeatureTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationsListSessionDetailsMockTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationsListSessionsMockTests.java delete mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningIndexesListRecommendationsMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{TuningOptionsGetWithResponseMockTests.java => TuningOptionsOperationsGetWithResponseMockTests.java} (76%) rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{TuningOptionsListByServerMockTests.java => TuningOptionsOperationsListByServerMockTests.java} (78%) create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListRecommendationsMockTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserAssignedIdentityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserIdentityTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationDetailsTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationMessageTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationSummaryItemTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourceForPatchTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourcePropertiesTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageModelInnerTests.java create mode 100644 sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageParameterTests.java rename sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/{VirtualNetworkSubnetUsagesExecuteWithResponseMockTests.java => VirtualNetworkSubnetUsagesListWithResponseMockTests.java} (68%) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index ef0d1024d395..4cd240170f10 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -379,7 +379,7 @@ com.azure.resourcemanager:azure-resourcemanager-imagebuilder;1.2.0;1.3.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-maps;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-botservice;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-recoveryservicesbackup;1.6.0;1.7.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-postgresqlflexibleserver;1.1.0;1.2.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-postgresqlflexibleserver;1.1.0;2.0.0 com.azure.resourcemanager:azure-resourcemanager-deviceprovisioningservices;1.1.0;1.2.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-elastic;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-webpubsub;1.1.0;1.2.0-beta.1 diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md index de3b51c879cb..00f8c44e8888 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md @@ -1,14 +1,292 @@ # Release History -## 1.2.0-beta.2 (Unreleased) +## 2.0.0 (2025-11-21) -### Features Added +- Azure Resource Manager PostgreSql client library for Java. This package contains Microsoft Azure SDK for PostgreSql Management SDK. The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2025-08-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### Renamed Models + +* `models.ServerHAState` -> `models.HighAvailabilityState` +* `models.AzureManagedDiskPerformanceTiers` -> `models.AzureManagedDiskPerformanceTier` +* `models.ServerVersion` -> `models.PostgresMajorVersion` +* `models.GeoRedundantBackupEnum` -> `models.GeographicallyRedundantBackup` +* `models.ReplicationPromoteOption` -> `models.ReadReplicaPromoteOption` +* `models.KeyStatusEnum` -> `models.EncryptionKeyStatus` +* `models.ArmServerKeyType` -> `models.DataEncryptionType` +* `models.PasswordAuthEnum` -> `models.PasswordBasedAuth` +* `models.ActiveDirectoryAuthEnum` -> `models.MicrosoftEntraAuth` +* `models.CancelEnum` -> `models.Cancel` +* `models.LogicalReplicationOnSourceDbEnum` -> `models.LogicalReplicationOnSourceServer` +* `models.TriggerCutoverEnum` -> `models.TriggerCutover` +* `models.StartDataMigrationEnum` -> `models.StartDataMigration` +* `models.OverwriteDbsInTargetEnum` -> `models.OverwriteDatabasesOnTargetServer` +* `models.MigrateRolesEnum` -> `models.MigrateRolesAndPermissions` +* `models.MigrationSubStateDetails` -> `models.MigrationSubstateDetails` +* `models.MigrationResource` (and related Definition/Update stage types) -> `models.Migration` +* `models.VirtualEndpointResource` (and related Definition/Update stage types) -> `models.VirtualEndpoint` +* `models.ServerThreatProtectionSettingsModel` (and related Definition/Update stage types) -> `models.AdvancedThreatProtectionSettingsModel` +* `models.ActiveDirectoryAdministrator` (and related Add/Definition/Update stage types & list/plural forms) -> `models.AdministratorMicrosoftEntra` + +#### `models.Backup` was modified + +* `withGeoRedundantBackup(models.GeoRedundantBackupEnum)` was removed +* `models.GeoRedundantBackupEnum geoRedundantBackup()` -> `models.GeographicallyRedundantBackup geoRedundantBackup()` + +#### `models.Operations` was modified + +* `models.OperationListResult list()` -> `com.azure.core.http.rest.PagedIterable list()` +* `listWithResponse(com.azure.core.util.Context)` was removed + +#### `models.Server$Update` was modified + +* `withAdministratorLogin(java.lang.String)` was removed +* `withAuthConfig(models.AuthConfig)` was removed +* `withMaintenanceWindow(models.MaintenanceWindow)` was removed +* `withHighAvailability(models.HighAvailability)` was removed +* `withCreateMode(models.CreateModeForUpdate)` was removed +* `withVersion(models.ServerVersion)` was removed +* `withSku(models.Sku)` was removed +* `withBackup(models.Backup)` was removed + +#### `models.Server$Definition` was modified + +* `withVersion(models.ServerVersion)` was removed + +#### `PostgreSqlManager` was modified + +* `getPrivateDnsZoneSuffixes()` was removed +* `locationBasedCapabilities()` was removed +* `administrators()` was removed +* `ltrBackupOperations()` was removed +* `checkNameAvailabilities()` was removed +* `checkNameAvailabilityWithLocations()` was removed +* `serverCapabilities()` was removed +* `flexibleServers()` was removed +* `logFiles()` was removed +* `backups()` was removed +* `privateEndpointConnectionOperations()` was removed +* `resourceProviders()` was removed + +#### `models.HighAvailability` was modified + +* `models.ServerHAState state()` -> `models.HighAvailabilityState state()` + +#### `models.Migrations` was modified + +* `getWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `models.MigrationResource getById(java.lang.String)` -> `models.Migration getById(java.lang.String)` +* `delete(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was removed +* `listByTargetServer(java.lang.String,java.lang.String,java.lang.String)` was removed +* `models.MigrationResource$DefinitionStages$Blank define(java.lang.String)` -> `models.Migration$DefinitionStages$Blank define(java.lang.String)` +* `listByTargetServer(java.lang.String,java.lang.String,java.lang.String,models.MigrationListFilter,com.azure.core.util.Context)` was removed +* `deleteWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deleteById(java.lang.String)` was removed +* `deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `get(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was removed + +#### `models.Replica` was modified + +* `models.ReplicationPromoteOption promoteOption()` -> `models.ReadReplicaPromoteOption promoteOption()` +* `withPromoteOption(models.ReplicationPromoteOption)` was removed + +#### `models.MigrationResourceForPatch` was modified + +* `models.CancelEnum cancel()` -> `models.Cancel cancel()` +* `models.LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded()` -> `models.LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded()` +* `withCancel(models.CancelEnum)` was removed +* `withSecretParameters(models.MigrationSecretParameters)` was removed +* `withTriggerCutover(models.TriggerCutoverEnum)` was removed +* `withMigrateRoles(models.MigrateRolesEnum)` was removed +* `models.TriggerCutoverEnum triggerCutover()` -> `models.TriggerCutover triggerCutover()` +* `models.MigrationSecretParameters secretParameters()` -> `models.MigrationSecretParametersForPatch secretParameters()` +* `withStartDataMigration(models.StartDataMigrationEnum)` was removed +* `models.StartDataMigrationEnum startDataMigration()` -> `models.StartDataMigration startDataMigration()` +* `models.OverwriteDbsInTargetEnum overwriteDbsInTarget()` -> `models.OverwriteDatabasesOnTargetServer overwriteDbsInTarget()` +* `withSetupLogicalReplicationOnSourceDbIfNeeded(models.LogicalReplicationOnSourceDbEnum)` was removed +* `withOverwriteDbsInTarget(models.OverwriteDbsInTargetEnum)` was removed +* `models.MigrateRolesEnum migrateRoles()` -> `models.MigrateRolesAndPermissions migrateRoles()` + +#### `models.Storage` was modified + +* `models.AzureManagedDiskPerformanceTiers tier()` -> `models.AzureManagedDiskPerformanceTier tier()` +* `withTier(models.AzureManagedDiskPerformanceTiers)` was removed + +#### `models.VirtualEndpoints` was modified + +* `models.VirtualEndpointResource getById(java.lang.String)` -> `models.VirtualEndpoint getById(java.lang.String)` +* `models.VirtualEndpointResource get(java.lang.String,java.lang.String,java.lang.String)` -> `models.VirtualEndpoint get(java.lang.String,java.lang.String,java.lang.String)` +* `models.VirtualEndpointResource$DefinitionStages$Blank define(java.lang.String)` -> `models.VirtualEndpoint$DefinitionStages$Blank define(java.lang.String)` + +#### `models.MigrationStatus` was modified + +* `models.MigrationSubStateDetails currentSubStateDetails()` -> `models.MigrationSubstateDetails currentSubStateDetails()` + +#### `models.DataEncryption` was modified + +* `withGeoBackupEncryptionKeyStatus(models.KeyStatusEnum)` was removed +* `models.KeyStatusEnum geoBackupEncryptionKeyStatus()` -> `models.EncryptionKeyStatus geoBackupEncryptionKeyStatus()` +* `models.KeyStatusEnum primaryEncryptionKeyStatus()` -> `models.EncryptionKeyStatus primaryEncryptionKeyStatus()` +* `withType(models.ArmServerKeyType)` was removed +* `withPrimaryEncryptionKeyStatus(models.KeyStatusEnum)` was removed +* `models.ArmServerKeyType type()` -> `models.DataEncryptionType type()` + +#### `models.Operation` was modified + +* `Operation()` was removed +* `java.lang.Boolean isDataAction()` -> `java.lang.Boolean isDataAction()` +* `withIsDataAction(java.lang.Boolean)` was removed +* `toJson(com.azure.json.JsonWriter)` was removed +* `java.lang.String name()` -> `java.lang.String name()` +* `models.OperationOrigin origin()` -> `models.OperationOrigin origin()` +* `fromJson(com.azure.json.JsonReader)` was removed +* `validate()` was removed +* `models.OperationDisplay display()` -> `models.OperationDisplay display()` +* `java.util.Map properties()` -> `java.util.Map properties()` + +#### `models.VirtualNetworkSubnetUsages` was modified + +* `execute(java.lang.String,models.VirtualNetworkSubnetUsageParameter)` was removed +* `executeWithResponse(java.lang.String,models.VirtualNetworkSubnetUsageParameter,com.azure.core.util.Context)` was removed + +#### `models.Server` was modified + +* `models.ServerVersion version()` -> `models.PostgresMajorVersion version()` + +#### `models.ServerThreatProtectionSettings` was modified + +* `models.ServerThreatProtectionSettingsModel$DefinitionStages$Blank define(models.ThreatProtectionName)` -> `models.AdvancedThreatProtectionSettingsModel$DefinitionStages$Blank define(models.ThreatProtectionName)` +* `getByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getById(java.lang.String)` was removed +* `listByServer(java.lang.String,java.lang.String)` was removed +* `getWithResponse(java.lang.String,java.lang.String,models.ThreatProtectionName,com.azure.core.util.Context)` was removed +* `get(java.lang.String,java.lang.String,models.ThreatProtectionName)` was removed +* `listByServer(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.AuthConfig` was modified + +* `withPasswordAuth(models.PasswordAuthEnum)` was removed +* `withActiveDirectoryAuth(models.ActiveDirectoryAuthEnum)` was removed +* `models.PasswordAuthEnum passwordAuth()` -> `models.PasswordBasedAuth passwordAuth()` +* `models.ActiveDirectoryAuthEnum activeDirectoryAuth()` -> `models.MicrosoftEntraAuth activeDirectoryAuth()` + +### Features Added + + + +#### `models.Backup` was modified + +* `withGeoRedundantBackup(models.GeographicallyRedundantBackup)` was added + +#### `models.ServerVersionCapability` was modified + +* `supportedFeatures()` was added + +#### `models.Operations` was modified + +* `list(com.azure.core.util.Context)` was added + +#### `models.Server$Update` was modified + +* `withSku(models.SkuForPatch)` was added +* `withAuthConfig(models.AuthConfigForPatch)` was added +* `withCluster(models.Cluster)` was added +* `withAvailabilityZone(java.lang.String)` was added +* `withMaintenanceWindow(models.MaintenanceWindowForPatch)` was added +* `withHighAvailability(models.HighAvailabilityForPatch)` was added +* `withBackup(models.BackupForPatch)` was added +* `withCreateMode(models.CreateModeForPatch)` was added +* `withVersion(models.PostgresMajorVersion)` was added + +#### `models.Server$Definition` was modified + +* `withCluster(models.Cluster)` was added +* `withVersion(models.PostgresMajorVersion)` was added + +#### `PostgreSqlManager` was modified + +* `advancedThreatProtectionSettings()` was added +* `capabilitiesByServers()` was added +* `administratorsMicrosoftEntras()` was added +* `quotaUsages()` was added +* `capabilitiesByLocations()` was added +* `nameAvailabilities()` was added +* `backupsAutomaticAndOnDemands()` was added +* `backupsLongTermRetentions()` was added +* `capturedLogs()` was added +* `tuningOptionsOperations()` was added +* `privateDnsZoneSuffixes()` was added + +#### `models.Migrations` was modified + +* `checkNameAvailability(java.lang.String,java.lang.String,fluent.models.MigrationNameAvailabilityInner)` was added +* `listByTargetServer(java.lang.String,java.lang.String,models.MigrationListFilter,com.azure.core.util.Context)` was added +* `checkNameAvailabilityWithResponse(java.lang.String,java.lang.String,fluent.models.MigrationNameAvailabilityInner,com.azure.core.util.Context)` was added +* `getWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `cancelWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `listByTargetServer(java.lang.String,java.lang.String)` was added +* `get(java.lang.String,java.lang.String,java.lang.String)` was added +* `cancel(java.lang.String,java.lang.String,java.lang.String)` was added + +#### `models.Replica` was modified + +* `withPromoteOption(models.ReadReplicaPromoteOption)` was added + +#### `models.MigrationResourceForPatch` was modified + +* `withOverwriteDbsInTarget(models.OverwriteDatabasesOnTargetServer)` was added +* `withCancel(models.Cancel)` was added +* `withTriggerCutover(models.TriggerCutover)` was added +* `withStartDataMigration(models.StartDataMigration)` was added +* `withSecretParameters(models.MigrationSecretParametersForPatch)` was added +* `withSetupLogicalReplicationOnSourceDbIfNeeded(models.LogicalReplicationOnSourceServer)` was added +* `withMigrateRoles(models.MigrateRolesAndPermissions)` was added + +#### `models.Storage` was modified + +* `withTier(models.AzureManagedDiskPerformanceTier)` was added + +#### `models.UserAssignedIdentity` was modified + +* `principalId()` was added +* `withPrincipalId(java.lang.String)` was added + +#### `models.PrivateEndpointConnections` was modified + +* `delete(java.lang.String,java.lang.String,java.lang.String)` was added +* `delete(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `update(java.lang.String,java.lang.String,java.lang.String,fluent.models.PrivateEndpointConnectionInner)` was added +* `update(java.lang.String,java.lang.String,java.lang.String,fluent.models.PrivateEndpointConnectionInner,com.azure.core.util.Context)` was added + +#### `models.DataEncryption` was modified + +* `withGeoBackupEncryptionKeyStatus(models.EncryptionKeyStatus)` was added +* `withPrimaryEncryptionKeyStatus(models.EncryptionKeyStatus)` was added +* `withType(models.DataEncryptionType)` was added + +#### `models.ServerSkuCapability` was modified + +* `supportedFeatures()` was added +* `securityProfile()` was added + +#### `models.Operation` was modified + +* `innerModel()` was added + +#### `models.VirtualNetworkSubnetUsages` was modified + +* `list(java.lang.String,models.VirtualNetworkSubnetUsageParameter)` was added +* `listWithResponse(java.lang.String,models.VirtualNetworkSubnetUsageParameter,com.azure.core.util.Context)` was added + +#### `models.Server` was modified + +* `cluster()` was added + +#### `models.AuthConfig` was modified -### Other Changes +* `withPasswordAuth(models.PasswordBasedAuth)` was added +* `withActiveDirectoryAuth(models.MicrosoftEntraAuth)` was added ## 1.2.0-beta.1 (2025-05-16) diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md index 71ee8f12e634..a258ac45fa91 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md @@ -2,7 +2,7 @@ Azure Resource Manager PostgreSql client library for Java. -This package contains Microsoft Azure SDK for PostgreSql Management SDK. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2025-01-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for PostgreSql Management SDK. The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2025-08-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-postgresqlflexibleserver - 1.2.0-beta.1 + 2.0.0 ``` [//]: # ({x-version-update-end}) @@ -78,17 +78,17 @@ server = postgreSqlManager.servers() .withAdministratorLogin(adminName) .withAdministratorLoginPassword(adminPwd) .withSku(new Sku().withName("Standard_D2ds_v4").withTier(SkuTier.GENERAL_PURPOSE)) - .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(ActiveDirectoryAuthEnum.DISABLED) - .withPasswordAuth(PasswordAuthEnum.ENABLED)) - .withIdentity(new UserAssignedIdentity().withType(IdentityType.NONE)) - .withDataEncryption(new DataEncryption().withType(ArmServerKeyType.SYSTEM_MANAGED)) - .withVersion(ServerVersion.ONE_FOUR) + .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(MicrosoftEntraAuth.DISABLED) + .withPasswordAuth(PasswordBasedAuth.ENABLED)) + .withIdentity(new UserAssignedIdentity().withType(IdentityType.NONE)) + .withDataEncryption(new DataEncryption().withType(DataEncryptionType.SYSTEM_MANAGED)) + .withVersion(PostgresMajorVersion.ONE_FOUR) .withAvailabilityZone("2") .withStorage(new Storage().withStorageSizeGB(128)) - .withBackup( - new Backup().withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED).withBackupRetentionDays(7)) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.DISABLED)) - .withReplicationRole(ReplicationRole.PRIMARY) + .withBackup(new Backup().withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED) + .withBackupRetentionDays(7)) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.SAME_ZONE)) + .withReplicationRole(ReplicationRole.PRIMARY) .create(); ``` [Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md) diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md index 7421be2ef126..4643e63aa74d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md @@ -1,27 +1,43 @@ # Code snippets and samples -## Administrators +## AdministratorsMicrosoftEntra -- [Create](#administrators_create) -- [Delete](#administrators_delete) -- [Get](#administrators_get) -- [ListByServer](#administrators_listbyserver) +- [CreateOrUpdate](#administratorsmicrosoftentra_createorupdate) +- [Delete](#administratorsmicrosoftentra_delete) +- [Get](#administratorsmicrosoftentra_get) +- [ListByServer](#administratorsmicrosoftentra_listbyserver) -## Backups +## AdvancedThreatProtectionSettings -- [Create](#backups_create) -- [Delete](#backups_delete) -- [Get](#backups_get) -- [ListByServer](#backups_listbyserver) +- [Get](#advancedthreatprotectionsettings_get) +- [ListByServer](#advancedthreatprotectionsettings_listbyserver) -## CheckNameAvailability +## BackupsAutomaticAndOnDemand -- [Execute](#checknameavailability_execute) +- [Create](#backupsautomaticandondemand_create) +- [Delete](#backupsautomaticandondemand_delete) +- [Get](#backupsautomaticandondemand_get) +- [ListByServer](#backupsautomaticandondemand_listbyserver) -## CheckNameAvailabilityWithLocation +## BackupsLongTermRetention -- [Execute](#checknameavailabilitywithlocation_execute) +- [CheckPrerequisites](#backupslongtermretention_checkprerequisites) +- [Get](#backupslongtermretention_get) +- [ListByServer](#backupslongtermretention_listbyserver) +- [Start](#backupslongtermretention_start) + +## CapabilitiesByLocation + +- [List](#capabilitiesbylocation_list) + +## CapabilitiesByServer + +- [List](#capabilitiesbyserver_list) + +## CapturedLogs + +- [ListByServer](#capturedlogs_listbyserver) ## Configurations @@ -44,49 +60,34 @@ - [Get](#firewallrules_get) - [ListByServer](#firewallrules_listbyserver) -## FlexibleServer - -- [StartLtrBackup](#flexibleserver_startltrbackup) -- [TriggerLtrPreBackup](#flexibleserver_triggerltrprebackup) - -## GetPrivateDnsZoneSuffix - -- [Execute](#getprivatednszonesuffix_execute) - -## LocationBasedCapabilities - -- [Execute](#locationbasedcapabilities_execute) - -## LogFiles - -- [ListByServer](#logfiles_listbyserver) - -## LtrBackupOperations - -- [Get](#ltrbackupoperations_get) -- [ListByServer](#ltrbackupoperations_listbyserver) - ## Migrations +- [Cancel](#migrations_cancel) +- [CheckNameAvailability](#migrations_checknameavailability) - [Create](#migrations_create) -- [Delete](#migrations_delete) - [Get](#migrations_get) - [ListByTargetServer](#migrations_listbytargetserver) - [Update](#migrations_update) +## NameAvailability + +- [CheckGlobally](#nameavailability_checkglobally) +- [CheckWithLocation](#nameavailability_checkwithlocation) + ## Operations - [List](#operations_list) -## PrivateEndpointConnectionOperation +## PrivateDnsZoneSuffix -- [Delete](#privateendpointconnectionoperation_delete) -- [Update](#privateendpointconnectionoperation_update) +- [Get](#privatednszonesuffix_get) ## PrivateEndpointConnections +- [Delete](#privateendpointconnections_delete) - [Get](#privateendpointconnections_get) - [ListByServer](#privateendpointconnections_listbyserver) +- [Update](#privateendpointconnections_update) ## PrivateLinkResources @@ -101,23 +102,9 @@ - [ListByServer](#replicas_listbyserver) -## ResourceProvider - -- [CheckMigrationNameAvailability](#resourceprovider_checkmigrationnameavailability) - -## ServerCapabilities - -- [List](#servercapabilities_list) - -## ServerThreatProtectionSettings - -- [CreateOrUpdate](#serverthreatprotectionsettings_createorupdate) -- [Get](#serverthreatprotectionsettings_get) -- [ListByServer](#serverthreatprotectionsettings_listbyserver) - ## Servers -- [Create](#servers_create) +- [CreateOrUpdate](#servers_createorupdate) - [Delete](#servers_delete) - [GetByResourceGroup](#servers_getbyresourcegroup) - [List](#servers_list) @@ -127,23 +114,11 @@ - [Stop](#servers_stop) - [Update](#servers_update) -## TuningConfiguration +## TuningOptionsOperation -- [Disable](#tuningconfiguration_disable) -- [Enable](#tuningconfiguration_enable) -- [ListSessionDetails](#tuningconfiguration_listsessiondetails) -- [ListSessions](#tuningconfiguration_listsessions) -- [StartSession](#tuningconfiguration_startsession) -- [StopSession](#tuningconfiguration_stopsession) - -## TuningIndex - -- [ListRecommendations](#tuningindex_listrecommendations) - -## TuningOptions - -- [Get](#tuningoptions_get) -- [ListByServer](#tuningoptions_listbyserver) +- [Get](#tuningoptionsoperation_get) +- [ListByServer](#tuningoptionsoperation_listbyserver) +- [ListRecommendations](#tuningoptionsoperation_listrecommendations) ## VirtualEndpoints @@ -155,1275 +130,1547 @@ ## VirtualNetworkSubnetUsage -- [Execute](#virtualnetworksubnetusage_execute) -### Administrators_Create +- [List](#virtualnetworksubnetusage_list) +### AdministratorsMicrosoftEntra_CreateOrUpdate ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigTuningRequestParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; /** - * Samples for TuningConfiguration StartSession. + * Samples for AdministratorsMicrosoftEntra CreateOrUpdate. */ -public final class TuningConfigurationStartSessionSamples { +public final class AdministratorsMicrosoftEntraCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_StartSession.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdministratorsMicrosoftEntraAdd.json */ /** - * Sample code: TuningConfiguration_StartSession. + * Sample code: Add a server administrator associated to a Microsoft Entra principal. * * @param manager Entry point to PostgreSqlManager. */ - public static void - tuningConfigurationStartSession(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .startSession("testrg", "testserver", TuningOptionEnum.CONFIGURATION, - new ConfigTuningRequestParameter().withAllowServerRestarts(false) - .withTargetImprovementMetric("targetImprovementMetric"), - com.azure.core.util.Context.NONE); + public static void addAServerAdministratorAssociatedToAMicrosoftEntraPrincipal( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.administratorsMicrosoftEntras() + .define("oooooooo-oooo-oooo-oooo-oooooooooooo") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withPrincipalType(PrincipalType.USER) + .withPrincipalName("exampleuser@contoso.com") + .withTenantId("tttttttt-tttt-tttt-tttt-tttttttttttt") + .create(); } } ``` -### Administrators_Delete +### AdministratorsMicrosoftEntra_Delete ```java /** - * Samples for LtrBackupOperations ListByServer. + * Samples for AdministratorsMicrosoftEntra Delete. */ -public final class LtrBackupOperationsListByServerSamples { +public final class AdministratorsMicrosoftEntraDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LongTermRetentionOperationListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdministratorsMicrosoftEntraDelete.json */ /** - * Sample code: Sample List of Long Tern Retention Operations by Flexible Server. + * Sample code: Delete a server administrator associated to a Microsoft Entra principal. * * @param manager Entry point to PostgreSqlManager. */ - public static void sampleListOfLongTernRetentionOperationsByFlexibleServer( + public static void deleteAServerAdministratorAssociatedToAMicrosoftEntraPrincipal( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.ltrBackupOperations() - .listByServer("rgLongTermRetention", "pgsqlltrtestserver", com.azure.core.util.Context.NONE); + manager.administratorsMicrosoftEntras() + .delete("exampleresourcegroup", "exampleserver", "oooooooo-oooo-oooo-oooo-oooooooooooo", + com.azure.core.util.Context.NONE); } } ``` -### Administrators_Get +### AdministratorsMicrosoftEntra_Get ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; - /** - * Samples for FlexibleServer TriggerLtrPreBackup. + * Samples for AdministratorsMicrosoftEntra Get. */ -public final class FlexibleServerTriggerLtrPreBackupSamples { +public final class AdministratorsMicrosoftEntraGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LongTermRetentionPreBackup.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdministratorsMicrosoftEntraGet.json */ /** - * Sample code: Sample_Prebackup. + * Sample code: Get information about a server administrator associated to a Microsoft Entra principal. * * @param manager Entry point to PostgreSqlManager. */ - public static void samplePrebackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.flexibleServers() - .triggerLtrPreBackupWithResponse("rgLongTermRetention", "pgsqlltrtestserver", - new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("backup1")), + public static void getInformationAboutAServerAdministratorAssociatedToAMicrosoftEntraPrincipal( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.administratorsMicrosoftEntras() + .getWithResponse("exampleresourcegroup", "exampleserver", "oooooooo-oooo-oooo-oooo-oooooooooooo", com.azure.core.util.Context.NONE); } } ``` -### Administrators_ListByServer +### AdministratorsMicrosoftEntra_ListByServer ```java /** - * Samples for Servers Delete. + * Samples for AdministratorsMicrosoftEntra ListByServer. */ -public final class ServersDeleteSamples { +public final class AdministratorsMicrosoftEntraListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdministratorsMicrosoftEntraListByServer.json */ /** - * Sample code: ServerDelete. + * Sample code: List information about all server administrators associated to Microsoft Entra principals. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().delete("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void listInformationAboutAllServerAdministratorsAssociatedToMicrosoftEntraPrincipals( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.administratorsMicrosoftEntras() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### Backups_Create +### AdvancedThreatProtectionSettings_Get ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.FailoverMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; /** - * Samples for Servers Restart. + * Samples for AdvancedThreatProtectionSettings Get. */ -public final class ServersRestartSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerRestart.json - */ - /** - * Sample code: ServerRestart. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void serverRestart(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().restart("testrg", "testserver", null, com.azure.core.util.Context.NONE); - } - +public final class AdvancedThreatProtectionSettingsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerRestartWithFailover.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdvancedThreatProtectionSettingsGet.json */ /** - * Sample code: ServerRestartWithFailover. + * Sample code: Get state of advanced threat protection settings for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - serverRestartWithFailover(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .restart("testrg", "testserver", - new RestartParameter().withRestartWithFailover(true).withFailoverMode(FailoverMode.FORCED_FAILOVER), + public static void getStateOfAdvancedThreatProtectionSettingsForAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.advancedThreatProtectionSettings() + .getWithResponse("exampleresourcegroup", "exampleserver", ThreatProtectionName.DEFAULT, com.azure.core.util.Context.NONE); } } ``` -### Backups_Delete +### AdvancedThreatProtectionSettings_ListByServer ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; - /** - * Samples for CheckNameAvailabilityWithLocation Execute. + * Samples for AdvancedThreatProtectionSettings ListByServer. */ -public final class CheckNameAvailabilityWithLocationExecuteSamples { +public final class AdvancedThreatProtectionSettingsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * CheckNameAvailabilityLocationBased.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdvancedThreatProtectionSettingsListByServer.json */ /** - * Sample code: NameAvailability. + * Sample code: List state of advanced threat protection settings for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void nameAvailability(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.checkNameAvailabilityWithLocations() - .executeWithResponse("westus", new CheckNameAvailabilityRequest().withName("name1") - .withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE); + public static void listStateOfAdvancedThreatProtectionSettingsForAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.advancedThreatProtectionSettings() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### Backups_Get +### BackupsAutomaticAndOnDemand_Create ```java /** - * Samples for LocationBasedCapabilities Execute. + * Samples for BackupsAutomaticAndOnDemand Create. */ -public final class LocationBasedCapabilitiesExecuteSamples { +public final class BackupsAutomaticAndOnDemandCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * CapabilitiesByLocation.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsAutomaticAndOnDemandCreate.json */ /** - * Sample code: CapabilitiesList. + * Sample code: Create an on demand backup of a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void capabilitiesList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.locationBasedCapabilities().execute("eastus", com.azure.core.util.Context.NONE); + public static void + createAnOnDemandBackupOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsAutomaticAndOnDemands() + .create("exampleresourcegroup", "exampleserver", "ondemandbackup-20250601T183022", + com.azure.core.util.Context.NONE); } } ``` -### Backups_ListByServer +### BackupsAutomaticAndOnDemand_Delete ```java /** - * Samples for VirtualEndpoints Delete. + * Samples for BackupsAutomaticAndOnDemand Delete. */ -public final class VirtualEndpointsDeleteSamples { +public final class BackupsAutomaticAndOnDemandDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * VirtualEndpointDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsAutomaticAndOnDemandDelete.json */ /** - * Sample code: Delete a virtual endpoint. + * Sample code: Delete an on demand backup, given its name. * * @param manager Entry point to PostgreSqlManager. */ - public static void - deleteAVirtualEndpoint(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.virtualEndpoints() - .delete("testrg", "pgtestsvc4", "pgVirtualEndpoint1", com.azure.core.util.Context.NONE); + public static void deleteAnOnDemandBackupGivenItsName( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsAutomaticAndOnDemands() + .delete("exampleresourcegroup", "exampleserver", "ondemandbackup-20250601T183022", + com.azure.core.util.Context.NONE); } } ``` -### CheckNameAvailability_Execute +### BackupsAutomaticAndOnDemand_Get ```java /** - * Samples for Backups Create. + * Samples for BackupsAutomaticAndOnDemand Get. */ -public final class BackupsCreateSamples { +public final class BackupsAutomaticAndOnDemandGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * BackupCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsAutomaticAndOnDemandGet.json */ /** - * Sample code: Create a new Backup for a flexible server. + * Sample code: Get an on demand backup, given its name. * * @param manager Entry point to PostgreSqlManager. */ - public static void createANewBackupForAFlexibleServer( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.backups() - .create("TestGroup", "postgresqltestserver", "backup_20250303T160516", com.azure.core.util.Context.NONE); + public static void + getAnOnDemandBackupGivenItsName(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsAutomaticAndOnDemands() + .getWithResponse("exampleresourcegroup", "exampleserver", "backup_638830782181266873", + com.azure.core.util.Context.NONE); } } ``` -### CheckNameAvailabilityWithLocation_Execute +### BackupsAutomaticAndOnDemand_ListByServer ```java /** - * Samples for Administrators ListByServer. + * Samples for BackupsAutomaticAndOnDemand ListByServer. */ -public final class AdministratorsListByServerSamples { +public final class BackupsAutomaticAndOnDemandListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * AdministratorsListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsAutomaticAndOnDemandListByServer.json */ /** - * Sample code: AdministratorsListByServer. + * Sample code: List all available backups of a server. * * @param manager Entry point to PostgreSqlManager. */ public static void - administratorsListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.administrators().listByServer("testrg", "pgtestsvc1", com.azure.core.util.Context.NONE); + listAllAvailableBackupsOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsAutomaticAndOnDemands() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### Configurations_Get +### BackupsLongTermRetention_CheckPrerequisites ```java +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; + /** - * Samples for VirtualEndpoints ListByServer. + * Samples for BackupsLongTermRetention CheckPrerequisites. */ -public final class VirtualEndpointsListByServerSamples { +public final class BackupsLongTermRetentionCheckPrerequisitesSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * VirtualEndpointsListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsLongTermRetentionCheckPrerequisites.json */ /** - * Sample code: VirtualEndpointListByServer. + * Sample code: Perform all checks required for a long term retention backup operation to succeed. * * @param manager Entry point to PostgreSqlManager. */ - public static void - virtualEndpointListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.virtualEndpoints().listByServer("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE); + public static void performAllChecksRequiredForALongTermRetentionBackupOperationToSucceed( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsLongTermRetentions() + .checkPrerequisitesWithResponse("exampleresourcegroup", "exampleserver", + new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("exampleltrbackup")), + com.azure.core.util.Context.NONE); } } ``` -### Configurations_ListByServer +### BackupsLongTermRetention_Get ```java /** - * Samples for LtrBackupOperations Get. + * Samples for BackupsLongTermRetention Get. */ -public final class LtrBackupOperationsGetSamples { +public final class BackupsLongTermRetentionGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LongTermRetentionOperationGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsLongTermRetentionGet.json */ /** - * Sample code: Sample. + * Sample code: Get the results of a long retention backup operation for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void sample(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.ltrBackupOperations() - .getWithResponse("rgLongTermRetention", "pgsqlltrtestserver", "backup1", com.azure.core.util.Context.NONE); + public static void getTheResultsOfALongRetentionBackupOperationForAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsLongTermRetentions() + .getWithResponse("exampleresourcegroup", "exampleserver", "exampleltrbackup", + com.azure.core.util.Context.NONE); } } ``` -### Configurations_Put +### BackupsLongTermRetention_ListByServer ```java /** - * Samples for LogFiles ListByServer. + * Samples for BackupsLongTermRetention ListByServer. */ -public final class LogFilesListByServerSamples { +public final class BackupsLongTermRetentionListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LogFilesListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsLongTermRetentionListByServer.json */ /** - * Sample code: List all server log files for a server. + * Sample code: List the results of the long term retention backup operations for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - listAllServerLogFilesForAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.logFiles().listByServer("testrg", "postgresqltestsvc1", com.azure.core.util.Context.NONE); + public static void listTheResultsOfTheLongTermRetentionBackupOperationsForAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsLongTermRetentions() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### Configurations_Update +### BackupsLongTermRetention_Start ```java +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupStoreDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionRequest; +import java.util.Arrays; + /** - * Samples for Servers ListByResourceGroup. + * Samples for BackupsLongTermRetention Start. */ -public final class ServersListByResourceGroupSamples { +public final class BackupsLongTermRetentionStartSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerListByResourceGroup.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsLongTermRetentionStart.json */ /** - * Sample code: ServerListByResourceGroup. + * Sample code: Initiate a long term retention backup. * * @param manager Entry point to PostgreSqlManager. */ public static void - serverListByResourceGroup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().listByResourceGroup("testrgn", com.azure.core.util.Context.NONE); + initiateALongTermRetentionBackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsLongTermRetentions() + .start("exampleresourcegroup", "exampleserver", + new BackupsLongTermRetentionRequest() + .withBackupSettings(new BackupSettings().withBackupName("exampleltrbackup")) + .withTargetDetails(new BackupStoreDetails().withSasUriList(Arrays.asList("sasuri"))), + com.azure.core.util.Context.NONE); } } ``` -### Databases_Create +### CapabilitiesByLocation_List ```java /** - * Samples for Backups ListByServer. + * Samples for CapabilitiesByLocation List. */ -public final class BackupsListByServerSamples { +public final class CapabilitiesByLocationListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * BackupListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * CapabilitiesByLocationList.json */ /** - * Sample code: List backups for a server. + * Sample code: List the capabilities available in a given location for a specific subscription. * * @param manager Entry point to PostgreSqlManager. */ - public static void - listBackupsForAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.backups().listByServer("TestGroup", "postgresqltestserver", com.azure.core.util.Context.NONE); + public static void listTheCapabilitiesAvailableInAGivenLocationForASpecificSubscription( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.capabilitiesByLocations().list("eastus", com.azure.core.util.Context.NONE); } } ``` -### Databases_Delete +### CapabilitiesByServer_List ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.Configuration; - /** - * Samples for Configurations Update. + * Samples for CapabilitiesByServer List. */ -public final class ConfigurationsUpdateSamples { +public final class CapabilitiesByServerListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ConfigurationUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * CapabilitiesByServerList.json */ /** - * Sample code: Update a user configuration. + * Sample code: List the capabilities available for a given server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - updateAUserConfiguration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - Configuration resource = manager.configurations() - .getWithResponse("testrg", "testserver", "constraint_exclusion", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withValue("on").withSource("user-override").apply(); + public static void listTheCapabilitiesAvailableForAGivenServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.capabilitiesByServers().list("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### Databases_Get +### CapturedLogs_ListByServer ```java /** - * Samples for PrivateLinkResources ListByServer. + * Samples for CapturedLogs ListByServer. */ -public final class PrivateLinkResourcesListByServerSamples { +public final class CapturedLogsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateLinkResourcesList.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * CapturedLogsListByServer.json */ /** - * Sample code: Gets private link resources for PostgreSQL. + * Sample code: List all captured logs for download in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void getsPrivateLinkResourcesForPostgreSQL( + public static void listAllCapturedLogsForDownloadInAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateLinkResources().listByServer("Default", "test-svr", com.azure.core.util.Context.NONE); + manager.capturedLogs().listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### Databases_ListByServer +### Configurations_Get ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - /** - * Samples for TuningIndex ListRecommendations. + * Samples for Configurations Get. */ -public final class TuningIndexListRecommendationsSamples { +public final class ConfigurationsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningIndex_GetFilteredRecommendations.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ConfigurationsGet. + * json */ /** - * Sample code: TuningIndex_ListFilteredRecommendations. + * Sample code: Get information about a specific configuration (also known as server parameter) of a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void tuningIndexListFilteredRecommendations( + public static void getInformationAboutASpecificConfigurationAlsoKnownAsServerParameterOfAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningIndexes() - .listRecommendations("testrg", "pgtestrecs", TuningOptionEnum.INDEX, RecommendationType.CREATE_INDEX, - com.azure.core.util.Context.NONE); + manager.configurations() + .getWithResponse("exampleresourcegroup", "exampleserver", "array_nulls", com.azure.core.util.Context.NONE); } +} +``` + +### Configurations_ListByServer +```java +/** + * Samples for Configurations ListByServer. + */ +public final class ConfigurationsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningIndex_GetRecommendations.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ConfigurationsListByServer.json */ /** - * Sample code: TuningIndex_ListRecommendations. + * Sample code: List all configurations (also known as server parameters) of a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - tuningIndexListRecommendations(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningIndexes() - .listRecommendations("testrg", "pgtestsvc4", TuningOptionEnum.INDEX, null, - com.azure.core.util.Context.NONE); + public static void listAllConfigurationsAlsoKnownAsServerParametersOfAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.configurations() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### FirewallRules_CreateOrUpdate +### Configurations_Put ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - /** - * Samples for TuningConfiguration Disable. + * Samples for Configurations Put. */ -public final class TuningConfigurationDisableSamples { +public final class ConfigurationsPutSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_Disable.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ConfigurationsUpdateUsingPut.json */ /** - * Sample code: TuningConfiguration_Disable. + * Sample code: Update, using Put verb, the value assigned to a specific modifiable configuration (also known as + * server parameter) of a server. * * @param manager Entry point to PostgreSqlManager. */ public static void - tuningConfigurationDisable(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .disable("testrg", "testserver", TuningOptionEnum.CONFIGURATION, com.azure.core.util.Context.NONE); + updateUsingPutVerbTheValueAssignedToASpecificModifiableConfigurationAlsoKnownAsServerParameterOfAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.configurations() + .define("constraint_exclusion") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withValue("on") + .withSource("user-override") + .create(); } } ``` -### FirewallRules_Delete +### Configurations_Update ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Configuration; /** - * Samples for VirtualNetworkSubnetUsage Execute. + * Samples for Configurations Update. */ -public final class VirtualNetworkSubnetUsageExecuteSamples { +public final class ConfigurationsUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * VirtualNetworkSubnetUsage.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ConfigurationsUpdate.json */ /** - * Sample code: VirtualNetworkSubnetUsageList. + * Sample code: Update the value assigned to a specific modifiable configuration (also known as server parameter) of + * a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - virtualNetworkSubnetUsageList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.virtualNetworkSubnetUsages() - .executeWithResponse("westus", new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/testvnet"), - com.azure.core.util.Context.NONE); + public static void updateTheValueAssignedToASpecificModifiableConfigurationAlsoKnownAsServerParameterOfAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + Configuration resource = manager.configurations() + .getWithResponse("exampleresourcegroup", "exampleserver", "constraint_exclusion", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withValue("on").withSource("user-override").apply(); } } ``` -### FirewallRules_Get +### Databases_Create ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - /** - * Samples for TuningConfiguration ListSessionDetails. + * Samples for Databases Create. */ -public final class TuningConfigurationListSessionDetailsSamples { +public final class DatabasesCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_ListSessionDetails.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesCreate. + * json */ /** - * Sample code: TuningConfiguration_ListSessionDetails. + * Sample code: Create a database. * * @param manager Entry point to PostgreSqlManager. */ - public static void tuningConfigurationListSessionDetails( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .listSessionDetails("testrg", "testserver", TuningOptionEnum.CONFIGURATION, - "oooooooo-oooo-oooo-oooo-oooooooooooo", com.azure.core.util.Context.NONE); + public static void createADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.databases() + .define("exampledatabase") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withCharset("utf8") + .withCollation("en_US.utf8") + .create(); } } ``` -### FirewallRules_ListByServer +### Databases_Delete ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - /** - * Samples for TuningConfiguration StopSession. + * Samples for Databases Delete. */ -public final class TuningConfigurationStopSessionSamples { +public final class DatabasesDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_StopSession.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesDelete. + * json */ /** - * Sample code: TuningConfiguration_StopSession. + * Sample code: Delete an existing database. * * @param manager Entry point to PostgreSqlManager. */ public static void - tuningConfigurationStopSession(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .stopSession("testrg", "testserver", TuningOptionEnum.CONFIGURATION, com.azure.core.util.Context.NONE); + deleteAnExistingDatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.databases() + .delete("exampleresourcegroup", "exampleserver", "exampledatabase", com.azure.core.util.Context.NONE); } } ``` -### FlexibleServer_StartLtrBackup +### Databases_Get ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; - /** - * Samples for ServerThreatProtectionSettings Get. + * Samples for Databases Get. */ -public final class ServerThreatProtectionSettingsGetSamples { +public final class DatabasesGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerThreatProtectionSettingsGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesGet.json */ /** - * Sample code: Get a server's Threat Protection settings. + * Sample code: Get information about an existing database. * * @param manager Entry point to PostgreSqlManager. */ - public static void getAServerSThreatProtectionSettings( + public static void getInformationAboutAnExistingDatabase( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.serverThreatProtectionSettings() - .getWithResponse("threatprotection-6852", "threatprotection-2080", ThreatProtectionName.DEFAULT, + manager.databases() + .getWithResponse("exampleresourcegroup", "exampleserver", "exampledatabase", com.azure.core.util.Context.NONE); } } ``` -### FlexibleServer_TriggerLtrPreBackup +### Databases_ListByServer ```java /** - * Samples for Databases Delete. + * Samples for Databases ListByServer. */ -public final class DatabasesDeleteSamples { +public final class DatabasesListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * DatabaseDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * DatabasesListByServer.json */ /** - * Sample code: Delete a database. + * Sample code: List all databases in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void deleteADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.databases().delete("TestGroup", "testserver", "db1", com.azure.core.util.Context.NONE); + public static void + listAllDatabasesInAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.databases().listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### GetPrivateDnsZoneSuffix_Execute +### FirewallRules_CreateOrUpdate ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - /** - * Samples for TuningConfiguration Enable. + * Samples for FirewallRules CreateOrUpdate. */ -public final class TuningConfigurationEnableSamples { +public final class FirewallRulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_Enable.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * FirewallRulesCreateOrUpdate.json */ /** - * Sample code: TuningConfiguration_Enable. + * Sample code: Create a new firewall rule or update an existing firewall rule. * * @param manager Entry point to PostgreSqlManager. */ - public static void - tuningConfigurationEnable(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .enable("testrg", "testserver", TuningOptionEnum.CONFIGURATION, com.azure.core.util.Context.NONE); + public static void createANewFirewallRuleOrUpdateAnExistingFirewallRule( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.firewallRules() + .define("examplefirewallrule") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withStartIpAddress("0.0.0.0") + .withEndIpAddress("255.255.255.255") + .create(); } } ``` -### LocationBasedCapabilities_Execute +### FirewallRules_Delete ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - /** - * Samples for TuningConfiguration ListSessions. + * Samples for FirewallRules Delete. */ -public final class TuningConfigurationListSessionsSamples { +public final class FirewallRulesDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_ListSessions.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * FirewallRulesDelete.json */ /** - * Sample code: TuningConfiguration_ListSessions. + * Sample code: Delete an existing firewall rule. * * @param manager Entry point to PostgreSqlManager. */ public static void - tuningConfigurationListSessions(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .listSessions("testrg", "testserver", TuningOptionEnum.CONFIGURATION, com.azure.core.util.Context.NONE); + deleteAnExistingFirewallRule(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.firewallRules() + .delete("exampleresourcegroup", "exampleserver", "examplefirewallrule", com.azure.core.util.Context.NONE); } } ``` -### LogFiles_ListByServer +### FirewallRules_Get ```java /** - * Samples for QuotaUsages List. + * Samples for FirewallRules Get. */ -public final class QuotaUsagesListSamples { +public final class FirewallRulesGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * QuotaUsagesForFlexibleServers.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/FirewallRulesGet. + * json */ /** - * Sample code: List of quota usages for flexible servers. + * Sample code: Get information about a firewall rule in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void listOfQuotaUsagesForFlexibleServers( + public static void getInformationAboutAFirewallRuleInAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.quotaUsages().list("westus", com.azure.core.util.Context.NONE); + manager.firewallRules() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplefirewallrule", + com.azure.core.util.Context.NONE); } } ``` -### LtrBackupOperations_Get +### FirewallRules_ListByServer ```java /** - * Samples for Backups Get. + * Samples for FirewallRules ListByServer. */ -public final class BackupsGetSamples { +public final class FirewallRulesListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/BackupGet - * .json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * FirewallRulesListByServer.json */ /** - * Sample code: Get a backup for a server. + * Sample code: List information about all firewall rules in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - getABackupForAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.backups() - .getWithResponse("TestGroup", "postgresqltestserver", "daily_20250303T160516", - com.azure.core.util.Context.NONE); + public static void listInformationAboutAllFirewallRulesInAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.firewallRules().listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### LtrBackupOperations_ListByServer +### Migrations_Cancel ```java /** - * Samples for Operations List. + * Samples for Migrations Cancel. */ -public final class OperationsListSamples { +public final class MigrationsCancelSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * OperationList.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsCancel. + * json */ /** - * Sample code: OperationList. + * Sample code: Cancel an active migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void operationList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + public static void + cancelAnActiveMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .cancelWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); } } ``` -### Migrations_Create +### Migrations_CheckNameAvailability ```java +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; + /** - * Samples for PrivateEndpointConnectionOperation Delete. + * Samples for Migrations CheckNameAvailability. */ -public final class PrivateEndpointConnectionOperationDeleteSamples { +public final class MigrationsCheckNameAvailabilitySamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateEndpointConnectionDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCheckNameAvailability.json */ /** - * Sample code: Deletes a private endpoint connection with a given name. + * Sample code: Check the validity and availability of the given name, to assign it to a new migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void deletesAPrivateEndpointConnectionWithAGivenName( + public static void checkTheValidityAndAvailabilityOfTheGivenNameToAssignItToANewMigration( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateEndpointConnectionOperations() - .delete("Default", "test-svr", "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", + manager.migrations() + .checkNameAvailabilityWithResponse("exampleresourcegroup", "exampleserver", + new MigrationNameAvailabilityInner().withName("examplemigration") + .withType("Microsoft.DBforPostgreSQL/flexibleServers/migrations"), com.azure.core.util.Context.NONE); } } ``` -### Migrations_Delete +### Migrations_Create ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; -import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupStoreDetails; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupRequest; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdminCredentials; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesAndPermissions; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationOption; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParameters; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDatabasesOnTargetServer; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SourceType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SslMode; import java.util.Arrays; /** - * Samples for FlexibleServer StartLtrBackup. + * Samples for Migrations Create. */ -public final class FlexibleServerStartLtrBackupSamples { +public final class MigrationsCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LongTermRetentionBackup.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateWithOtherUsers.json */ /** - * Sample code: Sample_ExecuteBackup. + * Sample code: Create a migration specifying user names. * * @param manager Entry point to PostgreSqlManager. */ - public static void - sampleExecuteBackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.flexibleServers() - .startLtrBackup("rgLongTermRetention", "pgsqlltrtestserver", - new LtrBackupRequest().withBackupSettings(new BackupSettings().withBackupName("backup1")) - .withTargetDetails(new BackupStoreDetails().withSasUriList(Arrays.asList("sasuri"))), - com.azure.core.util.Context.NONE); - } -} -``` - -### Migrations_Get - -```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettingsModel; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState; + public static void createAMigrationSpecifyingUserNames( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withMigrationMode(MigrationMode.OFFLINE) + .withSourceDbServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") + .withSecretParameters(new MigrationSecretParameters() + .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") + .withTargetServerPassword("fakeTokenPlaceholder")) + .withSourceServerUsername("newadmin@examplesource") + .withTargetServerUsername("targetadmin")) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .create(); + } -/** - * Samples for ServerThreatProtectionSettings CreateOrUpdate. - */ -public final class ServerThreatProtectionSettingsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerThreatProtectionSettingsCreateOrUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateOtherSourceTypesValidateMigrate.json */ /** - * Sample code: Update a server's Threat Protection settings. + * Sample code: Create a migration with other source type for validating and migrating. * * @param manager Entry point to PostgreSqlManager. */ - public static void updateAServerSThreatProtectionSettings( + public static void createAMigrationWithOtherSourceTypeForValidatingAndMigrating( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - ServerThreatProtectionSettingsModel resource = manager.serverThreatProtectionSettings() - .getWithResponse("threatprotection-4799", "threatprotection-6440", ThreatProtectionName.DEFAULT, - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withState(ThreatProtectionState.ENABLED).apply(); + manager.migrations() + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withMigrationMode(MigrationMode.OFFLINE) + .withMigrationOption(MigrationOption.VALIDATE_AND_MIGRATE) + .withSourceType(SourceType.ON_PREMISES) + .withSslMode(SslMode.PREFER) + .withSourceDbServerResourceId("examplesource:5432@exampleuser") + .withSecretParameters(new MigrationSecretParameters() + .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") + .withTargetServerPassword("fakeTokenPlaceholder"))) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) + .create(); } -} -``` - -### Migrations_ListByTargetServer -```java -/** - * Samples for FirewallRules Get. - */ -public final class FirewallRulesGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * FirewallRuleGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateWithPrivateEndpointServers.json */ /** - * Sample code: FirewallRuleList. + * Sample code: Create a migration with private endpoint. * * @param manager Entry point to PostgreSqlManager. */ - public static void firewallRuleList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.firewallRules().getWithResponse("testrg", "testserver", "rule1", com.azure.core.util.Context.NONE); + public static void createAMigrationWithPrivateEndpoint( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withMigrationInstanceResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/examplesourcemigration") + .withMigrationMode(MigrationMode.OFFLINE) + .withSourceDbServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") + .withSecretParameters(new MigrationSecretParameters() + .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") + .withTargetServerPassword("fakeTokenPlaceholder"))) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) + .create(); } -} -``` -### Migrations_Update + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsCreate. + * json + */ + /** + * Sample code: Create a migration. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createAMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withMigrationMode(MigrationMode.OFFLINE) + .withSourceDbServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") + .withSecretParameters(new MigrationSecretParameters() + .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") + .withTargetServerPassword("fakeTokenPlaceholder"))) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) + .create(); + } -```java -/** - * Samples for Administrators Delete. - */ -public final class AdministratorsDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * AdministratorDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateWithRoles.json */ /** - * Sample code: AdministratorDelete. + * Sample code: Create a migration with roles. * * @param manager Entry point to PostgreSqlManager. */ public static void - administratorDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.administrators() - .delete("testrg", "testserver", "oooooooo-oooo-oooo-oooo-oooooooooooo", com.azure.core.util.Context.NONE); + createAMigrationWithRoles(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withMigrationMode(MigrationMode.OFFLINE) + .withSourceDbServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") + .withSecretParameters(new MigrationSecretParameters() + .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") + .withTargetServerPassword("fakeTokenPlaceholder"))) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) + .withMigrateRoles(MigrateRolesAndPermissions.TRUE) + .create(); } -} -``` -### Operations_List + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateWithFullyQualifiedDomainName.json + */ + /** + * Sample code: Create a migration with fully qualified domain names for source and target servers. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createAMigrationWithFullyQualifiedDomainNamesForSourceAndTargetServers( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withMigrationMode(MigrationMode.OFFLINE) + .withSourceDbServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") + .withSourceDbServerFullyQualifiedDomainName("examplesource.contoso.com") + .withTargetDbServerFullyQualifiedDomainName("exampletarget.contoso.com") + .withSecretParameters(new MigrationSecretParameters() + .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") + .withTargetServerPassword("fakeTokenPlaceholder"))) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) + .create(); + } -```java -/** - * Samples for Databases Get. - */ -public final class DatabasesGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * DatabaseGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateValidateOnly.json */ /** - * Sample code: Get a database. + * Sample code: Create a migration for validating only. * * @param manager Entry point to PostgreSqlManager. */ - public static void getADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.databases().getWithResponse("TestGroup", "testserver", "db1", com.azure.core.util.Context.NONE); + public static void createAMigrationForValidatingOnly( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withMigrationMode(MigrationMode.OFFLINE) + .withMigrationOption(MigrationOption.VALIDATE) + .withSourceDbServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") + .withSecretParameters(new MigrationSecretParameters() + .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") + .withTargetServerPassword("fakeTokenPlaceholder"))) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) + .create(); } } ``` -### PrivateEndpointConnectionOperation_Delete +### Migrations_Get ```java /** - * Samples for Configurations ListByServer. + * Samples for Migrations Get. */ -public final class ConfigurationsListByServerSamples { +public final class MigrationsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ConfigurationListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsGetMigrationWithSuccessfulValidationOnly.json */ /** - * Sample code: ConfigurationList. + * Sample code: Get information about a migration with successful validation only. * * @param manager Entry point to PostgreSqlManager. */ - public static void configurationList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.configurations().listByServer("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void getInformationAboutAMigrationWithSuccessfulValidationOnly( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); } -} -``` -### PrivateEndpointConnectionOperation_Update + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsGetMigrationWithSuccessfulValidationAndMigration.json + */ + /** + * Sample code: Get information about a migration with successful validation and successful migration. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void getInformationAboutAMigrationWithSuccessfulValidationAndSuccessfulMigration( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); + } -```java -/** - * Samples for Databases Create. - */ -public final class DatabasesCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * DatabaseCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsGetMigrationWithSuccessfulValidationButMigrationFailure.json */ /** - * Sample code: Create a database. + * Sample code: Get information about a migration with successful validation but failed migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void createADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.databases() - .define("db1") - .withExistingFlexibleServer("TestGroup", "testserver") - .withCharset("utf8") - .withCollation("en_US.utf8") - .create(); + public static void getInformationAboutAMigrationWithSuccessfulValidationButFailedMigration( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); } -} -``` -### PrivateEndpointConnections_Get + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsGetMigrationWithValidationFailures.json + */ + /** + * Sample code: Get information about a migration with validation failures. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void getInformationAboutAMigrationWithValidationFailures( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); + } -```java -/** - * Samples for TuningOptions ListByServer. - */ -public final class TuningOptionsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Tuning_ListTuningOptions.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGet.json */ /** - * Sample code: TuningOptions_ListByServer. + * Sample code: Get information about a migration. * * @param manager Entry point to PostgreSqlManager. */ public static void - tuningOptionsListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningOptions().listByServer("testrg", "testserver", com.azure.core.util.Context.NONE); + getInformationAboutAMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); } } ``` -### PrivateEndpointConnections_ListByServer +### Migrations_ListByTargetServer ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; -import java.util.Arrays; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationListFilter; /** - * Samples for VirtualEndpoints Update. + * Samples for Migrations ListByTargetServer. */ -public final class VirtualEndpointsUpdateSamples { +public final class MigrationsListByTargetServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * VirtualEndpointUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsListByTargetServer.json */ /** - * Sample code: Update a virtual endpoint for a server to update the. + * Sample code: List all migrations of a target flexible server. * * @param manager Entry point to PostgreSqlManager. */ - public static void updateAVirtualEndpointForAServerToUpdateThe( + public static void listAllMigrationsOfATargetFlexibleServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - VirtualEndpointResource resource = manager.virtualEndpoints() - .getWithResponse("testrg", "pgtestsvc4", "pgVirtualEndpoint1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withEndpointType(VirtualEndpointType.READ_WRITE) - .withMembers(Arrays.asList("testReplica1")) - .apply(); + manager.migrations() + .listByTargetServer("exampleresourcegroup", "exampleserver", MigrationListFilter.ALL, + com.azure.core.util.Context.NONE); } } ``` -### PrivateLinkResources_Get +### Migrations_Update ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceServer; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Migration; /** - * Samples for Administrators Create. + * Samples for Migrations Update. */ -public final class AdministratorsCreateSamples { +public final class MigrationsUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * AdministratorAdd.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsUpdate. + * json */ /** - * Sample code: Adds an Microsoft Entra Administrator for the server. + * Sample code: Update an existing migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void addsAnMicrosoftEntraAdministratorForTheServer( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.administrators() - .define("oooooooo-oooo-oooo-oooo-oooooooooooo") - .withExistingFlexibleServer("testrg", "testserver") - .withPrincipalType(PrincipalType.USER) - .withPrincipalName("testuser1@microsoft.com") - .withTenantId("tttttttt-tttt-tttt-tttt-tttttttttttt") - .create(); + public static void + updateAnExistingMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + Migration resource = manager.migrations() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withSetupLogicalReplicationOnSourceDbIfNeeded(LogicalReplicationOnSourceServer.TRUE).apply(); } } ``` -### PrivateLinkResources_ListByServer +### NameAvailability_CheckGlobally ```java +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; + /** - * Samples for Servers Start. + * Samples for NameAvailability CheckGlobally. */ -public final class ServersStartSamples { +public final class NameAvailabilityCheckGloballySamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerStart.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * NameAvailabilityCheckGlobally.json */ /** - * Sample code: ServerStart. + * Sample code: Check the validity and availability of the given name, to assign it to a new server or to use it as + * the base name of a new pair of virtual endpoints. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverStart(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().start("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void + checkTheValidityAndAvailabilityOfTheGivenNameToAssignItToANewServerOrToUseItAsTheBaseNameOfANewPairOfVirtualEndpoints( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.nameAvailabilities() + .checkGloballyWithResponse(new CheckNameAvailabilityRequest().withName("exampleserver") + .withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE); } } ``` -### QuotaUsages_List +### NameAvailability_CheckWithLocation ```java +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; + /** - * Samples for VirtualEndpoints Get. + * Samples for NameAvailability CheckWithLocation. */ -public final class VirtualEndpointsGetSamples { +public final class NameAvailabilityCheckWithLocationSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * VirtualEndpointsGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * NameAvailabilityCheckWithLocation.json */ /** - * Sample code: Get a virtual endpoint. + * Sample code: Check the validity and availability of the given name, in the given location, to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. * * @param manager Entry point to PostgreSqlManager. */ public static void - getAVirtualEndpoint(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.virtualEndpoints() - .getWithResponse("testrg", "pgtestsvc4", "pgVirtualEndpoint1", com.azure.core.util.Context.NONE); + checkTheValidityAndAvailabilityOfTheGivenNameInTheGivenLocationToAssignItToANewServerOrToUseItAsTheBaseNameOfANewPairOfVirtualEndpoints( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.nameAvailabilities() + .checkWithLocationWithResponse("eastus", new CheckNameAvailabilityRequest().withName("exampleserver") + .withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE); } } ``` -### Replicas_ListByServer +### Operations_List ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; -import java.util.Arrays; - /** - * Samples for VirtualEndpoints Create. + * Samples for Operations List. */ -public final class VirtualEndpointsCreateSamples { +public final class OperationsListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * VirtualEndpointCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/OperationsList. + * json */ /** - * Sample code: Create a new virtual endpoint for a flexible server. + * Sample code: List all available REST API operations. * * @param manager Entry point to PostgreSqlManager. */ - public static void createANewVirtualEndpointForAFlexibleServer( + public static void listAllAvailableRESTAPIOperations( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.virtualEndpoints() - .define("pgVirtualEndpoint1") - .withExistingFlexibleServer("testrg", "pgtestsvc4") - .withEndpointType(VirtualEndpointType.READ_WRITE) - .withMembers(Arrays.asList("testPrimary1")) - .create(); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` -### ResourceProvider_CheckMigrationNameAvailability +### PrivateDnsZoneSuffix_Get ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.CancelEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceDbEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResource; - /** - * Samples for Migrations Update. + * Samples for PrivateDnsZoneSuffix Get. */ -public final class MigrationsUpdateSamples { +public final class PrivateDnsZoneSuffixGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Cancel.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateDnsZoneSuffixGet.json */ /** - * Sample code: Cancel migration. + * Sample code: Get the private DNS suffix. * * @param manager Entry point to PostgreSqlManager. */ - public static void cancelMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - MigrationResource resource = manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withCancel(CancelEnum.TRUE).apply(); + public static void + getThePrivateDNSSuffix(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateDnsZoneSuffixes().getWithResponse(com.azure.core.util.Context.NONE); } +} +``` + +### PrivateEndpointConnections_Delete +```java +/** + * Samples for PrivateEndpointConnections Delete. + */ +public final class PrivateEndpointConnectionsDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Update.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateEndpointConnectionsDelete.json */ /** - * Sample code: Migrations_Update. + * Sample code: Delete a private endpoint connection. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsUpdate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - MigrationResource resource = manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withSetupLogicalReplicationOnSourceDbIfNeeded(LogicalReplicationOnSourceDbEnum.TRUE).apply(); + public static void + deleteAPrivateEndpointConnection(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateEndpointConnections() + .delete("exampleresourcegroup", "exampleserver", + "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", + com.azure.core.util.Context.NONE); } } ``` -### ServerCapabilities_List +### PrivateEndpointConnections_Get ```java -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionState; - /** - * Samples for PrivateEndpointConnectionOperation Update. + * Samples for PrivateEndpointConnections Get. */ -public final class PrivateEndpointConnectionOperationUpdateSamples { +public final class PrivateEndpointConnectionsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateEndpointConnectionUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateEndpointConnectionsGet.json */ /** - * Sample code: Approve or reject a private endpoint connection with a given name. + * Sample code: Get a private endpoint connection. * * @param manager Entry point to PostgreSqlManager. */ - public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateEndpointConnectionOperations() - .update("Default", "test-svr", "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", - new PrivateEndpointConnectionInner().withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Approved by johndoe@contoso.com")), + public static void + getAPrivateEndpointConnection(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateEndpointConnections() + .getWithResponse("exampleresourcegroup", "exampleserver", + "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", + com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_ListByServer + +```java +/** + * Samples for PrivateEndpointConnections ListByServer. + */ +public final class PrivateEndpointConnectionsListByServerSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateEndpointConnectionsList.json + */ + /** + * Sample code: List all private endpoint connections on a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listAllPrivateEndpointConnectionsOnAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateEndpointConnections() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Update + +```java +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionState; + +/** + * Samples for PrivateEndpointConnections Update. + */ +public final class PrivateEndpointConnectionsUpdateSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateEndpointConnectionsUpdate.json + */ + /** + * Sample code: Approve or reject a private endpoint connection. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void approveOrRejectAPrivateEndpointConnection( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateEndpointConnections() + .update("exampleresourcegroup", "exampleserver", + "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", + new PrivateEndpointConnectionInner().withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("Approved by johndoe@contoso.com")), + com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateLinkResources_Get + +```java +/** + * Samples for PrivateLinkResources Get. + */ +public final class PrivateLinkResourcesGetSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateLinkResourcesGet.json + */ + /** + * Sample code: Gets a private link resource for PostgreSQL. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void getsAPrivateLinkResourceForPostgreSQL( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateLinkResources() + .getWithResponse("exampleresourcegroup", "exampleserver", "exampleprivatelink", com.azure.core.util.Context.NONE); } } ``` -### ServerThreatProtectionSettings_CreateOrUpdate +### PrivateLinkResources_ListByServer + +```java +/** + * Samples for PrivateLinkResources ListByServer. + */ +public final class PrivateLinkResourcesListByServerSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateLinkResourcesList.json + */ + /** + * Sample code: Gets private link resources for PostgreSQL. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void getsPrivateLinkResourcesForPostgreSQL( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateLinkResources() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} +``` + +### QuotaUsages_List + +```java +/** + * Samples for QuotaUsages List. + */ +public final class QuotaUsagesListSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * QuotaUsagesForFlexibleServers.json + */ + /** + * Sample code: List of quota usages for servers. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + listOfQuotaUsagesForServers(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.quotaUsages().list("eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### Replicas_ListByServer + +```java +/** + * Samples for Replicas ListByServer. + */ +public final class ReplicasListByServerSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ReplicasListByServer.json + */ + /** + * Sample code: List all read replicas of a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + listAllReadReplicasOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.replicas().listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} +``` + +### Servers_CreateOrUpdate ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAuthEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ArmServerKeyType; import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTiers; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTier; import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; import com.azure.resourcemanager.postgresqlflexibleserver.models.Cluster; import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateMode; import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption; -import com.azure.resourcemanager.postgresqlflexibleserver.models.GeoRedundantBackupEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryptionType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackup; import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode; import com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MicrosoftEntraAuth; import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordAuthEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordBasedAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerPublicNetworkAccessState; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; @@ -1435,138 +1682,140 @@ import java.util.HashMap; import java.util.Map; /** - * Samples for Servers Create. + * Samples for Servers CreateOrUpdate. */ -public final class ServersCreateSamples { +public final class ServersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateWithDataEncryptionEnabled.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateReviveDropped.json */ /** - * Sample code: ServerCreateWithDataEncryptionEnabled. + * Sample code: Create a new server using a backup of a server that was deleted or dropped recently. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverCreateWithDataEncryptionEnabled( + public static void createANewServerUsingABackupOfAServerThatWasDeletedOrDroppedRecently( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers() - .define("pgtestsvc4") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) - .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity", - new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) - .withAdministratorLogin("login") - .withAdministratorLoginPassword("Password1") - .withVersion(ServerVersion.ONE_SIX) - .withStorage(new Storage().withStorageSizeGB(512) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P20)) - .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") - .withPrimaryUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity") - .withGeoBackupKeyUri("fakeTokenPlaceholder") - .withGeoBackupUserAssignedIdentityId("") - .withType(ArmServerKeyType.AZURE_KEY_VAULT)) - .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED)) - .withNetwork(new Network().withDelegatedSubnetResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet") - .withPrivateDnsZoneArmResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) - .withAvailabilityZone("1") - .withCreateMode(CreateMode.CREATE) + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSourceServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampledeletedserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:30:22.123456Z")) + .withCreateMode(CreateMode.REVIVE_DROPPED) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateReviveDropped.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateInMicrosoftOwnedVirtualNetworkWithZoneRedundantHighAvailability.json */ /** - * Sample code: ServerCreateReviveDropped. + * Sample code: Create a new server in Microsoft owned virtual network with zone redundant high availability. * * @param manager Entry point to PostgreSqlManager. */ - public static void - serverCreateReviveDropped(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void createANewServerInMicrosoftOwnedVirtualNetworkWithZoneRedundantHighAvailability( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers() - .define("pgtestsvc5-rev") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withSourceServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc5") - .withPointInTimeUtc(OffsetDateTime.parse("2023-04-27T00:04:59.4078005+00:00")) - .withCreateMode(CreateMode.REVIVE_DROPPED) + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withTags(mapOf("InCustomerVnet", "false", "InMicrosoftVnet", "true")) + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.ENABLED)) + .withNetwork(new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.ENABLED)) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) + .withAvailabilityZone("1") + .withCreateMode(CreateMode.CREATE) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateGeoRestoreWithDataEncryptionEnabled.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateGeoRestoreWithDataEncryptionEnabledAutoUpdate.json */ /** - * Sample code: Create a database as a geo-restore in geo-paired location. + * Sample code: Create a new server using a restore of a geographically redundant backup of an existing server, with + * data encryption based on customer managed key with automatic key version update. * * @param manager Entry point to PostgreSqlManager. */ - public static void createADatabaseAsAGeoRestoreInGeoPairedLocation( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + createANewServerUsingARestoreOfAGeographicallyRedundantBackupOfAnExistingServerWithDataEncryptionBasedOnCustomerManagedKeyWithAutomaticKeyVersionUpdate( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers() - .define("pgtestsvc5geo") + .define("exampleserver") .withRegion("eastus") - .withExistingResourceGroup("testrg") + .withExistingResourceGroup("exampleresourcegroup") .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity", + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity", new UserIdentity(), - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity", + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") .withPrimaryUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity") + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") .withGeoBackupKeyUri("fakeTokenPlaceholder") .withGeoBackupUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity") - .withType(ArmServerKeyType.AZURE_KEY_VAULT)) + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) .withSourceServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/sourcepgservername") - .withPointInTimeUtc(OffsetDateTime.parse("2021-06-27T00:04:59.4078005+00:00")) + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:35:22.123456Z")) .withCreateMode(CreateMode.GEO_RESTORE) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateWithDataEncryptionEnabled.json */ /** - * Sample code: Create a new server. + * Sample code: Create a new server with data encryption based on customer managed key. * * @param manager Entry point to PostgreSqlManager. */ - public static void createANewServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void createANewServerWithDataEncryptionBasedOnCustomerManagedKey( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers() - .define("testpgflex") + .define("exampleserver") .withRegion("eastus") - .withExistingResourceGroup("testrg") - .withTags(mapOf("VNetServer", "1")) + .withExistingResourceGroup("exampleresourcegroup") .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLogin("login") - .withAdministratorLoginPassword("Password1") - .withVersion(ServerVersion.ONE_SIX) + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) .withStorage(new Storage().withStorageSizeGB(512) .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P20)) - .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.ENABLED)) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId("") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) .withNetwork(new Network().withDelegatedSubnetResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-subnet") + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") .withPrivateDnsZoneArmResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/privateDnsZones/testpgflex.private.postgres.database")) + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) .withAvailabilityZone("1") .withCreateMode(CreateMode.CREATE) @@ -1575,237 +1824,260 @@ public final class ServersCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateWithMicrosoftEntraEnabled.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateGeoRestoreWithDataEncryptionEnabled.json */ /** - * Sample code: Create a new server with Microsoft Entra authentication enabled. + * Sample code: Create a new server using a restore of a geographically redundant backup of an existing server, with + * data encryption based on customer managed key. * * @param manager Entry point to PostgreSqlManager. */ - public static void createANewServerWithMicrosoftEntraAuthenticationEnabled( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + createANewServerUsingARestoreOfAGeographicallyRedundantBackupOfAnExistingServerWithDataEncryptionBasedOnCustomerManagedKey( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers() - .define("pgtestsvc4") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withTags(mapOf("ElasticServer", "1")) - .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLogin("login") - .withAdministratorLoginPassword("Password1") - .withVersion(ServerVersion.ONE_SIX) - .withStorage(new Storage().withStorageSizeGB(512) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P20)) - .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(ActiveDirectoryAuthEnum.ENABLED) - .withPasswordAuth(PasswordAuthEnum.ENABLED) - .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) - .withDataEncryption(new DataEncryption().withType(ArmServerKeyType.SYSTEM_MANAGED)) - .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED)) - .withNetwork(new Network().withDelegatedSubnetResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet") - .withPrivateDnsZoneArmResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) - .withAvailabilityZone("1") - .withCreateMode(CreateMode.CREATE) + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity", + new UserIdentity(), + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withSourceServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:35:22.123456Z")) + .withCreateMode(CreateMode.GEO_RESTORE) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateReplica.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateReplica.json */ /** - * Sample code: ServerCreateReplica. + * Sample code: Create a read replica of an existing server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - serverCreateReplica(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void createAReadReplicaOfAnExistingServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers() - .define("pgtestsvc5rep") - .withRegion("westus") - .withExistingResourceGroup("testrg") + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity", + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") .withPrimaryUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity") + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") .withGeoBackupKeyUri("fakeTokenPlaceholder") .withGeoBackupUserAssignedIdentityId("") - .withType(ArmServerKeyType.AZURE_KEY_VAULT)) + .withType(DataEncryptionType.AZURE_KEY_VAULT)) .withSourceServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/sourcepgservername") - .withPointInTimeUtc(OffsetDateTime.parse("2021-06-27T00:04:59.4078005+00:00")) + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:35:22.123456Z")) .withCreateMode(CreateMode.REPLICA) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ClusterCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateInYourOwnVirtualNetworkWithSameZoneHighAvailability.json */ /** - * Sample code: ClusterCreate. + * Sample code: Create a new server in your own virtual network with same zone high availability. * * @param manager Entry point to PostgreSqlManager. */ - public static void clusterCreate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void createANewServerInYourOwnVirtualNetworkWithSameZoneHighAvailability( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers() - .define("pgtestcluster") - .withRegion("westus") - .withExistingResourceGroup("testrg") + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withTags(mapOf("InCustomerVnet", "true", "InMicrosoftVnet", "false")) .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLogin("login") - .withAdministratorLoginPassword("Password1") - .withVersion(ServerVersion.ONE_SIX) - .withStorage(new Storage().withStorageSizeGB(256) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P15)) - .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED)) - .withNetwork(new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.DISABLED)) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.DISABLED)) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.ENABLED)) + .withNetwork(new Network().withDelegatedSubnetResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") + .withPrivateDnsZoneArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.private.postgres.database")) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.SAME_ZONE)) + .withAvailabilityZone("1") .withCreateMode(CreateMode.CREATE) - .withCluster(new Cluster().withClusterSize(2)) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreatePointInTimeRestore.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersClusterCreate.json */ /** - * Sample code: Create a database as a point in time restore. + * Sample code: Create a new elastic cluster. * * @param manager Entry point to PostgreSqlManager. */ - public static void createADatabaseAsAPointInTimeRestore( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + createANewElasticCluster(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers() - .define("pgtestsvc5") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withSourceServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/sourcepgservername") - .withPointInTimeUtc(OffsetDateTime.parse("2021-06-27T00:04:59.4078005+00:00")) - .withCreateMode(CreateMode.POINT_IN_TIME_RESTORE) + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLogin("examplelogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SIX) + .withStorage(new Storage().withStorageSizeGB(256) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P15)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) + .withNetwork(new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.DISABLED)) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.fromString("Disabled"))) + .withCreateMode(CreateMode.CREATE) + .withCluster(new Cluster().withClusterSize(2).withDefaultDatabaseName("clusterdb")) .create(); } - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### ServerThreatProtectionSettings_Get - -```java -/** - * Samples for PrivateLinkResources Get. - */ -public final class PrivateLinkResourcesGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateLinkResourcesGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreatePointInTimeRestore.json */ /** - * Sample code: Gets a private link resource for PostgreSQL. + * Sample code: Create a new server using a point in time restore of a backup of an existing server. * * @param manager Entry point to PostgreSqlManager. */ - public static void getsAPrivateLinkResourceForPostgreSQL( + public static void createANewServerUsingAPointInTimeRestoreOfABackupOfAnExistingServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateLinkResources().getWithResponse("Default", "test-svr", "plr", com.azure.core.util.Context.NONE); + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSourceServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:35:22.123456Z")) + .withCreateMode(CreateMode.POINT_IN_TIME_RESTORE) + .create(); } -} -``` - -### ServerThreatProtectionSettings_ListByServer -```java -/** - * Samples for Servers List. - */ -public final class ServersListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerList.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateWithMicrosoftEntraEnabledInYourOwnVirtualNetworkWithoutHighAvailability.json */ /** - * Sample code: ServerList. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void serverList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().list(com.azure.core.util.Context.NONE); - } -} -``` - -### Servers_Create - -```java -/** - * Samples for Servers GetByResourceGroup. - */ -public final class ServersGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerGetWithPrivateEndpoints.json - */ - /** - * Sample code: ServerGetWithPrivateEndpoints. + * Sample code: Create a new server with Microsoft Entra authentication enabled in your own virtual network and + * without high availability. * * @param manager Entry point to PostgreSqlManager. */ public static void - serverGetWithPrivateEndpoints(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().getByResourceGroupWithResponse("testrg", "pgtestsvc2", com.azure.core.util.Context.NONE); + createANewServerWithMicrosoftEntraAuthenticationEnabledInYourOwnVirtualNetworkAndWithoutHighAvailability( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(MicrosoftEntraAuth.ENABLED) + .withPasswordAuth(PasswordBasedAuth.ENABLED) + .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) + .withDataEncryption(new DataEncryption().withType(DataEncryptionType.SYSTEM_MANAGED)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) + .withNetwork(new Network().withDelegatedSubnetResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") + .withPrivateDnsZoneArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.fromString("Disabled"))) + .withAvailabilityZone("1") + .withCreateMode(CreateMode.CREATE) + .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ServerGet - * .json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateWithDataEncryptionEnabledAutoUpdate.json */ /** - * Sample code: ServerGet. + * Sample code: Create a new server with data encryption based on customer managed key with automatic key version + * update. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().getByResourceGroupWithResponse("testrg", "testpgflex", com.azure.core.util.Context.NONE); + public static void createANewServerWithDataEncryptionBasedOnCustomerManagedKeyWithAutomaticKeyVersionUpdate( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId("") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) + .withNetwork(new Network().withDelegatedSubnetResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") + .withPrivateDnsZoneArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) + .withAvailabilityZone("1") + .withCreateMode(CreateMode.CREATE) + .create(); } - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerGetWithVnet.json - */ - /** - * Sample code: ServerGetWithVnet. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void serverGetWithVnet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().getByResourceGroupWithResponse("testrg", "testpgflex", com.azure.core.util.Context.NONE); + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` @@ -1813,536 +2085,242 @@ public final class ServersGetByResourceGroupSamples { ### Servers_Delete ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - /** - * Samples for TuningOptions Get. + * Samples for Servers Delete. */ -public final class TuningOptionsGetSamples { +public final class ServersDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Tuning_GetTuningOption.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersDelete.json */ /** - * Sample code: TuningOptions_Get. + * Sample code: Delete or drop an existing server. * * @param manager Entry point to PostgreSqlManager. */ - public static void tuningOptionsGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningOptions() - .getWithResponse("testrg", "testserver", TuningOptionEnum.INDEX, com.azure.core.util.Context.NONE); + public static void + deleteOrDropAnExistingServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().delete("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` ### Servers_GetByResourceGroup -```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; - -/** - * Samples for CheckNameAvailability Execute. - */ -public final class CheckNameAvailabilityExecuteSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * CheckNameAvailability.json - */ - /** - * Sample code: NameAvailability. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void nameAvailability(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.checkNameAvailabilities() - .executeWithResponse(new CheckNameAvailabilityRequest().withName("name1") - .withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE); - } -} -``` - -### Servers_List - ```java /** - * Samples for Servers Stop. - */ -public final class ServersStopSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerStop.json - */ - /** - * Sample code: ServerStop. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void serverStop(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().stop("testrg", "testserver", com.azure.core.util.Context.NONE); - } -} -``` - -### Servers_ListByResourceGroup - -```java -/** - * Samples for Databases ListByServer. + * Samples for Servers GetByResourceGroup. */ -public final class DatabasesListByServerSamples { +public final class ServersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * DatabasesListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersGetWithPrivateEndpoints.json */ /** - * Sample code: List databases in a server. + * Sample code: Get information about an existing server that isn't integrated into a virtual network provided by + * customer and has private endpoint connections. * * @param manager Entry point to PostgreSqlManager. */ public static void - listDatabasesInAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.databases().listByServer("TestGroup", "testserver", com.azure.core.util.Context.NONE); - } -} -``` - -### Servers_Restart - -```java -/** - * Samples for Administrators Get. - */ -public final class AdministratorsGetSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * AdministratorGet.json - */ - /** - * Sample code: ServerGet. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void serverGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.administrators() - .getWithResponse("testrg", "pgtestsvc1", "oooooooo-oooo-oooo-oooo-oooooooooooo", - com.azure.core.util.Context.NONE); - } -} -``` - -### Servers_Start - -```java -/** - * Samples for Configurations Get. - */ -public final class ConfigurationsGetSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ConfigurationGet.json - */ - /** - * Sample code: ConfigurationGet. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void configurationGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.configurations() - .getWithResponse("testrg", "testserver", "array_nulls", com.azure.core.util.Context.NONE); + getInformationAboutAnExistingServerThatIsnTIntegratedIntoAVirtualNetworkProvidedByCustomerAndHasPrivateEndpointConnections( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } -} -``` -### Servers_Stop - -```java -/** - * Samples for ServerThreatProtectionSettings ListByServer. - */ -public final class ServerThreatProtectionSettingsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerThreatProtectionSettingsListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersGetWithVnet + * .json */ /** - * Sample code: Get a server's Advanced Threat Protection settings. + * Sample code: Get information about an existing server that is integrated into a virtual network provided by + * customer. * * @param manager Entry point to PostgreSqlManager. */ - public static void getAServerSAdvancedThreatProtectionSettings( + public static void getInformationAboutAnExistingServerThatIsIntegratedIntoAVirtualNetworkProvidedByCustomer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.serverThreatProtectionSettings() - .listByServer("threatprotection-6852", "threatprotection-2080", com.azure.core.util.Context.NONE); - } -} -``` - -### Servers_Update - -```java -/** - * Samples for ServerCapabilities List. - */ -public final class ServerCapabilitiesListSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCapabilities.json - */ - /** - * Sample code: ServerCapabilitiesList. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - serverCapabilitiesList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.serverCapabilities().list("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE); - } -} -``` - -### TuningConfiguration_Disable - -```java -/** - * Samples for Backups Delete. - */ -public final class BackupsDeleteSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * BackupDelete.json - */ - /** - * Sample code: Delete a specific backup. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - deleteASpecificBackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.backups().delete("TestGroup", "testserver", "backup_20250303T160516", com.azure.core.util.Context.NONE); + manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } -} -``` - -### TuningConfiguration_Enable -```java -/** - * Samples for FirewallRules CreateOrUpdate. - */ -public final class FirewallRulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * FirewallRuleCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersGet.json */ /** - * Sample code: FirewallRuleCreate. + * Sample code: Get information about an existing server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - firewallRuleCreate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.firewallRules() - .define("rule1") - .withExistingFlexibleServer("testrg", "testserver") - .withStartIpAddress("0.0.0.0") - .withEndIpAddress("255.255.255.255") - .create(); + public static void getInformationAboutAnExistingServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### TuningConfiguration_ListSessionDetails +### Servers_List ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.AdminCredentials; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationOption; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParameters; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDbsInTargetEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SourceType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SslMode; -import java.util.Arrays; - /** - * Samples for Migrations Create. + * Samples for Servers List. */ -public final class MigrationsCreateSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_With_PrivateEndpoint_Servers.json - */ - /** - * Sample code: Migrations Create with private endpoint. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void migrationsCreateWithPrivateEndpoint( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") - .withMigrationInstanceResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testsourcemigration") - .withMigrationMode(MigrationMode.OFFLINE) - .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") - .withSecretParameters(new MigrationSecretParameters() - .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_With_Roles.json - */ - /** - * Sample code: Migrations Create with roles. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - migrationsCreateWithRoles(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") - .withMigrationMode(MigrationMode.OFFLINE) - .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") - .withSecretParameters(new MigrationSecretParameters() - .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) - .withMigrateRoles(MigrateRolesEnum.TRUE) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_With_FullyQualifiedDomainName.json - */ - /** - * Sample code: Migrations Create with fully qualified domain name. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void migrationsCreateWithFullyQualifiedDomainName( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") - .withMigrationMode(MigrationMode.OFFLINE) - .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") - .withSourceDbServerFullyQualifiedDomainName("testsourcefqdn.example.com") - .withTargetDbServerFullyQualifiedDomainName("test-target-fqdn.example.com") - .withSecretParameters(new MigrationSecretParameters() - .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) - .create(); - } - +public final class ServersListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_Validate_Only.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersListBySubscription.json */ /** - * Sample code: Create Pre-migration Validation. + * Sample code: List all servers in a subscription. * * @param manager Entry point to PostgreSqlManager. */ - public static void - createPreMigrationValidation(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") - .withMigrationMode(MigrationMode.OFFLINE) - .withMigrationOption(MigrationOption.VALIDATE) - .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") - .withSecretParameters(new MigrationSecretParameters() - .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) - .create(); + public static void + listAllServersInASubscription(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().list(com.azure.core.util.Context.NONE); } +} +``` +### Servers_ListByResourceGroup + +```java +/** + * Samples for Servers ListByResourceGroup. + */ +public final class ServersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_With_Other_Users.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersListByResourceGroup.json */ /** - * Sample code: Migrations Create by passing user names. + * Sample code: List all servers in a resource group. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsCreateByPassingUserNames( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") - .withMigrationMode(MigrationMode.OFFLINE) - .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") - .withSecretParameters(new MigrationSecretParameters() - .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder")) - .withSourceServerUsername("newadmin@testsource") - .withTargetServerUsername("targetadmin")) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .create(); + public static void + listAllServersInAResourceGroup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().listByResourceGroup("exampleresourcegroup", com.azure.core.util.Context.NONE); } +} +``` + +### Servers_Restart + +```java +import com.azure.resourcemanager.postgresqlflexibleserver.models.FailoverMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter; +/** + * Samples for Servers Restart. + */ +public final class ServersRestartSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersRestartWithFailover.json */ /** - * Sample code: Migrations_Create. + * Sample code: Restart PostgreSQL database engine in a server with a forced failover to standby server. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsCreate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") - .withMigrationMode(MigrationMode.OFFLINE) - .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") - .withSecretParameters(new MigrationSecretParameters() - .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) - .create(); + public static void restartPostgreSQLDatabaseEngineInAServerWithAForcedFailoverToStandbyServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .restart("exampleresourcegroup", "exampleserver", + new RestartParameter().withRestartWithFailover(true).withFailoverMode(FailoverMode.FORCED_FAILOVER), + com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_Other_SourceTypes_Validate_Migrate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersRestart. + * json */ /** - * Sample code: Create Migration with other source types for Validate and Migrate. + * Sample code: Restart PostgreSQL database engine in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void createMigrationWithOtherSourceTypesForValidateAndMigrate( + public static void restartPostgreSQLDatabaseEngineInAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") - .withMigrationMode(MigrationMode.OFFLINE) - .withMigrationOption(MigrationOption.VALIDATE_AND_MIGRATE) - .withSourceType(SourceType.ON_PREMISES) - .withSslMode(SslMode.PREFER) - .withSourceDbServerResourceId("testsource:5432@pguser") - .withSecretParameters(new MigrationSecretParameters() - .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) - .create(); + manager.servers().restart("exampleresourcegroup", "exampleserver", null, com.azure.core.util.Context.NONE); } } ``` -### TuningConfiguration_ListSessions +### Servers_Start ```java /** - * Samples for FirewallRules Delete. + * Samples for Servers Start. */ -public final class FirewallRulesDeleteSamples { +public final class ServersStartSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * FirewallRuleDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersStart.json */ /** - * Sample code: FirewallRuleDelete. + * Sample code: Start a stopped server. * * @param manager Entry point to PostgreSqlManager. */ public static void - firewallRuleDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.firewallRules().delete("testrg", "testserver", "rule1", com.azure.core.util.Context.NONE); + startAStoppedServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().start("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### TuningConfiguration_StartSession +### Servers_Stop ```java /** - * Samples for FirewallRules ListByServer. + * Samples for Servers Stop. */ -public final class FirewallRulesListByServerSamples { +public final class ServersStopSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * FirewallRuleListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersStop.json */ /** - * Sample code: FirewallRuleList. + * Sample code: Stop a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void firewallRuleList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.firewallRules().listByServer("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void stopAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().stop("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### TuningConfiguration_StopSession +### Servers_Update ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAuthEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ArmServerKeyType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTiers; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForUpdate; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfigForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTier; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryptionType; import com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordAuthEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindowForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MicrosoftEntraAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordBasedAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.ReadReplicaPromoteMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ReadReplicaPromoteOption; import com.azure.resourcemanager.postgresqlflexibleserver.models.Replica; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationPromoteOption; import com.azure.resourcemanager.postgresqlflexibleserver.models.Server; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrow; @@ -2357,223 +2335,264 @@ import java.util.Map; public final class ServersUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdateWithDataEncryptionEnabled.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersPromoteReplicaAsForcedSwitchover.json */ /** - * Sample code: ServerUpdateWithDataEncryptionEnabled. + * Sample code: Switch over a read replica to primary server with forced data synchronization. Meaning that it + * doesn't wait for data in the read replica to be synchronized with its source server before it initiates the + * switching of roles between the read replica and the primary server. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdateWithDataEncryptionEnabled( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + switchOverAReadReplicaToPrimaryServerWithForcedDataSynchronizationMeaningThatItDoesnTWaitForDataInTheReadReplicaToBeSynchronizedWithItsSourceServerBeforeItInitiatesTheSwitchingOfRolesBetweenTheReadReplicaAndThePrimaryServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("TestGroup", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withSku(new Sku().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) - .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity", - new UserIdentity(), - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity", - new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) - .withAdministratorLoginPassword("newpassword") - .withBackup(new Backup().withBackupRetentionDays(20)) - .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") - .withPrimaryUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity") - .withGeoBackupKeyUri("fakeTokenPlaceholder") - .withGeoBackupUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity") - .withType(ArmServerKeyType.AZURE_KEY_VAULT)) - .withCreateMode(CreateModeForUpdate.UPDATE) + .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.SWITCHOVER) + .withPromoteOption(ReadReplicaPromoteOption.FORCED)) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PromoteReplicaAsPlannedSwitchover.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersPromoteReplicaAsPlannedSwitchover.json */ /** - * Sample code: SwitchOver a replica server as planned, i.e. it will wait for replication to complete before - * promoting replica as Primary and original primary as replica. + * Sample code: Switch over a read replica to primary server with planned data synchronization. Meaning that it + * waits for data in the read replica to be fully synchronized with its source server before it initiates the + * switching of roles between the read replica and the primary server. * * @param manager Entry point to PostgreSqlManager. */ public static void - switchOverAReplicaServerAsPlannedIEItWillWaitForReplicationToCompleteBeforePromotingReplicaAsPrimaryAndOriginalPrimaryAsReplica( + switchOverAReadReplicaToPrimaryServerWithPlannedDataSynchronizationMeaningThatItWaitsForDataInTheReadReplicaToBeFullySynchronizedWithItsSourceServerBeforeItInitiatesTheSwitchingOfRolesBetweenTheReadReplicaAndThePrimaryServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.SWITCHOVER) - .withPromoteOption(ReplicationPromoteOption.PLANNED)) + .withPromoteOption(ReadReplicaPromoteOption.PLANNED)) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PromoteReplicaAsForcedSwitchover.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithMicrosoftEntraEnabled.json */ /** - * Sample code: SwitchOver a replica server as forced, i.e. it will replica as Primary and original primary as - * replica immediately without waiting for primary and replica to be in sync. + * Sample code: Update an existing server with Microsoft Entra authentication enabled. * * @param manager Entry point to PostgreSqlManager. */ - public static void - switchOverAReplicaServerAsForcedIEItWillReplicaAsPrimaryAndOriginalPrimaryAsReplicaImmediatelyWithoutWaitingForPrimaryAndReplicaToBeInSync( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void updateAnExistingServerWithMicrosoftEntraAuthenticationEnabled( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.SWITCHOVER) - .withPromoteOption(ReplicationPromoteOption.FORCED)) + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLoginPassword("examplenewpassword") + .withStorage(new Storage().withStorageSizeGB(1024) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P30)) + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withAuthConfig(new AuthConfigForPatch().withActiveDirectoryAuth(MicrosoftEntraAuth.ENABLED) + .withPasswordAuth(PasswordBasedAuth.ENABLED) + .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) + .withCreateMode(CreateModeForPatch.UPDATE) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithDataEncryptionEnabledAutoUpdate.json */ /** - * Sample code: ServerUpdate. + * Sample code: Update an existing server with data encryption based on customer managed key with automatic key + * version update. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void updateAnExistingServerWithDataEncryptionBasedOnCustomerManagedKeyWithAutomaticKeyVersionUpdate( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("TestGroup", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withSku(new Sku().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLoginPassword("newpassword") - .withStorage(new Storage().withStorageSizeGB(1024) - .withAutoGrow(StorageAutoGrow.ENABLED) - .withTier(AzureManagedDiskPerformanceTiers.P30)) - .withBackup(new Backup().withBackupRetentionDays(20)) - .withCreateMode(CreateModeForUpdate.UPDATE) + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity", + new UserIdentity(), + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withAdministratorLoginPassword("examplenewpassword") + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withCreateMode(CreateModeForPatch.UPDATE) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdateWithMajorVersionUpgrade.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithMajorVersionUpgrade.json */ /** - * Sample code: ServerUpdateWithMajorVersionUpgrade. + * Sample code: Update an existing server to upgrade the major version of PostgreSQL database engine. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdateWithMajorVersionUpgrade( + public static void updateAnExistingServerToUpgradeTheMajorVersionOfPostgreSQLDatabaseEngine( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withVersion(ServerVersion.ONE_SIX).withCreateMode(CreateModeForUpdate.UPDATE).apply(); + resource.update().withVersion(PostgresMajorVersion.ONE_SEVEN).withCreateMode(CreateModeForPatch.UPDATE).apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdateWithCustomerMaintenanceWindow.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithCustomMaintenanceWindow.json */ /** - * Sample code: ServerUpdateWithCustomerMaintenanceWindow. + * Sample code: Update an existing server with custom maintenance window. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdateWithCustomerMaintenanceWindow( + public static void updateAnExistingServerWithCustomMaintenanceWindow( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withMaintenanceWindow(new MaintenanceWindow().withCustomWindow("Enabled") + .withMaintenanceWindow(new MaintenanceWindowForPatch().withCustomWindow("Enabled") .withStartHour(8) .withStartMinute(0) .withDayOfWeek(0)) - .withCreateMode(CreateModeForUpdate.UPDATE) + .withCreateMode(CreateModeForPatch.UPDATE) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdateWithMicrosoftEntraEnabled.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithDataEncryptionEnabled.json */ /** - * Sample code: ServerUpdateWithMicrosoftEntraEnabled. + * Sample code: Update an existing server with data encryption based on customer managed key. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdateWithMicrosoftEntraEnabled( + public static void updateAnExistingServerWithDataEncryptionBasedOnCustomerManagedKey( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("TestGroup", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity", + new UserIdentity(), + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withAdministratorLoginPassword("examplenewpassword") + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withCreateMode(CreateModeForPatch.UPDATE) + .apply(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersUpdate.json + */ + /** + * Sample code: Update an existing server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + updateAnExistingServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + Server resource = manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withSku(new Sku().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLoginPassword("newpassword") + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLoginPassword("examplenewpassword") .withStorage(new Storage().withStorageSizeGB(1024) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P30)) - .withBackup(new Backup().withBackupRetentionDays(20)) - .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(ActiveDirectoryAuthEnum.ENABLED) - .withPasswordAuth(PasswordAuthEnum.ENABLED) - .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) - .withCreateMode(CreateModeForUpdate.UPDATE) + .withAutoGrow(StorageAutoGrow.ENABLED) + .withTier(AzureManagedDiskPerformanceTier.P30)) + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withCreateMode(CreateModeForPatch.UPDATE) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PromoteReplicaAsForcedStandaloneServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersPromoteReplicaAsForcedStandaloneServer.json */ /** - * Sample code: Promote a replica server as a Standalone server as forced, i.e. it will promote a replica server - * immediately without waiting for primary and replica to be in sync. + * Sample code: Promote a read replica to a standalone server with forced data synchronization. Meaning that it + * doesn't wait for data in the read replica to be synchronized with its source server before it initiates the + * promotion to a standalone server. * * @param manager Entry point to PostgreSqlManager. */ public static void - promoteAReplicaServerAsAStandaloneServerAsForcedIEItWillPromoteAReplicaServerImmediatelyWithoutWaitingForPrimaryAndReplicaToBeInSync( + promoteAReadReplicaToAStandaloneServerWithForcedDataSynchronizationMeaningThatItDoesnTWaitForDataInTheReadReplicaToBeSynchronizedWithItsSourceServerBeforeItInitiatesThePromotionToAStandaloneServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.STANDALONE) - .withPromoteOption(ReplicationPromoteOption.FORCED)) + .withPromoteOption(ReadReplicaPromoteOption.FORCED)) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PromoteReplicaAsPlannedStandaloneServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersPromoteReplicaAsPlannedStandaloneServer.json */ /** - * Sample code: Promote a replica server as a Standalone server as planned, i.e. it will wait for replication to - * complete. + * Sample code: Promote a read replica to a standalone server with planned data synchronization. Meaning that it + * waits for data in the read replica to be fully synchronized with its source server before it initiates the + * promotion to a standalone server. * * @param manager Entry point to PostgreSqlManager. */ - public static void promoteAReplicaServerAsAStandaloneServerAsPlannedIEItWillWaitForReplicationToComplete( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + promoteAReadReplicaToAStandaloneServerWithPlannedDataSynchronizationMeaningThatItWaitsForDataInTheReadReplicaToBeFullySynchronizedWithItsSourceServerBeforeItInitiatesThePromotionToAStandaloneServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.STANDALONE) - .withPromoteOption(ReplicationPromoteOption.PLANNED)) + .withPromoteOption(ReadReplicaPromoteOption.PLANNED)) .apply(); } @@ -2591,305 +2610,306 @@ public final class ServersUpdateSamples { } ``` -### TuningIndex_ListRecommendations +### TuningOptionsOperation_Get ```java +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; + /** - * Samples for Migrations Delete. + * Samples for TuningOptionsOperation Get. */ -public final class MigrationsDeleteSamples { +public final class TuningOptionsOperationGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Delete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/TuningOptionsGet. + * json */ /** - * Sample code: Migrations_Delete. + * Sample code: Get the tuning options of a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .deleteWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", + public static void + getTheTuningOptionsOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .getWithResponse("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.INDEX, com.azure.core.util.Context.NONE); } } ``` -### TuningOptions_Get +### TuningOptionsOperation_ListByServer ```java /** - * Samples for Configurations Put. + * Samples for TuningOptionsOperation ListByServer. */ -public final class ConfigurationsPutSamples { +public final class TuningOptionsOperationListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ConfigurationUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListByServer.json */ /** - * Sample code: Update a user configuration. + * Sample code: List the tuning options of a server. * * @param manager Entry point to PostgreSqlManager. */ public static void - updateAUserConfiguration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.configurations() - .define("constraint_exclusion") - .withExistingFlexibleServer("testrg", "testserver") - .withValue("on") - .withSource("user-override") - .create(); + listTheTuningOptionsOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } ``` -### TuningOptions_ListByServer +### TuningOptionsOperation_ListRecommendations ```java -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; /** - * Samples for ResourceProvider CheckMigrationNameAvailability. + * Samples for TuningOptionsOperation ListRecommendations. */ -public final class ResourceProviderCheckMigrationNameAvailabilitySamples { +public final class TuningOptionsOperationListRecommendationsSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * CheckMigrationNameAvailability.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListIndexRecommendations.json */ /** - * Sample code: CheckMigrationNameAvailability. + * Sample code: List available index recommendations. * * @param manager Entry point to PostgreSqlManager. */ - public static void - checkMigrationNameAvailability(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.resourceProviders() - .checkMigrationNameAvailabilityWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - new MigrationNameAvailabilityResourceInner().withName("name1") - .withType("Microsoft.DBforPostgreSQL/flexibleServers/migrations"), + public static void listAvailableIndexRecommendations( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listRecommendations("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.INDEX, null, com.azure.core.util.Context.NONE); } -} -``` - -### VirtualEndpoints_Create -```java -/** - * Samples for GetPrivateDnsZoneSuffix Execute. - */ -public final class GetPrivateDnsZoneSuffixExecuteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * GetPrivateDnsZoneSuffix.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListTableRecommendations.json */ /** - * Sample code: GetPrivateDnsZoneSuffix. + * Sample code: List available table recommendations. * * @param manager Entry point to PostgreSqlManager. */ - public static void - getPrivateDnsZoneSuffix(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.getPrivateDnsZoneSuffixes().executeWithResponse(com.azure.core.util.Context.NONE); + public static void listAvailableTableRecommendations( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listRecommendations("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.TABLE, null, + com.azure.core.util.Context.NONE); } -} -``` - -### VirtualEndpoints_Delete -```java -/** - * Samples for Replicas ListByServer. - */ -public final class ReplicasListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ReplicasListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListIndexRecommendationsFilteredForCreateIndex.json */ /** - * Sample code: ReplicasListByServer. + * Sample code: List available index recommendations, filtered to exclusively get those of CREATE INDEX type. * * @param manager Entry point to PostgreSqlManager. */ - public static void - replicasListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.replicas().listByServer("testrg", "sourcepgservername", com.azure.core.util.Context.NONE); + public static void listAvailableIndexRecommendationsFilteredToExclusivelyGetThoseOfCREATEINDEXType( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listRecommendations("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.INDEX, + RecommendationTypeParameterEnum.CREATE_INDEX, com.azure.core.util.Context.NONE); } -} -``` - -### VirtualEndpoints_Get -```java -/** - * Samples for PrivateEndpointConnections ListByServer. - */ -public final class PrivateEndpointConnectionsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateEndpointConnectionList.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListTableRecommendationsFilteredForAnalyzeTable.json */ /** - * Sample code: Gets list of private endpoint connections on a server. + * Sample code: List available table recommendations, filtered to exclusively get those of ANALYZE TABLE type. * * @param manager Entry point to PostgreSqlManager. */ - public static void getsListOfPrivateEndpointConnectionsOnAServer( + public static void listAvailableTableRecommendationsFilteredToExclusivelyGetThoseOfANALYZETABLEType( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateEndpointConnections().listByServer("Default", "test-svr", com.azure.core.util.Context.NONE); + manager.tuningOptionsOperations() + .listRecommendations("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.TABLE, + RecommendationTypeParameterEnum.ANALYZE_TABLE, com.azure.core.util.Context.NONE); } } ``` -### VirtualEndpoints_ListByServer +### VirtualEndpoints_Create ```java -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationListFilter; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; +import java.util.Arrays; /** - * Samples for Migrations ListByTargetServer. + * Samples for VirtualEndpoints Create. */ -public final class MigrationsListByTargetServerSamples { +public final class VirtualEndpointsCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_ListByTargetServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * VirtualEndpointCreate.json */ /** - * Sample code: Migrations_ListByTargetServer. + * Sample code: Create a pair of virtual endpoints for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - migrationsListByTargetServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .listByTargetServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", MigrationListFilter.ALL, - com.azure.core.util.Context.NONE); + public static void createAPairOfVirtualEndpointsForAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.virtualEndpoints() + .define("examplebasename") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withEndpointType(VirtualEndpointType.READ_WRITE) + .withMembers(Arrays.asList("exampleprimaryserver")) + .create(); } } ``` -### VirtualEndpoints_Update +### VirtualEndpoints_Delete ```java /** - * Samples for Migrations Get. + * Samples for VirtualEndpoints Delete. */ -public final class MigrationsGetSamples { +public final class VirtualEndpointsDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_GetMigrationWithSuccessfulValidationOnly.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * VirtualEndpointDelete.json */ /** - * Sample code: Migrations_GetMigrationWithSuccessfulValidationOnly. + * Sample code: Delete a pair of virtual endpoints. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGetMigrationWithSuccessfulValidationOnly( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - "testmigrationwithsuccessfulvalidationonly", com.azure.core.util.Context.NONE); + public static void + deleteAPairOfVirtualEndpoints(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.virtualEndpoints() + .delete("exampleresourcegroup", "exampleserver", "examplebasename", com.azure.core.util.Context.NONE); } +} +``` - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Get.json - */ - /** - * Sample code: Migrations_Get. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void migrationsGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", - com.azure.core.util.Context.NONE); - } +### VirtualEndpoints_Get +```java +/** + * Samples for VirtualEndpoints Get. + */ +public final class VirtualEndpointsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_GetMigrationWithSuccessfulValidationButMigrationFailure.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * VirtualEndpointsGet.json */ /** - * Sample code: Migrations_GetMigrationWithSuccessfulValidationButMigrationFailure. + * Sample code: Get information about a pair of virtual endpoints. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGetMigrationWithSuccessfulValidationButMigrationFailure( + public static void getInformationAboutAPairOfVirtualEndpoints( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - "testmigrationwithsuccessfulvalidationbutmigrationfailure", com.azure.core.util.Context.NONE); + manager.virtualEndpoints() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplebasename", + com.azure.core.util.Context.NONE); } +} +``` + +### VirtualEndpoints_ListByServer +```java +/** + * Samples for VirtualEndpoints ListByServer. + */ +public final class VirtualEndpointsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_GetMigrationWithSuccessfulValidationAndMigration.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * VirtualEndpointsListByServer.json */ /** - * Sample code: Migrations_GetMigrationWithSuccessfulValidationAndMigration. + * Sample code: List pair of virtual endpoints associated to a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGetMigrationWithSuccessfulValidationAndMigration( + public static void listPairOfVirtualEndpointsAssociatedToAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - "testmigrationwithsuccessfulvalidationandmigration", com.azure.core.util.Context.NONE); + manager.virtualEndpoints() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } +} +``` + +### VirtualEndpoints_Update +```java +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoint; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; +import java.util.Arrays; + +/** + * Samples for VirtualEndpoints Update. + */ +public final class VirtualEndpointsUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_GetMigrationWithValidationFailures.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * VirtualEndpointUpdate.json */ /** - * Sample code: Migrations_GetMigrationWithValidationFailures. + * Sample code: Update a pair of virtual endpoints for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGetMigrationWithValidationFailures( + public static void updateAPairOfVirtualEndpointsForAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - "testmigrationwithvalidationfailure", com.azure.core.util.Context.NONE); + VirtualEndpoint resource = manager.virtualEndpoints() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplebasename", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withEndpointType(VirtualEndpointType.READ_WRITE) + .withMembers(Arrays.asList("exampleprimaryserver")) + .apply(); } } ``` -### VirtualNetworkSubnetUsage_Execute +### VirtualNetworkSubnetUsage_List ```java +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; + /** - * Samples for PrivateEndpointConnections Get. + * Samples for VirtualNetworkSubnetUsage List. */ -public final class PrivateEndpointConnectionsGetSamples { +public final class VirtualNetworkSubnetUsageListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateEndpointConnectionGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * VirtualNetworkSubnetUsageList.json */ /** - * Sample code: Gets private endpoint connection. + * Sample code: List the virtual network subnet usage for a given virtual network. * * @param manager Entry point to PostgreSqlManager. */ - public static void - getsPrivateEndpointConnection(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateEndpointConnections() - .getWithResponse("Default", "test-svr", - "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", + public static void listTheVirtualNetworkSubnetUsageForAGivenVirtualNetwork( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.virtualNetworkSubnetUsages() + .listWithResponse("eastus", new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml index 366acde8e35e..e63275b2155a 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-postgresqlflexibleserver - 1.2.0-beta.2 + 2.0.0 jar Microsoft Azure SDK for PostgreSql Management - This package contains Microsoft Azure SDK for PostgreSql Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2025-01-01-preview. + This package contains Microsoft Azure SDK for PostgreSql Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2025-08-01. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,6 @@ UTF-8 0 0 - true diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManager.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManager.java index 36a70ec07269..0bfe67bdc205 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManager.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManager.java @@ -25,61 +25,51 @@ import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PostgreSqlManagementClient; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.AdministratorsImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.BackupsImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.CheckNameAvailabilitiesImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.CheckNameAvailabilityWithLocationsImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.AdministratorsMicrosoftEntrasImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.AdvancedThreatProtectionSettingsImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.BackupsAutomaticAndOnDemandsImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.BackupsLongTermRetentionsImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.CapabilitiesByLocationsImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.CapabilitiesByServersImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.CapturedLogsImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ConfigurationsImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.DatabasesImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.FirewallRulesImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.FlexibleServersImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.GetPrivateDnsZoneSuffixesImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.LocationBasedCapabilitiesImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.LogFilesImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.LtrBackupOperationsImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.MigrationsImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.NameAvailabilitiesImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.OperationsImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PostgreSqlManagementClientBuilder; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateEndpointConnectionOperationsImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateDnsZoneSuffixesImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateEndpointConnectionsImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateLinkResourcesImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.QuotaUsagesImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ReplicasImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ResourceProvidersImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerCapabilitiesImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerThreatProtectionSettingsImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServersImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.TuningConfigurationsImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.TuningIndexesImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.implementation.TuningOptionsImpl; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.TuningOptionsOperationsImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.VirtualEndpointsImpl; import com.azure.resourcemanager.postgresqlflexibleserver.implementation.VirtualNetworkSubnetUsagesImpl; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Administrators; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Backups; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilities; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityWithLocations; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorsMicrosoftEntras; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettings; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsAutomaticAndOnDemands; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentions; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilitiesByLocations; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilitiesByServers; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapturedLogs; import com.azure.resourcemanager.postgresqlflexibleserver.models.Configurations; import com.azure.resourcemanager.postgresqlflexibleserver.models.Databases; import com.azure.resourcemanager.postgresqlflexibleserver.models.FirewallRules; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServers; -import com.azure.resourcemanager.postgresqlflexibleserver.models.GetPrivateDnsZoneSuffixes; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LocationBasedCapabilities; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogFiles; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupOperations; import com.azure.resourcemanager.postgresqlflexibleserver.models.Migrations; +import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailabilities; import com.azure.resourcemanager.postgresqlflexibleserver.models.Operations; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnectionOperations; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateDnsZoneSuffixes; import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnections; import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkResources; import com.azure.resourcemanager.postgresqlflexibleserver.models.QuotaUsages; import com.azure.resourcemanager.postgresqlflexibleserver.models.Replicas; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ResourceProviders; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerCapabilities; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettings; import com.azure.resourcemanager.postgresqlflexibleserver.models.Servers; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningConfigurations; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningIndexes; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptions; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsOperations; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoints; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsages; import java.time.Duration; @@ -92,22 +82,24 @@ /** * Entry point to PostgreSqlManager. - * The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL - * resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and - * configurations with new business model. + * The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure + * PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, + * log files and configurations with new business model. */ public final class PostgreSqlManager { - private Administrators administrators; + private AdministratorsMicrosoftEntras administratorsMicrosoftEntras; - private Backups backups; + private AdvancedThreatProtectionSettings advancedThreatProtectionSettings; - private LocationBasedCapabilities locationBasedCapabilities; + private ServerThreatProtectionSettings serverThreatProtectionSettings; + + private BackupsAutomaticAndOnDemands backupsAutomaticAndOnDemands; - private ServerCapabilities serverCapabilities; + private CapabilitiesByLocations capabilitiesByLocations; - private CheckNameAvailabilities checkNameAvailabilities; + private CapabilitiesByServers capabilitiesByServers; - private CheckNameAvailabilityWithLocations checkNameAvailabilityWithLocations; + private CapturedLogs capturedLogs; private Configurations configurations; @@ -115,39 +107,27 @@ public final class PostgreSqlManager { private FirewallRules firewallRules; - private Servers servers; - - private FlexibleServers flexibleServers; - - private LtrBackupOperations ltrBackupOperations; + private BackupsLongTermRetentions backupsLongTermRetentions; private Migrations migrations; - private ResourceProviders resourceProviders; + private NameAvailabilities nameAvailabilities; private Operations operations; - private GetPrivateDnsZoneSuffixes getPrivateDnsZoneSuffixes; + private PrivateDnsZoneSuffixes privateDnsZoneSuffixes; private PrivateEndpointConnections privateEndpointConnections; - private PrivateEndpointConnectionOperations privateEndpointConnectionOperations; - private PrivateLinkResources privateLinkResources; private QuotaUsages quotaUsages; private Replicas replicas; - private LogFiles logFiles; - - private ServerThreatProtectionSettings serverThreatProtectionSettings; - - private TuningOptions tuningOptions; - - private TuningIndexes tuningIndexes; + private Servers servers; - private TuningConfigurations tuningConfigurations; + private TuningOptionsOperations tuningOptionsOperations; private VirtualEndpoints virtualEndpoints; @@ -369,78 +349,93 @@ public PostgreSqlManager authenticate(TokenCredential credential, AzureProfile p } /** - * Gets the resource collection API of Administrators. It manages ActiveDirectoryAdministrator. + * Gets the resource collection API of AdministratorsMicrosoftEntras. It manages AdministratorMicrosoftEntra. + * + * @return Resource collection API of AdministratorsMicrosoftEntras. + */ + public AdministratorsMicrosoftEntras administratorsMicrosoftEntras() { + if (this.administratorsMicrosoftEntras == null) { + this.administratorsMicrosoftEntras + = new AdministratorsMicrosoftEntrasImpl(clientObject.getAdministratorsMicrosoftEntras(), this); + } + return administratorsMicrosoftEntras; + } + + /** + * Gets the resource collection API of AdvancedThreatProtectionSettings. * - * @return Resource collection API of Administrators. + * @return Resource collection API of AdvancedThreatProtectionSettings. */ - public Administrators administrators() { - if (this.administrators == null) { - this.administrators = new AdministratorsImpl(clientObject.getAdministrators(), this); + public AdvancedThreatProtectionSettings advancedThreatProtectionSettings() { + if (this.advancedThreatProtectionSettings == null) { + this.advancedThreatProtectionSettings + = new AdvancedThreatProtectionSettingsImpl(clientObject.getAdvancedThreatProtectionSettings(), this); } - return administrators; + return advancedThreatProtectionSettings; } /** - * Gets the resource collection API of Backups. + * Gets the resource collection API of ServerThreatProtectionSettings. It manages + * AdvancedThreatProtectionSettingsModel. * - * @return Resource collection API of Backups. + * @return Resource collection API of ServerThreatProtectionSettings. */ - public Backups backups() { - if (this.backups == null) { - this.backups = new BackupsImpl(clientObject.getBackups(), this); + public ServerThreatProtectionSettings serverThreatProtectionSettings() { + if (this.serverThreatProtectionSettings == null) { + this.serverThreatProtectionSettings + = new ServerThreatProtectionSettingsImpl(clientObject.getServerThreatProtectionSettings(), this); } - return backups; + return serverThreatProtectionSettings; } /** - * Gets the resource collection API of LocationBasedCapabilities. + * Gets the resource collection API of BackupsAutomaticAndOnDemands. * - * @return Resource collection API of LocationBasedCapabilities. + * @return Resource collection API of BackupsAutomaticAndOnDemands. */ - public LocationBasedCapabilities locationBasedCapabilities() { - if (this.locationBasedCapabilities == null) { - this.locationBasedCapabilities - = new LocationBasedCapabilitiesImpl(clientObject.getLocationBasedCapabilities(), this); + public BackupsAutomaticAndOnDemands backupsAutomaticAndOnDemands() { + if (this.backupsAutomaticAndOnDemands == null) { + this.backupsAutomaticAndOnDemands + = new BackupsAutomaticAndOnDemandsImpl(clientObject.getBackupsAutomaticAndOnDemands(), this); } - return locationBasedCapabilities; + return backupsAutomaticAndOnDemands; } /** - * Gets the resource collection API of ServerCapabilities. + * Gets the resource collection API of CapabilitiesByLocations. * - * @return Resource collection API of ServerCapabilities. + * @return Resource collection API of CapabilitiesByLocations. */ - public ServerCapabilities serverCapabilities() { - if (this.serverCapabilities == null) { - this.serverCapabilities = new ServerCapabilitiesImpl(clientObject.getServerCapabilities(), this); + public CapabilitiesByLocations capabilitiesByLocations() { + if (this.capabilitiesByLocations == null) { + this.capabilitiesByLocations + = new CapabilitiesByLocationsImpl(clientObject.getCapabilitiesByLocations(), this); } - return serverCapabilities; + return capabilitiesByLocations; } /** - * Gets the resource collection API of CheckNameAvailabilities. + * Gets the resource collection API of CapabilitiesByServers. * - * @return Resource collection API of CheckNameAvailabilities. + * @return Resource collection API of CapabilitiesByServers. */ - public CheckNameAvailabilities checkNameAvailabilities() { - if (this.checkNameAvailabilities == null) { - this.checkNameAvailabilities - = new CheckNameAvailabilitiesImpl(clientObject.getCheckNameAvailabilities(), this); + public CapabilitiesByServers capabilitiesByServers() { + if (this.capabilitiesByServers == null) { + this.capabilitiesByServers = new CapabilitiesByServersImpl(clientObject.getCapabilitiesByServers(), this); } - return checkNameAvailabilities; + return capabilitiesByServers; } /** - * Gets the resource collection API of CheckNameAvailabilityWithLocations. + * Gets the resource collection API of CapturedLogs. * - * @return Resource collection API of CheckNameAvailabilityWithLocations. + * @return Resource collection API of CapturedLogs. */ - public CheckNameAvailabilityWithLocations checkNameAvailabilityWithLocations() { - if (this.checkNameAvailabilityWithLocations == null) { - this.checkNameAvailabilityWithLocations = new CheckNameAvailabilityWithLocationsImpl( - clientObject.getCheckNameAvailabilityWithLocations(), this); + public CapturedLogs capturedLogs() { + if (this.capturedLogs == null) { + this.capturedLogs = new CapturedLogsImpl(clientObject.getCapturedLogs(), this); } - return checkNameAvailabilityWithLocations; + return capturedLogs; } /** @@ -480,43 +475,20 @@ public FirewallRules firewallRules() { } /** - * Gets the resource collection API of Servers. It manages Server. - * - * @return Resource collection API of Servers. - */ - public Servers servers() { - if (this.servers == null) { - this.servers = new ServersImpl(clientObject.getServers(), this); - } - return servers; - } - - /** - * Gets the resource collection API of FlexibleServers. + * Gets the resource collection API of BackupsLongTermRetentions. * - * @return Resource collection API of FlexibleServers. + * @return Resource collection API of BackupsLongTermRetentions. */ - public FlexibleServers flexibleServers() { - if (this.flexibleServers == null) { - this.flexibleServers = new FlexibleServersImpl(clientObject.getFlexibleServers(), this); + public BackupsLongTermRetentions backupsLongTermRetentions() { + if (this.backupsLongTermRetentions == null) { + this.backupsLongTermRetentions + = new BackupsLongTermRetentionsImpl(clientObject.getBackupsLongTermRetentions(), this); } - return flexibleServers; + return backupsLongTermRetentions; } /** - * Gets the resource collection API of LtrBackupOperations. - * - * @return Resource collection API of LtrBackupOperations. - */ - public LtrBackupOperations ltrBackupOperations() { - if (this.ltrBackupOperations == null) { - this.ltrBackupOperations = new LtrBackupOperationsImpl(clientObject.getLtrBackupOperations(), this); - } - return ltrBackupOperations; - } - - /** - * Gets the resource collection API of Migrations. It manages MigrationResource. + * Gets the resource collection API of Migrations. It manages Migration. * * @return Resource collection API of Migrations. */ @@ -528,15 +500,15 @@ public Migrations migrations() { } /** - * Gets the resource collection API of ResourceProviders. + * Gets the resource collection API of NameAvailabilities. * - * @return Resource collection API of ResourceProviders. + * @return Resource collection API of NameAvailabilities. */ - public ResourceProviders resourceProviders() { - if (this.resourceProviders == null) { - this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this); + public NameAvailabilities nameAvailabilities() { + if (this.nameAvailabilities == null) { + this.nameAvailabilities = new NameAvailabilitiesImpl(clientObject.getNameAvailabilities(), this); } - return resourceProviders; + return nameAvailabilities; } /** @@ -552,16 +524,16 @@ public Operations operations() { } /** - * Gets the resource collection API of GetPrivateDnsZoneSuffixes. + * Gets the resource collection API of PrivateDnsZoneSuffixes. * - * @return Resource collection API of GetPrivateDnsZoneSuffixes. + * @return Resource collection API of PrivateDnsZoneSuffixes. */ - public GetPrivateDnsZoneSuffixes getPrivateDnsZoneSuffixes() { - if (this.getPrivateDnsZoneSuffixes == null) { - this.getPrivateDnsZoneSuffixes - = new GetPrivateDnsZoneSuffixesImpl(clientObject.getGetPrivateDnsZoneSuffixes(), this); + public PrivateDnsZoneSuffixes privateDnsZoneSuffixes() { + if (this.privateDnsZoneSuffixes == null) { + this.privateDnsZoneSuffixes + = new PrivateDnsZoneSuffixesImpl(clientObject.getPrivateDnsZoneSuffixes(), this); } - return getPrivateDnsZoneSuffixes; + return privateDnsZoneSuffixes; } /** @@ -577,19 +549,6 @@ public PrivateEndpointConnections privateEndpointConnections() { return privateEndpointConnections; } - /** - * Gets the resource collection API of PrivateEndpointConnectionOperations. - * - * @return Resource collection API of PrivateEndpointConnectionOperations. - */ - public PrivateEndpointConnectionOperations privateEndpointConnectionOperations() { - if (this.privateEndpointConnectionOperations == null) { - this.privateEndpointConnectionOperations = new PrivateEndpointConnectionOperationsImpl( - clientObject.getPrivateEndpointConnectionOperations(), this); - } - return privateEndpointConnectionOperations; - } - /** * Gets the resource collection API of PrivateLinkResources. * @@ -627,69 +586,32 @@ public Replicas replicas() { } /** - * Gets the resource collection API of LogFiles. - * - * @return Resource collection API of LogFiles. - */ - public LogFiles logFiles() { - if (this.logFiles == null) { - this.logFiles = new LogFilesImpl(clientObject.getLogFiles(), this); - } - return logFiles; - } - - /** - * Gets the resource collection API of ServerThreatProtectionSettings. It manages - * ServerThreatProtectionSettingsModel. - * - * @return Resource collection API of ServerThreatProtectionSettings. - */ - public ServerThreatProtectionSettings serverThreatProtectionSettings() { - if (this.serverThreatProtectionSettings == null) { - this.serverThreatProtectionSettings - = new ServerThreatProtectionSettingsImpl(clientObject.getServerThreatProtectionSettings(), this); - } - return serverThreatProtectionSettings; - } - - /** - * Gets the resource collection API of TuningOptions. - * - * @return Resource collection API of TuningOptions. - */ - public TuningOptions tuningOptions() { - if (this.tuningOptions == null) { - this.tuningOptions = new TuningOptionsImpl(clientObject.getTuningOptions(), this); - } - return tuningOptions; - } - - /** - * Gets the resource collection API of TuningIndexes. + * Gets the resource collection API of Servers. It manages Server. * - * @return Resource collection API of TuningIndexes. + * @return Resource collection API of Servers. */ - public TuningIndexes tuningIndexes() { - if (this.tuningIndexes == null) { - this.tuningIndexes = new TuningIndexesImpl(clientObject.getTuningIndexes(), this); + public Servers servers() { + if (this.servers == null) { + this.servers = new ServersImpl(clientObject.getServers(), this); } - return tuningIndexes; + return servers; } /** - * Gets the resource collection API of TuningConfigurations. + * Gets the resource collection API of TuningOptionsOperations. * - * @return Resource collection API of TuningConfigurations. + * @return Resource collection API of TuningOptionsOperations. */ - public TuningConfigurations tuningConfigurations() { - if (this.tuningConfigurations == null) { - this.tuningConfigurations = new TuningConfigurationsImpl(clientObject.getTuningConfigurations(), this); + public TuningOptionsOperations tuningOptionsOperations() { + if (this.tuningOptionsOperations == null) { + this.tuningOptionsOperations + = new TuningOptionsOperationsImpl(clientObject.getTuningOptionsOperations(), this); } - return tuningConfigurations; + return tuningOptionsOperations; } /** - * Gets the resource collection API of VirtualEndpoints. It manages VirtualEndpointResource. + * Gets the resource collection API of VirtualEndpoints. It manages VirtualEndpoint. * * @return Resource collection API of VirtualEndpoints. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsMicrosoftEntrasClient.java similarity index 63% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsClient.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsMicrosoftEntrasClient.java index e9f77c17fff3..ead2efe4cc2b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsMicrosoftEntrasClient.java @@ -13,138 +13,145 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministratorAdd; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntraAdd; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in AdministratorsClient. + * An instance of this class provides access to all the operations defined in AdministratorsMicrosoftEntrasClient. */ -public interface AdministratorsClient { +public interface AdministratorsMicrosoftEntrasClient { /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an Microsoft Entra Administrator along with {@link Response} on successful completion of - * {@link Mono}. + * @return server administrator associated to a Microsoft Entra principal along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createWithResponseAsync(String resourceGroupName, String serverName, - String objectId, ActiveDirectoryAdministratorAdd parameters); + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String objectId, AdministratorMicrosoftEntraAdd parameters); /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of represents an Microsoft Entra Administrator. + * @return the {@link PollerFlux} for polling of server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ActiveDirectoryAdministratorInner> beginCreateAsync( - String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters); + PollerFlux, AdministratorMicrosoftEntraInner> beginCreateOrUpdateAsync( + String resourceGroupName, String serverName, String objectId, AdministratorMicrosoftEntraAdd parameters); /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents an Microsoft Entra Administrator. + * @return the {@link SyncPoller} for polling of server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ActiveDirectoryAdministratorInner> beginCreate( - String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters); + SyncPoller, AdministratorMicrosoftEntraInner> beginCreateOrUpdate( + String resourceGroupName, String serverName, String objectId, AdministratorMicrosoftEntraAdd parameters); /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents an Microsoft Entra Administrator. + * @return the {@link SyncPoller} for polling of server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ActiveDirectoryAdministratorInner> beginCreate( - String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters, + SyncPoller, AdministratorMicrosoftEntraInner> beginCreateOrUpdate( + String resourceGroupName, String serverName, String objectId, AdministratorMicrosoftEntraAdd parameters, Context context); /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an Microsoft Entra Administrator on successful completion of {@link Mono}. + * @return server administrator associated to a Microsoft Entra principal on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync(String resourceGroupName, String serverName, String objectId, - ActiveDirectoryAdministratorAdd parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String objectId, AdministratorMicrosoftEntraAdd parameters); /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an Microsoft Entra Administrator. + * @return server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - ActiveDirectoryAdministratorInner create(String resourceGroupName, String serverName, String objectId, - ActiveDirectoryAdministratorAdd parameters); + AdministratorMicrosoftEntraInner createOrUpdate(String resourceGroupName, String serverName, String objectId, + AdministratorMicrosoftEntraAdd parameters); /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an Microsoft Entra Administrator. + * @return server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - ActiveDirectoryAdministratorInner create(String resourceGroupName, String serverName, String objectId, - ActiveDirectoryAdministratorAdd parameters, Context context); + AdministratorMicrosoftEntraInner createOrUpdate(String resourceGroupName, String serverName, String objectId, + AdministratorMicrosoftEntraAdd parameters, Context context); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -155,11 +162,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam String objectId); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -169,11 +176,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, String objectId); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -183,11 +190,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String objectId); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -199,11 +206,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -213,11 +220,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Mono deleteAsync(String resourceGroupName, String serverName, String objectId); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -226,11 +233,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String objectId); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -240,92 +247,97 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String objectId, Context context); /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response} on successful completion of {@link Mono}. + * @return information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, + Mono> getWithResponseAsync(String resourceGroupName, String serverName, String objectId); /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server on successful completion of {@link Mono}. + * @return information about a server administrator associated to a Microsoft Entra principal on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String objectId); + Mono getAsync(String resourceGroupName, String serverName, String objectId); /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, + Response getWithResponse(String resourceGroupName, String serverName, String objectId, Context context); /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about a server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - ActiveDirectoryAdministratorInner get(String resourceGroupName, String serverName, String objectId); + AdministratorMicrosoftEntraInner get(String resourceGroupName, String serverName, String objectId); /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Microsoft Entra Administrators as paginated response with {@link PagedFlux}. + * @return list of server administrators associated to Microsoft Entra principals as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); + PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Microsoft Entra Administrators as paginated response with {@link PagedIterable}. + * @return list of server administrators associated to Microsoft Entra principals as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -333,9 +345,10 @@ Response getWithResponse(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Microsoft Entra Administrators as paginated response with {@link PagedIterable}. + * @return list of server administrators associated to Microsoft Entra principals as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningOptionsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdvancedThreatProtectionSettingsClient.java similarity index 61% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningOptionsClient.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdvancedThreatProtectionSettingsClient.java index 8b665b9074b4..8c013f634b95 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningOptionsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdvancedThreatProtectionSettingsClient.java @@ -10,115 +10,117 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in TuningOptionsClient. + * An instance of this class provides access to all the operations defined in AdvancedThreatProtectionSettingsClient. */ -public interface TuningOptionsClient { +public interface AdvancedThreatProtectionSettingsClient { /** - * Retrieve the tuning option on a server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stores property that features impact on some metric if this recommended action is applied along with - * {@link Response} on successful completion of {@link Mono}. + * @return list of advanced threat protection settings for a server as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, + String serverName); /** - * Retrieve the tuning option on a server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stores property that features impact on some metric if this recommended action is applied on successful - * completion of {@link Mono}. + * @return list of advanced threat protection settings for a server as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Retrieve the tuning option on a server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stores property that features impact on some metric if this recommended action is applied along with - * {@link Response}. + * @return list of advanced threat protection settings for a server as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); /** - * Retrieve the tuning option on a server. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. + * @param threatProtectionName Name of the advanced threat protection settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stores property that features impact on some metric if this recommended action is applied. + * @return state of advanced threat protection settings for a server along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - TuningOptionsResourceInner get(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); + Mono> getWithResponseAsync(String resourceGroupName, + String serverName, ThreatProtectionName threatProtectionName); /** - * Retrieve the list of available tuning options. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server tuning options as paginated response with {@link PagedFlux}. + * @return state of advanced threat protection settings for a server on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName); /** - * Retrieve the list of available tuning options. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server tuning options as paginated response with {@link PagedIterable}. + * @return state of advanced threat protection settings for a server along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, Context context); /** - * Retrieve the list of available tuning options. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param context The context to associate with this operation. + * @param threatProtectionName Name of the advanced threat protection settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server tuning options as paginated response with {@link PagedIterable}. + * @return state of advanced threat protection settings for a server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + AdvancedThreatProtectionSettingsModelInner get(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsAutomaticAndOnDemandsClient.java similarity index 73% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsClient.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsAutomaticAndOnDemandsClient.java index 02ac67d51218..c69d909ae6f7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsAutomaticAndOnDemandsClient.java @@ -13,125 +13,126 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in BackupsClient. + * An instance of this class provides access to all the operations defined in BackupsAutomaticAndOnDemandsClient. */ -public interface BackupsClient { +public interface BackupsAutomaticAndOnDemandsClient { /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a backup along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createWithResponseAsync(String resourceGroupName, String serverName, String backupName); /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of server backup properties. + * @return the {@link PollerFlux} for polling of properties of a backup. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ServerBackupInner> beginCreateAsync(String resourceGroupName, - String serverName, String backupName); + PollerFlux, BackupAutomaticAndOnDemandInner> + beginCreateAsync(String resourceGroupName, String serverName, String backupName); /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of server backup properties. + * @return the {@link SyncPoller} for polling of properties of a backup. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerBackupInner> beginCreate(String resourceGroupName, - String serverName, String backupName); + SyncPoller, BackupAutomaticAndOnDemandInner> + beginCreate(String resourceGroupName, String serverName, String backupName); /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of server backup properties. + * @return the {@link SyncPoller} for polling of properties of a backup. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerBackupInner> beginCreate(String resourceGroupName, - String serverName, String backupName, Context context); + SyncPoller, BackupAutomaticAndOnDemandInner> + beginCreate(String resourceGroupName, String serverName, String backupName, Context context); /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties on successful completion of {@link Mono}. + * @return properties of a backup on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync(String resourceGroupName, String serverName, String backupName); + Mono createAsync(String resourceGroupName, String serverName, String backupName); /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties. + * @return properties of a backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerBackupInner create(String resourceGroupName, String serverName, String backupName); + BackupAutomaticAndOnDemandInner create(String resourceGroupName, String serverName, String backupName); /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties. + * @return properties of a backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerBackupInner create(String resourceGroupName, String serverName, String backupName, Context context); + BackupAutomaticAndOnDemandInner create(String resourceGroupName, String serverName, String backupName, + Context context); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -142,11 +143,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam String backupName); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -156,11 +157,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, String backupName); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -170,11 +171,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String backupName); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -186,11 +187,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -200,11 +201,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Mono deleteAsync(String resourceGroupName, String serverName, String backupName); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -213,11 +214,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String backupName); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -227,92 +228,93 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String backupName, Context context); /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific backup for a given server along with {@link Response} on successful completion of {@link Mono}. + * @return information of an on demand backup, given its name along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, + Mono> getWithResponseAsync(String resourceGroupName, String serverName, String backupName); /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific backup for a given server on successful completion of {@link Mono}. + * @return information of an on demand backup, given its name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String backupName); + Mono getAsync(String resourceGroupName, String serverName, String backupName); /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific backup for a given server along with {@link Response}. + * @return information of an on demand backup, given its name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String backupName, - Context context); + Response getWithResponse(String resourceGroupName, String serverName, + String backupName, Context context); /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific backup for a given server. + * @return information of an on demand backup, given its name. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerBackupInner get(String resourceGroupName, String serverName, String backupName); + BackupAutomaticAndOnDemandInner get(String resourceGroupName, String serverName, String backupName); /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server backups as paginated response with {@link PagedFlux}. + * @return list of backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); + PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server backups as paginated response with {@link PagedIterable}. + * @return list of backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -320,8 +322,9 @@ Response getWithResponse(String resourceGroupName, String ser * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server backups as paginated response with {@link PagedIterable}. + * @return list of backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsLongTermRetentionsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsLongTermRetentionsClient.java new file mode 100644 index 000000000000..833054e90b88 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsLongTermRetentionsClient.java @@ -0,0 +1,302 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionOperationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionRequest; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionsCheckPrerequisitesResponse; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in BackupsLongTermRetentionsClient. + */ +public interface BackupsLongTermRetentionsClient { + /** + * Performs all checks required for a long term retention backup operation to succeed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR pre-backup API call on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono checkPrerequisitesWithResponseAsync( + String resourceGroupName, String serverName, LtrPreBackupRequest parameters); + + /** + * Performs all checks required for a long term retention backup operation to succeed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR pre-backup API call on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono checkPrerequisitesAsync(String resourceGroupName, String serverName, + LtrPreBackupRequest parameters); + + /** + * Performs all checks required for a long term retention backup operation to succeed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR pre-backup API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupsLongTermRetentionsCheckPrerequisitesResponse checkPrerequisitesWithResponse(String resourceGroupName, + String serverName, LtrPreBackupRequest parameters, Context context); + + /** + * Performs all checks required for a long term retention backup operation to succeed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR pre-backup API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LtrPreBackupResponseInner checkPrerequisites(String resourceGroupName, String serverName, + LtrPreBackupRequest parameters); + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR backup API call along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> startWithResponseAsync(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters); + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, BackupsLongTermRetentionResponseInner> + beginStartAsync(String resourceGroupName, String serverName, BackupsLongTermRetentionRequest parameters); + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BackupsLongTermRetentionResponseInner> + beginStart(String resourceGroupName, String serverName, BackupsLongTermRetentionRequest parameters); + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BackupsLongTermRetentionResponseInner> beginStart( + String resourceGroupName, String serverName, BackupsLongTermRetentionRequest parameters, Context context); + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR backup API call on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono startAsync(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters); + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupsLongTermRetentionResponseInner start(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters); + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupsLongTermRetentionResponseInner start(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters, Context context); + + /** + * Gets the results of a long retention backup operation for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 results of a long retention backup operation for a server along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String backupName); + + /** + * Gets the results of a long retention backup operation for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 results of a long retention backup operation for a server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, + String backupName); + + /** + * Gets the results of a long retention backup operation for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName The name of the backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 results of a long retention backup operation for a server along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, + String backupName, Context context); + + /** + * Gets the results of a long retention backup operation for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName The name of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 results of a long retention backup operation for a server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupsLongTermRetentionOperationInner get(String resourceGroupName, String serverName, String backupName); + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of long term retention backup operations for server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of long term retention backup operations for server as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of long term retention backup operations for server as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LocationBasedCapabilitiesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByLocationsClient.java similarity index 67% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LocationBasedCapabilitiesClient.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByLocationsClient.java index 3bdd913b93af..26556c4a4f4d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LocationBasedCapabilitiesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByLocationsClient.java @@ -9,48 +9,49 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; /** - * An instance of this class provides access to all the operations defined in LocationBasedCapabilitiesClient. + * An instance of this class provides access to all the operations defined in CapabilitiesByLocationsClient. */ -public interface LocationBasedCapabilitiesClient { +public interface CapabilitiesByLocationsClient { /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities at specified location in a given subscription as paginated response with {@link PagedFlux}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux executeAsync(String locationName); + PagedFlux listAsync(String locationName); /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities at specified location in a given subscription as paginated response with + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable execute(String locationName); + PagedIterable list(String locationName); /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities at specified location in a given subscription as paginated response with + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable execute(String locationName, Context context); + PagedIterable list(String locationName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerCapabilitiesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByServersClient.java similarity index 68% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerCapabilitiesClient.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByServersClient.java index 1c5fcfa39c91..41f25319c501 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerCapabilitiesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByServersClient.java @@ -9,40 +9,42 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; /** - * An instance of this class provides access to all the operations defined in ServerCapabilitiesClient. + * An instance of this class provides access to all the operations defined in CapabilitiesByServersClient. */ -public interface ServerCapabilitiesClient { +public interface CapabilitiesByServersClient { /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities for a flexible server as paginated response with {@link PagedFlux}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String serverName); + PagedFlux listAsync(String resourceGroupName, String serverName); /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities for a flexible server as paginated response with {@link PagedIterable}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String serverName); + PagedIterable list(String resourceGroupName, String serverName); /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -50,8 +52,9 @@ public interface ServerCapabilitiesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities for a flexible server as paginated response with {@link PagedIterable}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String serverName, Context context); + PagedIterable list(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LogFilesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapturedLogsClient.java similarity index 73% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LogFilesClient.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapturedLogsClient.java index 882496153f2a..9409af6f811d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LogFilesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapturedLogsClient.java @@ -9,40 +9,40 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LogFileInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; /** - * An instance of this class provides access to all the operations defined in LogFilesClient. + * An instance of this class provides access to all the operations defined in CapturedLogsClient. */ -public interface LogFilesClient { +public interface CapturedLogsClient { /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of logFiles as paginated response with {@link PagedFlux}. + * @return list of log files as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); + PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of logFiles as paginated response with {@link PagedIterable}. + * @return list of log files as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -50,8 +50,8 @@ public interface LogFilesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of logFiles as paginated response with {@link PagedIterable}. + * @return list of log files as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java deleted file mode 100644 index 091c0e01077a..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java +++ /dev/null @@ -1,70 +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.resourcemanager.postgresqlflexibleserver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in CheckNameAvailabilitiesClient. - */ -public interface CheckNameAvailabilitiesClient { - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> - executeWithResponseAsync(CheckNameAvailabilityRequest nameAvailabilityRequest); - - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono executeAsync(CheckNameAvailabilityRequest nameAvailabilityRequest); - - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response executeWithResponse(CheckNameAvailabilityRequest nameAvailabilityRequest, - Context context); - - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NameAvailabilityInner execute(CheckNameAvailabilityRequest nameAvailabilityRequest); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilityWithLocationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilityWithLocationsClient.java deleted file mode 100644 index 8a1eba9fd4be..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilityWithLocationsClient.java +++ /dev/null @@ -1,74 +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.resourcemanager.postgresqlflexibleserver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in CheckNameAvailabilityWithLocationsClient. - */ -public interface CheckNameAvailabilityWithLocationsClient { - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> executeWithResponseAsync(String locationName, - CheckNameAvailabilityRequest nameAvailabilityRequest); - - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono executeAsync(String locationName, CheckNameAvailabilityRequest nameAvailabilityRequest); - - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response executeWithResponse(String locationName, - CheckNameAvailabilityRequest nameAvailabilityRequest, Context context); - - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NameAvailabilityInner execute(String locationName, CheckNameAvailabilityRequest nameAvailabilityRequest); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java index 64c5785128f2..23b24be2082e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java @@ -24,33 +24,34 @@ */ public interface ConfigurationsClient { /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server configurations as paginated response with {@link PagedFlux}. + * @return list of configurations (also known as server parameters) as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server configurations as paginated response with {@link PagedIterable}. + * @return list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -58,296 +59,322 @@ public interface ConfigurationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server configurations as paginated response with {@link PagedIterable}. + * @return list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server along with {@link Response} on successful completion of - * {@link Mono}. + * @return information about a specific configuration (also known as server parameter) of a server along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getWithResponseAsync(String resourceGroupName, String serverName, String configurationName); /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server on successful completion of {@link Mono}. + * @return information about a specific configuration (also known as server parameter) of a server on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono getAsync(String resourceGroupName, String serverName, String configurationName); /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server parameter). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server along with {@link Response}. + * @return information about a specific configuration (also known as server parameter) of a server along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String serverName, String configurationName, Context context); /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server. + * @return information about a specific configuration (also known as server parameter) of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) ConfigurationInner get(String resourceGroupName, String serverName, String configurationName); /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration along with {@link Response} on successful completion of {@link Mono}. + * @return configuration (also known as server parameter) along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of represents a Configuration. + * @return the {@link PollerFlux} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ConfigurationInner> beginUpdateAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents a Configuration. + * @return the {@link SyncPoller} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents a Configuration. + * @return the {@link SyncPoller} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters, Context context); /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration on successful completion of {@link Mono}. + * @return configuration (also known as server parameter) on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono updateAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration. + * @return configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.SINGLE) ConfigurationInner update(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration. + * @return configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.SINGLE) ConfigurationInner update(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters, Context context); /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration along with {@link Response} on successful completion of {@link Mono}. + * @return configuration (also known as server parameter) along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> putWithResponseAsync(String resourceGroupName, String serverName, - String configurationName, ConfigurationInner parameters); + String configurationName, ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of represents a Configuration. + * @return the {@link PollerFlux} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ConfigurationInner> beginPutAsync(String resourceGroupName, - String serverName, String configurationName, ConfigurationInner parameters); + String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents a Configuration. + * @return the {@link SyncPoller} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationInner> beginPut(String resourceGroupName, String serverName, - String configurationName, ConfigurationInner parameters); + String configurationName, ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents a Configuration. + * @return the {@link SyncPoller} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationInner> beginPut(String resourceGroupName, String serverName, - String configurationName, ConfigurationInner parameters, Context context); + String configurationName, ConfigurationForUpdate parameters, Context context); /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration on successful completion of {@link Mono}. + * @return configuration (also known as server parameter) on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono putAsync(String resourceGroupName, String serverName, String configurationName, - ConfigurationInner parameters); + ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration. + * @return configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.SINGLE) ConfigurationInner put(String resourceGroupName, String serverName, String configurationName, - ConfigurationInner parameters); + ConfigurationForUpdate parameters); /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration. + * @return configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.SINGLE) ConfigurationInner put(String resourceGroupName, String serverName, String configurationName, - ConfigurationInner parameters, Context context); + ConfigurationForUpdate parameters, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/DatabasesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/DatabasesClient.java index 6bc797b55c69..d990c89cfd57 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/DatabasesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/DatabasesClient.java @@ -23,124 +23,132 @@ */ public interface DatabasesClient { /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database along with {@link Response} on successful completion of {@link Mono}. + * @return represents a database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createWithResponseAsync(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of represents a Database. + * @return the {@link PollerFlux} for polling of represents a database. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, DatabaseInner> beginCreateAsync(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents a Database. + * @return the {@link SyncPoller} for polling of represents a database. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatabaseInner> beginCreate(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents a Database. + * @return the {@link SyncPoller} for polling of represents a database. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatabaseInner> beginCreate(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context); /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database on successful completion of {@link Mono}. + * @return represents a database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createAsync(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database. + * @return represents a database. */ @ServiceMethod(returns = ReturnType.SINGLE) DatabaseInner create(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database. + * @return represents a database. */ @ServiceMethod(returns = ReturnType.SINGLE) DatabaseInner create(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context); /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -151,11 +159,12 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam String databaseName); /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -166,11 +175,12 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St String databaseName); /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -180,11 +190,12 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName); /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -196,11 +207,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -210,11 +222,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Mono deleteAsync(String resourceGroupName, String serverName, String databaseName); /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -223,11 +236,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String databaseName); /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -237,92 +251,97 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String databaseName, Context context); /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database along with {@link Response} on successful completion of {@link Mono}. + * @return information about an existing database along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getWithResponseAsync(String resourceGroupName, String serverName, String databaseName); /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database on successful completion of {@link Mono}. + * @return information about an existing database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono getAsync(String resourceGroupName, String serverName, String databaseName); /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database along with {@link Response}. + * @return information about an existing database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String serverName, String databaseName, Context context); /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database. + * @return information about an existing database. */ @ServiceMethod(returns = ReturnType.SINGLE) DatabaseInner get(String resourceGroupName, String serverName, String databaseName); /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of databases as paginated response with {@link PagedFlux}. + * @return list of all databases in a server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of databases as paginated response with {@link PagedIterable}. + * @return list of all databases in a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -330,7 +349,7 @@ Response getWithResponse(String resourceGroupName, String serverN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of databases as paginated response with {@link PagedIterable}. + * @return list of all databases in a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName, Context context); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FirewallRulesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FirewallRulesClient.java index 9c04a404ca9a..a8058aa894bc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FirewallRulesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FirewallRulesClient.java @@ -27,12 +27,12 @@ public interface FirewallRulesClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}. + * @return firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, @@ -43,12 +43,12 @@ Mono>> createOrUpdateWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of represents a server firewall rule. + * @return the {@link PollerFlux} for polling of firewall rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, FirewallRuleInner> beginCreateOrUpdateAsync(String resourceGroupName, @@ -59,12 +59,12 @@ PollerFlux, FirewallRuleInner> beginCreateOrUpdate * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents a server firewall rule. + * @return the {@link SyncPoller} for polling of firewall rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName, @@ -75,13 +75,13 @@ SyncPoller, FirewallRuleInner> beginCreateOrUpdate * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents a server firewall rule. + * @return the {@link SyncPoller} for polling of firewall rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName, @@ -92,12 +92,12 @@ SyncPoller, FirewallRuleInner> beginCreateOrUpdate * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule on successful completion of {@link Mono}. + * @return firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createOrUpdateAsync(String resourceGroupName, String serverName, String firewallRuleName, @@ -108,12 +108,12 @@ Mono createOrUpdateAsync(String resourceGroupName, String ser * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, @@ -124,24 +124,24 @@ FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters, Context context); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -152,11 +152,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam String firewallRuleName); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -167,11 +167,11 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St String firewallRuleName); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -182,11 +182,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String firewallRuleName); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -198,11 +198,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -212,11 +212,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Mono deleteAsync(String resourceGroupName, String serverName, String firewallRuleName); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -225,11 +225,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String firewallRuleName); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -239,92 +239,93 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String firewallRuleName, Context context); /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}. + * @return information about a firewall rule in a server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getWithResponseAsync(String resourceGroupName, String serverName, String firewallRuleName); /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule on successful completion of {@link Mono}. + * @return information about a firewall rule in a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono getAsync(String resourceGroupName, String serverName, String firewallRuleName); /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule along with {@link Response}. + * @return information about a firewall rule in a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String serverName, String firewallRuleName, Context context); /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return information about a firewall rule in a server. */ @ServiceMethod(returns = ReturnType.SINGLE) FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName); /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of firewall rules as paginated response with {@link PagedFlux}. + * @return list of firewall rules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of firewall rules as paginated response with {@link PagedIterable}. + * @return list of firewall rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -332,7 +333,7 @@ Response getWithResponse(String resourceGroupName, String ser * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of firewall rules as paginated response with {@link PagedIterable}. + * @return list of firewall rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName, Context context); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FlexibleServersClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FlexibleServersClient.java deleted file mode 100644 index 78f1b41ddde6..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FlexibleServersClient.java +++ /dev/null @@ -1,198 +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.resourcemanager.postgresqlflexibleserver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrBackupResponseInner; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServersTriggerLtrPreBackupResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupRequest; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in FlexibleServersClient. - */ -public interface FlexibleServersClient { - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR pre-backup API call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono triggerLtrPreBackupWithResponseAsync(String resourceGroupName, - String serverName, LtrPreBackupRequest parameters); - - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR pre-backup API call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono triggerLtrPreBackupAsync(String resourceGroupName, String serverName, - LtrPreBackupRequest parameters); - - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR pre-backup API call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FlexibleServersTriggerLtrPreBackupResponse triggerLtrPreBackupWithResponse(String resourceGroupName, - String serverName, LtrPreBackupRequest parameters, Context context); - - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR pre-backup API call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LtrPreBackupResponseInner triggerLtrPreBackup(String resourceGroupName, String serverName, - LtrPreBackupRequest parameters); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> startLtrBackupWithResponseAsync(String resourceGroupName, String serverName, - LtrBackupRequest parameters); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, LtrBackupResponseInner> - beginStartLtrBackupAsync(String resourceGroupName, String serverName, LtrBackupRequest parameters); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LtrBackupResponseInner> beginStartLtrBackup(String resourceGroupName, - String serverName, LtrBackupRequest parameters); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LtrBackupResponseInner> beginStartLtrBackup(String resourceGroupName, - String serverName, LtrBackupRequest parameters, Context context); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono startLtrBackupAsync(String resourceGroupName, String serverName, - LtrBackupRequest parameters); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LtrBackupResponseInner startLtrBackup(String resourceGroupName, String serverName, LtrBackupRequest parameters); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LtrBackupResponseInner startLtrBackup(String resourceGroupName, String serverName, LtrBackupRequest parameters, - Context context); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/MigrationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/MigrationsClient.java index 56a90658a4aa..86ccc9298f10 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/MigrationsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/MigrationsClient.java @@ -10,7 +10,8 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationListFilter; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResourceForPatch; import reactor.core.publisher.Mono; @@ -22,333 +23,379 @@ public interface MigrationsClient { /** * Creates a new migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for creating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createWithResponseAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, MigrationResourceInner parameters); + Mono> createWithResponseAsync(String resourceGroupName, String serverName, + String migrationName, MigrationInner parameters); /** * Creates a new migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for creating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource on successful completion of {@link Mono}. + * @return properties of a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, MigrationResourceInner parameters); + Mono createAsync(String resourceGroupName, String serverName, String migrationName, + MigrationInner parameters); /** * Creates a new migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for creating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource along with {@link Response}. + * @return properties of a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, MigrationResourceInner parameters, Context context); + Response createWithResponse(String resourceGroupName, String serverName, String migrationName, + MigrationInner parameters, Context context); /** * Creates a new migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for creating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource. + * @return properties of a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - MigrationResourceInner create(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, MigrationResourceInner parameters); + MigrationInner create(String resourceGroupName, String serverName, String migrationName, MigrationInner parameters); /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration along with {@link Response} on successful completion of {@link Mono}. + * @return information about a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String migrationName); /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration on successful completion of {@link Mono}. + * @return information about a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName); + Mono getAsync(String resourceGroupName, String serverName, String migrationName); /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration along with {@link Response}. + * @return information about a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String migrationName, + Context context); /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration. + * @return information about a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - MigrationResourceInner get(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName); + MigrationInner get(String resourceGroupName, String serverName, String migrationName); /** * Updates an existing migration. The request body can contain one to many of the mutable properties present in the * migration definition. Certain property updates initiate migration state transitions. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for updating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required to update an existing migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, MigrationResourceForPatch parameters); + Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String migrationName, MigrationResourceForPatch parameters); /** * Updates an existing migration. The request body can contain one to many of the mutable properties present in the * migration definition. Certain property updates initiate migration state transitions. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for updating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required to update an existing migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource on successful completion of {@link Mono}. + * @return properties of a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, MigrationResourceForPatch parameters); + Mono updateAsync(String resourceGroupName, String serverName, String migrationName, + MigrationResourceForPatch parameters); /** * Updates an existing migration. The request body can contain one to many of the mutable properties present in the * migration definition. Certain property updates initiate migration state transitions. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for updating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required to update an existing migration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource along with {@link Response}. + * @return properties of a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, MigrationResourceForPatch parameters, Context context); + Response updateWithResponse(String resourceGroupName, String serverName, String migrationName, + MigrationResourceForPatch parameters, Context context); /** * Updates an existing migration. The request body can contain one to many of the mutable properties present in the * migration definition. Certain property updates initiate migration state transitions. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for updating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required to update an existing migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration resource. + * @return properties of a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - MigrationResourceInner update(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, MigrationResourceForPatch parameters); + MigrationInner update(String resourceGroupName, String serverName, String migrationName, + MigrationResourceForPatch parameters); /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link Response} on successful completion of {@link Mono}. + * @return properties of a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName); + Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, + String migrationName); /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return properties of a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName); + Mono cancelAsync(String resourceGroupName, String serverName, String migrationName); /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link Response}. + * @return properties of a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, Context context); + Response cancelWithResponse(String resourceGroupName, String serverName, String migrationName, + Context context); /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return properties of a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String subscriptionId, String resourceGroupName, String targetDbServerName, String migrationName); + MigrationInner cancel(String resourceGroupName, String serverName, String migrationName); /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationListFilter Migration list filter. Retrieves either active migrations or all migrations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationListFilter Migration list filter. Indicates if the request should retrieve only active migrations + * or all migrations. Defaults to Active. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of migration resources as paginated response with {@link PagedFlux}. + * @return list of migrations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByTargetServerAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, MigrationListFilter migrationListFilter); + PagedFlux listByTargetServerAsync(String resourceGroupName, String serverName, + MigrationListFilter migrationListFilter); /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of migration resources as paginated response with {@link PagedFlux}. + * @return list of migrations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByTargetServerAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName); + PagedFlux listByTargetServerAsync(String resourceGroupName, String serverName); /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of migration resources as paginated response with {@link PagedIterable}. + * @return list of migrations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByTargetServer(String subscriptionId, String resourceGroupName, - String targetDbServerName); + PagedIterable listByTargetServer(String resourceGroupName, String serverName); /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationListFilter Migration list filter. Retrieves either active migrations or all migrations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationListFilter Migration list filter. Indicates if the request should retrieve only active migrations + * or all migrations. Defaults to Active. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of migration resources as paginated response with {@link PagedIterable}. + * @return list of migrations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByTargetServer(String subscriptionId, String resourceGroupName, - String targetDbServerName, MigrationListFilter migrationListFilter, Context context); + PagedIterable listByTargetServer(String resourceGroupName, String serverName, + MigrationListFilter migrationListFilter, Context context); + + /** + * Check the validity and availability of the given name, to assign it to a new migration. + * + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a migration name along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> checkNameAvailabilityWithResponseAsync(String resourceGroupName, + String serverName, MigrationNameAvailabilityInner parameters); + + /** + * Check the validity and availability of the given name, to assign it to a new migration. + * + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a migration name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono checkNameAvailabilityAsync(String resourceGroupName, String serverName, + MigrationNameAvailabilityInner parameters); + + /** + * Check the validity and availability of the given name, to assign it to a new migration. + * + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a migration name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkNameAvailabilityWithResponse(String resourceGroupName, + String serverName, MigrationNameAvailabilityInner parameters, Context context); + + /** + * Check the validity and availability of the given name, to assign it to a new migration. + * + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a migration name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MigrationNameAvailabilityInner checkNameAvailability(String resourceGroupName, String serverName, + MigrationNameAvailabilityInner parameters); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/NameAvailabilitiesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/NameAvailabilitiesClient.java new file mode 100644 index 000000000000..f1aa16bb08c7 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/NameAvailabilitiesClient.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in NameAvailabilitiesClient. + */ +public interface NameAvailabilitiesClient { + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> checkGloballyWithResponseAsync(CheckNameAvailabilityRequest parameters); + + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono checkGloballyAsync(CheckNameAvailabilityRequest parameters); + + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkGloballyWithResponse(CheckNameAvailabilityRequest parameters, + Context context); + + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NameAvailabilityModelInner checkGlobally(CheckNameAvailabilityRequest parameters); + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> checkWithLocationWithResponseAsync(String locationName, + CheckNameAvailabilityRequest parameters); + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono checkWithLocationAsync(String locationName, + CheckNameAvailabilityRequest parameters); + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkWithLocationWithResponse(String locationName, + CheckNameAvailabilityRequest parameters, Context context); + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NameAvailabilityModelInner checkWithLocation(String locationName, CheckNameAvailabilityRequest parameters); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/OperationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/OperationsClient.java index f62bdb5712d8..ed8e41df6e60 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/OperationsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/OperationsClient.java @@ -16,33 +16,33 @@ */ public interface OperationsClient { /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations as paginated response with {@link PagedFlux}. + * @return list of resource provider operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listAsync(); /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations as paginated response with {@link PagedIterable}. + * @return list of resource provider operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations as paginated response with {@link PagedIterable}. + * @return list of resource provider operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlManagementClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlManagementClient.java index f1a88fe31099..1d8db32b24eb 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlManagementClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlManagementClient.java @@ -47,46 +47,53 @@ public interface PostgreSqlManagementClient { Duration getDefaultPollInterval(); /** - * Gets the AdministratorsClient object to access its operations. + * Gets the AdministratorsMicrosoftEntrasClient object to access its operations. * - * @return the AdministratorsClient object. + * @return the AdministratorsMicrosoftEntrasClient object. */ - AdministratorsClient getAdministrators(); + AdministratorsMicrosoftEntrasClient getAdministratorsMicrosoftEntras(); /** - * Gets the BackupsClient object to access its operations. + * Gets the AdvancedThreatProtectionSettingsClient object to access its operations. * - * @return the BackupsClient object. + * @return the AdvancedThreatProtectionSettingsClient object. */ - BackupsClient getBackups(); + AdvancedThreatProtectionSettingsClient getAdvancedThreatProtectionSettings(); /** - * Gets the LocationBasedCapabilitiesClient object to access its operations. + * Gets the ServerThreatProtectionSettingsClient object to access its operations. + * + * @return the ServerThreatProtectionSettingsClient object. + */ + ServerThreatProtectionSettingsClient getServerThreatProtectionSettings(); + + /** + * Gets the BackupsAutomaticAndOnDemandsClient object to access its operations. * - * @return the LocationBasedCapabilitiesClient object. + * @return the BackupsAutomaticAndOnDemandsClient object. */ - LocationBasedCapabilitiesClient getLocationBasedCapabilities(); + BackupsAutomaticAndOnDemandsClient getBackupsAutomaticAndOnDemands(); /** - * Gets the ServerCapabilitiesClient object to access its operations. + * Gets the CapabilitiesByLocationsClient object to access its operations. * - * @return the ServerCapabilitiesClient object. + * @return the CapabilitiesByLocationsClient object. */ - ServerCapabilitiesClient getServerCapabilities(); + CapabilitiesByLocationsClient getCapabilitiesByLocations(); /** - * Gets the CheckNameAvailabilitiesClient object to access its operations. + * Gets the CapabilitiesByServersClient object to access its operations. * - * @return the CheckNameAvailabilitiesClient object. + * @return the CapabilitiesByServersClient object. */ - CheckNameAvailabilitiesClient getCheckNameAvailabilities(); + CapabilitiesByServersClient getCapabilitiesByServers(); /** - * Gets the CheckNameAvailabilityWithLocationsClient object to access its operations. + * Gets the CapturedLogsClient object to access its operations. * - * @return the CheckNameAvailabilityWithLocationsClient object. + * @return the CapturedLogsClient object. */ - CheckNameAvailabilityWithLocationsClient getCheckNameAvailabilityWithLocations(); + CapturedLogsClient getCapturedLogs(); /** * Gets the ConfigurationsClient object to access its operations. @@ -110,25 +117,11 @@ public interface PostgreSqlManagementClient { FirewallRulesClient getFirewallRules(); /** - * Gets the ServersClient object to access its operations. - * - * @return the ServersClient object. - */ - ServersClient getServers(); - - /** - * Gets the FlexibleServersClient object to access its operations. - * - * @return the FlexibleServersClient object. - */ - FlexibleServersClient getFlexibleServers(); - - /** - * Gets the LtrBackupOperationsClient object to access its operations. + * Gets the BackupsLongTermRetentionsClient object to access its operations. * - * @return the LtrBackupOperationsClient object. + * @return the BackupsLongTermRetentionsClient object. */ - LtrBackupOperationsClient getLtrBackupOperations(); + BackupsLongTermRetentionsClient getBackupsLongTermRetentions(); /** * Gets the MigrationsClient object to access its operations. @@ -138,11 +131,11 @@ public interface PostgreSqlManagementClient { MigrationsClient getMigrations(); /** - * Gets the ResourceProvidersClient object to access its operations. + * Gets the NameAvailabilitiesClient object to access its operations. * - * @return the ResourceProvidersClient object. + * @return the NameAvailabilitiesClient object. */ - ResourceProvidersClient getResourceProviders(); + NameAvailabilitiesClient getNameAvailabilities(); /** * Gets the OperationsClient object to access its operations. @@ -152,11 +145,11 @@ public interface PostgreSqlManagementClient { OperationsClient getOperations(); /** - * Gets the GetPrivateDnsZoneSuffixesClient object to access its operations. + * Gets the PrivateDnsZoneSuffixesClient object to access its operations. * - * @return the GetPrivateDnsZoneSuffixesClient object. + * @return the PrivateDnsZoneSuffixesClient object. */ - GetPrivateDnsZoneSuffixesClient getGetPrivateDnsZoneSuffixes(); + PrivateDnsZoneSuffixesClient getPrivateDnsZoneSuffixes(); /** * Gets the PrivateEndpointConnectionsClient object to access its operations. @@ -165,13 +158,6 @@ public interface PostgreSqlManagementClient { */ PrivateEndpointConnectionsClient getPrivateEndpointConnections(); - /** - * Gets the PrivateEndpointConnectionOperationsClient object to access its operations. - * - * @return the PrivateEndpointConnectionOperationsClient object. - */ - PrivateEndpointConnectionOperationsClient getPrivateEndpointConnectionOperations(); - /** * Gets the PrivateLinkResourcesClient object to access its operations. * @@ -194,39 +180,18 @@ public interface PostgreSqlManagementClient { ReplicasClient getReplicas(); /** - * Gets the LogFilesClient object to access its operations. - * - * @return the LogFilesClient object. - */ - LogFilesClient getLogFiles(); - - /** - * Gets the ServerThreatProtectionSettingsClient object to access its operations. - * - * @return the ServerThreatProtectionSettingsClient object. - */ - ServerThreatProtectionSettingsClient getServerThreatProtectionSettings(); - - /** - * Gets the TuningOptionsClient object to access its operations. - * - * @return the TuningOptionsClient object. - */ - TuningOptionsClient getTuningOptions(); - - /** - * Gets the TuningIndexesClient object to access its operations. + * Gets the ServersClient object to access its operations. * - * @return the TuningIndexesClient object. + * @return the ServersClient object. */ - TuningIndexesClient getTuningIndexes(); + ServersClient getServers(); /** - * Gets the TuningConfigurationsClient object to access its operations. + * Gets the TuningOptionsOperationsClient object to access its operations. * - * @return the TuningConfigurationsClient object. + * @return the TuningOptionsOperationsClient object. */ - TuningConfigurationsClient getTuningConfigurations(); + TuningOptionsOperationsClient getTuningOptionsOperations(); /** * Gets the VirtualEndpointsClient object to access its operations. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/GetPrivateDnsZoneSuffixesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateDnsZoneSuffixesClient.java similarity index 68% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/GetPrivateDnsZoneSuffixesClient.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateDnsZoneSuffixesClient.java index 70434c5dac6c..361e6ae6beaa 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/GetPrivateDnsZoneSuffixesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateDnsZoneSuffixesClient.java @@ -11,49 +11,48 @@ import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in GetPrivateDnsZoneSuffixesClient. + * An instance of this class provides access to all the operations defined in PrivateDnsZoneSuffixesClient. */ -public interface GetPrivateDnsZoneSuffixesClient { +public interface PrivateDnsZoneSuffixesClient { /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private DNS zone suffix in the cloud along with {@link Response} on successful completion of - * {@link Mono}. + * @return the private DNS zone suffix along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> executeWithResponseAsync(); + Mono> getWithResponseAsync(); /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private DNS zone suffix in the cloud on successful completion of {@link Mono}. + * @return the private DNS zone suffix on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono executeAsync(); + Mono getAsync(); /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private DNS zone suffix in the cloud along with {@link Response}. + * @return the private DNS zone suffix along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response executeWithResponse(Context context); + Response getWithResponse(Context context); /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private DNS zone suffix in the cloud. + * @return the private DNS zone suffix. */ @ServiceMethod(returns = ReturnType.SINGLE) - String execute(); + String get(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionOperationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionOperationsClient.java deleted file mode 100644 index d1b705ccd161..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionOperationsClient.java +++ /dev/null @@ -1,242 +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.resourcemanager.postgresqlflexibleserver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionOperationsClient. - */ -public interface PrivateEndpointConnectionOperationsClient { - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 private endpoint connection resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of the private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( - String resourceGroupName, String serverName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters); - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of the private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateEndpointConnectionInner> beginUpdate( - String resourceGroupName, String serverName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters); - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of the private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateEndpointConnectionInner> beginUpdate( - String resourceGroupName, String serverName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, Context context); - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 private endpoint connection resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, - String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, - String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, - String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, - String privateEndpointConnectionName, Context context); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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) - void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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) - void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java index 5a25c9c8fee8..c2813a96317d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java @@ -9,8 +9,13 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -79,33 +84,253 @@ PrivateEndpointConnectionInner get(String resourceGroupName, String serverName, String privateEndpointConnectionName); /** - * Gets all private endpoint connections on a server. + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 private endpoint connection resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of the private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( + String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters); + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of the private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateEndpointConnectionInner> beginUpdate( + String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters); + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of the private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateEndpointConnectionInner> beginUpdate( + String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, Context context); + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 private endpoint connection resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String privateEndpointConnectionName, Context context); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context); + + /** + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a server as paginated response with {@link PagedFlux}. + * @return list of private endpoint connections as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * Gets all private endpoint connections on a server. + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. + * @return list of private endpoint connections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets all private endpoint connections on a server. + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -113,7 +338,7 @@ PrivateEndpointConnectionInner get(String resourceGroupName, String serverName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. + * @return list of private endpoint connections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName, diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ReplicasClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ReplicasClient.java index 132a9a189fcc..abcdb60f96f0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ReplicasClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ReplicasClient.java @@ -16,7 +16,7 @@ */ public interface ReplicasClient { /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -29,7 +29,7 @@ public interface ReplicasClient { PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -42,7 +42,7 @@ public interface ReplicasClient { PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ResourceProvidersClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ResourceProvidersClient.java deleted file mode 100644 index 32448fe34435..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ResourceProvidersClient.java +++ /dev/null @@ -1,93 +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.resourcemanager.postgresqlflexibleserver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ResourceProvidersClient. - */ -public interface ResourceProvidersClient { - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration name's availability along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> checkMigrationNameAvailabilityWithResponseAsync( - String subscriptionId, String resourceGroupName, String targetDbServerName, - MigrationNameAvailabilityResourceInner parameters); - - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration name's availability on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono checkMigrationNameAvailabilityAsync(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationNameAvailabilityResourceInner parameters); - - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration name's availability along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response checkMigrationNameAvailabilityWithResponse(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationNameAvailabilityResourceInner parameters, - Context context); - - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration name's availability. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MigrationNameAvailabilityResourceInner checkMigrationNameAvailability(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationNameAvailabilityResourceInner parameters); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerThreatProtectionSettingsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerThreatProtectionSettingsClient.java index e3f5a7ee75cd..6aef7aace93c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerThreatProtectionSettingsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerThreatProtectionSettingsClient.java @@ -6,14 +6,12 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerThreatProtectionSettingsModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -23,225 +21,122 @@ * An instance of this class provides access to all the operations defined in ServerThreatProtectionSettingsClient. */ public interface ServerThreatProtectionSettingsClient { - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server's Threat Protection state as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server's Threat Protection state as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server's Threat Protection state as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String serverName, ThreatProtectionName threatProtectionName); - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName); - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, Context context); - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServerThreatProtectionSettingsModelInner get(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName); - /** * Creates or updates a server's Advanced Threat Protection settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server's Advanced Threat Protection settings along with {@link Response} on successful completion of + * @return advanced threat protection settings of the server along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters); + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters); /** * Creates or updates a server's Advanced Threat Protection settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of server's Advanced Threat Protection settings. + * @return the {@link PollerFlux} for polling of advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ServerThreatProtectionSettingsModelInner> + PollerFlux, AdvancedThreatProtectionSettingsModelInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, - ServerThreatProtectionSettingsModelInner parameters); + AdvancedThreatProtectionSettingsModelInner parameters); /** * Creates or updates a server's Advanced Threat Protection settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of server's Advanced Threat Protection settings. + * @return the {@link SyncPoller} for polling of advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerThreatProtectionSettingsModelInner> + SyncPoller, AdvancedThreatProtectionSettingsModelInner> beginCreateOrUpdate(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, - ServerThreatProtectionSettingsModelInner parameters); + AdvancedThreatProtectionSettingsModelInner parameters); /** * Creates or updates a server's Advanced Threat Protection settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of server's Advanced Threat Protection settings. + * @return the {@link SyncPoller} for polling of advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerThreatProtectionSettingsModelInner> + SyncPoller, AdvancedThreatProtectionSettingsModelInner> beginCreateOrUpdate(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, - ServerThreatProtectionSettingsModelInner parameters, Context context); + AdvancedThreatProtectionSettingsModelInner parameters, Context context); /** * Creates or updates a server's Advanced Threat Protection settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server's Advanced Threat Protection settings on successful completion of {@link Mono}. + * @return advanced threat protection settings of the server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters); /** * Creates or updates a server's Advanced Threat Protection settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server's Advanced Threat Protection settings. + * @return advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters); + AdvancedThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters); /** * Creates or updates a server's Advanced Threat Protection settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server's Advanced Threat Protection settings. + * @return advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters, + AdvancedThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServersClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServersClient.java index ea34f8fe5d43..98cddb79c017 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServersClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServersClient.java @@ -15,7 +15,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForUpdate; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForPatch; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -29,14 +29,14 @@ public interface ServersClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createWithResponseAsync(String resourceGroupName, String serverName, + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, ServerInner parameters); /** @@ -44,29 +44,29 @@ Mono>> createWithResponseAsync(String resourceGroupNam * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of represents a server. + * @return the {@link PollerFlux} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ServerInner> beginCreateAsync(String resourceGroupName, String serverName, - ServerInner parameters); + PollerFlux, ServerInner> beginCreateOrUpdateAsync(String resourceGroupName, + String serverName, ServerInner parameters); /** * Creates a new server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents a server. + * @return the {@link SyncPoller} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerInner> beginCreate(String resourceGroupName, String serverName, + SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, String serverName, ServerInner parameters); /** @@ -74,15 +74,15 @@ SyncPoller, ServerInner> beginCreate(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents a server. + * @return the {@link SyncPoller} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerInner> beginCreate(String resourceGroupName, String serverName, + SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, String serverName, ServerInner parameters, Context context); /** @@ -90,157 +90,157 @@ SyncPoller, ServerInner> beginCreate(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server on successful completion of {@link Mono}. + * @return properties of a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync(String resourceGroupName, String serverName, ServerInner parameters); + Mono createOrUpdateAsync(String resourceGroupName, String serverName, ServerInner parameters); /** * Creates a new server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return properties of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerInner create(String resourceGroupName, String serverName, ServerInner parameters); + ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters); /** * Creates a new server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return properties of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerInner create(String resourceGroupName, String serverName, ServerInner parameters, Context context); + ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters, Context context); /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - ServerForUpdate parameters); + ServerForPatch parameters); /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of represents a server. + * @return the {@link PollerFlux} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ServerInner> beginUpdateAsync(String resourceGroupName, String serverName, - ServerForUpdate parameters); + ServerForPatch parameters); /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents a server. + * @return the {@link SyncPoller} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, - ServerForUpdate parameters); + ServerForPatch parameters); /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents a server. + * @return the {@link SyncPoller} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, - ServerForUpdate parameters, Context context); + ServerForPatch parameters, Context context); /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server on successful completion of {@link Mono}. + * @return properties of a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, ServerForUpdate parameters); + Mono updateAsync(String resourceGroupName, String serverName, ServerForPatch parameters); /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return properties of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerInner update(String resourceGroupName, String serverName, ServerForUpdate parameters); + ServerInner update(String resourceGroupName, String serverName, ServerForPatch parameters); /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return properties of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerInner update(String resourceGroupName, String serverName, ServerForUpdate parameters, Context context); + ServerInner update(String resourceGroupName, String serverName, ServerForPatch parameters, Context context); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -253,7 +253,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -266,7 +266,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -279,7 +279,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou SyncPoller, Void> beginDelete(String resourceGroupName, String serverName); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -293,7 +293,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, Context context); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -306,7 +306,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou Mono deleteAsync(String resourceGroupName, String serverName); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -318,7 +318,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou void delete(String resourceGroupName, String serverName); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -331,33 +331,34 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou void delete(String resourceGroupName, String serverName, Context context); /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response} on successful completion of {@link Mono}. + * @return information about an existing server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String serverName); /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server on successful completion of {@link Mono}. + * @return information about an existing server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono getByResourceGroupAsync(String resourceGroupName, String serverName); /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -365,26 +366,26 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about an existing server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, Context context); /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about an existing server. */ @ServiceMethod(returns = ReturnType.SINGLE) ServerInner getByResourceGroup(String resourceGroupName, String serverName); /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -396,7 +397,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou PagedFlux listByResourceGroupAsync(String resourceGroupName); /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -408,7 +409,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -421,7 +422,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -431,7 +432,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou PagedFlux listAsync(); /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -441,7 +442,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou PagedIterable list(); /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -453,11 +454,11 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou PagedIterable list(Context context); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -468,11 +469,11 @@ Mono>> restartWithResponseAsync(String resourceGroupNa RestartParameter parameters); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -483,7 +484,7 @@ PollerFlux, Void> beginRestartAsync(String resourceGroupName, S RestartParameter parameters); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -496,7 +497,7 @@ PollerFlux, Void> beginRestartAsync(String resourceGroupName, S PollerFlux, Void> beginRestartAsync(String resourceGroupName, String serverName); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -509,11 +510,11 @@ PollerFlux, Void> beginRestartAsync(String resourceGroupName, S SyncPoller, Void> beginRestart(String resourceGroupName, String serverName); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -525,11 +526,11 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String RestartParameter parameters, Context context); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -539,7 +540,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String Mono restartAsync(String resourceGroupName, String serverName, RestartParameter parameters); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -552,7 +553,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String Mono restartAsync(String resourceGroupName, String serverName); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -564,11 +565,11 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String void restart(String resourceGroupName, String serverName); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -578,7 +579,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String void restart(String resourceGroupName, String serverName, RestartParameter parameters, Context context); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -591,7 +592,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String Mono>> startWithResponseAsync(String resourceGroupName, String serverName); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -604,7 +605,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String PollerFlux, Void> beginStartAsync(String resourceGroupName, String serverName); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -617,7 +618,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String SyncPoller, Void> beginStart(String resourceGroupName, String serverName); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -631,7 +632,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String SyncPoller, Void> beginStart(String resourceGroupName, String serverName, Context context); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -644,7 +645,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String Mono startAsync(String resourceGroupName, String serverName); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -656,7 +657,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String void start(String resourceGroupName, String serverName); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningConfigurationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningConfigurationsClient.java deleted file mode 100644 index 04b33e408c1a..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningConfigurationsClient.java +++ /dev/null @@ -1,540 +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.resourcemanager.postgresqlflexibleserver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionDetailsResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigTuningRequestParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in TuningConfigurationsClient. - */ -public interface TuningConfigurationsClient { - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> enableWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginEnableAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginEnable(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginEnable(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context); - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono enableAsync(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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) - void enable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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) - void enable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context); - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> disableWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDisableAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDisable(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDisable(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context); - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono disableAsync(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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) - void disable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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) - void disable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context); - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> startSessionWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest); - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginStartSessionAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest); - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStartSession(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest); - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStartSession(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest, Context context); - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono startSessionAsync(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest); - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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) - void startSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest); - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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) - void startSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest, Context context); - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> stopSessionWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginStopSessionAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStopSession(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStopSession(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context); - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono stopSessionAsync(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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) - void stopSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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) - void stopSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context); - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return up the config tuning session status as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listSessionsAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return up the config tuning session status as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSessions(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return up the config tuning session status as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSessions(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context); - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 session details of a config tuning session as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listSessionDetailsAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId); - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 session details of a config tuning session as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSessionDetails(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId); - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 session details of a config tuning session as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSessionDetails(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId, Context context); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningIndexesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningIndexesClient.java deleted file mode 100644 index 5e2dcfa2711b..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningIndexesClient.java +++ /dev/null @@ -1,82 +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.resourcemanager.postgresqlflexibleserver.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.IndexRecommendationResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * An instance of this class provides access to all the operations defined in TuningIndexesClient. - */ -public interface TuningIndexesClient { - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available index recommendations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listRecommendationsAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, RecommendationType recommendationType); - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available index recommendations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listRecommendationsAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available index recommendations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRecommendations(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available index recommendations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRecommendations(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, RecommendationType recommendationType, Context context); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningConfigurations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningOptionsOperationsClient.java similarity index 56% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningConfigurations.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningOptionsOperationsClient.java index 633b08c5980b..c714d3282f2d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningConfigurations.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningOptionsOperationsClient.java @@ -2,17 +2,26 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.fluent; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; +import reactor.core.publisher.Mono; /** - * Resource collection API of TuningConfigurations. + * An instance of this class provides access to all the operations defined in TuningOptionsOperationsClient. */ -public interface TuningConfigurations { +public interface TuningOptionsOperationsClient { /** - * Enables the config tuning. + * Gets the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -20,24 +29,14 @@ public interface TuningConfigurations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 tuning options of a server along with {@link Response} on successful completion of {@link Mono}. */ - void enable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption); /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void enable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context); - - /** - * Disables the config tuning. + * Gets the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -45,11 +44,14 @@ public interface TuningConfigurations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 tuning options of a server on successful completion of {@link Mono}. */ - void disable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption); /** - * Disables the config tuning. + * Gets the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -58,40 +60,44 @@ public interface TuningConfigurations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 tuning options of a server along with {@link Response}. */ - void disable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, Context context); /** - * Starts up the config tuning session. + * Gets the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 tuning options of a server. */ - void startSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest); + @ServiceMethod(returns = ReturnType.SINGLE) + TuningOptionsInner get(String resourceGroupName, String serverName, TuningOptionParameterEnum tuningOption); /** - * Starts up the config tuning session. + * Lists available object recommendations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @param context The context to associate with this operation. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available object recommendations as paginated response with {@link PagedFlux}. */ - void startSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listRecommendationsAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType); /** - * Stops the config tuning session. + * Lists available object recommendations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -99,79 +105,81 @@ void startSession(String resourceGroupName, String serverName, TuningOptionEnum * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available object recommendations as paginated response with {@link PagedFlux}. */ - void stopSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listRecommendationsAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption); /** - * Stops the config tuning session. + * Lists available object recommendations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available object recommendations as paginated response with {@link PagedIterable}. */ - void stopSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption); /** - * Gets up the config tuning session status. + * Lists available object recommendations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param tuningOption The name of the tuning option. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return up the config tuning session status as paginated response with {@link PagedIterable}. + * @return list of available object recommendations as paginated response with {@link PagedIterable}. */ - PagedIterable listSessions(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType, Context context); /** - * Gets up the config tuning session status. + * Lists the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return up the config tuning session status as paginated response with {@link PagedIterable}. + * @return list of server tuning options as paginated response with {@link PagedFlux}. */ - PagedIterable listSessions(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * Gets the session details of a config tuning session. + * Lists the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 session details of a config tuning session as paginated response with {@link PagedIterable}. + * @return list of server tuning options as paginated response with {@link PagedIterable}. */ - PagedIterable listSessionDetails(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets the session details of a config tuning session. + * Lists the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 session details of a config tuning session as paginated response with {@link PagedIterable}. + * @return list of server tuning options as paginated response with {@link PagedIterable}. */ - PagedIterable listSessionDetails(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualEndpointsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualEndpointsClient.java index be754ff80ca1..26f31f8654a1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualEndpointsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualEndpointsClient.java @@ -13,7 +13,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResourceForPatch; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -24,135 +24,131 @@ */ public interface VirtualEndpointsClient { /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server along with {@link Response} on successful completion of + * @return pair of virtual endpoints for a server along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createWithResponseAsync(String resourceGroupName, String serverName, - String virtualEndpointName, VirtualEndpointResourceInner parameters); + String virtualEndpointName, VirtualEndpointInner parameters); /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of represents a virtual endpoint for a server. + * @return the {@link PollerFlux} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, VirtualEndpointResourceInner> beginCreateAsync( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters); + PollerFlux, VirtualEndpointInner> beginCreateAsync(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointInner parameters); /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents a virtual endpoint for a server. + * @return the {@link SyncPoller} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualEndpointResourceInner> beginCreate( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters); + SyncPoller, VirtualEndpointInner> beginCreate(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointInner parameters); /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents a virtual endpoint for a server. + * @return the {@link SyncPoller} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualEndpointResourceInner> beginCreate( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters, Context context); + SyncPoller, VirtualEndpointInner> beginCreate(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointInner parameters, Context context); /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server on successful completion of {@link Mono}. + * @return pair of virtual endpoints for a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync(String resourceGroupName, String serverName, - String virtualEndpointName, VirtualEndpointResourceInner parameters); + Mono createAsync(String resourceGroupName, String serverName, String virtualEndpointName, + VirtualEndpointInner parameters); /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server. + * @return pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualEndpointResourceInner create(String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters); + VirtualEndpointInner create(String resourceGroupName, String serverName, String virtualEndpointName, + VirtualEndpointInner parameters); /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server. + * @return pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualEndpointResourceInner create(String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters, Context context); + VirtualEndpointInner create(String resourceGroupName, String serverName, String virtualEndpointName, + VirtualEndpointInner parameters, Context context); /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server along with {@link Response} on successful completion of + * @return pair of virtual endpoints for a server along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -160,118 +156,109 @@ Mono>> updateWithResponseAsync(String resourceGroupNam String virtualEndpointName, VirtualEndpointResourceForPatch parameters); /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link PollerFlux} for polling of represents a virtual endpoint for a server. + * @return the {@link PollerFlux} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, VirtualEndpointResourceInner> beginUpdateAsync( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceForPatch parameters); + PollerFlux, VirtualEndpointInner> beginUpdateAsync(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters); /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents a virtual endpoint for a server. + * @return the {@link SyncPoller} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualEndpointResourceInner> beginUpdate( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceForPatch parameters); + SyncPoller, VirtualEndpointInner> beginUpdate(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters); /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of represents a virtual endpoint for a server. + * @return the {@link SyncPoller} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualEndpointResourceInner> beginUpdate( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceForPatch parameters, Context context); + SyncPoller, VirtualEndpointInner> beginUpdate(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters, Context context); /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server on successful completion of {@link Mono}. + * @return pair of virtual endpoints for a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, - String virtualEndpointName, VirtualEndpointResourceForPatch parameters); + Mono updateAsync(String resourceGroupName, String serverName, String virtualEndpointName, + VirtualEndpointResourceForPatch parameters); /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server. + * @return pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualEndpointResourceInner update(String resourceGroupName, String serverName, String virtualEndpointName, + VirtualEndpointInner update(String resourceGroupName, String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters); /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a virtual endpoint for a server. + * @return pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualEndpointResourceInner update(String resourceGroupName, String serverName, String virtualEndpointName, + VirtualEndpointInner update(String resourceGroupName, String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters, Context context); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -282,11 +269,11 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam String virtualEndpointName); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -297,11 +284,11 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St String virtualEndpointName); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -312,11 +299,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String virtualEndpointName); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -328,11 +315,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String virtualEndpointName, Context context); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -342,11 +329,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Mono deleteAsync(String resourceGroupName, String serverName, String virtualEndpointName); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -355,11 +342,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String virtualEndpointName); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -369,94 +356,93 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String serverName, String virtualEndpointName, Context context); /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint along with {@link Response} on successful completion of + * @return information about a pair of virtual endpoints along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, + Mono> getWithResponseAsync(String resourceGroupName, String serverName, String virtualEndpointName); /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint on successful completion of {@link Mono}. + * @return information about a pair of virtual endpoints on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - String virtualEndpointName); + Mono getAsync(String resourceGroupName, String serverName, String virtualEndpointName); /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint along with {@link Response}. + * @return information about a pair of virtual endpoints along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, + Response getWithResponse(String resourceGroupName, String serverName, String virtualEndpointName, Context context); /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint. + * @return information about a pair of virtual endpoints. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualEndpointResourceInner get(String resourceGroupName, String serverName, String virtualEndpointName); + VirtualEndpointInner get(String resourceGroupName, String serverName, String virtualEndpointName); /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of virtual endpoints as paginated response with {@link PagedFlux}. + * @return list of virtual endpoints as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); + PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of virtual endpoints as paginated response with {@link PagedIterable}. + * @return list of virtual endpoints as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -464,9 +450,8 @@ Response getWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of virtual endpoints as paginated response with {@link PagedIterable}. + * @return list of virtual endpoints as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java index 7f71771c874a..668b0f49e094 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java @@ -8,7 +8,7 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageResultInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageModelInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; import reactor.core.publisher.Mono; @@ -17,36 +17,35 @@ */ public interface VirtualNetworkSubnetUsagesClient { /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network subnet usage for a given vNet resource id along with {@link Response} on successful - * completion of {@link Mono}. + * @return virtual network subnet usage data along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> executeWithResponseAsync(String locationName, + Mono> listWithResponseAsync(String locationName, VirtualNetworkSubnetUsageParameter parameters); /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network subnet usage for a given vNet resource id on successful completion of {@link Mono}. + * @return virtual network subnet usage data on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono executeAsync(String locationName, + Mono listAsync(String locationName, VirtualNetworkSubnetUsageParameter parameters); /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. @@ -54,22 +53,22 @@ Mono executeAsync(String locationName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network subnet usage for a given vNet resource id along with {@link Response}. + * @return virtual network subnet usage data along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response executeWithResponse(String locationName, + Response listWithResponse(String locationName, VirtualNetworkSubnetUsageParameter parameters, Context context); /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network subnet usage for a given vNet resource id. + * @return virtual network subnet usage data. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualNetworkSubnetUsageResultInner execute(String locationName, VirtualNetworkSubnetUsageParameter parameters); + VirtualNetworkSubnetUsageModelInner list(String locationName, VirtualNetworkSubnetUsageParameter parameters); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ActiveDirectoryAdministratorInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraInner.java similarity index 60% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ActiveDirectoryAdministratorInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraInner.java index fcece1847892..bcb0d456cf18 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ActiveDirectoryAdministratorInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraInner.java @@ -15,14 +15,14 @@ import java.io.IOException; /** - * Represents an Microsoft Entra Administrator. + * Server administrator associated to a Microsoft Entra principal. */ @Fluent -public final class ActiveDirectoryAdministratorInner extends ProxyResource { +public final class AdministratorMicrosoftEntraInner extends ProxyResource { /* - * Properties of the Microsoft Entra Administrator. + * Properties of a server administrator associated to a Microsoft Entra principal. */ - private AdministratorProperties innerProperties = new AdministratorProperties(); + private AdministratorMicrosoftEntraProperties innerProperties = new AdministratorMicrosoftEntraProperties(); /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -45,17 +45,17 @@ public final class ActiveDirectoryAdministratorInner extends ProxyResource { private String id; /** - * Creates an instance of ActiveDirectoryAdministratorInner class. + * Creates an instance of AdministratorMicrosoftEntraInner class. */ - public ActiveDirectoryAdministratorInner() { + public AdministratorMicrosoftEntraInner() { } /** - * Get the innerProperties property: Properties of the Microsoft Entra Administrator. + * Get the innerProperties property: Properties of a server administrator associated to a Microsoft Entra principal. * * @return the innerProperties value. */ - private AdministratorProperties innerProperties() { + private AdministratorMicrosoftEntraProperties innerProperties() { return this.innerProperties; } @@ -99,7 +99,8 @@ public String id() { } /** - * Get the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. + * Get the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. * * @return the principalType value. */ @@ -108,21 +109,22 @@ public PrincipalType principalType() { } /** - * Set the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. + * Set the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. * * @param principalType the principalType value to set. - * @return the ActiveDirectoryAdministratorInner object itself. + * @return the AdministratorMicrosoftEntraInner object itself. */ - public ActiveDirectoryAdministratorInner withPrincipalType(PrincipalType principalType) { + public AdministratorMicrosoftEntraInner withPrincipalType(PrincipalType principalType) { if (this.innerProperties() == null) { - this.innerProperties = new AdministratorProperties(); + this.innerProperties = new AdministratorMicrosoftEntraProperties(); } this.innerProperties().withPrincipalType(principalType); return this; } /** - * Get the principalName property: Microsoft Entra Administrator principal name. + * Get the principalName property: Name of the Microsoft Entra principal. * * @return the principalName value. */ @@ -131,21 +133,21 @@ public String principalName() { } /** - * Set the principalName property: Microsoft Entra Administrator principal name. + * Set the principalName property: Name of the Microsoft Entra principal. * * @param principalName the principalName value to set. - * @return the ActiveDirectoryAdministratorInner object itself. + * @return the AdministratorMicrosoftEntraInner object itself. */ - public ActiveDirectoryAdministratorInner withPrincipalName(String principalName) { + public AdministratorMicrosoftEntraInner withPrincipalName(String principalName) { if (this.innerProperties() == null) { - this.innerProperties = new AdministratorProperties(); + this.innerProperties = new AdministratorMicrosoftEntraProperties(); } this.innerProperties().withPrincipalName(principalName); return this; } /** - * Get the objectId property: The objectId of the Microsoft Entra Administrator. + * Get the objectId property: Object identifier of the Microsoft Entra principal. * * @return the objectId value. */ @@ -154,21 +156,21 @@ public String objectId() { } /** - * Set the objectId property: The objectId of the Microsoft Entra Administrator. + * Set the objectId property: Object identifier of the Microsoft Entra principal. * * @param objectId the objectId value to set. - * @return the ActiveDirectoryAdministratorInner object itself. + * @return the AdministratorMicrosoftEntraInner object itself. */ - public ActiveDirectoryAdministratorInner withObjectId(String objectId) { + public AdministratorMicrosoftEntraInner withObjectId(String objectId) { if (this.innerProperties() == null) { - this.innerProperties = new AdministratorProperties(); + this.innerProperties = new AdministratorMicrosoftEntraProperties(); } this.innerProperties().withObjectId(objectId); return this; } /** - * Get the tenantId property: The tenantId of the Microsoft Entra Administrator. + * Get the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * * @return the tenantId value. */ @@ -177,14 +179,14 @@ public String tenantId() { } /** - * Set the tenantId property: The tenantId of the Microsoft Entra Administrator. + * Set the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * * @param tenantId the tenantId value to set. - * @return the ActiveDirectoryAdministratorInner object itself. + * @return the AdministratorMicrosoftEntraInner object itself. */ - public ActiveDirectoryAdministratorInner withTenantId(String tenantId) { + public AdministratorMicrosoftEntraInner withTenantId(String tenantId) { if (this.innerProperties() == null) { - this.innerProperties = new AdministratorProperties(); + this.innerProperties = new AdministratorMicrosoftEntraProperties(); } this.innerProperties().withTenantId(tenantId); return this; @@ -199,13 +201,13 @@ public void validate() { if (innerProperties() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( - "Missing required property innerProperties in model ActiveDirectoryAdministratorInner")); + "Missing required property innerProperties in model AdministratorMicrosoftEntraInner")); } else { innerProperties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryAdministratorInner.class); + private static final ClientLogger LOGGER = new ClientLogger(AdministratorMicrosoftEntraInner.class); /** * {@inheritDoc} @@ -218,39 +220,39 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ActiveDirectoryAdministratorInner from the JsonReader. + * Reads an instance of AdministratorMicrosoftEntraInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ActiveDirectoryAdministratorInner if the JsonReader was pointing to an instance of it, or + * @return An instance of AdministratorMicrosoftEntraInner if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ActiveDirectoryAdministratorInner. + * @throws IOException If an error occurs while reading the AdministratorMicrosoftEntraInner. */ - public static ActiveDirectoryAdministratorInner fromJson(JsonReader jsonReader) throws IOException { + public static AdministratorMicrosoftEntraInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ActiveDirectoryAdministratorInner deserializedActiveDirectoryAdministratorInner - = new ActiveDirectoryAdministratorInner(); + AdministratorMicrosoftEntraInner deserializedAdministratorMicrosoftEntraInner + = new AdministratorMicrosoftEntraInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedActiveDirectoryAdministratorInner.id = reader.getString(); + deserializedAdministratorMicrosoftEntraInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedActiveDirectoryAdministratorInner.name = reader.getString(); + deserializedAdministratorMicrosoftEntraInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedActiveDirectoryAdministratorInner.type = reader.getString(); + deserializedAdministratorMicrosoftEntraInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedActiveDirectoryAdministratorInner.innerProperties - = AdministratorProperties.fromJson(reader); + deserializedAdministratorMicrosoftEntraInner.innerProperties + = AdministratorMicrosoftEntraProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedActiveDirectoryAdministratorInner.systemData = SystemData.fromJson(reader); + deserializedAdministratorMicrosoftEntraInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedActiveDirectoryAdministratorInner; + return deserializedAdministratorMicrosoftEntraInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraProperties.java similarity index 51% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorProperties.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraProperties.java index 18c36c31a1d9..dde7c8d7e3f1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraProperties.java @@ -13,38 +13,40 @@ import java.io.IOException; /** - * The properties of an Microsoft Entra Administrator. + * Properties of a server administrator associated to a Microsoft Entra principal. */ @Fluent -public final class AdministratorProperties implements JsonSerializable { +public final class AdministratorMicrosoftEntraProperties + implements JsonSerializable { /* - * The principal type used to represent the type of Microsoft Entra Administrator. + * Type of Microsoft Entra principal to which the server administrator is associated. */ private PrincipalType principalType; /* - * Microsoft Entra Administrator principal name. + * Name of the Microsoft Entra principal. */ private String principalName; /* - * The objectId of the Microsoft Entra Administrator. + * Object identifier of the Microsoft Entra principal. */ private String objectId; /* - * The tenantId of the Microsoft Entra Administrator. + * Identifier of the tenant in which the Microsoft Entra principal exists. */ private String tenantId; /** - * Creates an instance of AdministratorProperties class. + * Creates an instance of AdministratorMicrosoftEntraProperties class. */ - public AdministratorProperties() { + public AdministratorMicrosoftEntraProperties() { } /** - * Get the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. + * Get the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. * * @return the principalType value. */ @@ -53,18 +55,19 @@ public PrincipalType principalType() { } /** - * Set the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. + * Set the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. * * @param principalType the principalType value to set. - * @return the AdministratorProperties object itself. + * @return the AdministratorMicrosoftEntraProperties object itself. */ - public AdministratorProperties withPrincipalType(PrincipalType principalType) { + public AdministratorMicrosoftEntraProperties withPrincipalType(PrincipalType principalType) { this.principalType = principalType; return this; } /** - * Get the principalName property: Microsoft Entra Administrator principal name. + * Get the principalName property: Name of the Microsoft Entra principal. * * @return the principalName value. */ @@ -73,18 +76,18 @@ public String principalName() { } /** - * Set the principalName property: Microsoft Entra Administrator principal name. + * Set the principalName property: Name of the Microsoft Entra principal. * * @param principalName the principalName value to set. - * @return the AdministratorProperties object itself. + * @return the AdministratorMicrosoftEntraProperties object itself. */ - public AdministratorProperties withPrincipalName(String principalName) { + public AdministratorMicrosoftEntraProperties withPrincipalName(String principalName) { this.principalName = principalName; return this; } /** - * Get the objectId property: The objectId of the Microsoft Entra Administrator. + * Get the objectId property: Object identifier of the Microsoft Entra principal. * * @return the objectId value. */ @@ -93,18 +96,18 @@ public String objectId() { } /** - * Set the objectId property: The objectId of the Microsoft Entra Administrator. + * Set the objectId property: Object identifier of the Microsoft Entra principal. * * @param objectId the objectId value to set. - * @return the AdministratorProperties object itself. + * @return the AdministratorMicrosoftEntraProperties object itself. */ - public AdministratorProperties withObjectId(String objectId) { + public AdministratorMicrosoftEntraProperties withObjectId(String objectId) { this.objectId = objectId; return this; } /** - * Get the tenantId property: The tenantId of the Microsoft Entra Administrator. + * Get the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * * @return the tenantId value. */ @@ -113,12 +116,12 @@ public String tenantId() { } /** - * Set the tenantId property: The tenantId of the Microsoft Entra Administrator. + * Set the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * * @param tenantId the tenantId value to set. - * @return the AdministratorProperties object itself. + * @return the AdministratorMicrosoftEntraProperties object itself. */ - public AdministratorProperties withTenantId(String tenantId) { + public AdministratorMicrosoftEntraProperties withTenantId(String tenantId) { this.tenantId = tenantId; return this; } @@ -145,34 +148,36 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of AdministratorProperties from the JsonReader. + * Reads an instance of AdministratorMicrosoftEntraProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of AdministratorProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the AdministratorProperties. + * @return An instance of AdministratorMicrosoftEntraProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AdministratorMicrosoftEntraProperties. */ - public static AdministratorProperties fromJson(JsonReader jsonReader) throws IOException { + public static AdministratorMicrosoftEntraProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - AdministratorProperties deserializedAdministratorProperties = new AdministratorProperties(); + AdministratorMicrosoftEntraProperties deserializedAdministratorMicrosoftEntraProperties + = new AdministratorMicrosoftEntraProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("principalType".equals(fieldName)) { - deserializedAdministratorProperties.principalType = PrincipalType.fromString(reader.getString()); + deserializedAdministratorMicrosoftEntraProperties.principalType + = PrincipalType.fromString(reader.getString()); } else if ("principalName".equals(fieldName)) { - deserializedAdministratorProperties.principalName = reader.getString(); + deserializedAdministratorMicrosoftEntraProperties.principalName = reader.getString(); } else if ("objectId".equals(fieldName)) { - deserializedAdministratorProperties.objectId = reader.getString(); + deserializedAdministratorMicrosoftEntraProperties.objectId = reader.getString(); } else if ("tenantId".equals(fieldName)) { - deserializedAdministratorProperties.tenantId = reader.getString(); + deserializedAdministratorMicrosoftEntraProperties.tenantId = reader.getString(); } else { reader.skipChildren(); } } - return deserializedAdministratorProperties; + return deserializedAdministratorMicrosoftEntraProperties; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorPropertiesForAdd.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraPropertiesForAdd.java similarity index 51% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorPropertiesForAdd.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraPropertiesForAdd.java index c4cd2307d160..b3d07d0961d7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorPropertiesForAdd.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraPropertiesForAdd.java @@ -13,33 +13,35 @@ import java.io.IOException; /** - * The properties of an Microsoft Entra Administrator. + * Properties of a server administrator associated to a Microsoft Entra principal. */ @Fluent -public final class AdministratorPropertiesForAdd implements JsonSerializable { +public final class AdministratorMicrosoftEntraPropertiesForAdd + implements JsonSerializable { /* - * The principal type used to represent the type of Microsoft Entra Administrator. + * Type of Microsoft Entra principal to which the server administrator is associated. */ private PrincipalType principalType; /* - * Microsoft Entra Administrator principal name. + * Name of the Microsoft Entra principal. */ private String principalName; /* - * The tenantId of the Microsoft Entra Administrator. + * Identifier of the tenant in which the Microsoft Entra principal exists. */ private String tenantId; /** - * Creates an instance of AdministratorPropertiesForAdd class. + * Creates an instance of AdministratorMicrosoftEntraPropertiesForAdd class. */ - public AdministratorPropertiesForAdd() { + public AdministratorMicrosoftEntraPropertiesForAdd() { } /** - * Get the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. + * Get the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. * * @return the principalType value. */ @@ -48,18 +50,19 @@ public PrincipalType principalType() { } /** - * Set the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. + * Set the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. * * @param principalType the principalType value to set. - * @return the AdministratorPropertiesForAdd object itself. + * @return the AdministratorMicrosoftEntraPropertiesForAdd object itself. */ - public AdministratorPropertiesForAdd withPrincipalType(PrincipalType principalType) { + public AdministratorMicrosoftEntraPropertiesForAdd withPrincipalType(PrincipalType principalType) { this.principalType = principalType; return this; } /** - * Get the principalName property: Microsoft Entra Administrator principal name. + * Get the principalName property: Name of the Microsoft Entra principal. * * @return the principalName value. */ @@ -68,18 +71,18 @@ public String principalName() { } /** - * Set the principalName property: Microsoft Entra Administrator principal name. + * Set the principalName property: Name of the Microsoft Entra principal. * * @param principalName the principalName value to set. - * @return the AdministratorPropertiesForAdd object itself. + * @return the AdministratorMicrosoftEntraPropertiesForAdd object itself. */ - public AdministratorPropertiesForAdd withPrincipalName(String principalName) { + public AdministratorMicrosoftEntraPropertiesForAdd withPrincipalName(String principalName) { this.principalName = principalName; return this; } /** - * Get the tenantId property: The tenantId of the Microsoft Entra Administrator. + * Get the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * * @return the tenantId value. */ @@ -88,12 +91,12 @@ public String tenantId() { } /** - * Set the tenantId property: The tenantId of the Microsoft Entra Administrator. + * Set the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * * @param tenantId the tenantId value to set. - * @return the AdministratorPropertiesForAdd object itself. + * @return the AdministratorMicrosoftEntraPropertiesForAdd object itself. */ - public AdministratorPropertiesForAdd withTenantId(String tenantId) { + public AdministratorMicrosoftEntraPropertiesForAdd withTenantId(String tenantId) { this.tenantId = tenantId; return this; } @@ -119,34 +122,34 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of AdministratorPropertiesForAdd from the JsonReader. + * Reads an instance of AdministratorMicrosoftEntraPropertiesForAdd from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of AdministratorPropertiesForAdd if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AdministratorPropertiesForAdd. + * @return An instance of AdministratorMicrosoftEntraPropertiesForAdd if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AdministratorMicrosoftEntraPropertiesForAdd. */ - public static AdministratorPropertiesForAdd fromJson(JsonReader jsonReader) throws IOException { + public static AdministratorMicrosoftEntraPropertiesForAdd fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - AdministratorPropertiesForAdd deserializedAdministratorPropertiesForAdd - = new AdministratorPropertiesForAdd(); + AdministratorMicrosoftEntraPropertiesForAdd deserializedAdministratorMicrosoftEntraPropertiesForAdd + = new AdministratorMicrosoftEntraPropertiesForAdd(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("principalType".equals(fieldName)) { - deserializedAdministratorPropertiesForAdd.principalType + deserializedAdministratorMicrosoftEntraPropertiesForAdd.principalType = PrincipalType.fromString(reader.getString()); } else if ("principalName".equals(fieldName)) { - deserializedAdministratorPropertiesForAdd.principalName = reader.getString(); + deserializedAdministratorMicrosoftEntraPropertiesForAdd.principalName = reader.getString(); } else if ("tenantId".equals(fieldName)) { - deserializedAdministratorPropertiesForAdd.tenantId = reader.getString(); + deserializedAdministratorMicrosoftEntraPropertiesForAdd.tenantId = reader.getString(); } else { reader.skipChildren(); } } - return deserializedAdministratorPropertiesForAdd; + return deserializedAdministratorMicrosoftEntraPropertiesForAdd; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionSettingsModelInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsModelInner.java similarity index 61% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionSettingsModelInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsModelInner.java index a7682fb96887..af5f78e234d0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionSettingsModelInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsModelInner.java @@ -15,14 +15,14 @@ import java.time.OffsetDateTime; /** - * Server's Advanced Threat Protection settings. + * Advanced threat protection settings of the server. */ @Fluent -public final class ServerThreatProtectionSettingsModelInner extends ProxyResource { +public final class AdvancedThreatProtectionSettingsModelInner extends ProxyResource { /* - * Advanced Threat Protection properties. + * Advanced threat protection properties. */ - private ServerThreatProtectionProperties innerProperties; + private AdvancedThreatProtectionSettingsProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -45,17 +45,17 @@ public final class ServerThreatProtectionSettingsModelInner extends ProxyResourc private String id; /** - * Creates an instance of ServerThreatProtectionSettingsModelInner class. + * Creates an instance of AdvancedThreatProtectionSettingsModelInner class. */ - public ServerThreatProtectionSettingsModelInner() { + public AdvancedThreatProtectionSettingsModelInner() { } /** - * Get the innerProperties property: Advanced Threat Protection properties. + * Get the innerProperties property: Advanced threat protection properties. * * @return the innerProperties value. */ - private ServerThreatProtectionProperties innerProperties() { + private AdvancedThreatProtectionSettingsProperties innerProperties() { return this.innerProperties; } @@ -99,8 +99,8 @@ public String id() { } /** - * Get the state property: Specifies the state of the Threat Protection, whether it is enabled or disabled or a - * state has not been applied yet on the specific server. + * Get the state property: Specifies the state of the advanced threat protection, whether it is enabled, disabled, + * or a state has not been applied yet on the server. * * @return the state value. */ @@ -109,22 +109,22 @@ public ThreatProtectionState state() { } /** - * Set the state property: Specifies the state of the Threat Protection, whether it is enabled or disabled or a - * state has not been applied yet on the specific server. + * Set the state property: Specifies the state of the advanced threat protection, whether it is enabled, disabled, + * or a state has not been applied yet on the server. * * @param state the state value to set. - * @return the ServerThreatProtectionSettingsModelInner object itself. + * @return the AdvancedThreatProtectionSettingsModelInner object itself. */ - public ServerThreatProtectionSettingsModelInner withState(ThreatProtectionState state) { + public AdvancedThreatProtectionSettingsModelInner withState(ThreatProtectionState state) { if (this.innerProperties() == null) { - this.innerProperties = new ServerThreatProtectionProperties(); + this.innerProperties = new AdvancedThreatProtectionSettingsProperties(); } this.innerProperties().withState(state); return this; } /** - * Get the creationTime property: Specifies the UTC creation time of the policy. + * Get the creationTime property: Specifies the creation time (UTC) of the policy. * * @return the creationTime value. */ @@ -154,39 +154,39 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ServerThreatProtectionSettingsModelInner from the JsonReader. + * Reads an instance of AdvancedThreatProtectionSettingsModelInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ServerThreatProtectionSettingsModelInner if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. + * @return An instance of AdvancedThreatProtectionSettingsModelInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ServerThreatProtectionSettingsModelInner. + * @throws IOException If an error occurs while reading the AdvancedThreatProtectionSettingsModelInner. */ - public static ServerThreatProtectionSettingsModelInner fromJson(JsonReader jsonReader) throws IOException { + public static AdvancedThreatProtectionSettingsModelInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ServerThreatProtectionSettingsModelInner deserializedServerThreatProtectionSettingsModelInner - = new ServerThreatProtectionSettingsModelInner(); + AdvancedThreatProtectionSettingsModelInner deserializedAdvancedThreatProtectionSettingsModelInner + = new AdvancedThreatProtectionSettingsModelInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedServerThreatProtectionSettingsModelInner.id = reader.getString(); + deserializedAdvancedThreatProtectionSettingsModelInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedServerThreatProtectionSettingsModelInner.name = reader.getString(); + deserializedAdvancedThreatProtectionSettingsModelInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedServerThreatProtectionSettingsModelInner.type = reader.getString(); + deserializedAdvancedThreatProtectionSettingsModelInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedServerThreatProtectionSettingsModelInner.innerProperties - = ServerThreatProtectionProperties.fromJson(reader); + deserializedAdvancedThreatProtectionSettingsModelInner.innerProperties + = AdvancedThreatProtectionSettingsProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedServerThreatProtectionSettingsModelInner.systemData = SystemData.fromJson(reader); + deserializedAdvancedThreatProtectionSettingsModelInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedServerThreatProtectionSettingsModelInner; + return deserializedAdvancedThreatProtectionSettingsModelInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsProperties.java similarity index 55% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionProperties.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsProperties.java index 1bb3dd4d3121..29152e888bab 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsProperties.java @@ -16,30 +16,31 @@ import java.time.OffsetDateTime; /** - * Properties of server Threat Protection state. + * Properties of advanced threat protection state for a server. */ @Fluent -public final class ServerThreatProtectionProperties implements JsonSerializable { +public final class AdvancedThreatProtectionSettingsProperties + implements JsonSerializable { /* - * Specifies the state of the Threat Protection, whether it is enabled or disabled or a state has not been applied - * yet on the specific server. + * Specifies the state of the advanced threat protection, whether it is enabled, disabled, or a state has not been + * applied yet on the server. */ private ThreatProtectionState state; /* - * Specifies the UTC creation time of the policy. + * Specifies the creation time (UTC) of the policy. */ private OffsetDateTime creationTime; /** - * Creates an instance of ServerThreatProtectionProperties class. + * Creates an instance of AdvancedThreatProtectionSettingsProperties class. */ - public ServerThreatProtectionProperties() { + public AdvancedThreatProtectionSettingsProperties() { } /** - * Get the state property: Specifies the state of the Threat Protection, whether it is enabled or disabled or a - * state has not been applied yet on the specific server. + * Get the state property: Specifies the state of the advanced threat protection, whether it is enabled, disabled, + * or a state has not been applied yet on the server. * * @return the state value. */ @@ -48,19 +49,19 @@ public ThreatProtectionState state() { } /** - * Set the state property: Specifies the state of the Threat Protection, whether it is enabled or disabled or a - * state has not been applied yet on the specific server. + * Set the state property: Specifies the state of the advanced threat protection, whether it is enabled, disabled, + * or a state has not been applied yet on the server. * * @param state the state value to set. - * @return the ServerThreatProtectionProperties object itself. + * @return the AdvancedThreatProtectionSettingsProperties object itself. */ - public ServerThreatProtectionProperties withState(ThreatProtectionState state) { + public AdvancedThreatProtectionSettingsProperties withState(ThreatProtectionState state) { this.state = state; return this; } /** - * Get the creationTime property: Specifies the UTC creation time of the policy. + * Get the creationTime property: Specifies the creation time (UTC) of the policy. * * @return the creationTime value. */ @@ -77,11 +78,11 @@ public void validate() { if (state() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( - "Missing required property state in model ServerThreatProtectionProperties")); + "Missing required property state in model AdvancedThreatProtectionSettingsProperties")); } } - private static final ClientLogger LOGGER = new ClientLogger(ServerThreatProtectionProperties.class); + private static final ClientLogger LOGGER = new ClientLogger(AdvancedThreatProtectionSettingsProperties.class); /** * {@inheritDoc} @@ -94,34 +95,34 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ServerThreatProtectionProperties from the JsonReader. + * Reads an instance of AdvancedThreatProtectionSettingsProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ServerThreatProtectionProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. + * @return An instance of AdvancedThreatProtectionSettingsProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ServerThreatProtectionProperties. + * @throws IOException If an error occurs while reading the AdvancedThreatProtectionSettingsProperties. */ - public static ServerThreatProtectionProperties fromJson(JsonReader jsonReader) throws IOException { + public static AdvancedThreatProtectionSettingsProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ServerThreatProtectionProperties deserializedServerThreatProtectionProperties - = new ServerThreatProtectionProperties(); + AdvancedThreatProtectionSettingsProperties deserializedAdvancedThreatProtectionSettingsProperties + = new AdvancedThreatProtectionSettingsProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("state".equals(fieldName)) { - deserializedServerThreatProtectionProperties.state + deserializedAdvancedThreatProtectionSettingsProperties.state = ThreatProtectionState.fromString(reader.getString()); } else if ("creationTime".equals(fieldName)) { - deserializedServerThreatProtectionProperties.creationTime = reader + deserializedAdvancedThreatProtectionSettingsProperties.creationTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } } - return deserializedServerThreatProtectionProperties; + return deserializedAdvancedThreatProtectionSettingsProperties; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandInner.java similarity index 62% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandInner.java index f50e0ed884a7..6c96f2cf0abd 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandInner.java @@ -10,19 +10,19 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Origin; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; import java.io.IOException; import java.time.OffsetDateTime; /** - * Server backup properties. + * Properties of a backup. */ @Fluent -public final class ServerBackupInner extends ProxyResource { +public final class BackupAutomaticAndOnDemandInner extends ProxyResource { /* - * The properties of a server backup. + * Properties of a backup. */ - private ServerBackupProperties innerProperties; + private BackupAutomaticAndOnDemandProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -45,17 +45,17 @@ public final class ServerBackupInner extends ProxyResource { private String id; /** - * Creates an instance of ServerBackupInner class. + * Creates an instance of BackupAutomaticAndOnDemandInner class. */ - public ServerBackupInner() { + public BackupAutomaticAndOnDemandInner() { } /** - * Get the innerProperties property: The properties of a server backup. + * Get the innerProperties property: Properties of a backup. * * @return the innerProperties value. */ - private ServerBackupProperties innerProperties() { + private BackupAutomaticAndOnDemandProperties innerProperties() { return this.innerProperties; } @@ -99,30 +99,30 @@ public String id() { } /** - * Get the backupType property: Backup type. + * Get the backupType property: Type of backup. * * @return the backupType value. */ - public Origin backupType() { + public BackupType backupType() { return this.innerProperties() == null ? null : this.innerProperties().backupType(); } /** - * Set the backupType property: Backup type. + * Set the backupType property: Type of backup. * * @param backupType the backupType value to set. - * @return the ServerBackupInner object itself. + * @return the BackupAutomaticAndOnDemandInner object itself. */ - public ServerBackupInner withBackupType(Origin backupType) { + public BackupAutomaticAndOnDemandInner withBackupType(BackupType backupType) { if (this.innerProperties() == null) { - this.innerProperties = new ServerBackupProperties(); + this.innerProperties = new BackupAutomaticAndOnDemandProperties(); } this.innerProperties().withBackupType(backupType); return this; } /** - * Get the completedTime property: Backup completed time (ISO8601 format). + * Get the completedTime property: Time(ISO8601 format) at which the backup was completed. * * @return the completedTime value. */ @@ -131,21 +131,21 @@ public OffsetDateTime completedTime() { } /** - * Set the completedTime property: Backup completed time (ISO8601 format). + * Set the completedTime property: Time(ISO8601 format) at which the backup was completed. * * @param completedTime the completedTime value to set. - * @return the ServerBackupInner object itself. + * @return the BackupAutomaticAndOnDemandInner object itself. */ - public ServerBackupInner withCompletedTime(OffsetDateTime completedTime) { + public BackupAutomaticAndOnDemandInner withCompletedTime(OffsetDateTime completedTime) { if (this.innerProperties() == null) { - this.innerProperties = new ServerBackupProperties(); + this.innerProperties = new BackupAutomaticAndOnDemandProperties(); } this.innerProperties().withCompletedTime(completedTime); return this; } /** - * Get the source property: Backup source. + * Get the source property: Source of the backup. * * @return the source value. */ @@ -154,14 +154,14 @@ public String source() { } /** - * Set the source property: Backup source. + * Set the source property: Source of the backup. * * @param source the source value to set. - * @return the ServerBackupInner object itself. + * @return the BackupAutomaticAndOnDemandInner object itself. */ - public ServerBackupInner withSource(String source) { + public BackupAutomaticAndOnDemandInner withSource(String source) { if (this.innerProperties() == null) { - this.innerProperties = new ServerBackupProperties(); + this.innerProperties = new BackupAutomaticAndOnDemandProperties(); } this.innerProperties().withSource(source); return this; @@ -189,37 +189,39 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ServerBackupInner from the JsonReader. + * Reads an instance of BackupAutomaticAndOnDemandInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ServerBackupInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * @return An instance of BackupAutomaticAndOnDemandInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ServerBackupInner. + * @throws IOException If an error occurs while reading the BackupAutomaticAndOnDemandInner. */ - public static ServerBackupInner fromJson(JsonReader jsonReader) throws IOException { + public static BackupAutomaticAndOnDemandInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ServerBackupInner deserializedServerBackupInner = new ServerBackupInner(); + BackupAutomaticAndOnDemandInner deserializedBackupAutomaticAndOnDemandInner + = new BackupAutomaticAndOnDemandInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedServerBackupInner.id = reader.getString(); + deserializedBackupAutomaticAndOnDemandInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedServerBackupInner.name = reader.getString(); + deserializedBackupAutomaticAndOnDemandInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedServerBackupInner.type = reader.getString(); + deserializedBackupAutomaticAndOnDemandInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedServerBackupInner.innerProperties = ServerBackupProperties.fromJson(reader); + deserializedBackupAutomaticAndOnDemandInner.innerProperties + = BackupAutomaticAndOnDemandProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedServerBackupInner.systemData = SystemData.fromJson(reader); + deserializedBackupAutomaticAndOnDemandInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedServerBackupInner; + return deserializedBackupAutomaticAndOnDemandInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandProperties.java similarity index 56% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupProperties.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandProperties.java index 745949a9fc92..b561fc68c263 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandProperties.java @@ -10,59 +10,60 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Origin; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; import java.io.IOException; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; /** - * The properties of a server backup. + * Properties of a backup. */ @Fluent -public final class ServerBackupProperties implements JsonSerializable { +public final class BackupAutomaticAndOnDemandProperties + implements JsonSerializable { /* - * Backup type. + * Type of backup. */ - private Origin backupType; + private BackupType backupType; /* - * Backup completed time (ISO8601 format). + * Time(ISO8601 format) at which the backup was completed. */ private OffsetDateTime completedTime; /* - * Backup source + * Source of the backup. */ private String source; /** - * Creates an instance of ServerBackupProperties class. + * Creates an instance of BackupAutomaticAndOnDemandProperties class. */ - public ServerBackupProperties() { + public BackupAutomaticAndOnDemandProperties() { } /** - * Get the backupType property: Backup type. + * Get the backupType property: Type of backup. * * @return the backupType value. */ - public Origin backupType() { + public BackupType backupType() { return this.backupType; } /** - * Set the backupType property: Backup type. + * Set the backupType property: Type of backup. * * @param backupType the backupType value to set. - * @return the ServerBackupProperties object itself. + * @return the BackupAutomaticAndOnDemandProperties object itself. */ - public ServerBackupProperties withBackupType(Origin backupType) { + public BackupAutomaticAndOnDemandProperties withBackupType(BackupType backupType) { this.backupType = backupType; return this; } /** - * Get the completedTime property: Backup completed time (ISO8601 format). + * Get the completedTime property: Time(ISO8601 format) at which the backup was completed. * * @return the completedTime value. */ @@ -71,18 +72,18 @@ public OffsetDateTime completedTime() { } /** - * Set the completedTime property: Backup completed time (ISO8601 format). + * Set the completedTime property: Time(ISO8601 format) at which the backup was completed. * * @param completedTime the completedTime value to set. - * @return the ServerBackupProperties object itself. + * @return the BackupAutomaticAndOnDemandProperties object itself. */ - public ServerBackupProperties withCompletedTime(OffsetDateTime completedTime) { + public BackupAutomaticAndOnDemandProperties withCompletedTime(OffsetDateTime completedTime) { this.completedTime = completedTime; return this; } /** - * Get the source property: Backup source. + * Get the source property: Source of the backup. * * @return the source value. */ @@ -91,12 +92,12 @@ public String source() { } /** - * Set the source property: Backup source. + * Set the source property: Source of the backup. * * @param source the source value to set. - * @return the ServerBackupProperties object itself. + * @return the BackupAutomaticAndOnDemandProperties object itself. */ - public ServerBackupProperties withSource(String source) { + public BackupAutomaticAndOnDemandProperties withSource(String source) { this.source = source; return this; } @@ -123,33 +124,35 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ServerBackupProperties from the JsonReader. + * Reads an instance of BackupAutomaticAndOnDemandProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ServerBackupProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ServerBackupProperties. + * @return An instance of BackupAutomaticAndOnDemandProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupAutomaticAndOnDemandProperties. */ - public static ServerBackupProperties fromJson(JsonReader jsonReader) throws IOException { + public static BackupAutomaticAndOnDemandProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ServerBackupProperties deserializedServerBackupProperties = new ServerBackupProperties(); + BackupAutomaticAndOnDemandProperties deserializedBackupAutomaticAndOnDemandProperties + = new BackupAutomaticAndOnDemandProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("backupType".equals(fieldName)) { - deserializedServerBackupProperties.backupType = Origin.fromString(reader.getString()); + deserializedBackupAutomaticAndOnDemandProperties.backupType + = BackupType.fromString(reader.getString()); } else if ("completedTime".equals(fieldName)) { - deserializedServerBackupProperties.completedTime = reader + deserializedBackupAutomaticAndOnDemandProperties.completedTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("source".equals(fieldName)) { - deserializedServerBackupProperties.source = reader.getString(); + deserializedBackupAutomaticAndOnDemandProperties.source = reader.getString(); } else { reader.skipChildren(); } } - return deserializedServerBackupProperties; + return deserializedBackupAutomaticAndOnDemandProperties; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrServerBackupOperationInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionOperationInner.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrServerBackupOperationInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionOperationInner.java index bbc401a8c1a4..4f94e69ffe54 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrServerBackupOperationInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionOperationInner.java @@ -18,7 +18,7 @@ * Response for the LTR backup Operation API call. */ @Fluent -public final class LtrServerBackupOperationInner extends ProxyResource { +public final class BackupsLongTermRetentionOperationInner extends ProxyResource { /* * Long Term Retention Backup Operation Resource Properties */ @@ -45,9 +45,9 @@ public final class LtrServerBackupOperationInner extends ProxyResource { private String id; /** - * Creates an instance of LtrServerBackupOperationInner class. + * Creates an instance of BackupsLongTermRetentionOperationInner class. */ - public LtrServerBackupOperationInner() { + public BackupsLongTermRetentionOperationInner() { } /** @@ -111,9 +111,9 @@ public Long datasourceSizeInBytes() { * Set the datasourceSizeInBytes property: Size of datasource in bytes. * * @param datasourceSizeInBytes the datasourceSizeInBytes value to set. - * @return the LtrServerBackupOperationInner object itself. + * @return the BackupsLongTermRetentionOperationInner object itself. */ - public LtrServerBackupOperationInner withDatasourceSizeInBytes(Long datasourceSizeInBytes) { + public BackupsLongTermRetentionOperationInner withDatasourceSizeInBytes(Long datasourceSizeInBytes) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -134,9 +134,9 @@ public Long dataTransferredInBytes() { * Set the dataTransferredInBytes property: Data transferred in bytes. * * @param dataTransferredInBytes the dataTransferredInBytes value to set. - * @return the LtrServerBackupOperationInner object itself. + * @return the BackupsLongTermRetentionOperationInner object itself. */ - public LtrServerBackupOperationInner withDataTransferredInBytes(Long dataTransferredInBytes) { + public BackupsLongTermRetentionOperationInner withDataTransferredInBytes(Long dataTransferredInBytes) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -157,9 +157,9 @@ public String backupName() { * Set the backupName property: Name of Backup operation. * * @param backupName the backupName value to set. - * @return the LtrServerBackupOperationInner object itself. + * @return the BackupsLongTermRetentionOperationInner object itself. */ - public LtrServerBackupOperationInner withBackupName(String backupName) { + public BackupsLongTermRetentionOperationInner withBackupName(String backupName) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -182,9 +182,9 @@ public String backupMetadata() { * successful restore using this Recovery point. e.g. Versions, DataFormat etc. * * @param backupMetadata the backupMetadata value to set. - * @return the LtrServerBackupOperationInner object itself. + * @return the BackupsLongTermRetentionOperationInner object itself. */ - public LtrServerBackupOperationInner withBackupMetadata(String backupMetadata) { + public BackupsLongTermRetentionOperationInner withBackupMetadata(String backupMetadata) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -205,9 +205,9 @@ public ExecutionStatus status() { * Set the status property: Service-set extensible enum indicating the status of operation. * * @param status the status value to set. - * @return the LtrServerBackupOperationInner object itself. + * @return the BackupsLongTermRetentionOperationInner object itself. */ - public LtrServerBackupOperationInner withStatus(ExecutionStatus status) { + public BackupsLongTermRetentionOperationInner withStatus(ExecutionStatus status) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -228,9 +228,9 @@ public OffsetDateTime startTime() { * Set the startTime property: Start time of the operation. * * @param startTime the startTime value to set. - * @return the LtrServerBackupOperationInner object itself. + * @return the BackupsLongTermRetentionOperationInner object itself. */ - public LtrServerBackupOperationInner withStartTime(OffsetDateTime startTime) { + public BackupsLongTermRetentionOperationInner withStartTime(OffsetDateTime startTime) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -251,9 +251,9 @@ public OffsetDateTime endTime() { * Set the endTime property: End time of the operation. * * @param endTime the endTime value to set. - * @return the LtrServerBackupOperationInner object itself. + * @return the BackupsLongTermRetentionOperationInner object itself. */ - public LtrServerBackupOperationInner withEndTime(OffsetDateTime endTime) { + public BackupsLongTermRetentionOperationInner withEndTime(OffsetDateTime endTime) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -274,9 +274,9 @@ public Double percentComplete() { * Set the percentComplete property: PercentageCompleted. * * @param percentComplete the percentComplete value to set. - * @return the LtrServerBackupOperationInner object itself. + * @return the BackupsLongTermRetentionOperationInner object itself. */ - public LtrServerBackupOperationInner withPercentComplete(Double percentComplete) { + public BackupsLongTermRetentionOperationInner withPercentComplete(Double percentComplete) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -324,39 +324,39 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of LtrServerBackupOperationInner from the JsonReader. + * Reads an instance of BackupsLongTermRetentionOperationInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of LtrServerBackupOperationInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. + * @return An instance of BackupsLongTermRetentionOperationInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LtrServerBackupOperationInner. + * @throws IOException If an error occurs while reading the BackupsLongTermRetentionOperationInner. */ - public static LtrServerBackupOperationInner fromJson(JsonReader jsonReader) throws IOException { + public static BackupsLongTermRetentionOperationInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - LtrServerBackupOperationInner deserializedLtrServerBackupOperationInner - = new LtrServerBackupOperationInner(); + BackupsLongTermRetentionOperationInner deserializedBackupsLongTermRetentionOperationInner + = new BackupsLongTermRetentionOperationInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedLtrServerBackupOperationInner.id = reader.getString(); + deserializedBackupsLongTermRetentionOperationInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedLtrServerBackupOperationInner.name = reader.getString(); + deserializedBackupsLongTermRetentionOperationInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedLtrServerBackupOperationInner.type = reader.getString(); + deserializedBackupsLongTermRetentionOperationInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedLtrServerBackupOperationInner.innerProperties + deserializedBackupsLongTermRetentionOperationInner.innerProperties = LtrBackupOperationResponseProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedLtrServerBackupOperationInner.systemData = SystemData.fromJson(reader); + deserializedBackupsLongTermRetentionOperationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedLtrServerBackupOperationInner; + return deserializedBackupsLongTermRetentionOperationInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrBackupResponseInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseInner.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrBackupResponseInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseInner.java index bbedaaf57496..32d4bb4b95ef 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrBackupResponseInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseInner.java @@ -17,16 +17,17 @@ * Response for the LTR backup API call. */ @Fluent -public final class LtrBackupResponseInner implements JsonSerializable { +public final class BackupsLongTermRetentionResponseInner + implements JsonSerializable { /* * Long Term Retention Backup Operation Resource Properties */ private LtrBackupOperationResponseProperties innerProperties; /** - * Creates an instance of LtrBackupResponseInner class. + * Creates an instance of BackupsLongTermRetentionResponseInner class. */ - public LtrBackupResponseInner() { + public BackupsLongTermRetentionResponseInner() { } /** @@ -51,9 +52,9 @@ public Long datasourceSizeInBytes() { * Set the datasourceSizeInBytes property: Size of datasource in bytes. * * @param datasourceSizeInBytes the datasourceSizeInBytes value to set. - * @return the LtrBackupResponseInner object itself. + * @return the BackupsLongTermRetentionResponseInner object itself. */ - public LtrBackupResponseInner withDatasourceSizeInBytes(Long datasourceSizeInBytes) { + public BackupsLongTermRetentionResponseInner withDatasourceSizeInBytes(Long datasourceSizeInBytes) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -74,9 +75,9 @@ public Long dataTransferredInBytes() { * Set the dataTransferredInBytes property: Data transferred in bytes. * * @param dataTransferredInBytes the dataTransferredInBytes value to set. - * @return the LtrBackupResponseInner object itself. + * @return the BackupsLongTermRetentionResponseInner object itself. */ - public LtrBackupResponseInner withDataTransferredInBytes(Long dataTransferredInBytes) { + public BackupsLongTermRetentionResponseInner withDataTransferredInBytes(Long dataTransferredInBytes) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -97,9 +98,9 @@ public String backupName() { * Set the backupName property: Name of Backup operation. * * @param backupName the backupName value to set. - * @return the LtrBackupResponseInner object itself. + * @return the BackupsLongTermRetentionResponseInner object itself. */ - public LtrBackupResponseInner withBackupName(String backupName) { + public BackupsLongTermRetentionResponseInner withBackupName(String backupName) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -122,9 +123,9 @@ public String backupMetadata() { * successful restore using this Recovery point. e.g. Versions, DataFormat etc. * * @param backupMetadata the backupMetadata value to set. - * @return the LtrBackupResponseInner object itself. + * @return the BackupsLongTermRetentionResponseInner object itself. */ - public LtrBackupResponseInner withBackupMetadata(String backupMetadata) { + public BackupsLongTermRetentionResponseInner withBackupMetadata(String backupMetadata) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -145,9 +146,9 @@ public ExecutionStatus status() { * Set the status property: Service-set extensible enum indicating the status of operation. * * @param status the status value to set. - * @return the LtrBackupResponseInner object itself. + * @return the BackupsLongTermRetentionResponseInner object itself. */ - public LtrBackupResponseInner withStatus(ExecutionStatus status) { + public BackupsLongTermRetentionResponseInner withStatus(ExecutionStatus status) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -168,9 +169,9 @@ public OffsetDateTime startTime() { * Set the startTime property: Start time of the operation. * * @param startTime the startTime value to set. - * @return the LtrBackupResponseInner object itself. + * @return the BackupsLongTermRetentionResponseInner object itself. */ - public LtrBackupResponseInner withStartTime(OffsetDateTime startTime) { + public BackupsLongTermRetentionResponseInner withStartTime(OffsetDateTime startTime) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -191,9 +192,9 @@ public OffsetDateTime endTime() { * Set the endTime property: End time of the operation. * * @param endTime the endTime value to set. - * @return the LtrBackupResponseInner object itself. + * @return the BackupsLongTermRetentionResponseInner object itself. */ - public LtrBackupResponseInner withEndTime(OffsetDateTime endTime) { + public BackupsLongTermRetentionResponseInner withEndTime(OffsetDateTime endTime) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -214,9 +215,9 @@ public Double percentComplete() { * Set the percentComplete property: PercentageCompleted. * * @param percentComplete the percentComplete value to set. - * @return the LtrBackupResponseInner object itself. + * @return the BackupsLongTermRetentionResponseInner object itself. */ - public LtrBackupResponseInner withPercentComplete(Double percentComplete) { + public BackupsLongTermRetentionResponseInner withPercentComplete(Double percentComplete) { if (this.innerProperties() == null) { this.innerProperties = new LtrBackupOperationResponseProperties(); } @@ -264,29 +265,30 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of LtrBackupResponseInner from the JsonReader. + * Reads an instance of BackupsLongTermRetentionResponseInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of LtrBackupResponseInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the LtrBackupResponseInner. + * @return An instance of BackupsLongTermRetentionResponseInner if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupsLongTermRetentionResponseInner. */ - public static LtrBackupResponseInner fromJson(JsonReader jsonReader) throws IOException { + public static BackupsLongTermRetentionResponseInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - LtrBackupResponseInner deserializedLtrBackupResponseInner = new LtrBackupResponseInner(); + BackupsLongTermRetentionResponseInner deserializedBackupsLongTermRetentionResponseInner + = new BackupsLongTermRetentionResponseInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("properties".equals(fieldName)) { - deserializedLtrBackupResponseInner.innerProperties + deserializedBackupsLongTermRetentionResponseInner.innerProperties = LtrBackupOperationResponseProperties.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedLtrBackupResponseInner; + return deserializedBackupsLongTermRetentionResponseInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseProperties.java similarity index 67% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseProperties.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseProperties.java index bb2f3db3604f..07b7ac197ff5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseProperties.java @@ -15,7 +15,8 @@ * Response for the pre-backup request. */ @Fluent -public final class LtrPreBackupResponseProperties implements JsonSerializable { +public final class BackupsLongTermRetentionResponseProperties + implements JsonSerializable { /* * Number of storage containers the plugin will use during backup. More than one containers may be used for size * limitations, parallelism, or redundancy etc. @@ -23,9 +24,9 @@ public final class LtrPreBackupResponseProperties implements JsonSerializable { - LtrPreBackupResponseProperties deserializedLtrPreBackupResponseProperties - = new LtrPreBackupResponseProperties(); + BackupsLongTermRetentionResponseProperties deserializedBackupsLongTermRetentionResponseProperties + = new BackupsLongTermRetentionResponseProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("numberOfContainers".equals(fieldName)) { - deserializedLtrPreBackupResponseProperties.numberOfContainers = reader.getInt(); + deserializedBackupsLongTermRetentionResponseProperties.numberOfContainers = reader.getInt(); } else { reader.skipChildren(); } } - return deserializedLtrPreBackupResponseProperties; + return deserializedBackupsLongTermRetentionResponseProperties; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapabilityInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapabilityInner.java new file mode 100644 index 000000000000..150a4fed23bc --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapabilityInner.java @@ -0,0 +1,381 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityBase; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityStatus; +import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningEditionCapability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackupSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LocationRestricted; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OnlineStorageResizeSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerEditionCapability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersionCapability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrowthSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SupportedFeature; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHighAvailabilitySupport; +import java.io.IOException; +import java.util.List; + +/** + * Capability for the Azure Database for PostgreSQL flexible server. + */ +@Fluent +public final class CapabilityInner extends CapabilityBase { + /* + * Name of flexible servers capabilities. + */ + private String name; + + /* + * List of supported compute tiers. + */ + private List supportedServerEditions; + + /* + * List of supported major versions of PostgreSQL database engine. + */ + private List supportedServerVersions; + + /* + * Features supported. + */ + private List supportedFeatures; + + /* + * Indicates if fast provisioning is supported. 'Enabled' means fast provisioning is supported. 'Disabled' stands + * for fast provisioning is not supported. Will be deprecated in the future. Look to Supported Features for + * 'FastProvisioning'. + */ + private FastProvisioningSupport fastProvisioningSupported; + + /* + * List of compute tiers supporting fast provisioning. + */ + private List supportedFastProvisioningEditions; + + /* + * Indicates if geographically redundant backups are supported in this location. 'Enabled' means geographically + * redundant backups are supported. 'Disabled' stands for geographically redundant backup is not supported. Will be + * deprecated in the future. Look to Supported Features for 'GeoBackup'. + */ + private GeographicallyRedundantBackupSupport geoBackupSupported; + + /* + * Indicates if high availability with zone redundancy is supported in this location. 'Enabled' means high + * availability with zone redundancy is supported. 'Disabled' stands for high availability with zone redundancy is + * not supported. Will be deprecated in the future. Look to Supported Features for 'ZoneRedundantHa'. + */ + private ZoneRedundantHighAvailabilitySupport zoneRedundantHaSupported; + + /* + * Indicates if high availability with zone redundancy is supported in conjunction with geographically redundant + * backups in this location. 'Enabled' means high availability with zone redundancy is supported in conjunction with + * geographically redundant backups is supported. 'Disabled' stands for high availability with zone redundancy is + * supported in conjunction with geographically redundant backups is not supported. Will be deprecated in the + * future. Look to Supported Features for 'ZoneRedundantHaAndGeoBackup'. + */ + private ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport zoneRedundantHaAndGeoBackupSupported; + + /* + * Indicates if storage autogrow is supported in this location. 'Enabled' means storage autogrow is supported. + * 'Disabled' stands for storage autogrow is not supported. Will be deprecated in the future. Look to Supported + * Features for 'StorageAutoGrowth'. + */ + private StorageAutoGrowthSupport storageAutoGrowthSupported; + + /* + * Indicates if resizing the storage, without interrupting the operation of the database engine, is supported in + * this location for the given subscription. 'Enabled' means resizing the storage without interrupting the operation + * of the database engine is supported. 'Disabled' means resizing the storage without interrupting the operation of + * the database engine is not supported. Will be deprecated in the future. Look to Supported Features for + * 'OnlineResize'. + */ + private OnlineStorageResizeSupport onlineResizeSupported; + + /* + * Indicates if this location is restricted. 'Enabled' means location is restricted. 'Disabled' stands for location + * is not restricted. Will be deprecated in the future. Look to Supported Features for 'Restricted'. + */ + private LocationRestricted restricted; + + /* + * The reason for the capability not being available. + */ + private String reason; + + /* + * The status of the capability. + */ + private CapabilityStatus status; + + /** + * Creates an instance of CapabilityInner class. + */ + public CapabilityInner() { + } + + /** + * Get the name property: Name of flexible servers capabilities. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of flexible servers capabilities. + * + * @param name the name value to set. + * @return the CapabilityInner object itself. + */ + public CapabilityInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the supportedServerEditions property: List of supported compute tiers. + * + * @return the supportedServerEditions value. + */ + public List supportedServerEditions() { + return this.supportedServerEditions; + } + + /** + * Get the supportedServerVersions property: List of supported major versions of PostgreSQL database engine. + * + * @return the supportedServerVersions value. + */ + public List supportedServerVersions() { + return this.supportedServerVersions; + } + + /** + * Get the supportedFeatures property: Features supported. + * + * @return the supportedFeatures value. + */ + public List supportedFeatures() { + return this.supportedFeatures; + } + + /** + * Get the fastProvisioningSupported property: Indicates if fast provisioning is supported. 'Enabled' means fast + * provisioning is supported. 'Disabled' stands for fast provisioning is not supported. Will be deprecated in the + * future. Look to Supported Features for 'FastProvisioning'. + * + * @return the fastProvisioningSupported value. + */ + public FastProvisioningSupport fastProvisioningSupported() { + return this.fastProvisioningSupported; + } + + /** + * Get the supportedFastProvisioningEditions property: List of compute tiers supporting fast provisioning. + * + * @return the supportedFastProvisioningEditions value. + */ + public List supportedFastProvisioningEditions() { + return this.supportedFastProvisioningEditions; + } + + /** + * Get the geoBackupSupported property: Indicates if geographically redundant backups are supported in this + * location. 'Enabled' means geographically redundant backups are supported. 'Disabled' stands for geographically + * redundant backup is not supported. Will be deprecated in the future. Look to Supported Features for 'GeoBackup'. + * + * @return the geoBackupSupported value. + */ + public GeographicallyRedundantBackupSupport geoBackupSupported() { + return this.geoBackupSupported; + } + + /** + * Get the zoneRedundantHaSupported property: Indicates if high availability with zone redundancy is supported in + * this location. 'Enabled' means high availability with zone redundancy is supported. 'Disabled' stands for high + * availability with zone redundancy is not supported. Will be deprecated in the future. Look to Supported Features + * for 'ZoneRedundantHa'. + * + * @return the zoneRedundantHaSupported value. + */ + public ZoneRedundantHighAvailabilitySupport zoneRedundantHaSupported() { + return this.zoneRedundantHaSupported; + } + + /** + * Get the zoneRedundantHaAndGeoBackupSupported property: Indicates if high availability with zone redundancy is + * supported in conjunction with geographically redundant backups in this location. 'Enabled' means high + * availability with zone redundancy is supported in conjunction with geographically redundant backups is supported. + * 'Disabled' stands for high availability with zone redundancy is supported in conjunction with geographically + * redundant backups is not supported. Will be deprecated in the future. Look to Supported Features for + * 'ZoneRedundantHaAndGeoBackup'. + * + * @return the zoneRedundantHaAndGeoBackupSupported value. + */ + public ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport zoneRedundantHaAndGeoBackupSupported() { + return this.zoneRedundantHaAndGeoBackupSupported; + } + + /** + * Get the storageAutoGrowthSupported property: Indicates if storage autogrow is supported in this location. + * 'Enabled' means storage autogrow is supported. 'Disabled' stands for storage autogrow is not supported. Will be + * deprecated in the future. Look to Supported Features for 'StorageAutoGrowth'. + * + * @return the storageAutoGrowthSupported value. + */ + public StorageAutoGrowthSupport storageAutoGrowthSupported() { + return this.storageAutoGrowthSupported; + } + + /** + * Get the onlineResizeSupported property: Indicates if resizing the storage, without interrupting the operation of + * the database engine, is supported in this location for the given subscription. 'Enabled' means resizing the + * storage without interrupting the operation of the database engine is supported. 'Disabled' means resizing the + * storage without interrupting the operation of the database engine is not supported. Will be deprecated in the + * future. Look to Supported Features for 'OnlineResize'. + * + * @return the onlineResizeSupported value. + */ + public OnlineStorageResizeSupport onlineResizeSupported() { + return this.onlineResizeSupported; + } + + /** + * Get the restricted property: Indicates if this location is restricted. 'Enabled' means location is restricted. + * 'Disabled' stands for location is not restricted. Will be deprecated in the future. Look to Supported Features + * for 'Restricted'. + * + * @return the restricted value. + */ + public LocationRestricted restricted() { + return this.restricted; + } + + /** + * Get the reason property: The reason for the capability not being available. + * + * @return the reason value. + */ + @Override + public String reason() { + return this.reason; + } + + /** + * Get the status property: The status of the capability. + * + * @return the status value. + */ + @Override + public CapabilityStatus status() { + return this.status; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (supportedServerEditions() != null) { + supportedServerEditions().forEach(e -> e.validate()); + } + if (supportedServerVersions() != null) { + supportedServerVersions().forEach(e -> e.validate()); + } + if (supportedFeatures() != null) { + supportedFeatures().forEach(e -> e.validate()); + } + if (supportedFastProvisioningEditions() != null) { + supportedFastProvisioningEditions().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CapabilityInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CapabilityInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the CapabilityInner. + */ + public static CapabilityInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CapabilityInner deserializedCapabilityInner = new CapabilityInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedCapabilityInner.status = CapabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedCapabilityInner.reason = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCapabilityInner.name = reader.getString(); + } else if ("supportedServerEditions".equals(fieldName)) { + List supportedServerEditions + = reader.readArray(reader1 -> ServerEditionCapability.fromJson(reader1)); + deserializedCapabilityInner.supportedServerEditions = supportedServerEditions; + } else if ("supportedServerVersions".equals(fieldName)) { + List supportedServerVersions + = reader.readArray(reader1 -> ServerVersionCapability.fromJson(reader1)); + deserializedCapabilityInner.supportedServerVersions = supportedServerVersions; + } else if ("supportedFeatures".equals(fieldName)) { + List supportedFeatures + = reader.readArray(reader1 -> SupportedFeature.fromJson(reader1)); + deserializedCapabilityInner.supportedFeatures = supportedFeatures; + } else if ("fastProvisioningSupported".equals(fieldName)) { + deserializedCapabilityInner.fastProvisioningSupported + = FastProvisioningSupport.fromString(reader.getString()); + } else if ("supportedFastProvisioningEditions".equals(fieldName)) { + List supportedFastProvisioningEditions + = reader.readArray(reader1 -> FastProvisioningEditionCapability.fromJson(reader1)); + deserializedCapabilityInner.supportedFastProvisioningEditions = supportedFastProvisioningEditions; + } else if ("geoBackupSupported".equals(fieldName)) { + deserializedCapabilityInner.geoBackupSupported + = GeographicallyRedundantBackupSupport.fromString(reader.getString()); + } else if ("zoneRedundantHaSupported".equals(fieldName)) { + deserializedCapabilityInner.zoneRedundantHaSupported + = ZoneRedundantHighAvailabilitySupport.fromString(reader.getString()); + } else if ("zoneRedundantHaAndGeoBackupSupported".equals(fieldName)) { + deserializedCapabilityInner.zoneRedundantHaAndGeoBackupSupported + = ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport + .fromString(reader.getString()); + } else if ("storageAutoGrowthSupported".equals(fieldName)) { + deserializedCapabilityInner.storageAutoGrowthSupported + = StorageAutoGrowthSupport.fromString(reader.getString()); + } else if ("onlineResizeSupported".equals(fieldName)) { + deserializedCapabilityInner.onlineResizeSupported + = OnlineStorageResizeSupport.fromString(reader.getString()); + } else if ("restricted".equals(fieldName)) { + deserializedCapabilityInner.restricted = LocationRestricted.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedCapabilityInner; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogInner.java similarity index 69% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogInner.java index 24ea03ff48f5..3937ff2cf034 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogInner.java @@ -14,14 +14,14 @@ import java.time.OffsetDateTime; /** - * Represents a logFile. + * Log file. */ @Fluent -public final class LogFileInner extends ProxyResource { +public final class CapturedLogInner extends ProxyResource { /* - * The properties of a logFile. + * Properties of a log file. */ - private LogFileProperties innerProperties; + private CapturedLogProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -44,17 +44,17 @@ public final class LogFileInner extends ProxyResource { private String id; /** - * Creates an instance of LogFileInner class. + * Creates an instance of CapturedLogInner class. */ - public LogFileInner() { + public CapturedLogInner() { } /** - * Get the innerProperties property: The properties of a logFile. + * Get the innerProperties property: Properties of a log file. * * @return the innerProperties value. */ - private LogFileProperties innerProperties() { + private CapturedLogProperties innerProperties() { return this.innerProperties; } @@ -110,11 +110,11 @@ public OffsetDateTime createdTime() { * Set the createdTime property: Creation timestamp of the log file. * * @param createdTime the createdTime value to set. - * @return the LogFileInner object itself. + * @return the CapturedLogInner object itself. */ - public LogFileInner withCreatedTime(OffsetDateTime createdTime) { + public CapturedLogInner withCreatedTime(OffsetDateTime createdTime) { if (this.innerProperties() == null) { - this.innerProperties = new LogFileProperties(); + this.innerProperties = new CapturedLogProperties(); } this.innerProperties().withCreatedTime(createdTime); return this; @@ -133,18 +133,18 @@ public OffsetDateTime lastModifiedTime() { * Set the lastModifiedTime property: Last modified timestamp of the log file. * * @param lastModifiedTime the lastModifiedTime value to set. - * @return the LogFileInner object itself. + * @return the CapturedLogInner object itself. */ - public LogFileInner withLastModifiedTime(OffsetDateTime lastModifiedTime) { + public CapturedLogInner withLastModifiedTime(OffsetDateTime lastModifiedTime) { if (this.innerProperties() == null) { - this.innerProperties = new LogFileProperties(); + this.innerProperties = new CapturedLogProperties(); } this.innerProperties().withLastModifiedTime(lastModifiedTime); return this; } /** - * Get the sizeInKb property: The size in kb of the logFile. + * Get the sizeInKb property: Size (in KB) of the log file. * * @return the sizeInKb value. */ @@ -153,21 +153,21 @@ public Long sizeInKb() { } /** - * Set the sizeInKb property: The size in kb of the logFile. + * Set the sizeInKb property: Size (in KB) of the log file. * * @param sizeInKb the sizeInKb value to set. - * @return the LogFileInner object itself. + * @return the CapturedLogInner object itself. */ - public LogFileInner withSizeInKb(Long sizeInKb) { + public CapturedLogInner withSizeInKb(Long sizeInKb) { if (this.innerProperties() == null) { - this.innerProperties = new LogFileProperties(); + this.innerProperties = new CapturedLogProperties(); } this.innerProperties().withSizeInKb(sizeInKb); return this; } /** - * Get the type property: Type of the log file. + * Get the type property: Type of log file. Can be 'ServerLogs' or 'UpgradeLogs'. * * @return the type value. */ @@ -176,21 +176,21 @@ public String typePropertiesType() { } /** - * Set the type property: Type of the log file. + * Set the type property: Type of log file. Can be 'ServerLogs' or 'UpgradeLogs'. * * @param type the type value to set. - * @return the LogFileInner object itself. + * @return the CapturedLogInner object itself. */ - public LogFileInner withTypePropertiesType(String type) { + public CapturedLogInner withTypePropertiesType(String type) { if (this.innerProperties() == null) { - this.innerProperties = new LogFileProperties(); + this.innerProperties = new CapturedLogProperties(); } this.innerProperties().withType(type); return this; } /** - * Get the url property: The url to download the log file from. + * Get the url property: URL to download the log file from. * * @return the url value. */ @@ -199,14 +199,14 @@ public String url() { } /** - * Set the url property: The url to download the log file from. + * Set the url property: URL to download the log file from. * * @param url the url value to set. - * @return the LogFileInner object itself. + * @return the CapturedLogInner object itself. */ - public LogFileInner withUrl(String url) { + public CapturedLogInner withUrl(String url) { if (this.innerProperties() == null) { - this.innerProperties = new LogFileProperties(); + this.innerProperties = new CapturedLogProperties(); } this.innerProperties().withUrl(url); return this; @@ -234,37 +234,37 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of LogFileInner from the JsonReader. + * Reads an instance of CapturedLogInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of LogFileInner if the JsonReader was pointing to an instance of it, or null if it was + * @return An instance of CapturedLogInner if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LogFileInner. + * @throws IOException If an error occurs while reading the CapturedLogInner. */ - public static LogFileInner fromJson(JsonReader jsonReader) throws IOException { + public static CapturedLogInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - LogFileInner deserializedLogFileInner = new LogFileInner(); + CapturedLogInner deserializedCapturedLogInner = new CapturedLogInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedLogFileInner.id = reader.getString(); + deserializedCapturedLogInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedLogFileInner.name = reader.getString(); + deserializedCapturedLogInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedLogFileInner.type = reader.getString(); + deserializedCapturedLogInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedLogFileInner.innerProperties = LogFileProperties.fromJson(reader); + deserializedCapturedLogInner.innerProperties = CapturedLogProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedLogFileInner.systemData = SystemData.fromJson(reader); + deserializedCapturedLogInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedLogFileInner; + return deserializedCapturedLogInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogProperties.java similarity index 65% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileProperties.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogProperties.java index 33fca6e804c6..68ddc394e666 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogProperties.java @@ -15,10 +15,10 @@ import java.time.format.DateTimeFormatter; /** - * The properties of a logFile. + * Properties of a log file. */ @Fluent -public final class LogFileProperties implements JsonSerializable { +public final class CapturedLogProperties implements JsonSerializable { /* * Creation timestamp of the log file. */ @@ -30,24 +30,24 @@ public final class LogFileProperties implements JsonSerializable { - LogFileProperties deserializedLogFileProperties = new LogFileProperties(); + CapturedLogProperties deserializedCapturedLogProperties = new CapturedLogProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("createdTime".equals(fieldName)) { - deserializedLogFileProperties.createdTime = reader + deserializedCapturedLogProperties.createdTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("lastModifiedTime".equals(fieldName)) { - deserializedLogFileProperties.lastModifiedTime = reader + deserializedCapturedLogProperties.lastModifiedTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("sizeInKb".equals(fieldName)) { - deserializedLogFileProperties.sizeInKb = reader.getNullable(JsonReader::getLong); + deserializedCapturedLogProperties.sizeInKb = reader.getNullable(JsonReader::getLong); } else if ("type".equals(fieldName)) { - deserializedLogFileProperties.type = reader.getString(); + deserializedCapturedLogProperties.type = reader.getString(); } else if ("url".equals(fieldName)) { - deserializedLogFileProperties.url = reader.getString(); + deserializedCapturedLogProperties.url = reader.getString(); } else { reader.skipChildren(); } } - return deserializedLogFileProperties; + return deserializedCapturedLogProperties; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationInner.java index 2ddcc39e8fc7..4e6b2db93097 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationInner.java @@ -14,12 +14,12 @@ import java.io.IOException; /** - * Represents a Configuration. + * Configuration (also known as server parameter). */ @Fluent public final class ConfigurationInner extends ProxyResource { /* - * The properties of a configuration. + * Properties of a configuration (also known as server parameter). */ private ConfigurationProperties innerProperties; @@ -50,7 +50,7 @@ public ConfigurationInner() { } /** - * Get the innerProperties property: The properties of a configuration. + * Get the innerProperties property: Properties of a configuration (also known as server parameter). * * @return the innerProperties value. */ @@ -98,7 +98,8 @@ public String id() { } /** - * Get the value property: Value of the configuration. Required to update the configuration. + * Get the value property: Value of the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. * * @return the value value. */ @@ -107,7 +108,8 @@ public String value() { } /** - * Set the value property: Value of the configuration. Required to update the configuration. + * Set the value property: Value of the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. * * @param value the value value to set. * @return the ConfigurationInner object itself. @@ -121,7 +123,7 @@ public ConfigurationInner withValue(String value) { } /** - * Get the description property: Description of the configuration. + * Get the description property: Description of the configuration (also known as server parameter). * * @return the description value. */ @@ -130,7 +132,7 @@ public String description() { } /** - * Get the defaultValue property: Default value of the configuration. + * Get the defaultValue property: Value assigned by default to the configuration (also known as server parameter). * * @return the defaultValue value. */ @@ -139,7 +141,7 @@ public String defaultValue() { } /** - * Get the dataType property: Data type of the configuration. + * Get the dataType property: Data type of the configuration (also known as server parameter). * * @return the dataType value. */ @@ -148,7 +150,7 @@ public ConfigurationDataType dataType() { } /** - * Get the allowedValues property: Allowed values of the configuration. + * Get the allowedValues property: Allowed values of the configuration (also known as server parameter). * * @return the allowedValues value. */ @@ -157,7 +159,8 @@ public String allowedValues() { } /** - * Get the source property: Source of the configuration. Required to update the configuration. + * Get the source property: Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * * @return the source value. */ @@ -166,7 +169,8 @@ public String source() { } /** - * Set the source property: Source of the configuration. Required to update the configuration. + * Set the source property: Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * * @param source the source value to set. * @return the ConfigurationInner object itself. @@ -180,7 +184,10 @@ public ConfigurationInner withSource(String source) { } /** - * Get the isDynamicConfig property: Configuration dynamic or static. + * Get the isDynamicConfig property: Indicates if it's a dynamic (true) or static (false) configuration (also known + * as server parameter). Static server parameters require a server restart after changing the value assigned to + * them, for the change to take effect. Dynamic server parameters do not require a server restart after changing the + * value assigned to them, for the change to take effect. * * @return the isDynamicConfig value. */ @@ -189,7 +196,8 @@ public Boolean isDynamicConfig() { } /** - * Get the isReadOnly property: Configuration read-only or not. + * Get the isReadOnly property: Indicates if it's a read-only (true) or modifiable (false) configuration (also known + * as server parameter). * * @return the isReadOnly value. */ @@ -198,7 +206,8 @@ public Boolean isReadOnly() { } /** - * Get the isConfigPendingRestart property: Configuration is pending restart or not. + * Get the isConfigPendingRestart property: Indicates if the value assigned to the configuration (also known as + * server parameter) is pending a server restart for it to take effect. * * @return the isConfigPendingRestart value. */ @@ -207,7 +216,7 @@ public Boolean isConfigPendingRestart() { } /** - * Get the unit property: Configuration unit. + * Get the unit property: Units in which the configuration (also known as server parameter) value is expressed. * * @return the unit value. */ @@ -216,7 +225,8 @@ public String unit() { } /** - * Get the documentationLink property: Configuration documentation link. + * Get the documentationLink property: Link pointing to the documentation of the configuration (also known as server + * parameter). * * @return the documentationLink value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationProperties.java index 2557185782c2..76389521995f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationProperties.java @@ -13,62 +13,68 @@ import java.io.IOException; /** - * The properties of a configuration. + * Properties of a configuration (also known as server parameter). */ @Fluent public final class ConfigurationProperties implements JsonSerializable { /* - * Value of the configuration. Required to update the configuration. + * Value of the configuration (also known as server parameter). Required to update the value assigned to a specific + * modifiable configuration. */ private String value; /* - * Description of the configuration. + * Description of the configuration (also known as server parameter). */ private String description; /* - * Default value of the configuration. + * Value assigned by default to the configuration (also known as server parameter). */ private String defaultValue; /* - * Data type of the configuration. + * Data type of the configuration (also known as server parameter). */ private ConfigurationDataType dataType; /* - * Allowed values of the configuration. + * Allowed values of the configuration (also known as server parameter). */ private String allowedValues; /* - * Source of the configuration. Required to update the configuration. + * Source of the value assigned to the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. */ private String source; /* - * Configuration dynamic or static. + * Indicates if it's a dynamic (true) or static (false) configuration (also known as server parameter). Static + * server parameters require a server restart after changing the value assigned to them, for the change to take + * effect. Dynamic server parameters do not require a server restart after changing the value assigned to them, for + * the change to take effect. */ private Boolean isDynamicConfig; /* - * Configuration read-only or not. + * Indicates if it's a read-only (true) or modifiable (false) configuration (also known as server parameter). */ private Boolean isReadOnly; /* - * Configuration is pending restart or not. + * Indicates if the value assigned to the configuration (also known as server parameter) is pending a server restart + * for it to take effect. */ private Boolean isConfigPendingRestart; /* - * Configuration unit. + * Units in which the configuration (also known as server parameter) value is expressed. */ private String unit; /* - * Configuration documentation link. + * Link pointing to the documentation of the configuration (also known as server parameter). */ private String documentationLink; @@ -79,7 +85,8 @@ public ConfigurationProperties() { } /** - * Get the value property: Value of the configuration. Required to update the configuration. + * Get the value property: Value of the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. * * @return the value value. */ @@ -88,7 +95,8 @@ public String value() { } /** - * Set the value property: Value of the configuration. Required to update the configuration. + * Set the value property: Value of the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. * * @param value the value value to set. * @return the ConfigurationProperties object itself. @@ -99,7 +107,7 @@ public ConfigurationProperties withValue(String value) { } /** - * Get the description property: Description of the configuration. + * Get the description property: Description of the configuration (also known as server parameter). * * @return the description value. */ @@ -108,7 +116,7 @@ public String description() { } /** - * Get the defaultValue property: Default value of the configuration. + * Get the defaultValue property: Value assigned by default to the configuration (also known as server parameter). * * @return the defaultValue value. */ @@ -117,7 +125,7 @@ public String defaultValue() { } /** - * Get the dataType property: Data type of the configuration. + * Get the dataType property: Data type of the configuration (also known as server parameter). * * @return the dataType value. */ @@ -126,7 +134,7 @@ public ConfigurationDataType dataType() { } /** - * Get the allowedValues property: Allowed values of the configuration. + * Get the allowedValues property: Allowed values of the configuration (also known as server parameter). * * @return the allowedValues value. */ @@ -135,7 +143,8 @@ public String allowedValues() { } /** - * Get the source property: Source of the configuration. Required to update the configuration. + * Get the source property: Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * * @return the source value. */ @@ -144,7 +153,8 @@ public String source() { } /** - * Set the source property: Source of the configuration. Required to update the configuration. + * Set the source property: Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * * @param source the source value to set. * @return the ConfigurationProperties object itself. @@ -155,7 +165,10 @@ public ConfigurationProperties withSource(String source) { } /** - * Get the isDynamicConfig property: Configuration dynamic or static. + * Get the isDynamicConfig property: Indicates if it's a dynamic (true) or static (false) configuration (also known + * as server parameter). Static server parameters require a server restart after changing the value assigned to + * them, for the change to take effect. Dynamic server parameters do not require a server restart after changing the + * value assigned to them, for the change to take effect. * * @return the isDynamicConfig value. */ @@ -164,7 +177,8 @@ public Boolean isDynamicConfig() { } /** - * Get the isReadOnly property: Configuration read-only or not. + * Get the isReadOnly property: Indicates if it's a read-only (true) or modifiable (false) configuration (also known + * as server parameter). * * @return the isReadOnly value. */ @@ -173,7 +187,8 @@ public Boolean isReadOnly() { } /** - * Get the isConfigPendingRestart property: Configuration is pending restart or not. + * Get the isConfigPendingRestart property: Indicates if the value assigned to the configuration (also known as + * server parameter) is pending a server restart for it to take effect. * * @return the isConfigPendingRestart value. */ @@ -182,7 +197,7 @@ public Boolean isConfigPendingRestart() { } /** - * Get the unit property: Configuration unit. + * Get the unit property: Units in which the configuration (also known as server parameter) value is expressed. * * @return the unit value. */ @@ -191,7 +206,8 @@ public String unit() { } /** - * Get the documentationLink property: Configuration documentation link. + * Get the documentationLink property: Link pointing to the documentation of the configuration (also known as server + * parameter). * * @return the documentationLink value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java index bb0ddcb7f6a6..8b4f3465efed 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java @@ -13,12 +13,12 @@ import java.io.IOException; /** - * Represents a Database. + * Represents a database. */ @Fluent public final class DatabaseInner extends ProxyResource { /* - * The properties of a database. + * Properties of a database. */ private DatabaseProperties innerProperties; @@ -49,7 +49,7 @@ public DatabaseInner() { } /** - * Get the innerProperties property: The properties of a database. + * Get the innerProperties property: Properties of a database. * * @return the innerProperties value. */ @@ -97,7 +97,7 @@ public String id() { } /** - * Get the charset property: The charset of the database. + * Get the charset property: Character set of the database. * * @return the charset value. */ @@ -106,7 +106,7 @@ public String charset() { } /** - * Set the charset property: The charset of the database. + * Set the charset property: Character set of the database. * * @param charset the charset value to set. * @return the DatabaseInner object itself. @@ -120,7 +120,7 @@ public DatabaseInner withCharset(String charset) { } /** - * Get the collation property: The collation of the database. + * Get the collation property: Collation of the database. * * @return the collation value. */ @@ -129,7 +129,7 @@ public String collation() { } /** - * Set the collation property: The collation of the database. + * Set the collation property: Collation of the database. * * @param collation the collation value to set. * @return the DatabaseInner object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseProperties.java index d36bf2b3659a..c0bc3b02cc2b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseProperties.java @@ -12,17 +12,17 @@ import java.io.IOException; /** - * The properties of a database. + * Properties of a database. */ @Fluent public final class DatabaseProperties implements JsonSerializable { /* - * The charset of the database. + * Character set of the database. */ private String charset; /* - * The collation of the database. + * Collation of the database. */ private String collation; @@ -33,7 +33,7 @@ public DatabaseProperties() { } /** - * Get the charset property: The charset of the database. + * Get the charset property: Character set of the database. * * @return the charset value. */ @@ -42,7 +42,7 @@ public String charset() { } /** - * Set the charset property: The charset of the database. + * Set the charset property: Character set of the database. * * @param charset the charset value to set. * @return the DatabaseProperties object itself. @@ -53,7 +53,7 @@ public DatabaseProperties withCharset(String charset) { } /** - * Get the collation property: The collation of the database. + * Get the collation property: Collation of the database. * * @return the collation value. */ @@ -62,7 +62,7 @@ public String collation() { } /** - * Set the collation property: The collation of the database. + * Set the collation property: Collation of the database. * * @param collation the collation value to set. * @return the DatabaseProperties object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleInner.java index 4494702a88ec..6ee2cbbe98d5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleInner.java @@ -14,12 +14,12 @@ import java.io.IOException; /** - * Represents a server firewall rule. + * Firewall rule. */ @Fluent public final class FirewallRuleInner extends ProxyResource { /* - * The properties of a firewall rule. + * Properties of a firewall rule. */ private FirewallRuleProperties innerProperties = new FirewallRuleProperties(); @@ -50,7 +50,7 @@ public FirewallRuleInner() { } /** - * Get the innerProperties property: The properties of a firewall rule. + * Get the innerProperties property: Properties of a firewall rule. * * @return the innerProperties value. */ @@ -98,7 +98,8 @@ public String id() { } /** - * Get the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format. + * Get the startIpAddress property: IP address defining the start of the range of addresses of a firewall rule. Must + * be expressed in IPv4 format. * * @return the startIpAddress value. */ @@ -107,7 +108,8 @@ public String startIpAddress() { } /** - * Set the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format. + * Set the startIpAddress property: IP address defining the start of the range of addresses of a firewall rule. Must + * be expressed in IPv4 format. * * @param startIpAddress the startIpAddress value to set. * @return the FirewallRuleInner object itself. @@ -121,7 +123,8 @@ public FirewallRuleInner withStartIpAddress(String startIpAddress) { } /** - * Get the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format. + * Get the endIpAddress property: IP address defining the end of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * * @return the endIpAddress value. */ @@ -130,7 +133,8 @@ public String endIpAddress() { } /** - * Set the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format. + * Set the endIpAddress property: IP address defining the end of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * * @param endIpAddress the endIpAddress value to set. * @return the FirewallRuleInner object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleProperties.java index 52e91af5d16d..f8b579c7aaac 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleProperties.java @@ -13,17 +13,17 @@ import java.io.IOException; /** - * The properties of a server firewall rule. + * Properties of a firewall rule. */ @Fluent public final class FirewallRuleProperties implements JsonSerializable { /* - * The start IP address of the server firewall rule. Must be IPv4 format. + * IP address defining the start of the range of addresses of a firewall rule. Must be expressed in IPv4 format. */ private String startIpAddress; /* - * The end IP address of the server firewall rule. Must be IPv4 format. + * IP address defining the end of the range of addresses of a firewall rule. Must be expressed in IPv4 format. */ private String endIpAddress; @@ -34,7 +34,8 @@ public FirewallRuleProperties() { } /** - * Get the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format. + * Get the startIpAddress property: IP address defining the start of the range of addresses of a firewall rule. Must + * be expressed in IPv4 format. * * @return the startIpAddress value. */ @@ -43,7 +44,8 @@ public String startIpAddress() { } /** - * Set the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format. + * Set the startIpAddress property: IP address defining the start of the range of addresses of a firewall rule. Must + * be expressed in IPv4 format. * * @param startIpAddress the startIpAddress value to set. * @return the FirewallRuleProperties object itself. @@ -54,7 +56,8 @@ public FirewallRuleProperties withStartIpAddress(String startIpAddress) { } /** - * Get the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format. + * Get the endIpAddress property: IP address defining the end of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * * @return the endIpAddress value. */ @@ -63,7 +66,8 @@ public String endIpAddress() { } /** - * Set the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format. + * Set the endIpAddress property: IP address defining the end of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * * @param endIpAddress the endIpAddress value to set. * @return the FirewallRuleProperties object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FlexibleServerCapabilityInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FlexibleServerCapabilityInner.java deleted file mode 100644 index 6b52db9e0bcb..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FlexibleServerCapabilityInner.java +++ /dev/null @@ -1,373 +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.resourcemanager.postgresqlflexibleserver.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityBase; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityStatus; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningEditionCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerEditionCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.GeoBackupSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OnlineResizeSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RestrictedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersionCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrowthSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SupportedFeature; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHaAndGeoBackupSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHaSupportedEnum; -import java.io.IOException; -import java.util.List; - -/** - * Capability for the PostgreSQL server. - */ -@Fluent -public final class FlexibleServerCapabilityInner extends CapabilityBase { - /* - * Name of flexible servers capability - */ - private String name; - - /* - * List of supported flexible server editions - */ - private List supportedServerEditions; - - /* - * The list of server versions supported for this capability. - */ - private List supportedServerVersions; - - /* - * The supported features. - */ - private List supportedFeatures; - - /* - * Gets a value indicating whether fast provisioning is supported. "Enabled" means fast provisioning is supported. - * "Disabled" stands for fast provisioning is not supported. Will be deprecated in future, please look to Supported - * Features for "FastProvisioning". - */ - private FastProvisioningSupportedEnum fastProvisioningSupported; - - /* - * List of supported server editions for fast provisioning - */ - private List supportedFastProvisioningEditions; - - /* - * Determines if geo-backup is supported in this region. "Enabled" means geo-backup is supported. "Disabled" stands - * for geo-back is not supported. Will be deprecated in future, please look to Supported Features for "GeoBackup". - */ - private GeoBackupSupportedEnum geoBackupSupported; - - /* - * A value indicating whether Zone Redundant HA is supported in this region. "Enabled" means zone redundant HA is - * supported. "Disabled" stands for zone redundant HA is not supported. Will be deprecated in future, please look to - * Supported Features for "ZoneRedundantHa". - */ - private ZoneRedundantHaSupportedEnum zoneRedundantHaSupported; - - /* - * A value indicating whether Zone Redundant HA and Geo-backup is supported in this region. "Enabled" means zone - * redundant HA and geo-backup is supported. "Disabled" stands for zone redundant HA and geo-backup is not - * supported. Will be deprecated in future, please look to Supported Features for "ZoneRedundantHaAndGeoBackup". - */ - private ZoneRedundantHaAndGeoBackupSupportedEnum zoneRedundantHaAndGeoBackupSupported; - - /* - * A value indicating whether storage auto-grow is supported in this region. "Enabled" means storage auto-grow is - * supported. "Disabled" stands for storage auto-grow is not supported. Will be deprecated in future, please look to - * Supported Features for "StorageAutoGrowth". - */ - private StorageAutoGrowthSupportedEnum storageAutoGrowthSupported; - - /* - * A value indicating whether online resize is supported in this region for the given subscription. "Enabled" means - * storage online resize is supported. "Disabled" means storage online resize is not supported. Will be deprecated - * in future, please look to Supported Features for "OnlineResize". - */ - private OnlineResizeSupportedEnum onlineResizeSupported; - - /* - * A value indicating whether this region is restricted. "Enabled" means region is restricted. "Disabled" stands for - * region is not restricted. Will be deprecated in future, please look to Supported Features for "Restricted". - */ - private RestrictedEnum restricted; - - /* - * The reason for the capability not being available. - */ - private String reason; - - /* - * The status of the capability. - */ - private CapabilityStatus status; - - /** - * Creates an instance of FlexibleServerCapabilityInner class. - */ - public FlexibleServerCapabilityInner() { - } - - /** - * Get the name property: Name of flexible servers capability. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of flexible servers capability. - * - * @param name the name value to set. - * @return the FlexibleServerCapabilityInner object itself. - */ - public FlexibleServerCapabilityInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the supportedServerEditions property: List of supported flexible server editions. - * - * @return the supportedServerEditions value. - */ - public List supportedServerEditions() { - return this.supportedServerEditions; - } - - /** - * Get the supportedServerVersions property: The list of server versions supported for this capability. - * - * @return the supportedServerVersions value. - */ - public List supportedServerVersions() { - return this.supportedServerVersions; - } - - /** - * Get the supportedFeatures property: The supported features. - * - * @return the supportedFeatures value. - */ - public List supportedFeatures() { - return this.supportedFeatures; - } - - /** - * Get the fastProvisioningSupported property: Gets a value indicating whether fast provisioning is supported. - * "Enabled" means fast provisioning is supported. "Disabled" stands for fast provisioning is not supported. Will be - * deprecated in future, please look to Supported Features for "FastProvisioning". - * - * @return the fastProvisioningSupported value. - */ - public FastProvisioningSupportedEnum fastProvisioningSupported() { - return this.fastProvisioningSupported; - } - - /** - * Get the supportedFastProvisioningEditions property: List of supported server editions for fast provisioning. - * - * @return the supportedFastProvisioningEditions value. - */ - public List supportedFastProvisioningEditions() { - return this.supportedFastProvisioningEditions; - } - - /** - * Get the geoBackupSupported property: Determines if geo-backup is supported in this region. "Enabled" means - * geo-backup is supported. "Disabled" stands for geo-back is not supported. Will be deprecated in future, please - * look to Supported Features for "GeoBackup". - * - * @return the geoBackupSupported value. - */ - public GeoBackupSupportedEnum geoBackupSupported() { - return this.geoBackupSupported; - } - - /** - * Get the zoneRedundantHaSupported property: A value indicating whether Zone Redundant HA is supported in this - * region. "Enabled" means zone redundant HA is supported. "Disabled" stands for zone redundant HA is not supported. - * Will be deprecated in future, please look to Supported Features for "ZoneRedundantHa". - * - * @return the zoneRedundantHaSupported value. - */ - public ZoneRedundantHaSupportedEnum zoneRedundantHaSupported() { - return this.zoneRedundantHaSupported; - } - - /** - * Get the zoneRedundantHaAndGeoBackupSupported property: A value indicating whether Zone Redundant HA and - * Geo-backup is supported in this region. "Enabled" means zone redundant HA and geo-backup is supported. "Disabled" - * stands for zone redundant HA and geo-backup is not supported. Will be deprecated in future, please look to - * Supported Features for "ZoneRedundantHaAndGeoBackup". - * - * @return the zoneRedundantHaAndGeoBackupSupported value. - */ - public ZoneRedundantHaAndGeoBackupSupportedEnum zoneRedundantHaAndGeoBackupSupported() { - return this.zoneRedundantHaAndGeoBackupSupported; - } - - /** - * Get the storageAutoGrowthSupported property: A value indicating whether storage auto-grow is supported in this - * region. "Enabled" means storage auto-grow is supported. "Disabled" stands for storage auto-grow is not supported. - * Will be deprecated in future, please look to Supported Features for "StorageAutoGrowth". - * - * @return the storageAutoGrowthSupported value. - */ - public StorageAutoGrowthSupportedEnum storageAutoGrowthSupported() { - return this.storageAutoGrowthSupported; - } - - /** - * Get the onlineResizeSupported property: A value indicating whether online resize is supported in this region for - * the given subscription. "Enabled" means storage online resize is supported. "Disabled" means storage online - * resize is not supported. Will be deprecated in future, please look to Supported Features for "OnlineResize". - * - * @return the onlineResizeSupported value. - */ - public OnlineResizeSupportedEnum onlineResizeSupported() { - return this.onlineResizeSupported; - } - - /** - * Get the restricted property: A value indicating whether this region is restricted. "Enabled" means region is - * restricted. "Disabled" stands for region is not restricted. Will be deprecated in future, please look to - * Supported Features for "Restricted". - * - * @return the restricted value. - */ - public RestrictedEnum restricted() { - return this.restricted; - } - - /** - * Get the reason property: The reason for the capability not being available. - * - * @return the reason value. - */ - @Override - public String reason() { - return this.reason; - } - - /** - * Get the status property: The status of the capability. - * - * @return the status value. - */ - @Override - public CapabilityStatus status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (supportedServerEditions() != null) { - supportedServerEditions().forEach(e -> e.validate()); - } - if (supportedServerVersions() != null) { - supportedServerVersions().forEach(e -> e.validate()); - } - if (supportedFeatures() != null) { - supportedFeatures().forEach(e -> e.validate()); - } - if (supportedFastProvisioningEditions() != null) { - supportedFastProvisioningEditions().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FlexibleServerCapabilityInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FlexibleServerCapabilityInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FlexibleServerCapabilityInner. - */ - public static FlexibleServerCapabilityInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FlexibleServerCapabilityInner deserializedFlexibleServerCapabilityInner - = new FlexibleServerCapabilityInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.status = CapabilityStatus.fromString(reader.getString()); - } else if ("reason".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.reason = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.name = reader.getString(); - } else if ("supportedServerEditions".equals(fieldName)) { - List supportedServerEditions - = reader.readArray(reader1 -> FlexibleServerEditionCapability.fromJson(reader1)); - deserializedFlexibleServerCapabilityInner.supportedServerEditions = supportedServerEditions; - } else if ("supportedServerVersions".equals(fieldName)) { - List supportedServerVersions - = reader.readArray(reader1 -> ServerVersionCapability.fromJson(reader1)); - deserializedFlexibleServerCapabilityInner.supportedServerVersions = supportedServerVersions; - } else if ("supportedFeatures".equals(fieldName)) { - List supportedFeatures - = reader.readArray(reader1 -> SupportedFeature.fromJson(reader1)); - deserializedFlexibleServerCapabilityInner.supportedFeatures = supportedFeatures; - } else if ("fastProvisioningSupported".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.fastProvisioningSupported - = FastProvisioningSupportedEnum.fromString(reader.getString()); - } else if ("supportedFastProvisioningEditions".equals(fieldName)) { - List supportedFastProvisioningEditions - = reader.readArray(reader1 -> FastProvisioningEditionCapability.fromJson(reader1)); - deserializedFlexibleServerCapabilityInner.supportedFastProvisioningEditions - = supportedFastProvisioningEditions; - } else if ("geoBackupSupported".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.geoBackupSupported - = GeoBackupSupportedEnum.fromString(reader.getString()); - } else if ("zoneRedundantHaSupported".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.zoneRedundantHaSupported - = ZoneRedundantHaSupportedEnum.fromString(reader.getString()); - } else if ("zoneRedundantHaAndGeoBackupSupported".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.zoneRedundantHaAndGeoBackupSupported - = ZoneRedundantHaAndGeoBackupSupportedEnum.fromString(reader.getString()); - } else if ("storageAutoGrowthSupported".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.storageAutoGrowthSupported - = StorageAutoGrowthSupportedEnum.fromString(reader.getString()); - } else if ("onlineResizeSupported".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.onlineResizeSupported - = OnlineResizeSupportedEnum.fromString(reader.getString()); - } else if ("restricted".equals(fieldName)) { - deserializedFlexibleServerCapabilityInner.restricted - = RestrictedEnum.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedFlexibleServerCapabilityInner; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/IndexRecommendationResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/IndexRecommendationResourceInner.java deleted file mode 100644 index f58f26fc84d6..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/IndexRecommendationResourceInner.java +++ /dev/null @@ -1,368 +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.resourcemanager.postgresqlflexibleserver.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ImpactRecord; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationDetails; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResourcePropertiesAnalyzedWorkload; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResourcePropertiesImplementationDetails; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeEnum; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Index recommendation properties. - */ -@Immutable -public final class IndexRecommendationResourceInner extends ProxyResource { - /* - * Properties of IndexRecommendationResource. - */ - private IndexRecommendationResourceProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of IndexRecommendationResourceInner class. - */ - public IndexRecommendationResourceInner() { - } - - /** - * Get the innerProperties property: Properties of IndexRecommendationResource. - * - * @return the innerProperties value. - */ - private IndexRecommendationResourceProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the initialRecommendedTime property: Creation time of this recommendation in UTC date-time string format. - * - * @return the initialRecommendedTime value. - */ - public OffsetDateTime initialRecommendedTime() { - return this.innerProperties() == null ? null : this.innerProperties().initialRecommendedTime(); - } - - /** - * Set the initialRecommendedTime property: Creation time of this recommendation in UTC date-time string format. - * - * @param initialRecommendedTime the initialRecommendedTime value to set. - * @return the IndexRecommendationResourceInner object itself. - */ - public IndexRecommendationResourceInner withInitialRecommendedTime(OffsetDateTime initialRecommendedTime) { - if (this.innerProperties() == null) { - this.innerProperties = new IndexRecommendationResourceProperties(); - } - this.innerProperties().withInitialRecommendedTime(initialRecommendedTime); - return this; - } - - /** - * Get the lastRecommendedTime property: The last refresh of this recommendation in UTC date-time string format. - * - * @return the lastRecommendedTime value. - */ - public OffsetDateTime lastRecommendedTime() { - return this.innerProperties() == null ? null : this.innerProperties().lastRecommendedTime(); - } - - /** - * Set the lastRecommendedTime property: The last refresh of this recommendation in UTC date-time string format. - * - * @param lastRecommendedTime the lastRecommendedTime value to set. - * @return the IndexRecommendationResourceInner object itself. - */ - public IndexRecommendationResourceInner withLastRecommendedTime(OffsetDateTime lastRecommendedTime) { - if (this.innerProperties() == null) { - this.innerProperties = new IndexRecommendationResourceProperties(); - } - this.innerProperties().withLastRecommendedTime(lastRecommendedTime); - return this; - } - - /** - * Get the timesRecommended property: The number of times this recommendation has encountered. - * - * @return the timesRecommended value. - */ - public Integer timesRecommended() { - return this.innerProperties() == null ? null : this.innerProperties().timesRecommended(); - } - - /** - * Set the timesRecommended property: The number of times this recommendation has encountered. - * - * @param timesRecommended the timesRecommended value to set. - * @return the IndexRecommendationResourceInner object itself. - */ - public IndexRecommendationResourceInner withTimesRecommended(Integer timesRecommended) { - if (this.innerProperties() == null) { - this.innerProperties = new IndexRecommendationResourceProperties(); - } - this.innerProperties().withTimesRecommended(timesRecommended); - return this; - } - - /** - * Get the improvedQueryIds property: The ImprovedQueryIds. The list will only be populated for CREATE INDEX - * recommendations. - * - * @return the improvedQueryIds value. - */ - public List improvedQueryIds() { - return this.innerProperties() == null ? null : this.innerProperties().improvedQueryIds(); - } - - /** - * Set the improvedQueryIds property: The ImprovedQueryIds. The list will only be populated for CREATE INDEX - * recommendations. - * - * @param improvedQueryIds the improvedQueryIds value to set. - * @return the IndexRecommendationResourceInner object itself. - */ - public IndexRecommendationResourceInner withImprovedQueryIds(List improvedQueryIds) { - if (this.innerProperties() == null) { - this.innerProperties = new IndexRecommendationResourceProperties(); - } - this.innerProperties().withImprovedQueryIds(improvedQueryIds); - return this; - } - - /** - * Get the recommendationReason property: Reason for this recommendation. - * - * @return the recommendationReason value. - */ - public String recommendationReason() { - return this.innerProperties() == null ? null : this.innerProperties().recommendationReason(); - } - - /** - * Set the recommendationReason property: Reason for this recommendation. - * - * @param recommendationReason the recommendationReason value to set. - * @return the IndexRecommendationResourceInner object itself. - */ - public IndexRecommendationResourceInner withRecommendationReason(String recommendationReason) { - if (this.innerProperties() == null) { - this.innerProperties = new IndexRecommendationResourceProperties(); - } - this.innerProperties().withRecommendationReason(recommendationReason); - return this; - } - - /** - * Get the recommendationType property: Type for this recommendation. - * - * @return the recommendationType value. - */ - public RecommendationTypeEnum recommendationType() { - return this.innerProperties() == null ? null : this.innerProperties().recommendationType(); - } - - /** - * Set the recommendationType property: Type for this recommendation. - * - * @param recommendationType the recommendationType value to set. - * @return the IndexRecommendationResourceInner object itself. - */ - public IndexRecommendationResourceInner withRecommendationType(RecommendationTypeEnum recommendationType) { - if (this.innerProperties() == null) { - this.innerProperties = new IndexRecommendationResourceProperties(); - } - this.innerProperties().withRecommendationType(recommendationType); - return this; - } - - /** - * Get the implementationDetails property: Stores implementation details for the recommended action. - * - * @return the implementationDetails value. - */ - public IndexRecommendationResourcePropertiesImplementationDetails implementationDetails() { - return this.innerProperties() == null ? null : this.innerProperties().implementationDetails(); - } - - /** - * Set the implementationDetails property: Stores implementation details for the recommended action. - * - * @param implementationDetails the implementationDetails value to set. - * @return the IndexRecommendationResourceInner object itself. - */ - public IndexRecommendationResourceInner - withImplementationDetails(IndexRecommendationResourcePropertiesImplementationDetails implementationDetails) { - if (this.innerProperties() == null) { - this.innerProperties = new IndexRecommendationResourceProperties(); - } - this.innerProperties().withImplementationDetails(implementationDetails); - return this; - } - - /** - * Get the analyzedWorkload property: Stores workload information for the recommended action. - * - * @return the analyzedWorkload value. - */ - public IndexRecommendationResourcePropertiesAnalyzedWorkload analyzedWorkload() { - return this.innerProperties() == null ? null : this.innerProperties().analyzedWorkload(); - } - - /** - * Set the analyzedWorkload property: Stores workload information for the recommended action. - * - * @param analyzedWorkload the analyzedWorkload value to set. - * @return the IndexRecommendationResourceInner object itself. - */ - public IndexRecommendationResourceInner - withAnalyzedWorkload(IndexRecommendationResourcePropertiesAnalyzedWorkload analyzedWorkload) { - if (this.innerProperties() == null) { - this.innerProperties = new IndexRecommendationResourceProperties(); - } - this.innerProperties().withAnalyzedWorkload(analyzedWorkload); - return this; - } - - /** - * Get the estimatedImpact property: The estimated impact of this recommended action. - * - * @return the estimatedImpact value. - */ - public List estimatedImpact() { - return this.innerProperties() == null ? null : this.innerProperties().estimatedImpact(); - } - - /** - * Get the details property: Stores recommendation details for the recommended action. - * - * @return the details value. - */ - public IndexRecommendationDetails details() { - return this.innerProperties() == null ? null : this.innerProperties().details(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IndexRecommendationResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IndexRecommendationResourceInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IndexRecommendationResourceInner. - */ - public static IndexRecommendationResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IndexRecommendationResourceInner deserializedIndexRecommendationResourceInner - = new IndexRecommendationResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedIndexRecommendationResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedIndexRecommendationResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedIndexRecommendationResourceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedIndexRecommendationResourceInner.innerProperties - = IndexRecommendationResourceProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedIndexRecommendationResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedIndexRecommendationResourceInner; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseInner.java index e7c116634f0a..e91943531cfb 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseInner.java @@ -20,7 +20,8 @@ public final class LtrPreBackupResponseInner implements JsonSerializable tags) { + public MigrationInner withTags(Map tags) { super.withTags(tags); return this; } /** - * Get the migrationId property: ID for migration, a GUID. + * Get the migrationId property: Identifier of a migration. * * @return the migrationId value. */ @@ -140,7 +140,7 @@ public String migrationId() { } /** - * Get the currentStatus property: Current status of migration. + * Get the currentStatus property: Current status of a migration. * * @return the currentStatus value. */ @@ -149,7 +149,7 @@ public MigrationStatus currentStatus() { } /** - * Get the migrationInstanceResourceId property: ResourceId of the private endpoint migration instance. + * Get the migrationInstanceResourceId property: Identifier of the private endpoint migration instance. * * @return the migrationInstanceResourceId value. */ @@ -158,21 +158,21 @@ public String migrationInstanceResourceId() { } /** - * Set the migrationInstanceResourceId property: ResourceId of the private endpoint migration instance. + * Set the migrationInstanceResourceId property: Identifier of the private endpoint migration instance. * * @param migrationInstanceResourceId the migrationInstanceResourceId value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withMigrationInstanceResourceId(String migrationInstanceResourceId) { + public MigrationInner withMigrationInstanceResourceId(String migrationInstanceResourceId) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withMigrationInstanceResourceId(migrationInstanceResourceId); return this; } /** - * Get the migrationMode property: There are two types of migration modes Online and Offline. + * Get the migrationMode property: Mode used to perform the migration: Online or Offline. * * @return the migrationMode value. */ @@ -181,21 +181,21 @@ public MigrationMode migrationMode() { } /** - * Set the migrationMode property: There are two types of migration modes Online and Offline. + * Set the migrationMode property: Mode used to perform the migration: Online or Offline. * * @param migrationMode the migrationMode value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withMigrationMode(MigrationMode migrationMode) { + public MigrationInner withMigrationMode(MigrationMode migrationMode) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withMigrationMode(migrationMode); return this; } /** - * Get the migrationOption property: This indicates the supported Migration option for the migration. + * Get the migrationOption property: Supported option for a migration. * * @return the migrationOption value. */ @@ -204,25 +204,24 @@ public MigrationOption migrationOption() { } /** - * Set the migrationOption property: This indicates the supported Migration option for the migration. + * Set the migrationOption property: Supported option for a migration. * * @param migrationOption the migrationOption value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withMigrationOption(MigrationOption migrationOption) { + public MigrationInner withMigrationOption(MigrationOption migrationOption) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withMigrationOption(migrationOption); return this; } /** - * Get the sourceType property: migration source server type : OnPremises, AWS, GCP, AzureVM, - * PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, - * EDB_Oracle_Server, EDB_PostgreSQL, PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, - * Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or - * Supabase_PostgreSQL. + * Get the sourceType property: Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, + * AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, + * EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, + * OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL. * * @return the sourceType value. */ @@ -231,26 +230,25 @@ public SourceType sourceType() { } /** - * Set the sourceType property: migration source server type : OnPremises, AWS, GCP, AzureVM, - * PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, - * EDB_Oracle_Server, EDB_PostgreSQL, PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, - * Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or - * Supabase_PostgreSQL. + * Set the sourceType property: Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, + * AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, + * EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, + * OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL. * * @param sourceType the sourceType value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withSourceType(SourceType sourceType) { + public MigrationInner withSourceType(SourceType sourceType) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withSourceType(sourceType); return this; } /** - * Get the sslMode property: SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and - * Prefer for other source types. + * Get the sslMode property: SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is + * 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. * * @return the sslMode value. */ @@ -259,22 +257,22 @@ public SslMode sslMode() { } /** - * Set the sslMode property: SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and - * Prefer for other source types. + * Set the sslMode property: SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is + * 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. * * @param sslMode the sslMode value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withSslMode(SslMode sslMode) { + public MigrationInner withSslMode(SslMode sslMode) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withSslMode(sslMode); return this; } /** - * Get the sourceDbServerMetadata property: Metadata of the source database server. + * Get the sourceDbServerMetadata property: Metadata of source database server. * * @return the sourceDbServerMetadata value. */ @@ -283,7 +281,7 @@ public DbServerMetadata sourceDbServerMetadata() { } /** - * Get the targetDbServerMetadata property: Metadata of the target database server. + * Get the targetDbServerMetadata property: Metadata of target database server. * * @return the targetDbServerMetadata value. */ @@ -292,8 +290,8 @@ public DbServerMetadata targetDbServerMetadata() { } /** - * Get the sourceDbServerResourceId property: ResourceId of the source database server in case the sourceType is - * PostgreSQLSingleServer. For other source types this should be ipaddress:port@username or + * Get the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or * hostname:port@username. * * @return the sourceDbServerResourceId value. @@ -303,24 +301,25 @@ public String sourceDbServerResourceId() { } /** - * Set the sourceDbServerResourceId property: ResourceId of the source database server in case the sourceType is - * PostgreSQLSingleServer. For other source types this should be ipaddress:port@username or + * Set the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or * hostname:port@username. * * @param sourceDbServerResourceId the sourceDbServerResourceId value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withSourceDbServerResourceId(String sourceDbServerResourceId) { + public MigrationInner withSourceDbServerResourceId(String sourceDbServerResourceId) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withSourceDbServerResourceId(sourceDbServerResourceId); return this; } /** - * Get the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Get the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @return the sourceDbServerFullyQualifiedDomainName value. */ @@ -329,23 +328,23 @@ public String sourceDbServerFullyQualifiedDomainName() { } /** - * Set the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Set the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @param sourceDbServerFullyQualifiedDomainName the sourceDbServerFullyQualifiedDomainName value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner - withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName) { + public MigrationInner withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withSourceDbServerFullyQualifiedDomainName(sourceDbServerFullyQualifiedDomainName); return this; } /** - * Get the targetDbServerResourceId property: ResourceId of the source database server. + * Get the targetDbServerResourceId property: Identifier of the target database server resource. * * @return the targetDbServerResourceId value. */ @@ -354,8 +353,9 @@ public String targetDbServerResourceId() { } /** - * Get the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Get the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @return the targetDbServerFullyQualifiedDomainName value. */ @@ -364,16 +364,16 @@ public String targetDbServerFullyQualifiedDomainName() { } /** - * Set the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Set the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @param targetDbServerFullyQualifiedDomainName the targetDbServerFullyQualifiedDomainName value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner - withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName) { + public MigrationInner withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withTargetDbServerFullyQualifiedDomainName(targetDbServerFullyQualifiedDomainName); return this; @@ -392,18 +392,18 @@ public MigrationSecretParameters secretParameters() { * Set the secretParameters property: Migration secret parameters. * * @param secretParameters the secretParameters value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withSecretParameters(MigrationSecretParameters secretParameters) { + public MigrationInner withSecretParameters(MigrationSecretParameters secretParameters) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withSecretParameters(secretParameters); return this; } /** - * Get the dbsToMigrate property: Number of databases to migrate. + * Get the dbsToMigrate property: Names of databases to migrate. * * @return the dbsToMigrate value. */ @@ -412,76 +412,76 @@ public List dbsToMigrate() { } /** - * Set the dbsToMigrate property: Number of databases to migrate. + * Set the dbsToMigrate property: Names of databases to migrate. * * @param dbsToMigrate the dbsToMigrate value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withDbsToMigrate(List dbsToMigrate) { + public MigrationInner withDbsToMigrate(List dbsToMigrate) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withDbsToMigrate(dbsToMigrate); return this; } /** - * Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @return the setupLogicalReplicationOnSourceDbIfNeeded value. */ - public LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded() { + public LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded() { return this.innerProperties() == null ? null : this.innerProperties().setupLogicalReplicationOnSourceDbIfNeeded(); } /** - * Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @param setupLogicalReplicationOnSourceDbIfNeeded the setupLogicalReplicationOnSourceDbIfNeeded value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withSetupLogicalReplicationOnSourceDbIfNeeded( - LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded) { + public MigrationInner withSetupLogicalReplicationOnSourceDbIfNeeded( + LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withSetupLogicalReplicationOnSourceDbIfNeeded(setupLogicalReplicationOnSourceDbIfNeeded); return this; } /** - * Get the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Get the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @return the overwriteDbsInTarget value. */ - public OverwriteDbsInTargetEnum overwriteDbsInTarget() { + public OverwriteDatabasesOnTargetServer overwriteDbsInTarget() { return this.innerProperties() == null ? null : this.innerProperties().overwriteDbsInTarget(); } /** - * Set the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Set the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @param overwriteDbsInTarget the overwriteDbsInTarget value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withOverwriteDbsInTarget(OverwriteDbsInTargetEnum overwriteDbsInTarget) { + public MigrationInner withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer overwriteDbsInTarget) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withOverwriteDbsInTarget(overwriteDbsInTarget); return this; } /** - * Get the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Get the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @return the migrationWindowStartTimeInUtc value. */ @@ -490,21 +490,21 @@ public OffsetDateTime migrationWindowStartTimeInUtc() { } /** - * Set the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Set the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @param migrationWindowStartTimeInUtc the migrationWindowStartTimeInUtc value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { + public MigrationInner withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withMigrationWindowStartTimeInUtc(migrationWindowStartTimeInUtc); return this; } /** - * Get the migrationWindowEndTimeInUtc property: End time in UTC for migration window. + * Get the migrationWindowEndTimeInUtc property: End time (UTC) for migration window. * * @return the migrationWindowEndTimeInUtc value. */ @@ -513,91 +513,91 @@ public OffsetDateTime migrationWindowEndTimeInUtc() { } /** - * Set the migrationWindowEndTimeInUtc property: End time in UTC for migration window. + * Set the migrationWindowEndTimeInUtc property: End time (UTC) for migration window. * * @param migrationWindowEndTimeInUtc the migrationWindowEndTimeInUtc value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withMigrationWindowEndTimeInUtc(OffsetDateTime migrationWindowEndTimeInUtc) { + public MigrationInner withMigrationWindowEndTimeInUtc(OffsetDateTime migrationWindowEndTimeInUtc) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withMigrationWindowEndTimeInUtc(migrationWindowEndTimeInUtc); return this; } /** - * Get the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Get the migrateRoles property: Indicates if roles and permissions must be migrated. * * @return the migrateRoles value. */ - public MigrateRolesEnum migrateRoles() { + public MigrateRolesAndPermissions migrateRoles() { return this.innerProperties() == null ? null : this.innerProperties().migrateRoles(); } /** - * Set the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Set the migrateRoles property: Indicates if roles and permissions must be migrated. * * @param migrateRoles the migrateRoles value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withMigrateRoles(MigrateRolesEnum migrateRoles) { + public MigrationInner withMigrateRoles(MigrateRolesAndPermissions migrateRoles) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withMigrateRoles(migrateRoles); return this; } /** - * Get the startDataMigration property: Indicates whether the data migration should start right away. + * Get the startDataMigration property: Indicates if data migration must start right away. * * @return the startDataMigration value. */ - public StartDataMigrationEnum startDataMigration() { + public StartDataMigration startDataMigration() { return this.innerProperties() == null ? null : this.innerProperties().startDataMigration(); } /** - * Set the startDataMigration property: Indicates whether the data migration should start right away. + * Set the startDataMigration property: Indicates if data migration must start right away. * * @param startDataMigration the startDataMigration value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withStartDataMigration(StartDataMigrationEnum startDataMigration) { + public MigrationInner withStartDataMigration(StartDataMigration startDataMigration) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withStartDataMigration(startDataMigration); return this; } /** - * Get the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Get the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @return the triggerCutover value. */ - public TriggerCutoverEnum triggerCutover() { + public TriggerCutover triggerCutover() { return this.innerProperties() == null ? null : this.innerProperties().triggerCutover(); } /** - * Set the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Set the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @param triggerCutover the triggerCutover value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withTriggerCutover(TriggerCutoverEnum triggerCutover) { + public MigrationInner withTriggerCutover(TriggerCutover triggerCutover) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withTriggerCutover(triggerCutover); return this; } /** - * Get the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Get the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToTriggerCutoverOn value. */ @@ -606,46 +606,46 @@ public List dbsToTriggerCutoverOn() { } /** - * Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @param dbsToTriggerCutoverOn the dbsToTriggerCutoverOn value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { + public MigrationInner withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withDbsToTriggerCutoverOn(dbsToTriggerCutoverOn); return this; } /** - * Get the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Get the cancel property: Indicates if cancel must be triggered for the entire migration. * * @return the cancel value. */ - public CancelEnum cancel() { + public Cancel cancel() { return this.innerProperties() == null ? null : this.innerProperties().cancel(); } /** - * Set the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Set the cancel property: Indicates if cancel must be triggered for the entire migration. * * @param cancel the cancel value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withCancel(CancelEnum cancel) { + public MigrationInner withCancel(Cancel cancel) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withCancel(cancel); return this; } /** - * Get the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Get the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToCancelMigrationOn value. */ @@ -654,15 +654,15 @@ public List dbsToCancelMigrationOn() { } /** - * Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @param dbsToCancelMigrationOn the dbsToCancelMigrationOn value to set. - * @return the MigrationResourceInner object itself. + * @return the MigrationInner object itself. */ - public MigrationResourceInner withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { + public MigrationInner withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourceProperties(); + this.innerProperties = new MigrationProperties(); } this.innerProperties().withDbsToCancelMigrationOn(dbsToCancelMigrationOn); return this; @@ -692,42 +692,42 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of MigrationResourceInner from the JsonReader. + * Reads an instance of MigrationInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of MigrationResourceInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. + * @return An instance of MigrationInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MigrationResourceInner. + * @throws IOException If an error occurs while reading the MigrationInner. */ - public static MigrationResourceInner fromJson(JsonReader jsonReader) throws IOException { + public static MigrationInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - MigrationResourceInner deserializedMigrationResourceInner = new MigrationResourceInner(); + MigrationInner deserializedMigrationInner = new MigrationInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedMigrationResourceInner.id = reader.getString(); + deserializedMigrationInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedMigrationResourceInner.name = reader.getString(); + deserializedMigrationInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedMigrationResourceInner.type = reader.getString(); + deserializedMigrationInner.type = reader.getString(); } else if ("location".equals(fieldName)) { - deserializedMigrationResourceInner.withLocation(reader.getString()); + deserializedMigrationInner.withLocation(reader.getString()); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedMigrationResourceInner.withTags(tags); + deserializedMigrationInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedMigrationResourceInner.innerProperties = MigrationResourceProperties.fromJson(reader); + deserializedMigrationInner.innerProperties = MigrationProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedMigrationResourceInner.systemData = SystemData.fromJson(reader); + deserializedMigrationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedMigrationResourceInner; + return deserializedMigrationInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityInner.java similarity index 62% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityResourceInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityInner.java index 1831ad0bad99..dc056ff9a338 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityResourceInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityInner.java @@ -14,28 +14,27 @@ import java.io.IOException; /** - * Represents a migration name's availability. + * Availability of a migration name. */ @Fluent -public final class MigrationNameAvailabilityResourceInner - implements JsonSerializable { +public final class MigrationNameAvailabilityInner implements JsonSerializable { /* - * The resource name to verify. + * Name of the migration to check for validity and availability. */ private String name; /* - * The type of the resource. + * Type of resource. */ private String type; /* - * Indicates whether the resource name is available. + * Indicates if the migration name is available. */ private Boolean nameAvailable; /* - * Migration name availability reason + * Migration name availability reason. */ private MigrationNameAvailabilityReason reason; @@ -45,13 +44,13 @@ public final class MigrationNameAvailabilityResourceInner private String message; /** - * Creates an instance of MigrationNameAvailabilityResourceInner class. + * Creates an instance of MigrationNameAvailabilityInner class. */ - public MigrationNameAvailabilityResourceInner() { + public MigrationNameAvailabilityInner() { } /** - * Get the name property: The resource name to verify. + * Get the name property: Name of the migration to check for validity and availability. * * @return the name value. */ @@ -60,18 +59,18 @@ public String name() { } /** - * Set the name property: The resource name to verify. + * Set the name property: Name of the migration to check for validity and availability. * * @param name the name value to set. - * @return the MigrationNameAvailabilityResourceInner object itself. + * @return the MigrationNameAvailabilityInner object itself. */ - public MigrationNameAvailabilityResourceInner withName(String name) { + public MigrationNameAvailabilityInner withName(String name) { this.name = name; return this; } /** - * Get the type property: The type of the resource. + * Get the type property: Type of resource. * * @return the type value. */ @@ -80,18 +79,18 @@ public String type() { } /** - * Set the type property: The type of the resource. + * Set the type property: Type of resource. * * @param type the type value to set. - * @return the MigrationNameAvailabilityResourceInner object itself. + * @return the MigrationNameAvailabilityInner object itself. */ - public MigrationNameAvailabilityResourceInner withType(String type) { + public MigrationNameAvailabilityInner withType(String type) { this.type = type; return this; } /** - * Get the nameAvailable property: Indicates whether the resource name is available. + * Get the nameAvailable property: Indicates if the migration name is available. * * @return the nameAvailable value. */ @@ -126,16 +125,16 @@ public void validate() { if (name() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( - "Missing required property name in model MigrationNameAvailabilityResourceInner")); + "Missing required property name in model MigrationNameAvailabilityInner")); } if (type() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( - "Missing required property type in model MigrationNameAvailabilityResourceInner")); + "Missing required property type in model MigrationNameAvailabilityInner")); } } - private static final ClientLogger LOGGER = new ClientLogger(MigrationNameAvailabilityResourceInner.class); + private static final ClientLogger LOGGER = new ClientLogger(MigrationNameAvailabilityInner.class); /** * {@inheritDoc} @@ -149,40 +148,40 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of MigrationNameAvailabilityResourceInner from the JsonReader. + * Reads an instance of MigrationNameAvailabilityInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of MigrationNameAvailabilityResourceInner if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. + * @return An instance of MigrationNameAvailabilityInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MigrationNameAvailabilityResourceInner. + * @throws IOException If an error occurs while reading the MigrationNameAvailabilityInner. */ - public static MigrationNameAvailabilityResourceInner fromJson(JsonReader jsonReader) throws IOException { + public static MigrationNameAvailabilityInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - MigrationNameAvailabilityResourceInner deserializedMigrationNameAvailabilityResourceInner - = new MigrationNameAvailabilityResourceInner(); + MigrationNameAvailabilityInner deserializedMigrationNameAvailabilityInner + = new MigrationNameAvailabilityInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("name".equals(fieldName)) { - deserializedMigrationNameAvailabilityResourceInner.name = reader.getString(); + deserializedMigrationNameAvailabilityInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedMigrationNameAvailabilityResourceInner.type = reader.getString(); + deserializedMigrationNameAvailabilityInner.type = reader.getString(); } else if ("nameAvailable".equals(fieldName)) { - deserializedMigrationNameAvailabilityResourceInner.nameAvailable + deserializedMigrationNameAvailabilityInner.nameAvailable = reader.getNullable(JsonReader::getBoolean); } else if ("reason".equals(fieldName)) { - deserializedMigrationNameAvailabilityResourceInner.reason + deserializedMigrationNameAvailabilityInner.reason = MigrationNameAvailabilityReason.fromString(reader.getString()); } else if ("message".equals(fieldName)) { - deserializedMigrationNameAvailabilityResourceInner.message = reader.getString(); + deserializedMigrationNameAvailabilityInner.message = reader.getString(); } else { reader.skipChildren(); } } - return deserializedMigrationNameAvailabilityResourceInner; + return deserializedMigrationNameAvailabilityInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourceProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationProperties.java similarity index 53% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourceProperties.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationProperties.java index 52eb3cd8491e..e8ac145fd536 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourceProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationProperties.java @@ -10,171 +10,173 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CancelEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Cancel; import com.azure.resourcemanager.postgresqlflexibleserver.models.DbServerMetadata; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceDbEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceServer; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesAndPermissions; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationMode; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationOption; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParameters; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationStatus; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDbsInTargetEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDatabasesOnTargetServer; import com.azure.resourcemanager.postgresqlflexibleserver.models.SourceType; import com.azure.resourcemanager.postgresqlflexibleserver.models.SslMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.StartDataMigrationEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TriggerCutoverEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StartDataMigration; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TriggerCutover; import java.io.IOException; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.List; /** - * Migration resource properties. + * Migration. */ @Fluent -public final class MigrationResourceProperties implements JsonSerializable { +public final class MigrationProperties implements JsonSerializable { /* - * ID for migration, a GUID. + * Identifier of a migration. */ private String migrationId; /* - * Current status of migration + * Current status of a migration. */ private MigrationStatus currentStatus; /* - * ResourceId of the private endpoint migration instance + * Identifier of the private endpoint migration instance. */ private String migrationInstanceResourceId; /* - * There are two types of migration modes Online and Offline + * Mode used to perform the migration: Online or Offline. */ private MigrationMode migrationMode; /* - * This indicates the supported Migration option for the migration + * Supported option for a migration. */ private MigrationOption migrationOption; /* - * migration source server type : OnPremises, AWS, GCP, AzureVM, PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, - * AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, EDB_Oracle_Server, EDB_PostgreSQL, - * PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, Heroku_PostgreSQL, Crunchy_PostgreSQL, - * ApsaraDB_RDS, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or Supabase_PostgreSQL + * Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, AWS_RDS, AzureVM, + * Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, EDB_PostgreSQL, + * GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, OnPremises, + * PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL */ private SourceType sourceType; /* - * SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and Prefer for other source - * types + * SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for + * other source types is 'Prefer'. */ private SslMode sslMode; /* - * Metadata of the source database server + * Metadata of source database server. */ private DbServerMetadata sourceDbServerMetadata; /* - * Metadata of the target database server + * Metadata of target database server. */ private DbServerMetadata targetDbServerMetadata; /* - * ResourceId of the source database server in case the sourceType is PostgreSQLSingleServer. For other source types - * this should be ipaddress:port@username or hostname:port@username + * Identifier of the source database server resource, when 'sourceType' is 'PostgreSQLSingleServer'. For other + * source types this must be set to ipaddress:port@username or hostname:port@username. */ private String sourceDbServerResourceId; /* - * Source server fully qualified domain name (FQDN) or IP address. It is a optional value, if customer provide it, - * migration service will always use it for connection + * Fully qualified domain name (FQDN) or IP address of the source server. This property is optional. When provided, + * the migration service will always use it to connect to the source server. */ private String sourceDbServerFullyQualifiedDomainName; /* - * ResourceId of the source database server + * Identifier of the target database server resource. */ private String targetDbServerResourceId; /* - * Target server fully qualified domain name (FQDN) or IP address. It is a optional value, if customer provide it, - * migration service will always use it for connection + * Fully qualified domain name (FQDN) or IP address of the target server. This property is optional. When provided, + * the migration service will always use it to connect to the target server. */ private String targetDbServerFullyQualifiedDomainName; /* - * Migration secret parameters + * Migration secret parameters. */ private MigrationSecretParameters secretParameters; /* - * Number of databases to migrate + * Names of databases to migrate. */ private List dbsToMigrate; /* - * Indicates whether to setup LogicalReplicationOnSourceDb, if needed + * Indicates whether to setup logical replication on source server, if needed. */ - private LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded; + private LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded; /* - * Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the - * migration workflow will wait for a confirmation, if it detects that the database already exists. + * Indicates if databases on the target server can be overwritten when already present. If set to 'False', when the + * migration workflow detects that the database already exists on the target server, it will wait for a + * confirmation. */ - private OverwriteDbsInTargetEnum overwriteDbsInTarget; + private OverwriteDatabasesOnTargetServer overwriteDbsInTarget; /* - * Start time in UTC for migration window + * Start time (UTC) for migration window. */ private OffsetDateTime migrationWindowStartTimeInUtc; /* - * End time in UTC for migration window + * End time (UTC) for migration window. */ private OffsetDateTime migrationWindowEndTimeInUtc; /* - * To migrate roles and permissions we need to send this flag as True + * Indicates if roles and permissions must be migrated. */ - private MigrateRolesEnum migrateRoles; + private MigrateRolesAndPermissions migrateRoles; /* - * Indicates whether the data migration should start right away + * Indicates if data migration must start right away. */ - private StartDataMigrationEnum startDataMigration; + private StartDataMigration startDataMigration; /* - * To trigger cutover for entire migration we need to send this flag as True + * Indicates if cutover must be triggered for the entire migration. */ - private TriggerCutoverEnum triggerCutover; + private TriggerCutover triggerCutover; /* - * When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in - * this array + * When you want to trigger cutover for specific databases set 'triggerCutover' to 'True' and the names of the + * specific databases in this array. */ private List dbsToTriggerCutoverOn; /* - * To trigger cancel for entire migration we need to send this flag as True + * Indicates if cancel must be triggered for the entire migration. */ - private CancelEnum cancel; + private Cancel cancel; /* - * When you want to trigger cancel for specific databases send cancel flag as True and database names in this array + * When you want to trigger cancel for specific databases set 'triggerCutover' to 'True' and the names of the + * specific databases in this array. */ private List dbsToCancelMigrationOn; /** - * Creates an instance of MigrationResourceProperties class. + * Creates an instance of MigrationProperties class. */ - public MigrationResourceProperties() { + public MigrationProperties() { } /** - * Get the migrationId property: ID for migration, a GUID. + * Get the migrationId property: Identifier of a migration. * * @return the migrationId value. */ @@ -183,7 +185,7 @@ public String migrationId() { } /** - * Get the currentStatus property: Current status of migration. + * Get the currentStatus property: Current status of a migration. * * @return the currentStatus value. */ @@ -192,7 +194,7 @@ public MigrationStatus currentStatus() { } /** - * Get the migrationInstanceResourceId property: ResourceId of the private endpoint migration instance. + * Get the migrationInstanceResourceId property: Identifier of the private endpoint migration instance. * * @return the migrationInstanceResourceId value. */ @@ -201,18 +203,18 @@ public String migrationInstanceResourceId() { } /** - * Set the migrationInstanceResourceId property: ResourceId of the private endpoint migration instance. + * Set the migrationInstanceResourceId property: Identifier of the private endpoint migration instance. * * @param migrationInstanceResourceId the migrationInstanceResourceId value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withMigrationInstanceResourceId(String migrationInstanceResourceId) { + public MigrationProperties withMigrationInstanceResourceId(String migrationInstanceResourceId) { this.migrationInstanceResourceId = migrationInstanceResourceId; return this; } /** - * Get the migrationMode property: There are two types of migration modes Online and Offline. + * Get the migrationMode property: Mode used to perform the migration: Online or Offline. * * @return the migrationMode value. */ @@ -221,18 +223,18 @@ public MigrationMode migrationMode() { } /** - * Set the migrationMode property: There are two types of migration modes Online and Offline. + * Set the migrationMode property: Mode used to perform the migration: Online or Offline. * * @param migrationMode the migrationMode value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withMigrationMode(MigrationMode migrationMode) { + public MigrationProperties withMigrationMode(MigrationMode migrationMode) { this.migrationMode = migrationMode; return this; } /** - * Get the migrationOption property: This indicates the supported Migration option for the migration. + * Get the migrationOption property: Supported option for a migration. * * @return the migrationOption value. */ @@ -241,22 +243,21 @@ public MigrationOption migrationOption() { } /** - * Set the migrationOption property: This indicates the supported Migration option for the migration. + * Set the migrationOption property: Supported option for a migration. * * @param migrationOption the migrationOption value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withMigrationOption(MigrationOption migrationOption) { + public MigrationProperties withMigrationOption(MigrationOption migrationOption) { this.migrationOption = migrationOption; return this; } /** - * Get the sourceType property: migration source server type : OnPremises, AWS, GCP, AzureVM, - * PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, - * EDB_Oracle_Server, EDB_PostgreSQL, PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, - * Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or - * Supabase_PostgreSQL. + * Get the sourceType property: Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, + * AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, + * EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, + * OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL. * * @return the sourceType value. */ @@ -265,23 +266,22 @@ public SourceType sourceType() { } /** - * Set the sourceType property: migration source server type : OnPremises, AWS, GCP, AzureVM, - * PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, - * EDB_Oracle_Server, EDB_PostgreSQL, PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, - * Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or - * Supabase_PostgreSQL. + * Set the sourceType property: Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, + * AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, + * EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, + * OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL. * * @param sourceType the sourceType value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withSourceType(SourceType sourceType) { + public MigrationProperties withSourceType(SourceType sourceType) { this.sourceType = sourceType; return this; } /** - * Get the sslMode property: SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and - * Prefer for other source types. + * Get the sslMode property: SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is + * 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. * * @return the sslMode value. */ @@ -290,19 +290,19 @@ public SslMode sslMode() { } /** - * Set the sslMode property: SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and - * Prefer for other source types. + * Set the sslMode property: SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is + * 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. * * @param sslMode the sslMode value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withSslMode(SslMode sslMode) { + public MigrationProperties withSslMode(SslMode sslMode) { this.sslMode = sslMode; return this; } /** - * Get the sourceDbServerMetadata property: Metadata of the source database server. + * Get the sourceDbServerMetadata property: Metadata of source database server. * * @return the sourceDbServerMetadata value. */ @@ -311,7 +311,7 @@ public DbServerMetadata sourceDbServerMetadata() { } /** - * Get the targetDbServerMetadata property: Metadata of the target database server. + * Get the targetDbServerMetadata property: Metadata of target database server. * * @return the targetDbServerMetadata value. */ @@ -320,8 +320,8 @@ public DbServerMetadata targetDbServerMetadata() { } /** - * Get the sourceDbServerResourceId property: ResourceId of the source database server in case the sourceType is - * PostgreSQLSingleServer. For other source types this should be ipaddress:port@username or + * Get the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or * hostname:port@username. * * @return the sourceDbServerResourceId value. @@ -331,21 +331,22 @@ public String sourceDbServerResourceId() { } /** - * Set the sourceDbServerResourceId property: ResourceId of the source database server in case the sourceType is - * PostgreSQLSingleServer. For other source types this should be ipaddress:port@username or + * Set the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or * hostname:port@username. * * @param sourceDbServerResourceId the sourceDbServerResourceId value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withSourceDbServerResourceId(String sourceDbServerResourceId) { + public MigrationProperties withSourceDbServerResourceId(String sourceDbServerResourceId) { this.sourceDbServerResourceId = sourceDbServerResourceId; return this; } /** - * Get the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Get the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @return the sourceDbServerFullyQualifiedDomainName value. */ @@ -354,20 +355,21 @@ public String sourceDbServerFullyQualifiedDomainName() { } /** - * Set the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Set the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @param sourceDbServerFullyQualifiedDomainName the sourceDbServerFullyQualifiedDomainName value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties + public MigrationProperties withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName) { this.sourceDbServerFullyQualifiedDomainName = sourceDbServerFullyQualifiedDomainName; return this; } /** - * Get the targetDbServerResourceId property: ResourceId of the source database server. + * Get the targetDbServerResourceId property: Identifier of the target database server resource. * * @return the targetDbServerResourceId value. */ @@ -376,8 +378,9 @@ public String targetDbServerResourceId() { } /** - * Get the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Get the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @return the targetDbServerFullyQualifiedDomainName value. */ @@ -386,13 +389,14 @@ public String targetDbServerFullyQualifiedDomainName() { } /** - * Set the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Set the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @param targetDbServerFullyQualifiedDomainName the targetDbServerFullyQualifiedDomainName value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties + public MigrationProperties withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName) { this.targetDbServerFullyQualifiedDomainName = targetDbServerFullyQualifiedDomainName; return this; @@ -411,15 +415,15 @@ public MigrationSecretParameters secretParameters() { * Set the secretParameters property: Migration secret parameters. * * @param secretParameters the secretParameters value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withSecretParameters(MigrationSecretParameters secretParameters) { + public MigrationProperties withSecretParameters(MigrationSecretParameters secretParameters) { this.secretParameters = secretParameters; return this; } /** - * Get the dbsToMigrate property: Number of databases to migrate. + * Get the dbsToMigrate property: Names of databases to migrate. * * @return the dbsToMigrate value. */ @@ -428,65 +432,65 @@ public List dbsToMigrate() { } /** - * Set the dbsToMigrate property: Number of databases to migrate. + * Set the dbsToMigrate property: Names of databases to migrate. * * @param dbsToMigrate the dbsToMigrate value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withDbsToMigrate(List dbsToMigrate) { + public MigrationProperties withDbsToMigrate(List dbsToMigrate) { this.dbsToMigrate = dbsToMigrate; return this; } /** - * Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @return the setupLogicalReplicationOnSourceDbIfNeeded value. */ - public LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded() { + public LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded() { return this.setupLogicalReplicationOnSourceDbIfNeeded; } /** - * Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @param setupLogicalReplicationOnSourceDbIfNeeded the setupLogicalReplicationOnSourceDbIfNeeded value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withSetupLogicalReplicationOnSourceDbIfNeeded( - LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded) { + public MigrationProperties withSetupLogicalReplicationOnSourceDbIfNeeded( + LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded) { this.setupLogicalReplicationOnSourceDbIfNeeded = setupLogicalReplicationOnSourceDbIfNeeded; return this; } /** - * Get the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Get the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @return the overwriteDbsInTarget value. */ - public OverwriteDbsInTargetEnum overwriteDbsInTarget() { + public OverwriteDatabasesOnTargetServer overwriteDbsInTarget() { return this.overwriteDbsInTarget; } /** - * Set the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Set the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @param overwriteDbsInTarget the overwriteDbsInTarget value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withOverwriteDbsInTarget(OverwriteDbsInTargetEnum overwriteDbsInTarget) { + public MigrationProperties withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer overwriteDbsInTarget) { this.overwriteDbsInTarget = overwriteDbsInTarget; return this; } /** - * Get the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Get the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @return the migrationWindowStartTimeInUtc value. */ @@ -495,18 +499,18 @@ public OffsetDateTime migrationWindowStartTimeInUtc() { } /** - * Set the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Set the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @param migrationWindowStartTimeInUtc the migrationWindowStartTimeInUtc value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { + public MigrationProperties withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { this.migrationWindowStartTimeInUtc = migrationWindowStartTimeInUtc; return this; } /** - * Get the migrationWindowEndTimeInUtc property: End time in UTC for migration window. + * Get the migrationWindowEndTimeInUtc property: End time (UTC) for migration window. * * @return the migrationWindowEndTimeInUtc value. */ @@ -515,79 +519,79 @@ public OffsetDateTime migrationWindowEndTimeInUtc() { } /** - * Set the migrationWindowEndTimeInUtc property: End time in UTC for migration window. + * Set the migrationWindowEndTimeInUtc property: End time (UTC) for migration window. * * @param migrationWindowEndTimeInUtc the migrationWindowEndTimeInUtc value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withMigrationWindowEndTimeInUtc(OffsetDateTime migrationWindowEndTimeInUtc) { + public MigrationProperties withMigrationWindowEndTimeInUtc(OffsetDateTime migrationWindowEndTimeInUtc) { this.migrationWindowEndTimeInUtc = migrationWindowEndTimeInUtc; return this; } /** - * Get the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Get the migrateRoles property: Indicates if roles and permissions must be migrated. * * @return the migrateRoles value. */ - public MigrateRolesEnum migrateRoles() { + public MigrateRolesAndPermissions migrateRoles() { return this.migrateRoles; } /** - * Set the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Set the migrateRoles property: Indicates if roles and permissions must be migrated. * * @param migrateRoles the migrateRoles value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withMigrateRoles(MigrateRolesEnum migrateRoles) { + public MigrationProperties withMigrateRoles(MigrateRolesAndPermissions migrateRoles) { this.migrateRoles = migrateRoles; return this; } /** - * Get the startDataMigration property: Indicates whether the data migration should start right away. + * Get the startDataMigration property: Indicates if data migration must start right away. * * @return the startDataMigration value. */ - public StartDataMigrationEnum startDataMigration() { + public StartDataMigration startDataMigration() { return this.startDataMigration; } /** - * Set the startDataMigration property: Indicates whether the data migration should start right away. + * Set the startDataMigration property: Indicates if data migration must start right away. * * @param startDataMigration the startDataMigration value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withStartDataMigration(StartDataMigrationEnum startDataMigration) { + public MigrationProperties withStartDataMigration(StartDataMigration startDataMigration) { this.startDataMigration = startDataMigration; return this; } /** - * Get the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Get the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @return the triggerCutover value. */ - public TriggerCutoverEnum triggerCutover() { + public TriggerCutover triggerCutover() { return this.triggerCutover; } /** - * Set the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Set the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @param triggerCutover the triggerCutover value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withTriggerCutover(TriggerCutoverEnum triggerCutover) { + public MigrationProperties withTriggerCutover(TriggerCutover triggerCutover) { this.triggerCutover = triggerCutover; return this; } /** - * Get the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Get the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToTriggerCutoverOn value. */ @@ -596,40 +600,40 @@ public List dbsToTriggerCutoverOn() { } /** - * Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @param dbsToTriggerCutoverOn the dbsToTriggerCutoverOn value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { + public MigrationProperties withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { this.dbsToTriggerCutoverOn = dbsToTriggerCutoverOn; return this; } /** - * Get the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Get the cancel property: Indicates if cancel must be triggered for the entire migration. * * @return the cancel value. */ - public CancelEnum cancel() { + public Cancel cancel() { return this.cancel; } /** - * Set the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Set the cancel property: Indicates if cancel must be triggered for the entire migration. * * @param cancel the cancel value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withCancel(CancelEnum cancel) { + public MigrationProperties withCancel(Cancel cancel) { this.cancel = cancel; return this; } /** - * Get the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Get the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToCancelMigrationOn value. */ @@ -638,13 +642,13 @@ public List dbsToCancelMigrationOn() { } /** - * Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @param dbsToCancelMigrationOn the dbsToCancelMigrationOn value to set. - * @return the MigrationResourceProperties object itself. + * @return the MigrationProperties object itself. */ - public MigrationResourceProperties withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { + public MigrationProperties withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { this.dbsToCancelMigrationOn = dbsToCancelMigrationOn; return this; } @@ -716,89 +720,85 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of MigrationResourceProperties from the JsonReader. + * Reads an instance of MigrationProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of MigrationResourceProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MigrationResourceProperties. + * @return An instance of MigrationProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MigrationProperties. */ - public static MigrationResourceProperties fromJson(JsonReader jsonReader) throws IOException { + public static MigrationProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - MigrationResourceProperties deserializedMigrationResourceProperties = new MigrationResourceProperties(); + MigrationProperties deserializedMigrationProperties = new MigrationProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("migrationId".equals(fieldName)) { - deserializedMigrationResourceProperties.migrationId = reader.getString(); + deserializedMigrationProperties.migrationId = reader.getString(); } else if ("currentStatus".equals(fieldName)) { - deserializedMigrationResourceProperties.currentStatus = MigrationStatus.fromJson(reader); + deserializedMigrationProperties.currentStatus = MigrationStatus.fromJson(reader); } else if ("migrationInstanceResourceId".equals(fieldName)) { - deserializedMigrationResourceProperties.migrationInstanceResourceId = reader.getString(); + deserializedMigrationProperties.migrationInstanceResourceId = reader.getString(); } else if ("migrationMode".equals(fieldName)) { - deserializedMigrationResourceProperties.migrationMode - = MigrationMode.fromString(reader.getString()); + deserializedMigrationProperties.migrationMode = MigrationMode.fromString(reader.getString()); } else if ("migrationOption".equals(fieldName)) { - deserializedMigrationResourceProperties.migrationOption - = MigrationOption.fromString(reader.getString()); + deserializedMigrationProperties.migrationOption = MigrationOption.fromString(reader.getString()); } else if ("sourceType".equals(fieldName)) { - deserializedMigrationResourceProperties.sourceType = SourceType.fromString(reader.getString()); + deserializedMigrationProperties.sourceType = SourceType.fromString(reader.getString()); } else if ("sslMode".equals(fieldName)) { - deserializedMigrationResourceProperties.sslMode = SslMode.fromString(reader.getString()); + deserializedMigrationProperties.sslMode = SslMode.fromString(reader.getString()); } else if ("sourceDbServerMetadata".equals(fieldName)) { - deserializedMigrationResourceProperties.sourceDbServerMetadata = DbServerMetadata.fromJson(reader); + deserializedMigrationProperties.sourceDbServerMetadata = DbServerMetadata.fromJson(reader); } else if ("targetDbServerMetadata".equals(fieldName)) { - deserializedMigrationResourceProperties.targetDbServerMetadata = DbServerMetadata.fromJson(reader); + deserializedMigrationProperties.targetDbServerMetadata = DbServerMetadata.fromJson(reader); } else if ("sourceDbServerResourceId".equals(fieldName)) { - deserializedMigrationResourceProperties.sourceDbServerResourceId = reader.getString(); + deserializedMigrationProperties.sourceDbServerResourceId = reader.getString(); } else if ("sourceDbServerFullyQualifiedDomainName".equals(fieldName)) { - deserializedMigrationResourceProperties.sourceDbServerFullyQualifiedDomainName = reader.getString(); + deserializedMigrationProperties.sourceDbServerFullyQualifiedDomainName = reader.getString(); } else if ("targetDbServerResourceId".equals(fieldName)) { - deserializedMigrationResourceProperties.targetDbServerResourceId = reader.getString(); + deserializedMigrationProperties.targetDbServerResourceId = reader.getString(); } else if ("targetDbServerFullyQualifiedDomainName".equals(fieldName)) { - deserializedMigrationResourceProperties.targetDbServerFullyQualifiedDomainName = reader.getString(); + deserializedMigrationProperties.targetDbServerFullyQualifiedDomainName = reader.getString(); } else if ("secretParameters".equals(fieldName)) { - deserializedMigrationResourceProperties.secretParameters - = MigrationSecretParameters.fromJson(reader); + deserializedMigrationProperties.secretParameters = MigrationSecretParameters.fromJson(reader); } else if ("dbsToMigrate".equals(fieldName)) { List dbsToMigrate = reader.readArray(reader1 -> reader1.getString()); - deserializedMigrationResourceProperties.dbsToMigrate = dbsToMigrate; + deserializedMigrationProperties.dbsToMigrate = dbsToMigrate; } else if ("setupLogicalReplicationOnSourceDbIfNeeded".equals(fieldName)) { - deserializedMigrationResourceProperties.setupLogicalReplicationOnSourceDbIfNeeded - = LogicalReplicationOnSourceDbEnum.fromString(reader.getString()); + deserializedMigrationProperties.setupLogicalReplicationOnSourceDbIfNeeded + = LogicalReplicationOnSourceServer.fromString(reader.getString()); } else if ("overwriteDbsInTarget".equals(fieldName)) { - deserializedMigrationResourceProperties.overwriteDbsInTarget - = OverwriteDbsInTargetEnum.fromString(reader.getString()); + deserializedMigrationProperties.overwriteDbsInTarget + = OverwriteDatabasesOnTargetServer.fromString(reader.getString()); } else if ("migrationWindowStartTimeInUtc".equals(fieldName)) { - deserializedMigrationResourceProperties.migrationWindowStartTimeInUtc = reader + deserializedMigrationProperties.migrationWindowStartTimeInUtc = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("migrationWindowEndTimeInUtc".equals(fieldName)) { - deserializedMigrationResourceProperties.migrationWindowEndTimeInUtc = reader + deserializedMigrationProperties.migrationWindowEndTimeInUtc = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("migrateRoles".equals(fieldName)) { - deserializedMigrationResourceProperties.migrateRoles - = MigrateRolesEnum.fromString(reader.getString()); + deserializedMigrationProperties.migrateRoles + = MigrateRolesAndPermissions.fromString(reader.getString()); } else if ("startDataMigration".equals(fieldName)) { - deserializedMigrationResourceProperties.startDataMigration - = StartDataMigrationEnum.fromString(reader.getString()); + deserializedMigrationProperties.startDataMigration + = StartDataMigration.fromString(reader.getString()); } else if ("triggerCutover".equals(fieldName)) { - deserializedMigrationResourceProperties.triggerCutover - = TriggerCutoverEnum.fromString(reader.getString()); + deserializedMigrationProperties.triggerCutover = TriggerCutover.fromString(reader.getString()); } else if ("dbsToTriggerCutoverOn".equals(fieldName)) { List dbsToTriggerCutoverOn = reader.readArray(reader1 -> reader1.getString()); - deserializedMigrationResourceProperties.dbsToTriggerCutoverOn = dbsToTriggerCutoverOn; + deserializedMigrationProperties.dbsToTriggerCutoverOn = dbsToTriggerCutoverOn; } else if ("cancel".equals(fieldName)) { - deserializedMigrationResourceProperties.cancel = CancelEnum.fromString(reader.getString()); + deserializedMigrationProperties.cancel = Cancel.fromString(reader.getString()); } else if ("dbsToCancelMigrationOn".equals(fieldName)) { List dbsToCancelMigrationOn = reader.readArray(reader1 -> reader1.getString()); - deserializedMigrationResourceProperties.dbsToCancelMigrationOn = dbsToCancelMigrationOn; + deserializedMigrationProperties.dbsToCancelMigrationOn = dbsToCancelMigrationOn; } else { reader.skipChildren(); } } - return deserializedMigrationResourceProperties; + return deserializedMigrationProperties; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourcePropertiesForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationPropertiesForPatch.java similarity index 53% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourcePropertiesForPatch.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationPropertiesForPatch.java index cc06de081e58..d007027b3586 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourcePropertiesForPatch.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationPropertiesForPatch.java @@ -10,112 +10,116 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CancelEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceDbEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Cancel; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceServer; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesAndPermissions; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParameters; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDbsInTargetEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.StartDataMigrationEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TriggerCutoverEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParametersForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDatabasesOnTargetServer; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StartDataMigration; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TriggerCutover; import java.io.IOException; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.List; /** - * Migration resource properties for patch. + * Migration properties. */ @Fluent -public final class MigrationResourcePropertiesForPatch - implements JsonSerializable { +public final class MigrationPropertiesForPatch implements JsonSerializable { /* - * ResourceId of the source database server + * Identifier of the source database server resource, when 'sourceType' is 'PostgreSQLSingleServer'. For other + * source types this must be set to ipaddress:port@username or hostname:port@username. */ private String sourceDbServerResourceId; /* - * Source server fully qualified domain name (FQDN) or IP address. It is a optional value, if customer provide it, - * migration service will always use it for connection + * Fully qualified domain name (FQDN) or IP address of the source server. This property is optional. When provided, + * the migration service will always use it to connect to the source server. */ private String sourceDbServerFullyQualifiedDomainName; /* - * Target server fully qualified domain name (FQDN) or IP address. It is a optional value, if customer provide it, - * migration service will always use it for connection + * Fully qualified domain name (FQDN) or IP address of the target server. This property is optional. When provided, + * the migration service will always use it to connect to the target server. */ private String targetDbServerFullyQualifiedDomainName; /* - * Migration secret parameters + * Migration secret parameters. */ - private MigrationSecretParameters secretParameters; + private MigrationSecretParametersForPatch secretParameters; /* - * Number of databases to migrate + * Names of databases to migrate. */ private List dbsToMigrate; /* - * Indicates whether to setup LogicalReplicationOnSourceDb, if needed + * Indicates whether to setup logical replication on source server, if needed. */ - private LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded; + private LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded; /* - * Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the - * migration workflow will wait for a confirmation, if it detects that the database already exists. + * Indicates if databases on the target server can be overwritten when already present. If set to 'False', when the + * migration workflow detects that the database already exists on the target server, it will wait for a + * confirmation. */ - private OverwriteDbsInTargetEnum overwriteDbsInTarget; + private OverwriteDatabasesOnTargetServer overwriteDbsInTarget; /* - * Start time in UTC for migration window + * Start time (UTC) for migration window. */ private OffsetDateTime migrationWindowStartTimeInUtc; /* - * To migrate roles and permissions we need to send this flag as True + * Indicates if roles and permissions must be migrated. */ - private MigrateRolesEnum migrateRoles; + private MigrateRolesAndPermissions migrateRoles; /* - * Indicates whether the data migration should start right away + * Indicates if data migration must start right away. */ - private StartDataMigrationEnum startDataMigration; + private StartDataMigration startDataMigration; /* - * To trigger cutover for entire migration we need to send this flag as True + * Indicates if cutover must be triggered for the entire migration. */ - private TriggerCutoverEnum triggerCutover; + private TriggerCutover triggerCutover; /* - * When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in - * this array + * When you want to trigger cutover for specific databases set 'triggerCutover' to 'True' and the names of the + * specific databases in this array. */ private List dbsToTriggerCutoverOn; /* - * To trigger cancel for entire migration we need to send this flag as True + * Indicates if cancel must be triggered for the entire migration. */ - private CancelEnum cancel; + private Cancel cancel; /* - * When you want to trigger cancel for specific databases send cancel flag as True and database names in this array + * When you want to trigger cancel for specific databases set 'triggerCutover' to 'True' and the names of the + * specific databases in this array. */ private List dbsToCancelMigrationOn; /* - * There are two types of migration modes Online and Offline + * Mode used to perform the migration: Online or Offline. */ private MigrationMode migrationMode; /** - * Creates an instance of MigrationResourcePropertiesForPatch class. + * Creates an instance of MigrationPropertiesForPatch class. */ - public MigrationResourcePropertiesForPatch() { + public MigrationPropertiesForPatch() { } /** - * Get the sourceDbServerResourceId property: ResourceId of the source database server. + * Get the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or + * hostname:port@username. * * @return the sourceDbServerResourceId value. */ @@ -124,19 +128,22 @@ public String sourceDbServerResourceId() { } /** - * Set the sourceDbServerResourceId property: ResourceId of the source database server. + * Set the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or + * hostname:port@username. * * @param sourceDbServerResourceId the sourceDbServerResourceId value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withSourceDbServerResourceId(String sourceDbServerResourceId) { + public MigrationPropertiesForPatch withSourceDbServerResourceId(String sourceDbServerResourceId) { this.sourceDbServerResourceId = sourceDbServerResourceId; return this; } /** - * Get the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Get the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @return the sourceDbServerFullyQualifiedDomainName value. */ @@ -145,21 +152,23 @@ public String sourceDbServerFullyQualifiedDomainName() { } /** - * Set the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Set the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @param sourceDbServerFullyQualifiedDomainName the sourceDbServerFullyQualifiedDomainName value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch + public MigrationPropertiesForPatch withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName) { this.sourceDbServerFullyQualifiedDomainName = sourceDbServerFullyQualifiedDomainName; return this; } /** - * Get the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Get the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @return the targetDbServerFullyQualifiedDomainName value. */ @@ -168,13 +177,14 @@ public String targetDbServerFullyQualifiedDomainName() { } /** - * Set the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Set the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @param targetDbServerFullyQualifiedDomainName the targetDbServerFullyQualifiedDomainName value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch + public MigrationPropertiesForPatch withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName) { this.targetDbServerFullyQualifiedDomainName = targetDbServerFullyQualifiedDomainName; return this; @@ -185,7 +195,7 @@ public String targetDbServerFullyQualifiedDomainName() { * * @return the secretParameters value. */ - public MigrationSecretParameters secretParameters() { + public MigrationSecretParametersForPatch secretParameters() { return this.secretParameters; } @@ -193,15 +203,15 @@ public MigrationSecretParameters secretParameters() { * Set the secretParameters property: Migration secret parameters. * * @param secretParameters the secretParameters value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withSecretParameters(MigrationSecretParameters secretParameters) { + public MigrationPropertiesForPatch withSecretParameters(MigrationSecretParametersForPatch secretParameters) { this.secretParameters = secretParameters; return this; } /** - * Get the dbsToMigrate property: Number of databases to migrate. + * Get the dbsToMigrate property: Names of databases to migrate. * * @return the dbsToMigrate value. */ @@ -210,65 +220,65 @@ public List dbsToMigrate() { } /** - * Set the dbsToMigrate property: Number of databases to migrate. + * Set the dbsToMigrate property: Names of databases to migrate. * * @param dbsToMigrate the dbsToMigrate value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withDbsToMigrate(List dbsToMigrate) { + public MigrationPropertiesForPatch withDbsToMigrate(List dbsToMigrate) { this.dbsToMigrate = dbsToMigrate; return this; } /** - * Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @return the setupLogicalReplicationOnSourceDbIfNeeded value. */ - public LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded() { + public LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded() { return this.setupLogicalReplicationOnSourceDbIfNeeded; } /** - * Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @param setupLogicalReplicationOnSourceDbIfNeeded the setupLogicalReplicationOnSourceDbIfNeeded value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withSetupLogicalReplicationOnSourceDbIfNeeded( - LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded) { + public MigrationPropertiesForPatch withSetupLogicalReplicationOnSourceDbIfNeeded( + LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded) { this.setupLogicalReplicationOnSourceDbIfNeeded = setupLogicalReplicationOnSourceDbIfNeeded; return this; } /** - * Get the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Get the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @return the overwriteDbsInTarget value. */ - public OverwriteDbsInTargetEnum overwriteDbsInTarget() { + public OverwriteDatabasesOnTargetServer overwriteDbsInTarget() { return this.overwriteDbsInTarget; } /** - * Set the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Set the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @param overwriteDbsInTarget the overwriteDbsInTarget value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withOverwriteDbsInTarget(OverwriteDbsInTargetEnum overwriteDbsInTarget) { + public MigrationPropertiesForPatch withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer overwriteDbsInTarget) { this.overwriteDbsInTarget = overwriteDbsInTarget; return this; } /** - * Get the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Get the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @return the migrationWindowStartTimeInUtc value. */ @@ -277,80 +287,79 @@ public OffsetDateTime migrationWindowStartTimeInUtc() { } /** - * Set the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Set the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @param migrationWindowStartTimeInUtc the migrationWindowStartTimeInUtc value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch - withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { + public MigrationPropertiesForPatch withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { this.migrationWindowStartTimeInUtc = migrationWindowStartTimeInUtc; return this; } /** - * Get the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Get the migrateRoles property: Indicates if roles and permissions must be migrated. * * @return the migrateRoles value. */ - public MigrateRolesEnum migrateRoles() { + public MigrateRolesAndPermissions migrateRoles() { return this.migrateRoles; } /** - * Set the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Set the migrateRoles property: Indicates if roles and permissions must be migrated. * * @param migrateRoles the migrateRoles value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withMigrateRoles(MigrateRolesEnum migrateRoles) { + public MigrationPropertiesForPatch withMigrateRoles(MigrateRolesAndPermissions migrateRoles) { this.migrateRoles = migrateRoles; return this; } /** - * Get the startDataMigration property: Indicates whether the data migration should start right away. + * Get the startDataMigration property: Indicates if data migration must start right away. * * @return the startDataMigration value. */ - public StartDataMigrationEnum startDataMigration() { + public StartDataMigration startDataMigration() { return this.startDataMigration; } /** - * Set the startDataMigration property: Indicates whether the data migration should start right away. + * Set the startDataMigration property: Indicates if data migration must start right away. * * @param startDataMigration the startDataMigration value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withStartDataMigration(StartDataMigrationEnum startDataMigration) { + public MigrationPropertiesForPatch withStartDataMigration(StartDataMigration startDataMigration) { this.startDataMigration = startDataMigration; return this; } /** - * Get the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Get the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @return the triggerCutover value. */ - public TriggerCutoverEnum triggerCutover() { + public TriggerCutover triggerCutover() { return this.triggerCutover; } /** - * Set the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Set the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @param triggerCutover the triggerCutover value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withTriggerCutover(TriggerCutoverEnum triggerCutover) { + public MigrationPropertiesForPatch withTriggerCutover(TriggerCutover triggerCutover) { this.triggerCutover = triggerCutover; return this; } /** - * Get the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Get the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToTriggerCutoverOn value. */ @@ -359,40 +368,40 @@ public List dbsToTriggerCutoverOn() { } /** - * Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @param dbsToTriggerCutoverOn the dbsToTriggerCutoverOn value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { + public MigrationPropertiesForPatch withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { this.dbsToTriggerCutoverOn = dbsToTriggerCutoverOn; return this; } /** - * Get the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Get the cancel property: Indicates if cancel must be triggered for the entire migration. * * @return the cancel value. */ - public CancelEnum cancel() { + public Cancel cancel() { return this.cancel; } /** - * Set the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Set the cancel property: Indicates if cancel must be triggered for the entire migration. * * @param cancel the cancel value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withCancel(CancelEnum cancel) { + public MigrationPropertiesForPatch withCancel(Cancel cancel) { this.cancel = cancel; return this; } /** - * Get the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Get the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToCancelMigrationOn value. */ @@ -401,19 +410,19 @@ public List dbsToCancelMigrationOn() { } /** - * Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @param dbsToCancelMigrationOn the dbsToCancelMigrationOn value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { + public MigrationPropertiesForPatch withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { this.dbsToCancelMigrationOn = dbsToCancelMigrationOn; return this; } /** - * Get the migrationMode property: There are two types of migration modes Online and Offline. + * Get the migrationMode property: Mode used to perform the migration: Online or Offline. * * @return the migrationMode value. */ @@ -422,12 +431,12 @@ public MigrationMode migrationMode() { } /** - * Set the migrationMode property: There are two types of migration modes Online and Offline. + * Set the migrationMode property: Mode used to perform the migration: Online or Offline. * * @param migrationMode the migrationMode value to set. - * @return the MigrationResourcePropertiesForPatch object itself. + * @return the MigrationPropertiesForPatch object itself. */ - public MigrationResourcePropertiesForPatch withMigrationMode(MigrationMode migrationMode) { + public MigrationPropertiesForPatch withMigrationMode(MigrationMode migrationMode) { this.migrationMode = migrationMode; return this; } @@ -481,70 +490,67 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of MigrationResourcePropertiesForPatch from the JsonReader. + * Reads an instance of MigrationPropertiesForPatch from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of MigrationResourcePropertiesForPatch if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MigrationResourcePropertiesForPatch. + * @return An instance of MigrationPropertiesForPatch if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MigrationPropertiesForPatch. */ - public static MigrationResourcePropertiesForPatch fromJson(JsonReader jsonReader) throws IOException { + public static MigrationPropertiesForPatch fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - MigrationResourcePropertiesForPatch deserializedMigrationResourcePropertiesForPatch - = new MigrationResourcePropertiesForPatch(); + MigrationPropertiesForPatch deserializedMigrationPropertiesForPatch = new MigrationPropertiesForPatch(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("sourceDbServerResourceId".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.sourceDbServerResourceId = reader.getString(); + deserializedMigrationPropertiesForPatch.sourceDbServerResourceId = reader.getString(); } else if ("sourceDbServerFullyQualifiedDomainName".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.sourceDbServerFullyQualifiedDomainName - = reader.getString(); + deserializedMigrationPropertiesForPatch.sourceDbServerFullyQualifiedDomainName = reader.getString(); } else if ("targetDbServerFullyQualifiedDomainName".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.targetDbServerFullyQualifiedDomainName - = reader.getString(); + deserializedMigrationPropertiesForPatch.targetDbServerFullyQualifiedDomainName = reader.getString(); } else if ("secretParameters".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.secretParameters - = MigrationSecretParameters.fromJson(reader); + deserializedMigrationPropertiesForPatch.secretParameters + = MigrationSecretParametersForPatch.fromJson(reader); } else if ("dbsToMigrate".equals(fieldName)) { List dbsToMigrate = reader.readArray(reader1 -> reader1.getString()); - deserializedMigrationResourcePropertiesForPatch.dbsToMigrate = dbsToMigrate; + deserializedMigrationPropertiesForPatch.dbsToMigrate = dbsToMigrate; } else if ("setupLogicalReplicationOnSourceDbIfNeeded".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.setupLogicalReplicationOnSourceDbIfNeeded - = LogicalReplicationOnSourceDbEnum.fromString(reader.getString()); + deserializedMigrationPropertiesForPatch.setupLogicalReplicationOnSourceDbIfNeeded + = LogicalReplicationOnSourceServer.fromString(reader.getString()); } else if ("overwriteDbsInTarget".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.overwriteDbsInTarget - = OverwriteDbsInTargetEnum.fromString(reader.getString()); + deserializedMigrationPropertiesForPatch.overwriteDbsInTarget + = OverwriteDatabasesOnTargetServer.fromString(reader.getString()); } else if ("migrationWindowStartTimeInUtc".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.migrationWindowStartTimeInUtc = reader + deserializedMigrationPropertiesForPatch.migrationWindowStartTimeInUtc = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("migrateRoles".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.migrateRoles - = MigrateRolesEnum.fromString(reader.getString()); + deserializedMigrationPropertiesForPatch.migrateRoles + = MigrateRolesAndPermissions.fromString(reader.getString()); } else if ("startDataMigration".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.startDataMigration - = StartDataMigrationEnum.fromString(reader.getString()); + deserializedMigrationPropertiesForPatch.startDataMigration + = StartDataMigration.fromString(reader.getString()); } else if ("triggerCutover".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.triggerCutover - = TriggerCutoverEnum.fromString(reader.getString()); + deserializedMigrationPropertiesForPatch.triggerCutover + = TriggerCutover.fromString(reader.getString()); } else if ("dbsToTriggerCutoverOn".equals(fieldName)) { List dbsToTriggerCutoverOn = reader.readArray(reader1 -> reader1.getString()); - deserializedMigrationResourcePropertiesForPatch.dbsToTriggerCutoverOn = dbsToTriggerCutoverOn; + deserializedMigrationPropertiesForPatch.dbsToTriggerCutoverOn = dbsToTriggerCutoverOn; } else if ("cancel".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.cancel = CancelEnum.fromString(reader.getString()); + deserializedMigrationPropertiesForPatch.cancel = Cancel.fromString(reader.getString()); } else if ("dbsToCancelMigrationOn".equals(fieldName)) { List dbsToCancelMigrationOn = reader.readArray(reader1 -> reader1.getString()); - deserializedMigrationResourcePropertiesForPatch.dbsToCancelMigrationOn = dbsToCancelMigrationOn; + deserializedMigrationPropertiesForPatch.dbsToCancelMigrationOn = dbsToCancelMigrationOn; } else if ("migrationMode".equals(fieldName)) { - deserializedMigrationResourcePropertiesForPatch.migrationMode + deserializedMigrationPropertiesForPatch.migrationMode = MigrationMode.fromString(reader.getString()); } else { reader.skipChildren(); } } - return deserializedMigrationResourcePropertiesForPatch; + return deserializedMigrationPropertiesForPatch; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityModelInner.java similarity index 58% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityModelInner.java index 79b7c74de662..28e549e74dc0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityModelInner.java @@ -13,28 +13,29 @@ import java.io.IOException; /** - * Represents a resource name availability. + * Availability of a name. */ @Fluent -public final class NameAvailabilityInner extends CheckNameAvailabilityResponse { +public final class NameAvailabilityModelInner extends CheckNameAvailabilityResponse { /* - * name of the PostgreSQL server. + * Name for which validity and availability was checked. */ private String name; /* - * type of the server + * Type of resource. It can be 'Microsoft.DBforPostgreSQL/flexibleServers' or + * 'Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints'. */ private String type; /** - * Creates an instance of NameAvailabilityInner class. + * Creates an instance of NameAvailabilityModelInner class. */ - public NameAvailabilityInner() { + public NameAvailabilityModelInner() { } /** - * Get the name property: name of the PostgreSQL server. + * Get the name property: Name for which validity and availability was checked. * * @return the name value. */ @@ -43,7 +44,8 @@ public String name() { } /** - * Get the type property: type of the server. + * Get the type property: Type of resource. It can be 'Microsoft.DBforPostgreSQL/flexibleServers' or + * 'Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints'. * * @return the type value. */ @@ -55,7 +57,7 @@ public String type() { * {@inheritDoc} */ @Override - public NameAvailabilityInner withNameAvailable(Boolean nameAvailable) { + public NameAvailabilityModelInner withNameAvailable(Boolean nameAvailable) { super.withNameAvailable(nameAvailable); return this; } @@ -64,7 +66,7 @@ public NameAvailabilityInner withNameAvailable(Boolean nameAvailable) { * {@inheritDoc} */ @Override - public NameAvailabilityInner withReason(CheckNameAvailabilityReason reason) { + public NameAvailabilityModelInner withReason(CheckNameAvailabilityReason reason) { super.withReason(reason); return this; } @@ -73,7 +75,7 @@ public NameAvailabilityInner withReason(CheckNameAvailabilityReason reason) { * {@inheritDoc} */ @Override - public NameAvailabilityInner withMessage(String message) { + public NameAvailabilityModelInner withMessage(String message) { super.withMessage(message); return this; } @@ -100,37 +102,38 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of NameAvailabilityInner from the JsonReader. + * Reads an instance of NameAvailabilityModelInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of NameAvailabilityInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the NameAvailabilityInner. + * @return An instance of NameAvailabilityModelInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NameAvailabilityModelInner. */ - public static NameAvailabilityInner fromJson(JsonReader jsonReader) throws IOException { + public static NameAvailabilityModelInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - NameAvailabilityInner deserializedNameAvailabilityInner = new NameAvailabilityInner(); + NameAvailabilityModelInner deserializedNameAvailabilityModelInner = new NameAvailabilityModelInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("nameAvailable".equals(fieldName)) { - deserializedNameAvailabilityInner.withNameAvailable(reader.getNullable(JsonReader::getBoolean)); + deserializedNameAvailabilityModelInner + .withNameAvailable(reader.getNullable(JsonReader::getBoolean)); } else if ("reason".equals(fieldName)) { - deserializedNameAvailabilityInner + deserializedNameAvailabilityModelInner .withReason(CheckNameAvailabilityReason.fromString(reader.getString())); } else if ("message".equals(fieldName)) { - deserializedNameAvailabilityInner.withMessage(reader.getString()); + deserializedNameAvailabilityModelInner.withMessage(reader.getString()); } else if ("name".equals(fieldName)) { - deserializedNameAvailabilityInner.name = reader.getString(); + deserializedNameAvailabilityModelInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedNameAvailabilityInner.type = reader.getString(); + deserializedNameAvailabilityModelInner.type = reader.getString(); } else { reader.skipChildren(); } } - return deserializedNameAvailabilityInner; + return deserializedNameAvailabilityModelInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationInner.java new file mode 100644 index 000000000000..4e5d34938ce7 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationInner.java @@ -0,0 +1,289 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ImpactRecord; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesAnalyzedWorkload; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesImplementationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeEnum; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Object recommendation properties. + */ +@Fluent +public final class ObjectRecommendationInner extends ProxyResource { + /* + * Always empty. + */ + private String kind; + + /* + * Properties of an object recommendation. + */ + private ObjectRecommendationProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ObjectRecommendationInner class. + */ + public ObjectRecommendationInner() { + } + + /** + * Get the kind property: Always empty. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Always empty. + * + * @param kind the kind value to set. + * @return the ObjectRecommendationInner object itself. + */ + public ObjectRecommendationInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the innerProperties property: Properties of an object recommendation. + * + * @return the innerProperties value. + */ + private ObjectRecommendationProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the initialRecommendedTime property: Creation time (UTC) of this recommendation. + * + * @return the initialRecommendedTime value. + */ + public OffsetDateTime initialRecommendedTime() { + return this.innerProperties() == null ? null : this.innerProperties().initialRecommendedTime(); + } + + /** + * Get the lastRecommendedTime property: Last time (UTC) that this recommendation was produced. + * + * @return the lastRecommendedTime value. + */ + public OffsetDateTime lastRecommendedTime() { + return this.innerProperties() == null ? null : this.innerProperties().lastRecommendedTime(); + } + + /** + * Get the timesRecommended property: Number of times this recommendation has been produced. + * + * @return the timesRecommended value. + */ + public Integer timesRecommended() { + return this.innerProperties() == null ? null : this.innerProperties().timesRecommended(); + } + + /** + * Get the improvedQueryIds property: List of identifiers for all queries identified as targets for improvement if + * the recommendation is applied. The list is only populated for CREATE INDEX recommendations. + * + * @return the improvedQueryIds value. + */ + public List improvedQueryIds() { + return this.innerProperties() == null ? null : this.innerProperties().improvedQueryIds(); + } + + /** + * Get the recommendationReason property: Reason for this recommendation. + * + * @return the recommendationReason value. + */ + public String recommendationReason() { + return this.innerProperties() == null ? null : this.innerProperties().recommendationReason(); + } + + /** + * Get the currentState property: Current state. + * + * @return the currentState value. + */ + public String currentState() { + return this.innerProperties() == null ? null : this.innerProperties().currentState(); + } + + /** + * Get the recommendationType property: Type for this recommendation. + * + * @return the recommendationType value. + */ + public RecommendationTypeEnum recommendationType() { + return this.innerProperties() == null ? null : this.innerProperties().recommendationType(); + } + + /** + * Get the implementationDetails property: Implementation details for the recommended action. + * + * @return the implementationDetails value. + */ + public ObjectRecommendationPropertiesImplementationDetails implementationDetails() { + return this.innerProperties() == null ? null : this.innerProperties().implementationDetails(); + } + + /** + * Get the analyzedWorkload property: Workload information for the recommended action. + * + * @return the analyzedWorkload value. + */ + public ObjectRecommendationPropertiesAnalyzedWorkload analyzedWorkload() { + return this.innerProperties() == null ? null : this.innerProperties().analyzedWorkload(); + } + + /** + * Get the estimatedImpact property: Estimated impact of this recommended action. + * + * @return the estimatedImpact value. + */ + public List estimatedImpact() { + return this.innerProperties() == null ? null : this.innerProperties().estimatedImpact(); + } + + /** + * Get the details property: Recommendation details for the recommended action. + * + * @return the details value. + */ + public ObjectRecommendationDetails details() { + return this.innerProperties() == null ? null : this.innerProperties().details(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ObjectRecommendationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ObjectRecommendationInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ObjectRecommendationInner. + */ + public static ObjectRecommendationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ObjectRecommendationInner deserializedObjectRecommendationInner = new ObjectRecommendationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedObjectRecommendationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedObjectRecommendationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedObjectRecommendationInner.type = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedObjectRecommendationInner.kind = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedObjectRecommendationInner.innerProperties + = ObjectRecommendationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedObjectRecommendationInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedObjectRecommendationInner; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/IndexRecommendationResourceProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationProperties.java similarity index 55% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/IndexRecommendationResourceProperties.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationProperties.java index 1fdf9109ebe6..44b677e06031 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/IndexRecommendationResourceProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationProperties.java @@ -11,9 +11,9 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.postgresqlflexibleserver.models.ImpactRecord; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationDetails; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResourcePropertiesAnalyzedWorkload; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResourcePropertiesImplementationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesAnalyzedWorkload; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesImplementationDetails; import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeEnum; import java.io.IOException; import java.time.OffsetDateTime; @@ -21,28 +21,28 @@ import java.util.List; /** - * Index recommendation properties. + * Object recommendation properties. */ @Fluent -public final class IndexRecommendationResourceProperties - implements JsonSerializable { +public final class ObjectRecommendationProperties implements JsonSerializable { /* - * Creation time of this recommendation in UTC date-time string format. + * Creation time (UTC) of this recommendation. */ private OffsetDateTime initialRecommendedTime; /* - * The last refresh of this recommendation in UTC date-time string format. + * Last time (UTC) that this recommendation was produced. */ private OffsetDateTime lastRecommendedTime; /* - * The number of times this recommendation has encountered. + * Number of times this recommendation has been produced. */ private Integer timesRecommended; /* - * The ImprovedQueryIds. The list will only be populated for CREATE INDEX recommendations. + * List of identifiers for all queries identified as targets for improvement if the recommendation is applied. The + * list is only populated for CREATE INDEX recommendations. */ private List improvedQueryIds; @@ -51,39 +51,44 @@ public final class IndexRecommendationResourceProperties */ private String recommendationReason; + /* + * Current state. + */ + private String currentState; + /* * Type for this recommendation. */ private RecommendationTypeEnum recommendationType; /* - * Stores implementation details for the recommended action. + * Implementation details for the recommended action. */ - private IndexRecommendationResourcePropertiesImplementationDetails implementationDetails; + private ObjectRecommendationPropertiesImplementationDetails implementationDetails; /* - * Stores workload information for the recommended action. + * Workload information for the recommended action. */ - private IndexRecommendationResourcePropertiesAnalyzedWorkload analyzedWorkload; + private ObjectRecommendationPropertiesAnalyzedWorkload analyzedWorkload; /* - * The estimated impact of this recommended action + * Estimated impact of this recommended action. */ private List estimatedImpact; /* - * Stores recommendation details for the recommended action. + * Recommendation details for the recommended action. */ - private IndexRecommendationDetails details; + private ObjectRecommendationDetails details; /** - * Creates an instance of IndexRecommendationResourceProperties class. + * Creates an instance of ObjectRecommendationProperties class. */ - public IndexRecommendationResourceProperties() { + public ObjectRecommendationProperties() { } /** - * Get the initialRecommendedTime property: Creation time of this recommendation in UTC date-time string format. + * Get the initialRecommendedTime property: Creation time (UTC) of this recommendation. * * @return the initialRecommendedTime value. */ @@ -92,18 +97,18 @@ public OffsetDateTime initialRecommendedTime() { } /** - * Set the initialRecommendedTime property: Creation time of this recommendation in UTC date-time string format. + * Set the initialRecommendedTime property: Creation time (UTC) of this recommendation. * * @param initialRecommendedTime the initialRecommendedTime value to set. - * @return the IndexRecommendationResourceProperties object itself. + * @return the ObjectRecommendationProperties object itself. */ - public IndexRecommendationResourceProperties withInitialRecommendedTime(OffsetDateTime initialRecommendedTime) { + public ObjectRecommendationProperties withInitialRecommendedTime(OffsetDateTime initialRecommendedTime) { this.initialRecommendedTime = initialRecommendedTime; return this; } /** - * Get the lastRecommendedTime property: The last refresh of this recommendation in UTC date-time string format. + * Get the lastRecommendedTime property: Last time (UTC) that this recommendation was produced. * * @return the lastRecommendedTime value. */ @@ -112,18 +117,18 @@ public OffsetDateTime lastRecommendedTime() { } /** - * Set the lastRecommendedTime property: The last refresh of this recommendation in UTC date-time string format. + * Set the lastRecommendedTime property: Last time (UTC) that this recommendation was produced. * * @param lastRecommendedTime the lastRecommendedTime value to set. - * @return the IndexRecommendationResourceProperties object itself. + * @return the ObjectRecommendationProperties object itself. */ - public IndexRecommendationResourceProperties withLastRecommendedTime(OffsetDateTime lastRecommendedTime) { + public ObjectRecommendationProperties withLastRecommendedTime(OffsetDateTime lastRecommendedTime) { this.lastRecommendedTime = lastRecommendedTime; return this; } /** - * Get the timesRecommended property: The number of times this recommendation has encountered. + * Get the timesRecommended property: Number of times this recommendation has been produced. * * @return the timesRecommended value. */ @@ -132,19 +137,19 @@ public Integer timesRecommended() { } /** - * Set the timesRecommended property: The number of times this recommendation has encountered. + * Set the timesRecommended property: Number of times this recommendation has been produced. * * @param timesRecommended the timesRecommended value to set. - * @return the IndexRecommendationResourceProperties object itself. + * @return the ObjectRecommendationProperties object itself. */ - public IndexRecommendationResourceProperties withTimesRecommended(Integer timesRecommended) { + public ObjectRecommendationProperties withTimesRecommended(Integer timesRecommended) { this.timesRecommended = timesRecommended; return this; } /** - * Get the improvedQueryIds property: The ImprovedQueryIds. The list will only be populated for CREATE INDEX - * recommendations. + * Get the improvedQueryIds property: List of identifiers for all queries identified as targets for improvement if + * the recommendation is applied. The list is only populated for CREATE INDEX recommendations. * * @return the improvedQueryIds value. */ @@ -153,13 +158,13 @@ public List improvedQueryIds() { } /** - * Set the improvedQueryIds property: The ImprovedQueryIds. The list will only be populated for CREATE INDEX - * recommendations. + * Set the improvedQueryIds property: List of identifiers for all queries identified as targets for improvement if + * the recommendation is applied. The list is only populated for CREATE INDEX recommendations. * * @param improvedQueryIds the improvedQueryIds value to set. - * @return the IndexRecommendationResourceProperties object itself. + * @return the ObjectRecommendationProperties object itself. */ - public IndexRecommendationResourceProperties withImprovedQueryIds(List improvedQueryIds) { + public ObjectRecommendationProperties withImprovedQueryIds(List improvedQueryIds) { this.improvedQueryIds = improvedQueryIds; return this; } @@ -177,13 +182,33 @@ public String recommendationReason() { * Set the recommendationReason property: Reason for this recommendation. * * @param recommendationReason the recommendationReason value to set. - * @return the IndexRecommendationResourceProperties object itself. + * @return the ObjectRecommendationProperties object itself. */ - public IndexRecommendationResourceProperties withRecommendationReason(String recommendationReason) { + public ObjectRecommendationProperties withRecommendationReason(String recommendationReason) { this.recommendationReason = recommendationReason; return this; } + /** + * Get the currentState property: Current state. + * + * @return the currentState value. + */ + public String currentState() { + return this.currentState; + } + + /** + * Set the currentState property: Current state. + * + * @param currentState the currentState value to set. + * @return the ObjectRecommendationProperties object itself. + */ + public ObjectRecommendationProperties withCurrentState(String currentState) { + this.currentState = currentState; + return this; + } + /** * Get the recommendationType property: Type for this recommendation. * @@ -197,57 +222,57 @@ public RecommendationTypeEnum recommendationType() { * Set the recommendationType property: Type for this recommendation. * * @param recommendationType the recommendationType value to set. - * @return the IndexRecommendationResourceProperties object itself. + * @return the ObjectRecommendationProperties object itself. */ - public IndexRecommendationResourceProperties withRecommendationType(RecommendationTypeEnum recommendationType) { + public ObjectRecommendationProperties withRecommendationType(RecommendationTypeEnum recommendationType) { this.recommendationType = recommendationType; return this; } /** - * Get the implementationDetails property: Stores implementation details for the recommended action. + * Get the implementationDetails property: Implementation details for the recommended action. * * @return the implementationDetails value. */ - public IndexRecommendationResourcePropertiesImplementationDetails implementationDetails() { + public ObjectRecommendationPropertiesImplementationDetails implementationDetails() { return this.implementationDetails; } /** - * Set the implementationDetails property: Stores implementation details for the recommended action. + * Set the implementationDetails property: Implementation details for the recommended action. * * @param implementationDetails the implementationDetails value to set. - * @return the IndexRecommendationResourceProperties object itself. + * @return the ObjectRecommendationProperties object itself. */ - public IndexRecommendationResourceProperties - withImplementationDetails(IndexRecommendationResourcePropertiesImplementationDetails implementationDetails) { + public ObjectRecommendationProperties + withImplementationDetails(ObjectRecommendationPropertiesImplementationDetails implementationDetails) { this.implementationDetails = implementationDetails; return this; } /** - * Get the analyzedWorkload property: Stores workload information for the recommended action. + * Get the analyzedWorkload property: Workload information for the recommended action. * * @return the analyzedWorkload value. */ - public IndexRecommendationResourcePropertiesAnalyzedWorkload analyzedWorkload() { + public ObjectRecommendationPropertiesAnalyzedWorkload analyzedWorkload() { return this.analyzedWorkload; } /** - * Set the analyzedWorkload property: Stores workload information for the recommended action. + * Set the analyzedWorkload property: Workload information for the recommended action. * * @param analyzedWorkload the analyzedWorkload value to set. - * @return the IndexRecommendationResourceProperties object itself. + * @return the ObjectRecommendationProperties object itself. */ - public IndexRecommendationResourceProperties - withAnalyzedWorkload(IndexRecommendationResourcePropertiesAnalyzedWorkload analyzedWorkload) { + public ObjectRecommendationProperties + withAnalyzedWorkload(ObjectRecommendationPropertiesAnalyzedWorkload analyzedWorkload) { this.analyzedWorkload = analyzedWorkload; return this; } /** - * Get the estimatedImpact property: The estimated impact of this recommended action. + * Get the estimatedImpact property: Estimated impact of this recommended action. * * @return the estimatedImpact value. */ @@ -256,11 +281,11 @@ public List estimatedImpact() { } /** - * Get the details property: Stores recommendation details for the recommended action. + * Get the details property: Recommendation details for the recommended action. * * @return the details value. */ - public IndexRecommendationDetails details() { + public ObjectRecommendationDetails details() { return this.details; } @@ -302,6 +327,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("improvedQueryIds", this.improvedQueryIds, (writer, element) -> writer.writeLong(element)); jsonWriter.writeStringField("recommendationReason", this.recommendationReason); + jsonWriter.writeStringField("currentState", this.currentState); jsonWriter.writeStringField("recommendationType", this.recommendationType == null ? null : this.recommendationType.toString()); jsonWriter.writeJsonField("implementationDetails", this.implementationDetails); @@ -310,56 +336,57 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of IndexRecommendationResourceProperties from the JsonReader. + * Reads an instance of ObjectRecommendationProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of IndexRecommendationResourceProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IndexRecommendationResourceProperties. + * @return An instance of ObjectRecommendationProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ObjectRecommendationProperties. */ - public static IndexRecommendationResourceProperties fromJson(JsonReader jsonReader) throws IOException { + public static ObjectRecommendationProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - IndexRecommendationResourceProperties deserializedIndexRecommendationResourceProperties - = new IndexRecommendationResourceProperties(); + ObjectRecommendationProperties deserializedObjectRecommendationProperties + = new ObjectRecommendationProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("initialRecommendedTime".equals(fieldName)) { - deserializedIndexRecommendationResourceProperties.initialRecommendedTime = reader + deserializedObjectRecommendationProperties.initialRecommendedTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("lastRecommendedTime".equals(fieldName)) { - deserializedIndexRecommendationResourceProperties.lastRecommendedTime = reader + deserializedObjectRecommendationProperties.lastRecommendedTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("timesRecommended".equals(fieldName)) { - deserializedIndexRecommendationResourceProperties.timesRecommended + deserializedObjectRecommendationProperties.timesRecommended = reader.getNullable(JsonReader::getInt); } else if ("improvedQueryIds".equals(fieldName)) { List improvedQueryIds = reader.readArray(reader1 -> reader1.getLong()); - deserializedIndexRecommendationResourceProperties.improvedQueryIds = improvedQueryIds; + deserializedObjectRecommendationProperties.improvedQueryIds = improvedQueryIds; } else if ("recommendationReason".equals(fieldName)) { - deserializedIndexRecommendationResourceProperties.recommendationReason = reader.getString(); + deserializedObjectRecommendationProperties.recommendationReason = reader.getString(); + } else if ("currentState".equals(fieldName)) { + deserializedObjectRecommendationProperties.currentState = reader.getString(); } else if ("recommendationType".equals(fieldName)) { - deserializedIndexRecommendationResourceProperties.recommendationType + deserializedObjectRecommendationProperties.recommendationType = RecommendationTypeEnum.fromString(reader.getString()); } else if ("implementationDetails".equals(fieldName)) { - deserializedIndexRecommendationResourceProperties.implementationDetails - = IndexRecommendationResourcePropertiesImplementationDetails.fromJson(reader); + deserializedObjectRecommendationProperties.implementationDetails + = ObjectRecommendationPropertiesImplementationDetails.fromJson(reader); } else if ("analyzedWorkload".equals(fieldName)) { - deserializedIndexRecommendationResourceProperties.analyzedWorkload - = IndexRecommendationResourcePropertiesAnalyzedWorkload.fromJson(reader); + deserializedObjectRecommendationProperties.analyzedWorkload + = ObjectRecommendationPropertiesAnalyzedWorkload.fromJson(reader); } else if ("estimatedImpact".equals(fieldName)) { List estimatedImpact = reader.readArray(reader1 -> ImpactRecord.fromJson(reader1)); - deserializedIndexRecommendationResourceProperties.estimatedImpact = estimatedImpact; + deserializedObjectRecommendationProperties.estimatedImpact = estimatedImpact; } else if ("details".equals(fieldName)) { - deserializedIndexRecommendationResourceProperties.details - = IndexRecommendationDetails.fromJson(reader); + deserializedObjectRecommendationProperties.details = ObjectRecommendationDetails.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedIndexRecommendationResourceProperties; + return deserializedObjectRecommendationProperties; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationInner.java index e474c919ac20..9dc4d6666ee2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationInner.java @@ -20,22 +20,22 @@ @Fluent public final class OperationInner implements JsonSerializable { /* - * The name of the operation being performed on this particular object. + * Name of the operation being performed on this particular object. */ private String name; /* - * The localized display information for this particular operation or action. + * Localized display information for this particular operation or action. */ private OperationDisplay display; /* - * Indicates whether the operation is a data action + * Indicates if the operation is a data action. */ private Boolean isDataAction; /* - * The intended executor of the operation. + * Intended executor of the operation. */ private OperationOrigin origin; @@ -51,7 +51,7 @@ public OperationInner() { } /** - * Get the name property: The name of the operation being performed on this particular object. + * Get the name property: Name of the operation being performed on this particular object. * * @return the name value. */ @@ -60,7 +60,7 @@ public String name() { } /** - * Get the display property: The localized display information for this particular operation or action. + * Get the display property: Localized display information for this particular operation or action. * * @return the display value. */ @@ -69,7 +69,7 @@ public OperationDisplay display() { } /** - * Get the isDataAction property: Indicates whether the operation is a data action. + * Get the isDataAction property: Indicates if the operation is a data action. * * @return the isDataAction value. */ @@ -78,7 +78,7 @@ public Boolean isDataAction() { } /** - * Set the isDataAction property: Indicates whether the operation is a data action. + * Set the isDataAction property: Indicates if the operation is a data action. * * @param isDataAction the isDataAction value to set. * @return the OperationInner object itself. @@ -89,7 +89,7 @@ public OperationInner withIsDataAction(Boolean isDataAction) { } /** - * Get the origin property: The intended executor of the operation. + * Get the origin property: Intended executor of the operation. * * @return the origin value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/QuotaUsageInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/QuotaUsageInner.java index 1d4642da1c65..01b158981902 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/QuotaUsageInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/QuotaUsageInner.java @@ -13,12 +13,12 @@ import java.io.IOException; /** - * Quota usage for flexible servers. + * Quota usage for servers. */ @Fluent public final class QuotaUsageInner implements JsonSerializable { /* - * Name of quota usage for flexible servers + * Name of quota usage for servers */ private NameProperty name; @@ -49,7 +49,7 @@ public QuotaUsageInner() { } /** - * Get the name property: Name of quota usage for flexible servers. + * Get the name property: Name of quota usage for servers. * * @return the name value. */ @@ -58,7 +58,7 @@ public NameProperty name() { } /** - * Set the name property: Name of quota usage for flexible servers. + * Set the name property: Name of quota usage for servers. * * @param name the name value to set. * @return the QuotaUsageInner object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerInner.java index fa7f206b7f5e..701e2c5b2eac 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerInner.java @@ -18,10 +18,10 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow; import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Replica; import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationRole; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerState; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; import com.azure.resourcemanager.postgresqlflexibleserver.models.UserAssignedIdentity; @@ -31,22 +31,22 @@ import java.util.Map; /** - * Represents a server. + * Properties of a server. */ @Fluent public final class ServerInner extends Resource { /* - * The SKU (pricing tier) of the server. + * Compute tier and size of a server. */ private Sku sku; /* - * Describes the identity of the application. + * User assigned managed identities assigned to the server. */ private UserAssignedIdentity identity; /* - * Properties of the server. + * Properties of a server. */ private ServerProperties innerProperties; @@ -77,7 +77,7 @@ public ServerInner() { } /** - * Get the sku property: The SKU (pricing tier) of the server. + * Get the sku property: Compute tier and size of a server. * * @return the sku value. */ @@ -86,7 +86,7 @@ public Sku sku() { } /** - * Set the sku property: The SKU (pricing tier) of the server. + * Set the sku property: Compute tier and size of a server. * * @param sku the sku value to set. * @return the ServerInner object itself. @@ -97,7 +97,7 @@ public ServerInner withSku(Sku sku) { } /** - * Get the identity property: Describes the identity of the application. + * Get the identity property: User assigned managed identities assigned to the server. * * @return the identity value. */ @@ -106,7 +106,7 @@ public UserAssignedIdentity identity() { } /** - * Set the identity property: Describes the identity of the application. + * Set the identity property: User assigned managed identities assigned to the server. * * @param identity the identity value to set. * @return the ServerInner object itself. @@ -117,7 +117,7 @@ public ServerInner withIdentity(UserAssignedIdentity identity) { } /** - * Get the innerProperties property: Properties of the server. + * Get the innerProperties property: Properties of a server. * * @return the innerProperties value. */ @@ -183,8 +183,11 @@ public ServerInner withTags(Map tags) { } /** - * Get the administratorLogin property: The administrator's login name of a server. Can only be specified when the - * server is being created (and is required for creation). + * Get the administratorLogin property: Name of the login designated as the first password based administrator + * assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based + * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. + * If you disable password based authentication on a server which had it enabled, this password based role isn't + * deleted. * * @return the administratorLogin value. */ @@ -193,8 +196,11 @@ public String administratorLogin() { } /** - * Set the administratorLogin property: The administrator's login name of a server. Can only be specified when the - * server is being created (and is required for creation). + * Set the administratorLogin property: Name of the login designated as the first password based administrator + * assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based + * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. + * If you disable password based authentication on a server which had it enabled, this password based role isn't + * deleted. * * @param administratorLogin the administratorLogin value to set. * @return the ServerInner object itself. @@ -208,7 +214,8 @@ public ServerInner withAdministratorLogin(String administratorLogin) { } /** - * Get the administratorLoginPassword property: The administrator login password (required for server creation). + * Get the administratorLoginPassword property: Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * * @return the administratorLoginPassword value. */ @@ -217,7 +224,8 @@ public String administratorLoginPassword() { } /** - * Set the administratorLoginPassword property: The administrator login password (required for server creation). + * Set the administratorLoginPassword property: Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ServerInner object itself. @@ -231,21 +239,21 @@ public ServerInner withAdministratorLoginPassword(String administratorLoginPassw } /** - * Get the version property: PostgreSQL Server version. + * Get the version property: Major version of PostgreSQL database engine. * * @return the version value. */ - public ServerVersion version() { + public PostgresMajorVersion version() { return this.innerProperties() == null ? null : this.innerProperties().version(); } /** - * Set the version property: PostgreSQL Server version. + * Set the version property: Major version of PostgreSQL database engine. * * @param version the version value to set. * @return the ServerInner object itself. */ - public ServerInner withVersion(ServerVersion version) { + public ServerInner withVersion(PostgresMajorVersion version) { if (this.innerProperties() == null) { this.innerProperties = new ServerProperties(); } @@ -254,7 +262,7 @@ public ServerInner withVersion(ServerVersion version) { } /** - * Get the minorVersion property: The minor version of the server. + * Get the minorVersion property: Minor version of PostgreSQL database engine. * * @return the minorVersion value. */ @@ -263,7 +271,7 @@ public String minorVersion() { } /** - * Get the state property: A state of a server that is visible to user. + * Get the state property: Possible states of a server. * * @return the state value. */ @@ -272,7 +280,7 @@ public ServerState state() { } /** - * Get the fullyQualifiedDomainName property: The fully qualified domain name of a server. + * Get the fullyQualifiedDomainName property: Fully qualified domain name of a server. * * @return the fullyQualifiedDomainName value. */ @@ -304,7 +312,7 @@ public ServerInner withStorage(Storage storage) { } /** - * Get the authConfig property: AuthConfig properties of a server. + * Get the authConfig property: Authentication configuration properties of a server. * * @return the authConfig value. */ @@ -313,7 +321,7 @@ public AuthConfig authConfig() { } /** - * Set the authConfig property: AuthConfig properties of a server. + * Set the authConfig property: Authentication configuration properties of a server. * * @param authConfig the authConfig value to set. * @return the ServerInner object itself. @@ -373,8 +381,8 @@ public ServerInner withBackup(Backup backup) { } /** - * Get the network property: Network properties of a server. This Network property is required to be passed only in - * case you want the server to be Private access server. + * Get the network property: Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * * @return the network value. */ @@ -383,8 +391,8 @@ public Network network() { } /** - * Set the network property: Network properties of a server. This Network property is required to be passed only in - * case you want the server to be Private access server. + * Set the network property: Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * * @param network the network value to set. * @return the ServerInner object itself. @@ -444,9 +452,9 @@ public ServerInner withMaintenanceWindow(MaintenanceWindow maintenanceWindow) { } /** - * Get the sourceServerResourceId property: The source server resource ID to restore from. It's required when - * 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This property is returned - * only for Replica server. + * Get the sourceServerResourceId property: Identifier of the server to be used as the source of the new server. + * Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or 'ReviveDropped'. This property is + * returned only when the target server is a read replica. * * @return the sourceServerResourceId value. */ @@ -455,9 +463,9 @@ public String sourceServerResourceId() { } /** - * Set the sourceServerResourceId property: The source server resource ID to restore from. It's required when - * 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This property is returned - * only for Replica server. + * Set the sourceServerResourceId property: Identifier of the server to be used as the source of the new server. + * Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or 'ReviveDropped'. This property is + * returned only when the target server is a read replica. * * @param sourceServerResourceId the sourceServerResourceId value to set. * @return the ServerInner object itself. @@ -471,8 +479,8 @@ public ServerInner withSourceServerResourceId(String sourceServerResourceId) { } /** - * Get the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time to restore - * from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'ReviveDropped'. + * Get the pointInTimeUtc property: Creation time (in ISO8601 format) of the backup which you want to restore in the + * new server. It's required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', or 'ReviveDropped'. * * @return the pointInTimeUtc value. */ @@ -481,8 +489,8 @@ public OffsetDateTime pointInTimeUtc() { } /** - * Set the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time to restore - * from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'ReviveDropped'. + * Set the pointInTimeUtc property: Creation time (in ISO8601 format) of the backup which you want to restore in the + * new server. It's required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', or 'ReviveDropped'. * * @param pointInTimeUtc the pointInTimeUtc value to set. * @return the ServerInner object itself. @@ -496,7 +504,7 @@ public ServerInner withPointInTimeUtc(OffsetDateTime pointInTimeUtc) { } /** - * Get the availabilityZone property: availability zone information of the server. + * Get the availabilityZone property: Availability zone of a server. * * @return the availabilityZone value. */ @@ -505,7 +513,7 @@ public String availabilityZone() { } /** - * Set the availabilityZone property: availability zone information of the server. + * Set the availabilityZone property: Availability zone of a server. * * @param availabilityZone the availabilityZone value to set. * @return the ServerInner object itself. @@ -519,7 +527,7 @@ public ServerInner withAvailabilityZone(String availabilityZone) { } /** - * Get the replicationRole property: Replication role of the server. + * Get the replicationRole property: Role of the server in a replication set. * * @return the replicationRole value. */ @@ -528,7 +536,7 @@ public ReplicationRole replicationRole() { } /** - * Set the replicationRole property: Replication role of the server. + * Set the replicationRole property: Role of the server in a replication set. * * @param replicationRole the replicationRole value to set. * @return the ServerInner object itself. @@ -542,7 +550,7 @@ public ServerInner withReplicationRole(ReplicationRole replicationRole) { } /** - * Get the replicaCapacity property: Replicas allowed for a server. + * Get the replicaCapacity property: Maximum number of read replicas allowed for a server. * * @return the replicaCapacity value. */ @@ -551,8 +559,8 @@ public Integer replicaCapacity() { } /** - * Get the replica property: Replica properties of a server. These Replica properties are required to be passed only - * in case you want to Promote a server. + * Get the replica property: Read replica properties of a server. Required only in case that you want to promote a + * server. * * @return the replica value. */ @@ -561,8 +569,8 @@ public Replica replica() { } /** - * Set the replica property: Replica properties of a server. These Replica properties are required to be passed only - * in case you want to Promote a server. + * Set the replica property: Read replica properties of a server. Required only in case that you want to promote a + * server. * * @param replica the replica value to set. * @return the ServerInner object itself. @@ -576,7 +584,7 @@ public ServerInner withReplica(Replica replica) { } /** - * Get the createMode property: The mode to create a new PostgreSQL server. + * Get the createMode property: Creation mode of a new server. * * @return the createMode value. */ @@ -585,7 +593,7 @@ public CreateMode createMode() { } /** - * Set the createMode property: The mode to create a new PostgreSQL server. + * Set the createMode property: Creation mode of a new server. * * @param createMode the createMode value to set. * @return the ServerInner object itself. @@ -600,7 +608,7 @@ public ServerInner withCreateMode(CreateMode createMode) { /** * Get the privateEndpointConnections property: List of private endpoint connections associated with the specified - * resource. + * server. * * @return the privateEndpointConnections value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerProperties.java index d927380c4d66..0bef5b2a3f7d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerProperties.java @@ -18,10 +18,10 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow; import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Replica; import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationRole; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerState; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; import java.io.IOException; import java.time.OffsetDateTime; @@ -29,38 +29,41 @@ import java.util.List; /** - * The properties of a server. + * Properties of a server. */ @Fluent public final class ServerProperties implements JsonSerializable { /* - * The administrator's login name of a server. Can only be specified when the server is being created (and is - * required for creation). + * Name of the login designated as the first password based administrator assigned to your instance of PostgreSQL. + * Must be specified the first time that you enable password based authentication on a server. Once set to a given + * value, it cannot be changed for the rest of the life of a server. If you disable password based authentication on + * a server which had it enabled, this password based role isn't deleted. */ private String administratorLogin; /* - * The administrator login password (required for server creation). + * Password assigned to the administrator login. As long as password authentication is enabled, this password can be + * changed at any time. */ private String administratorLoginPassword; /* - * PostgreSQL Server version. + * Major version of PostgreSQL database engine. */ - private ServerVersion version; + private PostgresMajorVersion version; /* - * The minor version of the server. + * Minor version of PostgreSQL database engine. */ private String minorVersion; /* - * A state of a server that is visible to user. + * Possible states of a server. */ private ServerState state; /* - * The fully qualified domain name of a server. + * Fully qualified domain name of a server. */ private String fullyQualifiedDomainName; @@ -70,7 +73,7 @@ public final class ServerProperties implements JsonSerializable privateEndpointConnections; @@ -155,8 +158,11 @@ public ServerProperties() { } /** - * Get the administratorLogin property: The administrator's login name of a server. Can only be specified when the - * server is being created (and is required for creation). + * Get the administratorLogin property: Name of the login designated as the first password based administrator + * assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based + * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. + * If you disable password based authentication on a server which had it enabled, this password based role isn't + * deleted. * * @return the administratorLogin value. */ @@ -165,8 +171,11 @@ public String administratorLogin() { } /** - * Set the administratorLogin property: The administrator's login name of a server. Can only be specified when the - * server is being created (and is required for creation). + * Set the administratorLogin property: Name of the login designated as the first password based administrator + * assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based + * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. + * If you disable password based authentication on a server which had it enabled, this password based role isn't + * deleted. * * @param administratorLogin the administratorLogin value to set. * @return the ServerProperties object itself. @@ -177,7 +186,8 @@ public ServerProperties withAdministratorLogin(String administratorLogin) { } /** - * Get the administratorLoginPassword property: The administrator login password (required for server creation). + * Get the administratorLoginPassword property: Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * * @return the administratorLoginPassword value. */ @@ -186,7 +196,8 @@ public String administratorLoginPassword() { } /** - * Set the administratorLoginPassword property: The administrator login password (required for server creation). + * Set the administratorLoginPassword property: Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * * @param administratorLoginPassword the administratorLoginPassword value to set. * @return the ServerProperties object itself. @@ -197,27 +208,27 @@ public ServerProperties withAdministratorLoginPassword(String administratorLogin } /** - * Get the version property: PostgreSQL Server version. + * Get the version property: Major version of PostgreSQL database engine. * * @return the version value. */ - public ServerVersion version() { + public PostgresMajorVersion version() { return this.version; } /** - * Set the version property: PostgreSQL Server version. + * Set the version property: Major version of PostgreSQL database engine. * * @param version the version value to set. * @return the ServerProperties object itself. */ - public ServerProperties withVersion(ServerVersion version) { + public ServerProperties withVersion(PostgresMajorVersion version) { this.version = version; return this; } /** - * Get the minorVersion property: The minor version of the server. + * Get the minorVersion property: Minor version of PostgreSQL database engine. * * @return the minorVersion value. */ @@ -226,7 +237,7 @@ public String minorVersion() { } /** - * Get the state property: A state of a server that is visible to user. + * Get the state property: Possible states of a server. * * @return the state value. */ @@ -235,7 +246,7 @@ public ServerState state() { } /** - * Get the fullyQualifiedDomainName property: The fully qualified domain name of a server. + * Get the fullyQualifiedDomainName property: Fully qualified domain name of a server. * * @return the fullyQualifiedDomainName value. */ @@ -264,7 +275,7 @@ public ServerProperties withStorage(Storage storage) { } /** - * Get the authConfig property: AuthConfig properties of a server. + * Get the authConfig property: Authentication configuration properties of a server. * * @return the authConfig value. */ @@ -273,7 +284,7 @@ public AuthConfig authConfig() { } /** - * Set the authConfig property: AuthConfig properties of a server. + * Set the authConfig property: Authentication configuration properties of a server. * * @param authConfig the authConfig value to set. * @return the ServerProperties object itself. @@ -324,8 +335,8 @@ public ServerProperties withBackup(Backup backup) { } /** - * Get the network property: Network properties of a server. This Network property is required to be passed only in - * case you want the server to be Private access server. + * Get the network property: Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * * @return the network value. */ @@ -334,8 +345,8 @@ public Network network() { } /** - * Set the network property: Network properties of a server. This Network property is required to be passed only in - * case you want the server to be Private access server. + * Set the network property: Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * * @param network the network value to set. * @return the ServerProperties object itself. @@ -386,9 +397,9 @@ public ServerProperties withMaintenanceWindow(MaintenanceWindow maintenanceWindo } /** - * Get the sourceServerResourceId property: The source server resource ID to restore from. It's required when - * 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This property is returned - * only for Replica server. + * Get the sourceServerResourceId property: Identifier of the server to be used as the source of the new server. + * Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or 'ReviveDropped'. This property is + * returned only when the target server is a read replica. * * @return the sourceServerResourceId value. */ @@ -397,9 +408,9 @@ public String sourceServerResourceId() { } /** - * Set the sourceServerResourceId property: The source server resource ID to restore from. It's required when - * 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This property is returned - * only for Replica server. + * Set the sourceServerResourceId property: Identifier of the server to be used as the source of the new server. + * Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or 'ReviveDropped'. This property is + * returned only when the target server is a read replica. * * @param sourceServerResourceId the sourceServerResourceId value to set. * @return the ServerProperties object itself. @@ -410,8 +421,8 @@ public ServerProperties withSourceServerResourceId(String sourceServerResourceId } /** - * Get the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time to restore - * from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'ReviveDropped'. + * Get the pointInTimeUtc property: Creation time (in ISO8601 format) of the backup which you want to restore in the + * new server. It's required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', or 'ReviveDropped'. * * @return the pointInTimeUtc value. */ @@ -420,8 +431,8 @@ public OffsetDateTime pointInTimeUtc() { } /** - * Set the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time to restore - * from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'ReviveDropped'. + * Set the pointInTimeUtc property: Creation time (in ISO8601 format) of the backup which you want to restore in the + * new server. It's required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', or 'ReviveDropped'. * * @param pointInTimeUtc the pointInTimeUtc value to set. * @return the ServerProperties object itself. @@ -432,7 +443,7 @@ public ServerProperties withPointInTimeUtc(OffsetDateTime pointInTimeUtc) { } /** - * Get the availabilityZone property: availability zone information of the server. + * Get the availabilityZone property: Availability zone of a server. * * @return the availabilityZone value. */ @@ -441,7 +452,7 @@ public String availabilityZone() { } /** - * Set the availabilityZone property: availability zone information of the server. + * Set the availabilityZone property: Availability zone of a server. * * @param availabilityZone the availabilityZone value to set. * @return the ServerProperties object itself. @@ -452,7 +463,7 @@ public ServerProperties withAvailabilityZone(String availabilityZone) { } /** - * Get the replicationRole property: Replication role of the server. + * Get the replicationRole property: Role of the server in a replication set. * * @return the replicationRole value. */ @@ -461,7 +472,7 @@ public ReplicationRole replicationRole() { } /** - * Set the replicationRole property: Replication role of the server. + * Set the replicationRole property: Role of the server in a replication set. * * @param replicationRole the replicationRole value to set. * @return the ServerProperties object itself. @@ -472,7 +483,7 @@ public ServerProperties withReplicationRole(ReplicationRole replicationRole) { } /** - * Get the replicaCapacity property: Replicas allowed for a server. + * Get the replicaCapacity property: Maximum number of read replicas allowed for a server. * * @return the replicaCapacity value. */ @@ -481,8 +492,8 @@ public Integer replicaCapacity() { } /** - * Get the replica property: Replica properties of a server. These Replica properties are required to be passed only - * in case you want to Promote a server. + * Get the replica property: Read replica properties of a server. Required only in case that you want to promote a + * server. * * @return the replica value. */ @@ -491,8 +502,8 @@ public Replica replica() { } /** - * Set the replica property: Replica properties of a server. These Replica properties are required to be passed only - * in case you want to Promote a server. + * Set the replica property: Read replica properties of a server. Required only in case that you want to promote a + * server. * * @param replica the replica value to set. * @return the ServerProperties object itself. @@ -503,7 +514,7 @@ public ServerProperties withReplica(Replica replica) { } /** - * Get the createMode property: The mode to create a new PostgreSQL server. + * Get the createMode property: Creation mode of a new server. * * @return the createMode value. */ @@ -512,7 +523,7 @@ public CreateMode createMode() { } /** - * Set the createMode property: The mode to create a new PostgreSQL server. + * Set the createMode property: Creation mode of a new server. * * @param createMode the createMode value to set. * @return the ServerProperties object itself. @@ -524,7 +535,7 @@ public ServerProperties withCreateMode(CreateMode createMode) { /** * Get the privateEndpointConnections property: List of private endpoint connections associated with the specified - * resource. + * server. * * @return the privateEndpointConnections value. */ @@ -638,7 +649,7 @@ public static ServerProperties fromJson(JsonReader jsonReader) throws IOExceptio } else if ("administratorLoginPassword".equals(fieldName)) { deserializedServerProperties.administratorLoginPassword = reader.getString(); } else if ("version".equals(fieldName)) { - deserializedServerProperties.version = ServerVersion.fromString(reader.getString()); + deserializedServerProperties.version = PostgresMajorVersion.fromString(reader.getString()); } else if ("minorVersion".equals(fieldName)) { deserializedServerProperties.minorVersion = reader.getString(); } else if ("state".equals(fieldName)) { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForPatch.java similarity index 53% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForPatch.java index 6bde0f0cae3a..16860e56eaa6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForPatch.java @@ -9,40 +9,43 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfigForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.Cluster; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForUpdate; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption; -import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow; +import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindowForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Replica; import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationRole; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; import java.io.IOException; /** - * The ServerPropertiesForUpdate model. + * Properties of a server. */ @Fluent -public final class ServerPropertiesForUpdate implements JsonSerializable { +public final class ServerPropertiesForPatch implements JsonSerializable { /* - * The administrator's login name of a server. Can only be specified when the server is trying to switch to password - * authentication and does not have default administrator login. + * Name of the login designated as the first password based administrator assigned to your instance of PostgreSQL. + * Must be specified the first time that you enable password based authentication on a server. Once set to a given + * value, it cannot be changed for the rest of the life of a server. If you disable password based authentication on + * a server which had it enabled, this password based role isn't deleted. */ private String administratorLogin; /* - * The password of the administrator login. + * Password assigned to the administrator login. As long as password authentication is enabled, this password can be + * changed at any time. */ private String administratorLoginPassword; /* - * PostgreSQL Server version. Version 17 is currently not supported for MVU. + * Major version of PostgreSQL database engine. */ - private ServerVersion version; + private PostgresMajorVersion version; /* * Storage properties of a server. @@ -52,22 +55,22 @@ public final class ServerPropertiesForUpdate implements JsonSerializable { - ServerPropertiesForUpdate deserializedServerPropertiesForUpdate = new ServerPropertiesForUpdate(); + ServerPropertiesForPatch deserializedServerPropertiesForPatch = new ServerPropertiesForPatch(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("administratorLogin".equals(fieldName)) { - deserializedServerPropertiesForUpdate.administratorLogin = reader.getString(); + deserializedServerPropertiesForPatch.administratorLogin = reader.getString(); } else if ("administratorLoginPassword".equals(fieldName)) { - deserializedServerPropertiesForUpdate.administratorLoginPassword = reader.getString(); + deserializedServerPropertiesForPatch.administratorLoginPassword = reader.getString(); } else if ("version".equals(fieldName)) { - deserializedServerPropertiesForUpdate.version = ServerVersion.fromString(reader.getString()); + deserializedServerPropertiesForPatch.version = PostgresMajorVersion.fromString(reader.getString()); } else if ("storage".equals(fieldName)) { - deserializedServerPropertiesForUpdate.storage = Storage.fromJson(reader); + deserializedServerPropertiesForPatch.storage = Storage.fromJson(reader); } else if ("backup".equals(fieldName)) { - deserializedServerPropertiesForUpdate.backup = Backup.fromJson(reader); + deserializedServerPropertiesForPatch.backup = BackupForPatch.fromJson(reader); } else if ("highAvailability".equals(fieldName)) { - deserializedServerPropertiesForUpdate.highAvailability = HighAvailability.fromJson(reader); + deserializedServerPropertiesForPatch.highAvailability = HighAvailabilityForPatch.fromJson(reader); } else if ("maintenanceWindow".equals(fieldName)) { - deserializedServerPropertiesForUpdate.maintenanceWindow = MaintenanceWindow.fromJson(reader); + deserializedServerPropertiesForPatch.maintenanceWindow = MaintenanceWindowForPatch.fromJson(reader); } else if ("authConfig".equals(fieldName)) { - deserializedServerPropertiesForUpdate.authConfig = AuthConfig.fromJson(reader); + deserializedServerPropertiesForPatch.authConfig = AuthConfigForPatch.fromJson(reader); } else if ("dataEncryption".equals(fieldName)) { - deserializedServerPropertiesForUpdate.dataEncryption = DataEncryption.fromJson(reader); + deserializedServerPropertiesForPatch.dataEncryption = DataEncryption.fromJson(reader); + } else if ("availabilityZone".equals(fieldName)) { + deserializedServerPropertiesForPatch.availabilityZone = reader.getString(); } else if ("createMode".equals(fieldName)) { - deserializedServerPropertiesForUpdate.createMode - = CreateModeForUpdate.fromString(reader.getString()); + deserializedServerPropertiesForPatch.createMode = CreateModeForPatch.fromString(reader.getString()); } else if ("replicationRole".equals(fieldName)) { - deserializedServerPropertiesForUpdate.replicationRole + deserializedServerPropertiesForPatch.replicationRole = ReplicationRole.fromString(reader.getString()); } else if ("replica".equals(fieldName)) { - deserializedServerPropertiesForUpdate.replica = Replica.fromJson(reader); + deserializedServerPropertiesForPatch.replica = Replica.fromJson(reader); } else if ("network".equals(fieldName)) { - deserializedServerPropertiesForUpdate.network = Network.fromJson(reader); + deserializedServerPropertiesForPatch.network = Network.fromJson(reader); } else if ("cluster".equals(fieldName)) { - deserializedServerPropertiesForUpdate.cluster = Cluster.fromJson(reader); + deserializedServerPropertiesForPatch.cluster = Cluster.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedServerPropertiesForUpdate; + return deserializedServerPropertiesForPatch; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SessionDetailsResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SessionDetailsResourceInner.java deleted file mode 100644 index ec9e646b87fe..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SessionDetailsResourceInner.java +++ /dev/null @@ -1,233 +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.resourcemanager.postgresqlflexibleserver.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Session details properties. - */ -@Fluent -public final class SessionDetailsResourceInner implements JsonSerializable { - /* - * Iteration id. - */ - private String iterationId; - - /* - * Session id. - */ - private String sessionId; - - /* - * Applied configuration for the iteration. - */ - private String appliedConfiguration; - - /* - * Iteration start time. - */ - private String iterationStartTime; - - /* - * The aqr for the iteration. - */ - private String averageQueryRuntimeMs; - - /* - * The tps for the iteration. - */ - private String transactionsPerSecond; - - /** - * Creates an instance of SessionDetailsResourceInner class. - */ - public SessionDetailsResourceInner() { - } - - /** - * Get the iterationId property: Iteration id. - * - * @return the iterationId value. - */ - public String iterationId() { - return this.iterationId; - } - - /** - * Set the iterationId property: Iteration id. - * - * @param iterationId the iterationId value to set. - * @return the SessionDetailsResourceInner object itself. - */ - public SessionDetailsResourceInner withIterationId(String iterationId) { - this.iterationId = iterationId; - return this; - } - - /** - * Get the sessionId property: Session id. - * - * @return the sessionId value. - */ - public String sessionId() { - return this.sessionId; - } - - /** - * Set the sessionId property: Session id. - * - * @param sessionId the sessionId value to set. - * @return the SessionDetailsResourceInner object itself. - */ - public SessionDetailsResourceInner withSessionId(String sessionId) { - this.sessionId = sessionId; - return this; - } - - /** - * Get the appliedConfiguration property: Applied configuration for the iteration. - * - * @return the appliedConfiguration value. - */ - public String appliedConfiguration() { - return this.appliedConfiguration; - } - - /** - * Set the appliedConfiguration property: Applied configuration for the iteration. - * - * @param appliedConfiguration the appliedConfiguration value to set. - * @return the SessionDetailsResourceInner object itself. - */ - public SessionDetailsResourceInner withAppliedConfiguration(String appliedConfiguration) { - this.appliedConfiguration = appliedConfiguration; - return this; - } - - /** - * Get the iterationStartTime property: Iteration start time. - * - * @return the iterationStartTime value. - */ - public String iterationStartTime() { - return this.iterationStartTime; - } - - /** - * Set the iterationStartTime property: Iteration start time. - * - * @param iterationStartTime the iterationStartTime value to set. - * @return the SessionDetailsResourceInner object itself. - */ - public SessionDetailsResourceInner withIterationStartTime(String iterationStartTime) { - this.iterationStartTime = iterationStartTime; - return this; - } - - /** - * Get the averageQueryRuntimeMs property: The aqr for the iteration. - * - * @return the averageQueryRuntimeMs value. - */ - public String averageQueryRuntimeMs() { - return this.averageQueryRuntimeMs; - } - - /** - * Set the averageQueryRuntimeMs property: The aqr for the iteration. - * - * @param averageQueryRuntimeMs the averageQueryRuntimeMs value to set. - * @return the SessionDetailsResourceInner object itself. - */ - public SessionDetailsResourceInner withAverageQueryRuntimeMs(String averageQueryRuntimeMs) { - this.averageQueryRuntimeMs = averageQueryRuntimeMs; - return this; - } - - /** - * Get the transactionsPerSecond property: The tps for the iteration. - * - * @return the transactionsPerSecond value. - */ - public String transactionsPerSecond() { - return this.transactionsPerSecond; - } - - /** - * Set the transactionsPerSecond property: The tps for the iteration. - * - * @param transactionsPerSecond the transactionsPerSecond value to set. - * @return the SessionDetailsResourceInner object itself. - */ - public SessionDetailsResourceInner withTransactionsPerSecond(String transactionsPerSecond) { - this.transactionsPerSecond = transactionsPerSecond; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("iterationId", this.iterationId); - jsonWriter.writeStringField("sessionId", this.sessionId); - jsonWriter.writeStringField("appliedConfiguration", this.appliedConfiguration); - jsonWriter.writeStringField("iterationStartTime", this.iterationStartTime); - jsonWriter.writeStringField("averageQueryRuntimeMs", this.averageQueryRuntimeMs); - jsonWriter.writeStringField("transactionsPerSecond", this.transactionsPerSecond); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SessionDetailsResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SessionDetailsResourceInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SessionDetailsResourceInner. - */ - public static SessionDetailsResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SessionDetailsResourceInner deserializedSessionDetailsResourceInner = new SessionDetailsResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("iterationId".equals(fieldName)) { - deserializedSessionDetailsResourceInner.iterationId = reader.getString(); - } else if ("sessionId".equals(fieldName)) { - deserializedSessionDetailsResourceInner.sessionId = reader.getString(); - } else if ("appliedConfiguration".equals(fieldName)) { - deserializedSessionDetailsResourceInner.appliedConfiguration = reader.getString(); - } else if ("iterationStartTime".equals(fieldName)) { - deserializedSessionDetailsResourceInner.iterationStartTime = reader.getString(); - } else if ("averageQueryRuntimeMs".equals(fieldName)) { - deserializedSessionDetailsResourceInner.averageQueryRuntimeMs = reader.getString(); - } else if ("transactionsPerSecond".equals(fieldName)) { - deserializedSessionDetailsResourceInner.transactionsPerSecond = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSessionDetailsResourceInner; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SessionResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SessionResourceInner.java deleted file mode 100644 index b7092605fd89..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SessionResourceInner.java +++ /dev/null @@ -1,261 +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.resourcemanager.postgresqlflexibleserver.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Session resource properties. - */ -@Fluent -public final class SessionResourceInner implements JsonSerializable { - /* - * the tuning session start time. - */ - private String sessionStartTime; - - /* - * Session id. - */ - private String sessionId; - - /* - * The status of the tuning session. - */ - private String status; - - /* - * The pre tuning aqr. - */ - private String preTuningAqr; - - /* - * The post tuning aqr. - */ - private String postTuningAqr; - - /* - * The pre tuning tps. - */ - private String preTuningTps; - - /* - * The post tuning tps. - */ - private String postTuningTps; - - /** - * Creates an instance of SessionResourceInner class. - */ - public SessionResourceInner() { - } - - /** - * Get the sessionStartTime property: the tuning session start time. - * - * @return the sessionStartTime value. - */ - public String sessionStartTime() { - return this.sessionStartTime; - } - - /** - * Set the sessionStartTime property: the tuning session start time. - * - * @param sessionStartTime the sessionStartTime value to set. - * @return the SessionResourceInner object itself. - */ - public SessionResourceInner withSessionStartTime(String sessionStartTime) { - this.sessionStartTime = sessionStartTime; - return this; - } - - /** - * Get the sessionId property: Session id. - * - * @return the sessionId value. - */ - public String sessionId() { - return this.sessionId; - } - - /** - * Set the sessionId property: Session id. - * - * @param sessionId the sessionId value to set. - * @return the SessionResourceInner object itself. - */ - public SessionResourceInner withSessionId(String sessionId) { - this.sessionId = sessionId; - return this; - } - - /** - * Get the status property: The status of the tuning session. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Set the status property: The status of the tuning session. - * - * @param status the status value to set. - * @return the SessionResourceInner object itself. - */ - public SessionResourceInner withStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the preTuningAqr property: The pre tuning aqr. - * - * @return the preTuningAqr value. - */ - public String preTuningAqr() { - return this.preTuningAqr; - } - - /** - * Set the preTuningAqr property: The pre tuning aqr. - * - * @param preTuningAqr the preTuningAqr value to set. - * @return the SessionResourceInner object itself. - */ - public SessionResourceInner withPreTuningAqr(String preTuningAqr) { - this.preTuningAqr = preTuningAqr; - return this; - } - - /** - * Get the postTuningAqr property: The post tuning aqr. - * - * @return the postTuningAqr value. - */ - public String postTuningAqr() { - return this.postTuningAqr; - } - - /** - * Set the postTuningAqr property: The post tuning aqr. - * - * @param postTuningAqr the postTuningAqr value to set. - * @return the SessionResourceInner object itself. - */ - public SessionResourceInner withPostTuningAqr(String postTuningAqr) { - this.postTuningAqr = postTuningAqr; - return this; - } - - /** - * Get the preTuningTps property: The pre tuning tps. - * - * @return the preTuningTps value. - */ - public String preTuningTps() { - return this.preTuningTps; - } - - /** - * Set the preTuningTps property: The pre tuning tps. - * - * @param preTuningTps the preTuningTps value to set. - * @return the SessionResourceInner object itself. - */ - public SessionResourceInner withPreTuningTps(String preTuningTps) { - this.preTuningTps = preTuningTps; - return this; - } - - /** - * Get the postTuningTps property: The post tuning tps. - * - * @return the postTuningTps value. - */ - public String postTuningTps() { - return this.postTuningTps; - } - - /** - * Set the postTuningTps property: The post tuning tps. - * - * @param postTuningTps the postTuningTps value to set. - * @return the SessionResourceInner object itself. - */ - public SessionResourceInner withPostTuningTps(String postTuningTps) { - this.postTuningTps = postTuningTps; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sessionStartTime", this.sessionStartTime); - jsonWriter.writeStringField("sessionId", this.sessionId); - jsonWriter.writeStringField("status", this.status); - jsonWriter.writeStringField("preTuningAqr", this.preTuningAqr); - jsonWriter.writeStringField("postTuningAqr", this.postTuningAqr); - jsonWriter.writeStringField("preTuningTps", this.preTuningTps); - jsonWriter.writeStringField("postTuningTps", this.postTuningTps); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SessionResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SessionResourceInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the SessionResourceInner. - */ - public static SessionResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SessionResourceInner deserializedSessionResourceInner = new SessionResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sessionStartTime".equals(fieldName)) { - deserializedSessionResourceInner.sessionStartTime = reader.getString(); - } else if ("sessionId".equals(fieldName)) { - deserializedSessionResourceInner.sessionId = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedSessionResourceInner.status = reader.getString(); - } else if ("preTuningAqr".equals(fieldName)) { - deserializedSessionResourceInner.preTuningAqr = reader.getString(); - } else if ("postTuningAqr".equals(fieldName)) { - deserializedSessionResourceInner.postTuningAqr = reader.getString(); - } else if ("preTuningTps".equals(fieldName)) { - deserializedSessionResourceInner.preTuningTps = reader.getString(); - } else if ("postTuningTps".equals(fieldName)) { - deserializedSessionResourceInner.postTuningTps = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSessionResourceInner; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/TuningOptionsResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/TuningOptionsInner.java similarity index 71% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/TuningOptionsResourceInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/TuningOptionsInner.java index 9bc54208f8cb..f893a71d410d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/TuningOptionsResourceInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/TuningOptionsInner.java @@ -13,10 +13,10 @@ import java.io.IOException; /** - * Stores property that features impact on some metric if this recommended action is applied. + * Impact on some metric if this recommended action is applied. */ @Immutable -public final class TuningOptionsResourceInner extends ProxyResource { +public final class TuningOptionsInner extends ProxyResource { /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @@ -38,9 +38,9 @@ public final class TuningOptionsResourceInner extends ProxyResource { private String id; /** - * Creates an instance of TuningOptionsResourceInner class. + * Creates an instance of TuningOptionsInner class. */ - public TuningOptionsResourceInner() { + public TuningOptionsInner() { } /** @@ -100,35 +100,35 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of TuningOptionsResourceInner from the JsonReader. + * Reads an instance of TuningOptionsInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of TuningOptionsResourceInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. + * @return An instance of TuningOptionsInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TuningOptionsResourceInner. + * @throws IOException If an error occurs while reading the TuningOptionsInner. */ - public static TuningOptionsResourceInner fromJson(JsonReader jsonReader) throws IOException { + public static TuningOptionsInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - TuningOptionsResourceInner deserializedTuningOptionsResourceInner = new TuningOptionsResourceInner(); + TuningOptionsInner deserializedTuningOptionsInner = new TuningOptionsInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedTuningOptionsResourceInner.id = reader.getString(); + deserializedTuningOptionsInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedTuningOptionsResourceInner.name = reader.getString(); + deserializedTuningOptionsInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedTuningOptionsResourceInner.type = reader.getString(); + deserializedTuningOptionsInner.type = reader.getString(); } else if ("systemData".equals(fieldName)) { - deserializedTuningOptionsResourceInner.systemData = SystemData.fromJson(reader); + deserializedTuningOptionsInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedTuningOptionsResourceInner; + return deserializedTuningOptionsInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointInner.java similarity index 72% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointInner.java index eace4556e332..073bec2147ab 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointInner.java @@ -15,10 +15,10 @@ import java.util.List; /** - * Represents a virtual endpoint for a server. + * Pair of virtual endpoints for a server. */ @Fluent -public final class VirtualEndpointResourceInner extends VirtualEndpointResourceForPatch { +public final class VirtualEndpointInner extends VirtualEndpointResourceForPatch { /* * Fully qualified resource ID for the resource. E.g. * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" @@ -41,14 +41,14 @@ public final class VirtualEndpointResourceInner extends VirtualEndpointResourceF private SystemData systemData; /* - * Properties of the virtual endpoint resource. + * Properties of the pair of virtual endpoints. */ private VirtualEndpointResourceProperties innerProperties; /** - * Creates an instance of VirtualEndpointResourceInner class. + * Creates an instance of VirtualEndpointInner class. */ - public VirtualEndpointResourceInner() { + public VirtualEndpointInner() { } /** @@ -90,7 +90,7 @@ public SystemData systemData() { } /** - * Get the innerProperties property: Properties of the virtual endpoint resource. + * Get the innerProperties property: Properties of the pair of virtual endpoints. * * @return the innerProperties value. */ @@ -99,7 +99,7 @@ private VirtualEndpointResourceProperties innerProperties() { } /** - * Get the endpointType property: The endpoint type for the virtual endpoint. + * Get the endpointType property: Type of endpoint for the virtual endpoints. * * @return the endpointType value. */ @@ -108,12 +108,12 @@ public VirtualEndpointType endpointType() { } /** - * Set the endpointType property: The endpoint type for the virtual endpoint. + * Set the endpointType property: Type of endpoint for the virtual endpoints. * * @param endpointType the endpointType value to set. - * @return the VirtualEndpointResourceInner object itself. + * @return the VirtualEndpointInner object itself. */ - public VirtualEndpointResourceInner withEndpointType(VirtualEndpointType endpointType) { + public VirtualEndpointInner withEndpointType(VirtualEndpointType endpointType) { if (this.innerProperties() == null) { this.innerProperties = new VirtualEndpointResourceProperties(); } @@ -122,7 +122,7 @@ public VirtualEndpointResourceInner withEndpointType(VirtualEndpointType endpoin } /** - * Get the members property: List of members for a virtual endpoint. + * Get the members property: List of servers that one of the virtual endpoints can refer to. * * @return the members value. */ @@ -131,12 +131,12 @@ public List members() { } /** - * Set the members property: List of members for a virtual endpoint. + * Set the members property: List of servers that one of the virtual endpoints can refer to. * * @param members the members value to set. - * @return the VirtualEndpointResourceInner object itself. + * @return the VirtualEndpointInner object itself. */ - public VirtualEndpointResourceInner withMembers(List members) { + public VirtualEndpointInner withMembers(List members) { if (this.innerProperties() == null) { this.innerProperties = new VirtualEndpointResourceProperties(); } @@ -176,37 +176,37 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of VirtualEndpointResourceInner from the JsonReader. + * Reads an instance of VirtualEndpointInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of VirtualEndpointResourceInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualEndpointResourceInner. + * @return An instance of VirtualEndpointInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualEndpointInner. */ - public static VirtualEndpointResourceInner fromJson(JsonReader jsonReader) throws IOException { + public static VirtualEndpointInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - VirtualEndpointResourceInner deserializedVirtualEndpointResourceInner = new VirtualEndpointResourceInner(); + VirtualEndpointInner deserializedVirtualEndpointInner = new VirtualEndpointInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("properties".equals(fieldName)) { - deserializedVirtualEndpointResourceInner.innerProperties + deserializedVirtualEndpointInner.innerProperties = VirtualEndpointResourceProperties.fromJson(reader); } else if ("id".equals(fieldName)) { - deserializedVirtualEndpointResourceInner.id = reader.getString(); + deserializedVirtualEndpointInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedVirtualEndpointResourceInner.name = reader.getString(); + deserializedVirtualEndpointInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedVirtualEndpointResourceInner.type = reader.getString(); + deserializedVirtualEndpointInner.type = reader.getString(); } else if ("systemData".equals(fieldName)) { - deserializedVirtualEndpointResourceInner.systemData = SystemData.fromJson(reader); + deserializedVirtualEndpointInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedVirtualEndpointResourceInner; + return deserializedVirtualEndpointInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceProperties.java index 1d2a47e228fa..81db8514fae6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceProperties.java @@ -14,22 +14,22 @@ import java.util.List; /** - * The properties of a virtual endpoint. + * Properties of a pair of virtual endpoints. */ @Fluent public final class VirtualEndpointResourceProperties implements JsonSerializable { /* - * The endpoint type for the virtual endpoint. + * Type of endpoint for the virtual endpoints. */ private VirtualEndpointType endpointType; /* - * List of members for a virtual endpoint + * List of servers that one of the virtual endpoints can refer to. */ private List members; /* - * List of virtual endpoints for a server + * List of virtual endpoints for a server. */ private List virtualEndpoints; @@ -40,7 +40,7 @@ public VirtualEndpointResourceProperties() { } /** - * Get the endpointType property: The endpoint type for the virtual endpoint. + * Get the endpointType property: Type of endpoint for the virtual endpoints. * * @return the endpointType value. */ @@ -49,7 +49,7 @@ public VirtualEndpointType endpointType() { } /** - * Set the endpointType property: The endpoint type for the virtual endpoint. + * Set the endpointType property: Type of endpoint for the virtual endpoints. * * @param endpointType the endpointType value to set. * @return the VirtualEndpointResourceProperties object itself. @@ -60,7 +60,7 @@ public VirtualEndpointResourceProperties withEndpointType(VirtualEndpointType en } /** - * Get the members property: List of members for a virtual endpoint. + * Get the members property: List of servers that one of the virtual endpoints can refer to. * * @return the members value. */ @@ -69,7 +69,7 @@ public List members() { } /** - * Set the members property: List of members for a virtual endpoint. + * Set the members property: List of servers that one of the virtual endpoints can refer to. * * @param members the members value to set. * @return the VirtualEndpointResourceProperties object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageModelInner.java similarity index 72% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageModelInner.java index 66e0660b0438..27a4225b8f8f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageModelInner.java @@ -17,8 +17,8 @@ * Virtual network subnet usage data. */ @Immutable -public final class VirtualNetworkSubnetUsageResultInner - implements JsonSerializable { +public final class VirtualNetworkSubnetUsageModelInner + implements JsonSerializable { /* * The delegatedSubnetsUsage property. */ @@ -35,9 +35,9 @@ public final class VirtualNetworkSubnetUsageResultInner private String subscriptionId; /** - * Creates an instance of VirtualNetworkSubnetUsageResultInner class. + * Creates an instance of VirtualNetworkSubnetUsageModelInner class. */ - public VirtualNetworkSubnetUsageResultInner() { + public VirtualNetworkSubnetUsageModelInner() { } /** @@ -88,17 +88,17 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of VirtualNetworkSubnetUsageResultInner from the JsonReader. + * Reads an instance of VirtualNetworkSubnetUsageModelInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of VirtualNetworkSubnetUsageResultInner if the JsonReader was pointing to an instance of it, + * @return An instance of VirtualNetworkSubnetUsageModelInner if the JsonReader was pointing to an instance of it, * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualNetworkSubnetUsageResultInner. + * @throws IOException If an error occurs while reading the VirtualNetworkSubnetUsageModelInner. */ - public static VirtualNetworkSubnetUsageResultInner fromJson(JsonReader jsonReader) throws IOException { + public static VirtualNetworkSubnetUsageModelInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - VirtualNetworkSubnetUsageResultInner deserializedVirtualNetworkSubnetUsageResultInner - = new VirtualNetworkSubnetUsageResultInner(); + VirtualNetworkSubnetUsageModelInner deserializedVirtualNetworkSubnetUsageModelInner + = new VirtualNetworkSubnetUsageModelInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -106,17 +106,17 @@ public static VirtualNetworkSubnetUsageResultInner fromJson(JsonReader jsonReade if ("delegatedSubnetsUsage".equals(fieldName)) { List delegatedSubnetsUsage = reader.readArray(reader1 -> DelegatedSubnetUsage.fromJson(reader1)); - deserializedVirtualNetworkSubnetUsageResultInner.delegatedSubnetsUsage = delegatedSubnetsUsage; + deserializedVirtualNetworkSubnetUsageModelInner.delegatedSubnetsUsage = delegatedSubnetsUsage; } else if ("location".equals(fieldName)) { - deserializedVirtualNetworkSubnetUsageResultInner.location = reader.getString(); + deserializedVirtualNetworkSubnetUsageModelInner.location = reader.getString(); } else if ("subscriptionId".equals(fieldName)) { - deserializedVirtualNetworkSubnetUsageResultInner.subscriptionId = reader.getString(); + deserializedVirtualNetworkSubnetUsageModelInner.subscriptionId = reader.getString(); } else { reader.skipChildren(); } } - return deserializedVirtualNetworkSubnetUsageResultInner; + return deserializedVirtualNetworkSubnetUsageModelInner; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/package-info.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/package-info.java index 0e1a8c2fca79..6e2e9736124e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/package-info.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/package-info.java @@ -4,8 +4,8 @@ /** * Package containing the inner data models for PostgreSqlManagementClient. - * The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL - * resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and - * configurations with new business model. + * The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure + * PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, + * log files and configurations with new business model. */ package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/package-info.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/package-info.java index f06dd5765fa3..441c2b6e546f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/package-info.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/package-info.java @@ -4,8 +4,8 @@ /** * Package containing the service clients for PostgreSqlManagementClient. - * The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL - * resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and - * configurations with new business model. + * The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure + * PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, + * log files and configurations with new business model. */ package com.azure.resourcemanager.postgresqlflexibleserver.fluent; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ActiveDirectoryAdministratorImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ActiveDirectoryAdministratorImpl.java deleted file mode 100644 index 1c7a2d41d947..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ActiveDirectoryAdministratorImpl.java +++ /dev/null @@ -1,132 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministrator; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministratorAdd; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; - -public final class ActiveDirectoryAdministratorImpl - implements ActiveDirectoryAdministrator, ActiveDirectoryAdministrator.Definition { - private ActiveDirectoryAdministratorInner innerObject; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - ActiveDirectoryAdministratorImpl(ActiveDirectoryAdministratorInner innerObject, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public PrincipalType principalType() { - return this.innerModel().principalType(); - } - - public String principalName() { - return this.innerModel().principalName(); - } - - public String objectId() { - return this.innerModel().objectId(); - } - - public String tenantId() { - return this.innerModel().tenantId(); - } - - public ActiveDirectoryAdministratorInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String serverName; - - private String objectId; - - private ActiveDirectoryAdministratorAdd createParameters; - - public ActiveDirectoryAdministratorImpl withExistingFlexibleServer(String resourceGroupName, String serverName) { - this.resourceGroupName = resourceGroupName; - this.serverName = serverName; - return this; - } - - public ActiveDirectoryAdministrator create() { - this.innerObject = serviceManager.serviceClient() - .getAdministrators() - .create(resourceGroupName, serverName, objectId, createParameters, Context.NONE); - return this; - } - - public ActiveDirectoryAdministrator create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getAdministrators() - .create(resourceGroupName, serverName, objectId, createParameters, context); - return this; - } - - ActiveDirectoryAdministratorImpl(String name, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerObject = new ActiveDirectoryAdministratorInner(); - this.serviceManager = serviceManager; - this.objectId = name; - this.createParameters = new ActiveDirectoryAdministratorAdd(); - } - - public ActiveDirectoryAdministrator refresh() { - this.innerObject = serviceManager.serviceClient() - .getAdministrators() - .getWithResponse(resourceGroupName, serverName, objectId, Context.NONE) - .getValue(); - return this; - } - - public ActiveDirectoryAdministrator refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getAdministrators() - .getWithResponse(resourceGroupName, serverName, objectId, context) - .getValue(); - return this; - } - - public ActiveDirectoryAdministratorImpl withPrincipalType(PrincipalType principalType) { - this.createParameters.withPrincipalType(principalType); - return this; - } - - public ActiveDirectoryAdministratorImpl withPrincipalName(String principalName) { - this.createParameters.withPrincipalName(principalName); - return this; - } - - public ActiveDirectoryAdministratorImpl withTenantId(String tenantId) { - this.createParameters.withTenantId(tenantId); - return this; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorMicrosoftEntraImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorMicrosoftEntraImpl.java new file mode 100644 index 000000000000..9002b1279e22 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorMicrosoftEntraImpl.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntra; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntraAdd; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; + +public final class AdministratorMicrosoftEntraImpl + implements AdministratorMicrosoftEntra, AdministratorMicrosoftEntra.Definition, AdministratorMicrosoftEntra.Update { + private AdministratorMicrosoftEntraInner innerObject; + + private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public PrincipalType principalType() { + return this.innerModel().principalType(); + } + + public String principalName() { + return this.innerModel().principalName(); + } + + public String objectId() { + return this.innerModel().objectId(); + } + + public String tenantId() { + return this.innerModel().tenantId(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public AdministratorMicrosoftEntraInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String serverName; + + private String objectId; + + private AdministratorMicrosoftEntraAdd createParameters; + + private AdministratorMicrosoftEntraAdd updateParameters; + + public AdministratorMicrosoftEntraImpl withExistingFlexibleServer(String resourceGroupName, String serverName) { + this.resourceGroupName = resourceGroupName; + this.serverName = serverName; + return this; + } + + public AdministratorMicrosoftEntra create() { + this.innerObject = serviceManager.serviceClient() + .getAdministratorsMicrosoftEntras() + .createOrUpdate(resourceGroupName, serverName, objectId, createParameters, Context.NONE); + return this; + } + + public AdministratorMicrosoftEntra create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAdministratorsMicrosoftEntras() + .createOrUpdate(resourceGroupName, serverName, objectId, createParameters, context); + return this; + } + + AdministratorMicrosoftEntraImpl(String name, + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { + this.innerObject = new AdministratorMicrosoftEntraInner(); + this.serviceManager = serviceManager; + this.objectId = name; + this.createParameters = new AdministratorMicrosoftEntraAdd(); + } + + public AdministratorMicrosoftEntraImpl update() { + this.updateParameters = new AdministratorMicrosoftEntraAdd(); + return this; + } + + public AdministratorMicrosoftEntra apply() { + this.innerObject = serviceManager.serviceClient() + .getAdministratorsMicrosoftEntras() + .createOrUpdate(resourceGroupName, serverName, objectId, updateParameters, Context.NONE); + return this; + } + + public AdministratorMicrosoftEntra apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAdministratorsMicrosoftEntras() + .createOrUpdate(resourceGroupName, serverName, objectId, updateParameters, context); + return this; + } + + AdministratorMicrosoftEntraImpl(AdministratorMicrosoftEntraInner innerObject, + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.serverName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "flexibleServers"); + this.objectId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "administrators"); + } + + public AdministratorMicrosoftEntra refresh() { + this.innerObject = serviceManager.serviceClient() + .getAdministratorsMicrosoftEntras() + .getWithResponse(resourceGroupName, serverName, objectId, Context.NONE) + .getValue(); + return this; + } + + public AdministratorMicrosoftEntra refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAdministratorsMicrosoftEntras() + .getWithResponse(resourceGroupName, serverName, objectId, context) + .getValue(); + return this; + } + + public AdministratorMicrosoftEntraImpl withPrincipalType(PrincipalType principalType) { + if (isInCreateMode()) { + this.createParameters.withPrincipalType(principalType); + return this; + } else { + this.updateParameters.withPrincipalType(principalType); + return this; + } + } + + public AdministratorMicrosoftEntraImpl withPrincipalName(String principalName) { + if (isInCreateMode()) { + this.createParameters.withPrincipalName(principalName); + return this; + } else { + this.updateParameters.withPrincipalName(principalName); + return this; + } + } + + public AdministratorMicrosoftEntraImpl withTenantId(String tenantId) { + if (isInCreateMode()) { + this.createParameters.withTenantId(tenantId); + return this; + } else { + this.updateParameters.withTenantId(tenantId); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasClientImpl.java similarity index 74% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsClientImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasClientImpl.java index a7a6fb944cac..a1a044dc5454 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasClientImpl.java @@ -33,22 +33,22 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministratorAdd; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntraAdd; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntraList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in AdministratorsClient. + * An instance of this class provides access to all the operations defined in AdministratorsMicrosoftEntrasClient. */ -public final class AdministratorsClientImpl implements AdministratorsClient { +public final class AdministratorsMicrosoftEntrasClientImpl implements AdministratorsMicrosoftEntrasClient { /** * The proxy service used to perform REST calls. */ - private final AdministratorsService service; + private final AdministratorsMicrosoftEntrasService service; /** * The service client containing this operation class. @@ -56,48 +56,48 @@ public final class AdministratorsClientImpl implements AdministratorsClient { private final PostgreSqlManagementClientImpl client; /** - * Initializes an instance of AdministratorsClientImpl. + * Initializes an instance of AdministratorsMicrosoftEntrasClientImpl. * * @param client the instance of the service client containing this operation class. */ - AdministratorsClientImpl(PostgreSqlManagementClientImpl client) { - this.service - = RestProxy.create(AdministratorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + AdministratorsMicrosoftEntrasClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(AdministratorsMicrosoftEntrasService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for PostgreSqlManagementClientAdministrators to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for PostgreSqlManagementClientAdministratorsMicrosoftEntras to be used by + * the proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface AdministratorsService { + @ServiceInterface(name = "PostgreSqlManagementClientAdministratorsMicrosoftEntras") + public interface AdministratorsMicrosoftEntrasService { @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("objectId") String objectId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ActiveDirectoryAdministratorAdd parameters, + @BodyParam("application/json") AdministratorMicrosoftEntraAdd parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("objectId") String objectId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ActiveDirectoryAdministratorAdd parameters, + @BodyParam("application/json") AdministratorMicrosoftEntraAdd parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -106,7 +106,7 @@ Mono>> delete(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Response deleteSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -117,7 +117,7 @@ Response deleteSync(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("objectId") String objectId, @HeaderParam("Accept") String accept, Context context); @@ -126,7 +126,7 @@ Mono> get(@HostParam("$host") String @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("objectId") String objectId, @HeaderParam("Accept") String accept, Context context); @@ -135,7 +135,7 @@ Response getSync(@HostParam("$host") String e @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -144,7 +144,7 @@ Mono> listByServer(@HostParam("$host") String @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -153,7 +153,7 @@ Response listByServerSync(@HostParam("$host") String en @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( + Mono> listByServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -161,27 +161,28 @@ Mono> listByServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( + Response listByServerNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @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 represents an Microsoft Entra Administrator along with {@link Response} on successful completion of - * {@link Mono}. + * @return server administrator associated to a Microsoft Entra principal along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createWithResponseAsync(String resourceGroupName, String serverName, - String objectId, ActiveDirectoryAdministratorAdd parameters) { + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, + String objectId, AdministratorMicrosoftEntraAdd parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -207,26 +208,27 @@ public Mono>> createWithResponseAsync(String resourceG } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, serverName, objectId, this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @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 represents an Microsoft Entra Administrator along with {@link Response}. + * @return server administrator associated to a Microsoft Entra principal along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createWithResponse(String resourceGroupName, String serverName, String objectId, - ActiveDirectoryAdministratorAdd parameters) { + private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String objectId, AdministratorMicrosoftEntraAdd parameters) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -256,26 +258,27 @@ private Response createWithResponse(String resourceGroupName, String parameters.validate(); } final String accept = "application/json"; - return service.createSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, serverName, objectId, this.client.getApiVersion(), parameters, accept, Context.NONE); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @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 represents an Microsoft Entra Administrator along with {@link Response}. + * @return server administrator associated to a Microsoft Entra principal along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createWithResponse(String resourceGroupName, String serverName, String objectId, - ActiveDirectoryAdministratorAdd parameters, Context context) { + private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + String objectId, AdministratorMicrosoftEntraAdd parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -305,138 +308,145 @@ private Response createWithResponse(String resourceGroupName, String parameters.validate(); } final String accept = "application/json"; - return service.createSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, serverName, objectId, this.client.getApiVersion(), parameters, accept, context); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @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 {@link PollerFlux} for polling of represents an Microsoft Entra Administrator. + * @return the {@link PollerFlux} for polling of server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ActiveDirectoryAdministratorInner> - beginCreateAsync(String resourceGroupName, String serverName, String objectId, - ActiveDirectoryAdministratorAdd parameters) { + public PollerFlux, AdministratorMicrosoftEntraInner> + beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String objectId, + AdministratorMicrosoftEntraAdd parameters) { Mono>> mono - = createWithResponseAsync(resourceGroupName, serverName, objectId, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ActiveDirectoryAdministratorInner.class, - ActiveDirectoryAdministratorInner.class, this.client.getContext()); + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, objectId, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AdministratorMicrosoftEntraInner.class, + AdministratorMicrosoftEntraInner.class, this.client.getContext()); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @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 {@link SyncPoller} for polling of represents an Microsoft Entra Administrator. + * @return the {@link SyncPoller} for polling of server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ActiveDirectoryAdministratorInner> beginCreate( - String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters) { - Response response = createWithResponse(resourceGroupName, serverName, objectId, parameters); - return this.client.getLroResult(response, - ActiveDirectoryAdministratorInner.class, ActiveDirectoryAdministratorInner.class, Context.NONE); + public SyncPoller, AdministratorMicrosoftEntraInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, String objectId, + AdministratorMicrosoftEntraAdd parameters) { + Response response = createOrUpdateWithResponse(resourceGroupName, serverName, objectId, parameters); + return this.client.getLroResult(response, + AdministratorMicrosoftEntraInner.class, AdministratorMicrosoftEntraInner.class, Context.NONE); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @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 {@link SyncPoller} for polling of represents an Microsoft Entra Administrator. + * @return the {@link SyncPoller} for polling of server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ActiveDirectoryAdministratorInner> beginCreate( - String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters, - Context context) { + public SyncPoller, AdministratorMicrosoftEntraInner> + beginCreateOrUpdate(String resourceGroupName, String serverName, String objectId, + AdministratorMicrosoftEntraAdd parameters, Context context) { Response response - = createWithResponse(resourceGroupName, serverName, objectId, parameters, context); - return this.client.getLroResult(response, - ActiveDirectoryAdministratorInner.class, ActiveDirectoryAdministratorInner.class, context); + = createOrUpdateWithResponse(resourceGroupName, serverName, objectId, parameters, context); + return this.client.getLroResult(response, + AdministratorMicrosoftEntraInner.class, AdministratorMicrosoftEntraInner.class, context); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @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 represents an Microsoft Entra Administrator on successful completion of {@link Mono}. + * @return server administrator associated to a Microsoft Entra principal on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync(String resourceGroupName, String serverName, - String objectId, ActiveDirectoryAdministratorAdd parameters) { - return beginCreateAsync(resourceGroupName, serverName, objectId, parameters).last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, + String objectId, AdministratorMicrosoftEntraAdd parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, objectId, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @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 represents an Microsoft Entra Administrator. + * @return server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ActiveDirectoryAdministratorInner create(String resourceGroupName, String serverName, String objectId, - ActiveDirectoryAdministratorAdd parameters) { - return beginCreate(resourceGroupName, serverName, objectId, parameters).getFinalResult(); + public AdministratorMicrosoftEntraInner createOrUpdate(String resourceGroupName, String serverName, String objectId, + AdministratorMicrosoftEntraAdd parameters) { + return beginCreateOrUpdate(resourceGroupName, serverName, objectId, parameters).getFinalResult(); } /** - * Creates a new server. + * Creates a new server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. - * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @param parameters Required parameters for adding a server administrator associated to a Microsoft Entra + * principal. * @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 represents an Microsoft Entra Administrator. + * @return server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ActiveDirectoryAdministratorInner create(String resourceGroupName, String serverName, String objectId, - ActiveDirectoryAdministratorAdd parameters, Context context) { - return beginCreate(resourceGroupName, serverName, objectId, parameters, context).getFinalResult(); + public AdministratorMicrosoftEntraInner createOrUpdate(String resourceGroupName, String serverName, String objectId, + AdministratorMicrosoftEntraAdd parameters, Context context) { + return beginCreateOrUpdate(resourceGroupName, serverName, objectId, parameters, context).getFinalResult(); } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @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. @@ -471,11 +481,11 @@ public Mono>> deleteWithResponseAsync(String resourceG } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @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. @@ -511,11 +521,11 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @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. @@ -553,11 +563,11 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @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. @@ -572,11 +582,11 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @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. @@ -590,11 +600,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @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. @@ -609,11 +619,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @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. @@ -626,11 +636,11 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @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. @@ -641,11 +651,11 @@ public void delete(String resourceGroupName, String serverName, String objectId) } /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @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. @@ -657,18 +667,19 @@ public void delete(String resourceGroupName, String serverName, String objectId, } /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @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 information about a server along with {@link Response} on successful completion of {@link Mono}. + * @return information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, String objectId) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -696,37 +707,39 @@ public Mono> getWithResponseAsync(St } /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @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 information about a server on successful completion of {@link Mono}. + * @return information about a server administrator associated to a Microsoft Entra principal on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, + public Mono getAsync(String resourceGroupName, String serverName, String objectId) { return getWithResponseAsync(resourceGroupName, serverName, objectId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @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 information about a server along with {@link Response}. + * @return information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, + public Response getWithResponse(String resourceGroupName, String serverName, String objectId, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -756,34 +769,34 @@ public Response getWithResponse(String resour } /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @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 information about a server. + * @return information about a server administrator associated to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ActiveDirectoryAdministratorInner get(String resourceGroupName, String serverName, String objectId) { + public AdministratorMicrosoftEntraInner get(String resourceGroupName, String serverName, String objectId) { return getWithResponse(resourceGroupName, serverName, objectId, Context.NONE).getValue(); } /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of Microsoft Entra Administrators along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of server administrators associated to Microsoft Entra principals along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, + private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -804,39 +817,40 @@ private Mono> listByServerSingl return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of Microsoft Entra Administrators as paginated response with {@link PagedFlux}. + * @return list of server administrators associated to Microsoft Entra principals as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { + public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of Microsoft Entra Administrators along with {@link PagedResponse}. + * @return list of server administrators associated to Microsoft Entra principals along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -857,7 +871,7 @@ private PagedResponse listByServerSinglePage( .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -865,7 +879,7 @@ private PagedResponse listByServerSinglePage( } /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -873,10 +887,10 @@ private PagedResponse listByServerSinglePage( * @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 a list of Microsoft Entra Administrators along with {@link PagedResponse}. + * @return list of server administrators associated to Microsoft Entra principals along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -897,7 +911,7 @@ private PagedResponse listByServerSinglePage( .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -905,23 +919,24 @@ private PagedResponse listByServerSinglePage( } /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of Microsoft Entra Administrators as paginated response with {@link PagedIterable}. + * @return list of server administrators associated to Microsoft Entra principals as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { + public PagedIterable listByServer(String resourceGroupName, String serverName) { return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), nextLink -> listByServerNextSinglePage(nextLink)); } /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -929,10 +944,11 @@ public PagedIterable listByServer(String reso * @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 a list of Microsoft Entra Administrators as paginated response with {@link PagedIterable}. + * @return list of server administrators associated to Microsoft Entra principals as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePage(nextLink, context)); @@ -945,11 +961,11 @@ public PagedIterable listByServer(String reso * @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 a list of Microsoft Entra Administrators along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of server administrators associated to Microsoft Entra principals along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync(String nextLink) { + private Mono> listByServerNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -960,7 +976,7 @@ private Mono> listByServerNextS final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -972,10 +988,10 @@ private Mono> listByServerNextS * @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 a list of Microsoft Entra Administrators along with {@link PagedResponse}. + * @return list of server administrators associated to Microsoft Entra principals along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink) { + private PagedResponse listByServerNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -986,7 +1002,7 @@ private PagedResponse listByServerNextSingleP "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -1000,10 +1016,10 @@ private PagedResponse listByServerNextSingleP * @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 a list of Microsoft Entra Administrators along with {@link PagedResponse}. + * @return list of server administrators associated to Microsoft Entra principals along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink, + private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { if (nextLink == null) { throw LOGGER.atError() @@ -1015,11 +1031,11 @@ private PagedResponse listByServerNextSingleP "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - private static final ClientLogger LOGGER = new ClientLogger(AdministratorsClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AdministratorsMicrosoftEntrasClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasImpl.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasImpl.java index 99a09fbdd089..ad0480a8602a 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasImpl.java @@ -9,19 +9,19 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministrator; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Administrators; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntra; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorsMicrosoftEntras; -public final class AdministratorsImpl implements Administrators { - private static final ClientLogger LOGGER = new ClientLogger(AdministratorsImpl.class); +public final class AdministratorsMicrosoftEntrasImpl implements AdministratorsMicrosoftEntras { + private static final ClientLogger LOGGER = new ClientLogger(AdministratorsMicrosoftEntrasImpl.class); - private final AdministratorsClient innerClient; + private final AdministratorsMicrosoftEntrasClient innerClient; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - public AdministratorsImpl(AdministratorsClient innerClient, + public AdministratorsMicrosoftEntrasImpl(AdministratorsMicrosoftEntrasClient innerClient, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -35,43 +35,43 @@ public void delete(String resourceGroupName, String serverName, String objectId, this.serviceClient().delete(resourceGroupName, serverName, objectId, context); } - public Response getWithResponse(String resourceGroupName, String serverName, + public Response getWithResponse(String resourceGroupName, String serverName, String objectId, Context context) { - Response inner + Response inner = this.serviceClient().getWithResponse(resourceGroupName, serverName, objectId, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ActiveDirectoryAdministratorImpl(inner.getValue(), this.manager())); + new AdministratorMicrosoftEntraImpl(inner.getValue(), this.manager())); } else { return null; } } - public ActiveDirectoryAdministrator get(String resourceGroupName, String serverName, String objectId) { - ActiveDirectoryAdministratorInner inner = this.serviceClient().get(resourceGroupName, serverName, objectId); + public AdministratorMicrosoftEntra get(String resourceGroupName, String serverName, String objectId) { + AdministratorMicrosoftEntraInner inner = this.serviceClient().get(resourceGroupName, serverName, objectId); if (inner != null) { - return new ActiveDirectoryAdministratorImpl(inner, this.manager()); + return new AdministratorMicrosoftEntraImpl(inner, this.manager()); } else { return null; } } - public PagedIterable listByServer(String resourceGroupName, String serverName) { - PagedIterable inner + public PagedIterable listByServer(String resourceGroupName, String serverName) { + PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); return ResourceManagerUtils.mapPage(inner, - inner1 -> new ActiveDirectoryAdministratorImpl(inner1, this.manager())); + inner1 -> new AdministratorMicrosoftEntraImpl(inner1, this.manager())); } - public PagedIterable listByServer(String resourceGroupName, String serverName, + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { - PagedIterable inner + PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName, context); return ResourceManagerUtils.mapPage(inner, - inner1 -> new ActiveDirectoryAdministratorImpl(inner1, this.manager())); + inner1 -> new AdministratorMicrosoftEntraImpl(inner1, this.manager())); } - public ActiveDirectoryAdministrator getById(String id) { + public AdministratorMicrosoftEntra getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -90,7 +90,7 @@ public ActiveDirectoryAdministrator getById(String id) { return this.getWithResponse(resourceGroupName, serverName, objectId, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -147,7 +147,7 @@ public void deleteByIdWithResponse(String id, Context context) { this.delete(resourceGroupName, serverName, objectId, context); } - private AdministratorsClient serviceClient() { + private AdministratorsMicrosoftEntrasClient serviceClient() { return this.innerClient; } @@ -155,7 +155,7 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man return this.serviceManager; } - public ActiveDirectoryAdministratorImpl define(String name) { - return new ActiveDirectoryAdministratorImpl(name, this.manager()); + public AdministratorMicrosoftEntraImpl define(String name) { + return new AdministratorMicrosoftEntraImpl(name, this.manager()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java similarity index 71% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsClientImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java index 42a0bc8817f8..4a369110d748 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java @@ -26,19 +26,20 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LtrBackupOperationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrServerBackupOperationInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrServerBackupOperationList; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettingsList; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in LtrBackupOperationsClient. + * An instance of this class provides access to all the operations defined in AdvancedThreatProtectionSettingsClient. */ -public final class LtrBackupOperationsClientImpl implements LtrBackupOperationsClient { +public final class AdvancedThreatProtectionSettingsClientImpl implements AdvancedThreatProtectionSettingsClient { /** * The proxy service used to perform REST calls. */ - private final LtrBackupOperationsService service; + private final AdvancedThreatProtectionSettingsService service; /** * The service client containing this operation class. @@ -46,64 +47,66 @@ public final class LtrBackupOperationsClientImpl implements LtrBackupOperationsC private final PostgreSqlManagementClientImpl client; /** - * Initializes an instance of LtrBackupOperationsClientImpl. + * Initializes an instance of AdvancedThreatProtectionSettingsClientImpl. * * @param client the instance of the service client containing this operation class. */ - LtrBackupOperationsClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(LtrBackupOperationsService.class, client.getHttpPipeline(), + AdvancedThreatProtectionSettingsClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(AdvancedThreatProtectionSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for PostgreSqlManagementClientLtrBackupOperations to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for PostgreSqlManagementClientAdvancedThreatProtectionSettings to be used + * by the proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface LtrBackupOperationsService { + @ServiceInterface(name = "PostgreSqlManagementClientAdvancedThreatProtectionSettings") + public interface AdvancedThreatProtectionSettingsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations/{backupName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations/{backupName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( + Mono> listByServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -111,26 +114,25 @@ Mono> listByServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( + Response listByServerNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. * @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 result of the give long term retention backup operation for the flexible server along with - * {@link Response} on successful completion of {@link Mono}. + * @return list of advanced threat protection settings for a server along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String backupName) { + private Mono> + listByServerSinglePageAsync(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -146,51 +148,46 @@ public Mono> getWithResponseAsync(String if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, accept, context)) + .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. * @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 result of the give long term retention backup operation for the flexible server on successful - * completion of {@link Mono}. + * @return list of advanced threat protection settings for a server as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - String backupName) { - return getWithResponseAsync(resourceGroupName, serverName, backupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByServerAsync(String resourceGroupName, + String serverName) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. - * @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 result of the give long term retention backup operation for the flexible server along with - * {@link Response}. + * @return list of advanced threat protection settings for a server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String backupName, Context context) { + private PagedResponse listByServerSinglePage(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -209,141 +206,165 @@ public Response getWithResponse(String resourceGr throw LOGGER.atError() .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - if (backupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, backupName, accept, context); + Response res + = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @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 result of the give long term retention backup operation for the flexible server. + * @return list of advanced threat protection settings for a server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LtrServerBackupOperationInner get(String resourceGroupName, String serverName, String backupName) { - return getWithResponse(resourceGroupName, serverName, backupName, Context.NONE).getValue(); + private PagedResponse listByServerSinglePage(String resourceGroupName, + String serverName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 result of the give long term retention backup operations for the flexible server along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of advanced threat protection settings for a server as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePage(nextLink)); } /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @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 result of the give long term retention backup operations for the flexible server as paginated - * response with {@link PagedFlux}. + * @return list of advanced threat protection settings for a server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePageAsync(nextLink)); + public PagedIterable listByServer(String resourceGroupName, + String serverName, Context context) { + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePage(nextLink, context)); } /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. * @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 result of the give long term retention backup operations for the flexible server along with - * {@link PagedResponse}. + * @return state of advanced threat protection settings for a server along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, - String serverName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, ThreatProtectionName threatProtectionName) { if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (threatProtectionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter threatProtectionName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, threatProtectionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @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 state of advanced threat protection settings for a server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName) { + return getWithResponseAsync(resourceGroupName, serverName, threatProtectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets state of advanced threat protection settings for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. * @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 result of the give long term retention backup operations for the flexible server along with - * {@link PagedResponse}. + * @return state of advanced threat protection settings for a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, - String serverName, Context context) { + public Response getWithResponse(String resourceGroupName, + String serverName, ThreatProtectionName threatProtectionName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -362,48 +383,30 @@ private PagedResponse listByServerSinglePage(Stri throw LOGGER.atError() .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } + if (threatProtectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter threatProtectionName is required and cannot be null.")); + } final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Gets the result of the give long term retention backup operations for the flexible server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 result of the give long term retention backup operations for the flexible server as paginated - * response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePage(nextLink)); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, threatProtectionName, accept, context); } /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param context The context to associate with this operation. + * @param threatProtectionName Name of the advanced threat protection settings. * @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 result of the give long term retention backup operations for the flexible server as paginated - * response with {@link PagedIterable}. + * @return state of advanced threat protection settings for a server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public AdvancedThreatProtectionSettingsModelInner get(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName) { + return getWithResponse(resourceGroupName, serverName, threatProtectionName, Context.NONE).getValue(); } /** @@ -413,11 +416,12 @@ public PagedIterable listByServer(String resource * @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 a list of long term retention backup operations for server along with {@link PagedResponse} on successful + * @return list of advanced threat protection settings for a server along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync(String nextLink) { + private Mono> + listByServerNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -428,8 +432,9 @@ private Mono> listByServerNextSingl final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -440,10 +445,10 @@ private Mono> listByServerNextSingl * @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 a list of long term retention backup operations for server along with {@link PagedResponse}. + * @return list of advanced threat protection settings for a server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink) { + private PagedResponse listByServerNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -454,7 +459,7 @@ private PagedResponse listByServerNextSinglePage( "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -468,10 +473,11 @@ private PagedResponse listByServerNextSinglePage( * @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 a list of long term retention backup operations for server along with {@link PagedResponse}. + * @return list of advanced threat protection settings for a server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { + private PagedResponse listByServerNextSinglePage(String nextLink, + Context context) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -482,11 +488,11 @@ private PagedResponse listByServerNextSinglePage( "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - private static final ClientLogger LOGGER = new ClientLogger(LtrBackupOperationsClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AdvancedThreatProtectionSettingsClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java new file mode 100644 index 000000000000..174ac265df78 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettings; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettingsModel; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; + +public final class AdvancedThreatProtectionSettingsImpl implements AdvancedThreatProtectionSettings { + private static final ClientLogger LOGGER = new ClientLogger(AdvancedThreatProtectionSettingsImpl.class); + + private final AdvancedThreatProtectionSettingsClient innerClient; + + private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; + + public AdvancedThreatProtectionSettingsImpl(AdvancedThreatProtectionSettingsClient innerClient, + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByServer(String resourceGroupName, + String serverName) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AdvancedThreatProtectionSettingsModelImpl(inner1, this.manager())); + } + + public PagedIterable listByServer(String resourceGroupName, + String serverName, Context context) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AdvancedThreatProtectionSettingsModelImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, serverName, threatProtectionName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AdvancedThreatProtectionSettingsModelImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AdvancedThreatProtectionSettingsModel get(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName) { + AdvancedThreatProtectionSettingsModelInner inner + = this.serviceClient().get(resourceGroupName, serverName, threatProtectionName); + if (inner != null) { + return new AdvancedThreatProtectionSettingsModelImpl(inner, this.manager()); + } else { + return null; + } + } + + private AdvancedThreatProtectionSettingsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsModelImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsModelImpl.java similarity index 66% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsModelImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsModelImpl.java index 19b713529fa1..9813c7ab40bd 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsModelImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsModelImpl.java @@ -6,15 +6,15 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerThreatProtectionSettingsModelInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettingsModel; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettingsModel; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState; import java.time.OffsetDateTime; -public final class ServerThreatProtectionSettingsModelImpl implements ServerThreatProtectionSettingsModel, - ServerThreatProtectionSettingsModel.Definition, ServerThreatProtectionSettingsModel.Update { - private ServerThreatProtectionSettingsModelInner innerObject; +public final class AdvancedThreatProtectionSettingsModelImpl implements AdvancedThreatProtectionSettingsModel, + AdvancedThreatProtectionSettingsModel.Definition, AdvancedThreatProtectionSettingsModel.Update { + private AdvancedThreatProtectionSettingsModelInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; @@ -46,7 +46,7 @@ public String resourceGroupName() { return resourceGroupName; } - public ServerThreatProtectionSettingsModelInner innerModel() { + public AdvancedThreatProtectionSettingsModelInner innerModel() { return this.innerObject; } @@ -60,53 +60,53 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man private ThreatProtectionName threatProtectionName; - public ServerThreatProtectionSettingsModelImpl withExistingFlexibleServer(String resourceGroupName, + public AdvancedThreatProtectionSettingsModelImpl withExistingFlexibleServer(String resourceGroupName, String serverName) { this.resourceGroupName = resourceGroupName; this.serverName = serverName; return this; } - public ServerThreatProtectionSettingsModel create() { + public AdvancedThreatProtectionSettingsModel create() { this.innerObject = serviceManager.serviceClient() .getServerThreatProtectionSettings() .createOrUpdate(resourceGroupName, serverName, threatProtectionName, this.innerModel(), Context.NONE); return this; } - public ServerThreatProtectionSettingsModel create(Context context) { + public AdvancedThreatProtectionSettingsModel create(Context context) { this.innerObject = serviceManager.serviceClient() .getServerThreatProtectionSettings() .createOrUpdate(resourceGroupName, serverName, threatProtectionName, this.innerModel(), context); return this; } - ServerThreatProtectionSettingsModelImpl(ThreatProtectionName name, + AdvancedThreatProtectionSettingsModelImpl(ThreatProtectionName name, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerObject = new ServerThreatProtectionSettingsModelInner(); + this.innerObject = new AdvancedThreatProtectionSettingsModelInner(); this.serviceManager = serviceManager; this.threatProtectionName = name; } - public ServerThreatProtectionSettingsModelImpl update() { + public AdvancedThreatProtectionSettingsModelImpl update() { return this; } - public ServerThreatProtectionSettingsModel apply() { + public AdvancedThreatProtectionSettingsModel apply() { this.innerObject = serviceManager.serviceClient() .getServerThreatProtectionSettings() .createOrUpdate(resourceGroupName, serverName, threatProtectionName, this.innerModel(), Context.NONE); return this; } - public ServerThreatProtectionSettingsModel apply(Context context) { + public AdvancedThreatProtectionSettingsModel apply(Context context) { this.innerObject = serviceManager.serviceClient() .getServerThreatProtectionSettings() .createOrUpdate(resourceGroupName, serverName, threatProtectionName, this.innerModel(), context); return this; } - ServerThreatProtectionSettingsModelImpl(ServerThreatProtectionSettingsModelInner innerObject, + AdvancedThreatProtectionSettingsModelImpl(AdvancedThreatProtectionSettingsModelInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -116,23 +116,7 @@ public ServerThreatProtectionSettingsModel apply(Context context) { ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "advancedThreatProtectionSettings")); } - public ServerThreatProtectionSettingsModel refresh() { - this.innerObject = serviceManager.serviceClient() - .getServerThreatProtectionSettings() - .getWithResponse(resourceGroupName, serverName, threatProtectionName, Context.NONE) - .getValue(); - return this; - } - - public ServerThreatProtectionSettingsModel refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getServerThreatProtectionSettings() - .getWithResponse(resourceGroupName, serverName, threatProtectionName, context) - .getValue(); - return this; - } - - public ServerThreatProtectionSettingsModelImpl withState(ThreatProtectionState state) { + public AdvancedThreatProtectionSettingsModelImpl withState(ThreatProtectionState state) { this.innerModel().withState(state); return this; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerBackupImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupAutomaticAndOnDemandImpl.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerBackupImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupAutomaticAndOnDemandImpl.java index 9390f52c7a32..4371cfeaffb3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerBackupImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupAutomaticAndOnDemandImpl.java @@ -5,17 +5,17 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Origin; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerBackup; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupAutomaticAndOnDemand; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; import java.time.OffsetDateTime; -public final class ServerBackupImpl implements ServerBackup { - private ServerBackupInner innerObject; +public final class BackupAutomaticAndOnDemandImpl implements BackupAutomaticAndOnDemand { + private BackupAutomaticAndOnDemandInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - ServerBackupImpl(ServerBackupInner innerObject, + BackupAutomaticAndOnDemandImpl(BackupAutomaticAndOnDemandInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -37,7 +37,7 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public Origin backupType() { + public BackupType backupType() { return this.innerModel().backupType(); } @@ -49,7 +49,7 @@ public String source() { return this.innerModel().source(); } - public ServerBackupInner innerModel() { + public BackupAutomaticAndOnDemandInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsClientImpl.java similarity index 82% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsClientImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsClientImpl.java index 7d0a6639365a..caedea6a7443 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsClientImpl.java @@ -32,21 +32,21 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerBackupListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupAutomaticAndOnDemandList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in BackupsClient. + * An instance of this class provides access to all the operations defined in BackupsAutomaticAndOnDemandsClient. */ -public final class BackupsClientImpl implements BackupsClient { +public final class BackupsAutomaticAndOnDemandsClientImpl implements BackupsAutomaticAndOnDemandsClient { /** * The proxy service used to perform REST calls. */ - private final BackupsService service; + private final BackupsAutomaticAndOnDemandsService service; /** * The service client containing this operation class. @@ -54,25 +54,26 @@ public final class BackupsClientImpl implements BackupsClient { private final PostgreSqlManagementClientImpl client; /** - * Initializes an instance of BackupsClientImpl. + * Initializes an instance of BackupsAutomaticAndOnDemandsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupsClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(BackupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + BackupsAutomaticAndOnDemandsClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(BackupsAutomaticAndOnDemandsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for PostgreSqlManagementClientBackups to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for PostgreSqlManagementClientBackupsAutomaticAndOnDemands to be used by + * the proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface BackupsService { + @ServiceInterface(name = "PostgreSqlManagementClientBackupsAutomaticAndOnDemands") + public interface BackupsAutomaticAndOnDemandsService { @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> create(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -81,7 +82,7 @@ Mono>> create(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response createSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -110,7 +111,7 @@ Response deleteSync(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); @@ -119,7 +120,7 @@ Mono> get(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); @@ -128,7 +129,7 @@ Response getSync(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -137,7 +138,7 @@ Mono> listByServer(@HostParam("$host") String e @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -146,7 +147,7 @@ Response listByServerSync(@HostParam("$host") String end @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( + Mono> listByServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -154,21 +155,21 @@ Mono> listByServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( + Response listByServerNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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 server backup properties along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a backup along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createWithResponseAsync(String resourceGroupName, String serverName, @@ -199,15 +200,15 @@ public Mono>> createWithResponseAsync(String resourceG } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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 server backup properties along with {@link Response}. + * @return properties of a backup along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, String backupName) { @@ -239,16 +240,16 @@ private Response createWithResponse(String resourceGroupName, String } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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 server backup properties along with {@link Response}. + * @return properties of a backup along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, String backupName, @@ -281,119 +282,122 @@ private Response createWithResponse(String resourceGroupName, String } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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 {@link PollerFlux} for polling of server backup properties. + * @return the {@link PollerFlux} for polling of properties of a backup. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ServerBackupInner> beginCreateAsync(String resourceGroupName, - String serverName, String backupName) { + public PollerFlux, BackupAutomaticAndOnDemandInner> + beginCreateAsync(String resourceGroupName, String serverName, String backupName) { Mono>> mono = createWithResponseAsync(resourceGroupName, serverName, backupName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ServerBackupInner.class, ServerBackupInner.class, this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), BackupAutomaticAndOnDemandInner.class, BackupAutomaticAndOnDemandInner.class, + this.client.getContext()); } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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 {@link SyncPoller} for polling of server backup properties. + * @return the {@link SyncPoller} for polling of properties of a backup. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerBackupInner> beginCreate(String resourceGroupName, - String serverName, String backupName) { + public SyncPoller, BackupAutomaticAndOnDemandInner> + beginCreate(String resourceGroupName, String serverName, String backupName) { Response response = createWithResponse(resourceGroupName, serverName, backupName); - return this.client.getLroResult(response, ServerBackupInner.class, - ServerBackupInner.class, Context.NONE); + return this.client.getLroResult(response, + BackupAutomaticAndOnDemandInner.class, BackupAutomaticAndOnDemandInner.class, Context.NONE); } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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 {@link SyncPoller} for polling of server backup properties. + * @return the {@link SyncPoller} for polling of properties of a backup. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerBackupInner> beginCreate(String resourceGroupName, - String serverName, String backupName, Context context) { + public SyncPoller, BackupAutomaticAndOnDemandInner> + beginCreate(String resourceGroupName, String serverName, String backupName, Context context) { Response response = createWithResponse(resourceGroupName, serverName, backupName, context); - return this.client.getLroResult(response, ServerBackupInner.class, - ServerBackupInner.class, context); + return this.client.getLroResult(response, + BackupAutomaticAndOnDemandInner.class, BackupAutomaticAndOnDemandInner.class, context); } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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 server backup properties on successful completion of {@link Mono}. + * @return properties of a backup on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync(String resourceGroupName, String serverName, String backupName) { + public Mono createAsync(String resourceGroupName, String serverName, + String backupName) { return beginCreateAsync(resourceGroupName, serverName, backupName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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 server backup properties. + * @return properties of a backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerBackupInner create(String resourceGroupName, String serverName, String backupName) { + public BackupAutomaticAndOnDemandInner create(String resourceGroupName, String serverName, String backupName) { return beginCreate(resourceGroupName, serverName, backupName).getFinalResult(); } /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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 server backup properties. + * @return properties of a backup. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerBackupInner create(String resourceGroupName, String serverName, String backupName, Context context) { + public BackupAutomaticAndOnDemandInner create(String resourceGroupName, String serverName, String backupName, + Context context) { return beginCreate(resourceGroupName, serverName, backupName, context).getFinalResult(); } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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. @@ -428,11 +432,11 @@ public Mono>> deleteWithResponseAsync(String resourceG } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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. @@ -468,11 +472,11 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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. @@ -510,11 +514,11 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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. @@ -529,11 +533,11 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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. @@ -547,11 +551,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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. @@ -566,11 +570,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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. @@ -583,11 +587,11 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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. @@ -598,11 +602,11 @@ public void delete(String resourceGroupName, String serverName, String backupNam } /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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. @@ -614,19 +618,20 @@ public void delete(String resourceGroupName, String serverName, String backupNam } /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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 specific backup for a given server along with {@link Response} on successful completion of {@link Mono}. + * @return information of an on demand backup, given its name along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String backupName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String backupName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -653,37 +658,38 @@ public Mono> getWithResponseAsync(String resourceGro } /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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 specific backup for a given server on successful completion of {@link Mono}. + * @return information of an on demand backup, given its name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String backupName) { + public Mono getAsync(String resourceGroupName, String serverName, + String backupName) { return getWithResponseAsync(resourceGroupName, serverName, backupName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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 specific backup for a given server along with {@link Response}. + * @return information of an on demand backup, given its name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, String backupName, - Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, + String backupName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -712,33 +718,33 @@ public Response getWithResponse(String resourceGroupName, Str } /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @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 specific backup for a given server. + * @return information of an on demand backup, given its name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerBackupInner get(String resourceGroupName, String serverName, String backupName) { + public BackupAutomaticAndOnDemandInner get(String resourceGroupName, String serverName, String backupName) { return getWithResponse(resourceGroupName, serverName, backupName, Context.NONE).getValue(); } /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of server backups along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of backups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, + private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -759,39 +765,40 @@ private Mono> listByServerSinglePageAsync(Strin return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of server backups as paginated response with {@link PagedFlux}. + * @return list of backups as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { + public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of server backups along with {@link PagedResponse}. + * @return list of backups along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { + private PagedResponse listByServerSinglePage(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -811,7 +818,7 @@ private PagedResponse listByServerSinglePage(String resourceG .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -819,7 +826,7 @@ private PagedResponse listByServerSinglePage(String resourceG } /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -827,11 +834,11 @@ private PagedResponse listByServerSinglePage(String resourceG * @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 a list of server backups along with {@link PagedResponse}. + * @return list of backups along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, - Context context) { + private PagedResponse listByServerSinglePage(String resourceGroupName, + String serverName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -851,7 +858,7 @@ private PagedResponse listByServerSinglePage(String resourceG .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -859,23 +866,23 @@ private PagedResponse listByServerSinglePage(String resourceG } /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of server backups as paginated response with {@link PagedIterable}. + * @return list of backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { + public PagedIterable listByServer(String resourceGroupName, String serverName) { return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), nextLink -> listByServerNextSinglePage(nextLink)); } /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -883,10 +890,11 @@ public PagedIterable listByServer(String resourceGroupName, S * @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 a list of server backups as paginated response with {@link PagedIterable}. + * @return list of backups as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePage(nextLink, context)); } @@ -898,10 +906,10 @@ public PagedIterable listByServer(String resourceGroupName, S * @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 a list of server backups along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of backups along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync(String nextLink) { + private Mono> listByServerNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -912,8 +920,8 @@ private Mono> listByServerNextSinglePageAsync(S final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -924,10 +932,10 @@ private Mono> listByServerNextSinglePageAsync(S * @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 a list of server backups along with {@link PagedResponse}. + * @return list of backups along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink) { + private PagedResponse listByServerNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -938,7 +946,7 @@ private PagedResponse listByServerNextSinglePage(String nextL "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -952,10 +960,11 @@ private PagedResponse listByServerNextSinglePage(String nextL * @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 a list of server backups along with {@link PagedResponse}. + * @return list of backups along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { + private PagedResponse listByServerNextSinglePage(String nextLink, + Context context) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -966,11 +975,11 @@ private PagedResponse listByServerNextSinglePage(String nextL "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - private static final ClientLogger LOGGER = new ClientLogger(BackupsClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BackupsAutomaticAndOnDemandsClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsImpl.java new file mode 100644 index 000000000000..f9b38ae12f73 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsImpl.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupAutomaticAndOnDemand; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsAutomaticAndOnDemands; + +public final class BackupsAutomaticAndOnDemandsImpl implements BackupsAutomaticAndOnDemands { + private static final ClientLogger LOGGER = new ClientLogger(BackupsAutomaticAndOnDemandsImpl.class); + + private final BackupsAutomaticAndOnDemandsClient innerClient; + + private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; + + public BackupsAutomaticAndOnDemandsImpl(BackupsAutomaticAndOnDemandsClient innerClient, + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public BackupAutomaticAndOnDemand create(String resourceGroupName, String serverName, String backupName) { + BackupAutomaticAndOnDemandInner inner = this.serviceClient().create(resourceGroupName, serverName, backupName); + if (inner != null) { + return new BackupAutomaticAndOnDemandImpl(inner, this.manager()); + } else { + return null; + } + } + + public BackupAutomaticAndOnDemand create(String resourceGroupName, String serverName, String backupName, + Context context) { + BackupAutomaticAndOnDemandInner inner + = this.serviceClient().create(resourceGroupName, serverName, backupName, context); + if (inner != null) { + return new BackupAutomaticAndOnDemandImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String serverName, String backupName) { + this.serviceClient().delete(resourceGroupName, serverName, backupName); + } + + public void delete(String resourceGroupName, String serverName, String backupName, Context context) { + this.serviceClient().delete(resourceGroupName, serverName, backupName, context); + } + + public Response getWithResponse(String resourceGroupName, String serverName, + String backupName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, serverName, backupName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BackupAutomaticAndOnDemandImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BackupAutomaticAndOnDemand get(String resourceGroupName, String serverName, String backupName) { + BackupAutomaticAndOnDemandInner inner = this.serviceClient().get(resourceGroupName, serverName, backupName); + if (inner != null) { + return new BackupAutomaticAndOnDemandImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByServer(String resourceGroupName, String serverName) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new BackupAutomaticAndOnDemandImpl(inner1, this.manager())); + } + + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new BackupAutomaticAndOnDemandImpl(inner1, this.manager())); + } + + private BackupsAutomaticAndOnDemandsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsImpl.java deleted file mode 100644 index d5d3e8b22591..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsImpl.java +++ /dev/null @@ -1,95 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Backups; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerBackup; - -public final class BackupsImpl implements Backups { - private static final ClientLogger LOGGER = new ClientLogger(BackupsImpl.class); - - private final BackupsClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public BackupsImpl(BackupsClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public ServerBackup create(String resourceGroupName, String serverName, String backupName) { - ServerBackupInner inner = this.serviceClient().create(resourceGroupName, serverName, backupName); - if (inner != null) { - return new ServerBackupImpl(inner, this.manager()); - } else { - return null; - } - } - - public ServerBackup create(String resourceGroupName, String serverName, String backupName, Context context) { - ServerBackupInner inner = this.serviceClient().create(resourceGroupName, serverName, backupName, context); - if (inner != null) { - return new ServerBackupImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String serverName, String backupName) { - this.serviceClient().delete(resourceGroupName, serverName, backupName); - } - - public void delete(String resourceGroupName, String serverName, String backupName, Context context) { - this.serviceClient().delete(resourceGroupName, serverName, backupName, context); - } - - public Response getWithResponse(String resourceGroupName, String serverName, String backupName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, serverName, backupName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ServerBackupImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ServerBackup get(String resourceGroupName, String serverName, String backupName) { - ServerBackupInner inner = this.serviceClient().get(resourceGroupName, serverName, backupName); - if (inner != null) { - return new ServerBackupImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listByServer(String resourceGroupName, String serverName) { - PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ServerBackupImpl(inner1, this.manager())); - } - - public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ServerBackupImpl(inner1, this.manager())); - } - - private BackupsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrServerBackupOperationImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionOperationImpl.java similarity index 84% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrServerBackupOperationImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionOperationImpl.java index 98fc756d0f7a..20ef8392797f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrServerBackupOperationImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionOperationImpl.java @@ -5,17 +5,17 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrServerBackupOperationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionOperationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionOperation; import com.azure.resourcemanager.postgresqlflexibleserver.models.ExecutionStatus; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrServerBackupOperation; import java.time.OffsetDateTime; -public final class LtrServerBackupOperationImpl implements LtrServerBackupOperation { - private LtrServerBackupOperationInner innerObject; +public final class BackupsLongTermRetentionOperationImpl implements BackupsLongTermRetentionOperation { + private BackupsLongTermRetentionOperationInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - LtrServerBackupOperationImpl(LtrServerBackupOperationInner innerObject, + BackupsLongTermRetentionOperationImpl(BackupsLongTermRetentionOperationInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -77,7 +77,7 @@ public String errorMessage() { return this.innerModel().errorMessage(); } - public LtrServerBackupOperationInner innerModel() { + public BackupsLongTermRetentionOperationInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupResponseImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionResponseImpl.java similarity index 82% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupResponseImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionResponseImpl.java index 41eb434947e8..758fa7f59f9c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupResponseImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionResponseImpl.java @@ -4,17 +4,17 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrBackupResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionResponse; import com.azure.resourcemanager.postgresqlflexibleserver.models.ExecutionStatus; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupResponse; import java.time.OffsetDateTime; -public final class LtrBackupResponseImpl implements LtrBackupResponse { - private LtrBackupResponseInner innerObject; +public final class BackupsLongTermRetentionResponseImpl implements BackupsLongTermRetentionResponse { + private BackupsLongTermRetentionResponseInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - LtrBackupResponseImpl(LtrBackupResponseInner innerObject, + BackupsLongTermRetentionResponseImpl(BackupsLongTermRetentionResponseInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -60,7 +60,7 @@ public String errorMessage() { return this.innerModel().errorMessage(); } - public LtrBackupResponseInner innerModel() { + public BackupsLongTermRetentionResponseInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsClientImpl.java new file mode 100644 index 000000000000..68f41477848b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsClientImpl.java @@ -0,0 +1,909 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +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.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionOperationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionRequest; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionsCheckPrerequisitesResponse; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrServerBackupOperationList; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in BackupsLongTermRetentionsClient. + */ +public final class BackupsLongTermRetentionsClientImpl implements BackupsLongTermRetentionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final BackupsLongTermRetentionsService service; + + /** + * The service client containing this operation class. + */ + private final PostgreSqlManagementClientImpl client; + + /** + * Initializes an instance of BackupsLongTermRetentionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BackupsLongTermRetentionsClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(BackupsLongTermRetentionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PostgreSqlManagementClientBackupsLongTermRetentions to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PostgreSqlManagementClientBackupsLongTermRetentions") + public interface BackupsLongTermRetentionsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrPreBackup") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono checkPrerequisites( + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @BodyParam("application/json") LtrPreBackupRequest parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrPreBackup") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + BackupsLongTermRetentionsCheckPrerequisitesResponse checkPrerequisitesSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @BodyParam("application/json") LtrPreBackupRequest parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/startLtrBackup") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> start(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @BodyParam("application/json") BackupsLongTermRetentionRequest parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/startLtrBackup") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response startSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @BodyParam("application/json") BackupsLongTermRetentionRequest parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations/{backupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations/{backupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServer(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByServerSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServerNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByServerNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Performs all checks required for a long term retention backup operation to succeed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for 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 response for the LTR pre-backup API call on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkPrerequisitesWithResponseAsync( + String resourceGroupName, String serverName, LtrPreBackupRequest parameters) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 accept = "application/json"; + return FluxUtil + .withContext(context -> service.checkPrerequisites(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Performs all checks required for a long term retention backup operation to succeed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for 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 response for the LTR pre-backup API call on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkPrerequisitesAsync(String resourceGroupName, String serverName, + LtrPreBackupRequest parameters) { + return checkPrerequisitesWithResponseAsync(resourceGroupName, serverName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Performs all checks required for a long term retention backup operation to succeed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @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 response for the LTR pre-backup API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupsLongTermRetentionsCheckPrerequisitesResponse checkPrerequisitesWithResponse(String resourceGroupName, + String serverName, LtrPreBackupRequest parameters, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return service.checkPrerequisitesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); + } + + /** + * Performs all checks required for a long term retention backup operation to succeed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for 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 response for the LTR pre-backup API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LtrPreBackupResponseInner checkPrerequisites(String resourceGroupName, String serverName, + LtrPreBackupRequest parameters) { + return checkPrerequisitesWithResponse(resourceGroupName, serverName, parameters, Context.NONE).getValue(); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for 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 response for the LTR backup API call along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> startWithResponseAsync(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 accept = "application/json"; + return FluxUtil + .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for 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 response for the LTR backup API call along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response startWithResponse(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, Context.NONE); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @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 response for the LTR backup API call along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response startWithResponse(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for 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 {@link PollerFlux} for polling of response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, BackupsLongTermRetentionResponseInner> + beginStartAsync(String resourceGroupName, String serverName, BackupsLongTermRetentionRequest parameters) { + Mono>> mono = startWithResponseAsync(resourceGroupName, serverName, parameters); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), BackupsLongTermRetentionResponseInner.class, + BackupsLongTermRetentionResponseInner.class, this.client.getContext()); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for 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 {@link SyncPoller} for polling of response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BackupsLongTermRetentionResponseInner> + beginStart(String resourceGroupName, String serverName, BackupsLongTermRetentionRequest parameters) { + Response response = startWithResponse(resourceGroupName, serverName, parameters); + return this.client.getLroResult( + response, BackupsLongTermRetentionResponseInner.class, BackupsLongTermRetentionResponseInner.class, + Context.NONE); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @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 {@link SyncPoller} for polling of response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BackupsLongTermRetentionResponseInner> + beginStart(String resourceGroupName, String serverName, BackupsLongTermRetentionRequest parameters, + Context context) { + Response response = startWithResponse(resourceGroupName, serverName, parameters, context); + return this.client.getLroResult( + response, BackupsLongTermRetentionResponseInner.class, BackupsLongTermRetentionResponseInner.class, + context); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for 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 response for the LTR backup API call on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono startAsync(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters) { + return beginStartAsync(resourceGroupName, serverName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for 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 response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupsLongTermRetentionResponseInner start(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters) { + return beginStart(resourceGroupName, serverName, parameters).getFinalResult(); + } + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. + * @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 response for the LTR backup API call. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupsLongTermRetentionResponseInner start(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters, Context context) { + return beginStart(resourceGroupName, serverName, parameters, context).getFinalResult(); + } + + /** + * Gets the results of a long retention backup operation for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName The name of the backup. + * @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 results of a long retention backup operation for a server along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String backupName) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the results of a long retention backup operation for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName The name of the backup. + * @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 results of a long retention backup operation for a server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, + String backupName) { + return getWithResponseAsync(resourceGroupName, serverName, backupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the results of a long retention backup operation for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName The name of the backup. + * @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 results of a long retention backup operation for a server along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, + String backupName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, backupName, accept, context); + } + + /** + * Gets the results of a long retention backup operation for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName The name of the backup. + * @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 results of a long retention backup operation for a server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupsLongTermRetentionOperationInner get(String resourceGroupName, String serverName, String backupName) { + return getWithResponse(resourceGroupName, serverName, backupName, Context.NONE).getValue(); + } + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 a list of long term retention backup operations for server along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByServerSinglePageAsync(String resourceGroupName, String serverName) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 a list of long term retention backup operations for server as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByServerAsync(String resourceGroupName, + String serverName) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePageAsync(nextLink)); + } + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 a list of long term retention backup operations for server along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerSinglePage(String resourceGroupName, + String serverName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 a list of long term retention backup operations for server along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerSinglePage(String resourceGroupName, + String serverName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 a list of long term retention backup operations for server as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, + String serverName) { + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePage(nextLink)); + } + + /** + * Lists the results of the long term retention backup operations for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 a list of long term retention backup operations for server as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, + String serverName, Context context) { + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 a list of long term retention backup operations for server along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByServerNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 a list of long term retention backup operations for server along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 a list of long term retention backup operations for server along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(BackupsLongTermRetentionsClientImpl.class); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsImpl.java new file mode 100644 index 000000000000..fd27af9d207d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsImpl.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionOperationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionOperation; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionRequest; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionResponse; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentions; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionsCheckPrerequisitesResponse; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupResponse; + +public final class BackupsLongTermRetentionsImpl implements BackupsLongTermRetentions { + private static final ClientLogger LOGGER = new ClientLogger(BackupsLongTermRetentionsImpl.class); + + private final BackupsLongTermRetentionsClient innerClient; + + private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; + + public BackupsLongTermRetentionsImpl(BackupsLongTermRetentionsClient innerClient, + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response checkPrerequisitesWithResponse(String resourceGroupName, String serverName, + LtrPreBackupRequest parameters, Context context) { + BackupsLongTermRetentionsCheckPrerequisitesResponse inner + = this.serviceClient().checkPrerequisitesWithResponse(resourceGroupName, serverName, parameters, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LtrPreBackupResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public LtrPreBackupResponse checkPrerequisites(String resourceGroupName, String serverName, + LtrPreBackupRequest parameters) { + LtrPreBackupResponseInner inner + = this.serviceClient().checkPrerequisites(resourceGroupName, serverName, parameters); + if (inner != null) { + return new LtrPreBackupResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public BackupsLongTermRetentionResponse start(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters) { + BackupsLongTermRetentionResponseInner inner + = this.serviceClient().start(resourceGroupName, serverName, parameters); + if (inner != null) { + return new BackupsLongTermRetentionResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public BackupsLongTermRetentionResponse start(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters, Context context) { + BackupsLongTermRetentionResponseInner inner + = this.serviceClient().start(resourceGroupName, serverName, parameters, context); + if (inner != null) { + return new BackupsLongTermRetentionResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse(String resourceGroupName, String serverName, + String backupName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, serverName, backupName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BackupsLongTermRetentionOperationImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BackupsLongTermRetentionOperation get(String resourceGroupName, String serverName, String backupName) { + BackupsLongTermRetentionOperationInner inner + = this.serviceClient().get(resourceGroupName, serverName, backupName); + if (inner != null) { + return new BackupsLongTermRetentionOperationImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByServer(String resourceGroupName, String serverName) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new BackupsLongTermRetentionOperationImpl(inner1, this.manager())); + } + + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new BackupsLongTermRetentionOperationImpl(inner1, this.manager())); + } + + private BackupsLongTermRetentionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsClientImpl.java similarity index 68% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsClientImpl.java index f4c16136b890..6b5f3f1a4270 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsClientImpl.java @@ -26,19 +26,19 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LocationBasedCapabilitiesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilitiesListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByLocationsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityList; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in LocationBasedCapabilitiesClient. + * An instance of this class provides access to all the operations defined in CapabilitiesByLocationsClient. */ -public final class LocationBasedCapabilitiesClientImpl implements LocationBasedCapabilitiesClient { +public final class CapabilitiesByLocationsClientImpl implements CapabilitiesByLocationsClient { /** * The proxy service used to perform REST calls. */ - private final LocationBasedCapabilitiesService service; + private final CapabilitiesByLocationsService service; /** * The service client containing this operation class. @@ -46,28 +46,28 @@ public final class LocationBasedCapabilitiesClientImpl implements LocationBasedC private final PostgreSqlManagementClientImpl client; /** - * Initializes an instance of LocationBasedCapabilitiesClientImpl. + * Initializes an instance of CapabilitiesByLocationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - LocationBasedCapabilitiesClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(LocationBasedCapabilitiesService.class, client.getHttpPipeline(), + CapabilitiesByLocationsClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(CapabilitiesByLocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for PostgreSqlManagementClientLocationBasedCapabilities to be used by the + * The interface defining all the services for PostgreSqlManagementClientCapabilitiesByLocations to be used by the * proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface LocationBasedCapabilitiesService { + @ServiceInterface(name = "PostgreSqlManagementClientCapabilitiesByLocations") + public interface CapabilitiesByLocationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/capabilities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> execute(@HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); @@ -75,7 +75,7 @@ Mono> execute(@HostParam("$host") String endpoi @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/capabilities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response executeSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); @@ -83,30 +83,29 @@ Response executeSync(@HostParam("$host") String endpoint @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> executeNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response executeNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @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 capabilities at specified location in a given subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> executeSinglePageAsync(String locationName) { + private Mono> listSinglePageAsync(String locationName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -120,39 +119,40 @@ private Mono> executeSinglePageAsyn } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.execute(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @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 capabilities at specified location in a given subscription as paginated response with {@link PagedFlux}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux executeAsync(String locationName) { - return new PagedFlux<>(() -> executeSinglePageAsync(locationName), - nextLink -> executeNextSinglePageAsync(nextLink)); + public PagedFlux listAsync(String locationName) { + return new PagedFlux<>(() -> listSinglePageAsync(locationName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @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 capabilities at specified location in a given subscription along with {@link PagedResponse}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse executeSinglePage(String locationName) { + private PagedResponse listSinglePage(String locationName) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -168,24 +168,25 @@ private PagedResponse executeSinglePage(String lo .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.executeSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @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 capabilities at specified location in a given subscription along with {@link PagedResponse}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse executeSinglePage(String locationName, Context context) { + private PagedResponse listSinglePage(String locationName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -201,42 +202,42 @@ private PagedResponse executeSinglePage(String lo .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.executeSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, accept, context); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @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 capabilities at specified location in a given subscription as paginated response with + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable execute(String locationName) { - return new PagedIterable<>(() -> executeSinglePage(locationName), nextLink -> executeNextSinglePage(nextLink)); + public PagedIterable list(String locationName) { + return new PagedIterable<>(() -> listSinglePage(locationName), nextLink -> listNextSinglePage(nextLink)); } /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @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 capabilities at specified location in a given subscription as paginated response with + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable execute(String locationName, Context context) { - return new PagedIterable<>(() -> executeSinglePage(locationName, context), - nextLink -> executeNextSinglePage(nextLink, context)); + public PagedIterable list(String locationName, Context context) { + return new PagedIterable<>(() -> listSinglePage(locationName, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -246,11 +247,11 @@ public PagedIterable execute(String locationName, * @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 capability for the PostgreSQL server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> executeNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -259,10 +260,9 @@ private Mono> executeNextSinglePage new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.executeNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -273,10 +273,11 @@ private Mono> executeNextSinglePage * @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 capability for the PostgreSQL server along with {@link PagedResponse}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse executeNextSinglePage(String nextLink) { + private PagedResponse listNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -287,8 +288,7 @@ private PagedResponse executeNextSinglePage(Strin "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.executeNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -301,10 +301,11 @@ private PagedResponse executeNextSinglePage(Strin * @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 capability for the PostgreSQL server along with {@link PagedResponse}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse executeNextSinglePage(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -315,11 +316,10 @@ private PagedResponse executeNextSinglePage(Strin "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.executeNextSync(nextLink, this.client.getEndpoint(), accept, context); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - private static final ClientLogger LOGGER = new ClientLogger(LocationBasedCapabilitiesClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(CapabilitiesByLocationsClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsImpl.java similarity index 60% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsImpl.java index 9112ad94efdb..3df41838a13e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsImpl.java @@ -7,35 +7,35 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LogFilesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LogFileInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogFile; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogFiles; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByLocationsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilitiesByLocations; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Capability; -public final class LogFilesImpl implements LogFiles { - private static final ClientLogger LOGGER = new ClientLogger(LogFilesImpl.class); +public final class CapabilitiesByLocationsImpl implements CapabilitiesByLocations { + private static final ClientLogger LOGGER = new ClientLogger(CapabilitiesByLocationsImpl.class); - private final LogFilesClient innerClient; + private final CapabilitiesByLocationsClient innerClient; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - public LogFilesImpl(LogFilesClient innerClient, + public CapabilitiesByLocationsImpl(CapabilitiesByLocationsClient innerClient, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable listByServer(String resourceGroupName, String serverName) { - PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LogFileImpl(inner1, this.manager())); + public PagedIterable list(String locationName) { + PagedIterable inner = this.serviceClient().list(locationName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager())); } - public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { - PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LogFileImpl(inner1, this.manager())); + public PagedIterable list(String locationName, Context context) { + PagedIterable inner = this.serviceClient().list(locationName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager())); } - private LogFilesClient serviceClient() { + private CapabilitiesByLocationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersClientImpl.java similarity index 75% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesClientImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersClientImpl.java index 79333b434ea9..0e5181f21366 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersClientImpl.java @@ -26,19 +26,19 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerCapabilitiesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilitiesListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByServersClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityList; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in ServerCapabilitiesClient. + * An instance of this class provides access to all the operations defined in CapabilitiesByServersClient. */ -public final class ServerCapabilitiesClientImpl implements ServerCapabilitiesClient { +public final class CapabilitiesByServersClientImpl implements CapabilitiesByServersClient { /** * The proxy service used to perform REST calls. */ - private final ServerCapabilitiesService service; + private final CapabilitiesByServersService service; /** * The service client containing this operation class. @@ -46,28 +46,28 @@ public final class ServerCapabilitiesClientImpl implements ServerCapabilitiesCli private final PostgreSqlManagementClientImpl client; /** - * Initializes an instance of ServerCapabilitiesClientImpl. + * Initializes an instance of CapabilitiesByServersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ServerCapabilitiesClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(ServerCapabilitiesService.class, client.getHttpPipeline(), + CapabilitiesByServersClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(CapabilitiesByServersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for PostgreSqlManagementClientServerCapabilities to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for PostgreSqlManagementClientCapabilitiesByServers to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface ServerCapabilitiesService { + @ServiceInterface(name = "PostgreSqlManagementClientCapabilitiesByServers") + public interface CapabilitiesByServersService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/capabilities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -76,7 +76,7 @@ Mono> list(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/capabilities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -85,31 +85,30 @@ Response listSync(@HostParam("$host") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 capabilities for a flexible server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String serverName) { + private Mono> listSinglePageAsync(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -129,39 +128,41 @@ private Mono> listSinglePageAsync(S return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 capabilities for a flexible server as paginated response with {@link PagedFlux}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String serverName) { + public PagedFlux listAsync(String resourceGroupName, String serverName) { return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, serverName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 capabilities for a flexible server along with {@link PagedResponse}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String serverName) { + private PagedResponse listSinglePage(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -181,14 +182,14 @@ private PagedResponse listSinglePage(String resou .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -196,10 +197,11 @@ private PagedResponse listSinglePage(String resou * @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 capabilities for a flexible server along with {@link PagedResponse}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String serverName, + private PagedResponse listSinglePage(String resourceGroupName, String serverName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -220,30 +222,31 @@ private PagedResponse listSinglePage(String resou .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 capabilities for a flexible server as paginated response with {@link PagedIterable}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String serverName) { + public PagedIterable list(String resourceGroupName, String serverName) { return new PagedIterable<>(() -> listSinglePage(resourceGroupName, serverName), nextLink -> listNextSinglePage(nextLink)); } /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -251,11 +254,11 @@ public PagedIterable list(String resourceGroupNam * @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 capabilities for a flexible server as paginated response with {@link PagedIterable}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String serverName, - Context context) { + public PagedIterable list(String resourceGroupName, String serverName, Context context) { return new PagedIterable<>(() -> listSinglePage(resourceGroupName, serverName, context), nextLink -> listNextSinglePage(nextLink, context)); } @@ -267,11 +270,11 @@ public PagedIterable list(String resourceGroupNam * @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 capability for the PostgreSQL server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -281,8 +284,8 @@ private Mono> listNextSinglePageAsy } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -293,10 +296,11 @@ private Mono> listNextSinglePageAsy * @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 capability for the PostgreSQL server along with {@link PagedResponse}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { + private PagedResponse listNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -307,8 +311,7 @@ private PagedResponse listNextSinglePage(String n "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -321,10 +324,11 @@ private PagedResponse listNextSinglePage(String n * @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 capability for the PostgreSQL server along with {@link PagedResponse}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -335,11 +339,10 @@ private PagedResponse listNextSinglePage(String n "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - private static final ClientLogger LOGGER = new ClientLogger(ServerCapabilitiesClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(CapabilitiesByServersClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersImpl.java similarity index 57% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersImpl.java index 84cbacf72601..b01d2eabfe05 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersImpl.java @@ -7,35 +7,35 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LocationBasedCapabilitiesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LocationBasedCapabilities; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByServersClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilitiesByServers; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Capability; -public final class LocationBasedCapabilitiesImpl implements LocationBasedCapabilities { - private static final ClientLogger LOGGER = new ClientLogger(LocationBasedCapabilitiesImpl.class); +public final class CapabilitiesByServersImpl implements CapabilitiesByServers { + private static final ClientLogger LOGGER = new ClientLogger(CapabilitiesByServersImpl.class); - private final LocationBasedCapabilitiesClient innerClient; + private final CapabilitiesByServersClient innerClient; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - public LocationBasedCapabilitiesImpl(LocationBasedCapabilitiesClient innerClient, + public CapabilitiesByServersImpl(CapabilitiesByServersClient innerClient, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable execute(String locationName) { - PagedIterable inner = this.serviceClient().execute(locationName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FlexibleServerCapabilityImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String serverName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager())); } - public PagedIterable execute(String locationName, Context context) { - PagedIterable inner = this.serviceClient().execute(locationName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FlexibleServerCapabilityImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String serverName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, serverName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager())); } - private LocationBasedCapabilitiesClient serviceClient() { + private CapabilitiesByServersClient serviceClient() { return this.innerClient; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServerCapabilityImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilityImpl.java similarity index 74% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServerCapabilityImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilityImpl.java index 16dbb57ae0e8..055625dff382 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServerCapabilityImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilityImpl.java @@ -4,29 +4,29 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Capability; import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityStatus; import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningEditionCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerEditionCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.GeoBackupSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OnlineResizeSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RestrictedEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackupSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LocationRestricted; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OnlineStorageResizeSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerEditionCapability; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersionCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrowthSupportedEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrowthSupport; import com.azure.resourcemanager.postgresqlflexibleserver.models.SupportedFeature; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHaAndGeoBackupSupportedEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHaSupportedEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHighAvailabilitySupport; import java.util.Collections; import java.util.List; -public final class FlexibleServerCapabilityImpl implements FlexibleServerCapability { - private FlexibleServerCapabilityInner innerObject; +public final class CapabilityImpl implements Capability { + private CapabilityInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - FlexibleServerCapabilityImpl(FlexibleServerCapabilityInner innerObject, + CapabilityImpl(CapabilityInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -44,8 +44,8 @@ public String name() { return this.innerModel().name(); } - public List supportedServerEditions() { - List inner = this.innerModel().supportedServerEditions(); + public List supportedServerEditions() { + List inner = this.innerModel().supportedServerEditions(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -71,7 +71,7 @@ public List supportedFeatures() { } } - public FastProvisioningSupportedEnum fastProvisioningSupported() { + public FastProvisioningSupport fastProvisioningSupported() { return this.innerModel().fastProvisioningSupported(); } @@ -84,31 +84,31 @@ public List supportedFastProvisioningEditions } } - public GeoBackupSupportedEnum geoBackupSupported() { + public GeographicallyRedundantBackupSupport geoBackupSupported() { return this.innerModel().geoBackupSupported(); } - public ZoneRedundantHaSupportedEnum zoneRedundantHaSupported() { + public ZoneRedundantHighAvailabilitySupport zoneRedundantHaSupported() { return this.innerModel().zoneRedundantHaSupported(); } - public ZoneRedundantHaAndGeoBackupSupportedEnum zoneRedundantHaAndGeoBackupSupported() { + public ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport zoneRedundantHaAndGeoBackupSupported() { return this.innerModel().zoneRedundantHaAndGeoBackupSupported(); } - public StorageAutoGrowthSupportedEnum storageAutoGrowthSupported() { + public StorageAutoGrowthSupport storageAutoGrowthSupported() { return this.innerModel().storageAutoGrowthSupported(); } - public OnlineResizeSupportedEnum onlineResizeSupported() { + public OnlineStorageResizeSupport onlineResizeSupported() { return this.innerModel().onlineResizeSupported(); } - public RestrictedEnum restricted() { + public LocationRestricted restricted() { return this.innerModel().restricted(); } - public FlexibleServerCapabilityInner innerModel() { + public CapabilityInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFileImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogImpl.java similarity index 87% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFileImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogImpl.java index 2d19fdc0fa47..a4eb8e823b27 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFileImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogImpl.java @@ -5,16 +5,16 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LogFileInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogFile; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapturedLog; import java.time.OffsetDateTime; -public final class LogFileImpl implements LogFile { - private LogFileInner innerObject; +public final class CapturedLogImpl implements CapturedLog { + private CapturedLogInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - LogFileImpl(LogFileInner innerObject, + CapturedLogImpl(CapturedLogInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -56,7 +56,7 @@ public String url() { return this.innerModel().url(); } - public LogFileInner innerModel() { + public CapturedLogInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsClientImpl.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesClientImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsClientImpl.java index 19862148b48c..54399c7c3e64 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsClientImpl.java @@ -26,19 +26,19 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LogFilesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LogFileInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogFileListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapturedLogsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapturedLogList; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in LogFilesClient. + * An instance of this class provides access to all the operations defined in CapturedLogsClient. */ -public final class LogFilesClientImpl implements LogFilesClient { +public final class CapturedLogsClientImpl implements CapturedLogsClient { /** * The proxy service used to perform REST calls. */ - private final LogFilesService service; + private final CapturedLogsService service; /** * The service client containing this operation class. @@ -46,27 +46,28 @@ public final class LogFilesClientImpl implements LogFilesClient { private final PostgreSqlManagementClientImpl client; /** - * Initializes an instance of LogFilesClientImpl. + * Initializes an instance of CapturedLogsClientImpl. * * @param client the instance of the service client containing this operation class. */ - LogFilesClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(LogFilesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + CapturedLogsClientImpl(PostgreSqlManagementClientImpl client) { + this.service + = RestProxy.create(CapturedLogsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for PostgreSqlManagementClientLogFiles to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for PostgreSqlManagementClientCapturedLogs to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface LogFilesService { + @ServiceInterface(name = "PostgreSqlManagementClientCapturedLogs") + public interface CapturedLogsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/logFiles") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -75,7 +76,7 @@ Mono> listByServer(@HostParam("$host") String endpoi @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/logFiles") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -84,30 +85,30 @@ Response listByServerSync(@HostParam("$host") String endpoint @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Mono> listByServerNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a List of logFiles along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of log files along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -127,39 +128,39 @@ private Mono> listByServerSinglePageAsync(String res return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a List of logFiles as paginated response with {@link PagedFlux}. + * @return list of log files as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { + public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a List of logFiles along with {@link PagedResponse}. + * @return list of log files along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -179,15 +180,14 @@ private PagedResponse listByServerSinglePage(String resourceGroupN .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -195,10 +195,10 @@ private PagedResponse listByServerSinglePage(String resourceGroupN * @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 a List of logFiles along with {@link PagedResponse}. + * @return list of log files along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -219,31 +219,30 @@ private PagedResponse listByServerSinglePage(String resourceGroupN .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a List of logFiles as paginated response with {@link PagedIterable}. + * @return list of log files as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { + public PagedIterable listByServer(String resourceGroupName, String serverName) { return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), nextLink -> listByServerNextSinglePage(nextLink)); } /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -251,10 +250,10 @@ public PagedIterable listByServer(String resourceGroupName, String * @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 a List of logFiles as paginated response with {@link PagedIterable}. + * @return list of log files as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePage(nextLink, context)); } @@ -266,10 +265,10 @@ public PagedIterable listByServer(String resourceGroupName, String * @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 a List of logFiles along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of log files along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync(String nextLink) { + private Mono> listByServerNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -280,7 +279,7 @@ private Mono> listByServerNextSinglePageAsync(String final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -292,10 +291,10 @@ private Mono> listByServerNextSinglePageAsync(String * @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 a List of logFiles along with {@link PagedResponse}. + * @return list of log files along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink) { + private PagedResponse listByServerNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -306,7 +305,7 @@ private PagedResponse listByServerNextSinglePage(String nextLink) "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -320,10 +319,10 @@ private PagedResponse listByServerNextSinglePage(String nextLink) * @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 a List of logFiles along with {@link PagedResponse}. + * @return list of log files along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { + private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -334,11 +333,11 @@ private PagedResponse listByServerNextSinglePage(String nextLink, "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - private static final ClientLogger LOGGER = new ClientLogger(LogFilesClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(CapturedLogsClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsImpl.java similarity index 56% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsImpl.java index 5695d86fc458..70236c20287d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsImpl.java @@ -7,36 +7,36 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerCapabilitiesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerCapability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerCapabilities; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapturedLogsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapturedLog; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapturedLogs; -public final class ServerCapabilitiesImpl implements ServerCapabilities { - private static final ClientLogger LOGGER = new ClientLogger(ServerCapabilitiesImpl.class); +public final class CapturedLogsImpl implements CapturedLogs { + private static final ClientLogger LOGGER = new ClientLogger(CapturedLogsImpl.class); - private final ServerCapabilitiesClient innerClient; + private final CapturedLogsClient innerClient; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - public ServerCapabilitiesImpl(ServerCapabilitiesClient innerClient, + public CapturedLogsImpl(CapturedLogsClient innerClient, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String serverName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FlexibleServerCapabilityImpl(inner1, this.manager())); + public PagedIterable listByServer(String resourceGroupName, String serverName) { + PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapturedLogImpl(inner1, this.manager())); } - public PagedIterable list(String resourceGroupName, String serverName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FlexibleServerCapabilityImpl(inner1, this.manager())); + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapturedLogImpl(inner1, this.manager())); } - private ServerCapabilitiesClient serviceClient() { + private CapturedLogsClient serviceClient() { return this.innerClient; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java deleted file mode 100644 index 35de40384bc5..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java +++ /dev/null @@ -1,179 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -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.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.resourcemanager.postgresqlflexibleserver.fluent.CheckNameAvailabilitiesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in CheckNameAvailabilitiesClient. - */ -public final class CheckNameAvailabilitiesClientImpl implements CheckNameAvailabilitiesClient { - /** - * The proxy service used to perform REST calls. - */ - private final CheckNameAvailabilitiesService service; - - /** - * The service client containing this operation class. - */ - private final PostgreSqlManagementClientImpl client; - - /** - * Initializes an instance of CheckNameAvailabilitiesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - CheckNameAvailabilitiesClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(CheckNameAvailabilitiesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PostgreSqlManagementClientCheckNameAvailabilities to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface CheckNameAvailabilitiesService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> execute(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") CheckNameAvailabilityRequest nameAvailabilityRequest, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response executeSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") CheckNameAvailabilityRequest nameAvailabilityRequest, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @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 represents a resource name availability along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - executeWithResponseAsync(CheckNameAvailabilityRequest nameAvailabilityRequest) { - 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.")); - } - if (nameAvailabilityRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null.")); - } else { - nameAvailabilityRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.execute(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), nameAvailabilityRequest, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @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 represents a resource name availability on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono executeAsync(CheckNameAvailabilityRequest nameAvailabilityRequest) { - return executeWithResponseAsync(nameAvailabilityRequest).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @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 represents a resource name availability along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response executeWithResponse(CheckNameAvailabilityRequest nameAvailabilityRequest, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (nameAvailabilityRequest == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null.")); - } else { - nameAvailabilityRequest.validate(); - } - final String accept = "application/json"; - return service.executeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), nameAvailabilityRequest, accept, context); - } - - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @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 represents a resource name availability. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NameAvailabilityInner execute(CheckNameAvailabilityRequest nameAvailabilityRequest) { - return executeWithResponse(nameAvailabilityRequest, Context.NONE).getValue(); - } - - private static final ClientLogger LOGGER = new ClientLogger(CheckNameAvailabilitiesClientImpl.class); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java deleted file mode 100644 index f2687b661f16..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java +++ /dev/null @@ -1,58 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CheckNameAvailabilitiesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilities; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailability; - -public final class CheckNameAvailabilitiesImpl implements CheckNameAvailabilities { - private static final ClientLogger LOGGER = new ClientLogger(CheckNameAvailabilitiesImpl.class); - - private final CheckNameAvailabilitiesClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public CheckNameAvailabilitiesImpl(CheckNameAvailabilitiesClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response executeWithResponse(CheckNameAvailabilityRequest nameAvailabilityRequest, - Context context) { - Response inner - = this.serviceClient().executeWithResponse(nameAvailabilityRequest, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NameAvailabilityImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public NameAvailability execute(CheckNameAvailabilityRequest nameAvailabilityRequest) { - NameAvailabilityInner inner = this.serviceClient().execute(nameAvailabilityRequest); - if (inner != null) { - return new NameAvailabilityImpl(inner, this.manager()); - } else { - return null; - } - } - - private CheckNameAvailabilitiesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsClientImpl.java deleted file mode 100644 index da5dd38d0384..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsClientImpl.java +++ /dev/null @@ -1,194 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -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.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.resourcemanager.postgresqlflexibleserver.fluent.CheckNameAvailabilityWithLocationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in CheckNameAvailabilityWithLocationsClient. - */ -public final class CheckNameAvailabilityWithLocationsClientImpl implements CheckNameAvailabilityWithLocationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final CheckNameAvailabilityWithLocationsService service; - - /** - * The service client containing this operation class. - */ - private final PostgreSqlManagementClientImpl client; - - /** - * Initializes an instance of CheckNameAvailabilityWithLocationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - CheckNameAvailabilityWithLocationsClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(CheckNameAvailabilityWithLocationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PostgreSqlManagementClientCheckNameAvailabilityWithLocations to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface CheckNameAvailabilityWithLocationsService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> execute(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, - @BodyParam("application/json") CheckNameAvailabilityRequest nameAvailabilityRequest, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response executeSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, - @BodyParam("application/json") CheckNameAvailabilityRequest nameAvailabilityRequest, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @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 represents a resource name availability along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> executeWithResponseAsync(String locationName, - CheckNameAvailabilityRequest nameAvailabilityRequest) { - 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.")); - } - if (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (nameAvailabilityRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null.")); - } else { - nameAvailabilityRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.execute(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, nameAvailabilityRequest, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @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 represents a resource name availability on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono executeAsync(String locationName, - CheckNameAvailabilityRequest nameAvailabilityRequest) { - return executeWithResponseAsync(locationName, nameAvailabilityRequest) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @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 represents a resource name availability along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response executeWithResponse(String locationName, - CheckNameAvailabilityRequest nameAvailabilityRequest, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (locationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (nameAvailabilityRequest == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null.")); - } else { - nameAvailabilityRequest.validate(); - } - final String accept = "application/json"; - return service.executeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, nameAvailabilityRequest, accept, context); - } - - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @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 represents a resource name availability. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NameAvailabilityInner execute(String locationName, CheckNameAvailabilityRequest nameAvailabilityRequest) { - return executeWithResponse(locationName, nameAvailabilityRequest, Context.NONE).getValue(); - } - - private static final ClientLogger LOGGER = new ClientLogger(CheckNameAvailabilityWithLocationsClientImpl.class); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsImpl.java deleted file mode 100644 index 5ef22f95fa7e..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsImpl.java +++ /dev/null @@ -1,58 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CheckNameAvailabilityWithLocationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityWithLocations; -import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailability; - -public final class CheckNameAvailabilityWithLocationsImpl implements CheckNameAvailabilityWithLocations { - private static final ClientLogger LOGGER = new ClientLogger(CheckNameAvailabilityWithLocationsImpl.class); - - private final CheckNameAvailabilityWithLocationsClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public CheckNameAvailabilityWithLocationsImpl(CheckNameAvailabilityWithLocationsClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response executeWithResponse(String locationName, - CheckNameAvailabilityRequest nameAvailabilityRequest, Context context) { - Response inner - = this.serviceClient().executeWithResponse(locationName, nameAvailabilityRequest, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NameAvailabilityImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public NameAvailability execute(String locationName, CheckNameAvailabilityRequest nameAvailabilityRequest) { - NameAvailabilityInner inner = this.serviceClient().execute(locationName, nameAvailabilityRequest); - if (inner != null) { - return new NameAvailabilityImpl(inner, this.manager()); - } else { - return null; - } - } - - private CheckNameAvailabilityWithLocationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationImpl.java index eff6375328f5..7ca67bf684e8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationImpl.java @@ -94,6 +94,8 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man private String configurationName; + private ConfigurationForUpdate createParameters; + private ConfigurationForUpdate updateParameters; public ConfigurationImpl withExistingFlexibleServer(String resourceGroupName, String serverName) { @@ -105,14 +107,14 @@ public ConfigurationImpl withExistingFlexibleServer(String resourceGroupName, St public Configuration create() { this.innerObject = serviceManager.serviceClient() .getConfigurations() - .put(resourceGroupName, serverName, configurationName, this.innerModel(), Context.NONE); + .put(resourceGroupName, serverName, configurationName, createParameters, Context.NONE); return this; } public Configuration create(Context context) { this.innerObject = serviceManager.serviceClient() .getConfigurations() - .put(resourceGroupName, serverName, configurationName, this.innerModel(), context); + .put(resourceGroupName, serverName, configurationName, createParameters, context); return this; } @@ -121,6 +123,7 @@ public Configuration create(Context context) { this.innerObject = new ConfigurationInner(); this.serviceManager = serviceManager; this.configurationName = name; + this.createParameters = new ConfigurationForUpdate(); } public ConfigurationImpl update() { @@ -169,7 +172,7 @@ public Configuration refresh(Context context) { public ConfigurationImpl withValue(String value) { if (isInCreateMode()) { - this.innerModel().withValue(value); + this.createParameters.withValue(value); return this; } else { this.updateParameters.withValue(value); @@ -179,7 +182,7 @@ public ConfigurationImpl withValue(String value) { public ConfigurationImpl withSource(String source) { if (isInCreateMode()) { - this.innerModel().withSource(source); + this.createParameters.withSource(source); return this; } else { this.updateParameters.withSource(source); @@ -188,6 +191,6 @@ public ConfigurationImpl withSource(String source) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsClientImpl.java index 903a782d48df..54b4a8797c90 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsClientImpl.java @@ -36,7 +36,7 @@ import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationForUpdate; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -71,13 +71,13 @@ public final class ConfigurationsClientImpl implements ConfigurationsClient { * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientConfigurations") public interface ConfigurationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -86,7 +86,7 @@ Mono> listByServer(@HostParam("$host") String @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -113,7 +113,7 @@ Response getSync(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -124,7 +124,7 @@ Mono>> update(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response updateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -135,31 +135,31 @@ Response updateSync(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> put(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("configurationName") String configurationName, - @BodyParam("application/json") ConfigurationInner parameters, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConfigurationForUpdate parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response putSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("configurationName") String configurationName, - @BodyParam("application/json") ConfigurationInner parameters, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ConfigurationForUpdate parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( + Mono> listByServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -167,21 +167,20 @@ Mono> listByServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of server configurations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of configurations (also known as server parameters) along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, @@ -211,14 +210,14 @@ private Mono> listByServerSinglePageAsync(Stri } /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of server configurations as paginated response with {@link PagedFlux}. + * @return list of configurations (also known as server parameters) as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -227,14 +226,14 @@ public PagedFlux listByServerAsync(String resourceGroupName, } /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of server configurations along with {@link PagedResponse}. + * @return list of configurations (also known as server parameters) along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { @@ -257,7 +256,7 @@ private PagedResponse listByServerSinglePage(String resource .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -265,7 +264,7 @@ private PagedResponse listByServerSinglePage(String resource } /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -273,7 +272,7 @@ private PagedResponse listByServerSinglePage(String resource * @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 a list of server configurations along with {@link PagedResponse}. + * @return list of configurations (also known as server parameters) along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, @@ -297,7 +296,7 @@ private PagedResponse listByServerSinglePage(String resource .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -305,14 +304,15 @@ private PagedResponse listByServerSinglePage(String resource } /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of server configurations as paginated response with {@link PagedIterable}. + * @return list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -321,7 +321,7 @@ public PagedIterable listByServer(String resourceGroupName, } /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -329,7 +329,8 @@ public PagedIterable listByServer(String resourceGroupName, * @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 a list of server configurations as paginated response with {@link PagedIterable}. + * @return list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName, @@ -339,16 +340,16 @@ public PagedIterable listByServer(String resourceGroupName, } /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server parameter). * @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 information about a configuration of server along with {@link Response} on successful completion of - * {@link Mono}. + * @return information about a specific configuration (also known as server parameter) of a server along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(String resourceGroupName, String serverName, @@ -380,15 +381,16 @@ public Mono> getWithResponseAsync(String resourceGr } /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server parameter). * @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 information about a configuration of server on successful completion of {@link Mono}. + * @return information about a specific configuration (also known as server parameter) of a server on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAsync(String resourceGroupName, String serverName, String configurationName) { @@ -397,16 +399,17 @@ public Mono getAsync(String resourceGroupName, String server } /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server parameter). * @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 information about a configuration of server along with {@link Response}. + * @return information about a specific configuration (also known as server parameter) of a server along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String serverName, @@ -439,15 +442,15 @@ public Response getWithResponse(String resourceGroupName, St } /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server parameter). * @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 information about a configuration of server. + * @return information about a specific configuration (also known as server parameter) of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) public ConfigurationInner get(String resourceGroupName, String serverName, String configurationName) { @@ -455,16 +458,18 @@ public ConfigurationInner get(String resourceGroupName, String serverName, Strin } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 represents a Configuration along with {@link Response} on successful completion of {@link Mono}. + * @return configuration (also known as server parameter) along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, @@ -502,16 +507,17 @@ public Mono>> updateWithResponseAsync(String resourceG } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 represents a Configuration along with {@link Response}. + * @return configuration (also known as server parameter) along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, @@ -551,17 +557,18 @@ private Response updateWithResponse(String resourceGroupName, String } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 represents a Configuration along with {@link Response}. + * @return configuration (also known as server parameter) along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, @@ -601,16 +608,17 @@ private Response updateWithResponse(String resourceGroupName, String } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 {@link PollerFlux} for polling of represents a Configuration. + * @return the {@link PollerFlux} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ConfigurationInner> beginUpdateAsync(String resourceGroupName, @@ -622,16 +630,17 @@ public PollerFlux, ConfigurationInner> beginUpdat } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 {@link SyncPoller} for polling of represents a Configuration. + * @return the {@link SyncPoller} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName, @@ -643,17 +652,18 @@ public SyncPoller, ConfigurationInner> beginUpdat } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 {@link SyncPoller} for polling of represents a Configuration. + * @return the {@link SyncPoller} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName, @@ -665,16 +675,17 @@ public SyncPoller, ConfigurationInner> beginUpdat } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 represents a Configuration on successful completion of {@link Mono}. + * @return configuration (also known as server parameter) on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateAsync(String resourceGroupName, String serverName, String configurationName, @@ -684,16 +695,17 @@ public Mono updateAsync(String resourceGroupName, String ser } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 represents a Configuration. + * @return configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.SINGLE) public ConfigurationInner update(String resourceGroupName, String serverName, String configurationName, @@ -702,17 +714,18 @@ public ConfigurationInner update(String resourceGroupName, String serverName, St } /** - * Updates a configuration of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 represents a Configuration. + * @return configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.SINGLE) public ConfigurationInner update(String resourceGroupName, String serverName, String configurationName, @@ -721,20 +734,23 @@ public ConfigurationInner update(String resourceGroupName, String serverName, St } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 represents a Configuration along with {@link Response} on successful completion of {@link Mono}. + * @return configuration (also known as server parameter) along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> putWithResponseAsync(String resourceGroupName, String serverName, - String configurationName, ConfigurationInner parameters) { + String configurationName, ConfigurationForUpdate parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -768,20 +784,22 @@ public Mono>> putWithResponseAsync(String resourceGrou } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 represents a Configuration along with {@link Response}. + * @return configuration (also known as server parameter) along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response putWithResponse(String resourceGroupName, String serverName, String configurationName, - ConfigurationInner parameters) { + ConfigurationForUpdate parameters) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -816,21 +834,23 @@ private Response putWithResponse(String resourceGroupName, String se } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 represents a Configuration along with {@link Response}. + * @return configuration (also known as server parameter) along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response putWithResponse(String resourceGroupName, String serverName, String configurationName, - ConfigurationInner parameters, Context context) { + ConfigurationForUpdate parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -865,20 +885,22 @@ private Response putWithResponse(String resourceGroupName, String se } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 {@link PollerFlux} for polling of represents a Configuration. + * @return the {@link PollerFlux} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ConfigurationInner> beginPutAsync(String resourceGroupName, - String serverName, String configurationName, ConfigurationInner parameters) { + String serverName, String configurationName, ConfigurationForUpdate parameters) { Mono>> mono = putWithResponseAsync(resourceGroupName, serverName, configurationName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), @@ -886,41 +908,45 @@ public PollerFlux, ConfigurationInner> beginPutAs } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 {@link SyncPoller} for polling of represents a Configuration. + * @return the {@link SyncPoller} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationInner> beginPut(String resourceGroupName, - String serverName, String configurationName, ConfigurationInner parameters) { + String serverName, String configurationName, ConfigurationForUpdate parameters) { Response response = putWithResponse(resourceGroupName, serverName, configurationName, parameters); return this.client.getLroResult(response, ConfigurationInner.class, ConfigurationInner.class, Context.NONE); } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 {@link SyncPoller} for polling of represents a Configuration. + * @return the {@link SyncPoller} for polling of configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationInner> beginPut(String resourceGroupName, - String serverName, String configurationName, ConfigurationInner parameters, Context context) { + String serverName, String configurationName, ConfigurationForUpdate parameters, Context context) { Response response = putWithResponse(resourceGroupName, serverName, configurationName, parameters, context); return this.client.getLroResult(response, ConfigurationInner.class, @@ -928,58 +954,64 @@ public SyncPoller, ConfigurationInner> beginPut(S } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 represents a Configuration on successful completion of {@link Mono}. + * @return configuration (also known as server parameter) on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono putAsync(String resourceGroupName, String serverName, String configurationName, - ConfigurationInner parameters) { + ConfigurationForUpdate parameters) { return beginPutAsync(resourceGroupName, serverName, configurationName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 represents a Configuration. + * @return configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.SINGLE) public ConfigurationInner put(String resourceGroupName, String serverName, String configurationName, - ConfigurationInner parameters) { + ConfigurationForUpdate parameters) { return beginPut(resourceGroupName, serverName, configurationName, parameters).getFinalResult(); } /** - * Updates a configuration of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. - * @param parameters The required parameters for updating a server configuration. + * @param configurationName Name of the configuration (also known as server parameter). + * @param parameters Parameters required to update the value of a specific modifiable configuration (also known as + * server parameter). * @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 represents a Configuration. + * @return configuration (also known as server parameter). */ @ServiceMethod(returns = ReturnType.SINGLE) public ConfigurationInner put(String resourceGroupName, String serverName, String configurationName, - ConfigurationInner parameters, Context context) { + ConfigurationForUpdate parameters, Context context) { return beginPut(resourceGroupName, serverName, configurationName, parameters, context).getFinalResult(); } @@ -990,8 +1022,8 @@ public ConfigurationInner put(String resourceGroupName, String serverName, Strin * @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 a list of server configurations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of configurations (also known as server parameters) along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -1017,7 +1049,7 @@ private Mono> listByServerNextSinglePageAsync( * @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 a list of server configurations along with {@link PagedResponse}. + * @return list of configurations (also known as server parameters) along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { @@ -1031,7 +1063,7 @@ private PagedResponse listByServerNextSinglePage(String next "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -1045,7 +1077,7 @@ private PagedResponse listByServerNextSinglePage(String next * @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 a list of server configurations along with {@link PagedResponse}. + * @return list of configurations (also known as server parameters) along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { @@ -1059,7 +1091,7 @@ private PagedResponse listByServerNextSinglePage(String next "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesClientImpl.java index 12a9c2f0e77b..3985d46dfd6b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesClientImpl.java @@ -35,7 +35,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.DatabaseInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.DatabaseListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DatabaseList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -70,11 +70,11 @@ public final class DatabasesClientImpl implements DatabasesClient { * to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientDatabases") public interface DatabasesService { @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> create(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -84,7 +84,7 @@ Mono>> create(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response createSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -94,7 +94,7 @@ Response createSync(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -103,7 +103,7 @@ Mono>> delete(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Response deleteSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -132,7 +132,7 @@ Response getSync(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -141,7 +141,7 @@ Mono> listByServer(@HostParam("$host") String endpo @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -150,30 +150,29 @@ Response listByServerSync(@HostParam("$host") String endpoin @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Mono> listByServerNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @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 represents a Database along with {@link Response} on successful completion of {@link Mono}. + * @return represents a database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createWithResponseAsync(String resourceGroupName, String serverName, @@ -208,16 +207,17 @@ public Mono>> createWithResponseAsync(String resourceG } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @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 represents a Database along with {@link Response}. + * @return represents a database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, String databaseName, @@ -257,17 +257,18 @@ private Response createWithResponse(String resourceGroupName, String } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @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 represents a Database along with {@link Response}. + * @return represents a database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, String databaseName, @@ -306,16 +307,17 @@ private Response createWithResponse(String resourceGroupName, String } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @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 {@link PollerFlux} for polling of represents a Database. + * @return the {@link PollerFlux} for polling of represents a database. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, DatabaseInner> beginCreateAsync(String resourceGroupName, @@ -327,16 +329,17 @@ public PollerFlux, DatabaseInner> beginCreateAsync(Str } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @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 {@link SyncPoller} for polling of represents a Database. + * @return the {@link SyncPoller} for polling of represents a database. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatabaseInner> beginCreate(String resourceGroupName, String serverName, @@ -347,17 +350,18 @@ public SyncPoller, DatabaseInner> beginCreate(String r } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @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 {@link SyncPoller} for polling of represents a Database. + * @return the {@link SyncPoller} for polling of represents a database. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatabaseInner> beginCreate(String resourceGroupName, String serverName, @@ -369,16 +373,17 @@ public SyncPoller, DatabaseInner> beginCreate(String r } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @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 represents a Database on successful completion of {@link Mono}. + * @return represents a database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createAsync(String resourceGroupName, String serverName, String databaseName, @@ -388,16 +393,17 @@ public Mono createAsync(String resourceGroupName, String serverNa } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @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 represents a Database. + * @return represents a database. */ @ServiceMethod(returns = ReturnType.SINGLE) public DatabaseInner create(String resourceGroupName, String serverName, String databaseName, @@ -406,17 +412,18 @@ public DatabaseInner create(String resourceGroupName, String serverName, String } /** - * Creates a new database or updates an existing database. + * Creates a new database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The required parameters for creating or updating a database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @param parameters Parameters required to create a new database. * @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 represents a Database. + * @return represents a database. */ @ServiceMethod(returns = ReturnType.SINGLE) public DatabaseInner create(String resourceGroupName, String serverName, String databaseName, @@ -425,11 +432,12 @@ public DatabaseInner create(String resourceGroupName, String serverName, String } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @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. @@ -464,11 +472,12 @@ public Mono>> deleteWithResponseAsync(String resourceG } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @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. @@ -504,11 +513,12 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @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. @@ -546,11 +556,12 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @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. @@ -565,11 +576,12 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @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. @@ -583,11 +595,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @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. @@ -602,11 +615,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @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. @@ -619,11 +633,12 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @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. @@ -634,11 +649,12 @@ public void delete(String resourceGroupName, String serverName, String databaseN } /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @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. @@ -650,15 +666,17 @@ public void delete(String resourceGroupName, String serverName, String databaseN } /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @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 information about a database along with {@link Response} on successful completion of {@link Mono}. + * @return information about an existing database along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(String resourceGroupName, String serverName, @@ -689,15 +707,16 @@ public Mono> getWithResponseAsync(String resourceGroupNa } /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @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 information about a database on successful completion of {@link Mono}. + * @return information about an existing database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAsync(String resourceGroupName, String serverName, String databaseName) { @@ -706,16 +725,17 @@ public Mono getAsync(String resourceGroupName, String serverName, } /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @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 information about a database along with {@link Response}. + * @return information about an existing database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, @@ -748,15 +768,16 @@ public Response getWithResponse(String resourceGroupName, String } /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @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 information about a database. + * @return information about an existing database. */ @ServiceMethod(returns = ReturnType.SINGLE) public DatabaseInner get(String resourceGroupName, String serverName, String databaseName) { @@ -764,14 +785,15 @@ public DatabaseInner get(String resourceGroupName, String serverName, String dat } /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a List of databases along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of all databases in a server along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, @@ -801,14 +823,14 @@ private Mono> listByServerSinglePageAsync(String re } /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a List of databases as paginated response with {@link PagedFlux}. + * @return list of all databases in a server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -817,14 +839,14 @@ public PagedFlux listByServerAsync(String resourceGroupName, Stri } /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a List of databases along with {@link PagedResponse}. + * @return list of all databases in a server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { @@ -847,15 +869,14 @@ private PagedResponse listByServerSinglePage(String resourceGroup .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -863,7 +884,7 @@ private PagedResponse listByServerSinglePage(String resourceGroup * @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 a List of databases along with {@link PagedResponse}. + * @return list of all databases in a server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, @@ -887,22 +908,21 @@ private PagedResponse listByServerSinglePage(String resourceGroup .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a List of databases as paginated response with {@link PagedIterable}. + * @return list of all databases in a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -911,7 +931,7 @@ public PagedIterable listByServer(String resourceGroupName, Strin } /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -919,7 +939,7 @@ public PagedIterable listByServer(String resourceGroupName, Strin * @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 a List of databases as paginated response with {@link PagedIterable}. + * @return list of all databases in a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { @@ -934,7 +954,8 @@ public PagedIterable listByServer(String resourceGroupName, Strin * @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 a List of databases along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of all databases in a server along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -960,7 +981,7 @@ private Mono> listByServerNextSinglePageAsync(Strin * @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 a List of databases along with {@link PagedResponse}. + * @return list of all databases in a server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { @@ -974,7 +995,7 @@ private PagedResponse listByServerNextSinglePage(String nextLink) "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -988,7 +1009,7 @@ private PagedResponse listByServerNextSinglePage(String nextLink) * @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 a List of databases along with {@link PagedResponse}. + * @return list of all databases in a server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { @@ -1002,8 +1023,7 @@ private PagedResponse listByServerNextSinglePage(String nextLink, "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesClientImpl.java index fa6f66c2707a..4c92fe1d5af7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesClientImpl.java @@ -35,7 +35,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FirewallRuleInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FirewallRuleListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.FirewallRuleList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -70,11 +70,11 @@ public final class FirewallRulesClientImpl implements FirewallRulesClient { * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientFirewallRules") public interface FirewallRulesService { @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -85,7 +85,7 @@ Mono>> createOrUpdate(@HostParam("$host") String endpo @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response createOrUpdateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -96,7 +96,7 @@ Response createOrUpdateSync(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -106,7 +106,7 @@ Mono>> delete(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Response deleteSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -138,7 +138,7 @@ Response getSync(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -147,7 +147,7 @@ Mono> listByServer(@HostParam("$host") String e @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -156,7 +156,7 @@ Response listByServerSync(@HostParam("$host") String end @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( + Mono> listByServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -164,9 +164,8 @@ Mono> listByServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -174,12 +173,12 @@ Response listByServerNextSync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @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 represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}. + * @return firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, @@ -221,12 +220,12 @@ public Mono>> createOrUpdateWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @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 represents a server firewall rule along with {@link Response}. + * @return firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, @@ -270,13 +269,13 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @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 represents a server firewall rule along with {@link Response}. + * @return firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, @@ -320,12 +319,12 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @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 {@link PollerFlux} for polling of represents a server firewall rule. + * @return the {@link PollerFlux} for polling of firewall rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, FirewallRuleInner> beginCreateOrUpdateAsync( @@ -341,12 +340,12 @@ public PollerFlux, FirewallRuleInner> beginCreateO * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @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 {@link SyncPoller} for polling of represents a server firewall rule. + * @return the {@link SyncPoller} for polling of firewall rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName, @@ -362,13 +361,13 @@ public SyncPoller, FirewallRuleInner> beginCreateO * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @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 {@link SyncPoller} for polling of represents a server firewall rule. + * @return the {@link SyncPoller} for polling of firewall rule. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName, @@ -384,12 +383,12 @@ public SyncPoller, FirewallRuleInner> beginCreateO * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @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 represents a server firewall rule on successful completion of {@link Mono}. + * @return firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync(String resourceGroupName, String serverName, @@ -403,12 +402,12 @@ public Mono createOrUpdateAsync(String resourceGroupName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @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 represents a server firewall rule. + * @return firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) public FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, @@ -421,13 +420,13 @@ public FirewallRuleInner createOrUpdate(String resourceGroupName, String serverN * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param firewallRuleName Name of the firewall rule. + * @param parameters Parameters required for creating or updating a firewall rule. * @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 represents a server firewall rule. + * @return firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) public FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, @@ -437,11 +436,11 @@ public FirewallRuleInner createOrUpdate(String resourceGroupName, String serverN } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @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. @@ -477,11 +476,11 @@ public Mono>> deleteWithResponseAsync(String resourceG } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @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. @@ -518,11 +517,11 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @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. @@ -560,11 +559,11 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @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. @@ -580,11 +579,11 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @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. @@ -598,11 +597,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @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. @@ -617,11 +616,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @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. @@ -634,11 +633,11 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @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. @@ -649,11 +648,11 @@ public void delete(String resourceGroupName, String serverName, String firewallR } /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @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. @@ -665,15 +664,16 @@ public void delete(String resourceGroupName, String serverName, String firewallR } /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @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 represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}. + * @return information about a firewall rule in a server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(String resourceGroupName, String serverName, @@ -705,15 +705,15 @@ public Mono> getWithResponseAsync(String resourceGro } /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @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 represents a server firewall rule on successful completion of {@link Mono}. + * @return information about a firewall rule in a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAsync(String resourceGroupName, String serverName, String firewallRuleName) { @@ -722,16 +722,16 @@ public Mono getAsync(String resourceGroupName, String serverN } /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @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 represents a server firewall rule along with {@link Response}. + * @return information about a firewall rule in a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String serverName, @@ -764,15 +764,15 @@ public Response getWithResponse(String resourceGroupName, Str } /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @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 represents a server firewall rule. + * @return information about a firewall rule in a server. */ @ServiceMethod(returns = ReturnType.SINGLE) public FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName) { @@ -780,14 +780,14 @@ public FirewallRuleInner get(String resourceGroupName, String serverName, String } /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, @@ -817,14 +817,14 @@ private Mono> listByServerSinglePageAsync(Strin } /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of firewall rules as paginated response with {@link PagedFlux}. + * @return list of firewall rules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -833,14 +833,14 @@ public PagedFlux listByServerAsync(String resourceGroupName, } /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of firewall rules along with {@link PagedResponse}. + * @return list of firewall rules along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { @@ -863,7 +863,7 @@ private PagedResponse listByServerSinglePage(String resourceG .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -871,7 +871,7 @@ private PagedResponse listByServerSinglePage(String resourceG } /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -879,7 +879,7 @@ private PagedResponse listByServerSinglePage(String resourceG * @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 a list of firewall rules along with {@link PagedResponse}. + * @return list of firewall rules along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, @@ -903,7 +903,7 @@ private PagedResponse listByServerSinglePage(String resourceG .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -911,14 +911,14 @@ private PagedResponse listByServerSinglePage(String resourceG } /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of firewall rules as paginated response with {@link PagedIterable}. + * @return list of firewall rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -927,7 +927,7 @@ public PagedIterable listByServer(String resourceGroupName, S } /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -935,7 +935,7 @@ public PagedIterable listByServer(String resourceGroupName, S * @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 a list of firewall rules as paginated response with {@link PagedIterable}. + * @return list of firewall rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { @@ -950,7 +950,7 @@ public PagedIterable listByServer(String resourceGroupName, S * @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 a list of firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -976,7 +976,7 @@ private Mono> listByServerNextSinglePageAsync(S * @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 a list of firewall rules along with {@link PagedResponse}. + * @return list of firewall rules along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { @@ -990,7 +990,7 @@ private PagedResponse listByServerNextSinglePage(String nextL "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -1004,7 +1004,7 @@ private PagedResponse listByServerNextSinglePage(String nextL * @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 a list of firewall rules along with {@link PagedResponse}. + * @return list of firewall rules along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { @@ -1018,7 +1018,7 @@ private PagedResponse listByServerNextSinglePage(String nextL "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersClientImpl.java deleted file mode 100644 index 0c99782d618e..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersClientImpl.java +++ /dev/null @@ -1,480 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -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.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.FlexibleServersClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrBackupResponseInner; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServersTriggerLtrPreBackupResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupRequest; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in FlexibleServersClient. - */ -public final class FlexibleServersClientImpl implements FlexibleServersClient { - /** - * The proxy service used to perform REST calls. - */ - private final FlexibleServersService service; - - /** - * The service client containing this operation class. - */ - private final PostgreSqlManagementClientImpl client; - - /** - * Initializes an instance of FlexibleServersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - FlexibleServersClientImpl(PostgreSqlManagementClientImpl client) { - this.service - = RestProxy.create(FlexibleServersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PostgreSqlManagementClientFlexibleServers to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface FlexibleServersService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrPreBackup") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono triggerLtrPreBackup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") LtrPreBackupRequest parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrPreBackup") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - FlexibleServersTriggerLtrPreBackupResponse triggerLtrPreBackupSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") LtrPreBackupRequest parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/startLtrBackup") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> startLtrBackup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") LtrBackupRequest parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/startLtrBackup") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response startLtrBackupSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") LtrBackupRequest parameters, @HeaderParam("Accept") String accept, - Context context); - } - - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for 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 response for the LTR pre-backup API call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono triggerLtrPreBackupWithResponseAsync( - String resourceGroupName, String serverName, LtrPreBackupRequest parameters) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName 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 accept = "application/json"; - return FluxUtil - .withContext(context -> service.triggerLtrPreBackup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for 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 response for the LTR pre-backup API call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono triggerLtrPreBackupAsync(String resourceGroupName, String serverName, - LtrPreBackupRequest parameters) { - return triggerLtrPreBackupWithResponseAsync(resourceGroupName, serverName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @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 response for the LTR pre-backup API call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FlexibleServersTriggerLtrPreBackupResponse triggerLtrPreBackupWithResponse(String resourceGroupName, - String serverName, LtrPreBackupRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.triggerLtrPreBackupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); - } - - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for 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 response for the LTR pre-backup API call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LtrPreBackupResponseInner triggerLtrPreBackup(String resourceGroupName, String serverName, - LtrPreBackupRequest parameters) { - return triggerLtrPreBackupWithResponse(resourceGroupName, serverName, parameters, Context.NONE).getValue(); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for 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 response for the LTR backup API call along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> startLtrBackupWithResponseAsync(String resourceGroupName, String serverName, - LtrBackupRequest parameters) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName 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 accept = "application/json"; - return FluxUtil - .withContext(context -> service.startLtrBackup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for 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 response for the LTR backup API call along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response startLtrBackupWithResponse(String resourceGroupName, String serverName, - LtrBackupRequest parameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.startLtrBackupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, Context.NONE); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @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 response for the LTR backup API call along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response startLtrBackupWithResponse(String resourceGroupName, String serverName, - LtrBackupRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.startLtrBackupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for 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 {@link PollerFlux} for polling of response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, LtrBackupResponseInner> - beginStartLtrBackupAsync(String resourceGroupName, String serverName, LtrBackupRequest parameters) { - Mono>> mono - = startLtrBackupWithResponseAsync(resourceGroupName, serverName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), LtrBackupResponseInner.class, LtrBackupResponseInner.class, - this.client.getContext()); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for 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 {@link SyncPoller} for polling of response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LtrBackupResponseInner> - beginStartLtrBackup(String resourceGroupName, String serverName, LtrBackupRequest parameters) { - Response response = startLtrBackupWithResponse(resourceGroupName, serverName, parameters); - return this.client.getLroResult(response, - LtrBackupResponseInner.class, LtrBackupResponseInner.class, Context.NONE); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @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 {@link SyncPoller} for polling of response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LtrBackupResponseInner> - beginStartLtrBackup(String resourceGroupName, String serverName, LtrBackupRequest parameters, Context context) { - Response response = startLtrBackupWithResponse(resourceGroupName, serverName, parameters, context); - return this.client.getLroResult(response, - LtrBackupResponseInner.class, LtrBackupResponseInner.class, context); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for 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 response for the LTR backup API call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono startLtrBackupAsync(String resourceGroupName, String serverName, - LtrBackupRequest parameters) { - return beginStartLtrBackupAsync(resourceGroupName, serverName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for 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 response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LtrBackupResponseInner startLtrBackup(String resourceGroupName, String serverName, - LtrBackupRequest parameters) { - return beginStartLtrBackup(resourceGroupName, serverName, parameters).getFinalResult(); - } - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @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 response for the LTR backup API call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LtrBackupResponseInner startLtrBackup(String resourceGroupName, String serverName, - LtrBackupRequest parameters, Context context) { - return beginStartLtrBackup(resourceGroupName, serverName, parameters, context).getFinalResult(); - } - - private static final ClientLogger LOGGER = new ClientLogger(FlexibleServersClientImpl.class); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersImpl.java deleted file mode 100644 index d5f1f6d4fbd6..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersImpl.java +++ /dev/null @@ -1,84 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.FlexibleServersClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrBackupResponseInner; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServers; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServersTriggerLtrPreBackupResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupRequest; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupResponse; - -public final class FlexibleServersImpl implements FlexibleServers { - private static final ClientLogger LOGGER = new ClientLogger(FlexibleServersImpl.class); - - private final FlexibleServersClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public FlexibleServersImpl(FlexibleServersClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response triggerLtrPreBackupWithResponse(String resourceGroupName, String serverName, - LtrPreBackupRequest parameters, Context context) { - FlexibleServersTriggerLtrPreBackupResponse inner - = this.serviceClient().triggerLtrPreBackupWithResponse(resourceGroupName, serverName, parameters, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new LtrPreBackupResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public LtrPreBackupResponse triggerLtrPreBackup(String resourceGroupName, String serverName, - LtrPreBackupRequest parameters) { - LtrPreBackupResponseInner inner - = this.serviceClient().triggerLtrPreBackup(resourceGroupName, serverName, parameters); - if (inner != null) { - return new LtrPreBackupResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public LtrBackupResponse startLtrBackup(String resourceGroupName, String serverName, LtrBackupRequest parameters) { - LtrBackupResponseInner inner = this.serviceClient().startLtrBackup(resourceGroupName, serverName, parameters); - if (inner != null) { - return new LtrBackupResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public LtrBackupResponse startLtrBackup(String resourceGroupName, String serverName, LtrBackupRequest parameters, - Context context) { - LtrBackupResponseInner inner - = this.serviceClient().startLtrBackup(resourceGroupName, serverName, parameters, context); - if (inner != null) { - return new LtrBackupResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - private FlexibleServersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsImpl.java deleted file mode 100644 index 4e1f59c58901..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsImpl.java +++ /dev/null @@ -1,71 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LtrBackupOperationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrServerBackupOperationInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupOperations; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrServerBackupOperation; - -public final class LtrBackupOperationsImpl implements LtrBackupOperations { - private static final ClientLogger LOGGER = new ClientLogger(LtrBackupOperationsImpl.class); - - private final LtrBackupOperationsClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public LtrBackupOperationsImpl(LtrBackupOperationsClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String serverName, - String backupName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, serverName, backupName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new LtrServerBackupOperationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public LtrServerBackupOperation get(String resourceGroupName, String serverName, String backupName) { - LtrServerBackupOperationInner inner = this.serviceClient().get(resourceGroupName, serverName, backupName); - if (inner != null) { - return new LtrServerBackupOperationImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listByServer(String resourceGroupName, String serverName) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LtrServerBackupOperationImpl(inner1, this.manager())); - } - - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LtrServerBackupOperationImpl(inner1, this.manager())); - } - - private LtrBackupOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationImpl.java similarity index 70% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationResourceImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationImpl.java index fd46bca857a3..361756eec790 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationResourceImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationImpl.java @@ -7,30 +7,30 @@ import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CancelEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Cancel; import com.azure.resourcemanager.postgresqlflexibleserver.models.DbServerMetadata; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceDbEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceServer; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesAndPermissions; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Migration; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationMode; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationOption; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResource; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResourceForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParameters; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParametersForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationStatus; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDbsInTargetEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDatabasesOnTargetServer; import com.azure.resourcemanager.postgresqlflexibleserver.models.SourceType; import com.azure.resourcemanager.postgresqlflexibleserver.models.SslMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.StartDataMigrationEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TriggerCutoverEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StartDataMigration; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TriggerCutover; import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; import java.util.Map; -public final class MigrationResourceImpl - implements MigrationResource, MigrationResource.Definition, MigrationResource.Update { - private MigrationResourceInner innerObject; +public final class MigrationImpl implements Migration, Migration.Definition, Migration.Update { + private MigrationInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; @@ -128,11 +128,11 @@ public List dbsToMigrate() { } } - public LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded() { + public LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded() { return this.innerModel().setupLogicalReplicationOnSourceDbIfNeeded(); } - public OverwriteDbsInTargetEnum overwriteDbsInTarget() { + public OverwriteDatabasesOnTargetServer overwriteDbsInTarget() { return this.innerModel().overwriteDbsInTarget(); } @@ -144,15 +144,15 @@ public OffsetDateTime migrationWindowEndTimeInUtc() { return this.innerModel().migrationWindowEndTimeInUtc(); } - public MigrateRolesEnum migrateRoles() { + public MigrateRolesAndPermissions migrateRoles() { return this.innerModel().migrateRoles(); } - public StartDataMigrationEnum startDataMigration() { + public StartDataMigration startDataMigration() { return this.innerModel().startDataMigration(); } - public TriggerCutoverEnum triggerCutover() { + public TriggerCutover triggerCutover() { return this.innerModel().triggerCutover(); } @@ -165,7 +165,7 @@ public List dbsToTriggerCutoverOn() { } } - public CancelEnum cancel() { + public Cancel cancel() { return this.innerModel().cancel(); } @@ -190,7 +190,7 @@ public String resourceGroupName() { return resourceGroupName; } - public MigrationResourceInner innerModel() { + public MigrationInner innerModel() { return this.innerObject; } @@ -198,109 +198,99 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man return this.serviceManager; } - private String subscriptionId; - private String resourceGroupName; - private String targetDbServerName; + private String serverName; private String migrationName; private MigrationResourceForPatch updateParameters; - public MigrationResourceImpl withExistingFlexibleServer(String subscriptionId, String resourceGroupName, - String targetDbServerName) { - this.subscriptionId = subscriptionId; + public MigrationImpl withExistingFlexibleServer(String resourceGroupName, String serverName) { this.resourceGroupName = resourceGroupName; - this.targetDbServerName = targetDbServerName; + this.serverName = serverName; return this; } - public MigrationResource create() { + public Migration create() { this.innerObject = serviceManager.serviceClient() .getMigrations() - .createWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, this.innerModel(), - Context.NONE) + .createWithResponse(resourceGroupName, serverName, migrationName, this.innerModel(), Context.NONE) .getValue(); return this; } - public MigrationResource create(Context context) { + public Migration create(Context context) { this.innerObject = serviceManager.serviceClient() .getMigrations() - .createWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, this.innerModel(), - context) + .createWithResponse(resourceGroupName, serverName, migrationName, this.innerModel(), context) .getValue(); return this; } - MigrationResourceImpl(String name, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerObject = new MigrationResourceInner(); + MigrationImpl(String name, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { + this.innerObject = new MigrationInner(); this.serviceManager = serviceManager; this.migrationName = name; } - public MigrationResourceImpl update() { + public MigrationImpl update() { this.updateParameters = new MigrationResourceForPatch(); return this; } - public MigrationResource apply() { + public Migration apply() { this.innerObject = serviceManager.serviceClient() .getMigrations() - .updateWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, updateParameters, - Context.NONE) + .updateWithResponse(resourceGroupName, serverName, migrationName, updateParameters, Context.NONE) .getValue(); return this; } - public MigrationResource apply(Context context) { + public Migration apply(Context context) { this.innerObject = serviceManager.serviceClient() .getMigrations() - .updateWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, updateParameters, - context) + .updateWithResponse(resourceGroupName, serverName, migrationName, updateParameters, context) .getValue(); return this; } - MigrationResourceImpl(MigrationResourceInner innerObject, + MigrationImpl(MigrationInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.subscriptionId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "subscriptions"); this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.targetDbServerName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "flexibleServers"); + this.serverName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "flexibleServers"); this.migrationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "migrations"); } - public MigrationResource refresh() { + public Migration refresh() { this.innerObject = serviceManager.serviceClient() .getMigrations() - .getWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, Context.NONE) + .getWithResponse(resourceGroupName, serverName, migrationName, Context.NONE) .getValue(); return this; } - public MigrationResource refresh(Context context) { + public Migration refresh(Context context) { this.innerObject = serviceManager.serviceClient() .getMigrations() - .getWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, context) + .getWithResponse(resourceGroupName, serverName, migrationName, context) .getValue(); return this; } - public MigrationResourceImpl withRegion(Region location) { + public MigrationImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; } - public MigrationResourceImpl withRegion(String location) { + public MigrationImpl withRegion(String location) { this.innerModel().withLocation(location); return this; } - public MigrationResourceImpl withTags(Map tags) { + public MigrationImpl withTags(Map tags) { if (isInCreateMode()) { this.innerModel().withTags(tags); return this; @@ -310,12 +300,12 @@ public MigrationResourceImpl withTags(Map tags) { } } - public MigrationResourceImpl withMigrationInstanceResourceId(String migrationInstanceResourceId) { + public MigrationImpl withMigrationInstanceResourceId(String migrationInstanceResourceId) { this.innerModel().withMigrationInstanceResourceId(migrationInstanceResourceId); return this; } - public MigrationResourceImpl withMigrationMode(MigrationMode migrationMode) { + public MigrationImpl withMigrationMode(MigrationMode migrationMode) { if (isInCreateMode()) { this.innerModel().withMigrationMode(migrationMode); return this; @@ -325,22 +315,22 @@ public MigrationResourceImpl withMigrationMode(MigrationMode migrationMode) { } } - public MigrationResourceImpl withMigrationOption(MigrationOption migrationOption) { + public MigrationImpl withMigrationOption(MigrationOption migrationOption) { this.innerModel().withMigrationOption(migrationOption); return this; } - public MigrationResourceImpl withSourceType(SourceType sourceType) { + public MigrationImpl withSourceType(SourceType sourceType) { this.innerModel().withSourceType(sourceType); return this; } - public MigrationResourceImpl withSslMode(SslMode sslMode) { + public MigrationImpl withSslMode(SslMode sslMode) { this.innerModel().withSslMode(sslMode); return this; } - public MigrationResourceImpl withSourceDbServerResourceId(String sourceDbServerResourceId) { + public MigrationImpl withSourceDbServerResourceId(String sourceDbServerResourceId) { if (isInCreateMode()) { this.innerModel().withSourceDbServerResourceId(sourceDbServerResourceId); return this; @@ -350,8 +340,7 @@ public MigrationResourceImpl withSourceDbServerResourceId(String sourceDbServerR } } - public MigrationResourceImpl - withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName) { + public MigrationImpl withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName) { if (isInCreateMode()) { this.innerModel().withSourceDbServerFullyQualifiedDomainName(sourceDbServerFullyQualifiedDomainName); return this; @@ -361,8 +350,7 @@ public MigrationResourceImpl withSourceDbServerResourceId(String sourceDbServerR } } - public MigrationResourceImpl - withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName) { + public MigrationImpl withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName) { if (isInCreateMode()) { this.innerModel().withTargetDbServerFullyQualifiedDomainName(targetDbServerFullyQualifiedDomainName); return this; @@ -372,17 +360,12 @@ public MigrationResourceImpl withSourceDbServerResourceId(String sourceDbServerR } } - public MigrationResourceImpl withSecretParameters(MigrationSecretParameters secretParameters) { - if (isInCreateMode()) { - this.innerModel().withSecretParameters(secretParameters); - return this; - } else { - this.updateParameters.withSecretParameters(secretParameters); - return this; - } + public MigrationImpl withSecretParameters(MigrationSecretParameters secretParameters) { + this.innerModel().withSecretParameters(secretParameters); + return this; } - public MigrationResourceImpl withDbsToMigrate(List dbsToMigrate) { + public MigrationImpl withDbsToMigrate(List dbsToMigrate) { if (isInCreateMode()) { this.innerModel().withDbsToMigrate(dbsToMigrate); return this; @@ -392,8 +375,8 @@ public MigrationResourceImpl withDbsToMigrate(List dbsToMigrate) { } } - public MigrationResourceImpl withSetupLogicalReplicationOnSourceDbIfNeeded( - LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded) { + public MigrationImpl withSetupLogicalReplicationOnSourceDbIfNeeded( + LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded) { if (isInCreateMode()) { this.innerModel().withSetupLogicalReplicationOnSourceDbIfNeeded(setupLogicalReplicationOnSourceDbIfNeeded); return this; @@ -404,7 +387,7 @@ public MigrationResourceImpl withSetupLogicalReplicationOnSourceDbIfNeeded( } } - public MigrationResourceImpl withOverwriteDbsInTarget(OverwriteDbsInTargetEnum overwriteDbsInTarget) { + public MigrationImpl withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer overwriteDbsInTarget) { if (isInCreateMode()) { this.innerModel().withOverwriteDbsInTarget(overwriteDbsInTarget); return this; @@ -414,7 +397,7 @@ public MigrationResourceImpl withOverwriteDbsInTarget(OverwriteDbsInTargetEnum o } } - public MigrationResourceImpl withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { + public MigrationImpl withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { if (isInCreateMode()) { this.innerModel().withMigrationWindowStartTimeInUtc(migrationWindowStartTimeInUtc); return this; @@ -424,12 +407,12 @@ public MigrationResourceImpl withMigrationWindowStartTimeInUtc(OffsetDateTime mi } } - public MigrationResourceImpl withMigrationWindowEndTimeInUtc(OffsetDateTime migrationWindowEndTimeInUtc) { + public MigrationImpl withMigrationWindowEndTimeInUtc(OffsetDateTime migrationWindowEndTimeInUtc) { this.innerModel().withMigrationWindowEndTimeInUtc(migrationWindowEndTimeInUtc); return this; } - public MigrationResourceImpl withMigrateRoles(MigrateRolesEnum migrateRoles) { + public MigrationImpl withMigrateRoles(MigrateRolesAndPermissions migrateRoles) { if (isInCreateMode()) { this.innerModel().withMigrateRoles(migrateRoles); return this; @@ -439,7 +422,7 @@ public MigrationResourceImpl withMigrateRoles(MigrateRolesEnum migrateRoles) { } } - public MigrationResourceImpl withStartDataMigration(StartDataMigrationEnum startDataMigration) { + public MigrationImpl withStartDataMigration(StartDataMigration startDataMigration) { if (isInCreateMode()) { this.innerModel().withStartDataMigration(startDataMigration); return this; @@ -449,7 +432,7 @@ public MigrationResourceImpl withStartDataMigration(StartDataMigrationEnum start } } - public MigrationResourceImpl withTriggerCutover(TriggerCutoverEnum triggerCutover) { + public MigrationImpl withTriggerCutover(TriggerCutover triggerCutover) { if (isInCreateMode()) { this.innerModel().withTriggerCutover(triggerCutover); return this; @@ -459,7 +442,7 @@ public MigrationResourceImpl withTriggerCutover(TriggerCutoverEnum triggerCutove } } - public MigrationResourceImpl withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { + public MigrationImpl withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { if (isInCreateMode()) { this.innerModel().withDbsToTriggerCutoverOn(dbsToTriggerCutoverOn); return this; @@ -469,7 +452,7 @@ public MigrationResourceImpl withDbsToTriggerCutoverOn(List dbsToTrigger } } - public MigrationResourceImpl withCancel(CancelEnum cancel) { + public MigrationImpl withCancel(Cancel cancel) { if (isInCreateMode()) { this.innerModel().withCancel(cancel); return this; @@ -479,7 +462,7 @@ public MigrationResourceImpl withCancel(CancelEnum cancel) { } } - public MigrationResourceImpl withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { + public MigrationImpl withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { if (isInCreateMode()) { this.innerModel().withDbsToCancelMigrationOn(dbsToCancelMigrationOn); return this; @@ -489,7 +472,12 @@ public MigrationResourceImpl withDbsToCancelMigrationOn(List dbsToCancel } } + public MigrationImpl withSecretParameters(MigrationSecretParametersForPatch secretParameters) { + this.updateParameters.withSecretParameters(secretParameters); + return this; + } + private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityImpl.java similarity index 76% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityResourceImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityImpl.java index 55e995c46e73..a3f743bbdc0b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityResourceImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityImpl.java @@ -4,16 +4,16 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationNameAvailability; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationNameAvailabilityReason; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationNameAvailabilityResource; -public final class MigrationNameAvailabilityResourceImpl implements MigrationNameAvailabilityResource { - private MigrationNameAvailabilityResourceInner innerObject; +public final class MigrationNameAvailabilityImpl implements MigrationNameAvailability { + private MigrationNameAvailabilityInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - MigrationNameAvailabilityResourceImpl(MigrationNameAvailabilityResourceInner innerObject, + MigrationNameAvailabilityImpl(MigrationNameAvailabilityInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -39,7 +39,7 @@ public String message() { return this.innerModel().message(); } - public MigrationNameAvailabilityResourceInner innerModel() { + public MigrationNameAvailabilityInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsClientImpl.java index b89b425b71bf..98d37cf94b98 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsClientImpl.java @@ -14,6 +14,7 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -31,10 +32,11 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationList; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationListFilter; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResourceForPatch; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResourceListResult; import reactor.core.publisher.Mono; /** @@ -67,123 +69,131 @@ public final class MigrationsClientImpl implements MigrationsClient { * to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientMigrations") public interface MigrationsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, + Mono> create(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, - @PathParam("migrationName") String migrationName, - @BodyParam("application/json") MigrationResourceInner parameters, @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("migrationName") String migrationName, @BodyParam("application/json") MigrationInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createSync(@HostParam("$host") String endpoint, + Response createSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, - @PathParam("migrationName") String migrationName, - @BodyParam("application/json") MigrationResourceInner parameters, @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("migrationName") String migrationName, @BodyParam("application/json") MigrationInner parameters, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("migrationName") String migrationName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("migrationName") String migrationName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("migrationName") String migrationName, @BodyParam("application/json") MigrationResourceForPatch parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("migrationName") String migrationName, @BodyParam("application/json") MigrationResourceForPatch parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, + Mono> cancel(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("migrationName") String migrationName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, + Response cancelSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("migrationName") String migrationName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByTargetServer(@HostParam("$host") String endpoint, + Mono> listByTargetServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @QueryParam("migrationListFilter") MigrationListFilter migrationListFilter, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByTargetServerSync(@HostParam("$host") String endpoint, + Response listByTargetServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @QueryParam("migrationListFilter") MigrationListFilter migrationListFilter, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/checkMigrationNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkNameAvailability(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @BodyParam("application/json") MigrationNameAvailabilityInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/checkMigrationNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response checkNameAvailabilitySync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @BodyParam("application/json") MigrationNameAvailabilityInner parameters, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByTargetServerNext( + Mono> listByTargetServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -191,7 +201,7 @@ Mono> listByTargetServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByTargetServerNextSync( + Response listByTargetServerNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -199,33 +209,32 @@ Response listByTargetServerNextSync( /** * Creates a new migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for creating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @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 represents a migration resource along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync(String subscriptionId, - String resourceGroupName, String targetDbServerName, String migrationName, MigrationResourceInner parameters) { + public Mono> createWithResponseAsync(String resourceGroupName, String serverName, + String migrationName, MigrationInner parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId 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 (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (migrationName == null) { return Mono.error(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); @@ -236,65 +245,63 @@ public Mono> createWithResponseAsync(String sub parameters.validate(); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - subscriptionId, resourceGroupName, targetDbServerName, migrationName, parameters, accept, context)) + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for creating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @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 represents a migration resource on successful completion of {@link Mono}. + * @return properties of a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, MigrationResourceInner parameters) { - return createWithResponseAsync(subscriptionId, resourceGroupName, targetDbServerName, migrationName, parameters) + public Mono createAsync(String resourceGroupName, String serverName, String migrationName, + MigrationInner parameters) { + return createWithResponseAsync(resourceGroupName, serverName, migrationName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates a new migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for creating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @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 represents a migration resource along with {@link Response}. + * @return properties of a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, MigrationResourceInner parameters, Context context) { + public Response createWithResponse(String resourceGroupName, String serverName, + String migrationName, MigrationInner parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { + if (this.client.getSubscriptionId() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { + if (serverName == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (migrationName == null) { throw LOGGER.atError() @@ -307,182 +314,172 @@ public Response createWithResponse(String subscriptionId parameters.validate(); } final String accept = "application/json"; - return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), subscriptionId, - resourceGroupName, targetDbServerName, migrationName, parameters, accept, context); + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, parameters, accept, context); } /** * Creates a new migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for creating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @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 represents a migration resource. + * @return properties of a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationResourceInner create(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, MigrationResourceInner parameters) { - return createWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, parameters, - Context.NONE).getValue(); + public MigrationInner create(String resourceGroupName, String serverName, String migrationName, + MigrationInner parameters) { + return createWithResponse(resourceGroupName, serverName, migrationName, parameters, Context.NONE).getValue(); } /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @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 details of a migration along with {@link Response} on successful completion of {@link Mono}. + * @return information about a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String migrationName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId 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 (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (migrationName == null) { return Mono.error(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), subscriptionId, - resourceGroupName, targetDbServerName, migrationName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @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 details of a migration on successful completion of {@link Mono}. + * @return information about a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName) { - return getWithResponseAsync(subscriptionId, resourceGroupName, targetDbServerName, migrationName) + public Mono getAsync(String resourceGroupName, String serverName, String migrationName) { + return getWithResponseAsync(resourceGroupName, serverName, migrationName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @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 details of a migration along with {@link Response}. + * @return information about a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, Context context) { + public Response getWithResponse(String resourceGroupName, String serverName, String migrationName, + Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { + if (this.client.getSubscriptionId() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { + if (serverName == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (migrationName == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), subscriptionId, - resourceGroupName, targetDbServerName, migrationName, accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, migrationName, accept, context); } /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @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 details of a migration. + * @return information about a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationResourceInner get(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName) { - return getWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, Context.NONE) - .getValue(); + public MigrationInner get(String resourceGroupName, String serverName, String migrationName) { + return getWithResponse(resourceGroupName, serverName, migrationName, Context.NONE).getValue(); } /** * Updates an existing migration. The request body can contain one to many of the mutable properties present in the * migration definition. Certain property updates initiate migration state transitions. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for updating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required to update an existing migration. * @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 represents a migration resource along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync(String subscriptionId, - String resourceGroupName, String targetDbServerName, String migrationName, - MigrationResourceForPatch parameters) { + public Mono> updateWithResponseAsync(String resourceGroupName, String serverName, + String migrationName, MigrationResourceForPatch parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId 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 (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (migrationName == null) { return Mono.error(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); @@ -493,9 +490,8 @@ public Mono> updateWithResponseAsync(String sub parameters.validate(); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - subscriptionId, resourceGroupName, targetDbServerName, migrationName, parameters, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -503,20 +499,19 @@ public Mono> updateWithResponseAsync(String sub * Updates an existing migration. The request body can contain one to many of the mutable properties present in the * migration definition. Certain property updates initiate migration state transitions. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for updating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required to update an existing migration. * @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 represents a migration resource on successful completion of {@link Mono}. + * @return properties of a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, MigrationResourceForPatch parameters) { - return updateWithResponseAsync(subscriptionId, resourceGroupName, targetDbServerName, migrationName, parameters) + public Mono updateAsync(String resourceGroupName, String serverName, String migrationName, + MigrationResourceForPatch parameters) { + return updateWithResponseAsync(resourceGroupName, serverName, migrationName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -524,36 +519,36 @@ public Mono updateAsync(String subscriptionId, String re * Updates an existing migration. The request body can contain one to many of the mutable properties present in the * migration definition. Certain property updates initiate migration state transitions. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for updating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required to update an existing migration. * @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 represents a migration resource along with {@link Response}. + * @return properties of a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, MigrationResourceForPatch parameters, Context context) { + public Response updateWithResponse(String resourceGroupName, String serverName, + String migrationName, MigrationResourceForPatch parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { + if (this.client.getSubscriptionId() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { + if (serverName == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (migrationName == null) { throw LOGGER.atError() @@ -566,347 +561,471 @@ public Response updateWithResponse(String subscriptionId parameters.validate(); } final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), subscriptionId, - resourceGroupName, targetDbServerName, migrationName, parameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, parameters, accept, context); } /** * Updates an existing migration. The request body can contain one to many of the mutable properties present in the * migration definition. Certain property updates initiate migration state transitions. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. - * @param parameters The required parameters for updating a migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. + * @param parameters Parameters required to update an existing migration. * @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 represents a migration resource. + * @return properties of a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationResourceInner update(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, MigrationResourceForPatch parameters) { - return updateWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, parameters, - Context.NONE).getValue(); + public MigrationInner update(String resourceGroupName, String serverName, String migrationName, + MigrationResourceForPatch parameters) { + return updateWithResponse(resourceGroupName, serverName, migrationName, parameters, Context.NONE).getValue(); } /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @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 {@link Response} on successful completion of {@link Mono}. + * @return properties of a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName) { + public Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, + String migrationName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId 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 (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (migrationName == null) { return Mono.error(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - subscriptionId, resourceGroupName, targetDbServerName, migrationName, accept, context)) + .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @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 A {@link Mono} that completes when a successful response is received. + * @return properties of a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName) { - return deleteWithResponseAsync(subscriptionId, resourceGroupName, targetDbServerName, migrationName) - .flatMap(ignored -> Mono.empty()); + public Mono cancelAsync(String resourceGroupName, String serverName, String migrationName) { + return cancelWithResponseAsync(resourceGroupName, serverName, migrationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @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 {@link Response}. + * @return properties of a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String subscriptionId, String resourceGroupName, String targetDbServerName, + public Response cancelWithResponse(String resourceGroupName, String serverName, String migrationName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { + if (this.client.getSubscriptionId() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { + if (serverName == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } if (migrationName == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); } final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), subscriptionId, - resourceGroupName, targetDbServerName, migrationName, accept, context); + return service.cancelSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, accept, context); } /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @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 properties of a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName) { - deleteWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, Context.NONE); + public MigrationInner cancel(String resourceGroupName, String serverName, String migrationName) { + return cancelWithResponse(resourceGroupName, serverName, migrationName, Context.NONE).getValue(); } /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationListFilter Migration list filter. Retrieves either active migrations or all migrations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationListFilter Migration list filter. Indicates if the request should retrieve only active migrations + * or all migrations. Defaults to Active. * @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 a list of migration resources along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of migrations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByTargetServerSinglePageAsync(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationListFilter migrationListFilter) { + private Mono> listByTargetServerSinglePageAsync(String resourceGroupName, + String serverName, MigrationListFilter migrationListFilter) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId 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 (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByTargetServer(this.client.getEndpoint(), this.client.getApiVersion(), - subscriptionId, resourceGroupName, targetDbServerName, migrationListFilter, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationListFilter, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationListFilter Migration list filter. Retrieves either active migrations or all migrations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationListFilter Migration list filter. Indicates if the request should retrieve only active migrations + * or all migrations. Defaults to Active. * @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 a list of migration resources as paginated response with {@link PagedFlux}. + * @return list of migrations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByTargetServerAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName, MigrationListFilter migrationListFilter) { - return new PagedFlux<>(() -> listByTargetServerSinglePageAsync(subscriptionId, resourceGroupName, - targetDbServerName, migrationListFilter), nextLink -> listByTargetServerNextSinglePageAsync(nextLink)); + public PagedFlux listByTargetServerAsync(String resourceGroupName, String serverName, + MigrationListFilter migrationListFilter) { + return new PagedFlux<>( + () -> listByTargetServerSinglePageAsync(resourceGroupName, serverName, migrationListFilter), + nextLink -> listByTargetServerNextSinglePageAsync(nextLink)); } /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. * @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 a list of migration resources as paginated response with {@link PagedFlux}. + * @return list of migrations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByTargetServerAsync(String subscriptionId, String resourceGroupName, - String targetDbServerName) { + public PagedFlux listByTargetServerAsync(String resourceGroupName, String serverName) { final MigrationListFilter migrationListFilter = null; - return new PagedFlux<>(() -> listByTargetServerSinglePageAsync(subscriptionId, resourceGroupName, - targetDbServerName, migrationListFilter), nextLink -> listByTargetServerNextSinglePageAsync(nextLink)); + return new PagedFlux<>( + () -> listByTargetServerSinglePageAsync(resourceGroupName, serverName, migrationListFilter), + nextLink -> listByTargetServerNextSinglePageAsync(nextLink)); } /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationListFilter Migration list filter. Retrieves either active migrations or all migrations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationListFilter Migration list filter. Indicates if the request should retrieve only active migrations + * or all migrations. Defaults to Active. * @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 a list of migration resources along with {@link PagedResponse}. + * @return list of migrations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByTargetServerSinglePage(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationListFilter migrationListFilter) { + private PagedResponse listByTargetServerSinglePage(String resourceGroupName, String serverName, + MigrationListFilter migrationListFilter) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { + if (this.client.getSubscriptionId() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { + if (serverName == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByTargetServerSync(this.client.getEndpoint(), this.client.getApiVersion(), subscriptionId, - resourceGroupName, targetDbServerName, migrationListFilter, accept, Context.NONE); + Response res = service.listByTargetServerSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, + migrationListFilter, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationListFilter Migration list filter. Retrieves either active migrations or all migrations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationListFilter Migration list filter. Indicates if the request should retrieve only active migrations + * or all migrations. Defaults to Active. * @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 a list of migration resources along with {@link PagedResponse}. + * @return list of migrations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByTargetServerSinglePage(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationListFilter migrationListFilter, Context context) { + private PagedResponse listByTargetServerSinglePage(String resourceGroupName, String serverName, + MigrationListFilter migrationListFilter, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (subscriptionId == null) { + if (this.client.getSubscriptionId() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (targetDbServerName == null) { + if (serverName == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByTargetServerSync(this.client.getEndpoint(), this.client.getApiVersion(), subscriptionId, - resourceGroupName, targetDbServerName, migrationListFilter, accept, context); + Response res + = service.listByTargetServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationListFilter, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. * @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 a list of migration resources as paginated response with {@link PagedIterable}. + * @return list of migrations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByTargetServer(String subscriptionId, String resourceGroupName, - String targetDbServerName) { + public PagedIterable listByTargetServer(String resourceGroupName, String serverName) { final MigrationListFilter migrationListFilter = null; - return new PagedIterable<>(() -> listByTargetServerSinglePage(subscriptionId, resourceGroupName, - targetDbServerName, migrationListFilter), nextLink -> listByTargetServerNextSinglePage(nextLink)); + return new PagedIterable<>( + () -> listByTargetServerSinglePage(resourceGroupName, serverName, migrationListFilter), + nextLink -> listByTargetServerNextSinglePage(nextLink)); } /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationListFilter Migration list filter. Retrieves either active migrations or all migrations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationListFilter Migration list filter. Indicates if the request should retrieve only active migrations + * or all migrations. Defaults to Active. * @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 a list of migration resources as paginated response with {@link PagedIterable}. + * @return list of migrations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByTargetServer(String subscriptionId, String resourceGroupName, - String targetDbServerName, MigrationListFilter migrationListFilter, Context context) { - return new PagedIterable<>(() -> listByTargetServerSinglePage(subscriptionId, resourceGroupName, - targetDbServerName, migrationListFilter, context), + public PagedIterable listByTargetServer(String resourceGroupName, String serverName, + MigrationListFilter migrationListFilter, Context context) { + return new PagedIterable<>( + () -> listByTargetServerSinglePage(resourceGroupName, serverName, migrationListFilter, context), nextLink -> listByTargetServerNextSinglePage(nextLink, context)); } + /** + * Check the validity and availability of the given name, to assign it to a new migration. + * + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @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 availability of a migration name along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkNameAvailabilityWithResponseAsync( + String resourceGroupName, String serverName, MigrationNameAvailabilityInner parameters) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName 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 accept = "application/json"; + return FluxUtil + .withContext( + context -> service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Check the validity and availability of the given name, to assign it to a new migration. + * + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @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 availability of a migration name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkNameAvailabilityAsync(String resourceGroupName, String serverName, + MigrationNameAvailabilityInner parameters) { + return checkNameAvailabilityWithResponseAsync(resourceGroupName, serverName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Check the validity and availability of the given name, to assign it to a new migration. + * + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @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 availability of a migration name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkNameAvailabilityWithResponse(String resourceGroupName, + String serverName, MigrationNameAvailabilityInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return service.checkNameAvailabilitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); + } + + /** + * Check the validity and availability of the given name, to assign it to a new migration. + * + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @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 availability of a migration name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MigrationNameAvailabilityInner checkNameAvailability(String resourceGroupName, String serverName, + MigrationNameAvailabilityInner parameters) { + return checkNameAvailabilityWithResponse(resourceGroupName, serverName, parameters, Context.NONE).getValue(); + } + /** * Get the next page of items. * @@ -914,10 +1033,10 @@ public PagedIterable listByTargetServer(String subscript * @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 a list of migration resources along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of migrations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByTargetServerNextSinglePageAsync(String nextLink) { + private Mono> listByTargetServerNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -929,8 +1048,8 @@ private Mono> listByTargetServerNextSingle return FluxUtil .withContext( context -> service.listByTargetServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -941,10 +1060,10 @@ private Mono> listByTargetServerNextSingle * @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 a list of migration resources along with {@link PagedResponse}. + * @return list of migrations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByTargetServerNextSinglePage(String nextLink) { + private PagedResponse listByTargetServerNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -955,7 +1074,7 @@ private PagedResponse listByTargetServerNextSinglePage(S "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByTargetServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -969,10 +1088,10 @@ private PagedResponse listByTargetServerNextSinglePage(S * @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 a list of migration resources along with {@link PagedResponse}. + * @return list of migrations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByTargetServerNextSinglePage(String nextLink, Context context) { + private PagedResponse listByTargetServerNextSinglePage(String nextLink, Context context) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -983,7 +1102,7 @@ private PagedResponse listByTargetServerNextSinglePage(S "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByTargetServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsImpl.java index f5f7fee79ce3..2949ce96596b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsImpl.java @@ -10,9 +10,11 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Migration; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationListFilter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResource; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationNameAvailability; import com.azure.resourcemanager.postgresqlflexibleserver.models.Migrations; public final class MigrationsImpl implements Migrations { @@ -28,116 +30,91 @@ public MigrationsImpl(MigrationsClient innerClient, this.serviceManager = serviceManager; } - public Response getWithResponse(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, context); + public Response getWithResponse(String resourceGroupName, String serverName, String migrationName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, serverName, migrationName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new MigrationResourceImpl(inner.getValue(), this.manager())); + new MigrationImpl(inner.getValue(), this.manager())); } else { return null; } } - public MigrationResource get(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName) { - MigrationResourceInner inner - = this.serviceClient().get(subscriptionId, resourceGroupName, targetDbServerName, migrationName); + public Migration get(String resourceGroupName, String serverName, String migrationName) { + MigrationInner inner = this.serviceClient().get(resourceGroupName, serverName, migrationName); if (inner != null) { - return new MigrationResourceImpl(inner, this.manager()); + return new MigrationImpl(inner, this.manager()); } else { return null; } } - public Response deleteWithResponse(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, Context context) { - return this.serviceClient() - .deleteWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, context); + public Response cancelWithResponse(String resourceGroupName, String serverName, String migrationName, + Context context) { + Response inner + = this.serviceClient().cancelWithResponse(resourceGroupName, serverName, migrationName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MigrationImpl(inner.getValue(), this.manager())); + } else { + return null; + } } - public void delete(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName) { - this.serviceClient().delete(subscriptionId, resourceGroupName, targetDbServerName, migrationName); + public Migration cancel(String resourceGroupName, String serverName, String migrationName) { + MigrationInner inner = this.serviceClient().cancel(resourceGroupName, serverName, migrationName); + if (inner != null) { + return new MigrationImpl(inner, this.manager()); + } else { + return null; + } } - public PagedIterable listByTargetServer(String subscriptionId, String resourceGroupName, - String targetDbServerName) { - PagedIterable inner - = this.serviceClient().listByTargetServer(subscriptionId, resourceGroupName, targetDbServerName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MigrationResourceImpl(inner1, this.manager())); + public PagedIterable listByTargetServer(String resourceGroupName, String serverName) { + PagedIterable inner = this.serviceClient().listByTargetServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MigrationImpl(inner1, this.manager())); } - public PagedIterable listByTargetServer(String subscriptionId, String resourceGroupName, - String targetDbServerName, MigrationListFilter migrationListFilter, Context context) { - PagedIterable inner = this.serviceClient() - .listByTargetServer(subscriptionId, resourceGroupName, targetDbServerName, migrationListFilter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MigrationResourceImpl(inner1, this.manager())); + public PagedIterable listByTargetServer(String resourceGroupName, String serverName, + MigrationListFilter migrationListFilter, Context context) { + PagedIterable inner + = this.serviceClient().listByTargetServer(resourceGroupName, serverName, migrationListFilter, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MigrationImpl(inner1, this.manager())); } - public MigrationResource getById(String id) { - String subscriptionId = ResourceManagerUtils.getValueFromIdByName(id, "subscriptions"); - if (subscriptionId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'subscriptions'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String targetDbServerName = ResourceManagerUtils.getValueFromIdByName(id, "flexibleServers"); - if (targetDbServerName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id))); - } - String migrationName = ResourceManagerUtils.getValueFromIdByName(id, "migrations"); - if (migrationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'migrations'.", id))); + public Response checkNameAvailabilityWithResponse(String resourceGroupName, + String serverName, MigrationNameAvailabilityInner parameters, Context context) { + Response inner = this.serviceClient() + .checkNameAvailabilityWithResponse(resourceGroupName, serverName, parameters, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MigrationNameAvailabilityImpl(inner.getValue(), this.manager())); + } else { + return null; } - return this.getWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, Context.NONE) - .getValue(); } - public Response getByIdWithResponse(String id, Context context) { - String subscriptionId = ResourceManagerUtils.getValueFromIdByName(id, "subscriptions"); - if (subscriptionId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'subscriptions'.", id))); - } - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String targetDbServerName = ResourceManagerUtils.getValueFromIdByName(id, "flexibleServers"); - if (targetDbServerName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id))); - } - String migrationName = ResourceManagerUtils.getValueFromIdByName(id, "migrations"); - if (migrationName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'migrations'.", id))); + public MigrationNameAvailability checkNameAvailability(String resourceGroupName, String serverName, + MigrationNameAvailabilityInner parameters) { + MigrationNameAvailabilityInner inner + = this.serviceClient().checkNameAvailability(resourceGroupName, serverName, parameters); + if (inner != null) { + return new MigrationNameAvailabilityImpl(inner, this.manager()); + } else { + return null; } - return this.getWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, context); } - public void deleteById(String id) { - String subscriptionId = ResourceManagerUtils.getValueFromIdByName(id, "subscriptions"); - if (subscriptionId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'subscriptions'.", id))); - } + public Migration getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String targetDbServerName = ResourceManagerUtils.getValueFromIdByName(id, "flexibleServers"); - if (targetDbServerName == null) { + String serverName = ResourceManagerUtils.getValueFromIdByName(id, "flexibleServers"); + if (serverName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id))); } @@ -146,22 +123,17 @@ public void deleteById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'migrations'.", id))); } - this.deleteWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, Context.NONE); + return this.getWithResponse(resourceGroupName, serverName, migrationName, Context.NONE).getValue(); } - public Response deleteByIdWithResponse(String id, Context context) { - String subscriptionId = ResourceManagerUtils.getValueFromIdByName(id, "subscriptions"); - if (subscriptionId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'subscriptions'.", id))); - } + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String targetDbServerName = ResourceManagerUtils.getValueFromIdByName(id, "flexibleServers"); - if (targetDbServerName == null) { + String serverName = ResourceManagerUtils.getValueFromIdByName(id, "flexibleServers"); + if (serverName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id))); } @@ -170,7 +142,7 @@ public Response deleteByIdWithResponse(String id, Context context) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'migrations'.", id))); } - return this.deleteWithResponse(subscriptionId, resourceGroupName, targetDbServerName, migrationName, context); + return this.getWithResponse(resourceGroupName, serverName, migrationName, context); } private MigrationsClient serviceClient() { @@ -181,7 +153,7 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man return this.serviceManager; } - public MigrationResourceImpl define(String name) { - return new MigrationResourceImpl(name, this.manager()); + public MigrationImpl define(String name) { + return new MigrationImpl(name, this.manager()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesClientImpl.java new file mode 100644 index 000000000000..55d6aabf7783 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesClientImpl.java @@ -0,0 +1,316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +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.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.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in NameAvailabilitiesClient. + */ +public final class NameAvailabilitiesClientImpl implements NameAvailabilitiesClient { + /** + * The proxy service used to perform REST calls. + */ + private final NameAvailabilitiesService service; + + /** + * The service client containing this operation class. + */ + private final PostgreSqlManagementClientImpl client; + + /** + * Initializes an instance of NameAvailabilitiesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NameAvailabilitiesClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(NameAvailabilitiesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PostgreSqlManagementClientNameAvailabilities to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PostgreSqlManagementClientNameAvailabilities") + public interface NameAvailabilitiesService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkGlobally(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") CheckNameAvailabilityRequest parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response checkGloballySync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") CheckNameAvailabilityRequest parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkWithLocation(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, + @BodyParam("application/json") CheckNameAvailabilityRequest parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response checkWithLocationSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, + @BodyParam("application/json") CheckNameAvailabilityRequest parameters, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @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 availability of a name along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + checkGloballyWithResponseAsync(CheckNameAvailabilityRequest parameters) { + 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.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.checkGlobally(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @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 availability of a name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkGloballyAsync(CheckNameAvailabilityRequest parameters) { + return checkGloballyWithResponseAsync(parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @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 availability of a name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkGloballyWithResponse(CheckNameAvailabilityRequest parameters, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return service.checkGloballySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), parameters, accept, context); + } + + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @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 availability of a name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NameAvailabilityModelInner checkGlobally(CheckNameAvailabilityRequest parameters) { + return checkGloballyWithResponse(parameters, Context.NONE).getValue(); + } + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @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 availability of a name along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkWithLocationWithResponseAsync(String locationName, + CheckNameAvailabilityRequest parameters) { + 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.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName 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 accept = "application/json"; + return FluxUtil + .withContext(context -> service.checkWithLocation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @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 availability of a name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkWithLocationAsync(String locationName, + CheckNameAvailabilityRequest parameters) { + return checkWithLocationWithResponseAsync(locationName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @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 availability of a name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkWithLocationWithResponse(String locationName, + CheckNameAvailabilityRequest parameters, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return service.checkWithLocationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, parameters, accept, context); + } + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @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 availability of a name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NameAvailabilityModelInner checkWithLocation(String locationName, CheckNameAvailabilityRequest parameters) { + return checkWithLocationWithResponse(locationName, parameters, Context.NONE).getValue(); + } + + private static final ClientLogger LOGGER = new ClientLogger(NameAvailabilitiesClientImpl.class); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesImpl.java new file mode 100644 index 000000000000..d919ecebe8c4 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesImpl.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; +import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailabilities; +import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailabilityModel; + +public final class NameAvailabilitiesImpl implements NameAvailabilities { + private static final ClientLogger LOGGER = new ClientLogger(NameAvailabilitiesImpl.class); + + private final NameAvailabilitiesClient innerClient; + + private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; + + public NameAvailabilitiesImpl(NameAvailabilitiesClient innerClient, + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response checkGloballyWithResponse(CheckNameAvailabilityRequest parameters, + Context context) { + Response inner + = this.serviceClient().checkGloballyWithResponse(parameters, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NameAvailabilityModelImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NameAvailabilityModel checkGlobally(CheckNameAvailabilityRequest parameters) { + NameAvailabilityModelInner inner = this.serviceClient().checkGlobally(parameters); + if (inner != null) { + return new NameAvailabilityModelImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response checkWithLocationWithResponse(String locationName, + CheckNameAvailabilityRequest parameters, Context context) { + Response inner + = this.serviceClient().checkWithLocationWithResponse(locationName, parameters, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NameAvailabilityModelImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NameAvailabilityModel checkWithLocation(String locationName, CheckNameAvailabilityRequest parameters) { + NameAvailabilityModelInner inner = this.serviceClient().checkWithLocation(locationName, parameters); + if (inner != null) { + return new NameAvailabilityModelImpl(inner, this.manager()); + } else { + return null; + } + } + + private NameAvailabilitiesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityModelImpl.java similarity index 81% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityModelImpl.java index a6c3cc180e8a..0d9e63df1f11 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityModelImpl.java @@ -4,16 +4,16 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityReason; -import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailabilityModel; -public final class NameAvailabilityImpl implements NameAvailability { - private NameAvailabilityInner innerObject; +public final class NameAvailabilityModelImpl implements NameAvailabilityModel { + private NameAvailabilityModelInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - NameAvailabilityImpl(NameAvailabilityInner innerObject, + NameAvailabilityModelImpl(NameAvailabilityModelInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -39,7 +39,7 @@ public String type() { return this.innerModel().type(); } - public NameAvailabilityInner innerModel() { + public NameAvailabilityModelInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/IndexRecommendationResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ObjectRecommendationImpl.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/IndexRecommendationResourceImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ObjectRecommendationImpl.java index 2bd529464728..682345629727 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/IndexRecommendationResourceImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ObjectRecommendationImpl.java @@ -5,23 +5,23 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.IndexRecommendationResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.ImpactRecord; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationDetails; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResourcePropertiesAnalyzedWorkload; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResourcePropertiesImplementationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendation; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesAnalyzedWorkload; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesImplementationDetails; import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeEnum; import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; -public final class IndexRecommendationResourceImpl implements IndexRecommendationResource { - private IndexRecommendationResourceInner innerObject; +public final class ObjectRecommendationImpl implements ObjectRecommendation { + private ObjectRecommendationInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - IndexRecommendationResourceImpl(IndexRecommendationResourceInner innerObject, + ObjectRecommendationImpl(ObjectRecommendationInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -39,6 +39,10 @@ public String type() { return this.innerModel().type(); } + public String kind() { + return this.innerModel().kind(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -68,15 +72,19 @@ public String recommendationReason() { return this.innerModel().recommendationReason(); } + public String currentState() { + return this.innerModel().currentState(); + } + public RecommendationTypeEnum recommendationType() { return this.innerModel().recommendationType(); } - public IndexRecommendationResourcePropertiesImplementationDetails implementationDetails() { + public ObjectRecommendationPropertiesImplementationDetails implementationDetails() { return this.innerModel().implementationDetails(); } - public IndexRecommendationResourcePropertiesAnalyzedWorkload analyzedWorkload() { + public ObjectRecommendationPropertiesAnalyzedWorkload analyzedWorkload() { return this.innerModel().analyzedWorkload(); } @@ -89,11 +97,11 @@ public List estimatedImpact() { } } - public IndexRecommendationDetails details() { + public ObjectRecommendationDetails details() { return this.innerModel().details(); } - public IndexRecommendationResourceInner innerModel() { + public ObjectRecommendationInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsClientImpl.java index 3b2498e941a3..fdbc9e1814e2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsClientImpl.java @@ -28,7 +28,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.OperationsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.OperationInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OperationListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OperationList; import reactor.core.publisher.Mono; /** @@ -61,43 +61,43 @@ public final class OperationsClientImpl implements OperationsClient { * to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.DBforPostgreSQL/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.DBforPostgreSQL/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @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 a list of resource provider operations along with {@link PagedResponse} on successful completion of + * @return list of resource provider operations along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -116,11 +116,11 @@ private Mono> listSinglePageAsync() { } /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @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 a list of resource provider operations as paginated response with {@link PagedFlux}. + * @return list of resource provider operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync() { @@ -128,11 +128,11 @@ public PagedFlux listAsync() { } /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @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 a list of resource provider operations along with {@link PagedResponse}. + * @return list of resource provider operations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage() { @@ -142,20 +142,20 @@ private PagedResponse listSinglePage() { "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @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 a list of resource provider operations along with {@link PagedResponse}. + * @return list of resource provider operations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(Context context) { @@ -165,18 +165,18 @@ private PagedResponse listSinglePage(Context context) { "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @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 a list of resource provider operations as paginated response with {@link PagedIterable}. + * @return list of resource provider operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -184,13 +184,13 @@ public PagedIterable list() { } /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @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 a list of resource provider operations as paginated response with {@link PagedIterable}. + * @return list of resource provider operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -204,7 +204,7 @@ public PagedIterable list(Context context) { * @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 a list of resource provider operations along with {@link PagedResponse} on successful completion of + * @return list of resource provider operations along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -230,7 +230,7 @@ private Mono> listNextSinglePageAsync(String nextL * @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 a list of resource provider operations along with {@link PagedResponse}. + * @return list of resource provider operations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { @@ -244,8 +244,7 @@ private PagedResponse listNextSinglePage(String nextLink) { "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -258,7 +257,7 @@ private PagedResponse listNextSinglePage(String nextLink) { * @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 a list of resource provider operations along with {@link PagedResponse}. + * @return list of resource provider operations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { @@ -272,7 +271,7 @@ private PagedResponse listNextSinglePage(String nextLink, Contex "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlManagementClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlManagementClientImpl.java index 47abf6881f68..7e358d1905d3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlManagementClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlManagementClientImpl.java @@ -26,33 +26,28 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CheckNameAvailabilitiesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CheckNameAvailabilityWithLocationsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByLocationsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByServersClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapturedLogsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.FlexibleServersClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.GetPrivateDnsZoneSuffixesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LocationBasedCapabilitiesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LogFilesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LtrBackupOperationsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.OperationsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PostgreSqlManagementClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionOperationsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateDnsZoneSuffixesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.QuotaUsagesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ReplicasClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ResourceProvidersClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerCapabilitiesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningConfigurationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningIndexesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualNetworkSubnetUsagesClient; import java.io.IOException; @@ -154,87 +149,101 @@ public Duration getDefaultPollInterval() { } /** - * The AdministratorsClient object to access its operations. + * The AdministratorsMicrosoftEntrasClient object to access its operations. */ - private final AdministratorsClient administrators; + private final AdministratorsMicrosoftEntrasClient administratorsMicrosoftEntras; /** - * Gets the AdministratorsClient object to access its operations. + * Gets the AdministratorsMicrosoftEntrasClient object to access its operations. * - * @return the AdministratorsClient object. + * @return the AdministratorsMicrosoftEntrasClient object. */ - public AdministratorsClient getAdministrators() { - return this.administrators; + public AdministratorsMicrosoftEntrasClient getAdministratorsMicrosoftEntras() { + return this.administratorsMicrosoftEntras; } /** - * The BackupsClient object to access its operations. + * The AdvancedThreatProtectionSettingsClient object to access its operations. */ - private final BackupsClient backups; + private final AdvancedThreatProtectionSettingsClient advancedThreatProtectionSettings; /** - * Gets the BackupsClient object to access its operations. + * Gets the AdvancedThreatProtectionSettingsClient object to access its operations. * - * @return the BackupsClient object. + * @return the AdvancedThreatProtectionSettingsClient object. */ - public BackupsClient getBackups() { - return this.backups; + public AdvancedThreatProtectionSettingsClient getAdvancedThreatProtectionSettings() { + return this.advancedThreatProtectionSettings; } /** - * The LocationBasedCapabilitiesClient object to access its operations. + * The ServerThreatProtectionSettingsClient object to access its operations. */ - private final LocationBasedCapabilitiesClient locationBasedCapabilities; + private final ServerThreatProtectionSettingsClient serverThreatProtectionSettings; /** - * Gets the LocationBasedCapabilitiesClient object to access its operations. + * Gets the ServerThreatProtectionSettingsClient object to access its operations. * - * @return the LocationBasedCapabilitiesClient object. + * @return the ServerThreatProtectionSettingsClient object. */ - public LocationBasedCapabilitiesClient getLocationBasedCapabilities() { - return this.locationBasedCapabilities; + public ServerThreatProtectionSettingsClient getServerThreatProtectionSettings() { + return this.serverThreatProtectionSettings; } /** - * The ServerCapabilitiesClient object to access its operations. + * The BackupsAutomaticAndOnDemandsClient object to access its operations. */ - private final ServerCapabilitiesClient serverCapabilities; + private final BackupsAutomaticAndOnDemandsClient backupsAutomaticAndOnDemands; /** - * Gets the ServerCapabilitiesClient object to access its operations. + * Gets the BackupsAutomaticAndOnDemandsClient object to access its operations. * - * @return the ServerCapabilitiesClient object. + * @return the BackupsAutomaticAndOnDemandsClient object. */ - public ServerCapabilitiesClient getServerCapabilities() { - return this.serverCapabilities; + public BackupsAutomaticAndOnDemandsClient getBackupsAutomaticAndOnDemands() { + return this.backupsAutomaticAndOnDemands; } /** - * The CheckNameAvailabilitiesClient object to access its operations. + * The CapabilitiesByLocationsClient object to access its operations. */ - private final CheckNameAvailabilitiesClient checkNameAvailabilities; + private final CapabilitiesByLocationsClient capabilitiesByLocations; /** - * Gets the CheckNameAvailabilitiesClient object to access its operations. + * Gets the CapabilitiesByLocationsClient object to access its operations. * - * @return the CheckNameAvailabilitiesClient object. + * @return the CapabilitiesByLocationsClient object. */ - public CheckNameAvailabilitiesClient getCheckNameAvailabilities() { - return this.checkNameAvailabilities; + public CapabilitiesByLocationsClient getCapabilitiesByLocations() { + return this.capabilitiesByLocations; } /** - * The CheckNameAvailabilityWithLocationsClient object to access its operations. + * The CapabilitiesByServersClient object to access its operations. */ - private final CheckNameAvailabilityWithLocationsClient checkNameAvailabilityWithLocations; + private final CapabilitiesByServersClient capabilitiesByServers; /** - * Gets the CheckNameAvailabilityWithLocationsClient object to access its operations. + * Gets the CapabilitiesByServersClient object to access its operations. * - * @return the CheckNameAvailabilityWithLocationsClient object. + * @return the CapabilitiesByServersClient object. */ - public CheckNameAvailabilityWithLocationsClient getCheckNameAvailabilityWithLocations() { - return this.checkNameAvailabilityWithLocations; + public CapabilitiesByServersClient getCapabilitiesByServers() { + return this.capabilitiesByServers; + } + + /** + * The CapturedLogsClient object to access its operations. + */ + private final CapturedLogsClient capturedLogs; + + /** + * Gets the CapturedLogsClient object to access its operations. + * + * @return the CapturedLogsClient object. + */ + public CapturedLogsClient getCapturedLogs() { + return this.capturedLogs; } /** @@ -280,45 +289,17 @@ public FirewallRulesClient getFirewallRules() { } /** - * The ServersClient object to access its operations. - */ - private final ServersClient servers; - - /** - * Gets the ServersClient object to access its operations. - * - * @return the ServersClient object. - */ - public ServersClient getServers() { - return this.servers; - } - - /** - * The FlexibleServersClient object to access its operations. + * The BackupsLongTermRetentionsClient object to access its operations. */ - private final FlexibleServersClient flexibleServers; + private final BackupsLongTermRetentionsClient backupsLongTermRetentions; /** - * Gets the FlexibleServersClient object to access its operations. + * Gets the BackupsLongTermRetentionsClient object to access its operations. * - * @return the FlexibleServersClient object. + * @return the BackupsLongTermRetentionsClient object. */ - public FlexibleServersClient getFlexibleServers() { - return this.flexibleServers; - } - - /** - * The LtrBackupOperationsClient object to access its operations. - */ - private final LtrBackupOperationsClient ltrBackupOperations; - - /** - * Gets the LtrBackupOperationsClient object to access its operations. - * - * @return the LtrBackupOperationsClient object. - */ - public LtrBackupOperationsClient getLtrBackupOperations() { - return this.ltrBackupOperations; + public BackupsLongTermRetentionsClient getBackupsLongTermRetentions() { + return this.backupsLongTermRetentions; } /** @@ -336,17 +317,17 @@ public MigrationsClient getMigrations() { } /** - * The ResourceProvidersClient object to access its operations. + * The NameAvailabilitiesClient object to access its operations. */ - private final ResourceProvidersClient resourceProviders; + private final NameAvailabilitiesClient nameAvailabilities; /** - * Gets the ResourceProvidersClient object to access its operations. + * Gets the NameAvailabilitiesClient object to access its operations. * - * @return the ResourceProvidersClient object. + * @return the NameAvailabilitiesClient object. */ - public ResourceProvidersClient getResourceProviders() { - return this.resourceProviders; + public NameAvailabilitiesClient getNameAvailabilities() { + return this.nameAvailabilities; } /** @@ -364,17 +345,17 @@ public OperationsClient getOperations() { } /** - * The GetPrivateDnsZoneSuffixesClient object to access its operations. + * The PrivateDnsZoneSuffixesClient object to access its operations. */ - private final GetPrivateDnsZoneSuffixesClient getPrivateDnsZoneSuffixes; + private final PrivateDnsZoneSuffixesClient privateDnsZoneSuffixes; /** - * Gets the GetPrivateDnsZoneSuffixesClient object to access its operations. + * Gets the PrivateDnsZoneSuffixesClient object to access its operations. * - * @return the GetPrivateDnsZoneSuffixesClient object. + * @return the PrivateDnsZoneSuffixesClient object. */ - public GetPrivateDnsZoneSuffixesClient getGetPrivateDnsZoneSuffixes() { - return this.getPrivateDnsZoneSuffixes; + public PrivateDnsZoneSuffixesClient getPrivateDnsZoneSuffixes() { + return this.privateDnsZoneSuffixes; } /** @@ -391,20 +372,6 @@ public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { return this.privateEndpointConnections; } - /** - * The PrivateEndpointConnectionOperationsClient object to access its operations. - */ - private final PrivateEndpointConnectionOperationsClient privateEndpointConnectionOperations; - - /** - * Gets the PrivateEndpointConnectionOperationsClient object to access its operations. - * - * @return the PrivateEndpointConnectionOperationsClient object. - */ - public PrivateEndpointConnectionOperationsClient getPrivateEndpointConnectionOperations() { - return this.privateEndpointConnectionOperations; - } - /** * The PrivateLinkResourcesClient object to access its operations. */ @@ -448,73 +415,31 @@ public ReplicasClient getReplicas() { } /** - * The LogFilesClient object to access its operations. - */ - private final LogFilesClient logFiles; - - /** - * Gets the LogFilesClient object to access its operations. - * - * @return the LogFilesClient object. - */ - public LogFilesClient getLogFiles() { - return this.logFiles; - } - - /** - * The ServerThreatProtectionSettingsClient object to access its operations. - */ - private final ServerThreatProtectionSettingsClient serverThreatProtectionSettings; - - /** - * Gets the ServerThreatProtectionSettingsClient object to access its operations. - * - * @return the ServerThreatProtectionSettingsClient object. - */ - public ServerThreatProtectionSettingsClient getServerThreatProtectionSettings() { - return this.serverThreatProtectionSettings; - } - - /** - * The TuningOptionsClient object to access its operations. - */ - private final TuningOptionsClient tuningOptions; - - /** - * Gets the TuningOptionsClient object to access its operations. - * - * @return the TuningOptionsClient object. - */ - public TuningOptionsClient getTuningOptions() { - return this.tuningOptions; - } - - /** - * The TuningIndexesClient object to access its operations. + * The ServersClient object to access its operations. */ - private final TuningIndexesClient tuningIndexes; + private final ServersClient servers; /** - * Gets the TuningIndexesClient object to access its operations. + * Gets the ServersClient object to access its operations. * - * @return the TuningIndexesClient object. + * @return the ServersClient object. */ - public TuningIndexesClient getTuningIndexes() { - return this.tuningIndexes; + public ServersClient getServers() { + return this.servers; } /** - * The TuningConfigurationsClient object to access its operations. + * The TuningOptionsOperationsClient object to access its operations. */ - private final TuningConfigurationsClient tuningConfigurations; + private final TuningOptionsOperationsClient tuningOptionsOperations; /** - * Gets the TuningConfigurationsClient object to access its operations. + * Gets the TuningOptionsOperationsClient object to access its operations. * - * @return the TuningConfigurationsClient object. + * @return the TuningOptionsOperationsClient object. */ - public TuningConfigurationsClient getTuningConfigurations() { - return this.tuningConfigurations; + public TuningOptionsOperationsClient getTuningOptionsOperations() { + return this.tuningOptionsOperations; } /** @@ -562,33 +487,28 @@ public VirtualNetworkSubnetUsagesClient getVirtualNetworkSubnetUsages() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2025-01-01-preview"; - this.administrators = new AdministratorsClientImpl(this); - this.backups = new BackupsClientImpl(this); - this.locationBasedCapabilities = new LocationBasedCapabilitiesClientImpl(this); - this.serverCapabilities = new ServerCapabilitiesClientImpl(this); - this.checkNameAvailabilities = new CheckNameAvailabilitiesClientImpl(this); - this.checkNameAvailabilityWithLocations = new CheckNameAvailabilityWithLocationsClientImpl(this); + this.apiVersion = "2025-08-01"; + this.administratorsMicrosoftEntras = new AdministratorsMicrosoftEntrasClientImpl(this); + this.advancedThreatProtectionSettings = new AdvancedThreatProtectionSettingsClientImpl(this); + this.serverThreatProtectionSettings = new ServerThreatProtectionSettingsClientImpl(this); + this.backupsAutomaticAndOnDemands = new BackupsAutomaticAndOnDemandsClientImpl(this); + this.capabilitiesByLocations = new CapabilitiesByLocationsClientImpl(this); + this.capabilitiesByServers = new CapabilitiesByServersClientImpl(this); + this.capturedLogs = new CapturedLogsClientImpl(this); this.configurations = new ConfigurationsClientImpl(this); this.databases = new DatabasesClientImpl(this); this.firewallRules = new FirewallRulesClientImpl(this); - this.servers = new ServersClientImpl(this); - this.flexibleServers = new FlexibleServersClientImpl(this); - this.ltrBackupOperations = new LtrBackupOperationsClientImpl(this); + this.backupsLongTermRetentions = new BackupsLongTermRetentionsClientImpl(this); this.migrations = new MigrationsClientImpl(this); - this.resourceProviders = new ResourceProvidersClientImpl(this); + this.nameAvailabilities = new NameAvailabilitiesClientImpl(this); this.operations = new OperationsClientImpl(this); - this.getPrivateDnsZoneSuffixes = new GetPrivateDnsZoneSuffixesClientImpl(this); + this.privateDnsZoneSuffixes = new PrivateDnsZoneSuffixesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); - this.privateEndpointConnectionOperations = new PrivateEndpointConnectionOperationsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.quotaUsages = new QuotaUsagesClientImpl(this); this.replicas = new ReplicasClientImpl(this); - this.logFiles = new LogFilesClientImpl(this); - this.serverThreatProtectionSettings = new ServerThreatProtectionSettingsClientImpl(this); - this.tuningOptions = new TuningOptionsClientImpl(this); - this.tuningIndexes = new TuningIndexesClientImpl(this); - this.tuningConfigurations = new TuningConfigurationsClientImpl(this); + this.servers = new ServersClientImpl(this); + this.tuningOptionsOperations = new TuningOptionsOperationsClientImpl(this); this.virtualEndpoints = new VirtualEndpointsClientImpl(this); this.virtualNetworkSubnetUsages = new VirtualNetworkSubnetUsagesClientImpl(this); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesClientImpl.java similarity index 66% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesClientImpl.java index ec4159c5c1db..ba89783e72b5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesClientImpl.java @@ -21,17 +21,17 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.GetPrivateDnsZoneSuffixesClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateDnsZoneSuffixesClient; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in GetPrivateDnsZoneSuffixesClient. + * An instance of this class provides access to all the operations defined in PrivateDnsZoneSuffixesClient. */ -public final class GetPrivateDnsZoneSuffixesClientImpl implements GetPrivateDnsZoneSuffixesClient { +public final class PrivateDnsZoneSuffixesClientImpl implements PrivateDnsZoneSuffixesClient { /** * The proxy service used to perform REST calls. */ - private final GetPrivateDnsZoneSuffixesService service; + private final PrivateDnsZoneSuffixesService service; /** * The service client containing this operation class. @@ -39,48 +39,47 @@ public final class GetPrivateDnsZoneSuffixesClientImpl implements GetPrivateDnsZ private final PostgreSqlManagementClientImpl client; /** - * Initializes an instance of GetPrivateDnsZoneSuffixesClientImpl. + * Initializes an instance of PrivateDnsZoneSuffixesClientImpl. * * @param client the instance of the service client containing this operation class. */ - GetPrivateDnsZoneSuffixesClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(GetPrivateDnsZoneSuffixesService.class, client.getHttpPipeline(), + PrivateDnsZoneSuffixesClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(PrivateDnsZoneSuffixesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for PostgreSqlManagementClientGetPrivateDnsZoneSuffixes to be used by the + * The interface defining all the services for PostgreSqlManagementClientPrivateDnsZoneSuffixes to be used by the * proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface GetPrivateDnsZoneSuffixesService { + @ServiceInterface(name = "PostgreSqlManagementClientPrivateDnsZoneSuffixes") + public interface PrivateDnsZoneSuffixesService { @Headers({ "Content-Type: application/json" }) @Post("/providers/Microsoft.DBforPostgreSQL/getPrivateDnsZoneSuffix") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> execute(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/providers/Microsoft.DBforPostgreSQL/getPrivateDnsZoneSuffix") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response executeSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @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 private DNS zone suffix in the cloud along with {@link Response} on successful completion of - * {@link Mono}. + * @return the private DNS zone suffix along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> executeWithResponseAsync() { + public Mono> getWithResponseAsync() { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -88,53 +87,53 @@ public Mono> executeWithResponseAsync() { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.execute(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @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 private DNS zone suffix in the cloud on successful completion of {@link Mono}. + * @return the private DNS zone suffix on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono executeAsync() { - return executeWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync() { + return getWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @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 private DNS zone suffix in the cloud along with {@link Response}. + * @return the private DNS zone suffix along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response executeWithResponse(Context context) { + public Response getWithResponse(Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return service.executeSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); } /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @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 private DNS zone suffix in the cloud. + * @return the private DNS zone suffix. */ @ServiceMethod(returns = ReturnType.SINGLE) - public String execute() { - return executeWithResponse(Context.NONE).getValue(); + public String get() { + return getWithResponse(Context.NONE).getValue(); } - private static final ClientLogger LOGGER = new ClientLogger(GetPrivateDnsZoneSuffixesClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PrivateDnsZoneSuffixesClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesImpl.java similarity index 63% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesImpl.java index 3f7112b8a706..c1d0c8343b9b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesImpl.java @@ -7,31 +7,31 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.GetPrivateDnsZoneSuffixesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.models.GetPrivateDnsZoneSuffixes; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateDnsZoneSuffixesClient; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateDnsZoneSuffixes; -public final class GetPrivateDnsZoneSuffixesImpl implements GetPrivateDnsZoneSuffixes { - private static final ClientLogger LOGGER = new ClientLogger(GetPrivateDnsZoneSuffixesImpl.class); +public final class PrivateDnsZoneSuffixesImpl implements PrivateDnsZoneSuffixes { + private static final ClientLogger LOGGER = new ClientLogger(PrivateDnsZoneSuffixesImpl.class); - private final GetPrivateDnsZoneSuffixesClient innerClient; + private final PrivateDnsZoneSuffixesClient innerClient; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - public GetPrivateDnsZoneSuffixesImpl(GetPrivateDnsZoneSuffixesClient innerClient, + public PrivateDnsZoneSuffixesImpl(PrivateDnsZoneSuffixesClient innerClient, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response executeWithResponse(Context context) { - return this.serviceClient().executeWithResponse(context); + public Response getWithResponse(Context context) { + return this.serviceClient().getWithResponse(context); } - public String execute() { - return this.serviceClient().execute(); + public String get() { + return this.serviceClient().get(); } - private GetPrivateDnsZoneSuffixesClient serviceClient() { + private PrivateDnsZoneSuffixesClient serviceClient() { return this.innerClient; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsClientImpl.java deleted file mode 100644 index f43f461bf11e..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsClientImpl.java +++ /dev/null @@ -1,623 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -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.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionOperationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionOperationsClient. - */ -public final class PrivateEndpointConnectionOperationsClientImpl implements PrivateEndpointConnectionOperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final PrivateEndpointConnectionOperationsService service; - - /** - * The service client containing this operation class. - */ - private final PostgreSqlManagementClientImpl client; - - /** - * Initializes an instance of PrivateEndpointConnectionOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PrivateEndpointConnectionOperationsClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(PrivateEndpointConnectionOperationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PostgreSqlManagementClientPrivateEndpointConnectionOperations to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface PrivateEndpointConnectionOperationsService { - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200, 201, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @BodyParam("application/json") PrivateEndpointConnectionInner parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200, 201, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @BodyParam("application/json") PrivateEndpointConnectionInner parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @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 private endpoint connection resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName 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 accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, - parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @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 private endpoint connection resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, parameters, - accept, Context.NONE); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @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 private endpoint connection resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, parameters, - accept, context); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @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 {@link PollerFlux} for polling of the private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( - String resourceGroupName, String serverName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, - this.client.getContext()); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @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 {@link SyncPoller} for polling of the private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( - String resourceGroupName, String serverName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters) { - Response response - = updateWithResponse(resourceGroupName, serverName, privateEndpointConnectionName, parameters); - return this.client.getLroResult(response, - PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, Context.NONE); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @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 {@link SyncPoller} for polling of the private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( - String resourceGroupName, String serverName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, Context context) { - Response response - = updateWithResponse(resourceGroupName, serverName, privateEndpointConnectionName, parameters, context); - return this.client.getLroResult(response, - PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, context); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @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 private endpoint connection resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - return beginUpdateAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @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 private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - return beginUpdate(resourceGroupName, serverName, privateEndpointConnectionName, parameters).getFinalResult(); - } - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @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 private endpoint connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { - return beginUpdate(resourceGroupName, serverName, privateEndpointConnectionName, parameters, context) - .getFinalResult(); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, - String privateEndpointConnectionName) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String serverName, - String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, accept, - Context.NONE); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String serverName, - String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, accept, - context); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, - String privateEndpointConnectionName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, - String privateEndpointConnectionName) { - Response response - = deleteWithResponse(resourceGroupName, serverName, privateEndpointConnectionName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, - String privateEndpointConnectionName, Context context) { - Response response - = deleteWithResponse(resourceGroupName, serverName, privateEndpointConnectionName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName) { - return beginDeleteAsync(resourceGroupName, serverName, privateEndpointConnectionName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 serverName, String privateEndpointConnectionName) { - beginDelete(resourceGroupName, serverName, privateEndpointConnectionName).getFinalResult(); - } - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 serverName, String privateEndpointConnectionName, - Context context) { - beginDelete(resourceGroupName, serverName, privateEndpointConnectionName, context).getFinalResult(); - } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionOperationsClientImpl.class); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsImpl.java deleted file mode 100644 index 9ab8e1072a5c..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsImpl.java +++ /dev/null @@ -1,65 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionOperationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnection; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnectionOperations; - -public final class PrivateEndpointConnectionOperationsImpl implements PrivateEndpointConnectionOperations { - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionOperationsImpl.class); - - private final PrivateEndpointConnectionOperationsClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public PrivateEndpointConnectionOperationsImpl(PrivateEndpointConnectionOperationsClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PrivateEndpointConnection update(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - PrivateEndpointConnectionInner inner - = this.serviceClient().update(resourceGroupName, serverName, privateEndpointConnectionName, parameters); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public PrivateEndpointConnection update(String resourceGroupName, String serverName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { - PrivateEndpointConnectionInner inner = this.serviceClient() - .update(resourceGroupName, serverName, privateEndpointConnectionName, parameters, context); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName) { - this.serviceClient().delete(resourceGroupName, serverName, privateEndpointConnectionName); - } - - public void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName, - Context context) { - this.serviceClient().delete(resourceGroupName, serverName, privateEndpointConnectionName, context); - } - - private PrivateEndpointConnectionOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsClientImpl.java index 413248c603bf..66d06037ace7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsClientImpl.java @@ -4,6 +4,8 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; +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.HeaderParam; @@ -11,6 +13,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; 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; @@ -23,12 +26,18 @@ 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.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnectionListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnectionList; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -61,7 +70,7 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi * the proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientPrivateEndpointConnections") public interface PrivateEndpointConnectionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") @@ -83,11 +92,53 @@ Response getSync(@HostParam("$host") String endp @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @BodyParam("application/json") PrivateEndpointConnectionInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @BodyParam("application/json") PrivateEndpointConnectionInner parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -96,7 +147,7 @@ Mono> listByServer(@HostParam("$ho @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -105,7 +156,7 @@ Response listByServerSync(@HostParam("$host @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( + Mono> listByServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -113,7 +164,7 @@ Mono> listByServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( + Response listByServerNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -238,14 +289,524 @@ public PrivateEndpointConnectionInner get(String resourceGroupName, String serve } /** - * Gets all private endpoint connections on a server. + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @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 private endpoint connection resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName 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 accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, + parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @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 private endpoint connection resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, parameters, + accept, Context.NONE); + } + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @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 private endpoint connection resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, parameters, + accept, context); + } + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @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 {@link PollerFlux} for polling of the private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( + String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, + this.client.getContext()); + } + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @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 {@link SyncPoller} for polling of the private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( + String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters) { + Response response + = updateWithResponse(resourceGroupName, serverName, privateEndpointConnectionName, parameters); + return this.client.getLroResult(response, + PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, Context.NONE); + } + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @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 {@link SyncPoller} for polling of the private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( + String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, Context context) { + Response response + = updateWithResponse(resourceGroupName, serverName, privateEndpointConnectionName, parameters, context); + return this.client.getLroResult(response, + PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, context); + } + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @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 private endpoint connection resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + return beginUpdateAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @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 private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + return beginUpdate(resourceGroupName, serverName, privateEndpointConnectionName, parameters).getFinalResult(); + } + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @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 private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { + return beginUpdate(resourceGroupName, serverName, privateEndpointConnectionName, parameters, context) + .getFinalResult(); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String serverName, + String privateEndpointConnectionName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, accept, + Context.NONE); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String serverName, + String privateEndpointConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, accept, + context); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, + String privateEndpointConnectionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String privateEndpointConnectionName) { + Response response + = deleteWithResponse(resourceGroupName, serverName, privateEndpointConnectionName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, + String privateEndpointConnectionName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, serverName, privateEndpointConnectionName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName) { + return beginDeleteAsync(resourceGroupName, serverName, privateEndpointConnectionName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 serverName, String privateEndpointConnectionName) { + beginDelete(resourceGroupName, serverName, privateEndpointConnectionName).getFinalResult(); + } + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @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 serverName, String privateEndpointConnectionName, + Context context) { + beginDelete(resourceGroupName, serverName, privateEndpointConnectionName, context).getFinalResult(); + } + + /** + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 all private endpoint connections on a server along with {@link PagedResponse} on successful completion of + * @return list of private endpoint connections along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -276,14 +837,14 @@ private Mono> listByServerSinglePa } /** - * Gets all private endpoint connections on a server. + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 all private endpoint connections on a server as paginated response with {@link PagedFlux}. + * @return list of private endpoint connections as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -292,14 +853,14 @@ public PagedFlux listByServerAsync(String resour } /** - * Gets all private endpoint connections on a server. + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 all private endpoint connections on a server along with {@link PagedResponse}. + * @return list of private endpoint connections along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, @@ -323,7 +884,7 @@ private PagedResponse listByServerSinglePage(Str .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -331,7 +892,7 @@ private PagedResponse listByServerSinglePage(Str } /** - * Gets all private endpoint connections on a server. + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -339,7 +900,7 @@ private PagedResponse listByServerSinglePage(Str * @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 all private endpoint connections on a server along with {@link PagedResponse}. + * @return list of private endpoint connections along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, @@ -363,7 +924,7 @@ private PagedResponse listByServerSinglePage(Str .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -371,14 +932,14 @@ private PagedResponse listByServerSinglePage(Str } /** - * Gets all private endpoint connections on a server. + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 all private endpoint connections on a server as paginated response with {@link PagedIterable}. + * @return list of private endpoint connections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -387,7 +948,7 @@ public PagedIterable listByServer(String resourc } /** - * Gets all private endpoint connections on a server. + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -395,7 +956,7 @@ public PagedIterable listByServer(String resourc * @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 all private endpoint connections on a server as paginated response with {@link PagedIterable}. + * @return list of private endpoint connections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName, @@ -411,7 +972,7 @@ public PagedIterable listByServer(String resourc * @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 a list of private endpoint connections along with {@link PagedResponse} on successful completion of + * @return list of private endpoint connections along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -438,7 +999,7 @@ private Mono> listByServerNextSing * @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 a list of private endpoint connections along with {@link PagedResponse}. + * @return list of private endpoint connections along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { @@ -452,7 +1013,7 @@ private PagedResponse listByServerNextSinglePage "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -466,7 +1027,7 @@ private PagedResponse listByServerNextSinglePage * @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 a list of private endpoint connections along with {@link PagedResponse}. + * @return list of private endpoint connections along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { @@ -480,7 +1041,7 @@ private PagedResponse listByServerNextSinglePage "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsImpl.java index c5d58ff63e8a..f3ea45388ed1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsImpl.java @@ -50,6 +50,37 @@ public PrivateEndpointConnection get(String resourceGroupName, String serverName } } + public PrivateEndpointConnection update(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + PrivateEndpointConnectionInner inner + = this.serviceClient().update(resourceGroupName, serverName, privateEndpointConnectionName, parameters); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public PrivateEndpointConnection update(String resourceGroupName, String serverName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { + PrivateEndpointConnectionInner inner = this.serviceClient() + .update(resourceGroupName, serverName, privateEndpointConnectionName, parameters, context); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName) { + this.serviceClient().delete(resourceGroupName, serverName, privateEndpointConnectionName); + } + + public void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName, + Context context) { + this.serviceClient().delete(resourceGroupName, serverName, privateEndpointConnectionName, context); + } + public PagedIterable listByServer(String resourceGroupName, String serverName) { PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesClientImpl.java index 40f14c5f6fd2..7d76c3a4eabc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesClientImpl.java @@ -28,7 +28,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkResourceListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkResourceList; import reactor.core.publisher.Mono; /** @@ -61,13 +61,13 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource * proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientPrivateLinkResources") public interface PrivateLinkResourcesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -76,7 +76,7 @@ Mono> listByServer(@HostParam("$host") S @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -103,7 +103,7 @@ Response getSync(@HostParam("$host") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( + Mono> listByServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -111,7 +111,7 @@ Mono> listByServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( + Response listByServerNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -202,7 +202,7 @@ private PagedResponse listByServerSinglePage(String re .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -242,7 +242,7 @@ private PagedResponse listByServerSinglePage(String re .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -405,8 +405,8 @@ public PrivateLinkResourceInner get(String resourceGroupName, String serverName, * @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 a list of private link resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the private link resources for PostgreSQL server along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -432,7 +432,7 @@ private Mono> listByServerNextSinglePage * @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 a list of private link resources along with {@link PagedResponse}. + * @return the private link resources for PostgreSQL server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { @@ -446,7 +446,7 @@ private PagedResponse listByServerNextSinglePage(Strin "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -460,7 +460,7 @@ private PagedResponse listByServerNextSinglePage(Strin * @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 a list of private link resources along with {@link PagedResponse}. + * @return the private link resources for PostgreSQL server along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { @@ -474,7 +474,7 @@ private PagedResponse listByServerNextSinglePage(Strin "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsagesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsagesClientImpl.java index 3176b3cda6d5..9b05338ae9e3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsagesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsagesClientImpl.java @@ -28,7 +28,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.QuotaUsagesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.QuotaUsageInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.QuotaUsagesListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.QuotaUsageList; import reactor.core.publisher.Mono; /** @@ -61,13 +61,13 @@ public final class QuotaUsagesClientImpl implements QuotaUsagesClient { * to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientQuotaUsages") public interface QuotaUsagesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/resourceType/flexibleServers/usages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); @@ -75,7 +75,7 @@ Mono> list(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/resourceType/flexibleServers/usages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); @@ -83,14 +83,14 @@ Response listSync(@HostParam("$host") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -166,7 +166,7 @@ private PagedResponse listSinglePage(String locationName) { .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -199,7 +199,7 @@ private PagedResponse listSinglePage(String locationName, Conte .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -244,8 +244,8 @@ public PagedIterable list(String locationName, Context context) * @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 capability for the PostgreSQL server along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return quota usages at specified location in a given subscription along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -270,7 +270,7 @@ private Mono> listNextSinglePageAsync(String next * @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 capability for the PostgreSQL server along with {@link PagedResponse}. + * @return quota usages at specified location in a given subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { @@ -284,8 +284,7 @@ private PagedResponse listNextSinglePage(String nextLink) { "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -298,7 +297,7 @@ private PagedResponse listNextSinglePage(String nextLink) { * @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 capability for the PostgreSQL server along with {@link PagedResponse}. + * @return quota usages at specified location in a given subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { @@ -312,8 +311,7 @@ private PagedResponse listNextSinglePage(String nextLink, Conte "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasClientImpl.java index 1bc5202200de..85b5ec9f2a22 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasClientImpl.java @@ -28,7 +28,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ReplicasClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerList; import reactor.core.publisher.Mono; /** @@ -60,13 +60,13 @@ public final class ReplicasClientImpl implements ReplicasClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientReplicas") public interface ReplicasService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/replicas") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -75,14 +75,14 @@ Mono> listByServer(@HostParam("$host") String endpoin @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/replicas") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); } /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -118,7 +118,7 @@ private Mono> listByServerSinglePageAsync(String reso } /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -133,7 +133,7 @@ public PagedFlux listByServerAsync(String resourceGroupName, String } /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -163,15 +163,14 @@ private PagedResponse listByServerSinglePage(String resourceGroupNa .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null); } /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -203,15 +202,14 @@ private PagedResponse listByServerSinglePage(String resourceGroupNa .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null); } /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -226,7 +224,7 @@ public PagedIterable listByServer(String resourceGroupName, String } /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersClientImpl.java deleted file mode 100644 index 36067daeee8e..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersClientImpl.java +++ /dev/null @@ -1,224 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -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.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.resourcemanager.postgresqlflexibleserver.fluent.ResourceProvidersClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ResourceProvidersClient. - */ -public final class ResourceProvidersClientImpl implements ResourceProvidersClient { - /** - * The proxy service used to perform REST calls. - */ - private final ResourceProvidersService service; - - /** - * The service client containing this operation class. - */ - private final PostgreSqlManagementClientImpl client; - - /** - * Initializes an instance of ResourceProvidersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ResourceProvidersClientImpl(PostgreSqlManagementClientImpl client) { - this.service - = RestProxy.create(ResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PostgreSqlManagementClientResourceProviders to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface ResourceProvidersService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/checkMigrationNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkMigrationNameAvailability( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, - @BodyParam("application/json") MigrationNameAvailabilityResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/checkMigrationNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response checkMigrationNameAvailabilitySync( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("targetDbServerName") String targetDbServerName, - @BodyParam("application/json") MigrationNameAvailabilityResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @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 represents a migration name's availability along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> checkMigrationNameAvailabilityWithResponseAsync( - String subscriptionId, String resourceGroupName, String targetDbServerName, - MigrationNameAvailabilityResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (targetDbServerName == null) { - return Mono - .error(new IllegalArgumentException("Parameter targetDbServerName 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 accept = "application/json"; - return FluxUtil - .withContext(context -> service.checkMigrationNameAvailability(this.client.getEndpoint(), - this.client.getApiVersion(), subscriptionId, resourceGroupName, targetDbServerName, parameters, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @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 represents a migration name's availability on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono checkMigrationNameAvailabilityAsync(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationNameAvailabilityResourceInner parameters) { - return checkMigrationNameAvailabilityWithResponseAsync(subscriptionId, resourceGroupName, targetDbServerName, - parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @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 represents a migration name's availability along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkMigrationNameAvailabilityWithResponse( - String subscriptionId, String resourceGroupName, String targetDbServerName, - MigrationNameAvailabilityResourceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (targetDbServerName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter targetDbServerName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.checkMigrationNameAvailabilitySync(this.client.getEndpoint(), this.client.getApiVersion(), - subscriptionId, resourceGroupName, targetDbServerName, parameters, accept, context); - } - - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @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 represents a migration name's availability. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationNameAvailabilityResourceInner checkMigrationNameAvailability(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationNameAvailabilityResourceInner parameters) { - return checkMigrationNameAvailabilityWithResponse(subscriptionId, resourceGroupName, targetDbServerName, - parameters, Context.NONE).getValue(); - } - - private static final ClientLogger LOGGER = new ClientLogger(ResourceProvidersClientImpl.class); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersImpl.java deleted file mode 100644 index 391186cd010a..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersImpl.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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ResourceProvidersClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationNameAvailabilityResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ResourceProviders; - -public final class ResourceProvidersImpl implements ResourceProviders { - private static final ClientLogger LOGGER = new ClientLogger(ResourceProvidersImpl.class); - - private final ResourceProvidersClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public ResourceProvidersImpl(ResourceProvidersClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response checkMigrationNameAvailabilityWithResponse(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationNameAvailabilityResourceInner parameters, - Context context) { - Response inner = this.serviceClient() - .checkMigrationNameAvailabilityWithResponse(subscriptionId, resourceGroupName, targetDbServerName, - parameters, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new MigrationNameAvailabilityResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public MigrationNameAvailabilityResource checkMigrationNameAvailability(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationNameAvailabilityResourceInner parameters) { - MigrationNameAvailabilityResourceInner inner = this.serviceClient() - .checkMigrationNameAvailability(subscriptionId, resourceGroupName, targetDbServerName, parameters); - if (inner != null) { - return new MigrationNameAvailabilityResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - private ResourceProvidersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerImpl.java index 1abda05900b2..b4960aae5c93 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerImpl.java @@ -10,23 +10,28 @@ import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfigForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.Cluster; import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForUpdate; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption; import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindowForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnection; import com.azure.resourcemanager.postgresqlflexibleserver.models.Replica; import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationRole; import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter; import com.azure.resourcemanager.postgresqlflexibleserver.models.Server; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForUpdate; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerState; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; import com.azure.resourcemanager.postgresqlflexibleserver.models.UserAssignedIdentity; import java.time.OffsetDateTime; @@ -85,7 +90,7 @@ public String administratorLoginPassword() { return this.innerModel().administratorLoginPassword(); } - public ServerVersion version() { + public PostgresMajorVersion version() { return this.innerModel().version(); } @@ -196,7 +201,7 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man private String serverName; - private ServerForUpdate updateParameters; + private ServerForPatch updateParameters; public ServerImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -206,14 +211,14 @@ public ServerImpl withExistingResourceGroup(String resourceGroupName) { public Server create() { this.innerObject = serviceManager.serviceClient() .getServers() - .create(resourceGroupName, serverName, this.innerModel(), Context.NONE); + .createOrUpdate(resourceGroupName, serverName, this.innerModel(), Context.NONE); return this; } public Server create(Context context) { this.innerObject = serviceManager.serviceClient() .getServers() - .create(resourceGroupName, serverName, this.innerModel(), context); + .createOrUpdate(resourceGroupName, serverName, this.innerModel(), context); return this; } @@ -224,7 +229,7 @@ public Server create(Context context) { } public ServerImpl update() { - this.updateParameters = new ServerForUpdate(); + this.updateParameters = new ServerForPatch(); return this; } @@ -311,13 +316,8 @@ public ServerImpl withTags(Map tags) { } public ServerImpl withSku(Sku sku) { - if (isInCreateMode()) { - this.innerModel().withSku(sku); - return this; - } else { - this.updateParameters.withSku(sku); - return this; - } + this.innerModel().withSku(sku); + return this; } public ServerImpl withIdentity(UserAssignedIdentity identity) { @@ -331,13 +331,8 @@ public ServerImpl withIdentity(UserAssignedIdentity identity) { } public ServerImpl withAdministratorLogin(String administratorLogin) { - if (isInCreateMode()) { - this.innerModel().withAdministratorLogin(administratorLogin); - return this; - } else { - this.updateParameters.withAdministratorLogin(administratorLogin); - return this; - } + this.innerModel().withAdministratorLogin(administratorLogin); + return this; } public ServerImpl withAdministratorLoginPassword(String administratorLoginPassword) { @@ -350,7 +345,7 @@ public ServerImpl withAdministratorLoginPassword(String administratorLoginPasswo } } - public ServerImpl withVersion(ServerVersion version) { + public ServerImpl withVersion(PostgresMajorVersion version) { if (isInCreateMode()) { this.innerModel().withVersion(version); return this; @@ -371,13 +366,8 @@ public ServerImpl withStorage(Storage storage) { } public ServerImpl withAuthConfig(AuthConfig authConfig) { - if (isInCreateMode()) { - this.innerModel().withAuthConfig(authConfig); - return this; - } else { - this.updateParameters.withAuthConfig(authConfig); - return this; - } + this.innerModel().withAuthConfig(authConfig); + return this; } public ServerImpl withDataEncryption(DataEncryption dataEncryption) { @@ -391,13 +381,8 @@ public ServerImpl withDataEncryption(DataEncryption dataEncryption) { } public ServerImpl withBackup(Backup backup) { - if (isInCreateMode()) { - this.innerModel().withBackup(backup); - return this; - } else { - this.updateParameters.withBackup(backup); - return this; - } + this.innerModel().withBackup(backup); + return this; } public ServerImpl withNetwork(Network network) { @@ -411,13 +396,8 @@ public ServerImpl withNetwork(Network network) { } public ServerImpl withHighAvailability(HighAvailability highAvailability) { - if (isInCreateMode()) { - this.innerModel().withHighAvailability(highAvailability); - return this; - } else { - this.updateParameters.withHighAvailability(highAvailability); - return this; - } + this.innerModel().withHighAvailability(highAvailability); + return this; } public ServerImpl withSourceServerResourceId(String sourceServerResourceId) { @@ -431,8 +411,13 @@ public ServerImpl withPointInTimeUtc(OffsetDateTime pointInTimeUtc) { } public ServerImpl withAvailabilityZone(String availabilityZone) { - this.innerModel().withAvailabilityZone(availabilityZone); - return this; + if (isInCreateMode()) { + this.innerModel().withAvailabilityZone(availabilityZone); + return this; + } else { + this.updateParameters.withAvailabilityZone(availabilityZone); + return this; + } } public ServerImpl withReplicationRole(ReplicationRole replicationRole) { @@ -460,12 +445,32 @@ public ServerImpl withCluster(Cluster cluster) { } } - public ServerImpl withMaintenanceWindow(MaintenanceWindow maintenanceWindow) { + public ServerImpl withSku(SkuForPatch sku) { + this.updateParameters.withSku(sku); + return this; + } + + public ServerImpl withBackup(BackupForPatch backup) { + this.updateParameters.withBackup(backup); + return this; + } + + public ServerImpl withHighAvailability(HighAvailabilityForPatch highAvailability) { + this.updateParameters.withHighAvailability(highAvailability); + return this; + } + + public ServerImpl withMaintenanceWindow(MaintenanceWindowForPatch maintenanceWindow) { this.updateParameters.withMaintenanceWindow(maintenanceWindow); return this; } - public ServerImpl withCreateMode(CreateModeForUpdate createMode) { + public ServerImpl withAuthConfig(AuthConfigForPatch authConfig) { + this.updateParameters.withAuthConfig(authConfig); + return this; + } + + public ServerImpl withCreateMode(CreateModeForPatch createMode) { this.updateParameters.withCreateMode(createMode); return this; } @@ -476,6 +481,6 @@ public ServerImpl withReplica(Replica replica) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsClientImpl.java index df260397c92e..6f29286c0364 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsClientImpl.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; @@ -18,10 +17,6 @@ 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; @@ -33,8 +28,7 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerThreatProtectionSettingsModelInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -70,371 +64,29 @@ public final class ServerThreatProtectionSettingsClientImpl implements ServerThr * by the proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientServerThreatProtectionSettings") public interface ServerThreatProtectionSettingsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, - @BodyParam("application/json") ServerThreatProtectionSettingsModelInner parameters, + @BodyParam("application/json") AdvancedThreatProtectionSettingsModelInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response createOrUpdateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, - @BodyParam("application/json") ServerThreatProtectionSettingsModelInner parameters, + @BodyParam("application/json") AdvancedThreatProtectionSettingsModelInner parameters, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 a list of server's Threat Protection state along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByServerSinglePageAsync(String resourceGroupName, String serverName) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) - .>map( - res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 a list of server's Threat Protection state as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, - String serverName) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePageAsync(nextLink)); - } - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 a list of server's Threat Protection state along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, - String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 a list of server's Threat Protection state along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, - String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 a list of server's Threat Protection state as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, - String serverName) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePage(nextLink)); - } - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 a list of server's Threat Protection state as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, - String serverName, Context context) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePage(nextLink, context)); - } - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @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 a server's Advanced Threat Protection settings along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, ThreatProtectionName threatProtectionName) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (threatProtectionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter threatProtectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, threatProtectionName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @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 a server's Advanced Threat Protection settings on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName) { - return getWithResponseAsync(resourceGroupName, serverName, threatProtectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @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 a server's Advanced Threat Protection settings along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String serverName, ThreatProtectionName threatProtectionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (threatProtectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter threatProtectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, threatProtectionName, accept, context); - } - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @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 a server's Advanced Threat Protection settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServerThreatProtectionSettingsModelInner get(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName) { - return getWithResponse(resourceGroupName, serverName, threatProtectionName, Context.NONE).getValue(); } /** @@ -442,17 +94,17 @@ public ServerThreatProtectionSettingsModelInner get(String resourceGroupName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @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 server's Advanced Threat Protection settings along with {@link Response} on successful completion of + * @return advanced threat protection settings of the server along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters) { + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -490,16 +142,16 @@ public Mono>> createOrUpdateWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @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 server's Advanced Threat Protection settings along with {@link Response}. + * @return advanced threat protection settings of the server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters) { + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -539,17 +191,17 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @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 server's Advanced Threat Protection settings along with {@link Response}. + * @return advanced threat protection settings of the server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters, + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -590,23 +242,24 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @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 {@link PollerFlux} for polling of server's Advanced Threat Protection settings. + * @return the {@link PollerFlux} for polling of advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ServerThreatProtectionSettingsModelInner> + public + PollerFlux, AdvancedThreatProtectionSettingsModelInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, - ServerThreatProtectionSettingsModelInner parameters) { + AdvancedThreatProtectionSettingsModelInner parameters) { Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, serverName, threatProtectionName, parameters); return this.client - .getLroResult(mono, - this.client.getHttpPipeline(), ServerThreatProtectionSettingsModelInner.class, - ServerThreatProtectionSettingsModelInner.class, this.client.getContext()); + .getLroResult(mono, + this.client.getHttpPipeline(), AdvancedThreatProtectionSettingsModelInner.class, + AdvancedThreatProtectionSettingsModelInner.class, this.client.getContext()); } /** @@ -614,23 +267,24 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @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 {@link SyncPoller} for polling of server's Advanced Threat Protection settings. + * @return the {@link SyncPoller} for polling of advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerThreatProtectionSettingsModelInner> + public + SyncPoller, AdvancedThreatProtectionSettingsModelInner> beginCreateOrUpdate(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, - ServerThreatProtectionSettingsModelInner parameters) { + AdvancedThreatProtectionSettingsModelInner parameters) { Response response = createOrUpdateWithResponse(resourceGroupName, serverName, threatProtectionName, parameters); return this.client - .getLroResult(response, - ServerThreatProtectionSettingsModelInner.class, ServerThreatProtectionSettingsModelInner.class, - Context.NONE); + .getLroResult( + response, AdvancedThreatProtectionSettingsModelInner.class, + AdvancedThreatProtectionSettingsModelInner.class, Context.NONE); } /** @@ -638,24 +292,25 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @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 {@link SyncPoller} for polling of server's Advanced Threat Protection settings. + * @return the {@link SyncPoller} for polling of advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerThreatProtectionSettingsModelInner> + public + SyncPoller, AdvancedThreatProtectionSettingsModelInner> beginCreateOrUpdate(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, - ServerThreatProtectionSettingsModelInner parameters, Context context) { + AdvancedThreatProtectionSettingsModelInner parameters, Context context) { Response response = createOrUpdateWithResponse(resourceGroupName, serverName, threatProtectionName, parameters, context); return this.client - .getLroResult(response, - ServerThreatProtectionSettingsModelInner.class, ServerThreatProtectionSettingsModelInner.class, - context); + .getLroResult( + response, AdvancedThreatProtectionSettingsModelInner.class, + AdvancedThreatProtectionSettingsModelInner.class, context); } /** @@ -663,17 +318,17 @@ private Response createOrUpdateWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @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 server's Advanced Threat Protection settings on successful completion of {@link Mono}. + * @return advanced threat protection settings of the server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, - ServerThreatProtectionSettingsModelInner parameters) { + AdvancedThreatProtectionSettingsModelInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, threatProtectionName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -683,16 +338,16 @@ public Mono createOrUpdateAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @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 server's Advanced Threat Protection settings. + * @return advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters) { + public AdvancedThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters) { return beginCreateOrUpdate(resourceGroupName, serverName, threatProtectionName, parameters).getFinalResult(); } @@ -701,106 +356,21 @@ public ServerThreatProtectionSettingsModelInner createOrUpdate(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param parameters The Advanced Threat Protection state for the flexible server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param parameters The Advanced Threat Protection state for the server. * @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 server's Advanced Threat Protection settings. + * @return advanced threat protection settings of the server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, ServerThreatProtectionSettingsModelInner parameters, + public AdvancedThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters, Context context) { return beginCreateOrUpdate(resourceGroupName, serverName, threatProtectionName, parameters, context) .getFinalResult(); } - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 a list of the server's Advanced Threat Protection settings along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByServerNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 a list of the server's Advanced Threat Protection settings along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 a list of the server's Advanced Threat Protection settings along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink, - Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - private static final ClientLogger LOGGER = new ClientLogger(ServerThreatProtectionSettingsClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsImpl.java index 169ad54fde8f..39fbc0b5db44 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsImpl.java @@ -4,15 +4,9 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerThreatProtectionSettingsModelInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettings; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettingsModel; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; public final class ServerThreatProtectionSettingsImpl implements ServerThreatProtectionSettings { @@ -28,87 +22,6 @@ public ServerThreatProtectionSettingsImpl(ServerThreatProtectionSettingsClient i this.serviceManager = serviceManager; } - public PagedIterable listByServer(String resourceGroupName, - String serverName) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ServerThreatProtectionSettingsModelImpl(inner1, this.manager())); - } - - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ServerThreatProtectionSettingsModelImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, serverName, threatProtectionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ServerThreatProtectionSettingsModelImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ServerThreatProtectionSettingsModel get(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName) { - ServerThreatProtectionSettingsModelInner inner - = this.serviceClient().get(resourceGroupName, serverName, threatProtectionName); - if (inner != null) { - return new ServerThreatProtectionSettingsModelImpl(inner, this.manager()); - } else { - return null; - } - } - - public ServerThreatProtectionSettingsModel getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String serverName = ResourceManagerUtils.getValueFromIdByName(id, "flexibleServers"); - if (serverName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id))); - } - String threatProtectionNameLocal - = ResourceManagerUtils.getValueFromIdByName(id, "advancedThreatProtectionSettings"); - if (threatProtectionNameLocal == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'advancedThreatProtectionSettings'.", id))); - } - ThreatProtectionName threatProtectionName = ThreatProtectionName.fromString(threatProtectionNameLocal); - return this.getWithResponse(resourceGroupName, serverName, threatProtectionName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String serverName = ResourceManagerUtils.getValueFromIdByName(id, "flexibleServers"); - if (serverName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id))); - } - String threatProtectionNameLocal - = ResourceManagerUtils.getValueFromIdByName(id, "advancedThreatProtectionSettings"); - if (threatProtectionNameLocal == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( - "The resource ID '%s' is not valid. Missing path segment 'advancedThreatProtectionSettings'.", id))); - } - ThreatProtectionName threatProtectionName = ThreatProtectionName.fromString(threatProtectionNameLocal); - return this.getWithResponse(resourceGroupName, serverName, threatProtectionName, context); - } - private ServerThreatProtectionSettingsClient serviceClient() { return this.innerClient; } @@ -117,7 +30,7 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man return this.serviceManager; } - public ServerThreatProtectionSettingsModelImpl define(ThreatProtectionName name) { - return new ServerThreatProtectionSettingsModelImpl(name, this.manager()); + public AdvancedThreatProtectionSettingsModelImpl define(ThreatProtectionName name) { + return new AdvancedThreatProtectionSettingsModelImpl(name, this.manager()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersClientImpl.java index 6ee39b4be501..eb9155277701 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersClientImpl.java @@ -38,8 +38,8 @@ import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForUpdate; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -73,13 +73,13 @@ public final class ServersClientImpl implements ServersClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientServers") public interface ServersService { @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @BodyParam("application/json") ServerInner parameters, @HeaderParam("Accept") String accept, @@ -87,9 +87,9 @@ Mono>> create(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @BodyParam("application/json") ServerInner parameters, @HeaderParam("Accept") String accept, @@ -102,7 +102,7 @@ Response createSync(@HostParam("$host") String endpoint, Mono>> update(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") ServerForUpdate parameters, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ServerForPatch parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -112,12 +112,12 @@ Mono>> update(@HostParam("$host") String endpoint, Response updateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") ServerForUpdate parameters, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ServerForPatch parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -126,7 +126,7 @@ Mono>> delete(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Response deleteSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -155,7 +155,7 @@ Response getByResourceGroupSync(@HostParam("$host") String endpoint @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @@ -164,7 +164,7 @@ Mono> listByResourceGroup(@HostParam("$host") String @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, + Response listByResourceGroupSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @@ -173,7 +173,7 @@ Response listByResourceGroupSync(@HostParam("$host") String en @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/flexibleServers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -181,13 +181,12 @@ Mono> list(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/flexibleServers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/restart") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> restart(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -197,7 +196,7 @@ Mono>> restart(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/restart") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response restartSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -207,7 +206,7 @@ Response restartSync(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/start") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> start(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -216,7 +215,7 @@ Mono>> start(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/start") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response startSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -225,7 +224,7 @@ Response startSync(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/stop") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> stop(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -234,7 +233,7 @@ Mono>> stop(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/stop") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response stopSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -245,7 +244,7 @@ Response stopSync(@HostParam("$host") String endpoint, @QueryParam(" @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( + Mono> listByResourceGroupNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -253,22 +252,22 @@ Mono> listByResourceGroupNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response listByResourceGroupNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + Response listBySubscriptionNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -277,14 +276,14 @@ Response listNextSync(@PathParam(value = "nextLink", encoded = * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @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 represents a server along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createWithResponseAsync(String resourceGroupName, String serverName, + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, ServerInner parameters) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -308,7 +307,7 @@ public Mono>> createWithResponseAsync(String resourceG } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -318,14 +317,14 @@ public Mono>> createWithResponseAsync(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @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 represents a server along with {@link Response}. + * @return properties of a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createWithResponse(String resourceGroupName, String serverName, + private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, ServerInner parameters) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -352,7 +351,7 @@ private Response createWithResponse(String resourceGroupName, String parameters.validate(); } final String accept = "application/json"; - return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, Context.NONE); } @@ -361,16 +360,16 @@ private Response createWithResponse(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @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 represents a server along with {@link Response}. + * @return properties of a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createWithResponse(String resourceGroupName, String serverName, ServerInner parameters, - Context context) { + private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, + ServerInner parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -396,7 +395,7 @@ private Response createWithResponse(String resourceGroupName, String parameters.validate(); } final String accept = "application/json"; - return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); } @@ -405,16 +404,17 @@ private Response createWithResponse(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @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 {@link PollerFlux} for polling of represents a server. + * @return the {@link PollerFlux} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ServerInner> beginCreateAsync(String resourceGroupName, + public PollerFlux, ServerInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, ServerInner parameters) { - Mono>> mono = createWithResponseAsync(resourceGroupName, serverName, parameters); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, serverName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ServerInner.class, ServerInner.class, this.client.getContext()); } @@ -424,16 +424,16 @@ public PollerFlux, ServerInner> beginCreateAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @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 {@link SyncPoller} for polling of represents a server. + * @return the {@link SyncPoller} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerInner> beginCreate(String resourceGroupName, String serverName, - ServerInner parameters) { - Response response = createWithResponse(resourceGroupName, serverName, parameters); + public SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, ServerInner parameters) { + Response response = createOrUpdateWithResponse(resourceGroupName, serverName, parameters); return this.client.getLroResult(response, ServerInner.class, ServerInner.class, Context.NONE); } @@ -443,17 +443,17 @@ public SyncPoller, ServerInner> beginCreate(String resou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @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 {@link SyncPoller} for polling of represents a server. + * @return the {@link SyncPoller} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerInner> beginCreate(String resourceGroupName, String serverName, - ServerInner parameters, Context context) { - Response response = createWithResponse(resourceGroupName, serverName, parameters, context); + public SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, + String serverName, ServerInner parameters, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, serverName, parameters, context); return this.client.getLroResult(response, ServerInner.class, ServerInner.class, context); } @@ -463,15 +463,15 @@ public SyncPoller, ServerInner> beginCreate(String resou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @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 represents a server on successful completion of {@link Mono}. + * @return properties of a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync(String resourceGroupName, String serverName, ServerInner parameters) { - return beginCreateAsync(resourceGroupName, serverName, parameters).last() + public Mono createOrUpdateAsync(String resourceGroupName, String serverName, ServerInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, serverName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -480,15 +480,15 @@ public Mono createAsync(String resourceGroupName, String serverName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @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 represents a server. + * @return properties of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerInner create(String resourceGroupName, String serverName, ServerInner parameters) { - return beginCreate(resourceGroupName, serverName, parameters).getFinalResult(); + public ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters) { + return beginCreateOrUpdate(resourceGroupName, serverName, parameters).getFinalResult(); } /** @@ -496,33 +496,34 @@ public ServerInner create(String resourceGroupName, String serverName, ServerInn * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for creating or updating a server. + * @param parameters Parameters required to create a new server or to update an existing server. * @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 represents a server. + * @return properties of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerInner create(String resourceGroupName, String serverName, ServerInner parameters, Context context) { - return beginCreate(resourceGroupName, serverName, parameters, context).getFinalResult(); + public ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters, + Context context) { + return beginCreateOrUpdate(resourceGroupName, serverName, parameters, context).getFinalResult(); } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @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 represents a server along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, - ServerForUpdate parameters) { + ServerForPatch parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -551,20 +552,20 @@ public Mono>> updateWithResponseAsync(String resourceG } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @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 represents a server along with {@link Response}. + * @return properties of a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, - ServerForUpdate parameters) { + ServerForPatch parameters) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -595,21 +596,21 @@ private Response updateWithResponse(String resourceGroupName, String } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @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 represents a server along with {@link Response}. + * @return properties of a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, - ServerForUpdate parameters, Context context) { + ServerForPatch parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -640,122 +641,121 @@ private Response updateWithResponse(String resourceGroupName, String } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @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 {@link PollerFlux} for polling of represents a server. + * @return the {@link PollerFlux} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ServerInner> beginUpdateAsync(String resourceGroupName, - String serverName, ServerForUpdate parameters) { + String serverName, ServerForPatch parameters) { Mono>> mono = updateWithResponseAsync(resourceGroupName, serverName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ServerInner.class, ServerInner.class, this.client.getContext()); } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @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 {@link SyncPoller} for polling of represents a server. + * @return the {@link SyncPoller} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, - ServerForUpdate parameters) { + ServerForPatch parameters) { Response response = updateWithResponse(resourceGroupName, serverName, parameters); return this.client.getLroResult(response, ServerInner.class, ServerInner.class, Context.NONE); } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @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 {@link SyncPoller} for polling of represents a server. + * @return the {@link SyncPoller} for polling of properties of a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, - ServerForUpdate parameters, Context context) { + ServerForPatch parameters, Context context) { Response response = updateWithResponse(resourceGroupName, serverName, parameters, context); return this.client.getLroResult(response, ServerInner.class, ServerInner.class, context); } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @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 represents a server on successful completion of {@link Mono}. + * @return properties of a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, ServerForUpdate parameters) { + public Mono updateAsync(String resourceGroupName, String serverName, ServerForPatch parameters) { return beginUpdateAsync(resourceGroupName, serverName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @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 represents a server. + * @return properties of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerInner update(String resourceGroupName, String serverName, ServerForUpdate parameters) { + public ServerInner update(String resourceGroupName, String serverName, ServerForPatch parameters) { return beginUpdate(resourceGroupName, serverName, parameters).getFinalResult(); } /** - * Updates an existing server. The request body can contain one to many of the properties present in the normal + * Updates an existing server. The request body can contain one or multiple of the properties present in the normal * server definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The required parameters for updating a server. + * @param parameters Parameters required to update a server. * @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 represents a server. + * @return properties of a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerInner update(String resourceGroupName, String serverName, ServerForUpdate parameters, - Context context) { + public ServerInner update(String resourceGroupName, String serverName, ServerForPatch parameters, Context context) { return beginUpdate(resourceGroupName, serverName, parameters, context).getFinalResult(); } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -789,7 +789,7 @@ public Mono>> deleteWithResponseAsync(String resourceG } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -824,7 +824,7 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -860,7 +860,7 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -877,7 +877,7 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -893,7 +893,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -911,7 +911,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -926,7 +926,7 @@ public Mono deleteAsync(String resourceGroupName, String serverName) { } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -940,7 +940,7 @@ public void delete(String resourceGroupName, String serverName) { } /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -955,14 +955,15 @@ public void delete(String resourceGroupName, String serverName, Context context) } /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 information about a server along with {@link Response} on successful completion of {@link Mono}. + * @return information about an existing server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, @@ -990,14 +991,14 @@ public Mono> getByResourceGroupWithResponseAsync(String re } /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 information about a server on successful completion of {@link Mono}. + * @return information about an existing server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getByResourceGroupAsync(String resourceGroupName, String serverName) { @@ -1006,7 +1007,7 @@ public Mono getByResourceGroupAsync(String resourceGroupName, Strin } /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1014,7 +1015,7 @@ public Mono getByResourceGroupAsync(String resourceGroupName, Strin * @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 information about a server along with {@link Response}. + * @return information about an existing server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, @@ -1043,14 +1044,14 @@ public Response getByResourceGroupWithResponse(String resourceGroup } /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 information about a server. + * @return information about an existing server. */ @ServiceMethod(returns = ReturnType.SINGLE) public ServerInner getByResourceGroup(String resourceGroupName, String serverName) { @@ -1058,7 +1059,7 @@ public ServerInner getByResourceGroup(String resourceGroupName, String serverNam } /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1090,7 +1091,7 @@ private Mono> listByResourceGroupSinglePageAsync(Stri } /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1105,7 +1106,7 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupName) } /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1130,14 +1131,14 @@ private PagedResponse listByResourceGroupSinglePage(String resource .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -1163,14 +1164,14 @@ private PagedResponse listByResourceGroupSinglePage(String resource .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1185,7 +1186,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName) } /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -1201,7 +1202,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName, } /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1227,7 +1228,7 @@ private Mono> listSinglePageAsync() { } /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1235,11 +1236,12 @@ private Mono> listSinglePageAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1258,14 +1260,14 @@ private PagedResponse listSinglePage() { "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1286,14 +1288,14 @@ private PagedResponse listSinglePage(Context context) { "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1301,11 +1303,11 @@ private PagedResponse listSinglePage(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1315,15 +1317,16 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @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. @@ -1358,11 +1361,11 @@ public Mono>> restartWithResponseAsync(String resource } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @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. @@ -1398,11 +1401,11 @@ private Response restartWithResponse(String resourceGroupName, Strin } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @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. @@ -1439,11 +1442,11 @@ private Response restartWithResponse(String resourceGroupName, Strin } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @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. @@ -1458,7 +1461,7 @@ public PollerFlux, Void> beginRestartAsync(String resourceGroup } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1476,11 +1479,11 @@ public PollerFlux, Void> beginRestartAsync(String resourceGroup } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @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. @@ -1494,7 +1497,7 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1511,11 +1514,11 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @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. @@ -1530,11 +1533,11 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @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. @@ -1547,7 +1550,7 @@ public Mono restartAsync(String resourceGroupName, String serverName, Rest } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1564,7 +1567,7 @@ public Mono restartAsync(String resourceGroupName, String serverName) { } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1579,11 +1582,11 @@ public void restart(String resourceGroupName, String serverName) { } /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @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. @@ -1595,7 +1598,7 @@ public void restart(String resourceGroupName, String serverName, RestartParamete } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1629,7 +1632,7 @@ public Mono>> startWithResponseAsync(String resourceGr } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1664,7 +1667,7 @@ private Response startWithResponse(String resourceGroupName, String } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1700,7 +1703,7 @@ private Response startWithResponse(String resourceGroupName, String } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1717,7 +1720,7 @@ public PollerFlux, Void> beginStartAsync(String resourceGroupNa } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1733,7 +1736,7 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1750,7 +1753,7 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1765,7 +1768,7 @@ public Mono startAsync(String resourceGroupName, String serverName) { } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1779,7 +1782,7 @@ public void start(String resourceGroupName, String serverName) { } /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -2040,7 +2043,7 @@ private PagedResponse listByResourceGroupNextSinglePage(String next "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -2068,7 +2071,7 @@ private PagedResponse listByResourceGroupNextSinglePage(String next "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -2084,7 +2087,7 @@ private PagedResponse listByResourceGroupNextSinglePage(String next * @return a list of servers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2093,7 +2096,9 @@ private Mono> listNextSinglePageAsync(String nextLink new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -2109,7 +2114,7 @@ private Mono> listNextSinglePageAsync(String nextLink * @return a list of servers along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -2120,8 +2125,8 @@ private PagedResponse listNextSinglePage(String nextLink) { "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -2137,7 +2142,7 @@ private PagedResponse listNextSinglePage(String nextLink) { * @return a list of servers along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -2148,7 +2153,8 @@ private PagedResponse listNextSinglePage(String nextLink, Context c "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/SessionDetailsResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/SessionDetailsResourceImpl.java deleted file mode 100644 index be90209f3940..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/SessionDetailsResourceImpl.java +++ /dev/null @@ -1,52 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionDetailsResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SessionDetailsResource; - -public final class SessionDetailsResourceImpl implements SessionDetailsResource { - private SessionDetailsResourceInner innerObject; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - SessionDetailsResourceImpl(SessionDetailsResourceInner innerObject, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String iterationId() { - return this.innerModel().iterationId(); - } - - public String sessionId() { - return this.innerModel().sessionId(); - } - - public String appliedConfiguration() { - return this.innerModel().appliedConfiguration(); - } - - public String iterationStartTime() { - return this.innerModel().iterationStartTime(); - } - - public String averageQueryRuntimeMs() { - return this.innerModel().averageQueryRuntimeMs(); - } - - public String transactionsPerSecond() { - return this.innerModel().transactionsPerSecond(); - } - - public SessionDetailsResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/SessionResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/SessionResourceImpl.java deleted file mode 100644 index 81ca8c158b36..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/SessionResourceImpl.java +++ /dev/null @@ -1,56 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SessionResource; - -public final class SessionResourceImpl implements SessionResource { - private SessionResourceInner innerObject; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - SessionResourceImpl(SessionResourceInner innerObject, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String sessionStartTime() { - return this.innerModel().sessionStartTime(); - } - - public String sessionId() { - return this.innerModel().sessionId(); - } - - public String status() { - return this.innerModel().status(); - } - - public String preTuningAqr() { - return this.innerModel().preTuningAqr(); - } - - public String postTuningAqr() { - return this.innerModel().postTuningAqr(); - } - - public String preTuningTps() { - return this.innerModel().preTuningTps(); - } - - public String postTuningTps() { - return this.innerModel().postTuningTps(); - } - - public SessionResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningConfigurationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningConfigurationsClientImpl.java deleted file mode 100644 index d950f18ec739..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningConfigurationsClientImpl.java +++ /dev/null @@ -1,1735 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -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.management.polling.PollResult; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningConfigurationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionDetailsResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigTuningRequestParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SessionDetailsListResult; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SessionsListResult; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in TuningConfigurationsClient. - */ -public final class TuningConfigurationsClientImpl implements TuningConfigurationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final TuningConfigurationsService service; - - /** - * The service client containing this operation class. - */ - private final PostgreSqlManagementClientImpl client; - - /** - * Initializes an instance of TuningConfigurationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - TuningConfigurationsClientImpl(PostgreSqlManagementClientImpl client) { - this.service = RestProxy.create(TuningConfigurationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PostgreSqlManagementClientTuningConfigurations to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface TuningConfigurationsService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/enable") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> enable(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/enable") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response enableSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/disable") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> disable(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/disable") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response disableSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/startSession") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> startSession(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, - @BodyParam("application/json") ConfigTuningRequestParameter configTuningRequest, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/startSession") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response startSessionSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, - @BodyParam("application/json") ConfigTuningRequestParameter configTuningRequest, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/stopSession") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stopSession(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/stopSession") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response stopSessionSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/sessions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSessions(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/sessions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSessionsSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/sessionDetails") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSessionDetails(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @QueryParam("sessionId") String sessionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/sessionDetails") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSessionDetailsSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @QueryParam("sessionId") String sessionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSessionsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSessionsNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSessionDetailsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listSessionDetailsNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> enableWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.enable(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response enableWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return service.enableSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, Context.NONE); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response enableWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return service.enableSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginEnableAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - Mono>> mono = enableWithResponseAsync(resourceGroupName, serverName, tuningOption); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginEnable(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - Response response = enableWithResponse(resourceGroupName, serverName, tuningOption); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginEnable(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - Response response = enableWithResponse(resourceGroupName, serverName, tuningOption, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono enableAsync(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - return beginEnableAsync(resourceGroupName, serverName, tuningOption).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 enable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - beginEnable(resourceGroupName, serverName, tuningOption).getFinalResult(); - } - - /** - * Enables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 enable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context) { - beginEnable(resourceGroupName, serverName, tuningOption, context).getFinalResult(); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> disableWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.disable(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response disableWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return service.disableSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, Context.NONE); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response disableWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return service.disableSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginDisableAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - Mono>> mono = disableWithResponseAsync(resourceGroupName, serverName, tuningOption); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDisable(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - Response response = disableWithResponse(resourceGroupName, serverName, tuningOption); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDisable(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - Response response = disableWithResponse(resourceGroupName, serverName, tuningOption, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono disableAsync(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - return beginDisableAsync(resourceGroupName, serverName, tuningOption).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 disable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - beginDisable(resourceGroupName, serverName, tuningOption).getFinalResult(); - } - - /** - * Disables the config tuning. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 disable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context) { - beginDisable(resourceGroupName, serverName, tuningOption, context).getFinalResult(); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> startSessionWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - if (configTuningRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter configTuningRequest is required and cannot be null.")); - } else { - configTuningRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.startSession(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, configTuningRequest, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response startSessionWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - if (configTuningRequest == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter configTuningRequest is required and cannot be null.")); - } else { - configTuningRequest.validate(); - } - final String accept = "application/json"; - return service.startSessionSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, configTuningRequest, accept, - Context.NONE); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response startSessionWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - if (configTuningRequest == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter configTuningRequest is required and cannot be null.")); - } else { - configTuningRequest.validate(); - } - final String accept = "application/json"; - return service.startSessionSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, configTuningRequest, accept, - context); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginStartSessionAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest) { - Mono>> mono - = startSessionWithResponseAsync(resourceGroupName, serverName, tuningOption, configTuningRequest); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStartSession(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest) { - Response response - = startSessionWithResponse(resourceGroupName, serverName, tuningOption, configTuningRequest); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStartSession(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, ConfigTuningRequestParameter configTuningRequest, Context context) { - Response response - = startSessionWithResponse(resourceGroupName, serverName, tuningOption, configTuningRequest, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono startSessionAsync(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest) { - return beginStartSessionAsync(resourceGroupName, serverName, tuningOption, configTuningRequest).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @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 startSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest) { - beginStartSession(resourceGroupName, serverName, tuningOption, configTuningRequest).getFinalResult(); - } - - /** - * Starts up the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param configTuningRequest The parameters for tuning request. - * @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 startSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest, Context context) { - beginStartSession(resourceGroupName, serverName, tuningOption, configTuningRequest, context).getFinalResult(); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> stopSessionWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.stopSession(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response stopSessionWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return service.stopSessionSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, Context.NONE); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response stopSessionWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return service.stopSessionSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginStopSessionAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - Mono>> mono - = stopSessionWithResponseAsync(resourceGroupName, serverName, tuningOption); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStopSession(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - Response response = stopSessionWithResponse(resourceGroupName, serverName, tuningOption); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStopSession(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - Response response = stopSessionWithResponse(resourceGroupName, serverName, tuningOption, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono stopSessionAsync(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - return beginStopSessionAsync(resourceGroupName, serverName, tuningOption).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 stopSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - beginStopSession(resourceGroupName, serverName, tuningOption).getFinalResult(); - } - - /** - * Stops the config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 stopSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - Context context) { - beginStopSession(resourceGroupName, serverName, tuningOption, context).getFinalResult(); - } - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 up the config tuning session status along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSessionsSinglePageAsync(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listSessions(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 up the config tuning session status as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listSessionsAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - return new PagedFlux<>(() -> listSessionsSinglePageAsync(resourceGroupName, serverName, tuningOption), - nextLink -> listSessionsNextSinglePageAsync(nextLink)); - } - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 up the config tuning session status along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSessionsSinglePage(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listSessionsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 up the config tuning session status along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSessionsSinglePage(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listSessionsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 up the config tuning session status as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSessions(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - return new PagedIterable<>(() -> listSessionsSinglePage(resourceGroupName, serverName, tuningOption), - nextLink -> listSessionsNextSinglePage(nextLink)); - } - - /** - * Gets up the config tuning session status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 up the config tuning session status as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSessions(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - return new PagedIterable<>(() -> listSessionsSinglePage(resourceGroupName, serverName, tuningOption, context), - nextLink -> listSessionsNextSinglePage(nextLink, context)); - } - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @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 session details of a config tuning session along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSessionDetailsSinglePageAsync(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption, String sessionId) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - if (sessionId == null) { - return Mono.error(new IllegalArgumentException("Parameter sessionId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listSessionDetails(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, sessionId, accept, - context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @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 session details of a config tuning session as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listSessionDetailsAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId) { - return new PagedFlux<>( - () -> listSessionDetailsSinglePageAsync(resourceGroupName, serverName, tuningOption, sessionId), - nextLink -> listSessionDetailsNextSinglePageAsync(nextLink)); - } - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @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 session details of a config tuning session along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSessionDetailsSinglePage(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption, String sessionId) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - if (sessionId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter sessionId is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSessionDetailsSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, - sessionId, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @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 session details of a config tuning session along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSessionDetailsSinglePage(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption, String sessionId, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - if (sessionId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter sessionId is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listSessionDetailsSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, - sessionId, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @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 session details of a config tuning session as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSessionDetails(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId) { - return new PagedIterable<>( - () -> listSessionDetailsSinglePage(resourceGroupName, serverName, tuningOption, sessionId), - nextLink -> listSessionDetailsNextSinglePage(nextLink)); - } - - /** - * Gets the session details of a config tuning session. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param sessionId Guid of the objectId for the session. - * @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 session details of a config tuning session as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSessionDetails(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId, Context context) { - return new PagedIterable<>( - () -> listSessionDetailsSinglePage(resourceGroupName, serverName, tuningOption, sessionId, context), - nextLink -> listSessionDetailsNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 a list of tuning configuration sessions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSessionsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listSessionsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 a list of tuning configuration sessions along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSessionsNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listSessionsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 a list of tuning configuration sessions along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSessionsNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listSessionsNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 a list of tuning configuration sessions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSessionDetailsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listSessionDetailsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 a list of tuning configuration sessions along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSessionDetailsNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listSessionDetailsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 a list of tuning configuration sessions along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSessionDetailsNextSinglePage(String nextLink, - Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listSessionDetailsNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - private static final ClientLogger LOGGER = new ClientLogger(TuningConfigurationsClientImpl.class); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningConfigurationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningConfigurationsImpl.java deleted file mode 100644 index b1bdeb8fe124..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningConfigurationsImpl.java +++ /dev/null @@ -1,102 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningConfigurationsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionDetailsResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigTuningRequestParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SessionDetailsResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SessionResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningConfigurations; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -public final class TuningConfigurationsImpl implements TuningConfigurations { - private static final ClientLogger LOGGER = new ClientLogger(TuningConfigurationsImpl.class); - - private final TuningConfigurationsClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public TuningConfigurationsImpl(TuningConfigurationsClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public void enable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - this.serviceClient().enable(resourceGroupName, serverName, tuningOption); - } - - public void enable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context) { - this.serviceClient().enable(resourceGroupName, serverName, tuningOption, context); - } - - public void disable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - this.serviceClient().disable(resourceGroupName, serverName, tuningOption); - } - - public void disable(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, Context context) { - this.serviceClient().disable(resourceGroupName, serverName, tuningOption, context); - } - - public void startSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest) { - this.serviceClient().startSession(resourceGroupName, serverName, tuningOption, configTuningRequest); - } - - public void startSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - ConfigTuningRequestParameter configTuningRequest, Context context) { - this.serviceClient().startSession(resourceGroupName, serverName, tuningOption, configTuningRequest, context); - } - - public void stopSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - this.serviceClient().stopSession(resourceGroupName, serverName, tuningOption); - } - - public void stopSession(String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - Context context) { - this.serviceClient().stopSession(resourceGroupName, serverName, tuningOption, context); - } - - public PagedIterable listSessions(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - PagedIterable inner - = this.serviceClient().listSessions(resourceGroupName, serverName, tuningOption); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SessionResourceImpl(inner1, this.manager())); - } - - public PagedIterable listSessions(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - PagedIterable inner - = this.serviceClient().listSessions(resourceGroupName, serverName, tuningOption, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SessionResourceImpl(inner1, this.manager())); - } - - public PagedIterable listSessionDetails(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId) { - PagedIterable inner - = this.serviceClient().listSessionDetails(resourceGroupName, serverName, tuningOption, sessionId); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SessionDetailsResourceImpl(inner1, this.manager())); - } - - public PagedIterable listSessionDetails(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, String sessionId, Context context) { - PagedIterable inner - = this.serviceClient().listSessionDetails(resourceGroupName, serverName, tuningOption, sessionId, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SessionDetailsResourceImpl(inner1, this.manager())); - } - - private TuningConfigurationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningIndexesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningIndexesClientImpl.java deleted file mode 100644 index 8a93a3c793a4..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningIndexesClientImpl.java +++ /dev/null @@ -1,409 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -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.resourcemanager.postgresqlflexibleserver.fluent.TuningIndexesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.IndexRecommendationResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationListResult; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in TuningIndexesClient. - */ -public final class TuningIndexesClientImpl implements TuningIndexesClient { - /** - * The proxy service used to perform REST calls. - */ - private final TuningIndexesService service; - - /** - * The service client containing this operation class. - */ - private final PostgreSqlManagementClientImpl client; - - /** - * Initializes an instance of TuningIndexesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - TuningIndexesClientImpl(PostgreSqlManagementClientImpl client) { - this.service - = RestProxy.create(TuningIndexesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PostgreSqlManagementClientTuningIndexes to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface TuningIndexesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/recommendations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRecommendations(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, - @QueryParam("recommendationType") RecommendationType recommendationType, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/recommendations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listRecommendationsSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, - @QueryParam("recommendationType") RecommendationType recommendationType, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRecommendationsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listRecommendationsNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. - * @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 a list of available index recommendations along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRecommendationsSinglePageAsync( - String resourceGroupName, String serverName, TuningOptionEnum tuningOption, - RecommendationType recommendationType) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listRecommendations(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, recommendationType, - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. - * @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 a list of available index recommendations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listRecommendationsAsync(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption, RecommendationType recommendationType) { - return new PagedFlux<>( - () -> listRecommendationsSinglePageAsync(resourceGroupName, serverName, tuningOption, recommendationType), - nextLink -> listRecommendationsNextSinglePageAsync(nextLink)); - } - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 a list of available index recommendations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listRecommendationsAsync(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption) { - final RecommendationType recommendationType = null; - return new PagedFlux<>( - () -> listRecommendationsSinglePageAsync(resourceGroupName, serverName, tuningOption, recommendationType), - nextLink -> listRecommendationsNextSinglePageAsync(nextLink)); - } - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. - * @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 a list of available index recommendations along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRecommendationsSinglePage(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption, RecommendationType recommendationType) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listRecommendationsSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, - recommendationType, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. - * @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 a list of available index recommendations along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRecommendationsSinglePage(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption, RecommendationType recommendationType, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - Response res = service.listRecommendationsSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, - recommendationType, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 a list of available index recommendations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRecommendations(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption) { - final RecommendationType recommendationType = null; - return new PagedIterable<>( - () -> listRecommendationsSinglePage(resourceGroupName, serverName, tuningOption, recommendationType), - nextLink -> listRecommendationsNextSinglePage(nextLink)); - } - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. - * @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 a list of available index recommendations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRecommendations(String resourceGroupName, - String serverName, TuningOptionEnum tuningOption, RecommendationType recommendationType, Context context) { - return new PagedIterable<>(() -> listRecommendationsSinglePage(resourceGroupName, serverName, tuningOption, - recommendationType, context), nextLink -> listRecommendationsNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 a list of available index recommendations along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listRecommendationsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listRecommendationsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 a list of available index recommendations along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRecommendationsNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listRecommendationsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 a list of available index recommendations along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listRecommendationsNextSinglePage(String nextLink, - Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listRecommendationsNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - private static final ClientLogger LOGGER = new ClientLogger(TuningIndexesClientImpl.class); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningIndexesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningIndexesImpl.java deleted file mode 100644 index 93b637a0f5ed..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningIndexesImpl.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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningIndexesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.IndexRecommendationResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningIndexes; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -public final class TuningIndexesImpl implements TuningIndexes { - private static final ClientLogger LOGGER = new ClientLogger(TuningIndexesImpl.class); - - private final TuningIndexesClient innerClient; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - public TuningIndexesImpl(TuningIndexesClient innerClient, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listRecommendations(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - PagedIterable inner - = this.serviceClient().listRecommendations(resourceGroupName, serverName, tuningOption); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new IndexRecommendationResourceImpl(inner1, this.manager())); - } - - public PagedIterable listRecommendations(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, RecommendationType recommendationType, Context context) { - PagedIterable inner = this.serviceClient() - .listRecommendations(resourceGroupName, serverName, tuningOption, recommendationType, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new IndexRecommendationResourceImpl(inner1, this.manager())); - } - - private TuningIndexesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsClientImpl.java deleted file mode 100644 index 2c48b142ee0c..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsClientImpl.java +++ /dev/null @@ -1,490 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -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.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in TuningOptionsClient. - */ -public final class TuningOptionsClientImpl implements TuningOptionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final TuningOptionsService service; - - /** - * The service client containing this operation class. - */ - private final PostgreSqlManagementClientImpl client; - - /** - * Initializes an instance of TuningOptionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - TuningOptionsClientImpl(PostgreSqlManagementClientImpl client) { - this.service - = RestProxy.create(TuningOptionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for PostgreSqlManagementClientTuningOptions to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") - public interface TuningOptionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionEnum tuningOption, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Retrieve the tuning option on a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 stores property that features impact on some metric if this recommended action is applied along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieve the tuning option on a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 stores property that features impact on some metric if this recommended action is applied on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption) { - return getWithResponseAsync(resourceGroupName, serverName, tuningOption) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Retrieve the tuning option on a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 stores property that features impact on some metric if this recommended action is applied along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, tuningOption, accept, context); - } - - /** - * Retrieve the tuning option on a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @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 stores property that features impact on some metric if this recommended action is applied. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TuningOptionsResourceInner get(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - return getWithResponse(resourceGroupName, serverName, tuningOption, Context.NONE).getValue(); - } - - /** - * Retrieve the list of available tuning options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 a list of server tuning options along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieve the list of available tuning options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 a list of server tuning options as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePageAsync(nextLink)); - } - - /** - * Retrieve the list of available tuning options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 a list of server tuning options along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, - String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Retrieve the list of available tuning options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 a list of server tuning options along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, - String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Retrieve the list of available tuning options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 a list of server tuning options as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePage(nextLink)); - } - - /** - * Retrieve the list of available tuning options. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 a list of server tuning options as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 a list of server tuning options along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 a list of server tuning options along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 a list of server tuning options along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - private static final ClientLogger LOGGER = new ClientLogger(TuningOptionsClientImpl.class); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsImpl.java index 02efa8b14405..ee4e55f1fe38 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsImpl.java @@ -4,66 +4,39 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptions; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsResource; public final class TuningOptionsImpl implements TuningOptions { - private static final ClientLogger LOGGER = new ClientLogger(TuningOptionsImpl.class); - - private final TuningOptionsClient innerClient; + private TuningOptionsInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - public TuningOptionsImpl(TuningOptionsClient innerClient, + TuningOptionsImpl(TuningOptionsInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerClient = innerClient; + this.innerObject = innerObject; this.serviceManager = serviceManager; } - public Response getWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, serverName, tuningOption, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new TuningOptionsResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public String id() { + return this.innerModel().id(); } - public TuningOptionsResource get(String resourceGroupName, String serverName, TuningOptionEnum tuningOption) { - TuningOptionsResourceInner inner = this.serviceClient().get(resourceGroupName, serverName, tuningOption); - if (inner != null) { - return new TuningOptionsResourceImpl(inner, this.manager()); - } else { - return null; - } + public String name() { + return this.innerModel().name(); } - public PagedIterable listByServer(String resourceGroupName, String serverName) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new TuningOptionsResourceImpl(inner1, this.manager())); + public String type() { + return this.innerModel().type(); } - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new TuningOptionsResourceImpl(inner1, this.manager())); + public SystemData systemData() { + return this.innerModel().systemData(); } - private TuningOptionsClient serviceClient() { - return this.innerClient; + public TuningOptionsInner innerModel() { + return this.innerObject; } private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsClientImpl.java new file mode 100644 index 000000000000..334f50232370 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsClientImpl.java @@ -0,0 +1,824 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +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.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationList; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsList; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in TuningOptionsOperationsClient. + */ +public final class TuningOptionsOperationsClientImpl implements TuningOptionsOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final TuningOptionsOperationsService service; + + /** + * The service client containing this operation class. + */ + private final PostgreSqlManagementClientImpl client; + + /** + * Initializes an instance of TuningOptionsOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TuningOptionsOperationsClientImpl(PostgreSqlManagementClientImpl client) { + this.service = RestProxy.create(TuningOptionsOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PostgreSqlManagementClientTuningOptionsOperations to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "PostgreSqlManagementClientTuningOptionsOperations") + public interface TuningOptionsOperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("tuningOption") TuningOptionParameterEnum tuningOption, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("tuningOption") TuningOptionParameterEnum tuningOption, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/recommendations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listRecommendations(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("tuningOption") TuningOptionParameterEnum tuningOption, + @QueryParam("recommendationType") RecommendationTypeParameterEnum recommendationType, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/recommendations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listRecommendationsSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("tuningOption") TuningOptionParameterEnum tuningOption, + @QueryParam("recommendationType") RecommendationTypeParameterEnum recommendationType, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServer(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByServerSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listRecommendationsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listRecommendationsNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServerNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @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 tuning options of a server along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (tuningOption == null) { + return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @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 tuning options of a server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption) { + return getWithResponseAsync(resourceGroupName, serverName, tuningOption) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @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 tuning options of a server along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (tuningOption == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, tuningOption, accept, context); + } + + /** + * Gets the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @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 tuning options of a server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TuningOptionsInner get(String resourceGroupName, String serverName, TuningOptionParameterEnum tuningOption) { + return getWithResponse(resourceGroupName, serverName, tuningOption, Context.NONE).getValue(); + } + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. + * @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 list of available object recommendations along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRecommendationsSinglePageAsync(String resourceGroupName, + String serverName, TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (tuningOption == null) { + return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listRecommendations(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, recommendationType, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. + * @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 list of available object recommendations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listRecommendationsAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType) { + return new PagedFlux<>( + () -> listRecommendationsSinglePageAsync(resourceGroupName, serverName, tuningOption, recommendationType), + nextLink -> listRecommendationsNextSinglePageAsync(nextLink)); + } + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @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 list of available object recommendations as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listRecommendationsAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption) { + final RecommendationTypeParameterEnum recommendationType = null; + return new PagedFlux<>( + () -> listRecommendationsSinglePageAsync(resourceGroupName, serverName, tuningOption, recommendationType), + nextLink -> listRecommendationsNextSinglePageAsync(nextLink)); + } + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. + * @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 list of available object recommendations along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listRecommendationsSinglePage(String resourceGroupName, + String serverName, TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (tuningOption == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listRecommendationsSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, + recommendationType, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. + * @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 list of available object recommendations along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listRecommendationsSinglePage(String resourceGroupName, + String serverName, TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (tuningOption == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listRecommendationsSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, + recommendationType, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @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 list of available object recommendations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption) { + final RecommendationTypeParameterEnum recommendationType = null; + return new PagedIterable<>( + () -> listRecommendationsSinglePage(resourceGroupName, serverName, tuningOption, recommendationType), + nextLink -> listRecommendationsNextSinglePage(nextLink)); + } + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. + * @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 list of available object recommendations as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType, Context context) { + return new PagedIterable<>(() -> listRecommendationsSinglePage(resourceGroupName, serverName, tuningOption, + recommendationType, context), nextLink -> listRecommendationsNextSinglePage(nextLink, context)); + } + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of server tuning options along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of server tuning options as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePageAsync(nextLink)); + } + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of server tuning options along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of server tuning options along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of server tuning options as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePage(nextLink)); + } + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of server tuning options as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 list of available object recommendations along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRecommendationsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listRecommendationsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 list of available object recommendations along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listRecommendationsNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listRecommendationsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 list of available object recommendations along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listRecommendationsNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listRecommendationsNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 list of server tuning options along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 list of server tuning options along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 list of server tuning options along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(TuningOptionsOperationsClientImpl.class); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsImpl.java new file mode 100644 index 000000000000..db3ea6b26793 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsImpl.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendation; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptions; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsOperations; + +public final class TuningOptionsOperationsImpl implements TuningOptionsOperations { + private static final ClientLogger LOGGER = new ClientLogger(TuningOptionsOperationsImpl.class); + + private final TuningOptionsOperationsClient innerClient; + + private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; + + public TuningOptionsOperationsImpl(TuningOptionsOperationsClient innerClient, + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, serverName, tuningOption, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new TuningOptionsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public TuningOptions get(String resourceGroupName, String serverName, TuningOptionParameterEnum tuningOption) { + TuningOptionsInner inner = this.serviceClient().get(resourceGroupName, serverName, tuningOption); + if (inner != null) { + return new TuningOptionsImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption) { + PagedIterable inner + = this.serviceClient().listRecommendations(resourceGroupName, serverName, tuningOption); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ObjectRecommendationImpl(inner1, this.manager())); + } + + public PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType, Context context) { + PagedIterable inner = this.serviceClient() + .listRecommendations(resourceGroupName, serverName, tuningOption, recommendationType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ObjectRecommendationImpl(inner1, this.manager())); + } + + public PagedIterable listByServer(String resourceGroupName, String serverName) { + PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TuningOptionsImpl(inner1, this.manager())); + } + + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TuningOptionsImpl(inner1, this.manager())); + } + + private TuningOptionsOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsResourceImpl.java deleted file mode 100644 index becdc8f9556a..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsResourceImpl.java +++ /dev/null @@ -1,45 +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.resourcemanager.postgresqlflexibleserver.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsResource; - -public final class TuningOptionsResourceImpl implements TuningOptionsResource { - private TuningOptionsResourceInner innerObject; - - private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - - TuningOptionsResourceImpl(TuningOptionsResourceInner innerObject, - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public TuningOptionsResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointImpl.java similarity index 80% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointResourceImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointImpl.java index a65e150af19d..f8eb88475a26 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointResourceImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointImpl.java @@ -6,16 +6,15 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResource; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoint; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResourceForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; import java.util.Collections; import java.util.List; -public final class VirtualEndpointResourceImpl - implements VirtualEndpointResource, VirtualEndpointResource.Definition, VirtualEndpointResource.Update { - private VirtualEndpointResourceInner innerObject; +public final class VirtualEndpointImpl implements VirtualEndpoint, VirtualEndpoint.Definition, VirtualEndpoint.Update { + private VirtualEndpointInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; @@ -61,7 +60,7 @@ public String resourceGroupName() { return resourceGroupName; } - public VirtualEndpointResourceInner innerModel() { + public VirtualEndpointInner innerModel() { return this.innerObject; } @@ -77,53 +76,53 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man private VirtualEndpointResourceForPatch updateParameters; - public VirtualEndpointResourceImpl withExistingFlexibleServer(String resourceGroupName, String serverName) { + public VirtualEndpointImpl withExistingFlexibleServer(String resourceGroupName, String serverName) { this.resourceGroupName = resourceGroupName; this.serverName = serverName; return this; } - public VirtualEndpointResource create() { + public VirtualEndpoint create() { this.innerObject = serviceManager.serviceClient() .getVirtualEndpoints() .create(resourceGroupName, serverName, virtualEndpointName, this.innerModel(), Context.NONE); return this; } - public VirtualEndpointResource create(Context context) { + public VirtualEndpoint create(Context context) { this.innerObject = serviceManager.serviceClient() .getVirtualEndpoints() .create(resourceGroupName, serverName, virtualEndpointName, this.innerModel(), context); return this; } - VirtualEndpointResourceImpl(String name, + VirtualEndpointImpl(String name, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerObject = new VirtualEndpointResourceInner(); + this.innerObject = new VirtualEndpointInner(); this.serviceManager = serviceManager; this.virtualEndpointName = name; } - public VirtualEndpointResourceImpl update() { + public VirtualEndpointImpl update() { this.updateParameters = new VirtualEndpointResourceForPatch(); return this; } - public VirtualEndpointResource apply() { + public VirtualEndpoint apply() { this.innerObject = serviceManager.serviceClient() .getVirtualEndpoints() .update(resourceGroupName, serverName, virtualEndpointName, updateParameters, Context.NONE); return this; } - public VirtualEndpointResource apply(Context context) { + public VirtualEndpoint apply(Context context) { this.innerObject = serviceManager.serviceClient() .getVirtualEndpoints() .update(resourceGroupName, serverName, virtualEndpointName, updateParameters, context); return this; } - VirtualEndpointResourceImpl(VirtualEndpointResourceInner innerObject, + VirtualEndpointImpl(VirtualEndpointInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -132,7 +131,7 @@ public VirtualEndpointResource apply(Context context) { this.virtualEndpointName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "virtualendpoints"); } - public VirtualEndpointResource refresh() { + public VirtualEndpoint refresh() { this.innerObject = serviceManager.serviceClient() .getVirtualEndpoints() .getWithResponse(resourceGroupName, serverName, virtualEndpointName, Context.NONE) @@ -140,7 +139,7 @@ public VirtualEndpointResource refresh() { return this; } - public VirtualEndpointResource refresh(Context context) { + public VirtualEndpoint refresh(Context context) { this.innerObject = serviceManager.serviceClient() .getVirtualEndpoints() .getWithResponse(resourceGroupName, serverName, virtualEndpointName, context) @@ -148,7 +147,7 @@ public VirtualEndpointResource refresh(Context context) { return this; } - public VirtualEndpointResourceImpl withEndpointType(VirtualEndpointType endpointType) { + public VirtualEndpointImpl withEndpointType(VirtualEndpointType endpointType) { if (isInCreateMode()) { this.innerModel().withEndpointType(endpointType); return this; @@ -158,7 +157,7 @@ public VirtualEndpointResourceImpl withEndpointType(VirtualEndpointType endpoint } } - public VirtualEndpointResourceImpl withMembers(List members) { + public VirtualEndpointImpl withMembers(List members) { if (isInCreateMode()) { this.innerModel().withMembers(members); return this; @@ -169,6 +168,6 @@ public VirtualEndpointResourceImpl withMembers(List members) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsClientImpl.java index 09d852900f35..fe7e11422cee 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsClientImpl.java @@ -35,9 +35,9 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResourceForPatch; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointsListResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointsList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -72,29 +72,29 @@ public final class VirtualEndpointsClientImpl implements VirtualEndpointsClient * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientVirtualEndpoints") public interface VirtualEndpointsService { @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> create(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("virtualEndpointName") String virtualEndpointName, - @BodyParam("application/json") VirtualEndpointResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); + @BodyParam("application/json") VirtualEndpointInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") - @ExpectedResponses({ 200, 201, 202 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Response createSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("virtualEndpointName") String virtualEndpointName, - @BodyParam("application/json") VirtualEndpointResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); + @BodyParam("application/json") VirtualEndpointInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") @@ -142,7 +142,7 @@ Response deleteSync(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("virtualEndpointName") String virtualEndpointName, @HeaderParam("Accept") String accept, @@ -152,7 +152,7 @@ Mono> get(@HostParam("$host") String endp @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("virtualEndpointName") String virtualEndpointName, @HeaderParam("Accept") String accept, @@ -162,7 +162,7 @@ Response getSync(@HostParam("$host") String endpoi @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -171,7 +171,7 @@ Mono> listByServer(@HostParam("$host") Stri @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -180,7 +180,7 @@ Response listByServerSync(@HostParam("$host") String @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( + Mono> listByServerNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -188,27 +188,27 @@ Mono> listByServerNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync( + Response listByServerNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @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 represents a virtual endpoint for a server along with {@link Response} on successful completion of + * @return pair of virtual endpoints for a server along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createWithResponseAsync(String resourceGroupName, String serverName, - String virtualEndpointName, VirtualEndpointResourceInner parameters) { + String virtualEndpointName, VirtualEndpointInner parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -242,20 +242,20 @@ public Mono>> createWithResponseAsync(String resourceG } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @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 represents a virtual endpoint for a server along with {@link Response}. + * @return pair of virtual endpoints for a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, - String virtualEndpointName, VirtualEndpointResourceInner parameters) { + String virtualEndpointName, VirtualEndpointInner parameters) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -291,21 +291,21 @@ private Response createWithResponse(String resourceGroupName, String } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @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 represents a virtual endpoint for a server along with {@link Response}. + * @return pair of virtual endpoints for a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, - String virtualEndpointName, VirtualEndpointResourceInner parameters, Context context) { + String virtualEndpointName, VirtualEndpointInner parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -341,141 +341,136 @@ private Response createWithResponse(String resourceGroupName, String } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @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 {@link PollerFlux} for polling of represents a virtual endpoint for a server. + * @return the {@link PollerFlux} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, VirtualEndpointResourceInner> beginCreateAsync( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters) { + public PollerFlux, VirtualEndpointInner> beginCreateAsync(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointInner parameters) { Mono>> mono = createWithResponseAsync(resourceGroupName, serverName, virtualEndpointName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), VirtualEndpointResourceInner.class, VirtualEndpointResourceInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VirtualEndpointInner.class, VirtualEndpointInner.class, this.client.getContext()); } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @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 {@link SyncPoller} for polling of represents a virtual endpoint for a server. + * @return the {@link SyncPoller} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualEndpointResourceInner> beginCreate( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters) { + public SyncPoller, VirtualEndpointInner> beginCreate(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointInner parameters) { Response response = createWithResponse(resourceGroupName, serverName, virtualEndpointName, parameters); - return this.client.getLroResult(response, - VirtualEndpointResourceInner.class, VirtualEndpointResourceInner.class, Context.NONE); + return this.client.getLroResult(response, + VirtualEndpointInner.class, VirtualEndpointInner.class, Context.NONE); } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @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 {@link SyncPoller} for polling of represents a virtual endpoint for a server. + * @return the {@link SyncPoller} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualEndpointResourceInner> beginCreate( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters, Context context) { + public SyncPoller, VirtualEndpointInner> beginCreate(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointInner parameters, Context context) { Response response = createWithResponse(resourceGroupName, serverName, virtualEndpointName, parameters, context); - return this.client.getLroResult(response, - VirtualEndpointResourceInner.class, VirtualEndpointResourceInner.class, context); + return this.client.getLroResult(response, + VirtualEndpointInner.class, VirtualEndpointInner.class, context); } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @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 represents a virtual endpoint for a server on successful completion of {@link Mono}. + * @return pair of virtual endpoints for a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync(String resourceGroupName, String serverName, - String virtualEndpointName, VirtualEndpointResourceInner parameters) { + public Mono createAsync(String resourceGroupName, String serverName, + String virtualEndpointName, VirtualEndpointInner parameters) { return beginCreateAsync(resourceGroupName, serverName, virtualEndpointName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @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 represents a virtual endpoint for a server. + * @return pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualEndpointResourceInner create(String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters) { + public VirtualEndpointInner create(String resourceGroupName, String serverName, String virtualEndpointName, + VirtualEndpointInner parameters) { return beginCreate(resourceGroupName, serverName, virtualEndpointName, parameters).getFinalResult(); } /** - * Creates a new virtual endpoint for PostgreSQL flexible server. + * Creates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for creating or updating virtual endpoints. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to create or update a pair of virtual endpoints. * @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 represents a virtual endpoint for a server. + * @return pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualEndpointResourceInner create(String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceInner parameters, Context context) { + public VirtualEndpointInner create(String resourceGroupName, String serverName, String virtualEndpointName, + VirtualEndpointInner parameters, Context context) { return beginCreate(resourceGroupName, serverName, virtualEndpointName, parameters, context).getFinalResult(); } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @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 represents a virtual endpoint for a server along with {@link Response} on successful completion of + * @return pair of virtual endpoints for a server along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -514,17 +509,16 @@ public Mono>> updateWithResponseAsync(String resourceG } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @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 represents a virtual endpoint for a server along with {@link Response}. + * @return pair of virtual endpoints for a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, @@ -564,18 +558,17 @@ private Response updateWithResponse(String resourceGroupName, String } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @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 represents a virtual endpoint for a server along with {@link Response}. + * @return pair of virtual endpoints for a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, @@ -615,141 +608,131 @@ private Response updateWithResponse(String resourceGroupName, String } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @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 {@link PollerFlux} for polling of represents a virtual endpoint for a server. + * @return the {@link PollerFlux} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, VirtualEndpointResourceInner> beginUpdateAsync( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceForPatch parameters) { + public PollerFlux, VirtualEndpointInner> beginUpdateAsync(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters) { Mono>> mono = updateWithResponseAsync(resourceGroupName, serverName, virtualEndpointName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), VirtualEndpointResourceInner.class, VirtualEndpointResourceInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VirtualEndpointInner.class, VirtualEndpointInner.class, this.client.getContext()); } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @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 {@link SyncPoller} for polling of represents a virtual endpoint for a server. + * @return the {@link SyncPoller} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualEndpointResourceInner> beginUpdate( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceForPatch parameters) { + public SyncPoller, VirtualEndpointInner> beginUpdate(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters) { Response response = updateWithResponse(resourceGroupName, serverName, virtualEndpointName, parameters); - return this.client.getLroResult(response, - VirtualEndpointResourceInner.class, VirtualEndpointResourceInner.class, Context.NONE); + return this.client.getLroResult(response, + VirtualEndpointInner.class, VirtualEndpointInner.class, Context.NONE); } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @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 {@link SyncPoller} for polling of represents a virtual endpoint for a server. + * @return the {@link SyncPoller} for polling of pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualEndpointResourceInner> beginUpdate( - String resourceGroupName, String serverName, String virtualEndpointName, - VirtualEndpointResourceForPatch parameters, Context context) { + public SyncPoller, VirtualEndpointInner> beginUpdate(String resourceGroupName, + String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters, Context context) { Response response = updateWithResponse(resourceGroupName, serverName, virtualEndpointName, parameters, context); - return this.client.getLroResult(response, - VirtualEndpointResourceInner.class, VirtualEndpointResourceInner.class, context); + return this.client.getLroResult(response, + VirtualEndpointInner.class, VirtualEndpointInner.class, context); } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @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 represents a virtual endpoint for a server on successful completion of {@link Mono}. + * @return pair of virtual endpoints for a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, + public Mono updateAsync(String resourceGroupName, String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters) { return beginUpdateAsync(resourceGroupName, serverName, virtualEndpointName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @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 represents a virtual endpoint for a server. + * @return pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualEndpointResourceInner update(String resourceGroupName, String serverName, String virtualEndpointName, + public VirtualEndpointInner update(String resourceGroupName, String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters) { return beginUpdate(resourceGroupName, serverName, virtualEndpointName, parameters).getFinalResult(); } /** - * Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the - * normal virtual endpoint definition. + * Updates a pair of virtual endpoints for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. - * @param parameters The required parameters for updating a server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @param parameters Parameters required to update a pair of virtual endpoints. * @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 represents a virtual endpoint for a server. + * @return pair of virtual endpoints for a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualEndpointResourceInner update(String resourceGroupName, String serverName, String virtualEndpointName, + public VirtualEndpointInner update(String resourceGroupName, String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters, Context context) { return beginUpdate(resourceGroupName, serverName, virtualEndpointName, parameters, context).getFinalResult(); } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @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. @@ -785,11 +768,11 @@ public Mono>> deleteWithResponseAsync(String resourceG } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @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. @@ -826,11 +809,11 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @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. @@ -868,11 +851,11 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @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. @@ -888,11 +871,11 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @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. @@ -906,11 +889,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @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. @@ -925,11 +908,11 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @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. @@ -942,11 +925,11 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @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. @@ -957,11 +940,11 @@ public void delete(String resourceGroupName, String serverName, String virtualEn } /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @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. @@ -973,20 +956,20 @@ public void delete(String resourceGroupName, String serverName, String virtualEn } /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @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 information about a virtual endpoint along with {@link Response} on successful completion of + * @return information about a pair of virtual endpoints along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String virtualEndpointName) { + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String virtualEndpointName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1014,37 +997,37 @@ public Mono> getWithResponseAsync(String } /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @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 information about a virtual endpoint on successful completion of {@link Mono}. + * @return information about a pair of virtual endpoints on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, + public Mono getAsync(String resourceGroupName, String serverName, String virtualEndpointName) { return getWithResponseAsync(resourceGroupName, serverName, virtualEndpointName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @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 information about a virtual endpoint along with {@link Response}. + * @return information about a pair of virtual endpoints along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, + public Response getWithResponse(String resourceGroupName, String serverName, String virtualEndpointName, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -1074,33 +1057,33 @@ public Response getWithResponse(String resourceGro } /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @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 information about a virtual endpoint. + * @return information about a pair of virtual endpoints. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualEndpointResourceInner get(String resourceGroupName, String serverName, String virtualEndpointName) { + public VirtualEndpointInner get(String resourceGroupName, String serverName, String virtualEndpointName) { return getWithResponse(resourceGroupName, serverName, virtualEndpointName, Context.NONE).getValue(); } /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of virtual endpoints along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of virtual endpoints along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, + private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -1121,40 +1104,39 @@ private Mono> listByServerSinglePage return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of virtual endpoints as paginated response with {@link PagedFlux}. + * @return list of virtual endpoints as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { + public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of virtual endpoints along with {@link PagedResponse}. + * @return list of virtual endpoints along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, - String serverName) { + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -1174,7 +1156,7 @@ private PagedResponse listByServerSinglePage(Strin .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -1182,7 +1164,7 @@ private PagedResponse listByServerSinglePage(Strin } /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1190,11 +1172,11 @@ private PagedResponse listByServerSinglePage(Strin * @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 a list of virtual endpoints along with {@link PagedResponse}. + * @return list of virtual endpoints along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, - String serverName, Context context) { + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, + Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -1214,7 +1196,7 @@ private PagedResponse listByServerSinglePage(Strin .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -1222,23 +1204,23 @@ private PagedResponse listByServerSinglePage(Strin } /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @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 a list of virtual endpoints as paginated response with {@link PagedIterable}. + * @return list of virtual endpoints as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { + public PagedIterable listByServer(String resourceGroupName, String serverName) { return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), nextLink -> listByServerNextSinglePage(nextLink)); } /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1246,10 +1228,10 @@ public PagedIterable listByServer(String resourceG * @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 a list of virtual endpoints as paginated response with {@link PagedIterable}. + * @return list of virtual endpoints as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), nextLink -> listByServerNextSinglePage(nextLink, context)); @@ -1262,10 +1244,10 @@ public PagedIterable listByServer(String resourceG * @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 a list of virtual endpoints along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of virtual endpoints along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync(String nextLink) { + private Mono> listByServerNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1276,7 +1258,7 @@ private Mono> listByServerNextSingle final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1288,10 +1270,10 @@ private Mono> listByServerNextSingle * @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 a list of virtual endpoints along with {@link PagedResponse}. + * @return list of virtual endpoints along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink) { + private PagedResponse listByServerNextSinglePage(String nextLink) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1302,7 +1284,7 @@ private PagedResponse listByServerNextSinglePage(S "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -1316,10 +1298,10 @@ private PagedResponse listByServerNextSinglePage(S * @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 a list of virtual endpoints along with {@link PagedResponse}. + * @return list of virtual endpoints along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { + private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { if (nextLink == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1330,7 +1312,7 @@ private PagedResponse listByServerNextSinglePage(S "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - Response res + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsImpl.java index d42cf9fb48dd..d75b2491e0fe 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsImpl.java @@ -10,8 +10,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResource; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoint; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoints; public final class VirtualEndpointsImpl implements VirtualEndpoints { @@ -35,42 +35,39 @@ public void delete(String resourceGroupName, String serverName, String virtualEn this.serviceClient().delete(resourceGroupName, serverName, virtualEndpointName, context); } - public Response getWithResponse(String resourceGroupName, String serverName, + public Response getWithResponse(String resourceGroupName, String serverName, String virtualEndpointName, Context context) { - Response inner + Response inner = this.serviceClient().getWithResponse(resourceGroupName, serverName, virtualEndpointName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VirtualEndpointResourceImpl(inner.getValue(), this.manager())); + new VirtualEndpointImpl(inner.getValue(), this.manager())); } else { return null; } } - public VirtualEndpointResource get(String resourceGroupName, String serverName, String virtualEndpointName) { - VirtualEndpointResourceInner inner - = this.serviceClient().get(resourceGroupName, serverName, virtualEndpointName); + public VirtualEndpoint get(String resourceGroupName, String serverName, String virtualEndpointName) { + VirtualEndpointInner inner = this.serviceClient().get(resourceGroupName, serverName, virtualEndpointName); if (inner != null) { - return new VirtualEndpointResourceImpl(inner, this.manager()); + return new VirtualEndpointImpl(inner, this.manager()); } else { return null; } } - public PagedIterable listByServer(String resourceGroupName, String serverName) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualEndpointResourceImpl(inner1, this.manager())); + public PagedIterable listByServer(String resourceGroupName, String serverName) { + PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualEndpointImpl(inner1, this.manager())); } - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - PagedIterable inner + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { + PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualEndpointResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualEndpointImpl(inner1, this.manager())); } - public VirtualEndpointResource getById(String id) { + public VirtualEndpoint getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -89,7 +86,7 @@ public VirtualEndpointResource getById(String id) { return this.getWithResponse(resourceGroupName, serverName, virtualEndpointName, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -154,7 +151,7 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man return this.serviceManager; } - public VirtualEndpointResourceImpl define(String name) { - return new VirtualEndpointResourceImpl(name, this.manager()); + public VirtualEndpointImpl define(String name) { + return new VirtualEndpointImpl(name, this.manager()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageResultImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageModelImpl.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageResultImpl.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageModelImpl.java index 583664b0a0f2..6afe82bf3aa6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageResultImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageModelImpl.java @@ -4,18 +4,18 @@ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageResultInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageModelInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.DelegatedSubnetUsage; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageResult; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageModel; import java.util.Collections; import java.util.List; -public final class VirtualNetworkSubnetUsageResultImpl implements VirtualNetworkSubnetUsageResult { - private VirtualNetworkSubnetUsageResultInner innerObject; +public final class VirtualNetworkSubnetUsageModelImpl implements VirtualNetworkSubnetUsageModel { + private VirtualNetworkSubnetUsageModelInner innerObject; private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; - VirtualNetworkSubnetUsageResultImpl(VirtualNetworkSubnetUsageResultInner innerObject, + VirtualNetworkSubnetUsageModelImpl(VirtualNetworkSubnetUsageModelInner innerObject, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -38,7 +38,7 @@ public String subscriptionId() { return this.innerModel().subscriptionId(); } - public VirtualNetworkSubnetUsageResultInner innerModel() { + public VirtualNetworkSubnetUsageModelInner innerModel() { return this.innerObject; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesClientImpl.java index 859cf1e2e87d..e077dd44cec5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesClientImpl.java @@ -24,7 +24,7 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualNetworkSubnetUsagesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageResultInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageModelInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; import reactor.core.publisher.Mono; @@ -58,13 +58,13 @@ public final class VirtualNetworkSubnetUsagesClientImpl implements VirtualNetwor * the proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "PostgreSqlManagement") + @ServiceInterface(name = "PostgreSqlManagementClientVirtualNetworkSubnetUsages") public interface VirtualNetworkSubnetUsagesService { @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkVirtualNetworkSubnetUsage") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> execute(@HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, @BodyParam("application/json") VirtualNetworkSubnetUsageParameter parameters, @@ -74,7 +74,7 @@ Mono> execute(@HostParam("$host") @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkVirtualNetworkSubnetUsage") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response executeSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, @BodyParam("application/json") VirtualNetworkSubnetUsageParameter parameters, @@ -82,18 +82,17 @@ Response executeSync(@HostParam("$host") S } /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. * @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 virtual network subnet usage for a given vNet resource id along with {@link Response} on successful - * completion of {@link Mono}. + * @return virtual network subnet usage data along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> executeWithResponseAsync(String locationName, + public Mono> listWithResponseAsync(String locationName, VirtualNetworkSubnetUsageParameter parameters) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -113,29 +112,29 @@ public Mono> executeWithResponseA } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.execute(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. * @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 virtual network subnet usage for a given vNet resource id on successful completion of {@link Mono}. + * @return virtual network subnet usage data on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono executeAsync(String locationName, + public Mono listAsync(String locationName, VirtualNetworkSubnetUsageParameter parameters) { - return executeWithResponseAsync(locationName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + return listWithResponseAsync(locationName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. @@ -143,10 +142,10 @@ public Mono executeAsync(String locationNa * @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 virtual network subnet usage for a given vNet resource id along with {@link Response}. + * @return virtual network subnet usage data along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response executeWithResponse(String locationName, + public Response listWithResponse(String locationName, VirtualNetworkSubnetUsageParameter parameters, Context context) { if (this.client.getEndpoint() == null) { throw LOGGER.atError() @@ -169,24 +168,24 @@ public Response executeWithResponse(String parameters.validate(); } final String accept = "application/json"; - return service.executeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, parameters, accept, context); + return service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + locationName, parameters, accept, context); } /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. * @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 virtual network subnet usage for a given vNet resource id. + * @return virtual network subnet usage data. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualNetworkSubnetUsageResultInner execute(String locationName, + public VirtualNetworkSubnetUsageModelInner list(String locationName, VirtualNetworkSubnetUsageParameter parameters) { - return executeWithResponse(locationName, parameters, Context.NONE).getValue(); + return listWithResponse(locationName, parameters, Context.NONE).getValue(); } private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkSubnetUsagesClientImpl.class); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesImpl.java index ec63d8056871..1eebfa8d752c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesImpl.java @@ -9,9 +9,9 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualNetworkSubnetUsagesClient; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageResultInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageModel; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageResult; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsages; public final class VirtualNetworkSubnetUsagesImpl implements VirtualNetworkSubnetUsages { @@ -27,22 +27,22 @@ public VirtualNetworkSubnetUsagesImpl(VirtualNetworkSubnetUsagesClient innerClie this.serviceManager = serviceManager; } - public Response executeWithResponse(String locationName, + public Response listWithResponse(String locationName, VirtualNetworkSubnetUsageParameter parameters, Context context) { - Response inner - = this.serviceClient().executeWithResponse(locationName, parameters, context); + Response inner + = this.serviceClient().listWithResponse(locationName, parameters, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VirtualNetworkSubnetUsageResultImpl(inner.getValue(), this.manager())); + new VirtualNetworkSubnetUsageModelImpl(inner.getValue(), this.manager())); } else { return null; } } - public VirtualNetworkSubnetUsageResult execute(String locationName, VirtualNetworkSubnetUsageParameter parameters) { - VirtualNetworkSubnetUsageResultInner inner = this.serviceClient().execute(locationName, parameters); + public VirtualNetworkSubnetUsageModel list(String locationName, VirtualNetworkSubnetUsageParameter parameters) { + VirtualNetworkSubnetUsageModelInner inner = this.serviceClient().list(locationName, parameters); if (inner != null) { - return new VirtualNetworkSubnetUsageResultImpl(inner, this.manager()); + return new VirtualNetworkSubnetUsageModelImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/package-info.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/package-info.java index e0753268fc2d..aa03b7e448c5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/package-info.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/package-info.java @@ -4,8 +4,8 @@ /** * Package containing the implementations for PostgreSqlManagementClient. - * The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL - * resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and - * configurations with new business model. + * The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure + * PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, + * log files and configurations with new business model. */ package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministrator.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministrator.java deleted file mode 100644 index 5b0f9fa1eef7..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministrator.java +++ /dev/null @@ -1,187 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner; - -/** - * An immutable client-side representation of ActiveDirectoryAdministrator. - */ -public interface ActiveDirectoryAdministrator { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. - * - * @return the principalType value. - */ - PrincipalType principalType(); - - /** - * Gets the principalName property: Microsoft Entra Administrator principal name. - * - * @return the principalName value. - */ - String principalName(); - - /** - * Gets the objectId property: The objectId of the Microsoft Entra Administrator. - * - * @return the objectId value. - */ - String objectId(); - - /** - * Gets the tenantId property: The tenantId of the Microsoft Entra Administrator. - * - * @return the tenantId value. - */ - String tenantId(); - - /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner - * object. - * - * @return the inner object. - */ - ActiveDirectoryAdministratorInner innerModel(); - - /** - * The entirety of the ActiveDirectoryAdministrator definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The ActiveDirectoryAdministrator definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ActiveDirectoryAdministrator definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ActiveDirectoryAdministrator definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, serverName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @return the next definition stage. - */ - WithCreate withExistingFlexibleServer(String resourceGroupName, String serverName); - } - - /** - * The stage of the ActiveDirectoryAdministrator definition which contains all the minimum required properties - * for the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithPrincipalType, DefinitionStages.WithPrincipalName, - DefinitionStages.WithTenantId { - /** - * Executes the create request. - * - * @return the created resource. - */ - ActiveDirectoryAdministrator create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ActiveDirectoryAdministrator create(Context context); - } - - /** - * The stage of the ActiveDirectoryAdministrator definition allowing to specify principalType. - */ - interface WithPrincipalType { - /** - * Specifies the principalType property: The principal type used to represent the type of Microsoft Entra - * Administrator.. - * - * @param principalType The principal type used to represent the type of Microsoft Entra Administrator. - * @return the next definition stage. - */ - WithCreate withPrincipalType(PrincipalType principalType); - } - - /** - * The stage of the ActiveDirectoryAdministrator definition allowing to specify principalName. - */ - interface WithPrincipalName { - /** - * Specifies the principalName property: Microsoft Entra Administrator principal name.. - * - * @param principalName Microsoft Entra Administrator principal name. - * @return the next definition stage. - */ - WithCreate withPrincipalName(String principalName); - } - - /** - * The stage of the ActiveDirectoryAdministrator definition allowing to specify tenantId. - */ - interface WithTenantId { - /** - * Specifies the tenantId property: The tenantId of the Microsoft Entra Administrator.. - * - * @param tenantId The tenantId of the Microsoft Entra Administrator. - * @return the next definition stage. - */ - WithCreate withTenantId(String tenantId); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ActiveDirectoryAdministrator refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ActiveDirectoryAdministrator refresh(Context context); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAuthEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAuthEnum.java deleted file mode 100644 index 1b8c9800f652..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAuthEnum.java +++ /dev/null @@ -1,51 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * If Enabled, Microsoft Entra authentication is enabled. - */ -public final class ActiveDirectoryAuthEnum extends ExpandableStringEnum { - /** - * Static value Enabled for ActiveDirectoryAuthEnum. - */ - public static final ActiveDirectoryAuthEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for ActiveDirectoryAuthEnum. - */ - public static final ActiveDirectoryAuthEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of ActiveDirectoryAuthEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActiveDirectoryAuthEnum() { - } - - /** - * Creates or finds a ActiveDirectoryAuthEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActiveDirectoryAuthEnum. - */ - public static ActiveDirectoryAuthEnum fromString(String name) { - return fromString(name, ActiveDirectoryAuthEnum.class); - } - - /** - * Gets known ActiveDirectoryAuthEnum values. - * - * @return known ActiveDirectoryAuthEnum values. - */ - public static Collection values() { - return values(ActiveDirectoryAuthEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentials.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentials.java index 910670d2d3f8..0409bc977c68 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentials.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentials.java @@ -13,17 +13,17 @@ import java.io.IOException; /** - * Server admin credentials. + * Credentials of administrator users for source and target servers. */ @Fluent public final class AdminCredentials implements JsonSerializable { /* - * Password for source server. + * Password for the user of the source server. */ private String sourceServerPassword; /* - * Password for target server. + * Password for the user of the target server. */ private String targetServerPassword; @@ -34,7 +34,7 @@ public AdminCredentials() { } /** - * Get the sourceServerPassword property: Password for source server. + * Get the sourceServerPassword property: Password for the user of the source server. * * @return the sourceServerPassword value. */ @@ -43,7 +43,7 @@ public String sourceServerPassword() { } /** - * Set the sourceServerPassword property: Password for source server. + * Set the sourceServerPassword property: Password for the user of the source server. * * @param sourceServerPassword the sourceServerPassword value to set. * @return the AdminCredentials object itself. @@ -54,7 +54,7 @@ public AdminCredentials withSourceServerPassword(String sourceServerPassword) { } /** - * Get the targetServerPassword property: Password for target server. + * Get the targetServerPassword property: Password for the user of the target server. * * @return the targetServerPassword value. */ @@ -63,7 +63,7 @@ public String targetServerPassword() { } /** - * Set the targetServerPassword property: Password for target server. + * Set the targetServerPassword property: Password for the user of the target server. * * @param targetServerPassword the targetServerPassword value to set. * @return the AdminCredentials object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentialsForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentialsForPatch.java new file mode 100644 index 000000000000..bdbe5a3b071e --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentialsForPatch.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Credentials of administrator users for source and target servers. + */ +@Fluent +public final class AdminCredentialsForPatch implements JsonSerializable { + /* + * Password for the user of the source server. + */ + private String sourceServerPassword; + + /* + * Password for the user of the target server. + */ + private String targetServerPassword; + + /** + * Creates an instance of AdminCredentialsForPatch class. + */ + public AdminCredentialsForPatch() { + } + + /** + * Get the sourceServerPassword property: Password for the user of the source server. + * + * @return the sourceServerPassword value. + */ + public String sourceServerPassword() { + return this.sourceServerPassword; + } + + /** + * Set the sourceServerPassword property: Password for the user of the source server. + * + * @param sourceServerPassword the sourceServerPassword value to set. + * @return the AdminCredentialsForPatch object itself. + */ + public AdminCredentialsForPatch withSourceServerPassword(String sourceServerPassword) { + this.sourceServerPassword = sourceServerPassword; + return this; + } + + /** + * Get the targetServerPassword property: Password for the user of the target server. + * + * @return the targetServerPassword value. + */ + public String targetServerPassword() { + return this.targetServerPassword; + } + + /** + * Set the targetServerPassword property: Password for the user of the target server. + * + * @param targetServerPassword the targetServerPassword value to set. + * @return the AdminCredentialsForPatch object itself. + */ + public AdminCredentialsForPatch withTargetServerPassword(String targetServerPassword) { + this.targetServerPassword = targetServerPassword; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceServerPassword", this.sourceServerPassword); + jsonWriter.writeStringField("targetServerPassword", this.targetServerPassword); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdminCredentialsForPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdminCredentialsForPatch if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AdminCredentialsForPatch. + */ + public static AdminCredentialsForPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdminCredentialsForPatch deserializedAdminCredentialsForPatch = new AdminCredentialsForPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceServerPassword".equals(fieldName)) { + deserializedAdminCredentialsForPatch.sourceServerPassword = reader.getString(); + } else if ("targetServerPassword".equals(fieldName)) { + deserializedAdminCredentialsForPatch.targetServerPassword = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAdminCredentialsForPatch; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorListResult.java deleted file mode 100644 index b547fb12c3a8..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorListResult.java +++ /dev/null @@ -1,128 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of Microsoft Entra Administrators. - */ -@Fluent -public final class AdministratorListResult implements JsonSerializable { - /* - * The list of Microsoft Entra Administrators - */ - private List value; - - /* - * The link used to get the next page of Microsoft Entra administrators. - */ - private String nextLink; - - /** - * Creates an instance of AdministratorListResult class. - */ - public AdministratorListResult() { - } - - /** - * Get the value property: The list of Microsoft Entra Administrators. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of Microsoft Entra Administrators. - * - * @param value the value value to set. - * @return the AdministratorListResult object itself. - */ - public AdministratorListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link used to get the next page of Microsoft Entra administrators. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of Microsoft Entra administrators. - * - * @param nextLink the nextLink value to set. - * @return the AdministratorListResult object itself. - */ - public AdministratorListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AdministratorListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AdministratorListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the AdministratorListResult. - */ - public static AdministratorListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AdministratorListResult deserializedAdministratorListResult = new AdministratorListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ActiveDirectoryAdministratorInner.fromJson(reader1)); - deserializedAdministratorListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedAdministratorListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAdministratorListResult; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntra.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntra.java new file mode 100644 index 000000000000..9d89a4f5d581 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntra.java @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; + +/** + * An immutable client-side representation of AdministratorMicrosoftEntra. + */ +public interface AdministratorMicrosoftEntra { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. + * + * @return the principalType value. + */ + PrincipalType principalType(); + + /** + * Gets the principalName property: Name of the Microsoft Entra principal. + * + * @return the principalName value. + */ + String principalName(); + + /** + * Gets the objectId property: Object identifier of the Microsoft Entra principal. + * + * @return the objectId value. + */ + String objectId(); + + /** + * Gets the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. + * + * @return the tenantId value. + */ + String tenantId(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner + * object. + * + * @return the inner object. + */ + AdministratorMicrosoftEntraInner innerModel(); + + /** + * The entirety of the AdministratorMicrosoftEntra definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The AdministratorMicrosoftEntra definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the AdministratorMicrosoftEntra definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the AdministratorMicrosoftEntra definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, serverName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @return the next definition stage. + */ + WithCreate withExistingFlexibleServer(String resourceGroupName, String serverName); + } + + /** + * The stage of the AdministratorMicrosoftEntra definition which contains all the minimum required properties + * for the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithPrincipalType, DefinitionStages.WithPrincipalName, + DefinitionStages.WithTenantId { + /** + * Executes the create request. + * + * @return the created resource. + */ + AdministratorMicrosoftEntra create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AdministratorMicrosoftEntra create(Context context); + } + + /** + * The stage of the AdministratorMicrosoftEntra definition allowing to specify principalType. + */ + interface WithPrincipalType { + /** + * Specifies the principalType property: Type of Microsoft Entra principal to which the server administrator + * is associated.. + * + * @param principalType Type of Microsoft Entra principal to which the server administrator is associated. + * @return the next definition stage. + */ + WithCreate withPrincipalType(PrincipalType principalType); + } + + /** + * The stage of the AdministratorMicrosoftEntra definition allowing to specify principalName. + */ + interface WithPrincipalName { + /** + * Specifies the principalName property: Name of the Microsoft Entra principal.. + * + * @param principalName Name of the Microsoft Entra principal. + * @return the next definition stage. + */ + WithCreate withPrincipalName(String principalName); + } + + /** + * The stage of the AdministratorMicrosoftEntra definition allowing to specify tenantId. + */ + interface WithTenantId { + /** + * Specifies the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists.. + * + * @param tenantId Identifier of the tenant in which the Microsoft Entra principal exists. + * @return the next definition stage. + */ + WithCreate withTenantId(String tenantId); + } + } + + /** + * Begins update for the AdministratorMicrosoftEntra resource. + * + * @return the stage of resource update. + */ + AdministratorMicrosoftEntra.Update update(); + + /** + * The template for AdministratorMicrosoftEntra update. + */ + interface Update extends UpdateStages.WithPrincipalType, UpdateStages.WithPrincipalName, UpdateStages.WithTenantId { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AdministratorMicrosoftEntra apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AdministratorMicrosoftEntra apply(Context context); + } + + /** + * The AdministratorMicrosoftEntra update stages. + */ + interface UpdateStages { + /** + * The stage of the AdministratorMicrosoftEntra update allowing to specify principalType. + */ + interface WithPrincipalType { + /** + * Specifies the principalType property: Type of Microsoft Entra principal to which the server administrator + * is associated.. + * + * @param principalType Type of Microsoft Entra principal to which the server administrator is associated. + * @return the next definition stage. + */ + Update withPrincipalType(PrincipalType principalType); + } + + /** + * The stage of the AdministratorMicrosoftEntra update allowing to specify principalName. + */ + interface WithPrincipalName { + /** + * Specifies the principalName property: Name of the Microsoft Entra principal.. + * + * @param principalName Name of the Microsoft Entra principal. + * @return the next definition stage. + */ + Update withPrincipalName(String principalName); + } + + /** + * The stage of the AdministratorMicrosoftEntra update allowing to specify tenantId. + */ + interface WithTenantId { + /** + * Specifies the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists.. + * + * @param tenantId Identifier of the tenant in which the Microsoft Entra principal exists. + * @return the next definition stage. + */ + Update withTenantId(String tenantId); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AdministratorMicrosoftEntra refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AdministratorMicrosoftEntra refresh(Context context); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministratorAdd.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraAdd.java similarity index 52% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministratorAdd.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraAdd.java index ac791721746c..cc9d5cb6a453 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministratorAdd.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraAdd.java @@ -9,36 +9,38 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorPropertiesForAdd; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraPropertiesForAdd; import java.io.IOException; /** - * Represents an Microsoft Entra Administrator. + * Server administrator associated to a Microsoft Entra principal. */ @Fluent -public final class ActiveDirectoryAdministratorAdd implements JsonSerializable { +public final class AdministratorMicrosoftEntraAdd implements JsonSerializable { /* - * Properties of the Microsoft Entra Administrator. + * Properties of the server administrator associated to a Microsoft Entra principal. */ - private AdministratorPropertiesForAdd innerProperties; + private AdministratorMicrosoftEntraPropertiesForAdd innerProperties; /** - * Creates an instance of ActiveDirectoryAdministratorAdd class. + * Creates an instance of AdministratorMicrosoftEntraAdd class. */ - public ActiveDirectoryAdministratorAdd() { + public AdministratorMicrosoftEntraAdd() { } /** - * Get the innerProperties property: Properties of the Microsoft Entra Administrator. + * Get the innerProperties property: Properties of the server administrator associated to a Microsoft Entra + * principal. * * @return the innerProperties value. */ - private AdministratorPropertiesForAdd innerProperties() { + private AdministratorMicrosoftEntraPropertiesForAdd innerProperties() { return this.innerProperties; } /** - * Get the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. + * Get the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. * * @return the principalType value. */ @@ -47,21 +49,22 @@ public PrincipalType principalType() { } /** - * Set the principalType property: The principal type used to represent the type of Microsoft Entra Administrator. + * Set the principalType property: Type of Microsoft Entra principal to which the server administrator is + * associated. * * @param principalType the principalType value to set. - * @return the ActiveDirectoryAdministratorAdd object itself. + * @return the AdministratorMicrosoftEntraAdd object itself. */ - public ActiveDirectoryAdministratorAdd withPrincipalType(PrincipalType principalType) { + public AdministratorMicrosoftEntraAdd withPrincipalType(PrincipalType principalType) { if (this.innerProperties() == null) { - this.innerProperties = new AdministratorPropertiesForAdd(); + this.innerProperties = new AdministratorMicrosoftEntraPropertiesForAdd(); } this.innerProperties().withPrincipalType(principalType); return this; } /** - * Get the principalName property: Microsoft Entra Administrator principal name. + * Get the principalName property: Name of the Microsoft Entra principal. * * @return the principalName value. */ @@ -70,21 +73,21 @@ public String principalName() { } /** - * Set the principalName property: Microsoft Entra Administrator principal name. + * Set the principalName property: Name of the Microsoft Entra principal. * * @param principalName the principalName value to set. - * @return the ActiveDirectoryAdministratorAdd object itself. + * @return the AdministratorMicrosoftEntraAdd object itself. */ - public ActiveDirectoryAdministratorAdd withPrincipalName(String principalName) { + public AdministratorMicrosoftEntraAdd withPrincipalName(String principalName) { if (this.innerProperties() == null) { - this.innerProperties = new AdministratorPropertiesForAdd(); + this.innerProperties = new AdministratorMicrosoftEntraPropertiesForAdd(); } this.innerProperties().withPrincipalName(principalName); return this; } /** - * Get the tenantId property: The tenantId of the Microsoft Entra Administrator. + * Get the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * * @return the tenantId value. */ @@ -93,14 +96,14 @@ public String tenantId() { } /** - * Set the tenantId property: The tenantId of the Microsoft Entra Administrator. + * Set the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * * @param tenantId the tenantId value to set. - * @return the ActiveDirectoryAdministratorAdd object itself. + * @return the AdministratorMicrosoftEntraAdd object itself. */ - public ActiveDirectoryAdministratorAdd withTenantId(String tenantId) { + public AdministratorMicrosoftEntraAdd withTenantId(String tenantId) { if (this.innerProperties() == null) { - this.innerProperties = new AdministratorPropertiesForAdd(); + this.innerProperties = new AdministratorMicrosoftEntraPropertiesForAdd(); } this.innerProperties().withTenantId(tenantId); return this; @@ -128,30 +131,30 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ActiveDirectoryAdministratorAdd from the JsonReader. + * Reads an instance of AdministratorMicrosoftEntraAdd from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ActiveDirectoryAdministratorAdd if the JsonReader was pointing to an instance of it, or + * @return An instance of AdministratorMicrosoftEntraAdd if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ActiveDirectoryAdministratorAdd. + * @throws IOException If an error occurs while reading the AdministratorMicrosoftEntraAdd. */ - public static ActiveDirectoryAdministratorAdd fromJson(JsonReader jsonReader) throws IOException { + public static AdministratorMicrosoftEntraAdd fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ActiveDirectoryAdministratorAdd deserializedActiveDirectoryAdministratorAdd - = new ActiveDirectoryAdministratorAdd(); + AdministratorMicrosoftEntraAdd deserializedAdministratorMicrosoftEntraAdd + = new AdministratorMicrosoftEntraAdd(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("properties".equals(fieldName)) { - deserializedActiveDirectoryAdministratorAdd.innerProperties - = AdministratorPropertiesForAdd.fromJson(reader); + deserializedAdministratorMicrosoftEntraAdd.innerProperties + = AdministratorMicrosoftEntraPropertiesForAdd.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedActiveDirectoryAdministratorAdd; + return deserializedAdministratorMicrosoftEntraAdd; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraList.java new file mode 100644 index 000000000000..54e97f4d55ed --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraList.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; +import java.io.IOException; +import java.util.List; + +/** + * List of server administrators associated to Microsoft Entra principals. + */ +@Fluent +public final class AdministratorMicrosoftEntraList implements JsonSerializable { + /* + * List of server administrators associated to Microsoft Entra principals. + */ + private List value; + + /* + * Link used to get the next page of results. + */ + private String nextLink; + + /** + * Creates an instance of AdministratorMicrosoftEntraList class. + */ + public AdministratorMicrosoftEntraList() { + } + + /** + * Get the value property: List of server administrators associated to Microsoft Entra principals. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of server administrators associated to Microsoft Entra principals. + * + * @param value the value value to set. + * @return the AdministratorMicrosoftEntraList object itself. + */ + public AdministratorMicrosoftEntraList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link used to get the next page of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link used to get the next page of results. + * + * @param nextLink the nextLink value to set. + * @return the AdministratorMicrosoftEntraList object itself. + */ + public AdministratorMicrosoftEntraList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdministratorMicrosoftEntraList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdministratorMicrosoftEntraList if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AdministratorMicrosoftEntraList. + */ + public static AdministratorMicrosoftEntraList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdministratorMicrosoftEntraList deserializedAdministratorMicrosoftEntraList + = new AdministratorMicrosoftEntraList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> AdministratorMicrosoftEntraInner.fromJson(reader1)); + deserializedAdministratorMicrosoftEntraList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAdministratorMicrosoftEntraList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAdministratorMicrosoftEntraList; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Administrators.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorsMicrosoftEntras.java similarity index 64% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Administrators.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorsMicrosoftEntras.java index 3ae117f77073..635192c996e7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Administrators.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorsMicrosoftEntras.java @@ -9,15 +9,15 @@ import com.azure.core.util.Context; /** - * Resource collection API of Administrators. + * Resource collection API of AdministratorsMicrosoftEntras. */ -public interface Administrators { +public interface AdministratorsMicrosoftEntras { /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -25,11 +25,11 @@ public interface Administrators { void delete(String resourceGroupName, String serverName, String objectId); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -38,47 +38,49 @@ public interface Administrators { void delete(String resourceGroupName, String serverName, String objectId, Context context); /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response}. */ - Response getWithResponse(String resourceGroupName, String serverName, String objectId, + Response getWithResponse(String resourceGroupName, String serverName, String objectId, Context context); /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param objectId Guid of the objectId for the administrator. + * @param objectId Object identifier of the Microsoft Entra principal. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about a server administrator associated to a Microsoft Entra principal. */ - ActiveDirectoryAdministrator get(String resourceGroupName, String serverName, String objectId); + AdministratorMicrosoftEntra get(String resourceGroupName, String serverName, String objectId); /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Microsoft Entra Administrators as paginated response with {@link PagedIterable}. + * @return list of server administrators associated to Microsoft Entra principals as paginated response with + * {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the AAD administrators for a given server. + * List all server administrators associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -86,36 +88,39 @@ Response getWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Microsoft Entra Administrators as paginated response with {@link PagedIterable}. + * @return list of server administrators associated to Microsoft Entra principals as paginated response with + * {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName, + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response}. */ - ActiveDirectoryAdministrator getById(String id); + AdministratorMicrosoftEntra getById(String id); /** - * Gets information about a server. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + Response getByIdWithResponse(String id, Context context); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -125,7 +130,7 @@ PagedIterable listByServer(String resourceGroupNam void deleteById(String id); /** - * Deletes an Microsoft Entra Administrator associated with the server. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -136,10 +141,10 @@ PagedIterable listByServer(String resourceGroupNam void deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new ActiveDirectoryAdministrator resource. + * Begins definition for a new AdministratorMicrosoftEntra resource. * * @param name resource name. - * @return the first stage of the new ActiveDirectoryAdministrator definition. + * @return the first stage of the new AdministratorMicrosoftEntra definition. */ - ActiveDirectoryAdministrator.DefinitionStages.Blank define(String name); + AdministratorMicrosoftEntra.DefinitionStages.Blank define(String name); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupOperations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettings.java similarity index 60% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupOperations.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettings.java index 0de0fbe4b0b2..116e18e003d3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupOperations.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettings.java @@ -9,62 +9,63 @@ import com.azure.core.util.Context; /** - * Resource collection API of LtrBackupOperations. + * Resource collection API of AdvancedThreatProtectionSettings. */ -public interface LtrBackupOperations { +public interface AdvancedThreatProtectionSettings { /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 result of the give long term retention backup operation for the flexible server along with - * {@link Response}. + * @return list of advanced threat protection settings for a server as paginated response with + * {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String serverName, String backupName, - Context context); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 result of the give long term retention backup operation for the flexible server. + * @return list of advanced threat protection settings for a server as paginated response with + * {@link PagedIterable}. */ - LtrServerBackupOperation get(String resourceGroupName, String serverName, String backupName); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 result of the give long term retention backup operations for the flexible server as paginated - * response with {@link PagedIterable}. + * @return state of advanced threat protection settings for a server along with {@link Response}. */ - PagedIterable listByServer(String resourceGroupName, String serverName); + Response getWithResponse(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, Context context); /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param context The context to associate with this operation. + * @param threatProtectionName Name of the advanced threat protection settings. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 result of the give long term retention backup operations for the flexible server as paginated - * response with {@link PagedIterable}. + * @return state of advanced threat protection settings for a server. */ - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + AdvancedThreatProtectionSettingsModel get(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsList.java new file mode 100644 index 000000000000..96786efbebf3 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsList.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; +import java.io.IOException; +import java.util.List; + +/** + * List of advanced threat protection settings for a server. + */ +@Fluent +public final class AdvancedThreatProtectionSettingsList + implements JsonSerializable { + /* + * Array of results. + */ + private List value; + + /* + * Link used to get the next page of results. + */ + private String nextLink; + + /** + * Creates an instance of AdvancedThreatProtectionSettingsList class. + */ + public AdvancedThreatProtectionSettingsList() { + } + + /** + * Get the value property: Array of results. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: Link used to get the next page of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link used to get the next page of results. + * + * @param nextLink the nextLink value to set. + * @return the AdvancedThreatProtectionSettingsList object itself. + */ + public AdvancedThreatProtectionSettingsList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdvancedThreatProtectionSettingsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdvancedThreatProtectionSettingsList if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AdvancedThreatProtectionSettingsList. + */ + public static AdvancedThreatProtectionSettingsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdvancedThreatProtectionSettingsList deserializedAdvancedThreatProtectionSettingsList + = new AdvancedThreatProtectionSettingsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> AdvancedThreatProtectionSettingsModelInner.fromJson(reader1)); + deserializedAdvancedThreatProtectionSettingsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAdvancedThreatProtectionSettingsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAdvancedThreatProtectionSettingsList; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettingsModel.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsModel.java similarity index 58% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettingsModel.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsModel.java index 4695bacfe895..c76f4156a8ff 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettingsModel.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsModel.java @@ -6,13 +6,13 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerThreatProtectionSettingsModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; import java.time.OffsetDateTime; /** - * An immutable client-side representation of ServerThreatProtectionSettingsModel. + * An immutable client-side representation of AdvancedThreatProtectionSettingsModel. */ -public interface ServerThreatProtectionSettingsModel { +public interface AdvancedThreatProtectionSettingsModel { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -42,15 +42,15 @@ public interface ServerThreatProtectionSettingsModel { SystemData systemData(); /** - * Gets the state property: Specifies the state of the Threat Protection, whether it is enabled or disabled or a - * state has not been applied yet on the specific server. + * Gets the state property: Specifies the state of the advanced threat protection, whether it is enabled, disabled, + * or a state has not been applied yet on the server. * * @return the state value. */ ThreatProtectionState state(); /** - * Gets the creationTime property: Specifies the UTC creation time of the policy. + * Gets the creationTime property: Specifies the creation time (UTC) of the policy. * * @return the creationTime value. */ @@ -65,31 +65,32 @@ public interface ServerThreatProtectionSettingsModel { /** * Gets the inner - * com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerThreatProtectionSettingsModelInner object. + * com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner + * object. * * @return the inner object. */ - ServerThreatProtectionSettingsModelInner innerModel(); + AdvancedThreatProtectionSettingsModelInner innerModel(); /** - * The entirety of the ServerThreatProtectionSettingsModel definition. + * The entirety of the AdvancedThreatProtectionSettingsModel definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } /** - * The ServerThreatProtectionSettingsModel definition stages. + * The AdvancedThreatProtectionSettingsModel definition stages. */ interface DefinitionStages { /** - * The first stage of the ServerThreatProtectionSettingsModel definition. + * The first stage of the AdvancedThreatProtectionSettingsModel definition. */ interface Blank extends WithParentResource { } /** - * The stage of the ServerThreatProtectionSettingsModel definition allowing to specify parent resource. + * The stage of the AdvancedThreatProtectionSettingsModel definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -103,7 +104,7 @@ interface WithParentResource { } /** - * The stage of the ServerThreatProtectionSettingsModel definition which contains all the minimum required + * The stage of the AdvancedThreatProtectionSettingsModel definition which contains all the minimum required * properties for the resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate extends DefinitionStages.WithState { @@ -112,7 +113,7 @@ interface WithCreate extends DefinitionStages.WithState { * * @return the created resource. */ - ServerThreatProtectionSettingsModel create(); + AdvancedThreatProtectionSettingsModel create(); /** * Executes the create request. @@ -120,19 +121,19 @@ interface WithCreate extends DefinitionStages.WithState { * @param context The context to associate with this operation. * @return the created resource. */ - ServerThreatProtectionSettingsModel create(Context context); + AdvancedThreatProtectionSettingsModel create(Context context); } /** - * The stage of the ServerThreatProtectionSettingsModel definition allowing to specify state. + * The stage of the AdvancedThreatProtectionSettingsModel definition allowing to specify state. */ interface WithState { /** - * Specifies the state property: Specifies the state of the Threat Protection, whether it is enabled or - * disabled or a state has not been applied yet on the specific server.. + * Specifies the state property: Specifies the state of the advanced threat protection, whether it is + * enabled, disabled, or a state has not been applied yet on the server.. * - * @param state Specifies the state of the Threat Protection, whether it is enabled or disabled or a state - * has not been applied yet on the specific server. + * @param state Specifies the state of the advanced threat protection, whether it is enabled, disabled, or a + * state has not been applied yet on the server. * @return the next definition stage. */ WithCreate withState(ThreatProtectionState state); @@ -140,14 +141,14 @@ interface WithState { } /** - * Begins update for the ServerThreatProtectionSettingsModel resource. + * Begins update for the AdvancedThreatProtectionSettingsModel resource. * * @return the stage of resource update. */ - ServerThreatProtectionSettingsModel.Update update(); + AdvancedThreatProtectionSettingsModel.Update update(); /** - * The template for ServerThreatProtectionSettingsModel update. + * The template for AdvancedThreatProtectionSettingsModel update. */ interface Update extends UpdateStages.WithState { /** @@ -155,7 +156,7 @@ interface Update extends UpdateStages.WithState { * * @return the updated resource. */ - ServerThreatProtectionSettingsModel apply(); + AdvancedThreatProtectionSettingsModel apply(); /** * Executes the update request. @@ -163,41 +164,26 @@ interface Update extends UpdateStages.WithState { * @param context The context to associate with this operation. * @return the updated resource. */ - ServerThreatProtectionSettingsModel apply(Context context); + AdvancedThreatProtectionSettingsModel apply(Context context); } /** - * The ServerThreatProtectionSettingsModel update stages. + * The AdvancedThreatProtectionSettingsModel update stages. */ interface UpdateStages { /** - * The stage of the ServerThreatProtectionSettingsModel update allowing to specify state. + * The stage of the AdvancedThreatProtectionSettingsModel update allowing to specify state. */ interface WithState { /** - * Specifies the state property: Specifies the state of the Threat Protection, whether it is enabled or - * disabled or a state has not been applied yet on the specific server.. + * Specifies the state property: Specifies the state of the advanced threat protection, whether it is + * enabled, disabled, or a state has not been applied yet on the server.. * - * @param state Specifies the state of the Threat Protection, whether it is enabled or disabled or a state - * has not been applied yet on the specific server. + * @param state Specifies the state of the advanced threat protection, whether it is enabled, disabled, or a + * state has not been applied yet on the server. * @return the next definition stage. */ Update withState(ThreatProtectionState state); } } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ServerThreatProtectionSettingsModel refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ServerThreatProtectionSettingsModel refresh(Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ArmServerKeyType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ArmServerKeyType.java deleted file mode 100644 index f1dc83e3bdd6..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ArmServerKeyType.java +++ /dev/null @@ -1,51 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Data encryption type to depict if it is System Managed vs Azure Key vault. - */ -public final class ArmServerKeyType extends ExpandableStringEnum { - /** - * Static value SystemManaged for ArmServerKeyType. - */ - public static final ArmServerKeyType SYSTEM_MANAGED = fromString("SystemManaged"); - - /** - * Static value AzureKeyVault for ArmServerKeyType. - */ - public static final ArmServerKeyType AZURE_KEY_VAULT = fromString("AzureKeyVault"); - - /** - * Creates a new instance of ArmServerKeyType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ArmServerKeyType() { - } - - /** - * Creates or finds a ArmServerKeyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ArmServerKeyType. - */ - public static ArmServerKeyType fromString(String name) { - return fromString(name, ArmServerKeyType.class); - } - - /** - * Gets known ArmServerKeyType values. - * - * @return known ArmServerKeyType values. - */ - public static Collection values() { - return values(ArmServerKeyType.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfig.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfig.java index 02900dbb7e6a..bc3d4fcee233 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfig.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfig.java @@ -17,17 +17,17 @@ @Fluent public final class AuthConfig implements JsonSerializable { /* - * If Enabled, Microsoft Entra authentication is enabled. + * Indicates if the server supports Microsoft Entra authentication. */ - private ActiveDirectoryAuthEnum activeDirectoryAuth; + private MicrosoftEntraAuth activeDirectoryAuth; /* - * If Enabled, Password authentication is enabled. + * Indicates if the server supports password based authentication. */ - private PasswordAuthEnum passwordAuth; + private PasswordBasedAuth passwordAuth; /* - * Tenant id of the server. + * Identifier of the tenant of the delegated resource. */ private String tenantId; @@ -38,47 +38,47 @@ public AuthConfig() { } /** - * Get the activeDirectoryAuth property: If Enabled, Microsoft Entra authentication is enabled. + * Get the activeDirectoryAuth property: Indicates if the server supports Microsoft Entra authentication. * * @return the activeDirectoryAuth value. */ - public ActiveDirectoryAuthEnum activeDirectoryAuth() { + public MicrosoftEntraAuth activeDirectoryAuth() { return this.activeDirectoryAuth; } /** - * Set the activeDirectoryAuth property: If Enabled, Microsoft Entra authentication is enabled. + * Set the activeDirectoryAuth property: Indicates if the server supports Microsoft Entra authentication. * * @param activeDirectoryAuth the activeDirectoryAuth value to set. * @return the AuthConfig object itself. */ - public AuthConfig withActiveDirectoryAuth(ActiveDirectoryAuthEnum activeDirectoryAuth) { + public AuthConfig withActiveDirectoryAuth(MicrosoftEntraAuth activeDirectoryAuth) { this.activeDirectoryAuth = activeDirectoryAuth; return this; } /** - * Get the passwordAuth property: If Enabled, Password authentication is enabled. + * Get the passwordAuth property: Indicates if the server supports password based authentication. * * @return the passwordAuth value. */ - public PasswordAuthEnum passwordAuth() { + public PasswordBasedAuth passwordAuth() { return this.passwordAuth; } /** - * Set the passwordAuth property: If Enabled, Password authentication is enabled. + * Set the passwordAuth property: Indicates if the server supports password based authentication. * * @param passwordAuth the passwordAuth value to set. * @return the AuthConfig object itself. */ - public AuthConfig withPasswordAuth(PasswordAuthEnum passwordAuth) { + public AuthConfig withPasswordAuth(PasswordBasedAuth passwordAuth) { this.passwordAuth = passwordAuth; return this; } /** - * Get the tenantId property: Tenant id of the server. + * Get the tenantId property: Identifier of the tenant of the delegated resource. * * @return the tenantId value. */ @@ -87,7 +87,7 @@ public String tenantId() { } /** - * Set the tenantId property: Tenant id of the server. + * Set the tenantId property: Identifier of the tenant of the delegated resource. * * @param tenantId the tenantId value to set. * @return the AuthConfig object itself. @@ -134,9 +134,9 @@ public static AuthConfig fromJson(JsonReader jsonReader) throws IOException { reader.nextToken(); if ("activeDirectoryAuth".equals(fieldName)) { - deserializedAuthConfig.activeDirectoryAuth = ActiveDirectoryAuthEnum.fromString(reader.getString()); + deserializedAuthConfig.activeDirectoryAuth = MicrosoftEntraAuth.fromString(reader.getString()); } else if ("passwordAuth".equals(fieldName)) { - deserializedAuthConfig.passwordAuth = PasswordAuthEnum.fromString(reader.getString()); + deserializedAuthConfig.passwordAuth = PasswordBasedAuth.fromString(reader.getString()); } else if ("tenantId".equals(fieldName)) { deserializedAuthConfig.tenantId = reader.getString(); } else { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfigForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfigForPatch.java new file mode 100644 index 000000000000..558487ee0476 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfigForPatch.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Authentication configuration properties of a server. + */ +@Fluent +public final class AuthConfigForPatch implements JsonSerializable { + /* + * Indicates if the server supports Microsoft Entra authentication. + */ + private MicrosoftEntraAuth activeDirectoryAuth; + + /* + * Indicates if the server supports password based authentication. + */ + private PasswordBasedAuth passwordAuth; + + /* + * Identifier of the tenant of the delegated resource. + */ + private String tenantId; + + /** + * Creates an instance of AuthConfigForPatch class. + */ + public AuthConfigForPatch() { + } + + /** + * Get the activeDirectoryAuth property: Indicates if the server supports Microsoft Entra authentication. + * + * @return the activeDirectoryAuth value. + */ + public MicrosoftEntraAuth activeDirectoryAuth() { + return this.activeDirectoryAuth; + } + + /** + * Set the activeDirectoryAuth property: Indicates if the server supports Microsoft Entra authentication. + * + * @param activeDirectoryAuth the activeDirectoryAuth value to set. + * @return the AuthConfigForPatch object itself. + */ + public AuthConfigForPatch withActiveDirectoryAuth(MicrosoftEntraAuth activeDirectoryAuth) { + this.activeDirectoryAuth = activeDirectoryAuth; + return this; + } + + /** + * Get the passwordAuth property: Indicates if the server supports password based authentication. + * + * @return the passwordAuth value. + */ + public PasswordBasedAuth passwordAuth() { + return this.passwordAuth; + } + + /** + * Set the passwordAuth property: Indicates if the server supports password based authentication. + * + * @param passwordAuth the passwordAuth value to set. + * @return the AuthConfigForPatch object itself. + */ + public AuthConfigForPatch withPasswordAuth(PasswordBasedAuth passwordAuth) { + this.passwordAuth = passwordAuth; + return this; + } + + /** + * Get the tenantId property: Identifier of the tenant of the delegated resource. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: Identifier of the tenant of the delegated resource. + * + * @param tenantId the tenantId value to set. + * @return the AuthConfigForPatch object itself. + */ + public AuthConfigForPatch withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("activeDirectoryAuth", + this.activeDirectoryAuth == null ? null : this.activeDirectoryAuth.toString()); + jsonWriter.writeStringField("passwordAuth", this.passwordAuth == null ? null : this.passwordAuth.toString()); + jsonWriter.writeStringField("tenantId", this.tenantId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AuthConfigForPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AuthConfigForPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AuthConfigForPatch. + */ + public static AuthConfigForPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AuthConfigForPatch deserializedAuthConfigForPatch = new AuthConfigForPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("activeDirectoryAuth".equals(fieldName)) { + deserializedAuthConfigForPatch.activeDirectoryAuth + = MicrosoftEntraAuth.fromString(reader.getString()); + } else if ("passwordAuth".equals(fieldName)) { + deserializedAuthConfigForPatch.passwordAuth = PasswordBasedAuth.fromString(reader.getString()); + } else if ("tenantId".equals(fieldName)) { + deserializedAuthConfigForPatch.tenantId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAuthConfigForPatch; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTier.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTier.java new file mode 100644 index 000000000000..b9f59a12e13a --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTier.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Storage tier of a server. + */ +public final class AzureManagedDiskPerformanceTier extends ExpandableStringEnum { + /** + * Static value P1 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P1 = fromString("P1"); + + /** + * Static value P2 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P2 = fromString("P2"); + + /** + * Static value P3 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P3 = fromString("P3"); + + /** + * Static value P4 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P4 = fromString("P4"); + + /** + * Static value P6 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P6 = fromString("P6"); + + /** + * Static value P10 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P10 = fromString("P10"); + + /** + * Static value P15 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P15 = fromString("P15"); + + /** + * Static value P20 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P20 = fromString("P20"); + + /** + * Static value P30 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P30 = fromString("P30"); + + /** + * Static value P40 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P40 = fromString("P40"); + + /** + * Static value P50 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P50 = fromString("P50"); + + /** + * Static value P60 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P60 = fromString("P60"); + + /** + * Static value P70 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P70 = fromString("P70"); + + /** + * Static value P80 for AzureManagedDiskPerformanceTier. + */ + public static final AzureManagedDiskPerformanceTier P80 = fromString("P80"); + + /** + * Creates a new instance of AzureManagedDiskPerformanceTier value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AzureManagedDiskPerformanceTier() { + } + + /** + * Creates or finds a AzureManagedDiskPerformanceTier from its string representation. + * + * @param name a name to look for. + * @return the corresponding AzureManagedDiskPerformanceTier. + */ + public static AzureManagedDiskPerformanceTier fromString(String name) { + return fromString(name, AzureManagedDiskPerformanceTier.class); + } + + /** + * Gets known AzureManagedDiskPerformanceTier values. + * + * @return known AzureManagedDiskPerformanceTier values. + */ + public static Collection values() { + return values(AzureManagedDiskPerformanceTier.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTiers.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTiers.java deleted file mode 100644 index bfe642c35cf5..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTiers.java +++ /dev/null @@ -1,111 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Name of storage tier for IOPS. - */ -public final class AzureManagedDiskPerformanceTiers extends ExpandableStringEnum { - /** - * Static value P1 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P1 = fromString("P1"); - - /** - * Static value P2 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P2 = fromString("P2"); - - /** - * Static value P3 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P3 = fromString("P3"); - - /** - * Static value P4 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P4 = fromString("P4"); - - /** - * Static value P6 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P6 = fromString("P6"); - - /** - * Static value P10 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P10 = fromString("P10"); - - /** - * Static value P15 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P15 = fromString("P15"); - - /** - * Static value P20 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P20 = fromString("P20"); - - /** - * Static value P30 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P30 = fromString("P30"); - - /** - * Static value P40 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P40 = fromString("P40"); - - /** - * Static value P50 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P50 = fromString("P50"); - - /** - * Static value P60 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P60 = fromString("P60"); - - /** - * Static value P70 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P70 = fromString("P70"); - - /** - * Static value P80 for AzureManagedDiskPerformanceTiers. - */ - public static final AzureManagedDiskPerformanceTiers P80 = fromString("P80"); - - /** - * Creates a new instance of AzureManagedDiskPerformanceTiers value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AzureManagedDiskPerformanceTiers() { - } - - /** - * Creates or finds a AzureManagedDiskPerformanceTiers from its string representation. - * - * @param name a name to look for. - * @return the corresponding AzureManagedDiskPerformanceTiers. - */ - public static AzureManagedDiskPerformanceTiers fromString(String name) { - return fromString(name, AzureManagedDiskPerformanceTiers.class); - } - - /** - * Gets known AzureManagedDiskPerformanceTiers values. - * - * @return known AzureManagedDiskPerformanceTiers values. - */ - public static Collection values() { - return values(AzureManagedDiskPerformanceTiers.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backup.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backup.java index fff21b2a63ed..58c546a365e9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backup.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backup.java @@ -24,12 +24,12 @@ public final class Backup implements JsonSerializable { private Integer backupRetentionDays; /* - * A value indicating whether Geo-Redundant backup is enabled on the server. + * Indicates if the server is configured to create geographically redundant backups. */ - private GeoRedundantBackupEnum geoRedundantBackup; + private GeographicallyRedundantBackup geoRedundantBackup; /* - * The earliest restore point time (ISO8601 format) for server. + * Earliest restore point time (ISO8601 format) for a server. */ private OffsetDateTime earliestRestoreDate; @@ -60,27 +60,29 @@ public Backup withBackupRetentionDays(Integer backupRetentionDays) { } /** - * Get the geoRedundantBackup property: A value indicating whether Geo-Redundant backup is enabled on the server. + * Get the geoRedundantBackup property: Indicates if the server is configured to create geographically redundant + * backups. * * @return the geoRedundantBackup value. */ - public GeoRedundantBackupEnum geoRedundantBackup() { + public GeographicallyRedundantBackup geoRedundantBackup() { return this.geoRedundantBackup; } /** - * Set the geoRedundantBackup property: A value indicating whether Geo-Redundant backup is enabled on the server. + * Set the geoRedundantBackup property: Indicates if the server is configured to create geographically redundant + * backups. * * @param geoRedundantBackup the geoRedundantBackup value to set. * @return the Backup object itself. */ - public Backup withGeoRedundantBackup(GeoRedundantBackupEnum geoRedundantBackup) { + public Backup withGeoRedundantBackup(GeographicallyRedundantBackup geoRedundantBackup) { this.geoRedundantBackup = geoRedundantBackup; return this; } /** - * Get the earliestRestoreDate property: The earliest restore point time (ISO8601 format) for server. + * Get the earliestRestoreDate property: Earliest restore point time (ISO8601 format) for a server. * * @return the earliestRestoreDate value. */ @@ -126,7 +128,8 @@ public static Backup fromJson(JsonReader jsonReader) throws IOException { if ("backupRetentionDays".equals(fieldName)) { deserializedBackup.backupRetentionDays = reader.getNullable(JsonReader::getInt); } else if ("geoRedundantBackup".equals(fieldName)) { - deserializedBackup.geoRedundantBackup = GeoRedundantBackupEnum.fromString(reader.getString()); + deserializedBackup.geoRedundantBackup + = GeographicallyRedundantBackup.fromString(reader.getString()); } else if ("earliestRestoreDate".equals(fieldName)) { deserializedBackup.earliestRestoreDate = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerBackup.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemand.java similarity index 72% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerBackup.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemand.java index a6bd8c6c6797..df1f83f1895d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerBackup.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemand.java @@ -5,13 +5,13 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; import java.time.OffsetDateTime; /** - * An immutable client-side representation of ServerBackup. + * An immutable client-side representation of BackupAutomaticAndOnDemand. */ -public interface ServerBackup { +public interface BackupAutomaticAndOnDemand { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -41,30 +41,31 @@ public interface ServerBackup { SystemData systemData(); /** - * Gets the backupType property: Backup type. + * Gets the backupType property: Type of backup. * * @return the backupType value. */ - Origin backupType(); + BackupType backupType(); /** - * Gets the completedTime property: Backup completed time (ISO8601 format). + * Gets the completedTime property: Time(ISO8601 format) at which the backup was completed. * * @return the completedTime value. */ OffsetDateTime completedTime(); /** - * Gets the source property: Backup source. + * Gets the source property: Source of the backup. * * @return the source value. */ String source(); /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner object. + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner + * object. * * @return the inner object. */ - ServerBackupInner innerModel(); + BackupAutomaticAndOnDemandInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemandList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemandList.java new file mode 100644 index 000000000000..d0ca493dea86 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemandList.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; +import java.io.IOException; +import java.util.List; + +/** + * List of backups. + */ +@Fluent +public final class BackupAutomaticAndOnDemandList implements JsonSerializable { + /* + * List of available backups. + */ + private List value; + + /* + * Link used to get the next page of results. + */ + private String nextLink; + + /** + * Creates an instance of BackupAutomaticAndOnDemandList class. + */ + public BackupAutomaticAndOnDemandList() { + } + + /** + * Get the value property: List of available backups. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of available backups. + * + * @param value the value value to set. + * @return the BackupAutomaticAndOnDemandList object itself. + */ + public BackupAutomaticAndOnDemandList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link used to get the next page of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link used to get the next page of results. + * + * @param nextLink the nextLink value to set. + * @return the BackupAutomaticAndOnDemandList object itself. + */ + public BackupAutomaticAndOnDemandList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupAutomaticAndOnDemandList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupAutomaticAndOnDemandList if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupAutomaticAndOnDemandList. + */ + public static BackupAutomaticAndOnDemandList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupAutomaticAndOnDemandList deserializedBackupAutomaticAndOnDemandList + = new BackupAutomaticAndOnDemandList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> BackupAutomaticAndOnDemandInner.fromJson(reader1)); + deserializedBackupAutomaticAndOnDemandList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedBackupAutomaticAndOnDemandList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupAutomaticAndOnDemandList; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupForPatch.java new file mode 100644 index 000000000000..8d86370dcf5d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupForPatch.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Backup properties of a server. + */ +@Fluent +public final class BackupForPatch implements JsonSerializable { + /* + * Backup retention days for the server. + */ + private Integer backupRetentionDays; + + /* + * Indicates if the server is configured to create geographically redundant backups. + */ + private GeographicallyRedundantBackup geoRedundantBackup; + + /* + * Earliest restore point time (ISO8601 format) for a server. + */ + private OffsetDateTime earliestRestoreDate; + + /** + * Creates an instance of BackupForPatch class. + */ + public BackupForPatch() { + } + + /** + * Get the backupRetentionDays property: Backup retention days for the server. + * + * @return the backupRetentionDays value. + */ + public Integer backupRetentionDays() { + return this.backupRetentionDays; + } + + /** + * Set the backupRetentionDays property: Backup retention days for the server. + * + * @param backupRetentionDays the backupRetentionDays value to set. + * @return the BackupForPatch object itself. + */ + public BackupForPatch withBackupRetentionDays(Integer backupRetentionDays) { + this.backupRetentionDays = backupRetentionDays; + return this; + } + + /** + * Get the geoRedundantBackup property: Indicates if the server is configured to create geographically redundant + * backups. + * + * @return the geoRedundantBackup value. + */ + public GeographicallyRedundantBackup geoRedundantBackup() { + return this.geoRedundantBackup; + } + + /** + * Set the geoRedundantBackup property: Indicates if the server is configured to create geographically redundant + * backups. + * + * @param geoRedundantBackup the geoRedundantBackup value to set. + * @return the BackupForPatch object itself. + */ + public BackupForPatch withGeoRedundantBackup(GeographicallyRedundantBackup geoRedundantBackup) { + this.geoRedundantBackup = geoRedundantBackup; + return this; + } + + /** + * Get the earliestRestoreDate property: Earliest restore point time (ISO8601 format) for a server. + * + * @return the earliestRestoreDate value. + */ + public OffsetDateTime earliestRestoreDate() { + return this.earliestRestoreDate; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("backupRetentionDays", this.backupRetentionDays); + jsonWriter.writeStringField("geoRedundantBackup", + this.geoRedundantBackup == null ? null : this.geoRedundantBackup.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupForPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupForPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupForPatch. + */ + public static BackupForPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupForPatch deserializedBackupForPatch = new BackupForPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("backupRetentionDays".equals(fieldName)) { + deserializedBackupForPatch.backupRetentionDays = reader.getNullable(JsonReader::getInt); + } else if ("geoRedundantBackup".equals(fieldName)) { + deserializedBackupForPatch.geoRedundantBackup + = GeographicallyRedundantBackup.fromString(reader.getString()); + } else if ("earliestRestoreDate".equals(fieldName)) { + deserializedBackupForPatch.earliestRestoreDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupForPatch; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupType.java new file mode 100644 index 000000000000..3b155e19bb29 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of backup. + */ +public final class BackupType extends ExpandableStringEnum { + /** + * Static value Full for BackupType. + */ + public static final BackupType FULL = fromString("Full"); + + /** + * Static value Customer On-Demand for BackupType. + */ + public static final BackupType CUSTOMER_ON_DEMAND = fromString("Customer On-Demand"); + + /** + * Creates a new instance of BackupType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BackupType() { + } + + /** + * Creates or finds a BackupType from its string representation. + * + * @param name a name to look for. + * @return the corresponding BackupType. + */ + public static BackupType fromString(String name) { + return fromString(name, BackupType.class); + } + + /** + * Gets known BackupType values. + * + * @return known BackupType values. + */ + public static Collection values() { + return values(BackupType.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backups.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsAutomaticAndOnDemands.java similarity index 70% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backups.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsAutomaticAndOnDemands.java index e390b3f7cbcf..4c6f6821188f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backups.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsAutomaticAndOnDemands.java @@ -9,42 +9,42 @@ import com.azure.core.util.Context; /** - * Resource collection API of Backups. + * Resource collection API of BackupsAutomaticAndOnDemands. */ -public interface Backups { +public interface BackupsAutomaticAndOnDemands { /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties. + * @return properties of a backup. */ - ServerBackup create(String resourceGroupName, String serverName, String backupName); + BackupAutomaticAndOnDemand create(String resourceGroupName, String serverName, String backupName); /** - * Create a specific backup for PostgreSQL flexible server. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return server backup properties. + * @return properties of a backup. */ - ServerBackup create(String resourceGroupName, String serverName, String backupName, Context context); + BackupAutomaticAndOnDemand create(String resourceGroupName, String serverName, String backupName, Context context); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -52,11 +52,11 @@ public interface Backups { void delete(String resourceGroupName, String serverName, String backupName); /** - * Deletes a specific backup. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -65,47 +65,47 @@ public interface Backups { void delete(String resourceGroupName, String serverName, String backupName, Context context); /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific backup for a given server along with {@link Response}. + * @return information of an on demand backup, given its name along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String serverName, String backupName, + Response getWithResponse(String resourceGroupName, String serverName, String backupName, Context context); /** - * Get specific backup for a given server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param backupName Name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific backup for a given server. + * @return information of an on demand backup, given its name. */ - ServerBackup get(String resourceGroupName, String serverName, String backupName); + BackupAutomaticAndOnDemand get(String resourceGroupName, String serverName, String backupName); /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server backups as paginated response with {@link PagedIterable}. + * @return list of backups as paginated response with {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the backups for a given server. + * Lists all available backups of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -113,7 +113,8 @@ Response getWithResponse(String resourceGroupName, String serverNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server backups as paginated response with {@link PagedIterable}. + * @return list of backups as paginated response with {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperation.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionOperation.java similarity index 88% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperation.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionOperation.java index fa3cdaabc060..9e4f4f16e7fc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperation.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionOperation.java @@ -5,13 +5,13 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrServerBackupOperationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionOperationInner; import java.time.OffsetDateTime; /** - * An immutable client-side representation of LtrServerBackupOperation. + * An immutable client-side representation of BackupsLongTermRetentionOperation. */ -public interface LtrServerBackupOperation { +public interface BackupsLongTermRetentionOperation { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -112,10 +112,10 @@ public interface LtrServerBackupOperation { String errorMessage(); /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrServerBackupOperationInner - * object. + * Gets the inner + * com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionOperationInner object. * * @return the inner object. */ - LtrServerBackupOperationInner innerModel(); + BackupsLongTermRetentionOperationInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupRequest.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionRequest.java similarity index 63% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupRequest.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionRequest.java index 628431d1e55e..136078b16473 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupRequest.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionRequest.java @@ -15,16 +15,16 @@ * The request that is made for a long term retention backup. */ @Fluent -public final class LtrBackupRequest extends BackupRequestBase { +public final class BackupsLongTermRetentionRequest extends BackupRequestBase { /* * Backup store detail for target server */ private BackupStoreDetails targetDetails; /** - * Creates an instance of LtrBackupRequest class. + * Creates an instance of BackupsLongTermRetentionRequest class. */ - public LtrBackupRequest() { + public BackupsLongTermRetentionRequest() { } /** @@ -40,9 +40,9 @@ public BackupStoreDetails targetDetails() { * Set the targetDetails property: Backup store detail for target server. * * @param targetDetails the targetDetails value to set. - * @return the LtrBackupRequest object itself. + * @return the BackupsLongTermRetentionRequest object itself. */ - public LtrBackupRequest withTargetDetails(BackupStoreDetails targetDetails) { + public BackupsLongTermRetentionRequest withTargetDetails(BackupStoreDetails targetDetails) { this.targetDetails = targetDetails; return this; } @@ -51,7 +51,7 @@ public LtrBackupRequest withTargetDetails(BackupStoreDetails targetDetails) { * {@inheritDoc} */ @Override - public LtrBackupRequest withBackupSettings(BackupSettings backupSettings) { + public BackupsLongTermRetentionRequest withBackupSettings(BackupSettings backupSettings) { super.withBackupSettings(backupSettings); return this; } @@ -65,20 +65,21 @@ public LtrBackupRequest withBackupSettings(BackupSettings backupSettings) { public void validate() { if (targetDetails() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property targetDetails in model LtrBackupRequest")); + .log(new IllegalArgumentException( + "Missing required property targetDetails in model BackupsLongTermRetentionRequest")); } else { targetDetails().validate(); } if (backupSettings() == null) { throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property backupSettings in model LtrBackupRequest")); + .log(new IllegalArgumentException( + "Missing required property backupSettings in model BackupsLongTermRetentionRequest")); } else { backupSettings().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(LtrBackupRequest.class); + private static final ClientLogger LOGGER = new ClientLogger(BackupsLongTermRetentionRequest.class); /** * {@inheritDoc} @@ -92,31 +93,32 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of LtrBackupRequest from the JsonReader. + * Reads an instance of BackupsLongTermRetentionRequest from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of LtrBackupRequest if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * @return An instance of BackupsLongTermRetentionRequest if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LtrBackupRequest. + * @throws IOException If an error occurs while reading the BackupsLongTermRetentionRequest. */ - public static LtrBackupRequest fromJson(JsonReader jsonReader) throws IOException { + public static BackupsLongTermRetentionRequest fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - LtrBackupRequest deserializedLtrBackupRequest = new LtrBackupRequest(); + BackupsLongTermRetentionRequest deserializedBackupsLongTermRetentionRequest + = new BackupsLongTermRetentionRequest(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("backupSettings".equals(fieldName)) { - deserializedLtrBackupRequest.withBackupSettings(BackupSettings.fromJson(reader)); + deserializedBackupsLongTermRetentionRequest.withBackupSettings(BackupSettings.fromJson(reader)); } else if ("targetDetails".equals(fieldName)) { - deserializedLtrBackupRequest.targetDetails = BackupStoreDetails.fromJson(reader); + deserializedBackupsLongTermRetentionRequest.targetDetails = BackupStoreDetails.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedLtrBackupRequest; + return deserializedBackupsLongTermRetentionRequest; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupResponse.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionResponse.java similarity index 85% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupResponse.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionResponse.java index 2325230ef147..ca9d953bceed 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupResponse.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionResponse.java @@ -4,13 +4,13 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrBackupResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseInner; import java.time.OffsetDateTime; /** - * An immutable client-side representation of LtrBackupResponse. + * An immutable client-side representation of BackupsLongTermRetentionResponse. */ -public interface LtrBackupResponse { +public interface BackupsLongTermRetentionResponse { /** * Gets the datasourceSizeInBytes property: Size of datasource in bytes. * @@ -83,9 +83,10 @@ public interface LtrBackupResponse { String errorMessage(); /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrBackupResponseInner object. + * Gets the inner + * com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseInner object. * * @return the inner object. */ - LtrBackupResponseInner innerModel(); + BackupsLongTermRetentionResponseInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LtrBackupOperationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentions.java similarity index 52% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LtrBackupOperationsClient.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentions.java index 744e0eeb2562..fc3709bea64b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LtrBackupOperationsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentions.java @@ -2,113 +2,117 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.fluent; +package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrServerBackupOperationInner; -import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in LtrBackupOperationsClient. + * Resource collection API of BackupsLongTermRetentions. */ -public interface LtrBackupOperationsClient { +public interface BackupsLongTermRetentions { /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Performs all checks required for a long term retention backup operation to succeed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 result of the give long term retention backup operation for the flexible server along with - * {@link Response} on successful completion of {@link Mono}. + * @return response for the LTR pre-backup API call. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String backupName); + Response checkPrerequisitesWithResponse(String resourceGroupName, String serverName, + LtrPreBackupRequest parameters, Context context); /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Performs all checks required for a long term retention backup operation to succeed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 result of the give long term retention backup operation for the flexible server on successful - * completion of {@link Mono}. + * @return response for the LTR pre-backup API call. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String backupName); + LtrPreBackupResponse checkPrerequisites(String resourceGroupName, String serverName, + LtrPreBackupRequest parameters); /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Initiates a long term retention backup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param backupName The name of the backup. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for the LTR backup API call. + */ + BackupsLongTermRetentionResponse start(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters); + + /** + * Initiates a long term retention backup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 result of the give long term retention backup operation for the flexible server along with - * {@link Response}. + * @return response for the LTR backup API call. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - String backupName, Context context); + BackupsLongTermRetentionResponse start(String resourceGroupName, String serverName, + BackupsLongTermRetentionRequest parameters, Context context); /** - * Gets the result of the give long term retention backup operation for the flexible server. + * Gets the results of a long retention backup operation for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param backupName The name of the backup. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 result of the give long term retention backup operation for the flexible server. + * @return the results of a long retention backup operation for a server along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - LtrServerBackupOperationInner get(String resourceGroupName, String serverName, String backupName); + Response getWithResponse(String resourceGroupName, String serverName, + String backupName, Context context); /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Gets the results of a long retention backup operation for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param backupName The name of the backup. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 result of the give long term retention backup operations for the flexible server as paginated - * response with {@link PagedFlux}. + * @return the results of a long retention backup operation for a server. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); + BackupsLongTermRetentionOperation get(String resourceGroupName, String serverName, String backupName); /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Lists the results of the long term retention backup operations for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 result of the give long term retention backup operations for the flexible server as paginated - * response with {@link PagedIterable}. + * @return a list of long term retention backup operations for server as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets the result of the give long term retention backup operations for the flexible server. + * Lists the results of the long term retention backup operations for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -116,10 +120,9 @@ Response getWithResponse(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 result of the give long term retention backup operations for the flexible server as paginated - * response with {@link PagedIterable}. + * @return a list of long term retention backup operations for server as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServersTriggerLtrPreBackupHeaders.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesHeaders.java similarity index 72% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServersTriggerLtrPreBackupHeaders.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesHeaders.java index 4779a9e1e359..75ac0065d6b6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServersTriggerLtrPreBackupHeaders.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesHeaders.java @@ -9,10 +9,10 @@ import com.azure.core.http.HttpHeaders; /** - * The FlexibleServersTriggerLtrPreBackupHeaders model. + * The BackupsLongTermRetentionsCheckPrerequisitesHeaders model. */ @Fluent -public final class FlexibleServersTriggerLtrPreBackupHeaders { +public final class BackupsLongTermRetentionsCheckPrerequisitesHeaders { /* * The x-ms-request-id property. */ @@ -20,11 +20,11 @@ public final class FlexibleServersTriggerLtrPreBackupHeaders { // HttpHeaders containing the raw property values. /** - * Creates an instance of FlexibleServersTriggerLtrPreBackupHeaders class. + * Creates an instance of BackupsLongTermRetentionsCheckPrerequisitesHeaders class. * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ - public FlexibleServersTriggerLtrPreBackupHeaders(HttpHeaders rawHeaders) { + public BackupsLongTermRetentionsCheckPrerequisitesHeaders(HttpHeaders rawHeaders) { this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); } @@ -41,9 +41,9 @@ public String xMsRequestId() { * Set the xMsRequestId property: The x-ms-request-id property. * * @param xMsRequestId the xMsRequestId value to set. - * @return the FlexibleServersTriggerLtrPreBackupHeaders object itself. + * @return the BackupsLongTermRetentionsCheckPrerequisitesHeaders object itself. */ - public FlexibleServersTriggerLtrPreBackupHeaders withXMsRequestId(String xMsRequestId) { + public BackupsLongTermRetentionsCheckPrerequisitesHeaders withXMsRequestId(String xMsRequestId) { this.xMsRequestId = xMsRequestId; return this; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServersTriggerLtrPreBackupResponse.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesResponse.java similarity index 60% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServersTriggerLtrPreBackupResponse.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesResponse.java index 833fbc162378..7c27ca25ea1f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServersTriggerLtrPreBackupResponse.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesResponse.java @@ -10,21 +10,22 @@ import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner; /** - * Contains all response data for the triggerLtrPreBackup operation. + * Contains all response data for the checkPrerequisites operation. */ -public final class FlexibleServersTriggerLtrPreBackupResponse - extends ResponseBase { +public final class BackupsLongTermRetentionsCheckPrerequisitesResponse + extends ResponseBase { /** - * Creates an instance of FlexibleServersTriggerLtrPreBackupResponse. + * Creates an instance of BackupsLongTermRetentionsCheckPrerequisitesResponse. * - * @param request the request which resulted in this FlexibleServersTriggerLtrPreBackupResponse. + * @param request the request which resulted in this BackupsLongTermRetentionsCheckPrerequisitesResponse. * @param statusCode the status code of the HTTP response. * @param rawHeaders the raw headers of the HTTP response. * @param value the deserialized value of the HTTP response. * @param headers the deserialized headers of the HTTP response. */ - public FlexibleServersTriggerLtrPreBackupResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - LtrPreBackupResponseInner value, FlexibleServersTriggerLtrPreBackupHeaders headers) { + public BackupsLongTermRetentionsCheckPrerequisitesResponse(HttpRequest request, int statusCode, + HttpHeaders rawHeaders, LtrPreBackupResponseInner value, + BackupsLongTermRetentionsCheckPrerequisitesHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cancel.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cancel.java new file mode 100644 index 000000000000..7c235c79a417 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cancel.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if cancel must be triggered for the entire migration. + */ +public final class Cancel extends ExpandableStringEnum { + /** + * Static value True for Cancel. + */ + public static final Cancel TRUE = fromString("True"); + + /** + * Static value False for Cancel. + */ + public static final Cancel FALSE = fromString("False"); + + /** + * Creates a new instance of Cancel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Cancel() { + } + + /** + * Creates or finds a Cancel from its string representation. + * + * @param name a name to look for. + * @return the corresponding Cancel. + */ + public static Cancel fromString(String name) { + return fromString(name, Cancel.class); + } + + /** + * Gets known Cancel values. + * + * @return known Cancel values. + */ + public static Collection values() { + return values(Cancel.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CancelEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CancelEnum.java deleted file mode 100644 index c1b2def21624..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CancelEnum.java +++ /dev/null @@ -1,51 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * To trigger cancel for entire migration we need to send this flag as True. - */ -public final class CancelEnum extends ExpandableStringEnum { - /** - * Static value True for CancelEnum. - */ - public static final CancelEnum TRUE = fromString("True"); - - /** - * Static value False for CancelEnum. - */ - public static final CancelEnum FALSE = fromString("False"); - - /** - * Creates a new instance of CancelEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CancelEnum() { - } - - /** - * Creates or finds a CancelEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding CancelEnum. - */ - public static CancelEnum fromString(String name) { - return fromString(name, CancelEnum.class); - } - - /** - * Gets known CancelEnum values. - * - * @return known CancelEnum values. - */ - public static Collection values() { - return values(CancelEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationBasedCapabilities.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByLocations.java similarity index 65% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationBasedCapabilities.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByLocations.java index 12ec9499b653..52fffe0886b8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationBasedCapabilities.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByLocations.java @@ -8,31 +8,31 @@ import com.azure.core.util.Context; /** - * Resource collection API of LocationBasedCapabilities. + * Resource collection API of CapabilitiesByLocations. */ -public interface LocationBasedCapabilities { +public interface CapabilitiesByLocations { /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities at specified location in a given subscription as paginated response with + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with * {@link PagedIterable}. */ - PagedIterable execute(String locationName); + PagedIterable list(String locationName); /** - * Get capabilities at specified location in a given subscription. + * Lists the capabilities available in a given location for a specific subscription. * * @param locationName The name of the location. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities at specified location in a given subscription as paginated response with + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with * {@link PagedIterable}. */ - PagedIterable execute(String locationName, Context context); + PagedIterable list(String locationName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerCapabilities.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByServers.java similarity index 65% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerCapabilities.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByServers.java index 94060ec3d557..afdf060d82f6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerCapabilities.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByServers.java @@ -8,23 +8,24 @@ import com.azure.core.util.Context; /** - * Resource collection API of ServerCapabilities. + * Resource collection API of CapabilitiesByServers. */ -public interface ServerCapabilities { +public interface CapabilitiesByServers { /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities for a flexible server as paginated response with {@link PagedIterable}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String serverName); + PagedIterable list(String resourceGroupName, String serverName); /** - * Get capabilities for a flexible server. + * Lists the capabilities available for a given server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -32,7 +33,8 @@ public interface ServerCapabilities { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return capabilities for a flexible server as paginated response with {@link PagedIterable}. + * @return list of capabilities for the Azure Database for PostgreSQL flexible server as paginated response with + * {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String serverName, Context context); + PagedIterable list(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Capability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Capability.java new file mode 100644 index 000000000000..ed641fac11a3 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Capability.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; +import java.util.List; + +/** + * An immutable client-side representation of Capability. + */ +public interface Capability { + /** + * Gets the status property: The status of the capability. + * + * @return the status value. + */ + CapabilityStatus status(); + + /** + * Gets the reason property: The reason for the capability not being available. + * + * @return the reason value. + */ + String reason(); + + /** + * Gets the name property: Name of flexible servers capabilities. + * + * @return the name value. + */ + String name(); + + /** + * Gets the supportedServerEditions property: List of supported compute tiers. + * + * @return the supportedServerEditions value. + */ + List supportedServerEditions(); + + /** + * Gets the supportedServerVersions property: List of supported major versions of PostgreSQL database engine. + * + * @return the supportedServerVersions value. + */ + List supportedServerVersions(); + + /** + * Gets the supportedFeatures property: Features supported. + * + * @return the supportedFeatures value. + */ + List supportedFeatures(); + + /** + * Gets the fastProvisioningSupported property: Indicates if fast provisioning is supported. 'Enabled' means fast + * provisioning is supported. 'Disabled' stands for fast provisioning is not supported. Will be deprecated in the + * future. Look to Supported Features for 'FastProvisioning'. + * + * @return the fastProvisioningSupported value. + */ + FastProvisioningSupport fastProvisioningSupported(); + + /** + * Gets the supportedFastProvisioningEditions property: List of compute tiers supporting fast provisioning. + * + * @return the supportedFastProvisioningEditions value. + */ + List supportedFastProvisioningEditions(); + + /** + * Gets the geoBackupSupported property: Indicates if geographically redundant backups are supported in this + * location. 'Enabled' means geographically redundant backups are supported. 'Disabled' stands for geographically + * redundant backup is not supported. Will be deprecated in the future. Look to Supported Features for 'GeoBackup'. + * + * @return the geoBackupSupported value. + */ + GeographicallyRedundantBackupSupport geoBackupSupported(); + + /** + * Gets the zoneRedundantHaSupported property: Indicates if high availability with zone redundancy is supported in + * this location. 'Enabled' means high availability with zone redundancy is supported. 'Disabled' stands for high + * availability with zone redundancy is not supported. Will be deprecated in the future. Look to Supported Features + * for 'ZoneRedundantHa'. + * + * @return the zoneRedundantHaSupported value. + */ + ZoneRedundantHighAvailabilitySupport zoneRedundantHaSupported(); + + /** + * Gets the zoneRedundantHaAndGeoBackupSupported property: Indicates if high availability with zone redundancy is + * supported in conjunction with geographically redundant backups in this location. 'Enabled' means high + * availability with zone redundancy is supported in conjunction with geographically redundant backups is supported. + * 'Disabled' stands for high availability with zone redundancy is supported in conjunction with geographically + * redundant backups is not supported. Will be deprecated in the future. Look to Supported Features for + * 'ZoneRedundantHaAndGeoBackup'. + * + * @return the zoneRedundantHaAndGeoBackupSupported value. + */ + ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport zoneRedundantHaAndGeoBackupSupported(); + + /** + * Gets the storageAutoGrowthSupported property: Indicates if storage autogrow is supported in this location. + * 'Enabled' means storage autogrow is supported. 'Disabled' stands for storage autogrow is not supported. Will be + * deprecated in the future. Look to Supported Features for 'StorageAutoGrowth'. + * + * @return the storageAutoGrowthSupported value. + */ + StorageAutoGrowthSupport storageAutoGrowthSupported(); + + /** + * Gets the onlineResizeSupported property: Indicates if resizing the storage, without interrupting the operation of + * the database engine, is supported in this location for the given subscription. 'Enabled' means resizing the + * storage without interrupting the operation of the database engine is supported. 'Disabled' means resizing the + * storage without interrupting the operation of the database engine is not supported. Will be deprecated in the + * future. Look to Supported Features for 'OnlineResize'. + * + * @return the onlineResizeSupported value. + */ + OnlineStorageResizeSupport onlineResizeSupported(); + + /** + * Gets the restricted property: Indicates if this location is restricted. 'Enabled' means location is restricted. + * 'Disabled' stands for location is not restricted. Will be deprecated in the future. Look to Supported Features + * for 'Restricted'. + * + * @return the restricted value. + */ + LocationRestricted restricted(); + + /** + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner object. + * + * @return the inner object. + */ + CapabilityInner innerModel(); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityList.java similarity index 55% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityList.java index 8f86d5a9706e..d2232f3a41c1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityList.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; import java.io.IOException; import java.util.List; /** - * Capability for the PostgreSQL server. + * List of capabilities for the Azure Database for PostgreSQL flexible server. */ -@Immutable -public final class CapabilitiesListResult implements JsonSerializable { +@Fluent +public final class CapabilityList implements JsonSerializable { /* - * A list of supported capabilities. + * List of supported capabilities. */ - private List value; + private List value; /* * Link to retrieve next page of results. @@ -29,17 +29,17 @@ public final class CapabilitiesListResult implements JsonSerializable value() { + public List value() { return this.value; } @@ -52,6 +52,17 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: Link to retrieve next page of results. + * + * @param nextLink the nextLink value to set. + * @return the CapabilityList object itself. + */ + public CapabilityList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + /** * Validates the instance. * @@ -69,36 +80,36 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } /** - * Reads an instance of CapabilitiesListResult from the JsonReader. + * Reads an instance of CapabilityList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of CapabilitiesListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the CapabilitiesListResult. + * @return An instance of CapabilityList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the CapabilityList. */ - public static CapabilitiesListResult fromJson(JsonReader jsonReader) throws IOException { + public static CapabilityList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - CapabilitiesListResult deserializedCapabilitiesListResult = new CapabilitiesListResult(); + CapabilityList deserializedCapabilityList = new CapabilityList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> FlexibleServerCapabilityInner.fromJson(reader1)); - deserializedCapabilitiesListResult.value = value; + List value = reader.readArray(reader1 -> CapabilityInner.fromJson(reader1)); + deserializedCapabilityList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedCapabilitiesListResult.nextLink = reader.getString(); + deserializedCapabilityList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedCapabilitiesListResult; + return deserializedCapabilityList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFile.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLog.java similarity index 80% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFile.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLog.java index a317263b0da7..682b8d97e9d9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFile.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLog.java @@ -5,13 +5,13 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LogFileInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; import java.time.OffsetDateTime; /** - * An immutable client-side representation of LogFile. + * An immutable client-side representation of CapturedLog. */ -public interface LogFile { +public interface CapturedLog { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -55,30 +55,30 @@ public interface LogFile { OffsetDateTime lastModifiedTime(); /** - * Gets the sizeInKb property: The size in kb of the logFile. + * Gets the sizeInKb property: Size (in KB) of the log file. * * @return the sizeInKb value. */ Long sizeInKb(); /** - * Gets the typePropertiesType property: Type of the log file. + * Gets the typePropertiesType property: Type of log file. Can be 'ServerLogs' or 'UpgradeLogs'. * * @return the typePropertiesType value. */ String typePropertiesType(); /** - * Gets the url property: The url to download the log file from. + * Gets the url property: URL to download the log file from. * * @return the url value. */ String url(); /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LogFileInner object. + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner object. * * @return the inner object. */ - LogFileInner innerModel(); + CapturedLogInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogList.java new file mode 100644 index 000000000000..94da97e002e2 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogList.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; +import java.io.IOException; +import java.util.List; + +/** + * List of log files. + */ +@Fluent +public final class CapturedLogList implements JsonSerializable { + /* + * List of log files in a server. + */ + private List value; + + /* + * Link used to get the next page of results. + */ + private String nextLink; + + /** + * Creates an instance of CapturedLogList class. + */ + public CapturedLogList() { + } + + /** + * Get the value property: List of log files in a server. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of log files in a server. + * + * @param value the value value to set. + * @return the CapturedLogList object itself. + */ + public CapturedLogList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link used to get the next page of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Link used to get the next page of results. + * + * @param nextLink the nextLink value to set. + * @return the CapturedLogList object itself. + */ + public CapturedLogList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CapturedLogList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CapturedLogList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the CapturedLogList. + */ + public static CapturedLogList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CapturedLogList deserializedCapturedLogList = new CapturedLogList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> CapturedLogInner.fromJson(reader1)); + deserializedCapturedLogList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedCapturedLogList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCapturedLogList; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFiles.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogs.java similarity index 70% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFiles.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogs.java index a26f1079e95a..817f9765a62a 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFiles.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogs.java @@ -8,23 +8,23 @@ import com.azure.core.util.Context; /** - * Resource collection API of LogFiles. + * Resource collection API of CapturedLogs. */ -public interface LogFiles { +public interface CapturedLogs { /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of logFiles as paginated response with {@link PagedIterable}. + * @return list of log files as paginated response with {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the server log files in a given server. + * Lists all captured logs for download in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -32,7 +32,7 @@ public interface LogFiles { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of logFiles as paginated response with {@link PagedIterable}. + * @return list of log files as paginated response with {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilities.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilities.java deleted file mode 100644 index 9b3018941463..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilities.java +++ /dev/null @@ -1,37 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of CheckNameAvailabilities. - */ -public interface CheckNameAvailabilities { - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability along with {@link Response}. - */ - Response executeWithResponse(CheckNameAvailabilityRequest nameAvailabilityRequest, - Context context); - - /** - * Check the availability of name for resource. - * - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability. - */ - NameAvailability execute(CheckNameAvailabilityRequest nameAvailabilityRequest); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityWithLocations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityWithLocations.java deleted file mode 100644 index b8fec0370571..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityWithLocations.java +++ /dev/null @@ -1,39 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of CheckNameAvailabilityWithLocations. - */ -public interface CheckNameAvailabilityWithLocations { - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability along with {@link Response}. - */ - Response executeWithResponse(String locationName, - CheckNameAvailabilityRequest nameAvailabilityRequest, Context context); - - /** - * Check the availability of name for resource. - * - * @param locationName The name of the location. - * @param nameAvailabilityRequest The required parameters for checking if resource name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability. - */ - NameAvailability execute(String locationName, CheckNameAvailabilityRequest nameAvailabilityRequest); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cluster.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cluster.java index 0880429954b4..e13ae5c683d0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cluster.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cluster.java @@ -17,10 +17,15 @@ @Fluent public final class Cluster implements JsonSerializable { /* - * The node count for the cluster. + * Number of nodes assigned to the elastic cluster. */ private Integer clusterSize; + /* + * Default database name for the elastic cluster. + */ + private String defaultDatabaseName; + /** * Creates an instance of Cluster class. */ @@ -28,7 +33,7 @@ public Cluster() { } /** - * Get the clusterSize property: The node count for the cluster. + * Get the clusterSize property: Number of nodes assigned to the elastic cluster. * * @return the clusterSize value. */ @@ -37,7 +42,7 @@ public Integer clusterSize() { } /** - * Set the clusterSize property: The node count for the cluster. + * Set the clusterSize property: Number of nodes assigned to the elastic cluster. * * @param clusterSize the clusterSize value to set. * @return the Cluster object itself. @@ -47,6 +52,26 @@ public Cluster withClusterSize(Integer clusterSize) { return this; } + /** + * Get the defaultDatabaseName property: Default database name for the elastic cluster. + * + * @return the defaultDatabaseName value. + */ + public String defaultDatabaseName() { + return this.defaultDatabaseName; + } + + /** + * Set the defaultDatabaseName property: Default database name for the elastic cluster. + * + * @param defaultDatabaseName the defaultDatabaseName value to set. + * @return the Cluster object itself. + */ + public Cluster withDefaultDatabaseName(String defaultDatabaseName) { + this.defaultDatabaseName = defaultDatabaseName; + return this; + } + /** * Validates the instance. * @@ -62,6 +87,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeNumberField("clusterSize", this.clusterSize); + jsonWriter.writeStringField("defaultDatabaseName", this.defaultDatabaseName); return jsonWriter.writeEndObject(); } @@ -82,6 +108,8 @@ public static Cluster fromJson(JsonReader jsonReader) throws IOException { if ("clusterSize".equals(fieldName)) { deserializedCluster.clusterSize = reader.getNullable(JsonReader::getInt); + } else if ("defaultDatabaseName".equals(fieldName)) { + deserializedCluster.defaultDatabaseName = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigTuningRequestParameter.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigTuningRequestParameter.java deleted file mode 100644 index f1593d8696b4..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigTuningRequestParameter.java +++ /dev/null @@ -1,179 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Config tuning request parameters. - */ -@Fluent -public final class ConfigTuningRequestParameter implements JsonSerializable { - /* - * The name of server. - */ - private String serverName; - - /* - * Indicates whether PG should be restarted during a tuning session. - */ - private Boolean allowServerRestarts; - - /* - * The target metric the tuning session is trying to improve. - */ - private String targetImprovementMetric; - - /* - * The mode with which the feature will be enabled. - */ - private Boolean configTuningUsageMode; - - /** - * Creates an instance of ConfigTuningRequestParameter class. - */ - public ConfigTuningRequestParameter() { - } - - /** - * Get the serverName property: The name of server. - * - * @return the serverName value. - */ - public String serverName() { - return this.serverName; - } - - /** - * Set the serverName property: The name of server. - * - * @param serverName the serverName value to set. - * @return the ConfigTuningRequestParameter object itself. - */ - public ConfigTuningRequestParameter withServerName(String serverName) { - this.serverName = serverName; - return this; - } - - /** - * Get the allowServerRestarts property: Indicates whether PG should be restarted during a tuning session. - * - * @return the allowServerRestarts value. - */ - public Boolean allowServerRestarts() { - return this.allowServerRestarts; - } - - /** - * Set the allowServerRestarts property: Indicates whether PG should be restarted during a tuning session. - * - * @param allowServerRestarts the allowServerRestarts value to set. - * @return the ConfigTuningRequestParameter object itself. - */ - public ConfigTuningRequestParameter withAllowServerRestarts(Boolean allowServerRestarts) { - this.allowServerRestarts = allowServerRestarts; - return this; - } - - /** - * Get the targetImprovementMetric property: The target metric the tuning session is trying to improve. - * - * @return the targetImprovementMetric value. - */ - public String targetImprovementMetric() { - return this.targetImprovementMetric; - } - - /** - * Set the targetImprovementMetric property: The target metric the tuning session is trying to improve. - * - * @param targetImprovementMetric the targetImprovementMetric value to set. - * @return the ConfigTuningRequestParameter object itself. - */ - public ConfigTuningRequestParameter withTargetImprovementMetric(String targetImprovementMetric) { - this.targetImprovementMetric = targetImprovementMetric; - return this; - } - - /** - * Get the configTuningUsageMode property: The mode with which the feature will be enabled. - * - * @return the configTuningUsageMode value. - */ - public Boolean configTuningUsageMode() { - return this.configTuningUsageMode; - } - - /** - * Set the configTuningUsageMode property: The mode with which the feature will be enabled. - * - * @param configTuningUsageMode the configTuningUsageMode value to set. - * @return the ConfigTuningRequestParameter object itself. - */ - public ConfigTuningRequestParameter withConfigTuningUsageMode(Boolean configTuningUsageMode) { - this.configTuningUsageMode = configTuningUsageMode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("serverName", this.serverName); - jsonWriter.writeBooleanField("allowServerRestarts", this.allowServerRestarts); - jsonWriter.writeStringField("targetImprovementMetric", this.targetImprovementMetric); - jsonWriter.writeBooleanField("configTuningUsageMode", this.configTuningUsageMode); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfigTuningRequestParameter from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfigTuningRequestParameter if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConfigTuningRequestParameter. - */ - public static ConfigTuningRequestParameter fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfigTuningRequestParameter deserializedConfigTuningRequestParameter = new ConfigTuningRequestParameter(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serverName".equals(fieldName)) { - deserializedConfigTuningRequestParameter.serverName = reader.getString(); - } else if ("allowServerRestarts".equals(fieldName)) { - deserializedConfigTuningRequestParameter.allowServerRestarts - = reader.getNullable(JsonReader::getBoolean); - } else if ("targetImprovementMetric".equals(fieldName)) { - deserializedConfigTuningRequestParameter.targetImprovementMetric = reader.getString(); - } else if ("configTuningUsageMode".equals(fieldName)) { - deserializedConfigTuningRequestParameter.configTuningUsageMode - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedConfigTuningRequestParameter; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configuration.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configuration.java index e42999bd7e06..29a573d65dca 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configuration.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configuration.java @@ -41,77 +41,85 @@ public interface Configuration { SystemData systemData(); /** - * Gets the value property: Value of the configuration. Required to update the configuration. + * Gets the value property: Value of the configuration (also known as server parameter). Required to update the + * value assigned to a specific modifiable configuration. * * @return the value value. */ String value(); /** - * Gets the description property: Description of the configuration. + * Gets the description property: Description of the configuration (also known as server parameter). * * @return the description value. */ String description(); /** - * Gets the defaultValue property: Default value of the configuration. + * Gets the defaultValue property: Value assigned by default to the configuration (also known as server parameter). * * @return the defaultValue value. */ String defaultValue(); /** - * Gets the dataType property: Data type of the configuration. + * Gets the dataType property: Data type of the configuration (also known as server parameter). * * @return the dataType value. */ ConfigurationDataType dataType(); /** - * Gets the allowedValues property: Allowed values of the configuration. + * Gets the allowedValues property: Allowed values of the configuration (also known as server parameter). * * @return the allowedValues value. */ String allowedValues(); /** - * Gets the source property: Source of the configuration. Required to update the configuration. + * Gets the source property: Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * * @return the source value. */ String source(); /** - * Gets the isDynamicConfig property: Configuration dynamic or static. + * Gets the isDynamicConfig property: Indicates if it's a dynamic (true) or static (false) configuration (also known + * as server parameter). Static server parameters require a server restart after changing the value assigned to + * them, for the change to take effect. Dynamic server parameters do not require a server restart after changing the + * value assigned to them, for the change to take effect. * * @return the isDynamicConfig value. */ Boolean isDynamicConfig(); /** - * Gets the isReadOnly property: Configuration read-only or not. + * Gets the isReadOnly property: Indicates if it's a read-only (true) or modifiable (false) configuration (also + * known as server parameter). * * @return the isReadOnly value. */ Boolean isReadOnly(); /** - * Gets the isConfigPendingRestart property: Configuration is pending restart or not. + * Gets the isConfigPendingRestart property: Indicates if the value assigned to the configuration (also known as + * server parameter) is pending a server restart for it to take effect. * * @return the isConfigPendingRestart value. */ Boolean isConfigPendingRestart(); /** - * Gets the unit property: Configuration unit. + * Gets the unit property: Units in which the configuration (also known as server parameter) value is expressed. * * @return the unit value. */ String unit(); /** - * Gets the documentationLink property: Configuration documentation link. + * Gets the documentationLink property: Link pointing to the documentation of the configuration (also known as + * server parameter). * * @return the documentationLink value. */ @@ -188,9 +196,11 @@ interface WithCreate extends DefinitionStages.WithValue, DefinitionStages.WithSo */ interface WithValue { /** - * Specifies the value property: Value of the configuration. Required to update the configuration.. + * Specifies the value property: Value of the configuration (also known as server parameter). Required to + * update the value assigned to a specific modifiable configuration.. * - * @param value Value of the configuration. Required to update the configuration. + * @param value Value of the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. * @return the next definition stage. */ WithCreate withValue(String value); @@ -201,9 +211,11 @@ interface WithValue { */ interface WithSource { /** - * Specifies the source property: Source of the configuration. Required to update the configuration.. + * Specifies the source property: Source of the value assigned to the configuration (also known as server + * parameter). Required to update the value assigned to a specific modifiable configuration.. * - * @param source Source of the configuration. Required to update the configuration. + * @param source Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * @return the next definition stage. */ WithCreate withSource(String source); @@ -246,9 +258,11 @@ interface UpdateStages { */ interface WithValue { /** - * Specifies the value property: Value of the configuration. Required to update the configuration.. + * Specifies the value property: Value of the configuration (also known as server parameter). Required to + * update the value assigned to a specific modifiable configuration.. * - * @param value Value of the configuration. Required to update the configuration. + * @param value Value of the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. * @return the next definition stage. */ Update withValue(String value); @@ -259,9 +273,11 @@ interface WithValue { */ interface WithSource { /** - * Specifies the source property: Source of the configuration. Required to update the configuration.. + * Specifies the source property: Source of the value assigned to the configuration (also known as server + * parameter). Required to update the value assigned to a specific modifiable configuration.. * - * @param source Source of the configuration. Required to update the configuration. + * @param source Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * @return the next definition stage. */ Update withSource(String source); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationDataType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationDataType.java index c087e8eaaf1b..91772666e312 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationDataType.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationDataType.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Data type of the configuration. + * Data type of the configuration (also known as server parameter). */ public final class ConfigurationDataType extends ExpandableStringEnum { /** @@ -31,6 +31,16 @@ public final class ConfigurationDataType extends ExpandableStringEnum { /* - * The properties of a configuration. + * Properties of a configuration (also known as server parameter). */ private ConfigurationProperties innerProperties; @@ -29,7 +29,7 @@ public ConfigurationForUpdate() { } /** - * Get the innerProperties property: The properties of a configuration. + * Get the innerProperties property: Properties of a configuration (also known as server parameter). * * @return the innerProperties value. */ @@ -38,7 +38,8 @@ private ConfigurationProperties innerProperties() { } /** - * Get the value property: Value of the configuration. Required to update the configuration. + * Get the value property: Value of the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. * * @return the value value. */ @@ -47,7 +48,8 @@ public String value() { } /** - * Set the value property: Value of the configuration. Required to update the configuration. + * Set the value property: Value of the configuration (also known as server parameter). Required to update the value + * assigned to a specific modifiable configuration. * * @param value the value value to set. * @return the ConfigurationForUpdate object itself. @@ -61,7 +63,7 @@ public ConfigurationForUpdate withValue(String value) { } /** - * Get the description property: Description of the configuration. + * Get the description property: Description of the configuration (also known as server parameter). * * @return the description value. */ @@ -70,7 +72,7 @@ public String description() { } /** - * Get the defaultValue property: Default value of the configuration. + * Get the defaultValue property: Value assigned by default to the configuration (also known as server parameter). * * @return the defaultValue value. */ @@ -79,7 +81,7 @@ public String defaultValue() { } /** - * Get the dataType property: Data type of the configuration. + * Get the dataType property: Data type of the configuration (also known as server parameter). * * @return the dataType value. */ @@ -88,7 +90,7 @@ public ConfigurationDataType dataType() { } /** - * Get the allowedValues property: Allowed values of the configuration. + * Get the allowedValues property: Allowed values of the configuration (also known as server parameter). * * @return the allowedValues value. */ @@ -97,7 +99,8 @@ public String allowedValues() { } /** - * Get the source property: Source of the configuration. Required to update the configuration. + * Get the source property: Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * * @return the source value. */ @@ -106,7 +109,8 @@ public String source() { } /** - * Set the source property: Source of the configuration. Required to update the configuration. + * Set the source property: Source of the value assigned to the configuration (also known as server parameter). + * Required to update the value assigned to a specific modifiable configuration. * * @param source the source value to set. * @return the ConfigurationForUpdate object itself. @@ -120,7 +124,10 @@ public ConfigurationForUpdate withSource(String source) { } /** - * Get the isDynamicConfig property: Configuration dynamic or static. + * Get the isDynamicConfig property: Indicates if it's a dynamic (true) or static (false) configuration (also known + * as server parameter). Static server parameters require a server restart after changing the value assigned to + * them, for the change to take effect. Dynamic server parameters do not require a server restart after changing the + * value assigned to them, for the change to take effect. * * @return the isDynamicConfig value. */ @@ -129,7 +136,8 @@ public Boolean isDynamicConfig() { } /** - * Get the isReadOnly property: Configuration read-only or not. + * Get the isReadOnly property: Indicates if it's a read-only (true) or modifiable (false) configuration (also known + * as server parameter). * * @return the isReadOnly value. */ @@ -138,7 +146,8 @@ public Boolean isReadOnly() { } /** - * Get the isConfigPendingRestart property: Configuration is pending restart or not. + * Get the isConfigPendingRestart property: Indicates if the value assigned to the configuration (also known as + * server parameter) is pending a server restart for it to take effect. * * @return the isConfigPendingRestart value. */ @@ -147,7 +156,7 @@ public Boolean isConfigPendingRestart() { } /** - * Get the unit property: Configuration unit. + * Get the unit property: Units in which the configuration (also known as server parameter) value is expressed. * * @return the unit value. */ @@ -156,7 +165,8 @@ public String unit() { } /** - * Get the documentationLink property: Configuration documentation link. + * Get the documentationLink property: Link pointing to the documentation of the configuration (also known as server + * parameter). * * @return the documentationLink value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationList.java similarity index 62% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationList.java index 9061d91ff5f6..58d831e2f356 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationList.java @@ -14,28 +14,28 @@ import java.util.List; /** - * A list of server configurations. + * List of configurations (also known as server parameters). */ @Fluent -public final class ConfigurationListResult implements JsonSerializable { +public final class ConfigurationList implements JsonSerializable { /* - * The list of server configurations. + * List of configurations (also known as server parameters). */ private List value; /* - * The link used to get the next page of operations. + * Link used to get the next page of results. */ private String nextLink; /** - * Creates an instance of ConfigurationListResult class. + * Creates an instance of ConfigurationList class. */ - public ConfigurationListResult() { + public ConfigurationList() { } /** - * Get the value property: The list of server configurations. + * Get the value property: List of configurations (also known as server parameters). * * @return the value value. */ @@ -44,18 +44,18 @@ public List value() { } /** - * Set the value property: The list of server configurations. + * Set the value property: List of configurations (also known as server parameters). * * @param value the value value to set. - * @return the ConfigurationListResult object itself. + * @return the ConfigurationList object itself. */ - public ConfigurationListResult withValue(List value) { + public ConfigurationList withValue(List value) { this.value = value; return this; } /** - * Get the nextLink property: The link used to get the next page of operations. + * Get the nextLink property: Link used to get the next page of results. * * @return the nextLink value. */ @@ -64,12 +64,12 @@ public String nextLink() { } /** - * Set the nextLink property: The link used to get the next page of operations. + * Set the nextLink property: Link used to get the next page of results. * * @param nextLink the nextLink value to set. - * @return the ConfigurationListResult object itself. + * @return the ConfigurationList object itself. */ - public ConfigurationListResult withNextLink(String nextLink) { + public ConfigurationList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } @@ -97,31 +97,31 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ConfigurationListResult from the JsonReader. + * Reads an instance of ConfigurationList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ConfigurationListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConfigurationListResult. + * @return An instance of ConfigurationList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ConfigurationList. */ - public static ConfigurationListResult fromJson(JsonReader jsonReader) throws IOException { + public static ConfigurationList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ConfigurationListResult deserializedConfigurationListResult = new ConfigurationListResult(); + ConfigurationList deserializedConfigurationList = new ConfigurationList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ConfigurationInner.fromJson(reader1)); - deserializedConfigurationListResult.value = value; + deserializedConfigurationList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedConfigurationListResult.nextLink = reader.getString(); + deserializedConfigurationList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedConfigurationListResult; + return deserializedConfigurationList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configurations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configurations.java index 68bb82ad44c8..2e3ac07e6195 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configurations.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configurations.java @@ -13,19 +13,20 @@ */ public interface Configurations { /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server configurations as paginated response with {@link PagedIterable}. + * @return list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the configurations in a given server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -33,58 +34,62 @@ public interface Configurations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server configurations as paginated response with {@link PagedIterable}. + * @return list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server parameter). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server along with {@link Response}. + * @return information about a specific configuration (also known as server parameter) of a server along with + * {@link Response}. */ Response getWithResponse(String resourceGroupName, String serverName, String configurationName, Context context); /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName The name of the server configuration. + * @param configurationName Name of the configuration (also known as server parameter). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server. + * @return information about a specific configuration (also known as server parameter) of a server. */ Configuration get(String resourceGroupName, String serverName, String configurationName); /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server along with {@link Response}. + * @return information about a specific configuration (also known as server parameter) of a server along with + * {@link Response}. */ Configuration getById(String id); /** - * Gets information about a configuration of server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server along with {@link Response}. + * @return information about a specific configuration (also known as server parameter) of a server along with + * {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateMode.java index 770389ec932d..86d4e2b952a6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateMode.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateMode.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The mode to create a new PostgreSQL server. + * Creation mode of a new server. */ public final class CreateMode extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForPatch.java new file mode 100644 index 000000000000..e4f8900c9494 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForPatch.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Update mode of an existing server. + */ +public final class CreateModeForPatch extends ExpandableStringEnum { + /** + * Static value Default for CreateModeForPatch. + */ + public static final CreateModeForPatch DEFAULT = fromString("Default"); + + /** + * Static value Update for CreateModeForPatch. + */ + public static final CreateModeForPatch UPDATE = fromString("Update"); + + /** + * Creates a new instance of CreateModeForPatch value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CreateModeForPatch() { + } + + /** + * Creates or finds a CreateModeForPatch from its string representation. + * + * @param name a name to look for. + * @return the corresponding CreateModeForPatch. + */ + public static CreateModeForPatch fromString(String name) { + return fromString(name, CreateModeForPatch.class); + } + + /** + * Gets known CreateModeForPatch values. + * + * @return known CreateModeForPatch values. + */ + public static Collection values() { + return values(CreateModeForPatch.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForUpdate.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForUpdate.java deleted file mode 100644 index 10f4cee8d765..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForUpdate.java +++ /dev/null @@ -1,51 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The mode to update a new PostgreSQL server. - */ -public final class CreateModeForUpdate extends ExpandableStringEnum { - /** - * Static value Default for CreateModeForUpdate. - */ - public static final CreateModeForUpdate DEFAULT = fromString("Default"); - - /** - * Static value Update for CreateModeForUpdate. - */ - public static final CreateModeForUpdate UPDATE = fromString("Update"); - - /** - * Creates a new instance of CreateModeForUpdate value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CreateModeForUpdate() { - } - - /** - * Creates or finds a CreateModeForUpdate from its string representation. - * - * @param name a name to look for. - * @return the corresponding CreateModeForUpdate. - */ - public static CreateModeForUpdate fromString(String name) { - return fromString(name, CreateModeForUpdate.class); - } - - /** - * Gets known CreateModeForUpdate values. - * - * @return known CreateModeForUpdate values. - */ - public static Collection values() { - return values(CreateModeForUpdate.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryption.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryption.java index 5d5a95ba3a02..1819c5f98ca7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryption.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryption.java @@ -17,39 +17,47 @@ @Fluent public final class DataEncryption implements JsonSerializable { /* - * URI for the key in keyvault for data encryption of the primary server. + * URI of the key in Azure Key Vault used for data encryption of the primary storage associated to a server. */ private String primaryKeyUri; /* - * Resource Id for the User assigned identity to be used for data encryption of the primary server. + * Identifier of the user assigned managed identity used to access the key in Azure Key Vault for data encryption of + * the primary storage associated to a server. */ private String primaryUserAssignedIdentityId; /* - * URI for the key in keyvault for data encryption for geo-backup of server. + * Identifier of the user assigned managed identity used to access the key in Azure Key Vault for data encryption of + * the geographically redundant storage associated to a server that is configured to support geographically + * redundant backups. */ private String geoBackupKeyUri; /* - * Resource Id for the User assigned identity to be used for data encryption for geo-backup of server. + * Identifier of the user assigned managed identity used to access the key in Azure Key Vault for data encryption of + * the geographically redundant storage associated to a server that is configured to support geographically + * redundant backups. */ private String geoBackupUserAssignedIdentityId; /* - * Data encryption type to depict if it is System Managed vs Azure Key vault. + * Data encryption type used by a server. */ - private ArmServerKeyType type; + private DataEncryptionType type; /* - * Primary encryption key status for Data encryption enabled server. + * Status of key used by a server configured with data encryption based on customer managed key, to encrypt the + * primary storage associated to the server. */ - private KeyStatusEnum primaryEncryptionKeyStatus; + private EncryptionKeyStatus primaryEncryptionKeyStatus; /* - * Geo-backup encryption key status for Data encryption enabled server. + * Status of key used by a server configured with data encryption based on customer managed key, to encrypt the + * geographically redundant storage associated to the server when it is configured to support geographically + * redundant backups. */ - private KeyStatusEnum geoBackupEncryptionKeyStatus; + private EncryptionKeyStatus geoBackupEncryptionKeyStatus; /** * Creates an instance of DataEncryption class. @@ -58,7 +66,8 @@ public DataEncryption() { } /** - * Get the primaryKeyUri property: URI for the key in keyvault for data encryption of the primary server. + * Get the primaryKeyUri property: URI of the key in Azure Key Vault used for data encryption of the primary storage + * associated to a server. * * @return the primaryKeyUri value. */ @@ -67,7 +76,8 @@ public String primaryKeyUri() { } /** - * Set the primaryKeyUri property: URI for the key in keyvault for data encryption of the primary server. + * Set the primaryKeyUri property: URI of the key in Azure Key Vault used for data encryption of the primary storage + * associated to a server. * * @param primaryKeyUri the primaryKeyUri value to set. * @return the DataEncryption object itself. @@ -78,8 +88,8 @@ public DataEncryption withPrimaryKeyUri(String primaryKeyUri) { } /** - * Get the primaryUserAssignedIdentityId property: Resource Id for the User assigned identity to be used for data - * encryption of the primary server. + * Get the primaryUserAssignedIdentityId property: Identifier of the user assigned managed identity used to access + * the key in Azure Key Vault for data encryption of the primary storage associated to a server. * * @return the primaryUserAssignedIdentityId value. */ @@ -88,8 +98,8 @@ public String primaryUserAssignedIdentityId() { } /** - * Set the primaryUserAssignedIdentityId property: Resource Id for the User assigned identity to be used for data - * encryption of the primary server. + * Set the primaryUserAssignedIdentityId property: Identifier of the user assigned managed identity used to access + * the key in Azure Key Vault for data encryption of the primary storage associated to a server. * * @param primaryUserAssignedIdentityId the primaryUserAssignedIdentityId value to set. * @return the DataEncryption object itself. @@ -100,7 +110,9 @@ public DataEncryption withPrimaryUserAssignedIdentityId(String primaryUserAssign } /** - * Get the geoBackupKeyUri property: URI for the key in keyvault for data encryption for geo-backup of server. + * Get the geoBackupKeyUri property: Identifier of the user assigned managed identity used to access the key in + * Azure Key Vault for data encryption of the geographically redundant storage associated to a server that is + * configured to support geographically redundant backups. * * @return the geoBackupKeyUri value. */ @@ -109,7 +121,9 @@ public String geoBackupKeyUri() { } /** - * Set the geoBackupKeyUri property: URI for the key in keyvault for data encryption for geo-backup of server. + * Set the geoBackupKeyUri property: Identifier of the user assigned managed identity used to access the key in + * Azure Key Vault for data encryption of the geographically redundant storage associated to a server that is + * configured to support geographically redundant backups. * * @param geoBackupKeyUri the geoBackupKeyUri value to set. * @return the DataEncryption object itself. @@ -120,8 +134,9 @@ public DataEncryption withGeoBackupKeyUri(String geoBackupKeyUri) { } /** - * Get the geoBackupUserAssignedIdentityId property: Resource Id for the User assigned identity to be used for data - * encryption for geo-backup of server. + * Get the geoBackupUserAssignedIdentityId property: Identifier of the user assigned managed identity used to access + * the key in Azure Key Vault for data encryption of the geographically redundant storage associated to a server + * that is configured to support geographically redundant backups. * * @return the geoBackupUserAssignedIdentityId value. */ @@ -130,8 +145,9 @@ public String geoBackupUserAssignedIdentityId() { } /** - * Set the geoBackupUserAssignedIdentityId property: Resource Id for the User assigned identity to be used for data - * encryption for geo-backup of server. + * Set the geoBackupUserAssignedIdentityId property: Identifier of the user assigned managed identity used to access + * the key in Azure Key Vault for data encryption of the geographically redundant storage associated to a server + * that is configured to support geographically redundant backups. * * @param geoBackupUserAssignedIdentityId the geoBackupUserAssignedIdentityId value to set. * @return the DataEncryption object itself. @@ -142,63 +158,67 @@ public DataEncryption withGeoBackupUserAssignedIdentityId(String geoBackupUserAs } /** - * Get the type property: Data encryption type to depict if it is System Managed vs Azure Key vault. + * Get the type property: Data encryption type used by a server. * * @return the type value. */ - public ArmServerKeyType type() { + public DataEncryptionType type() { return this.type; } /** - * Set the type property: Data encryption type to depict if it is System Managed vs Azure Key vault. + * Set the type property: Data encryption type used by a server. * * @param type the type value to set. * @return the DataEncryption object itself. */ - public DataEncryption withType(ArmServerKeyType type) { + public DataEncryption withType(DataEncryptionType type) { this.type = type; return this; } /** - * Get the primaryEncryptionKeyStatus property: Primary encryption key status for Data encryption enabled server. + * Get the primaryEncryptionKeyStatus property: Status of key used by a server configured with data encryption based + * on customer managed key, to encrypt the primary storage associated to the server. * * @return the primaryEncryptionKeyStatus value. */ - public KeyStatusEnum primaryEncryptionKeyStatus() { + public EncryptionKeyStatus primaryEncryptionKeyStatus() { return this.primaryEncryptionKeyStatus; } /** - * Set the primaryEncryptionKeyStatus property: Primary encryption key status for Data encryption enabled server. + * Set the primaryEncryptionKeyStatus property: Status of key used by a server configured with data encryption based + * on customer managed key, to encrypt the primary storage associated to the server. * * @param primaryEncryptionKeyStatus the primaryEncryptionKeyStatus value to set. * @return the DataEncryption object itself. */ - public DataEncryption withPrimaryEncryptionKeyStatus(KeyStatusEnum primaryEncryptionKeyStatus) { + public DataEncryption withPrimaryEncryptionKeyStatus(EncryptionKeyStatus primaryEncryptionKeyStatus) { this.primaryEncryptionKeyStatus = primaryEncryptionKeyStatus; return this; } /** - * Get the geoBackupEncryptionKeyStatus property: Geo-backup encryption key status for Data encryption enabled - * server. + * Get the geoBackupEncryptionKeyStatus property: Status of key used by a server configured with data encryption + * based on customer managed key, to encrypt the geographically redundant storage associated to the server when it + * is configured to support geographically redundant backups. * * @return the geoBackupEncryptionKeyStatus value. */ - public KeyStatusEnum geoBackupEncryptionKeyStatus() { + public EncryptionKeyStatus geoBackupEncryptionKeyStatus() { return this.geoBackupEncryptionKeyStatus; } /** - * Set the geoBackupEncryptionKeyStatus property: Geo-backup encryption key status for Data encryption enabled - * server. + * Set the geoBackupEncryptionKeyStatus property: Status of key used by a server configured with data encryption + * based on customer managed key, to encrypt the geographically redundant storage associated to the server when it + * is configured to support geographically redundant backups. * * @param geoBackupEncryptionKeyStatus the geoBackupEncryptionKeyStatus value to set. * @return the DataEncryption object itself. */ - public DataEncryption withGeoBackupEncryptionKeyStatus(KeyStatusEnum geoBackupEncryptionKeyStatus) { + public DataEncryption withGeoBackupEncryptionKeyStatus(EncryptionKeyStatus geoBackupEncryptionKeyStatus) { this.geoBackupEncryptionKeyStatus = geoBackupEncryptionKeyStatus; return this; } @@ -253,13 +273,13 @@ public static DataEncryption fromJson(JsonReader jsonReader) throws IOException } else if ("geoBackupUserAssignedIdentityId".equals(fieldName)) { deserializedDataEncryption.geoBackupUserAssignedIdentityId = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedDataEncryption.type = ArmServerKeyType.fromString(reader.getString()); + deserializedDataEncryption.type = DataEncryptionType.fromString(reader.getString()); } else if ("primaryEncryptionKeyStatus".equals(fieldName)) { deserializedDataEncryption.primaryEncryptionKeyStatus - = KeyStatusEnum.fromString(reader.getString()); + = EncryptionKeyStatus.fromString(reader.getString()); } else if ("geoBackupEncryptionKeyStatus".equals(fieldName)) { deserializedDataEncryption.geoBackupEncryptionKeyStatus - = KeyStatusEnum.fromString(reader.getString()); + = EncryptionKeyStatus.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryptionType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryptionType.java new file mode 100644 index 000000000000..a5c1f42511f1 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryptionType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Data encryption type used by a server. + */ +public final class DataEncryptionType extends ExpandableStringEnum { + /** + * Static value SystemManaged for DataEncryptionType. + */ + public static final DataEncryptionType SYSTEM_MANAGED = fromString("SystemManaged"); + + /** + * Static value AzureKeyVault for DataEncryptionType. + */ + public static final DataEncryptionType AZURE_KEY_VAULT = fromString("AzureKeyVault"); + + /** + * Creates a new instance of DataEncryptionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataEncryptionType() { + } + + /** + * Creates or finds a DataEncryptionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataEncryptionType. + */ + public static DataEncryptionType fromString(String name) { + return fromString(name, DataEncryptionType.class); + } + + /** + * Gets known DataEncryptionType values. + * + * @return known DataEncryptionType values. + */ + public static Collection values() { + return values(DataEncryptionType.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Database.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Database.java index c8a68deaec30..a0cc89c4271d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Database.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Database.java @@ -41,14 +41,14 @@ public interface Database { SystemData systemData(); /** - * Gets the charset property: The charset of the database. + * Gets the charset property: Character set of the database. * * @return the charset value. */ String charset(); /** - * Gets the collation property: The collation of the database. + * Gets the collation property: Collation of the database. * * @return the collation value. */ @@ -118,9 +118,9 @@ interface WithCreate extends DefinitionStages.WithCharset, DefinitionStages.With */ interface WithCharset { /** - * Specifies the charset property: The charset of the database.. + * Specifies the charset property: Character set of the database.. * - * @param charset The charset of the database. + * @param charset Character set of the database. * @return the next definition stage. */ WithCreate withCharset(String charset); @@ -131,9 +131,9 @@ interface WithCharset { */ interface WithCollation { /** - * Specifies the collation property: The collation of the database.. + * Specifies the collation property: Collation of the database.. * - * @param collation The collation of the database. + * @param collation Collation of the database. * @return the next definition stage. */ WithCreate withCollation(String collation); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseList.java similarity index 63% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseList.java index 75079602812b..7bde8bee07fc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseList.java @@ -14,28 +14,28 @@ import java.util.List; /** - * A List of databases. + * List of all databases in a server. */ @Fluent -public final class DatabaseListResult implements JsonSerializable { +public final class DatabaseList implements JsonSerializable { /* - * The list of databases housed in a server + * List of all databases in a server. */ private List value; /* - * The link used to get the next page of databases. + * Link used to get the next page of results. */ private String nextLink; /** - * Creates an instance of DatabaseListResult class. + * Creates an instance of DatabaseList class. */ - public DatabaseListResult() { + public DatabaseList() { } /** - * Get the value property: The list of databases housed in a server. + * Get the value property: List of all databases in a server. * * @return the value value. */ @@ -44,18 +44,18 @@ public List value() { } /** - * Set the value property: The list of databases housed in a server. + * Set the value property: List of all databases in a server. * * @param value the value value to set. - * @return the DatabaseListResult object itself. + * @return the DatabaseList object itself. */ - public DatabaseListResult withValue(List value) { + public DatabaseList withValue(List value) { this.value = value; return this; } /** - * Get the nextLink property: The link used to get the next page of databases. + * Get the nextLink property: Link used to get the next page of results. * * @return the nextLink value. */ @@ -64,12 +64,12 @@ public String nextLink() { } /** - * Set the nextLink property: The link used to get the next page of databases. + * Set the nextLink property: Link used to get the next page of results. * * @param nextLink the nextLink value to set. - * @return the DatabaseListResult object itself. + * @return the DatabaseList object itself. */ - public DatabaseListResult withNextLink(String nextLink) { + public DatabaseList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } @@ -97,31 +97,31 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of DatabaseListResult from the JsonReader. + * Reads an instance of DatabaseList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of DatabaseListResult if the JsonReader was pointing to an instance of it, or null if it was + * @return An instance of DatabaseList if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IOException If an error occurs while reading the DatabaseListResult. + * @throws IOException If an error occurs while reading the DatabaseList. */ - public static DatabaseListResult fromJson(JsonReader jsonReader) throws IOException { + public static DatabaseList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - DatabaseListResult deserializedDatabaseListResult = new DatabaseListResult(); + DatabaseList deserializedDatabaseList = new DatabaseList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> DatabaseInner.fromJson(reader1)); - deserializedDatabaseListResult.value = value; + deserializedDatabaseList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedDatabaseListResult.nextLink = reader.getString(); + deserializedDatabaseList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedDatabaseListResult; + return deserializedDatabaseList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbMigrationStatus.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseMigrationState.java similarity index 60% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbMigrationStatus.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseMigrationState.java index f12d8f8a8cf7..3c3e363e5cff 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbMigrationStatus.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseMigrationState.java @@ -15,98 +15,98 @@ import java.time.format.DateTimeFormatter; /** - * Migration status of an individual database. + * Migration state of a database. */ @Fluent -public final class DbMigrationStatus implements JsonSerializable { +public final class DatabaseMigrationState implements JsonSerializable { /* - * Name of the database + * Name of database. */ private String databaseName; /* - * Migration db state of an individual database + * Migration state of a database. */ - private MigrationDbState migrationState; + private MigrationDatabaseState migrationState; /* - * Migration operation of an individual database + * Migration operation of a database. */ private String migrationOperation; /* - * Start date-time of a migration state + * Start time of a migration state. */ private OffsetDateTime startedOn; /* - * End date-time of a migration state + * End time of a migration state. */ private OffsetDateTime endedOn; /* - * Number of tables queued for the migration of a DB + * Number of tables queued for the migration of a database. */ private Integer fullLoadQueuedTables; /* - * Number of tables errored out during the migration of a DB + * Number of tables encountering errors during the migration of a database. */ private Integer fullLoadErroredTables; /* - * Number of tables loading during the migration of a DB + * Number of tables loading during the migration of a database. */ private Integer fullLoadLoadingTables; /* - * Number of tables loaded during the migration of a DB + * Number of tables loaded during the migration of a database. */ private Integer fullLoadCompletedTables; /* - * CDC update counter + * Change Data Capture update counter. */ private Integer cdcUpdateCounter; /* - * CDC delete counter + * Change Data Capture delete counter. */ private Integer cdcDeleteCounter; /* - * CDC insert counter + * Change Data Capture insert counter. */ private Integer cdcInsertCounter; /* - * CDC applied changes counter + * Change Data Capture applied changes counter. */ private Integer appliedChanges; /* - * CDC incoming changes counter + * Change Data Capture incoming changes counter. */ private Integer incomingChanges; /* - * Lag in seconds between source and target during online phase + * Lag in seconds between source and target during online phase. */ private Integer latency; /* - * Error message, if any, for the migration state + * Error message, if any, for the migration state. */ private String message; /** - * Creates an instance of DbMigrationStatus class. + * Creates an instance of DatabaseMigrationState class. */ - public DbMigrationStatus() { + public DatabaseMigrationState() { } /** - * Get the databaseName property: Name of the database. + * Get the databaseName property: Name of database. * * @return the databaseName value. */ @@ -115,38 +115,38 @@ public String databaseName() { } /** - * Set the databaseName property: Name of the database. + * Set the databaseName property: Name of database. * * @param databaseName the databaseName value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withDatabaseName(String databaseName) { + public DatabaseMigrationState withDatabaseName(String databaseName) { this.databaseName = databaseName; return this; } /** - * Get the migrationState property: Migration db state of an individual database. + * Get the migrationState property: Migration state of a database. * * @return the migrationState value. */ - public MigrationDbState migrationState() { + public MigrationDatabaseState migrationState() { return this.migrationState; } /** - * Set the migrationState property: Migration db state of an individual database. + * Set the migrationState property: Migration state of a database. * * @param migrationState the migrationState value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withMigrationState(MigrationDbState migrationState) { + public DatabaseMigrationState withMigrationState(MigrationDatabaseState migrationState) { this.migrationState = migrationState; return this; } /** - * Get the migrationOperation property: Migration operation of an individual database. + * Get the migrationOperation property: Migration operation of a database. * * @return the migrationOperation value. */ @@ -155,18 +155,18 @@ public String migrationOperation() { } /** - * Set the migrationOperation property: Migration operation of an individual database. + * Set the migrationOperation property: Migration operation of a database. * * @param migrationOperation the migrationOperation value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withMigrationOperation(String migrationOperation) { + public DatabaseMigrationState withMigrationOperation(String migrationOperation) { this.migrationOperation = migrationOperation; return this; } /** - * Get the startedOn property: Start date-time of a migration state. + * Get the startedOn property: Start time of a migration state. * * @return the startedOn value. */ @@ -175,18 +175,18 @@ public OffsetDateTime startedOn() { } /** - * Set the startedOn property: Start date-time of a migration state. + * Set the startedOn property: Start time of a migration state. * * @param startedOn the startedOn value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withStartedOn(OffsetDateTime startedOn) { + public DatabaseMigrationState withStartedOn(OffsetDateTime startedOn) { this.startedOn = startedOn; return this; } /** - * Get the endedOn property: End date-time of a migration state. + * Get the endedOn property: End time of a migration state. * * @return the endedOn value. */ @@ -195,18 +195,18 @@ public OffsetDateTime endedOn() { } /** - * Set the endedOn property: End date-time of a migration state. + * Set the endedOn property: End time of a migration state. * * @param endedOn the endedOn value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withEndedOn(OffsetDateTime endedOn) { + public DatabaseMigrationState withEndedOn(OffsetDateTime endedOn) { this.endedOn = endedOn; return this; } /** - * Get the fullLoadQueuedTables property: Number of tables queued for the migration of a DB. + * Get the fullLoadQueuedTables property: Number of tables queued for the migration of a database. * * @return the fullLoadQueuedTables value. */ @@ -215,18 +215,18 @@ public Integer fullLoadQueuedTables() { } /** - * Set the fullLoadQueuedTables property: Number of tables queued for the migration of a DB. + * Set the fullLoadQueuedTables property: Number of tables queued for the migration of a database. * * @param fullLoadQueuedTables the fullLoadQueuedTables value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withFullLoadQueuedTables(Integer fullLoadQueuedTables) { + public DatabaseMigrationState withFullLoadQueuedTables(Integer fullLoadQueuedTables) { this.fullLoadQueuedTables = fullLoadQueuedTables; return this; } /** - * Get the fullLoadErroredTables property: Number of tables errored out during the migration of a DB. + * Get the fullLoadErroredTables property: Number of tables encountering errors during the migration of a database. * * @return the fullLoadErroredTables value. */ @@ -235,18 +235,18 @@ public Integer fullLoadErroredTables() { } /** - * Set the fullLoadErroredTables property: Number of tables errored out during the migration of a DB. + * Set the fullLoadErroredTables property: Number of tables encountering errors during the migration of a database. * * @param fullLoadErroredTables the fullLoadErroredTables value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withFullLoadErroredTables(Integer fullLoadErroredTables) { + public DatabaseMigrationState withFullLoadErroredTables(Integer fullLoadErroredTables) { this.fullLoadErroredTables = fullLoadErroredTables; return this; } /** - * Get the fullLoadLoadingTables property: Number of tables loading during the migration of a DB. + * Get the fullLoadLoadingTables property: Number of tables loading during the migration of a database. * * @return the fullLoadLoadingTables value. */ @@ -255,18 +255,18 @@ public Integer fullLoadLoadingTables() { } /** - * Set the fullLoadLoadingTables property: Number of tables loading during the migration of a DB. + * Set the fullLoadLoadingTables property: Number of tables loading during the migration of a database. * * @param fullLoadLoadingTables the fullLoadLoadingTables value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withFullLoadLoadingTables(Integer fullLoadLoadingTables) { + public DatabaseMigrationState withFullLoadLoadingTables(Integer fullLoadLoadingTables) { this.fullLoadLoadingTables = fullLoadLoadingTables; return this; } /** - * Get the fullLoadCompletedTables property: Number of tables loaded during the migration of a DB. + * Get the fullLoadCompletedTables property: Number of tables loaded during the migration of a database. * * @return the fullLoadCompletedTables value. */ @@ -275,18 +275,18 @@ public Integer fullLoadCompletedTables() { } /** - * Set the fullLoadCompletedTables property: Number of tables loaded during the migration of a DB. + * Set the fullLoadCompletedTables property: Number of tables loaded during the migration of a database. * * @param fullLoadCompletedTables the fullLoadCompletedTables value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withFullLoadCompletedTables(Integer fullLoadCompletedTables) { + public DatabaseMigrationState withFullLoadCompletedTables(Integer fullLoadCompletedTables) { this.fullLoadCompletedTables = fullLoadCompletedTables; return this; } /** - * Get the cdcUpdateCounter property: CDC update counter. + * Get the cdcUpdateCounter property: Change Data Capture update counter. * * @return the cdcUpdateCounter value. */ @@ -295,18 +295,18 @@ public Integer cdcUpdateCounter() { } /** - * Set the cdcUpdateCounter property: CDC update counter. + * Set the cdcUpdateCounter property: Change Data Capture update counter. * * @param cdcUpdateCounter the cdcUpdateCounter value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withCdcUpdateCounter(Integer cdcUpdateCounter) { + public DatabaseMigrationState withCdcUpdateCounter(Integer cdcUpdateCounter) { this.cdcUpdateCounter = cdcUpdateCounter; return this; } /** - * Get the cdcDeleteCounter property: CDC delete counter. + * Get the cdcDeleteCounter property: Change Data Capture delete counter. * * @return the cdcDeleteCounter value. */ @@ -315,18 +315,18 @@ public Integer cdcDeleteCounter() { } /** - * Set the cdcDeleteCounter property: CDC delete counter. + * Set the cdcDeleteCounter property: Change Data Capture delete counter. * * @param cdcDeleteCounter the cdcDeleteCounter value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withCdcDeleteCounter(Integer cdcDeleteCounter) { + public DatabaseMigrationState withCdcDeleteCounter(Integer cdcDeleteCounter) { this.cdcDeleteCounter = cdcDeleteCounter; return this; } /** - * Get the cdcInsertCounter property: CDC insert counter. + * Get the cdcInsertCounter property: Change Data Capture insert counter. * * @return the cdcInsertCounter value. */ @@ -335,18 +335,18 @@ public Integer cdcInsertCounter() { } /** - * Set the cdcInsertCounter property: CDC insert counter. + * Set the cdcInsertCounter property: Change Data Capture insert counter. * * @param cdcInsertCounter the cdcInsertCounter value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withCdcInsertCounter(Integer cdcInsertCounter) { + public DatabaseMigrationState withCdcInsertCounter(Integer cdcInsertCounter) { this.cdcInsertCounter = cdcInsertCounter; return this; } /** - * Get the appliedChanges property: CDC applied changes counter. + * Get the appliedChanges property: Change Data Capture applied changes counter. * * @return the appliedChanges value. */ @@ -355,18 +355,18 @@ public Integer appliedChanges() { } /** - * Set the appliedChanges property: CDC applied changes counter. + * Set the appliedChanges property: Change Data Capture applied changes counter. * * @param appliedChanges the appliedChanges value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withAppliedChanges(Integer appliedChanges) { + public DatabaseMigrationState withAppliedChanges(Integer appliedChanges) { this.appliedChanges = appliedChanges; return this; } /** - * Get the incomingChanges property: CDC incoming changes counter. + * Get the incomingChanges property: Change Data Capture incoming changes counter. * * @return the incomingChanges value. */ @@ -375,12 +375,12 @@ public Integer incomingChanges() { } /** - * Set the incomingChanges property: CDC incoming changes counter. + * Set the incomingChanges property: Change Data Capture incoming changes counter. * * @param incomingChanges the incomingChanges value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withIncomingChanges(Integer incomingChanges) { + public DatabaseMigrationState withIncomingChanges(Integer incomingChanges) { this.incomingChanges = incomingChanges; return this; } @@ -398,9 +398,9 @@ public Integer latency() { * Set the latency property: Lag in seconds between source and target during online phase. * * @param latency the latency value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withLatency(Integer latency) { + public DatabaseMigrationState withLatency(Integer latency) { this.latency = latency; return this; } @@ -418,9 +418,9 @@ public String message() { * Set the message property: Error message, if any, for the migration state. * * @param message the message value to set. - * @return the DbMigrationStatus object itself. + * @return the DatabaseMigrationState object itself. */ - public DbMigrationStatus withMessage(String message) { + public DatabaseMigrationState withMessage(String message) { this.message = message; return this; } @@ -462,60 +462,61 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of DbMigrationStatus from the JsonReader. + * Reads an instance of DatabaseMigrationState from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of DbMigrationStatus if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DbMigrationStatus. + * @return An instance of DatabaseMigrationState if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DatabaseMigrationState. */ - public static DbMigrationStatus fromJson(JsonReader jsonReader) throws IOException { + public static DatabaseMigrationState fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - DbMigrationStatus deserializedDbMigrationStatus = new DbMigrationStatus(); + DatabaseMigrationState deserializedDatabaseMigrationState = new DatabaseMigrationState(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("databaseName".equals(fieldName)) { - deserializedDbMigrationStatus.databaseName = reader.getString(); + deserializedDatabaseMigrationState.databaseName = reader.getString(); } else if ("migrationState".equals(fieldName)) { - deserializedDbMigrationStatus.migrationState = MigrationDbState.fromString(reader.getString()); + deserializedDatabaseMigrationState.migrationState + = MigrationDatabaseState.fromString(reader.getString()); } else if ("migrationOperation".equals(fieldName)) { - deserializedDbMigrationStatus.migrationOperation = reader.getString(); + deserializedDatabaseMigrationState.migrationOperation = reader.getString(); } else if ("startedOn".equals(fieldName)) { - deserializedDbMigrationStatus.startedOn = reader + deserializedDatabaseMigrationState.startedOn = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endedOn".equals(fieldName)) { - deserializedDbMigrationStatus.endedOn = reader + deserializedDatabaseMigrationState.endedOn = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("fullLoadQueuedTables".equals(fieldName)) { - deserializedDbMigrationStatus.fullLoadQueuedTables = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.fullLoadQueuedTables = reader.getNullable(JsonReader::getInt); } else if ("fullLoadErroredTables".equals(fieldName)) { - deserializedDbMigrationStatus.fullLoadErroredTables = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.fullLoadErroredTables = reader.getNullable(JsonReader::getInt); } else if ("fullLoadLoadingTables".equals(fieldName)) { - deserializedDbMigrationStatus.fullLoadLoadingTables = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.fullLoadLoadingTables = reader.getNullable(JsonReader::getInt); } else if ("fullLoadCompletedTables".equals(fieldName)) { - deserializedDbMigrationStatus.fullLoadCompletedTables = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.fullLoadCompletedTables = reader.getNullable(JsonReader::getInt); } else if ("cdcUpdateCounter".equals(fieldName)) { - deserializedDbMigrationStatus.cdcUpdateCounter = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.cdcUpdateCounter = reader.getNullable(JsonReader::getInt); } else if ("cdcDeleteCounter".equals(fieldName)) { - deserializedDbMigrationStatus.cdcDeleteCounter = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.cdcDeleteCounter = reader.getNullable(JsonReader::getInt); } else if ("cdcInsertCounter".equals(fieldName)) { - deserializedDbMigrationStatus.cdcInsertCounter = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.cdcInsertCounter = reader.getNullable(JsonReader::getInt); } else if ("appliedChanges".equals(fieldName)) { - deserializedDbMigrationStatus.appliedChanges = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.appliedChanges = reader.getNullable(JsonReader::getInt); } else if ("incomingChanges".equals(fieldName)) { - deserializedDbMigrationStatus.incomingChanges = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.incomingChanges = reader.getNullable(JsonReader::getInt); } else if ("latency".equals(fieldName)) { - deserializedDbMigrationStatus.latency = reader.getNullable(JsonReader::getInt); + deserializedDatabaseMigrationState.latency = reader.getNullable(JsonReader::getInt); } else if ("message".equals(fieldName)) { - deserializedDbMigrationStatus.message = reader.getString(); + deserializedDatabaseMigrationState.message = reader.getString(); } else { reader.skipChildren(); } } - return deserializedDbMigrationStatus; + return deserializedDatabaseMigrationState; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Databases.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Databases.java index ad4f407ffe3d..f113c4121209 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Databases.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Databases.java @@ -13,11 +13,12 @@ */ public interface Databases { /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -25,11 +26,12 @@ public interface Databases { void delete(String resourceGroupName, String serverName, String databaseName); /** - * Deletes a database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -38,47 +40,49 @@ public interface Databases { void delete(String resourceGroupName, String serverName, String databaseName, Context context); /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database along with {@link Response}. + * @return information about an existing database along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String serverName, String databaseName, Context context); /** - * Gets information about a database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param databaseName The name of the database. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database. + * @return information about an existing database. */ Database get(String resourceGroupName, String serverName, String databaseName); /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of databases as paginated response with {@link PagedIterable}. + * @return list of all databases in a server as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the databases in a given server. + * Lists all databases in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -86,35 +90,35 @@ Response getWithResponse(String resourceGroupName, String serverName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of databases as paginated response with {@link PagedIterable}. + * @return list of all databases in a server as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** - * Gets information about a database. + * Gets information about an existing database. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database along with {@link Response}. + * @return information about an existing database along with {@link Response}. */ Database getById(String id); /** - * Gets information about a database. + * Gets information about an existing database. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database along with {@link Response}. + * @return information about an existing database along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Deletes a database. + * Deletes an existing database. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,7 +128,7 @@ Response getWithResponse(String resourceGroupName, String serverName, void deleteById(String id); /** - * Deletes a database. + * Deletes an existing database. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbLevelValidationStatus.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbLevelValidationStatus.java index 44d26054c90f..f07e5bb308c5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbLevelValidationStatus.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbLevelValidationStatus.java @@ -16,27 +16,27 @@ import java.util.List; /** - * Validation status summary for an individual database. + * Validation status summary for a database. */ @Fluent public final class DbLevelValidationStatus implements JsonSerializable { /* - * Name of the database + * Name of database. */ private String databaseName; /* - * Start date-time of a database level validation + * Start time of a database level validation. */ private OffsetDateTime startedOn; /* - * End date-time of a database level validation + * End time of a database level validation. */ private OffsetDateTime endedOn; /* - * Summary of database level validations + * Summary of database level validations. */ private List summary; @@ -47,7 +47,7 @@ public DbLevelValidationStatus() { } /** - * Get the databaseName property: Name of the database. + * Get the databaseName property: Name of database. * * @return the databaseName value. */ @@ -56,7 +56,7 @@ public String databaseName() { } /** - * Set the databaseName property: Name of the database. + * Set the databaseName property: Name of database. * * @param databaseName the databaseName value to set. * @return the DbLevelValidationStatus object itself. @@ -67,7 +67,7 @@ public DbLevelValidationStatus withDatabaseName(String databaseName) { } /** - * Get the startedOn property: Start date-time of a database level validation. + * Get the startedOn property: Start time of a database level validation. * * @return the startedOn value. */ @@ -76,7 +76,7 @@ public OffsetDateTime startedOn() { } /** - * Set the startedOn property: Start date-time of a database level validation. + * Set the startedOn property: Start time of a database level validation. * * @param startedOn the startedOn value to set. * @return the DbLevelValidationStatus object itself. @@ -87,7 +87,7 @@ public DbLevelValidationStatus withStartedOn(OffsetDateTime startedOn) { } /** - * Get the endedOn property: End date-time of a database level validation. + * Get the endedOn property: End time of a database level validation. * * @return the endedOn value. */ @@ -96,7 +96,7 @@ public OffsetDateTime endedOn() { } /** - * Set the endedOn property: End date-time of a database level validation. + * Set the endedOn property: End time of a database level validation. * * @param endedOn the endedOn value to set. * @return the DbLevelValidationStatus object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbServerMetadata.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbServerMetadata.java index da6bdf736ef3..f894cd7321b6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbServerMetadata.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbServerMetadata.java @@ -17,22 +17,23 @@ @Fluent public final class DbServerMetadata implements JsonSerializable { /* - * Location of database server + * Location of database server. */ private String location; /* - * Version for database engine + * Major version of PostgreSQL database engine. */ private String version; /* - * Storage size in MB for database server + * Storage size (in MB) for database server. */ private Integer storageMb; /* - * SKU for the database server. This object is empty for PG single server + * Compute tier and size of the database server. This object is empty for an Azure Database for PostgreSQL single + * server. */ private ServerSku sku; @@ -52,7 +53,7 @@ public String location() { } /** - * Get the version property: Version for database engine. + * Get the version property: Major version of PostgreSQL database engine. * * @return the version value. */ @@ -61,7 +62,7 @@ public String version() { } /** - * Set the version property: Version for database engine. + * Set the version property: Major version of PostgreSQL database engine. * * @param version the version value to set. * @return the DbServerMetadata object itself. @@ -72,7 +73,7 @@ public DbServerMetadata withVersion(String version) { } /** - * Get the storageMb property: Storage size in MB for database server. + * Get the storageMb property: Storage size (in MB) for database server. * * @return the storageMb value. */ @@ -81,7 +82,7 @@ public Integer storageMb() { } /** - * Set the storageMb property: Storage size in MB for database server. + * Set the storageMb property: Storage size (in MB) for database server. * * @param storageMb the storageMb value to set. * @return the DbServerMetadata object itself. @@ -92,7 +93,8 @@ public DbServerMetadata withStorageMb(Integer storageMb) { } /** - * Get the sku property: SKU for the database server. This object is empty for PG single server. + * Get the sku property: Compute tier and size of the database server. This object is empty for an Azure Database + * for PostgreSQL single server. * * @return the sku value. */ @@ -101,7 +103,8 @@ public ServerSku sku() { } /** - * Set the sku property: SKU for the database server. This object is empty for PG single server. + * Set the sku property: Compute tier and size of the database server. This object is empty for an Azure Database + * for PostgreSQL single server. * * @param sku the sku value to set. * @return the DbServerMetadata object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/EncryptionKeyStatus.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/EncryptionKeyStatus.java new file mode 100644 index 000000000000..15b56b7b0641 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/EncryptionKeyStatus.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Status of key used by a server configured with data encryption based on customer managed key, to encrypt the primary + * storage associated to the server. + */ +public final class EncryptionKeyStatus extends ExpandableStringEnum { + /** + * Static value Valid for EncryptionKeyStatus. + */ + public static final EncryptionKeyStatus VALID = fromString("Valid"); + + /** + * Static value Invalid for EncryptionKeyStatus. + */ + public static final EncryptionKeyStatus INVALID = fromString("Invalid"); + + /** + * Creates a new instance of EncryptionKeyStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EncryptionKeyStatus() { + } + + /** + * Creates or finds a EncryptionKeyStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding EncryptionKeyStatus. + */ + public static EncryptionKeyStatus fromString(String name) { + return fromString(name, EncryptionKeyStatus.class); + } + + /** + * Gets known EncryptionKeyStatus values. + * + * @return known EncryptionKeyStatus values. + */ + public static Collection values() { + return values(EncryptionKeyStatus.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningEditionCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningEditionCapability.java index b1027ce6b918..ad719c3144f5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningEditionCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningEditionCapability.java @@ -11,32 +11,32 @@ import java.io.IOException; /** - * Represents capability of a fast provisioning edition. + * Capability of a fast provisioning compute tier. */ @Immutable public final class FastProvisioningEditionCapability extends CapabilityBase { /* - * Fast provisioning supported tier name + * Compute tier supporting fast provisioning. */ private String supportedTier; /* - * Fast provisioning supported sku name + * Compute name (SKU) supporting fast provisioning. */ private String supportedSku; /* - * Fast provisioning supported storage in Gb + * Storage size (in GB) supporting fast provisioning. */ private Integer supportedStorageGb; /* - * Fast provisioning supported version + * Major version of PostgreSQL database engine supporting fast provisioning. */ private String supportedServerVersions; /* - * Count of servers in cache matching the spec + * Count of servers in cache matching this specification. */ private Integer serverCount; @@ -57,7 +57,7 @@ public FastProvisioningEditionCapability() { } /** - * Get the supportedTier property: Fast provisioning supported tier name. + * Get the supportedTier property: Compute tier supporting fast provisioning. * * @return the supportedTier value. */ @@ -66,7 +66,7 @@ public String supportedTier() { } /** - * Get the supportedSku property: Fast provisioning supported sku name. + * Get the supportedSku property: Compute name (SKU) supporting fast provisioning. * * @return the supportedSku value. */ @@ -75,7 +75,7 @@ public String supportedSku() { } /** - * Get the supportedStorageGb property: Fast provisioning supported storage in Gb. + * Get the supportedStorageGb property: Storage size (in GB) supporting fast provisioning. * * @return the supportedStorageGb value. */ @@ -84,7 +84,8 @@ public Integer supportedStorageGb() { } /** - * Get the supportedServerVersions property: Fast provisioning supported version. + * Get the supportedServerVersions property: Major version of PostgreSQL database engine supporting fast + * provisioning. * * @return the supportedServerVersions value. */ @@ -93,7 +94,7 @@ public String supportedServerVersions() { } /** - * Get the serverCount property: Count of servers in cache matching the spec. + * Get the serverCount property: Count of servers in cache matching this specification. * * @return the serverCount value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupport.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupport.java new file mode 100644 index 000000000000..522205ee41e3 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupport.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if fast provisioning is supported. 'Enabled' means fast provisioning is supported. 'Disabled' stands for + * fast provisioning is not supported. Will be deprecated in the future. Look to Supported Features for + * 'FastProvisioning'. + */ +public final class FastProvisioningSupport extends ExpandableStringEnum { + /** + * Static value Enabled for FastProvisioningSupport. + */ + public static final FastProvisioningSupport ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for FastProvisioningSupport. + */ + public static final FastProvisioningSupport DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of FastProvisioningSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FastProvisioningSupport() { + } + + /** + * Creates or finds a FastProvisioningSupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding FastProvisioningSupport. + */ + public static FastProvisioningSupport fromString(String name) { + return fromString(name, FastProvisioningSupport.class); + } + + /** + * Gets known FastProvisioningSupport values. + * + * @return known FastProvisioningSupport values. + */ + public static Collection values() { + return values(FastProvisioningSupport.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupportedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupportedEnum.java deleted file mode 100644 index 2c0d60b0dd37..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupportedEnum.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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Gets a value indicating whether fast provisioning is supported. "Enabled" means fast provisioning is supported. - * "Disabled" stands for fast provisioning is not supported. Will be deprecated in future, please look to Supported - * Features for "FastProvisioning". - */ -public final class FastProvisioningSupportedEnum extends ExpandableStringEnum { - /** - * Static value Enabled for FastProvisioningSupportedEnum. - */ - public static final FastProvisioningSupportedEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for FastProvisioningSupportedEnum. - */ - public static final FastProvisioningSupportedEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of FastProvisioningSupportedEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public FastProvisioningSupportedEnum() { - } - - /** - * Creates or finds a FastProvisioningSupportedEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding FastProvisioningSupportedEnum. - */ - public static FastProvisioningSupportedEnum fromString(String name) { - return fromString(name, FastProvisioningSupportedEnum.class); - } - - /** - * Gets known FastProvisioningSupportedEnum values. - * - * @return known FastProvisioningSupportedEnum values. - */ - public static Collection values() { - return values(FastProvisioningSupportedEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FeatureStatus.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FeatureStatus.java new file mode 100644 index 000000000000..e91d95aeea70 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FeatureStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Status of the feature. Indicates if the feature is enabled or not. + */ +public final class FeatureStatus extends ExpandableStringEnum { + /** + * Static value Enabled for FeatureStatus. + */ + public static final FeatureStatus ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for FeatureStatus. + */ + public static final FeatureStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of FeatureStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FeatureStatus() { + } + + /** + * Creates or finds a FeatureStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding FeatureStatus. + */ + public static FeatureStatus fromString(String name) { + return fromString(name, FeatureStatus.class); + } + + /** + * Gets known FeatureStatus values. + * + * @return known FeatureStatus values. + */ + public static Collection values() { + return values(FeatureStatus.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRule.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRule.java index bf03da38012a..4ea0fb1ce268 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRule.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRule.java @@ -41,14 +41,16 @@ public interface FirewallRule { SystemData systemData(); /** - * Gets the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format. + * Gets the startIpAddress property: IP address defining the start of the range of addresses of a firewall rule. + * Must be expressed in IPv4 format. * * @return the startIpAddress value. */ String startIpAddress(); /** - * Gets the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format. + * Gets the endIpAddress property: IP address defining the end of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * * @return the endIpAddress value. */ @@ -104,10 +106,11 @@ interface WithParentResource { */ interface WithStartIpAddress { /** - * Specifies the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 - * format.. + * Specifies the startIpAddress property: IP address defining the start of the range of addresses of a + * firewall rule. Must be expressed in IPv4 format.. * - * @param startIpAddress The start IP address of the server firewall rule. Must be IPv4 format. + * @param startIpAddress IP address defining the start of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * @return the next definition stage. */ WithEndIpAddress withStartIpAddress(String startIpAddress); @@ -118,10 +121,11 @@ interface WithStartIpAddress { */ interface WithEndIpAddress { /** - * Specifies the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 - * format.. + * Specifies the endIpAddress property: IP address defining the end of the range of addresses of a firewall + * rule. Must be expressed in IPv4 format.. * - * @param endIpAddress The end IP address of the server firewall rule. Must be IPv4 format. + * @param endIpAddress IP address defining the end of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * @return the next definition stage. */ WithCreate withEndIpAddress(String endIpAddress); @@ -185,10 +189,11 @@ interface UpdateStages { */ interface WithStartIpAddress { /** - * Specifies the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 - * format.. + * Specifies the startIpAddress property: IP address defining the start of the range of addresses of a + * firewall rule. Must be expressed in IPv4 format.. * - * @param startIpAddress The start IP address of the server firewall rule. Must be IPv4 format. + * @param startIpAddress IP address defining the start of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * @return the next definition stage. */ Update withStartIpAddress(String startIpAddress); @@ -199,10 +204,11 @@ interface WithStartIpAddress { */ interface WithEndIpAddress { /** - * Specifies the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 - * format.. + * Specifies the endIpAddress property: IP address defining the end of the range of addresses of a firewall + * rule. Must be expressed in IPv4 format.. * - * @param endIpAddress The end IP address of the server firewall rule. Must be IPv4 format. + * @param endIpAddress IP address defining the end of the range of addresses of a firewall rule. Must be + * expressed in IPv4 format. * @return the next definition stage. */ Update withEndIpAddress(String endIpAddress); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleList.java similarity index 62% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleList.java index ccc8da72840b..b6ab09bcb571 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleList.java @@ -14,28 +14,28 @@ import java.util.List; /** - * A list of firewall rules. + * List of firewall rules. */ @Fluent -public final class FirewallRuleListResult implements JsonSerializable { +public final class FirewallRuleList implements JsonSerializable { /* - * The list of firewall rules in a server. + * List of firewall rules in a server. */ private List value; /* - * The link used to get the next page of operations. + * Link to retrieve next page of results. */ private String nextLink; /** - * Creates an instance of FirewallRuleListResult class. + * Creates an instance of FirewallRuleList class. */ - public FirewallRuleListResult() { + public FirewallRuleList() { } /** - * Get the value property: The list of firewall rules in a server. + * Get the value property: List of firewall rules in a server. * * @return the value value. */ @@ -44,18 +44,18 @@ public List value() { } /** - * Set the value property: The list of firewall rules in a server. + * Set the value property: List of firewall rules in a server. * * @param value the value value to set. - * @return the FirewallRuleListResult object itself. + * @return the FirewallRuleList object itself. */ - public FirewallRuleListResult withValue(List value) { + public FirewallRuleList withValue(List value) { this.value = value; return this; } /** - * Get the nextLink property: The link used to get the next page of operations. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -64,12 +64,12 @@ public String nextLink() { } /** - * Set the nextLink property: The link used to get the next page of operations. + * Set the nextLink property: Link to retrieve next page of results. * * @param nextLink the nextLink value to set. - * @return the FirewallRuleListResult object itself. + * @return the FirewallRuleList object itself. */ - public FirewallRuleListResult withNextLink(String nextLink) { + public FirewallRuleList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } @@ -97,31 +97,31 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of FirewallRuleListResult from the JsonReader. + * Reads an instance of FirewallRuleList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of FirewallRuleListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the FirewallRuleListResult. + * @return An instance of FirewallRuleList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the FirewallRuleList. */ - public static FirewallRuleListResult fromJson(JsonReader jsonReader) throws IOException { + public static FirewallRuleList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - FirewallRuleListResult deserializedFirewallRuleListResult = new FirewallRuleListResult(); + FirewallRuleList deserializedFirewallRuleList = new FirewallRuleList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> FirewallRuleInner.fromJson(reader1)); - deserializedFirewallRuleListResult.value = value; + deserializedFirewallRuleList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedFirewallRuleListResult.nextLink = reader.getString(); + deserializedFirewallRuleList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedFirewallRuleListResult; + return deserializedFirewallRuleList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRules.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRules.java index e19529ca52f3..ad811508375e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRules.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRules.java @@ -13,11 +13,11 @@ */ public interface FirewallRules { /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -25,11 +25,11 @@ public interface FirewallRules { void delete(String resourceGroupName, String serverName, String firewallRuleName); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -38,47 +38,47 @@ public interface FirewallRules { void delete(String resourceGroupName, String serverName, String firewallRuleName, Context context); /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule along with {@link Response}. + * @return information about a firewall rule in a server along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String serverName, String firewallRuleName, Context context); /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param firewallRuleName The name of the server firewall rule. + * @param firewallRuleName Name of the firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return information about a firewall rule in a server. */ FirewallRule get(String resourceGroupName, String serverName, String firewallRuleName); /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of firewall rules as paginated response with {@link PagedIterable}. + * @return list of firewall rules as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the firewall rules in a given PostgreSQL server. + * Lists information about all firewall rules in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -86,35 +86,35 @@ Response getWithResponse(String resourceGroupName, String serverNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of firewall rules as paginated response with {@link PagedIterable}. + * @return list of firewall rules as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule along with {@link Response}. + * @return information about a firewall rule in a server along with {@link Response}. */ FirewallRule getById(String id); /** - * List all the firewall rules in a given server. + * Gets information about a firewall rule in a server. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule along with {@link Response}. + * @return information about a firewall rule in a server along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,7 +124,7 @@ Response getWithResponse(String resourceGroupName, String serverNa void deleteById(String id); /** - * Deletes a PostgreSQL server firewall rule. + * Deletes an existing firewall rule. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerCapability.java deleted file mode 100644 index 8c97306ca642..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerCapability.java +++ /dev/null @@ -1,134 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner; -import java.util.List; - -/** - * An immutable client-side representation of FlexibleServerCapability. - */ -public interface FlexibleServerCapability { - /** - * Gets the status property: The status of the capability. - * - * @return the status value. - */ - CapabilityStatus status(); - - /** - * Gets the reason property: The reason for the capability not being available. - * - * @return the reason value. - */ - String reason(); - - /** - * Gets the name property: Name of flexible servers capability. - * - * @return the name value. - */ - String name(); - - /** - * Gets the supportedServerEditions property: List of supported flexible server editions. - * - * @return the supportedServerEditions value. - */ - List supportedServerEditions(); - - /** - * Gets the supportedServerVersions property: The list of server versions supported for this capability. - * - * @return the supportedServerVersions value. - */ - List supportedServerVersions(); - - /** - * Gets the supportedFeatures property: The supported features. - * - * @return the supportedFeatures value. - */ - List supportedFeatures(); - - /** - * Gets the fastProvisioningSupported property: Gets a value indicating whether fast provisioning is supported. - * "Enabled" means fast provisioning is supported. "Disabled" stands for fast provisioning is not supported. Will be - * deprecated in future, please look to Supported Features for "FastProvisioning". - * - * @return the fastProvisioningSupported value. - */ - FastProvisioningSupportedEnum fastProvisioningSupported(); - - /** - * Gets the supportedFastProvisioningEditions property: List of supported server editions for fast provisioning. - * - * @return the supportedFastProvisioningEditions value. - */ - List supportedFastProvisioningEditions(); - - /** - * Gets the geoBackupSupported property: Determines if geo-backup is supported in this region. "Enabled" means - * geo-backup is supported. "Disabled" stands for geo-back is not supported. Will be deprecated in future, please - * look to Supported Features for "GeoBackup". - * - * @return the geoBackupSupported value. - */ - GeoBackupSupportedEnum geoBackupSupported(); - - /** - * Gets the zoneRedundantHaSupported property: A value indicating whether Zone Redundant HA is supported in this - * region. "Enabled" means zone redundant HA is supported. "Disabled" stands for zone redundant HA is not supported. - * Will be deprecated in future, please look to Supported Features for "ZoneRedundantHa". - * - * @return the zoneRedundantHaSupported value. - */ - ZoneRedundantHaSupportedEnum zoneRedundantHaSupported(); - - /** - * Gets the zoneRedundantHaAndGeoBackupSupported property: A value indicating whether Zone Redundant HA and - * Geo-backup is supported in this region. "Enabled" means zone redundant HA and geo-backup is supported. "Disabled" - * stands for zone redundant HA and geo-backup is not supported. Will be deprecated in future, please look to - * Supported Features for "ZoneRedundantHaAndGeoBackup". - * - * @return the zoneRedundantHaAndGeoBackupSupported value. - */ - ZoneRedundantHaAndGeoBackupSupportedEnum zoneRedundantHaAndGeoBackupSupported(); - - /** - * Gets the storageAutoGrowthSupported property: A value indicating whether storage auto-grow is supported in this - * region. "Enabled" means storage auto-grow is supported. "Disabled" stands for storage auto-grow is not supported. - * Will be deprecated in future, please look to Supported Features for "StorageAutoGrowth". - * - * @return the storageAutoGrowthSupported value. - */ - StorageAutoGrowthSupportedEnum storageAutoGrowthSupported(); - - /** - * Gets the onlineResizeSupported property: A value indicating whether online resize is supported in this region for - * the given subscription. "Enabled" means storage online resize is supported. "Disabled" means storage online - * resize is not supported. Will be deprecated in future, please look to Supported Features for "OnlineResize". - * - * @return the onlineResizeSupported value. - */ - OnlineResizeSupportedEnum onlineResizeSupported(); - - /** - * Gets the restricted property: A value indicating whether this region is restricted. "Enabled" means region is - * restricted. "Disabled" stands for region is not restricted. Will be deprecated in future, please look to - * Supported Features for "Restricted". - * - * @return the restricted value. - */ - RestrictedEnum restricted(); - - /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner - * object. - * - * @return the inner object. - */ - FlexibleServerCapabilityInner innerModel(); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServers.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServers.java deleted file mode 100644 index 13446d1eae74..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServers.java +++ /dev/null @@ -1,72 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of FlexibleServers. - */ -public interface FlexibleServers { - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR pre-backup API call. - */ - Response triggerLtrPreBackupWithResponse(String resourceGroupName, String serverName, - LtrPreBackupRequest parameters, Context context); - - /** - * PreBackup operation performs all the checks that are needed for the subsequent long term retention backup - * operation to succeed. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR pre-backup API call. - */ - LtrPreBackupResponse triggerLtrPreBackup(String resourceGroupName, String serverName, - LtrPreBackupRequest parameters); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call. - */ - LtrBackupResponse startLtrBackup(String resourceGroupName, String serverName, LtrBackupRequest parameters); - - /** - * Start the Long Term Retention Backup operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for the LTR backup API call. - */ - LtrBackupResponse startLtrBackup(String resourceGroupName, String serverName, LtrBackupRequest parameters, - Context context); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoBackupSupportedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoBackupSupportedEnum.java deleted file mode 100644 index 8c098fa8361f..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoBackupSupportedEnum.java +++ /dev/null @@ -1,52 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Determines if geo-backup is supported in this region. "Enabled" means geo-backup is supported. "Disabled" stands for - * geo-back is not supported. Will be deprecated in future, please look to Supported Features for "GeoBackup". - */ -public final class GeoBackupSupportedEnum extends ExpandableStringEnum { - /** - * Static value Enabled for GeoBackupSupportedEnum. - */ - public static final GeoBackupSupportedEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for GeoBackupSupportedEnum. - */ - public static final GeoBackupSupportedEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of GeoBackupSupportedEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public GeoBackupSupportedEnum() { - } - - /** - * Creates or finds a GeoBackupSupportedEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding GeoBackupSupportedEnum. - */ - public static GeoBackupSupportedEnum fromString(String name) { - return fromString(name, GeoBackupSupportedEnum.class); - } - - /** - * Gets known GeoBackupSupportedEnum values. - * - * @return known GeoBackupSupportedEnum values. - */ - public static Collection values() { - return values(GeoBackupSupportedEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoRedundantBackupEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoRedundantBackupEnum.java deleted file mode 100644 index d6a4d2d77497..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoRedundantBackupEnum.java +++ /dev/null @@ -1,51 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether Geo-Redundant backup is enabled on the server. - */ -public final class GeoRedundantBackupEnum extends ExpandableStringEnum { - /** - * Static value Enabled for GeoRedundantBackupEnum. - */ - public static final GeoRedundantBackupEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for GeoRedundantBackupEnum. - */ - public static final GeoRedundantBackupEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of GeoRedundantBackupEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public GeoRedundantBackupEnum() { - } - - /** - * Creates or finds a GeoRedundantBackupEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding GeoRedundantBackupEnum. - */ - public static GeoRedundantBackupEnum fromString(String name) { - return fromString(name, GeoRedundantBackupEnum.class); - } - - /** - * Gets known GeoRedundantBackupEnum values. - * - * @return known GeoRedundantBackupEnum values. - */ - public static Collection values() { - return values(GeoRedundantBackupEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackup.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackup.java new file mode 100644 index 000000000000..c3c6f75a9862 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackup.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if the server is configured to create geographically redundant backups. + */ +public final class GeographicallyRedundantBackup extends ExpandableStringEnum { + /** + * Static value Enabled for GeographicallyRedundantBackup. + */ + public static final GeographicallyRedundantBackup ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for GeographicallyRedundantBackup. + */ + public static final GeographicallyRedundantBackup DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of GeographicallyRedundantBackup value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GeographicallyRedundantBackup() { + } + + /** + * Creates or finds a GeographicallyRedundantBackup from its string representation. + * + * @param name a name to look for. + * @return the corresponding GeographicallyRedundantBackup. + */ + public static GeographicallyRedundantBackup fromString(String name) { + return fromString(name, GeographicallyRedundantBackup.class); + } + + /** + * Gets known GeographicallyRedundantBackup values. + * + * @return known GeographicallyRedundantBackup values. + */ + public static Collection values() { + return values(GeographicallyRedundantBackup.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackupSupport.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackupSupport.java new file mode 100644 index 000000000000..a6ecc45998b8 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackupSupport.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if geographically redundant backups are supported in this location. 'Enabled' means geographically + * redundant backups are supported. 'Disabled' stands for geographically redundant backup is not supported. Will be + * deprecated in the future. Look to Supported Features for 'GeoBackup'. + */ +public final class GeographicallyRedundantBackupSupport + extends ExpandableStringEnum { + /** + * Static value Enabled for GeographicallyRedundantBackupSupport. + */ + public static final GeographicallyRedundantBackupSupport ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for GeographicallyRedundantBackupSupport. + */ + public static final GeographicallyRedundantBackupSupport DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of GeographicallyRedundantBackupSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GeographicallyRedundantBackupSupport() { + } + + /** + * Creates or finds a GeographicallyRedundantBackupSupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding GeographicallyRedundantBackupSupport. + */ + public static GeographicallyRedundantBackupSupport fromString(String name) { + return fromString(name, GeographicallyRedundantBackupSupport.class); + } + + /** + * Gets known GeographicallyRedundantBackupSupport values. + * + * @return known GeographicallyRedundantBackupSupport values. + */ + public static Collection values() { + return values(GeographicallyRedundantBackupSupport.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HaMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HaMode.java deleted file mode 100644 index bef85a725c03..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HaMode.java +++ /dev/null @@ -1,51 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * HA mode supported for a server. - */ -public final class HaMode extends ExpandableStringEnum { - /** - * Static value SameZone for HaMode. - */ - public static final HaMode SAME_ZONE = fromString("SameZone"); - - /** - * Static value ZoneRedundant for HaMode. - */ - public static final HaMode ZONE_REDUNDANT = fromString("ZoneRedundant"); - - /** - * Creates a new instance of HaMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public HaMode() { - } - - /** - * Creates or finds a HaMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding HaMode. - */ - public static HaMode fromString(String name) { - return fromString(name, HaMode.class); - } - - /** - * Gets known HaMode values. - * - * @return known HaMode values. - */ - public static Collection values() { - return values(HaMode.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailability.java index 0319da6d63a5..59b76abe5bf5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailability.java @@ -17,17 +17,18 @@ @Fluent public final class HighAvailability implements JsonSerializable { /* - * The HA mode for the server. + * High availability mode for a server. */ private HighAvailabilityMode mode; /* - * A state of a HA server that is visible to user. + * Possible states of the standby server created when high availability is set to SameZone or ZoneRedundant. */ - private ServerHAState state; + private HighAvailabilityState state; /* - * availability zone information of the standby. + * Availability zone associated to the standby server created when high availability is set to SameZone or + * ZoneRedundant. */ private String standbyAvailabilityZone; @@ -38,7 +39,7 @@ public HighAvailability() { } /** - * Get the mode property: The HA mode for the server. + * Get the mode property: High availability mode for a server. * * @return the mode value. */ @@ -47,7 +48,7 @@ public HighAvailabilityMode mode() { } /** - * Set the mode property: The HA mode for the server. + * Set the mode property: High availability mode for a server. * * @param mode the mode value to set. * @return the HighAvailability object itself. @@ -58,16 +59,18 @@ public HighAvailability withMode(HighAvailabilityMode mode) { } /** - * Get the state property: A state of a HA server that is visible to user. + * Get the state property: Possible states of the standby server created when high availability is set to SameZone + * or ZoneRedundant. * * @return the state value. */ - public ServerHAState state() { + public HighAvailabilityState state() { return this.state; } /** - * Get the standbyAvailabilityZone property: availability zone information of the standby. + * Get the standbyAvailabilityZone property: Availability zone associated to the standby server created when high + * availability is set to SameZone or ZoneRedundant. * * @return the standbyAvailabilityZone value. */ @@ -76,7 +79,8 @@ public String standbyAvailabilityZone() { } /** - * Set the standbyAvailabilityZone property: availability zone information of the standby. + * Set the standbyAvailabilityZone property: Availability zone associated to the standby server created when high + * availability is set to SameZone or ZoneRedundant. * * @param standbyAvailabilityZone the standbyAvailabilityZone value to set. * @return the HighAvailability object itself. @@ -123,7 +127,7 @@ public static HighAvailability fromJson(JsonReader jsonReader) throws IOExceptio if ("mode".equals(fieldName)) { deserializedHighAvailability.mode = HighAvailabilityMode.fromString(reader.getString()); } else if ("state".equals(fieldName)) { - deserializedHighAvailability.state = ServerHAState.fromString(reader.getString()); + deserializedHighAvailability.state = HighAvailabilityState.fromString(reader.getString()); } else if ("standbyAvailabilityZone".equals(fieldName)) { deserializedHighAvailability.standbyAvailabilityZone = reader.getString(); } else { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityForPatch.java new file mode 100644 index 000000000000..f64ceb4d681e --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityForPatch.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * High availability properties of a server. + */ +@Fluent +public final class HighAvailabilityForPatch implements JsonSerializable { + /* + * High availability mode for a server. + */ + private HighAvailabilityMode mode; + + /* + * Possible states of the standby server created when high availability is set to SameZone or ZoneRedundant. + */ + private HighAvailabilityState state; + + /* + * Availability zone associated to the standby server created when high availability is set to SameZone or + * ZoneRedundant. + */ + private String standbyAvailabilityZone; + + /** + * Creates an instance of HighAvailabilityForPatch class. + */ + public HighAvailabilityForPatch() { + } + + /** + * Get the mode property: High availability mode for a server. + * + * @return the mode value. + */ + public HighAvailabilityMode mode() { + return this.mode; + } + + /** + * Set the mode property: High availability mode for a server. + * + * @param mode the mode value to set. + * @return the HighAvailabilityForPatch object itself. + */ + public HighAvailabilityForPatch withMode(HighAvailabilityMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the state property: Possible states of the standby server created when high availability is set to SameZone + * or ZoneRedundant. + * + * @return the state value. + */ + public HighAvailabilityState state() { + return this.state; + } + + /** + * Get the standbyAvailabilityZone property: Availability zone associated to the standby server created when high + * availability is set to SameZone or ZoneRedundant. + * + * @return the standbyAvailabilityZone value. + */ + public String standbyAvailabilityZone() { + return this.standbyAvailabilityZone; + } + + /** + * Set the standbyAvailabilityZone property: Availability zone associated to the standby server created when high + * availability is set to SameZone or ZoneRedundant. + * + * @param standbyAvailabilityZone the standbyAvailabilityZone value to set. + * @return the HighAvailabilityForPatch object itself. + */ + public HighAvailabilityForPatch withStandbyAvailabilityZone(String standbyAvailabilityZone) { + this.standbyAvailabilityZone = standbyAvailabilityZone; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("standbyAvailabilityZone", this.standbyAvailabilityZone); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HighAvailabilityForPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HighAvailabilityForPatch if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the HighAvailabilityForPatch. + */ + public static HighAvailabilityForPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HighAvailabilityForPatch deserializedHighAvailabilityForPatch = new HighAvailabilityForPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mode".equals(fieldName)) { + deserializedHighAvailabilityForPatch.mode = HighAvailabilityMode.fromString(reader.getString()); + } else if ("state".equals(fieldName)) { + deserializedHighAvailabilityForPatch.state = HighAvailabilityState.fromString(reader.getString()); + } else if ("standbyAvailabilityZone".equals(fieldName)) { + deserializedHighAvailabilityForPatch.standbyAvailabilityZone = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedHighAvailabilityForPatch; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityMode.java index 6158bbda2201..6117de1a790b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityMode.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityMode.java @@ -8,14 +8,9 @@ import java.util.Collection; /** - * The HA mode for the server. + * Modes of high availability supported for this compute. */ public final class HighAvailabilityMode extends ExpandableStringEnum { - /** - * Static value Disabled for HighAvailabilityMode. - */ - public static final HighAvailabilityMode DISABLED = fromString("Disabled"); - /** * Static value ZoneRedundant for HighAvailabilityMode. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityState.java new file mode 100644 index 000000000000..73e7dc953615 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Possible states of the standby server created when high availability is set to SameZone or ZoneRedundant. + */ +public final class HighAvailabilityState extends ExpandableStringEnum { + /** + * Static value NotEnabled for HighAvailabilityState. + */ + public static final HighAvailabilityState NOT_ENABLED = fromString("NotEnabled"); + + /** + * Static value CreatingStandby for HighAvailabilityState. + */ + public static final HighAvailabilityState CREATING_STANDBY = fromString("CreatingStandby"); + + /** + * Static value ReplicatingData for HighAvailabilityState. + */ + public static final HighAvailabilityState REPLICATING_DATA = fromString("ReplicatingData"); + + /** + * Static value FailingOver for HighAvailabilityState. + */ + public static final HighAvailabilityState FAILING_OVER = fromString("FailingOver"); + + /** + * Static value Healthy for HighAvailabilityState. + */ + public static final HighAvailabilityState HEALTHY = fromString("Healthy"); + + /** + * Static value RemovingStandby for HighAvailabilityState. + */ + public static final HighAvailabilityState REMOVING_STANDBY = fromString("RemovingStandby"); + + /** + * Creates a new instance of HighAvailabilityState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HighAvailabilityState() { + } + + /** + * Creates or finds a HighAvailabilityState from its string representation. + * + * @param name a name to look for. + * @return the corresponding HighAvailabilityState. + */ + public static HighAvailabilityState fromString(String name) { + return fromString(name, HighAvailabilityState.class); + } + + /** + * Gets known HighAvailabilityState values. + * + * @return known HighAvailabilityState values. + */ + public static Collection values() { + return values(HighAvailabilityState.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IdentityType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IdentityType.java index 0312b15e90dd..ec0666c6b94b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IdentityType.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IdentityType.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * the types of identities associated with this resource. + * Types of identities associated with a server. */ public final class IdentityType extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ImpactRecord.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ImpactRecord.java index 265cb23da1e5..7affd81ab870 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ImpactRecord.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ImpactRecord.java @@ -12,27 +12,27 @@ import java.io.IOException; /** - * Stores property that features impact on some metric if this recommended action is applied. + * Impact on some metric if this recommended action is applied. */ @Fluent public final class ImpactRecord implements JsonSerializable { /* - * Dimension name + * Dimension name. */ private String dimensionName; /* - * Dimension unit + * Dimension unit. */ private String unit; /* - * Optional property that can be used to store the QueryId if the metric is for a specific query. + * Optional property that can be used to store the identifier of the query, if the metric is for a specific query. */ private Long queryId; /* - * Absolute value + * Absolute value. */ private Double absoluteValue; @@ -83,8 +83,8 @@ public ImpactRecord withUnit(String unit) { } /** - * Get the queryId property: Optional property that can be used to store the QueryId if the metric is for a specific - * query. + * Get the queryId property: Optional property that can be used to store the identifier of the query, if the metric + * is for a specific query. * * @return the queryId value. */ @@ -93,8 +93,8 @@ public Long queryId() { } /** - * Set the queryId property: Optional property that can be used to store the QueryId if the metric is for a specific - * query. + * Set the queryId property: Optional property that can be used to store the identifier of the query, if the metric + * is for a specific query. * * @param queryId the queryId value to set. * @return the ImpactRecord object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationListResult.java deleted file mode 100644 index 1d7aaa653668..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationListResult.java +++ /dev/null @@ -1,132 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.IndexRecommendationResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of available index recommendations. - */ -@Fluent -public final class IndexRecommendationListResult implements JsonSerializable { - /* - * A list of available index recommendations. - */ - private List value; - - /* - * URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - */ - private String nextLink; - - /** - * Creates an instance of IndexRecommendationListResult class. - */ - public IndexRecommendationListResult() { - } - - /** - * Get the value property: A list of available index recommendations. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of available index recommendations. - * - * @param value the value value to set. - * @return the IndexRecommendationListResult object itself. - */ - public IndexRecommendationListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - * - * @param nextLink the nextLink value to set. - * @return the IndexRecommendationListResult object itself. - */ - public IndexRecommendationListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IndexRecommendationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IndexRecommendationListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IndexRecommendationListResult. - */ - public static IndexRecommendationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IndexRecommendationListResult deserializedIndexRecommendationListResult - = new IndexRecommendationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> IndexRecommendationResourceInner.fromJson(reader1)); - deserializedIndexRecommendationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedIndexRecommendationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIndexRecommendationListResult; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/KeyStatusEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/KeyStatusEnum.java deleted file mode 100644 index d985ad1ea738..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/KeyStatusEnum.java +++ /dev/null @@ -1,51 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Primary encryption key status for Data encryption enabled server. - */ -public final class KeyStatusEnum extends ExpandableStringEnum { - /** - * Static value Valid for KeyStatusEnum. - */ - public static final KeyStatusEnum VALID = fromString("Valid"); - - /** - * Static value Invalid for KeyStatusEnum. - */ - public static final KeyStatusEnum INVALID = fromString("Invalid"); - - /** - * Creates a new instance of KeyStatusEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public KeyStatusEnum() { - } - - /** - * Creates or finds a KeyStatusEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding KeyStatusEnum. - */ - public static KeyStatusEnum fromString(String name) { - return fromString(name, KeyStatusEnum.class); - } - - /** - * Gets known KeyStatusEnum values. - * - * @return known KeyStatusEnum values. - */ - public static Collection values() { - return values(KeyStatusEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationRestricted.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationRestricted.java new file mode 100644 index 000000000000..73cb1b16641b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationRestricted.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if this location is restricted. 'Enabled' means location is restricted. 'Disabled' stands for location is + * not restricted. Will be deprecated in the future. Look to Supported Features for 'Restricted'. + */ +public final class LocationRestricted extends ExpandableStringEnum { + /** + * Static value Enabled for LocationRestricted. + */ + public static final LocationRestricted ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for LocationRestricted. + */ + public static final LocationRestricted DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of LocationRestricted value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LocationRestricted() { + } + + /** + * Creates or finds a LocationRestricted from its string representation. + * + * @param name a name to look for. + * @return the corresponding LocationRestricted. + */ + public static LocationRestricted fromString(String name) { + return fromString(name, LocationRestricted.class); + } + + /** + * Gets known LocationRestricted values. + * + * @return known LocationRestricted values. + */ + public static Collection values() { + return values(LocationRestricted.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceDbEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceDbEnum.java deleted file mode 100644 index 20a461a8ba72..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceDbEnum.java +++ /dev/null @@ -1,51 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Indicates whether to setup LogicalReplicationOnSourceDb, if needed. - */ -public final class LogicalReplicationOnSourceDbEnum extends ExpandableStringEnum { - /** - * Static value True for LogicalReplicationOnSourceDbEnum. - */ - public static final LogicalReplicationOnSourceDbEnum TRUE = fromString("True"); - - /** - * Static value False for LogicalReplicationOnSourceDbEnum. - */ - public static final LogicalReplicationOnSourceDbEnum FALSE = fromString("False"); - - /** - * Creates a new instance of LogicalReplicationOnSourceDbEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LogicalReplicationOnSourceDbEnum() { - } - - /** - * Creates or finds a LogicalReplicationOnSourceDbEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding LogicalReplicationOnSourceDbEnum. - */ - public static LogicalReplicationOnSourceDbEnum fromString(String name) { - return fromString(name, LogicalReplicationOnSourceDbEnum.class); - } - - /** - * Gets known LogicalReplicationOnSourceDbEnum values. - * - * @return known LogicalReplicationOnSourceDbEnum values. - */ - public static Collection values() { - return values(LogicalReplicationOnSourceDbEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceServer.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceServer.java new file mode 100644 index 000000000000..2a5ff6952fad --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceServer.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates whether to setup logical replication on source server, if needed. + */ +public final class LogicalReplicationOnSourceServer extends ExpandableStringEnum { + /** + * Static value True for LogicalReplicationOnSourceServer. + */ + public static final LogicalReplicationOnSourceServer TRUE = fromString("True"); + + /** + * Static value False for LogicalReplicationOnSourceServer. + */ + public static final LogicalReplicationOnSourceServer FALSE = fromString("False"); + + /** + * Creates a new instance of LogicalReplicationOnSourceServer value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LogicalReplicationOnSourceServer() { + } + + /** + * Creates or finds a LogicalReplicationOnSourceServer from its string representation. + * + * @param name a name to look for. + * @return the corresponding LogicalReplicationOnSourceServer. + */ + public static LogicalReplicationOnSourceServer fromString(String name) { + return fromString(name, LogicalReplicationOnSourceServer.class); + } + + /** + * Gets known LogicalReplicationOnSourceServer values. + * + * @return known LogicalReplicationOnSourceServer values. + */ + public static Collection values() { + return values(LogicalReplicationOnSourceServer.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperationList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperationList.java index f4976b432b29..6133a9998c8e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperationList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperationList.java @@ -9,7 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrServerBackupOperationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionOperationInner; import java.io.IOException; import java.util.List; @@ -21,7 +21,7 @@ public final class LtrServerBackupOperationList implements JsonSerializable value; + private List value; /* * The link used to get the next page of operations. @@ -39,7 +39,7 @@ public LtrServerBackupOperationList() { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -49,7 +49,7 @@ public List value() { * @param value the value value to set. * @return the LtrServerBackupOperationList object itself. */ - public LtrServerBackupOperationList withValue(List value) { + public LtrServerBackupOperationList withValue(List value) { this.value = value; return this; } @@ -112,8 +112,8 @@ public static LtrServerBackupOperationList fromJson(JsonReader jsonReader) throw reader.nextToken(); if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> LtrServerBackupOperationInner.fromJson(reader1)); + List value + = reader.readArray(reader1 -> BackupsLongTermRetentionOperationInner.fromJson(reader1)); deserializedLtrServerBackupOperationList.value = value; } else if ("nextLink".equals(fieldName)) { deserializedLtrServerBackupOperationList.nextLink = reader.getString(); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindow.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindow.java index 7e6bc5c89cf5..d087a803cf16 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindow.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindow.java @@ -17,22 +17,22 @@ @Fluent public final class MaintenanceWindow implements JsonSerializable { /* - * indicates whether custom window is enabled or disabled + * Indicates whether custom window is enabled or disabled. */ private String customWindow; /* - * start hour for maintenance window + * Start hour to be used for maintenance window. */ private Integer startHour; /* - * start minute for maintenance window + * Start minute to be used for maintenance window. */ private Integer startMinute; /* - * day of week for maintenance window + * Day of the week to be used for maintenance window. */ private Integer dayOfWeek; @@ -43,7 +43,7 @@ public MaintenanceWindow() { } /** - * Get the customWindow property: indicates whether custom window is enabled or disabled. + * Get the customWindow property: Indicates whether custom window is enabled or disabled. * * @return the customWindow value. */ @@ -52,7 +52,7 @@ public String customWindow() { } /** - * Set the customWindow property: indicates whether custom window is enabled or disabled. + * Set the customWindow property: Indicates whether custom window is enabled or disabled. * * @param customWindow the customWindow value to set. * @return the MaintenanceWindow object itself. @@ -63,7 +63,7 @@ public MaintenanceWindow withCustomWindow(String customWindow) { } /** - * Get the startHour property: start hour for maintenance window. + * Get the startHour property: Start hour to be used for maintenance window. * * @return the startHour value. */ @@ -72,7 +72,7 @@ public Integer startHour() { } /** - * Set the startHour property: start hour for maintenance window. + * Set the startHour property: Start hour to be used for maintenance window. * * @param startHour the startHour value to set. * @return the MaintenanceWindow object itself. @@ -83,7 +83,7 @@ public MaintenanceWindow withStartHour(Integer startHour) { } /** - * Get the startMinute property: start minute for maintenance window. + * Get the startMinute property: Start minute to be used for maintenance window. * * @return the startMinute value. */ @@ -92,7 +92,7 @@ public Integer startMinute() { } /** - * Set the startMinute property: start minute for maintenance window. + * Set the startMinute property: Start minute to be used for maintenance window. * * @param startMinute the startMinute value to set. * @return the MaintenanceWindow object itself. @@ -103,7 +103,7 @@ public MaintenanceWindow withStartMinute(Integer startMinute) { } /** - * Get the dayOfWeek property: day of week for maintenance window. + * Get the dayOfWeek property: Day of the week to be used for maintenance window. * * @return the dayOfWeek value. */ @@ -112,7 +112,7 @@ public Integer dayOfWeek() { } /** - * Set the dayOfWeek property: day of week for maintenance window. + * Set the dayOfWeek property: Day of the week to be used for maintenance window. * * @param dayOfWeek the dayOfWeek value to set. * @return the MaintenanceWindow object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindowForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindowForPatch.java new file mode 100644 index 000000000000..d9500a1d0df8 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindowForPatch.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Maintenance window properties of a server. + */ +@Fluent +public final class MaintenanceWindowForPatch implements JsonSerializable { + /* + * Indicates whether custom window is enabled or disabled. + */ + private String customWindow; + + /* + * Start hour to be used for maintenance window. + */ + private Integer startHour; + + /* + * Start minute to be used for maintenance window. + */ + private Integer startMinute; + + /* + * Day of the week to be used for maintenance window. + */ + private Integer dayOfWeek; + + /** + * Creates an instance of MaintenanceWindowForPatch class. + */ + public MaintenanceWindowForPatch() { + } + + /** + * Get the customWindow property: Indicates whether custom window is enabled or disabled. + * + * @return the customWindow value. + */ + public String customWindow() { + return this.customWindow; + } + + /** + * Set the customWindow property: Indicates whether custom window is enabled or disabled. + * + * @param customWindow the customWindow value to set. + * @return the MaintenanceWindowForPatch object itself. + */ + public MaintenanceWindowForPatch withCustomWindow(String customWindow) { + this.customWindow = customWindow; + return this; + } + + /** + * Get the startHour property: Start hour to be used for maintenance window. + * + * @return the startHour value. + */ + public Integer startHour() { + return this.startHour; + } + + /** + * Set the startHour property: Start hour to be used for maintenance window. + * + * @param startHour the startHour value to set. + * @return the MaintenanceWindowForPatch object itself. + */ + public MaintenanceWindowForPatch withStartHour(Integer startHour) { + this.startHour = startHour; + return this; + } + + /** + * Get the startMinute property: Start minute to be used for maintenance window. + * + * @return the startMinute value. + */ + public Integer startMinute() { + return this.startMinute; + } + + /** + * Set the startMinute property: Start minute to be used for maintenance window. + * + * @param startMinute the startMinute value to set. + * @return the MaintenanceWindowForPatch object itself. + */ + public MaintenanceWindowForPatch withStartMinute(Integer startMinute) { + this.startMinute = startMinute; + return this; + } + + /** + * Get the dayOfWeek property: Day of the week to be used for maintenance window. + * + * @return the dayOfWeek value. + */ + public Integer dayOfWeek() { + return this.dayOfWeek; + } + + /** + * Set the dayOfWeek property: Day of the week to be used for maintenance window. + * + * @param dayOfWeek the dayOfWeek value to set. + * @return the MaintenanceWindowForPatch object itself. + */ + public MaintenanceWindowForPatch withDayOfWeek(Integer dayOfWeek) { + this.dayOfWeek = dayOfWeek; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("customWindow", this.customWindow); + jsonWriter.writeNumberField("startHour", this.startHour); + jsonWriter.writeNumberField("startMinute", this.startMinute); + jsonWriter.writeNumberField("dayOfWeek", this.dayOfWeek); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceWindowForPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceWindowForPatch if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MaintenanceWindowForPatch. + */ + public static MaintenanceWindowForPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceWindowForPatch deserializedMaintenanceWindowForPatch = new MaintenanceWindowForPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("customWindow".equals(fieldName)) { + deserializedMaintenanceWindowForPatch.customWindow = reader.getString(); + } else if ("startHour".equals(fieldName)) { + deserializedMaintenanceWindowForPatch.startHour = reader.getNullable(JsonReader::getInt); + } else if ("startMinute".equals(fieldName)) { + deserializedMaintenanceWindowForPatch.startMinute = reader.getNullable(JsonReader::getInt); + } else if ("dayOfWeek".equals(fieldName)) { + deserializedMaintenanceWindowForPatch.dayOfWeek = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceWindowForPatch; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MicrosoftEntraAuth.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MicrosoftEntraAuth.java new file mode 100644 index 000000000000..a0d8b3f75413 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MicrosoftEntraAuth.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if the server supports Microsoft Entra authentication. + */ +public final class MicrosoftEntraAuth extends ExpandableStringEnum { + /** + * Static value Enabled for MicrosoftEntraAuth. + */ + public static final MicrosoftEntraAuth ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for MicrosoftEntraAuth. + */ + public static final MicrosoftEntraAuth DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of MicrosoftEntraAuth value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MicrosoftEntraAuth() { + } + + /** + * Creates or finds a MicrosoftEntraAuth from its string representation. + * + * @param name a name to look for. + * @return the corresponding MicrosoftEntraAuth. + */ + public static MicrosoftEntraAuth fromString(String name) { + return fromString(name, MicrosoftEntraAuth.class); + } + + /** + * Gets known MicrosoftEntraAuth values. + * + * @return known MicrosoftEntraAuth values. + */ + public static Collection values() { + return values(MicrosoftEntraAuth.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesAndPermissions.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesAndPermissions.java new file mode 100644 index 000000000000..ebb6f01ffa17 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesAndPermissions.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if roles and permissions must be migrated. + */ +public final class MigrateRolesAndPermissions extends ExpandableStringEnum { + /** + * Static value True for MigrateRolesAndPermissions. + */ + public static final MigrateRolesAndPermissions TRUE = fromString("True"); + + /** + * Static value False for MigrateRolesAndPermissions. + */ + public static final MigrateRolesAndPermissions FALSE = fromString("False"); + + /** + * Creates a new instance of MigrateRolesAndPermissions value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MigrateRolesAndPermissions() { + } + + /** + * Creates or finds a MigrateRolesAndPermissions from its string representation. + * + * @param name a name to look for. + * @return the corresponding MigrateRolesAndPermissions. + */ + public static MigrateRolesAndPermissions fromString(String name) { + return fromString(name, MigrateRolesAndPermissions.class); + } + + /** + * Gets known MigrateRolesAndPermissions values. + * + * @return known MigrateRolesAndPermissions values. + */ + public static Collection values() { + return values(MigrateRolesAndPermissions.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesEnum.java deleted file mode 100644 index ae42c71581ec..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesEnum.java +++ /dev/null @@ -1,51 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * To migrate roles and permissions we need to send this flag as True. - */ -public final class MigrateRolesEnum extends ExpandableStringEnum { - /** - * Static value True for MigrateRolesEnum. - */ - public static final MigrateRolesEnum TRUE = fromString("True"); - - /** - * Static value False for MigrateRolesEnum. - */ - public static final MigrateRolesEnum FALSE = fromString("False"); - - /** - * Creates a new instance of MigrateRolesEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MigrateRolesEnum() { - } - - /** - * Creates or finds a MigrateRolesEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding MigrateRolesEnum. - */ - public static MigrateRolesEnum fromString(String name) { - return fromString(name, MigrateRolesEnum.class); - } - - /** - * Gets known MigrateRolesEnum values. - * - * @return known MigrateRolesEnum values. - */ - public static Collection values() { - return values(MigrateRolesEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResource.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migration.java similarity index 51% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResource.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migration.java index c181239fecb1..e52bcb7ed10e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResource.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migration.java @@ -7,15 +7,15 @@ import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** - * An immutable client-side representation of MigrationResource. + * An immutable client-side representation of Migration. */ -public interface MigrationResource { +public interface Migration { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -59,76 +59,75 @@ public interface MigrationResource { SystemData systemData(); /** - * Gets the migrationId property: ID for migration, a GUID. + * Gets the migrationId property: Identifier of a migration. * * @return the migrationId value. */ String migrationId(); /** - * Gets the currentStatus property: Current status of migration. + * Gets the currentStatus property: Current status of a migration. * * @return the currentStatus value. */ MigrationStatus currentStatus(); /** - * Gets the migrationInstanceResourceId property: ResourceId of the private endpoint migration instance. + * Gets the migrationInstanceResourceId property: Identifier of the private endpoint migration instance. * * @return the migrationInstanceResourceId value. */ String migrationInstanceResourceId(); /** - * Gets the migrationMode property: There are two types of migration modes Online and Offline. + * Gets the migrationMode property: Mode used to perform the migration: Online or Offline. * * @return the migrationMode value. */ MigrationMode migrationMode(); /** - * Gets the migrationOption property: This indicates the supported Migration option for the migration. + * Gets the migrationOption property: Supported option for a migration. * * @return the migrationOption value. */ MigrationOption migrationOption(); /** - * Gets the sourceType property: migration source server type : OnPremises, AWS, GCP, AzureVM, - * PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, - * EDB_Oracle_Server, EDB_PostgreSQL, PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, - * Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or - * Supabase_PostgreSQL. + * Gets the sourceType property: Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, + * AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, + * EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, + * OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL. * * @return the sourceType value. */ SourceType sourceType(); /** - * Gets the sslMode property: SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and - * Prefer for other source types. + * Gets the sslMode property: SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is + * 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. * * @return the sslMode value. */ SslMode sslMode(); /** - * Gets the sourceDbServerMetadata property: Metadata of the source database server. + * Gets the sourceDbServerMetadata property: Metadata of source database server. * * @return the sourceDbServerMetadata value. */ DbServerMetadata sourceDbServerMetadata(); /** - * Gets the targetDbServerMetadata property: Metadata of the target database server. + * Gets the targetDbServerMetadata property: Metadata of target database server. * * @return the targetDbServerMetadata value. */ DbServerMetadata targetDbServerMetadata(); /** - * Gets the sourceDbServerResourceId property: ResourceId of the source database server in case the sourceType is - * PostgreSQLSingleServer. For other source types this should be ipaddress:port@username or + * Gets the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or * hostname:port@username. * * @return the sourceDbServerResourceId value. @@ -136,23 +135,25 @@ public interface MigrationResource { String sourceDbServerResourceId(); /** - * Gets the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Gets the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @return the sourceDbServerFullyQualifiedDomainName value. */ String sourceDbServerFullyQualifiedDomainName(); /** - * Gets the targetDbServerResourceId property: ResourceId of the source database server. + * Gets the targetDbServerResourceId property: Identifier of the target database server resource. * * @return the targetDbServerResourceId value. */ String targetDbServerResourceId(); /** - * Gets the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Gets the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @return the targetDbServerFullyQualifiedDomainName value. */ @@ -166,82 +167,82 @@ public interface MigrationResource { MigrationSecretParameters secretParameters(); /** - * Gets the dbsToMigrate property: Number of databases to migrate. + * Gets the dbsToMigrate property: Names of databases to migrate. * * @return the dbsToMigrate value. */ List dbsToMigrate(); /** - * Gets the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Gets the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @return the setupLogicalReplicationOnSourceDbIfNeeded value. */ - LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded(); + LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded(); /** - * Gets the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Gets the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @return the overwriteDbsInTarget value. */ - OverwriteDbsInTargetEnum overwriteDbsInTarget(); + OverwriteDatabasesOnTargetServer overwriteDbsInTarget(); /** - * Gets the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Gets the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @return the migrationWindowStartTimeInUtc value. */ OffsetDateTime migrationWindowStartTimeInUtc(); /** - * Gets the migrationWindowEndTimeInUtc property: End time in UTC for migration window. + * Gets the migrationWindowEndTimeInUtc property: End time (UTC) for migration window. * * @return the migrationWindowEndTimeInUtc value. */ OffsetDateTime migrationWindowEndTimeInUtc(); /** - * Gets the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Gets the migrateRoles property: Indicates if roles and permissions must be migrated. * * @return the migrateRoles value. */ - MigrateRolesEnum migrateRoles(); + MigrateRolesAndPermissions migrateRoles(); /** - * Gets the startDataMigration property: Indicates whether the data migration should start right away. + * Gets the startDataMigration property: Indicates if data migration must start right away. * * @return the startDataMigration value. */ - StartDataMigrationEnum startDataMigration(); + StartDataMigration startDataMigration(); /** - * Gets the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Gets the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @return the triggerCutover value. */ - TriggerCutoverEnum triggerCutover(); + TriggerCutover triggerCutover(); /** - * Gets the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Gets the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToTriggerCutoverOn value. */ List dbsToTriggerCutoverOn(); /** - * Gets the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Gets the cancel property: Indicates if cancel must be triggered for the entire migration. * * @return the cancel value. */ - CancelEnum cancel(); + Cancel cancel(); /** - * Gets the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Gets the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToCancelMigrationOn value. */ @@ -269,31 +270,31 @@ public interface MigrationResource { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourceInner object. + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner object. * * @return the inner object. */ - MigrationResourceInner innerModel(); + MigrationInner innerModel(); /** - * The entirety of the MigrationResource definition. + * The entirety of the Migration definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } /** - * The MigrationResource definition stages. + * The Migration definition stages. */ interface DefinitionStages { /** - * The first stage of the MigrationResource definition. + * The first stage of the Migration definition. */ interface Blank extends WithLocation { } /** - * The stage of the MigrationResource definition allowing to specify location. + * The stage of the Migration definition allowing to specify location. */ interface WithLocation { /** @@ -314,24 +315,22 @@ interface WithLocation { } /** - * The stage of the MigrationResource definition allowing to specify parent resource. + * The stage of the Migration definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies subscriptionId, resourceGroupName, targetDbServerName. + * Specifies resourceGroupName, serverName. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. * @return the next definition stage. */ - WithCreate withExistingFlexibleServer(String subscriptionId, String resourceGroupName, - String targetDbServerName); + WithCreate withExistingFlexibleServer(String resourceGroupName, String serverName); } /** - * The stage of the MigrationResource definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. + * The stage of the Migration definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. */ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithMigrationInstanceResourceId, DefinitionStages.WithMigrationMode, DefinitionStages.WithMigrationOption, DefinitionStages.WithSourceType, @@ -349,7 +348,7 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithMig * * @return the created resource. */ - MigrationResource create(); + Migration create(); /** * Executes the create request. @@ -357,11 +356,11 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithMig * @param context The context to associate with this operation. * @return the created resource. */ - MigrationResource create(Context context); + Migration create(Context context); } /** - * The stage of the MigrationResource definition allowing to specify tags. + * The stage of the Migration definition allowing to specify tags. */ interface WithTags { /** @@ -374,92 +373,92 @@ interface WithTags { } /** - * The stage of the MigrationResource definition allowing to specify migrationInstanceResourceId. + * The stage of the Migration definition allowing to specify migrationInstanceResourceId. */ interface WithMigrationInstanceResourceId { /** - * Specifies the migrationInstanceResourceId property: ResourceId of the private endpoint migration - * instance. + * Specifies the migrationInstanceResourceId property: Identifier of the private endpoint migration + * instance.. * - * @param migrationInstanceResourceId ResourceId of the private endpoint migration instance. + * @param migrationInstanceResourceId Identifier of the private endpoint migration instance. * @return the next definition stage. */ WithCreate withMigrationInstanceResourceId(String migrationInstanceResourceId); } /** - * The stage of the MigrationResource definition allowing to specify migrationMode. + * The stage of the Migration definition allowing to specify migrationMode. */ interface WithMigrationMode { /** - * Specifies the migrationMode property: There are two types of migration modes Online and Offline. + * Specifies the migrationMode property: Mode used to perform the migration: Online or Offline.. * - * @param migrationMode There are two types of migration modes Online and Offline. + * @param migrationMode Mode used to perform the migration: Online or Offline. * @return the next definition stage. */ WithCreate withMigrationMode(MigrationMode migrationMode); } /** - * The stage of the MigrationResource definition allowing to specify migrationOption. + * The stage of the Migration definition allowing to specify migrationOption. */ interface WithMigrationOption { /** - * Specifies the migrationOption property: This indicates the supported Migration option for the migration. + * Specifies the migrationOption property: Supported option for a migration.. * - * @param migrationOption This indicates the supported Migration option for the migration. + * @param migrationOption Supported option for a migration. * @return the next definition stage. */ WithCreate withMigrationOption(MigrationOption migrationOption); } /** - * The stage of the MigrationResource definition allowing to specify sourceType. + * The stage of the Migration definition allowing to specify sourceType. */ interface WithSourceType { /** - * Specifies the sourceType property: migration source server type : OnPremises, AWS, GCP, AzureVM, - * PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, - * EDB_Oracle_Server, EDB_PostgreSQL, PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, - * Huawei_Compute, Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, Digital_Ocean_Droplets, - * Digital_Ocean_PostgreSQL, or Supabase_PostgreSQL. + * Specifies the sourceType property: Source server type used for the migration: ApsaraDB_RDS, AWS, + * AWS_AURORA, AWS_EC2, AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, + * Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, + * GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, OnPremises, PostgreSQLCosmosDB, + * PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL. * - * @param sourceType migration source server type : OnPremises, AWS, GCP, AzureVM, PostgreSQLSingleServer, - * AWS_RDS, AWS_AURORA, AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, EDB_Oracle_Server, - * EDB_PostgreSQL, PostgreSQLFlexibleServer, PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, - * Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or - * Supabase_PostgreSQL. + * @param sourceType Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, + * AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, + * EDB_Oracle_Server, EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, + * Huawei_Compute, Huawei_RDS, OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, + * PostgreSQLSingleServer, or Supabase_PostgreSQL. * @return the next definition stage. */ WithCreate withSourceType(SourceType sourceType); } /** - * The stage of the MigrationResource definition allowing to specify sslMode. + * The stage of the Migration definition allowing to specify sslMode. */ interface WithSslMode { /** - * Specifies the sslMode property: SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is - * VerifyFull and Prefer for other source types. + * Specifies the sslMode property: SSL mode used by a migration. Default SSL mode for + * 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for other source types is 'Prefer'.. * - * @param sslMode SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and - * Prefer for other source types. + * @param sslMode SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is + * 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. * @return the next definition stage. */ WithCreate withSslMode(SslMode sslMode); } /** - * The stage of the MigrationResource definition allowing to specify sourceDbServerResourceId. + * The stage of the Migration definition allowing to specify sourceDbServerResourceId. */ interface WithSourceDbServerResourceId { /** - * Specifies the sourceDbServerResourceId property: ResourceId of the source database server in case the - * sourceType is PostgreSQLSingleServer. For other source types this should be ipaddress:port@username - * or hostname:port@username. + * Specifies the sourceDbServerResourceId property: Identifier of the source database server resource, when + * 'sourceType' is 'PostgreSQLSingleServer'. For other source types this must be set to + * ipaddress:port@username or hostname:port@username.. * - * @param sourceDbServerResourceId ResourceId of the source database server in case the sourceType is - * PostgreSQLSingleServer. For other source types this should be ipaddress:port@username or + * @param sourceDbServerResourceId Identifier of the source database server resource, when 'sourceType' is + * 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or * hostname:port@username. * @return the next definition stage. */ @@ -467,45 +466,45 @@ interface WithSourceDbServerResourceId { } /** - * The stage of the MigrationResource definition allowing to specify sourceDbServerFullyQualifiedDomainName. + * The stage of the Migration definition allowing to specify sourceDbServerFullyQualifiedDomainName. */ interface WithSourceDbServerFullyQualifiedDomainName { /** - * Specifies the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name - * (FQDN) or IP address. It is a optional value, if customer provide it, migration service will always use - * it for connection. + * Specifies the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP + * address of the source server. This property is optional. When provided, the migration service will always + * use it to connect to the source server.. * - * @param sourceDbServerFullyQualifiedDomainName Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for - * connection. + * @param sourceDbServerFullyQualifiedDomainName Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to + * connect to the source server. * @return the next definition stage. */ WithCreate withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName); } /** - * The stage of the MigrationResource definition allowing to specify targetDbServerFullyQualifiedDomainName. + * The stage of the Migration definition allowing to specify targetDbServerFullyQualifiedDomainName. */ interface WithTargetDbServerFullyQualifiedDomainName { /** - * Specifies the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name - * (FQDN) or IP address. It is a optional value, if customer provide it, migration service will always use - * it for connection. + * Specifies the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP + * address of the target server. This property is optional. When provided, the migration service will always + * use it to connect to the target server.. * - * @param targetDbServerFullyQualifiedDomainName Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for - * connection. + * @param targetDbServerFullyQualifiedDomainName Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to + * connect to the target server. * @return the next definition stage. */ WithCreate withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName); } /** - * The stage of the MigrationResource definition allowing to specify secretParameters. + * The stage of the Migration definition allowing to specify secretParameters. */ interface WithSecretParameters { /** - * Specifies the secretParameters property: Migration secret parameters. + * Specifies the secretParameters property: Migration secret parameters.. * * @param secretParameters Migration secret parameters. * @return the next definition stage. @@ -514,155 +513,154 @@ interface WithSecretParameters { } /** - * The stage of the MigrationResource definition allowing to specify dbsToMigrate. + * The stage of the Migration definition allowing to specify dbsToMigrate. */ interface WithDbsToMigrate { /** - * Specifies the dbsToMigrate property: Number of databases to migrate. + * Specifies the dbsToMigrate property: Names of databases to migrate.. * - * @param dbsToMigrate Number of databases to migrate. + * @param dbsToMigrate Names of databases to migrate. * @return the next definition stage. */ WithCreate withDbsToMigrate(List dbsToMigrate); } /** - * The stage of the MigrationResource definition allowing to specify setupLogicalReplicationOnSourceDbIfNeeded. + * The stage of the Migration definition allowing to specify setupLogicalReplicationOnSourceDbIfNeeded. */ interface WithSetupLogicalReplicationOnSourceDbIfNeeded { /** - * Specifies the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Specifies the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical + * replication on source server, if needed.. * - * @param setupLogicalReplicationOnSourceDbIfNeeded Indicates whether to setup LogicalReplicationOnSourceDb, - * if needed. + * @param setupLogicalReplicationOnSourceDbIfNeeded Indicates whether to setup logical replication on source + * server, if needed. * @return the next definition stage. */ WithCreate withSetupLogicalReplicationOnSourceDbIfNeeded( - LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded); + LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded); } /** - * The stage of the MigrationResource definition allowing to specify overwriteDbsInTarget. + * The stage of the Migration definition allowing to specify overwriteDbsInTarget. */ interface WithOverwriteDbsInTarget { /** - * Specifies the overwriteDbsInTarget property: Indicates whether the databases on the target server can be - * overwritten, if already present. If set to False, the migration workflow will wait for a confirmation, if - * it detects that the database already exists.. + * Specifies the overwriteDbsInTarget property: Indicates if databases on the target server can be + * overwritten when already present. If set to 'False', when the migration workflow detects that the + * database already exists on the target server, it will wait for a confirmation.. * - * @param overwriteDbsInTarget Indicates whether the databases on the target server can be overwritten, if - * already present. If set to False, the migration workflow will wait for a confirmation, if it detects that - * the database already exists. + * @param overwriteDbsInTarget Indicates if databases on the target server can be overwritten when already + * present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * @return the next definition stage. */ - WithCreate withOverwriteDbsInTarget(OverwriteDbsInTargetEnum overwriteDbsInTarget); + WithCreate withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer overwriteDbsInTarget); } /** - * The stage of the MigrationResource definition allowing to specify migrationWindowStartTimeInUtc. + * The stage of the Migration definition allowing to specify migrationWindowStartTimeInUtc. */ interface WithMigrationWindowStartTimeInUtc { /** - * Specifies the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Specifies the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window.. * - * @param migrationWindowStartTimeInUtc Start time in UTC for migration window. + * @param migrationWindowStartTimeInUtc Start time (UTC) for migration window. * @return the next definition stage. */ WithCreate withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc); } /** - * The stage of the MigrationResource definition allowing to specify migrationWindowEndTimeInUtc. + * The stage of the Migration definition allowing to specify migrationWindowEndTimeInUtc. */ interface WithMigrationWindowEndTimeInUtc { /** - * Specifies the migrationWindowEndTimeInUtc property: End time in UTC for migration window. + * Specifies the migrationWindowEndTimeInUtc property: End time (UTC) for migration window.. * - * @param migrationWindowEndTimeInUtc End time in UTC for migration window. + * @param migrationWindowEndTimeInUtc End time (UTC) for migration window. * @return the next definition stage. */ WithCreate withMigrationWindowEndTimeInUtc(OffsetDateTime migrationWindowEndTimeInUtc); } /** - * The stage of the MigrationResource definition allowing to specify migrateRoles. + * The stage of the Migration definition allowing to specify migrateRoles. */ interface WithMigrateRoles { /** - * Specifies the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Specifies the migrateRoles property: Indicates if roles and permissions must be migrated.. * - * @param migrateRoles To migrate roles and permissions we need to send this flag as True. + * @param migrateRoles Indicates if roles and permissions must be migrated. * @return the next definition stage. */ - WithCreate withMigrateRoles(MigrateRolesEnum migrateRoles); + WithCreate withMigrateRoles(MigrateRolesAndPermissions migrateRoles); } /** - * The stage of the MigrationResource definition allowing to specify startDataMigration. + * The stage of the Migration definition allowing to specify startDataMigration. */ interface WithStartDataMigration { /** - * Specifies the startDataMigration property: Indicates whether the data migration should start right away. + * Specifies the startDataMigration property: Indicates if data migration must start right away.. * - * @param startDataMigration Indicates whether the data migration should start right away. + * @param startDataMigration Indicates if data migration must start right away. * @return the next definition stage. */ - WithCreate withStartDataMigration(StartDataMigrationEnum startDataMigration); + WithCreate withStartDataMigration(StartDataMigration startDataMigration); } /** - * The stage of the MigrationResource definition allowing to specify triggerCutover. + * The stage of the Migration definition allowing to specify triggerCutover. */ interface WithTriggerCutover { /** - * Specifies the triggerCutover property: To trigger cutover for entire migration we need to send this flag - * as True. + * Specifies the triggerCutover property: Indicates if cutover must be triggered for the entire migration.. * - * @param triggerCutover To trigger cutover for entire migration we need to send this flag as True. + * @param triggerCutover Indicates if cutover must be triggered for the entire migration. * @return the next definition stage. */ - WithCreate withTriggerCutover(TriggerCutoverEnum triggerCutover); + WithCreate withTriggerCutover(TriggerCutover triggerCutover); } /** - * The stage of the MigrationResource definition allowing to specify dbsToTriggerCutoverOn. + * The stage of the Migration definition allowing to specify dbsToTriggerCutoverOn. */ interface WithDbsToTriggerCutoverOn { /** - * Specifies the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases - * send triggerCutover flag as True and database names in this array. + * Specifies the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array.. * - * @param dbsToTriggerCutoverOn When you want to trigger cutover for specific databases send triggerCutover - * flag as True and database names in this array. + * @param dbsToTriggerCutoverOn When you want to trigger cutover for specific databases set 'triggerCutover' + * to 'True' and the names of the specific databases in this array. * @return the next definition stage. */ WithCreate withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn); } /** - * The stage of the MigrationResource definition allowing to specify cancel. + * The stage of the Migration definition allowing to specify cancel. */ interface WithCancel { /** - * Specifies the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Specifies the cancel property: Indicates if cancel must be triggered for the entire migration.. * - * @param cancel To trigger cancel for entire migration we need to send this flag as True. + * @param cancel Indicates if cancel must be triggered for the entire migration. * @return the next definition stage. */ - WithCreate withCancel(CancelEnum cancel); + WithCreate withCancel(Cancel cancel); } /** - * The stage of the MigrationResource definition allowing to specify dbsToCancelMigrationOn. + * The stage of the Migration definition allowing to specify dbsToCancelMigrationOn. */ interface WithDbsToCancelMigrationOn { /** - * Specifies the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases - * send cancel flag as True and database names in this array. + * Specifies the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array.. * - * @param dbsToCancelMigrationOn When you want to trigger cancel for specific databases send cancel flag as - * True and database names in this array. + * @param dbsToCancelMigrationOn When you want to trigger cancel for specific databases set 'triggerCutover' + * to 'True' and the names of the specific databases in this array. * @return the next definition stage. */ WithCreate withDbsToCancelMigrationOn(List dbsToCancelMigrationOn); @@ -670,14 +668,14 @@ interface WithDbsToCancelMigrationOn { } /** - * Begins update for the MigrationResource resource. + * Begins update for the Migration resource. * * @return the stage of resource update. */ - MigrationResource.Update update(); + Migration.Update update(); /** - * The template for MigrationResource update. + * The template for Migration update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithSourceDbServerResourceId, UpdateStages.WithSourceDbServerFullyQualifiedDomainName, @@ -692,7 +690,7 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithSourceDbServerR * * @return the updated resource. */ - MigrationResource apply(); + Migration apply(); /** * Executes the update request. @@ -700,15 +698,15 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithSourceDbServerR * @param context The context to associate with this operation. * @return the updated resource. */ - MigrationResource apply(Context context); + Migration apply(Context context); } /** - * The MigrationResource update stages. + * The Migration update stages. */ interface UpdateStages { /** - * The stage of the MigrationResource update allowing to specify tags. + * The stage of the Migration update allowing to specify tags. */ interface WithTags { /** @@ -721,215 +719,218 @@ interface WithTags { } /** - * The stage of the MigrationResource update allowing to specify sourceDbServerResourceId. + * The stage of the Migration update allowing to specify sourceDbServerResourceId. */ interface WithSourceDbServerResourceId { /** - * Specifies the sourceDbServerResourceId property: ResourceId of the source database server. + * Specifies the sourceDbServerResourceId property: Identifier of the source database server resource, when + * 'sourceType' is 'PostgreSQLSingleServer'. For other source types this must be set to + * ipaddress:port@username or hostname:port@username.. * - * @param sourceDbServerResourceId ResourceId of the source database server. + * @param sourceDbServerResourceId Identifier of the source database server resource, when 'sourceType' is + * 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or + * hostname:port@username. * @return the next definition stage. */ Update withSourceDbServerResourceId(String sourceDbServerResourceId); } /** - * The stage of the MigrationResource update allowing to specify sourceDbServerFullyQualifiedDomainName. + * The stage of the Migration update allowing to specify sourceDbServerFullyQualifiedDomainName. */ interface WithSourceDbServerFullyQualifiedDomainName { /** - * Specifies the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name - * (FQDN) or IP address. It is a optional value, if customer provide it, migration service will always use - * it for connection. + * Specifies the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP + * address of the source server. This property is optional. When provided, the migration service will always + * use it to connect to the source server.. * - * @param sourceDbServerFullyQualifiedDomainName Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for - * connection. + * @param sourceDbServerFullyQualifiedDomainName Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to + * connect to the source server. * @return the next definition stage. */ Update withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName); } /** - * The stage of the MigrationResource update allowing to specify targetDbServerFullyQualifiedDomainName. + * The stage of the Migration update allowing to specify targetDbServerFullyQualifiedDomainName. */ interface WithTargetDbServerFullyQualifiedDomainName { /** - * Specifies the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name - * (FQDN) or IP address. It is a optional value, if customer provide it, migration service will always use - * it for connection. + * Specifies the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP + * address of the target server. This property is optional. When provided, the migration service will always + * use it to connect to the target server.. * - * @param targetDbServerFullyQualifiedDomainName Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for - * connection. + * @param targetDbServerFullyQualifiedDomainName Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to + * connect to the target server. * @return the next definition stage. */ Update withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName); } /** - * The stage of the MigrationResource update allowing to specify secretParameters. + * The stage of the Migration update allowing to specify secretParameters. */ interface WithSecretParameters { /** - * Specifies the secretParameters property: Migration secret parameters. + * Specifies the secretParameters property: Migration secret parameters.. * * @param secretParameters Migration secret parameters. * @return the next definition stage. */ - Update withSecretParameters(MigrationSecretParameters secretParameters); + Update withSecretParameters(MigrationSecretParametersForPatch secretParameters); } /** - * The stage of the MigrationResource update allowing to specify dbsToMigrate. + * The stage of the Migration update allowing to specify dbsToMigrate. */ interface WithDbsToMigrate { /** - * Specifies the dbsToMigrate property: Number of databases to migrate. + * Specifies the dbsToMigrate property: Names of databases to migrate.. * - * @param dbsToMigrate Number of databases to migrate. + * @param dbsToMigrate Names of databases to migrate. * @return the next definition stage. */ Update withDbsToMigrate(List dbsToMigrate); } /** - * The stage of the MigrationResource update allowing to specify setupLogicalReplicationOnSourceDbIfNeeded. + * The stage of the Migration update allowing to specify setupLogicalReplicationOnSourceDbIfNeeded. */ interface WithSetupLogicalReplicationOnSourceDbIfNeeded { /** - * Specifies the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Specifies the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical + * replication on source server, if needed.. * - * @param setupLogicalReplicationOnSourceDbIfNeeded Indicates whether to setup LogicalReplicationOnSourceDb, - * if needed. + * @param setupLogicalReplicationOnSourceDbIfNeeded Indicates whether to setup logical replication on source + * server, if needed. * @return the next definition stage. */ Update withSetupLogicalReplicationOnSourceDbIfNeeded( - LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded); + LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded); } /** - * The stage of the MigrationResource update allowing to specify overwriteDbsInTarget. + * The stage of the Migration update allowing to specify overwriteDbsInTarget. */ interface WithOverwriteDbsInTarget { /** - * Specifies the overwriteDbsInTarget property: Indicates whether the databases on the target server can be - * overwritten, if already present. If set to False, the migration workflow will wait for a confirmation, if - * it detects that the database already exists.. + * Specifies the overwriteDbsInTarget property: Indicates if databases on the target server can be + * overwritten when already present. If set to 'False', when the migration workflow detects that the + * database already exists on the target server, it will wait for a confirmation.. * - * @param overwriteDbsInTarget Indicates whether the databases on the target server can be overwritten, if - * already present. If set to False, the migration workflow will wait for a confirmation, if it detects that - * the database already exists. + * @param overwriteDbsInTarget Indicates if databases on the target server can be overwritten when already + * present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * @return the next definition stage. */ - Update withOverwriteDbsInTarget(OverwriteDbsInTargetEnum overwriteDbsInTarget); + Update withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer overwriteDbsInTarget); } /** - * The stage of the MigrationResource update allowing to specify migrationWindowStartTimeInUtc. + * The stage of the Migration update allowing to specify migrationWindowStartTimeInUtc. */ interface WithMigrationWindowStartTimeInUtc { /** - * Specifies the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Specifies the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window.. * - * @param migrationWindowStartTimeInUtc Start time in UTC for migration window. + * @param migrationWindowStartTimeInUtc Start time (UTC) for migration window. * @return the next definition stage. */ Update withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc); } /** - * The stage of the MigrationResource update allowing to specify migrateRoles. + * The stage of the Migration update allowing to specify migrateRoles. */ interface WithMigrateRoles { /** - * Specifies the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Specifies the migrateRoles property: Indicates if roles and permissions must be migrated.. * - * @param migrateRoles To migrate roles and permissions we need to send this flag as True. + * @param migrateRoles Indicates if roles and permissions must be migrated. * @return the next definition stage. */ - Update withMigrateRoles(MigrateRolesEnum migrateRoles); + Update withMigrateRoles(MigrateRolesAndPermissions migrateRoles); } /** - * The stage of the MigrationResource update allowing to specify startDataMigration. + * The stage of the Migration update allowing to specify startDataMigration. */ interface WithStartDataMigration { /** - * Specifies the startDataMigration property: Indicates whether the data migration should start right away. + * Specifies the startDataMigration property: Indicates if data migration must start right away.. * - * @param startDataMigration Indicates whether the data migration should start right away. + * @param startDataMigration Indicates if data migration must start right away. * @return the next definition stage. */ - Update withStartDataMigration(StartDataMigrationEnum startDataMigration); + Update withStartDataMigration(StartDataMigration startDataMigration); } /** - * The stage of the MigrationResource update allowing to specify triggerCutover. + * The stage of the Migration update allowing to specify triggerCutover. */ interface WithTriggerCutover { /** - * Specifies the triggerCutover property: To trigger cutover for entire migration we need to send this flag - * as True. + * Specifies the triggerCutover property: Indicates if cutover must be triggered for the entire migration.. * - * @param triggerCutover To trigger cutover for entire migration we need to send this flag as True. + * @param triggerCutover Indicates if cutover must be triggered for the entire migration. * @return the next definition stage. */ - Update withTriggerCutover(TriggerCutoverEnum triggerCutover); + Update withTriggerCutover(TriggerCutover triggerCutover); } /** - * The stage of the MigrationResource update allowing to specify dbsToTriggerCutoverOn. + * The stage of the Migration update allowing to specify dbsToTriggerCutoverOn. */ interface WithDbsToTriggerCutoverOn { /** - * Specifies the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases - * send triggerCutover flag as True and database names in this array. + * Specifies the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array.. * - * @param dbsToTriggerCutoverOn When you want to trigger cutover for specific databases send triggerCutover - * flag as True and database names in this array. + * @param dbsToTriggerCutoverOn When you want to trigger cutover for specific databases set 'triggerCutover' + * to 'True' and the names of the specific databases in this array. * @return the next definition stage. */ Update withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn); } /** - * The stage of the MigrationResource update allowing to specify cancel. + * The stage of the Migration update allowing to specify cancel. */ interface WithCancel { /** - * Specifies the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Specifies the cancel property: Indicates if cancel must be triggered for the entire migration.. * - * @param cancel To trigger cancel for entire migration we need to send this flag as True. + * @param cancel Indicates if cancel must be triggered for the entire migration. * @return the next definition stage. */ - Update withCancel(CancelEnum cancel); + Update withCancel(Cancel cancel); } /** - * The stage of the MigrationResource update allowing to specify dbsToCancelMigrationOn. + * The stage of the Migration update allowing to specify dbsToCancelMigrationOn. */ interface WithDbsToCancelMigrationOn { /** - * Specifies the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases - * send cancel flag as True and database names in this array. + * Specifies the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array.. * - * @param dbsToCancelMigrationOn When you want to trigger cancel for specific databases send cancel flag as - * True and database names in this array. + * @param dbsToCancelMigrationOn When you want to trigger cancel for specific databases set 'triggerCutover' + * to 'True' and the names of the specific databases in this array. * @return the next definition stage. */ Update withDbsToCancelMigrationOn(List dbsToCancelMigrationOn); } /** - * The stage of the MigrationResource update allowing to specify migrationMode. + * The stage of the Migration update allowing to specify migrationMode. */ interface WithMigrationMode { /** - * Specifies the migrationMode property: There are two types of migration modes Online and Offline. + * Specifies the migrationMode property: Mode used to perform the migration: Online or Offline.. * - * @param migrationMode There are two types of migration modes Online and Offline. + * @param migrationMode Mode used to perform the migration: Online or Offline. * @return the next definition stage. */ Update withMigrationMode(MigrationMode migrationMode); @@ -941,7 +942,7 @@ interface WithMigrationMode { * * @return the refreshed resource. */ - MigrationResource refresh(); + Migration refresh(); /** * Refreshes the resource to sync with Azure. @@ -949,5 +950,5 @@ interface WithMigrationMode { * @param context The context to associate with this operation. * @return the refreshed resource. */ - MigrationResource refresh(Context context); + Migration refresh(Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDatabaseState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDatabaseState.java new file mode 100644 index 000000000000..035b72a8650d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDatabaseState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Migration state of a database. + */ +public final class MigrationDatabaseState extends ExpandableStringEnum { + /** + * Static value InProgress for MigrationDatabaseState. + */ + public static final MigrationDatabaseState IN_PROGRESS = fromString("InProgress"); + + /** + * Static value WaitingForCutoverTrigger for MigrationDatabaseState. + */ + public static final MigrationDatabaseState WAITING_FOR_CUTOVER_TRIGGER = fromString("WaitingForCutoverTrigger"); + + /** + * Static value Failed for MigrationDatabaseState. + */ + public static final MigrationDatabaseState FAILED = fromString("Failed"); + + /** + * Static value Canceled for MigrationDatabaseState. + */ + public static final MigrationDatabaseState CANCELED = fromString("Canceled"); + + /** + * Static value Succeeded for MigrationDatabaseState. + */ + public static final MigrationDatabaseState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Canceling for MigrationDatabaseState. + */ + public static final MigrationDatabaseState CANCELING = fromString("Canceling"); + + /** + * Creates a new instance of MigrationDatabaseState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MigrationDatabaseState() { + } + + /** + * Creates or finds a MigrationDatabaseState from its string representation. + * + * @param name a name to look for. + * @return the corresponding MigrationDatabaseState. + */ + public static MigrationDatabaseState fromString(String name) { + return fromString(name, MigrationDatabaseState.class); + } + + /** + * Gets known MigrationDatabaseState values. + * + * @return known MigrationDatabaseState values. + */ + public static Collection values() { + return values(MigrationDatabaseState.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDbState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDbState.java deleted file mode 100644 index ed842cf5d76a..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDbState.java +++ /dev/null @@ -1,71 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Migration db state of an individual database. - */ -public final class MigrationDbState extends ExpandableStringEnum { - /** - * Static value InProgress for MigrationDbState. - */ - public static final MigrationDbState IN_PROGRESS = fromString("InProgress"); - - /** - * Static value WaitingForCutoverTrigger for MigrationDbState. - */ - public static final MigrationDbState WAITING_FOR_CUTOVER_TRIGGER = fromString("WaitingForCutoverTrigger"); - - /** - * Static value Failed for MigrationDbState. - */ - public static final MigrationDbState FAILED = fromString("Failed"); - - /** - * Static value Canceled for MigrationDbState. - */ - public static final MigrationDbState CANCELED = fromString("Canceled"); - - /** - * Static value Succeeded for MigrationDbState. - */ - public static final MigrationDbState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Canceling for MigrationDbState. - */ - public static final MigrationDbState CANCELING = fromString("Canceling"); - - /** - * Creates a new instance of MigrationDbState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MigrationDbState() { - } - - /** - * Creates or finds a MigrationDbState from its string representation. - * - * @param name a name to look for. - * @return the corresponding MigrationDbState. - */ - public static MigrationDbState fromString(String name) { - return fromString(name, MigrationDbState.class); - } - - /** - * Gets known MigrationDbState values. - * - * @return known MigrationDbState values. - */ - public static Collection values() { - return values(MigrationDbState.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationList.java similarity index 53% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationList.java index bc9e2a934a56..bfde555cd22e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationList.java @@ -4,47 +4,47 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner; import java.io.IOException; import java.util.List; /** - * A list of migration resources. + * List of migrations. */ -@Immutable -public final class MigrationResourceListResult implements JsonSerializable { +@Fluent +public final class MigrationList implements JsonSerializable { /* - * A list of migration resources. + * List of migrations. */ - private List value; + private List value; /* - * The link used to get the next page of migrations. + * Link used to get the next page of results. */ private String nextLink; /** - * Creates an instance of MigrationResourceListResult class. + * Creates an instance of MigrationList class. */ - public MigrationResourceListResult() { + public MigrationList() { } /** - * Get the value property: A list of migration resources. + * Get the value property: List of migrations. * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** - * Get the nextLink property: The link used to get the next page of migrations. + * Get the nextLink property: Link used to get the next page of results. * * @return the nextLink value. */ @@ -52,6 +52,17 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: Link used to get the next page of results. + * + * @param nextLink the nextLink value to set. + * @return the MigrationList object itself. + */ + public MigrationList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + /** * Validates the instance. * @@ -69,36 +80,36 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } /** - * Reads an instance of MigrationResourceListResult from the JsonReader. + * Reads an instance of MigrationList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of MigrationResourceListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MigrationResourceListResult. + * @return An instance of MigrationList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MigrationList. */ - public static MigrationResourceListResult fromJson(JsonReader jsonReader) throws IOException { + public static MigrationList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - MigrationResourceListResult deserializedMigrationResourceListResult = new MigrationResourceListResult(); + MigrationList deserializedMigrationList = new MigrationList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> MigrationResourceInner.fromJson(reader1)); - deserializedMigrationResourceListResult.value = value; + List value = reader.readArray(reader1 -> MigrationInner.fromJson(reader1)); + deserializedMigrationList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedMigrationResourceListResult.nextLink = reader.getString(); + deserializedMigrationList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedMigrationResourceListResult; + return deserializedMigrationList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationMode.java index 36d110649206..1e2736bfa640 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationMode.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationMode.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * There are two types of migration modes Online and Offline. + * Mode used to perform the migration: Online or Offline. */ public final class MigrationMode extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailabilityResource.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailability.java similarity index 65% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailabilityResource.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailability.java index 9c330c945fe2..48d7651ec1c4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailabilityResource.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailability.java @@ -4,28 +4,28 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; /** - * An immutable client-side representation of MigrationNameAvailabilityResource. + * An immutable client-side representation of MigrationNameAvailability. */ -public interface MigrationNameAvailabilityResource { +public interface MigrationNameAvailability { /** - * Gets the name property: The resource name to verify. + * Gets the name property: Name of the migration to check for validity and availability. * * @return the name value. */ String name(); /** - * Gets the type property: The type of the resource. + * Gets the type property: Type of resource. * * @return the type value. */ String type(); /** - * Gets the nameAvailable property: Indicates whether the resource name is available. + * Gets the nameAvailable property: Indicates if the migration name is available. * * @return the nameAvailable value. */ @@ -46,10 +46,10 @@ public interface MigrationNameAvailabilityResource { String message(); /** - * Gets the inner - * com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner object. + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner + * object. * * @return the inner object. */ - MigrationNameAvailabilityResourceInner innerModel(); + MigrationNameAvailabilityInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationOption.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationOption.java index 38200446927c..9e732bdcf897 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationOption.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationOption.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Supported types of migration request include Validate, Migrate and ValidateAndMigrate. + * Supported option for a migration. */ public final class MigrationOption extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceForPatch.java index b8b0e86a95a7..4649165b23aa 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceForPatch.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceForPatch.java @@ -9,21 +9,21 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourcePropertiesForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationPropertiesForPatch; import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** - * Represents a migration resource for patch. + * Migration. */ @Fluent public final class MigrationResourceForPatch implements JsonSerializable { /* - * Migration resource properties. + * Migration properties. */ - private MigrationResourcePropertiesForPatch innerProperties; + private MigrationPropertiesForPatch innerProperties; /* * Application-specific metadata in the form of key-value pairs. @@ -37,11 +37,11 @@ public MigrationResourceForPatch() { } /** - * Get the innerProperties property: Migration resource properties. + * Get the innerProperties property: Migration properties. * * @return the innerProperties value. */ - private MigrationResourcePropertiesForPatch innerProperties() { + private MigrationPropertiesForPatch innerProperties() { return this.innerProperties; } @@ -66,7 +66,9 @@ public MigrationResourceForPatch withTags(Map tags) { } /** - * Get the sourceDbServerResourceId property: ResourceId of the source database server. + * Get the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or + * hostname:port@username. * * @return the sourceDbServerResourceId value. */ @@ -75,22 +77,25 @@ public String sourceDbServerResourceId() { } /** - * Set the sourceDbServerResourceId property: ResourceId of the source database server. + * Set the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' + * is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or + * hostname:port@username. * * @param sourceDbServerResourceId the sourceDbServerResourceId value to set. * @return the MigrationResourceForPatch object itself. */ public MigrationResourceForPatch withSourceDbServerResourceId(String sourceDbServerResourceId) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withSourceDbServerResourceId(sourceDbServerResourceId); return this; } /** - * Get the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Get the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @return the sourceDbServerFullyQualifiedDomainName value. */ @@ -99,8 +104,9 @@ public String sourceDbServerFullyQualifiedDomainName() { } /** - * Set the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Set the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * source server. This property is optional. When provided, the migration service will always use it to connect to + * the source server. * * @param sourceDbServerFullyQualifiedDomainName the sourceDbServerFullyQualifiedDomainName value to set. * @return the MigrationResourceForPatch object itself. @@ -108,15 +114,16 @@ public String sourceDbServerFullyQualifiedDomainName() { public MigrationResourceForPatch withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withSourceDbServerFullyQualifiedDomainName(sourceDbServerFullyQualifiedDomainName); return this; } /** - * Get the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Get the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @return the targetDbServerFullyQualifiedDomainName value. */ @@ -125,8 +132,9 @@ public String targetDbServerFullyQualifiedDomainName() { } /** - * Set the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP - * address. It is a optional value, if customer provide it, migration service will always use it for connection. + * Set the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the + * target server. This property is optional. When provided, the migration service will always use it to connect to + * the target server. * * @param targetDbServerFullyQualifiedDomainName the targetDbServerFullyQualifiedDomainName value to set. * @return the MigrationResourceForPatch object itself. @@ -134,7 +142,7 @@ public String targetDbServerFullyQualifiedDomainName() { public MigrationResourceForPatch withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withTargetDbServerFullyQualifiedDomainName(targetDbServerFullyQualifiedDomainName); return this; @@ -145,7 +153,7 @@ public String targetDbServerFullyQualifiedDomainName() { * * @return the secretParameters value. */ - public MigrationSecretParameters secretParameters() { + public MigrationSecretParametersForPatch secretParameters() { return this.innerProperties() == null ? null : this.innerProperties().secretParameters(); } @@ -155,16 +163,16 @@ public MigrationSecretParameters secretParameters() { * @param secretParameters the secretParameters value to set. * @return the MigrationResourceForPatch object itself. */ - public MigrationResourceForPatch withSecretParameters(MigrationSecretParameters secretParameters) { + public MigrationResourceForPatch withSecretParameters(MigrationSecretParametersForPatch secretParameters) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withSecretParameters(secretParameters); return this; } /** - * Get the dbsToMigrate property: Number of databases to migrate. + * Get the dbsToMigrate property: Names of databases to migrate. * * @return the dbsToMigrate value. */ @@ -173,76 +181,76 @@ public List dbsToMigrate() { } /** - * Set the dbsToMigrate property: Number of databases to migrate. + * Set the dbsToMigrate property: Names of databases to migrate. * * @param dbsToMigrate the dbsToMigrate value to set. * @return the MigrationResourceForPatch object itself. */ public MigrationResourceForPatch withDbsToMigrate(List dbsToMigrate) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withDbsToMigrate(dbsToMigrate); return this; } /** - * Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @return the setupLogicalReplicationOnSourceDbIfNeeded value. */ - public LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded() { + public LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded() { return this.innerProperties() == null ? null : this.innerProperties().setupLogicalReplicationOnSourceDbIfNeeded(); } /** - * Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup - * LogicalReplicationOnSourceDb, if needed. + * Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on + * source server, if needed. * * @param setupLogicalReplicationOnSourceDbIfNeeded the setupLogicalReplicationOnSourceDbIfNeeded value to set. * @return the MigrationResourceForPatch object itself. */ public MigrationResourceForPatch withSetupLogicalReplicationOnSourceDbIfNeeded( - LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded) { + LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withSetupLogicalReplicationOnSourceDbIfNeeded(setupLogicalReplicationOnSourceDbIfNeeded); return this; } /** - * Get the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Get the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @return the overwriteDbsInTarget value. */ - public OverwriteDbsInTargetEnum overwriteDbsInTarget() { + public OverwriteDatabasesOnTargetServer overwriteDbsInTarget() { return this.innerProperties() == null ? null : this.innerProperties().overwriteDbsInTarget(); } /** - * Set the overwriteDbsInTarget property: Indicates whether the databases on the target server can be overwritten, - * if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the - * database already exists. + * Set the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when + * already present. If set to 'False', when the migration workflow detects that the database already exists on the + * target server, it will wait for a confirmation. * * @param overwriteDbsInTarget the overwriteDbsInTarget value to set. * @return the MigrationResourceForPatch object itself. */ - public MigrationResourceForPatch withOverwriteDbsInTarget(OverwriteDbsInTargetEnum overwriteDbsInTarget) { + public MigrationResourceForPatch withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer overwriteDbsInTarget) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withOverwriteDbsInTarget(overwriteDbsInTarget); return this; } /** - * Get the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Get the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @return the migrationWindowStartTimeInUtc value. */ @@ -251,91 +259,91 @@ public OffsetDateTime migrationWindowStartTimeInUtc() { } /** - * Set the migrationWindowStartTimeInUtc property: Start time in UTC for migration window. + * Set the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window. * * @param migrationWindowStartTimeInUtc the migrationWindowStartTimeInUtc value to set. * @return the MigrationResourceForPatch object itself. */ public MigrationResourceForPatch withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withMigrationWindowStartTimeInUtc(migrationWindowStartTimeInUtc); return this; } /** - * Get the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Get the migrateRoles property: Indicates if roles and permissions must be migrated. * * @return the migrateRoles value. */ - public MigrateRolesEnum migrateRoles() { + public MigrateRolesAndPermissions migrateRoles() { return this.innerProperties() == null ? null : this.innerProperties().migrateRoles(); } /** - * Set the migrateRoles property: To migrate roles and permissions we need to send this flag as True. + * Set the migrateRoles property: Indicates if roles and permissions must be migrated. * * @param migrateRoles the migrateRoles value to set. * @return the MigrationResourceForPatch object itself. */ - public MigrationResourceForPatch withMigrateRoles(MigrateRolesEnum migrateRoles) { + public MigrationResourceForPatch withMigrateRoles(MigrateRolesAndPermissions migrateRoles) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withMigrateRoles(migrateRoles); return this; } /** - * Get the startDataMigration property: Indicates whether the data migration should start right away. + * Get the startDataMigration property: Indicates if data migration must start right away. * * @return the startDataMigration value. */ - public StartDataMigrationEnum startDataMigration() { + public StartDataMigration startDataMigration() { return this.innerProperties() == null ? null : this.innerProperties().startDataMigration(); } /** - * Set the startDataMigration property: Indicates whether the data migration should start right away. + * Set the startDataMigration property: Indicates if data migration must start right away. * * @param startDataMigration the startDataMigration value to set. * @return the MigrationResourceForPatch object itself. */ - public MigrationResourceForPatch withStartDataMigration(StartDataMigrationEnum startDataMigration) { + public MigrationResourceForPatch withStartDataMigration(StartDataMigration startDataMigration) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withStartDataMigration(startDataMigration); return this; } /** - * Get the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Get the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @return the triggerCutover value. */ - public TriggerCutoverEnum triggerCutover() { + public TriggerCutover triggerCutover() { return this.innerProperties() == null ? null : this.innerProperties().triggerCutover(); } /** - * Set the triggerCutover property: To trigger cutover for entire migration we need to send this flag as True. + * Set the triggerCutover property: Indicates if cutover must be triggered for the entire migration. * * @param triggerCutover the triggerCutover value to set. * @return the MigrationResourceForPatch object itself. */ - public MigrationResourceForPatch withTriggerCutover(TriggerCutoverEnum triggerCutover) { + public MigrationResourceForPatch withTriggerCutover(TriggerCutover triggerCutover) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withTriggerCutover(triggerCutover); return this; } /** - * Get the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Get the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToTriggerCutoverOn value. */ @@ -344,46 +352,46 @@ public List dbsToTriggerCutoverOn() { } /** - * Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases send - * triggerCutover flag as True and database names in this array. + * Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @param dbsToTriggerCutoverOn the dbsToTriggerCutoverOn value to set. * @return the MigrationResourceForPatch object itself. */ public MigrationResourceForPatch withDbsToTriggerCutoverOn(List dbsToTriggerCutoverOn) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withDbsToTriggerCutoverOn(dbsToTriggerCutoverOn); return this; } /** - * Get the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Get the cancel property: Indicates if cancel must be triggered for the entire migration. * * @return the cancel value. */ - public CancelEnum cancel() { + public Cancel cancel() { return this.innerProperties() == null ? null : this.innerProperties().cancel(); } /** - * Set the cancel property: To trigger cancel for entire migration we need to send this flag as True. + * Set the cancel property: Indicates if cancel must be triggered for the entire migration. * * @param cancel the cancel value to set. * @return the MigrationResourceForPatch object itself. */ - public MigrationResourceForPatch withCancel(CancelEnum cancel) { + public MigrationResourceForPatch withCancel(Cancel cancel) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withCancel(cancel); return this; } /** - * Get the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Get the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @return the dbsToCancelMigrationOn value. */ @@ -392,22 +400,22 @@ public List dbsToCancelMigrationOn() { } /** - * Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases send cancel flag - * as True and database names in this array. + * Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set + * 'triggerCutover' to 'True' and the names of the specific databases in this array. * * @param dbsToCancelMigrationOn the dbsToCancelMigrationOn value to set. * @return the MigrationResourceForPatch object itself. */ public MigrationResourceForPatch withDbsToCancelMigrationOn(List dbsToCancelMigrationOn) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withDbsToCancelMigrationOn(dbsToCancelMigrationOn); return this; } /** - * Get the migrationMode property: There are two types of migration modes Online and Offline. + * Get the migrationMode property: Mode used to perform the migration: Online or Offline. * * @return the migrationMode value. */ @@ -416,14 +424,14 @@ public MigrationMode migrationMode() { } /** - * Set the migrationMode property: There are two types of migration modes Online and Offline. + * Set the migrationMode property: Mode used to perform the migration: Online or Offline. * * @param migrationMode the migrationMode value to set. * @return the MigrationResourceForPatch object itself. */ public MigrationResourceForPatch withMigrationMode(MigrationMode migrationMode) { if (this.innerProperties() == null) { - this.innerProperties = new MigrationResourcePropertiesForPatch(); + this.innerProperties = new MigrationPropertiesForPatch(); } this.innerProperties().withMigrationMode(migrationMode); return this; @@ -468,7 +476,7 @@ public static MigrationResourceForPatch fromJson(JsonReader jsonReader) throws I if ("properties".equals(fieldName)) { deserializedMigrationResourceForPatch.innerProperties - = MigrationResourcePropertiesForPatch.fromJson(reader); + = MigrationPropertiesForPatch.fromJson(reader); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedMigrationResourceForPatch.tags = tags; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParameters.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParameters.java index 853d1b6d87a4..53bfc0a85dba 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParameters.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParameters.java @@ -18,17 +18,17 @@ @Fluent public final class MigrationSecretParameters implements JsonSerializable { /* - * Admin credentials for source and target servers + * Credentials of administrator users for source and target servers. */ private AdminCredentials adminCredentials; /* - * Gets or sets the username for the source server. This user need not be an admin. + * Gets or sets the name of the user for the source server. This user doesn't need to be an administrator. */ private String sourceServerUsername; /* - * Gets or sets the username for the target server. This user need not be an admin. + * Gets or sets the name of the user for the target server. This user doesn't need to be an administrator. */ private String targetServerUsername; @@ -39,7 +39,7 @@ public MigrationSecretParameters() { } /** - * Get the adminCredentials property: Admin credentials for source and target servers. + * Get the adminCredentials property: Credentials of administrator users for source and target servers. * * @return the adminCredentials value. */ @@ -48,7 +48,7 @@ public AdminCredentials adminCredentials() { } /** - * Set the adminCredentials property: Admin credentials for source and target servers. + * Set the adminCredentials property: Credentials of administrator users for source and target servers. * * @param adminCredentials the adminCredentials value to set. * @return the MigrationSecretParameters object itself. @@ -59,8 +59,8 @@ public MigrationSecretParameters withAdminCredentials(AdminCredentials adminCred } /** - * Get the sourceServerUsername property: Gets or sets the username for the source server. This user need not be an - * admin. + * Get the sourceServerUsername property: Gets or sets the name of the user for the source server. This user doesn't + * need to be an administrator. * * @return the sourceServerUsername value. */ @@ -69,8 +69,8 @@ public String sourceServerUsername() { } /** - * Set the sourceServerUsername property: Gets or sets the username for the source server. This user need not be an - * admin. + * Set the sourceServerUsername property: Gets or sets the name of the user for the source server. This user doesn't + * need to be an administrator. * * @param sourceServerUsername the sourceServerUsername value to set. * @return the MigrationSecretParameters object itself. @@ -81,8 +81,8 @@ public MigrationSecretParameters withSourceServerUsername(String sourceServerUse } /** - * Get the targetServerUsername property: Gets or sets the username for the target server. This user need not be an - * admin. + * Get the targetServerUsername property: Gets or sets the name of the user for the target server. This user doesn't + * need to be an administrator. * * @return the targetServerUsername value. */ @@ -91,8 +91,8 @@ public String targetServerUsername() { } /** - * Set the targetServerUsername property: Gets or sets the username for the target server. This user need not be an - * admin. + * Set the targetServerUsername property: Gets or sets the name of the user for the target server. This user doesn't + * need to be an administrator. * * @param targetServerUsername the targetServerUsername value to set. * @return the MigrationSecretParameters object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParametersForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParametersForPatch.java new file mode 100644 index 000000000000..41e7e2120873 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParametersForPatch.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Migration secret parameters. + */ +@Fluent +public final class MigrationSecretParametersForPatch implements JsonSerializable { + /* + * Credentials of administrator users for source and target servers. + */ + private AdminCredentialsForPatch adminCredentials; + + /* + * Gets or sets the name of the user for the source server. This user doesn't need to be an administrator. + */ + private String sourceServerUsername; + + /* + * Gets or sets the name of the user for the target server. This user doesn't need to be an administrator. + */ + private String targetServerUsername; + + /** + * Creates an instance of MigrationSecretParametersForPatch class. + */ + public MigrationSecretParametersForPatch() { + } + + /** + * Get the adminCredentials property: Credentials of administrator users for source and target servers. + * + * @return the adminCredentials value. + */ + public AdminCredentialsForPatch adminCredentials() { + return this.adminCredentials; + } + + /** + * Set the adminCredentials property: Credentials of administrator users for source and target servers. + * + * @param adminCredentials the adminCredentials value to set. + * @return the MigrationSecretParametersForPatch object itself. + */ + public MigrationSecretParametersForPatch withAdminCredentials(AdminCredentialsForPatch adminCredentials) { + this.adminCredentials = adminCredentials; + return this; + } + + /** + * Get the sourceServerUsername property: Gets or sets the name of the user for the source server. This user doesn't + * need to be an administrator. + * + * @return the sourceServerUsername value. + */ + public String sourceServerUsername() { + return this.sourceServerUsername; + } + + /** + * Set the sourceServerUsername property: Gets or sets the name of the user for the source server. This user doesn't + * need to be an administrator. + * + * @param sourceServerUsername the sourceServerUsername value to set. + * @return the MigrationSecretParametersForPatch object itself. + */ + public MigrationSecretParametersForPatch withSourceServerUsername(String sourceServerUsername) { + this.sourceServerUsername = sourceServerUsername; + return this; + } + + /** + * Get the targetServerUsername property: Gets or sets the name of the user for the target server. This user doesn't + * need to be an administrator. + * + * @return the targetServerUsername value. + */ + public String targetServerUsername() { + return this.targetServerUsername; + } + + /** + * Set the targetServerUsername property: Gets or sets the name of the user for the target server. This user doesn't + * need to be an administrator. + * + * @param targetServerUsername the targetServerUsername value to set. + * @return the MigrationSecretParametersForPatch object itself. + */ + public MigrationSecretParametersForPatch withTargetServerUsername(String targetServerUsername) { + this.targetServerUsername = targetServerUsername; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (adminCredentials() != null) { + adminCredentials().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("adminCredentials", this.adminCredentials); + jsonWriter.writeStringField("sourceServerUsername", this.sourceServerUsername); + jsonWriter.writeStringField("targetServerUsername", this.targetServerUsername); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MigrationSecretParametersForPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MigrationSecretParametersForPatch if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MigrationSecretParametersForPatch. + */ + public static MigrationSecretParametersForPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MigrationSecretParametersForPatch deserializedMigrationSecretParametersForPatch + = new MigrationSecretParametersForPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("adminCredentials".equals(fieldName)) { + deserializedMigrationSecretParametersForPatch.adminCredentials + = AdminCredentialsForPatch.fromJson(reader); + } else if ("sourceServerUsername".equals(fieldName)) { + deserializedMigrationSecretParametersForPatch.sourceServerUsername = reader.getString(); + } else if ("targetServerUsername".equals(fieldName)) { + deserializedMigrationSecretParametersForPatch.targetServerUsername = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMigrationSecretParametersForPatch; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationState.java index 096b4722de9a..c48fb234260b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationState.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationState.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Migration state. + * State of migration. */ public final class MigrationState extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationStatus.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationStatus.java index 8843c803a219..592eb787199f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationStatus.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationStatus.java @@ -12,24 +12,24 @@ import java.io.IOException; /** - * Migration status. + * State of migration. */ @Immutable public final class MigrationStatus implements JsonSerializable { /* - * State of migration + * State of migration. */ private MigrationState state; /* - * Error message, if any, for the migration state + * Error message, if any, for the migration state. */ private String error; /* - * Current Migration sub state details. + * Current migration sub state details. */ - private MigrationSubStateDetails currentSubStateDetails; + private MigrationSubstateDetails currentSubStateDetails; /** * Creates an instance of MigrationStatus class. @@ -56,11 +56,11 @@ public String error() { } /** - * Get the currentSubStateDetails property: Current Migration sub state details. + * Get the currentSubStateDetails property: Current migration sub state details. * * @return the currentSubStateDetails value. */ - public MigrationSubStateDetails currentSubStateDetails() { + public MigrationSubstateDetails currentSubStateDetails() { return this.currentSubStateDetails; } @@ -104,7 +104,7 @@ public static MigrationStatus fromJson(JsonReader jsonReader) throws IOException } else if ("error".equals(fieldName)) { deserializedMigrationStatus.error = reader.getString(); } else if ("currentSubStateDetails".equals(fieldName)) { - deserializedMigrationStatus.currentSubStateDetails = MigrationSubStateDetails.fromJson(reader); + deserializedMigrationStatus.currentSubStateDetails = MigrationSubstateDetails.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubstate.java similarity index 51% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubState.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubstate.java index 71838f0431b8..4de69ec889da 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubState.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubstate.java @@ -8,100 +8,100 @@ import java.util.Collection; /** - * Migration sub state. + * Substate of migration. */ -public final class MigrationSubState extends ExpandableStringEnum { +public final class MigrationSubstate extends ExpandableStringEnum { /** - * Static value PerformingPreRequisiteSteps for MigrationSubState. + * Static value PerformingPreRequisiteSteps for MigrationSubstate. */ - public static final MigrationSubState PERFORMING_PRE_REQUISITE_STEPS = fromString("PerformingPreRequisiteSteps"); + public static final MigrationSubstate PERFORMING_PRE_REQUISITE_STEPS = fromString("PerformingPreRequisiteSteps"); /** - * Static value WaitingForLogicalReplicationSetupRequestOnSourceDB for MigrationSubState. + * Static value WaitingForLogicalReplicationSetupRequestOnSourceDB for MigrationSubstate. */ - public static final MigrationSubState WAITING_FOR_LOGICAL_REPLICATION_SETUP_REQUEST_ON_SOURCE_DB + public static final MigrationSubstate WAITING_FOR_LOGICAL_REPLICATION_SETUP_REQUEST_ON_SOURCE_DB = fromString("WaitingForLogicalReplicationSetupRequestOnSourceDB"); /** - * Static value WaitingForDBsToMigrateSpecification for MigrationSubState. + * Static value WaitingForDBsToMigrateSpecification for MigrationSubstate. */ - public static final MigrationSubState WAITING_FOR_DBS_TO_MIGRATE_SPECIFICATION + public static final MigrationSubstate WAITING_FOR_DBS_TO_MIGRATE_SPECIFICATION = fromString("WaitingForDBsToMigrateSpecification"); /** - * Static value WaitingForTargetDBOverwriteConfirmation for MigrationSubState. + * Static value WaitingForTargetDBOverwriteConfirmation for MigrationSubstate. */ - public static final MigrationSubState WAITING_FOR_TARGET_DBOVERWRITE_CONFIRMATION + public static final MigrationSubstate WAITING_FOR_TARGET_DBOVERWRITE_CONFIRMATION = fromString("WaitingForTargetDBOverwriteConfirmation"); /** - * Static value WaitingForDataMigrationScheduling for MigrationSubState. + * Static value WaitingForDataMigrationScheduling for MigrationSubstate. */ - public static final MigrationSubState WAITING_FOR_DATA_MIGRATION_SCHEDULING + public static final MigrationSubstate WAITING_FOR_DATA_MIGRATION_SCHEDULING = fromString("WaitingForDataMigrationScheduling"); /** - * Static value WaitingForDataMigrationWindow for MigrationSubState. + * Static value WaitingForDataMigrationWindow for MigrationSubstate. */ - public static final MigrationSubState WAITING_FOR_DATA_MIGRATION_WINDOW + public static final MigrationSubstate WAITING_FOR_DATA_MIGRATION_WINDOW = fromString("WaitingForDataMigrationWindow"); /** - * Static value MigratingData for MigrationSubState. + * Static value MigratingData for MigrationSubstate. */ - public static final MigrationSubState MIGRATING_DATA = fromString("MigratingData"); + public static final MigrationSubstate MIGRATING_DATA = fromString("MigratingData"); /** - * Static value WaitingForCutoverTrigger for MigrationSubState. + * Static value WaitingForCutoverTrigger for MigrationSubstate. */ - public static final MigrationSubState WAITING_FOR_CUTOVER_TRIGGER = fromString("WaitingForCutoverTrigger"); + public static final MigrationSubstate WAITING_FOR_CUTOVER_TRIGGER = fromString("WaitingForCutoverTrigger"); /** - * Static value CompletingMigration for MigrationSubState. + * Static value CompletingMigration for MigrationSubstate. */ - public static final MigrationSubState COMPLETING_MIGRATION = fromString("CompletingMigration"); + public static final MigrationSubstate COMPLETING_MIGRATION = fromString("CompletingMigration"); /** - * Static value Completed for MigrationSubState. + * Static value Completed for MigrationSubstate. */ - public static final MigrationSubState COMPLETED = fromString("Completed"); + public static final MigrationSubstate COMPLETED = fromString("Completed"); /** - * Static value CancelingRequestedDBMigrations for MigrationSubState. + * Static value CancelingRequestedDBMigrations for MigrationSubstate. */ - public static final MigrationSubState CANCELING_REQUESTED_DBMIGRATIONS + public static final MigrationSubstate CANCELING_REQUESTED_DBMIGRATIONS = fromString("CancelingRequestedDBMigrations"); /** - * Static value ValidationInProgress for MigrationSubState. + * Static value ValidationInProgress for MigrationSubstate. */ - public static final MigrationSubState VALIDATION_IN_PROGRESS = fromString("ValidationInProgress"); + public static final MigrationSubstate VALIDATION_IN_PROGRESS = fromString("ValidationInProgress"); /** - * Creates a new instance of MigrationSubState value. + * Creates a new instance of MigrationSubstate value. * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated - public MigrationSubState() { + public MigrationSubstate() { } /** - * Creates or finds a MigrationSubState from its string representation. + * Creates or finds a MigrationSubstate from its string representation. * * @param name a name to look for. - * @return the corresponding MigrationSubState. + * @return the corresponding MigrationSubstate. */ - public static MigrationSubState fromString(String name) { - return fromString(name, MigrationSubState.class); + public static MigrationSubstate fromString(String name) { + return fromString(name, MigrationSubstate.class); } /** - * Gets known MigrationSubState values. + * Gets known MigrationSubstate values. * - * @return known MigrationSubState values. + * @return known MigrationSubstate values. */ - public static Collection values() { - return values(MigrationSubState.class); + public static Collection values() { + return values(MigrationSubstate.class); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubStateDetails.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubstateDetails.java similarity index 63% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubStateDetails.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubstateDetails.java index 2fcb3f0d63f4..66033cdcd58e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubStateDetails.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubstateDetails.java @@ -13,56 +13,56 @@ import java.util.Map; /** - * Migration sub state details. + * Details of migration substate. */ @Fluent -public final class MigrationSubStateDetails implements JsonSerializable { +public final class MigrationSubstateDetails implements JsonSerializable { /* - * Migration sub state. + * Substate of migration. */ - private MigrationSubState currentSubState; + private MigrationSubstate currentSubState; /* - * Dictionary of + * Dictionary of */ - private Map dbDetails; + private Map dbDetails; /* - * Details for the validation for migration + * Details for the validation for migration. */ private ValidationDetails validationDetails; /** - * Creates an instance of MigrationSubStateDetails class. + * Creates an instance of MigrationSubstateDetails class. */ - public MigrationSubStateDetails() { + public MigrationSubstateDetails() { } /** - * Get the currentSubState property: Migration sub state. + * Get the currentSubState property: Substate of migration. * * @return the currentSubState value. */ - public MigrationSubState currentSubState() { + public MigrationSubstate currentSubState() { return this.currentSubState; } /** - * Get the dbDetails property: Dictionary of <DbMigrationStatus>. + * Get the dbDetails property: Dictionary of <DatabaseMigrationState>. * * @return the dbDetails value. */ - public Map dbDetails() { + public Map dbDetails() { return this.dbDetails; } /** - * Set the dbDetails property: Dictionary of <DbMigrationStatus>. + * Set the dbDetails property: Dictionary of <DatabaseMigrationState>. * * @param dbDetails the dbDetails value to set. - * @return the MigrationSubStateDetails object itself. + * @return the MigrationSubstateDetails object itself. */ - public MigrationSubStateDetails withDbDetails(Map dbDetails) { + public MigrationSubstateDetails withDbDetails(Map dbDetails) { this.dbDetails = dbDetails; return this; } @@ -80,9 +80,9 @@ public ValidationDetails validationDetails() { * Set the validationDetails property: Details for the validation for migration. * * @param validationDetails the validationDetails value to set. - * @return the MigrationSubStateDetails object itself. + * @return the MigrationSubstateDetails object itself. */ - public MigrationSubStateDetails withValidationDetails(ValidationDetails validationDetails) { + public MigrationSubstateDetails withValidationDetails(ValidationDetails validationDetails) { this.validationDetails = validationDetails; return this; } @@ -117,35 +117,35 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of MigrationSubStateDetails from the JsonReader. + * Reads an instance of MigrationSubstateDetails from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of MigrationSubStateDetails if the JsonReader was pointing to an instance of it, or null if + * @return An instance of MigrationSubstateDetails if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MigrationSubStateDetails. + * @throws IOException If an error occurs while reading the MigrationSubstateDetails. */ - public static MigrationSubStateDetails fromJson(JsonReader jsonReader) throws IOException { + public static MigrationSubstateDetails fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - MigrationSubStateDetails deserializedMigrationSubStateDetails = new MigrationSubStateDetails(); + MigrationSubstateDetails deserializedMigrationSubstateDetails = new MigrationSubstateDetails(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("currentSubState".equals(fieldName)) { - deserializedMigrationSubStateDetails.currentSubState - = MigrationSubState.fromString(reader.getString()); + deserializedMigrationSubstateDetails.currentSubState + = MigrationSubstate.fromString(reader.getString()); } else if ("dbDetails".equals(fieldName)) { - Map dbDetails - = reader.readMap(reader1 -> DbMigrationStatus.fromJson(reader1)); - deserializedMigrationSubStateDetails.dbDetails = dbDetails; + Map dbDetails + = reader.readMap(reader1 -> DatabaseMigrationState.fromJson(reader1)); + deserializedMigrationSubstateDetails.dbDetails = dbDetails; } else if ("validationDetails".equals(fieldName)) { - deserializedMigrationSubStateDetails.validationDetails = ValidationDetails.fromJson(reader); + deserializedMigrationSubstateDetails.validationDetails = ValidationDetails.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedMigrationSubStateDetails; + return deserializedMigrationSubstateDetails; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migrations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migrations.java index 7d48e9e5926f..1ad1eb13b8cc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migrations.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migrations.java @@ -7,151 +7,157 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; /** * Resource collection API of Migrations. */ public interface Migrations { /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration along with {@link Response}. + * @return information about a migration along with {@link Response}. */ - Response getWithResponse(String subscriptionId, String resourceGroupName, - String targetDbServerName, String migrationName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String migrationName, + Context context); /** - * Gets details of a migration. + * Gets information about a migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration. + * @return information about a migration. */ - MigrationResource get(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName); + Migration get(String resourceGroupName, String serverName, String migrationName); /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link Response}. + * @return properties of a migration along with {@link Response}. */ - Response deleteWithResponse(String subscriptionId, String resourceGroupName, String targetDbServerName, - String migrationName, Context context); + Response cancelWithResponse(String resourceGroupName, String serverName, String migrationName, + Context context); /** - * Deletes a migration. + * Cancels an active migration. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationName The name of the migration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationName Name of migration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return properties of a migration. */ - void delete(String subscriptionId, String resourceGroupName, String targetDbServerName, String migrationName); + Migration cancel(String resourceGroupName, String serverName, String migrationName); /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of migration resources as paginated response with {@link PagedIterable}. + * @return list of migrations as paginated response with {@link PagedIterable}. */ - PagedIterable listByTargetServer(String subscriptionId, String resourceGroupName, - String targetDbServerName); + PagedIterable listByTargetServer(String resourceGroupName, String serverName); /** - * List all the migrations on a given target server. + * Lists all migrations of a target flexible server. * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param migrationListFilter Migration list filter. Retrieves either active migrations or all migrations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param migrationListFilter Migration list filter. Indicates if the request should retrieve only active migrations + * or all migrations. Defaults to Active. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of migration resources as paginated response with {@link PagedIterable}. + * @return list of migrations as paginated response with {@link PagedIterable}. */ - PagedIterable listByTargetServer(String subscriptionId, String resourceGroupName, - String targetDbServerName, MigrationListFilter migrationListFilter, Context context); + PagedIterable listByTargetServer(String resourceGroupName, String serverName, + MigrationListFilter migrationListFilter, Context context); /** - * Gets details of a migration. + * Check the validity and availability of the given name, to assign it to a new migration. * - * @param id the resource ID. + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration along with {@link Response}. + * @return availability of a migration name along with {@link Response}. */ - MigrationResource getById(String id); + Response checkNameAvailabilityWithResponse(String resourceGroupName, String serverName, + MigrationNameAvailabilityInner parameters, Context context); /** - * Gets details of a migration. + * Check the validity and availability of the given name, to assign it to a new migration. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * Checks if a proposed migration name is valid and available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters Parameters required to check if a migration name is valid and available. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a migration along with {@link Response}. + * @return availability of a migration name. */ - Response getByIdWithResponse(String id, Context context); + MigrationNameAvailability checkNameAvailability(String resourceGroupName, String serverName, + MigrationNameAvailabilityInner parameters); /** - * Deletes a migration. + * Gets information about a migration. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a migration along with {@link Response}. */ - void deleteById(String id); + Migration getById(String id); /** - * Deletes a migration. + * Gets information about a migration. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link Response}. + * @return information about a migration along with {@link Response}. */ - Response deleteByIdWithResponse(String id, Context context); + Response getByIdWithResponse(String id, Context context); /** - * Begins definition for a new MigrationResource resource. + * Begins definition for a new Migration resource. * * @param name resource name. - * @return the first stage of the new MigrationResource definition. + * @return the first stage of the new Migration definition. */ - MigrationResource.DefinitionStages.Blank define(String name); + Migration.DefinitionStages.Blank define(String name); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilities.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilities.java new file mode 100644 index 000000000000..7ca389e36738 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilities.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of NameAvailabilities. + */ +public interface NameAvailabilities { + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name along with {@link Response}. + */ + Response checkGloballyWithResponse(CheckNameAvailabilityRequest parameters, Context context); + + /** + * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base + * name of a new pair of virtual endpoints. + * + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name. + */ + NameAvailabilityModel checkGlobally(CheckNameAvailabilityRequest parameters); + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name along with {@link Response}. + */ + Response checkWithLocationWithResponse(String locationName, + CheckNameAvailabilityRequest parameters, Context context); + + /** + * Check the availability of name for resource. + * + * @param locationName The name of the location. + * @param parameters Parameters required to check if a given name is valid and available to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return availability of a name. + */ + NameAvailabilityModel checkWithLocation(String locationName, CheckNameAvailabilityRequest parameters); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilityModel.java similarity index 67% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailability.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilityModel.java index 98b858bd1770..06f5d6898ba7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilityModel.java @@ -4,12 +4,12 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner; /** - * An immutable client-side representation of NameAvailability. + * An immutable client-side representation of NameAvailabilityModel. */ -public interface NameAvailability { +public interface NameAvailabilityModel { /** * Gets the nameAvailable property: Indicates if the resource name is available. * @@ -32,23 +32,25 @@ public interface NameAvailability { String message(); /** - * Gets the name property: name of the PostgreSQL server. + * Gets the name property: Name for which validity and availability was checked. * * @return the name value. */ String name(); /** - * Gets the type property: type of the server. + * Gets the type property: Type of resource. It can be 'Microsoft.DBforPostgreSQL/flexibleServers' or + * 'Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints'. * * @return the type value. */ String type(); /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner object. + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner + * object. * * @return the inner object. */ - NameAvailabilityInner innerModel(); + NameAvailabilityModelInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Network.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Network.java index cc9b4a861b56..16f3e453fab4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Network.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Network.java @@ -17,21 +17,22 @@ @Fluent public final class Network implements JsonSerializable { /* - * public network access is enabled or not + * Indicates if public network access is enabled or not. This is only supported for servers that are not integrated + * into a virtual network which is owned and provided by customer when server is deployed. */ private ServerPublicNetworkAccessState publicNetworkAccess; /* - * Delegated subnet arm resource id. This is required to be passed during create, in case we want the server to be - * VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for - * Private DNS zone. + * Resource identifier of the delegated subnet. Required during creation of a new server, in case you want the + * server to be integrated into your own virtual network. For an update operation, you only have to provide this + * property if you want to change the value assigned for the private DNS zone. */ private String delegatedSubnetResourceId; /* - * Private dns zone arm resource id. This is required to be passed during create, in case we want the server to be - * VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for - * Private DNS zone. + * Identifier of the private DNS zone. Required during creation of a new server, in case you want the server to be + * integrated into your own virtual network. For an update operation, you only have to provide this property if you + * want to change the value assigned for the private DNS zone. */ private String privateDnsZoneArmResourceId; @@ -42,7 +43,9 @@ public Network() { } /** - * Get the publicNetworkAccess property: public network access is enabled or not. + * Get the publicNetworkAccess property: Indicates if public network access is enabled or not. This is only + * supported for servers that are not integrated into a virtual network which is owned and provided by customer when + * server is deployed. * * @return the publicNetworkAccess value. */ @@ -51,7 +54,9 @@ public ServerPublicNetworkAccessState publicNetworkAccess() { } /** - * Set the publicNetworkAccess property: public network access is enabled or not. + * Set the publicNetworkAccess property: Indicates if public network access is enabled or not. This is only + * supported for servers that are not integrated into a virtual network which is owned and provided by customer when + * server is deployed. * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the Network object itself. @@ -62,9 +67,10 @@ public Network withPublicNetworkAccess(ServerPublicNetworkAccessState publicNetw } /** - * Get the delegatedSubnetResourceId property: Delegated subnet arm resource id. This is required to be passed - * during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass - * this only if we want to update the value for Private DNS zone. + * Get the delegatedSubnetResourceId property: Resource identifier of the delegated subnet. Required during creation + * of a new server, in case you want the server to be integrated into your own virtual network. For an update + * operation, you only have to provide this property if you want to change the value assigned for the private DNS + * zone. * * @return the delegatedSubnetResourceId value. */ @@ -73,9 +79,10 @@ public String delegatedSubnetResourceId() { } /** - * Set the delegatedSubnetResourceId property: Delegated subnet arm resource id. This is required to be passed - * during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass - * this only if we want to update the value for Private DNS zone. + * Set the delegatedSubnetResourceId property: Resource identifier of the delegated subnet. Required during creation + * of a new server, in case you want the server to be integrated into your own virtual network. For an update + * operation, you only have to provide this property if you want to change the value assigned for the private DNS + * zone. * * @param delegatedSubnetResourceId the delegatedSubnetResourceId value to set. * @return the Network object itself. @@ -86,9 +93,9 @@ public Network withDelegatedSubnetResourceId(String delegatedSubnetResourceId) { } /** - * Get the privateDnsZoneArmResourceId property: Private dns zone arm resource id. This is required to be passed - * during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass - * this only if we want to update the value for Private DNS zone. + * Get the privateDnsZoneArmResourceId property: Identifier of the private DNS zone. Required during creation of a + * new server, in case you want the server to be integrated into your own virtual network. For an update operation, + * you only have to provide this property if you want to change the value assigned for the private DNS zone. * * @return the privateDnsZoneArmResourceId value. */ @@ -97,9 +104,9 @@ public String privateDnsZoneArmResourceId() { } /** - * Set the privateDnsZoneArmResourceId property: Private dns zone arm resource id. This is required to be passed - * during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass - * this only if we want to update the value for Private DNS zone. + * Set the privateDnsZoneArmResourceId property: Identifier of the private DNS zone. Required during creation of a + * new server, in case you want the server to be integrated into your own virtual network. For an update operation, + * you only have to provide this property if you want to change the value assigned for the private DNS zone. * * @param privateDnsZoneArmResourceId the privateDnsZoneArmResourceId value to set. * @return the Network object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResource.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendation.java similarity index 59% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResource.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendation.java index 3203a448662e..fd9230227f2d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResource.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendation.java @@ -5,14 +5,14 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.IndexRecommendationResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; import java.time.OffsetDateTime; import java.util.List; /** - * An immutable client-side representation of IndexRecommendationResource. + * An immutable client-side representation of ObjectRecommendation. */ -public interface IndexRecommendationResource { +public interface ObjectRecommendation { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -34,6 +34,13 @@ public interface IndexRecommendationResource { */ String type(); + /** + * Gets the kind property: Always empty. + * + * @return the kind value. + */ + String kind(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -42,29 +49,29 @@ public interface IndexRecommendationResource { SystemData systemData(); /** - * Gets the initialRecommendedTime property: Creation time of this recommendation in UTC date-time string format. + * Gets the initialRecommendedTime property: Creation time (UTC) of this recommendation. * * @return the initialRecommendedTime value. */ OffsetDateTime initialRecommendedTime(); /** - * Gets the lastRecommendedTime property: The last refresh of this recommendation in UTC date-time string format. + * Gets the lastRecommendedTime property: Last time (UTC) that this recommendation was produced. * * @return the lastRecommendedTime value. */ OffsetDateTime lastRecommendedTime(); /** - * Gets the timesRecommended property: The number of times this recommendation has encountered. + * Gets the timesRecommended property: Number of times this recommendation has been produced. * * @return the timesRecommended value. */ Integer timesRecommended(); /** - * Gets the improvedQueryIds property: The ImprovedQueryIds. The list will only be populated for CREATE INDEX - * recommendations. + * Gets the improvedQueryIds property: List of identifiers for all queries identified as targets for improvement if + * the recommendation is applied. The list is only populated for CREATE INDEX recommendations. * * @return the improvedQueryIds value. */ @@ -77,6 +84,13 @@ public interface IndexRecommendationResource { */ String recommendationReason(); + /** + * Gets the currentState property: Current state. + * + * @return the currentState value. + */ + String currentState(); + /** * Gets the recommendationType property: Type for this recommendation. * @@ -85,38 +99,37 @@ public interface IndexRecommendationResource { RecommendationTypeEnum recommendationType(); /** - * Gets the implementationDetails property: Stores implementation details for the recommended action. + * Gets the implementationDetails property: Implementation details for the recommended action. * * @return the implementationDetails value. */ - IndexRecommendationResourcePropertiesImplementationDetails implementationDetails(); + ObjectRecommendationPropertiesImplementationDetails implementationDetails(); /** - * Gets the analyzedWorkload property: Stores workload information for the recommended action. + * Gets the analyzedWorkload property: Workload information for the recommended action. * * @return the analyzedWorkload value. */ - IndexRecommendationResourcePropertiesAnalyzedWorkload analyzedWorkload(); + ObjectRecommendationPropertiesAnalyzedWorkload analyzedWorkload(); /** - * Gets the estimatedImpact property: The estimated impact of this recommended action. + * Gets the estimatedImpact property: Estimated impact of this recommended action. * * @return the estimatedImpact value. */ List estimatedImpact(); /** - * Gets the details property: Stores recommendation details for the recommended action. + * Gets the details property: Recommendation details for the recommended action. * * @return the details value. */ - IndexRecommendationDetails details(); + ObjectRecommendationDetails details(); /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.IndexRecommendationResourceInner - * object. + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner object. * * @return the inner object. */ - IndexRecommendationResourceInner innerModel(); + ObjectRecommendationInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationDetails.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationDetails.java similarity index 70% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationDetails.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationDetails.java index fccf2dc9e73b..24640033c675 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationDetails.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationDetails.java @@ -16,7 +16,7 @@ * Recommendation details for the recommended action. */ @Fluent -public final class IndexRecommendationDetails implements JsonSerializable { +public final class ObjectRecommendationDetails implements JsonSerializable { /* * Database name. */ @@ -53,9 +53,9 @@ public final class IndexRecommendationDetails implements JsonSerializable includedColumns; /** - * Creates an instance of IndexRecommendationDetails class. + * Creates an instance of ObjectRecommendationDetails class. */ - public IndexRecommendationDetails() { + public ObjectRecommendationDetails() { } /** @@ -71,9 +71,9 @@ public String databaseName() { * Set the databaseName property: Database name. * * @param databaseName the databaseName value to set. - * @return the IndexRecommendationDetails object itself. + * @return the ObjectRecommendationDetails object itself. */ - public IndexRecommendationDetails withDatabaseName(String databaseName) { + public ObjectRecommendationDetails withDatabaseName(String databaseName) { this.databaseName = databaseName; return this; } @@ -91,9 +91,9 @@ public String schema() { * Set the schema property: Schema name. * * @param schema the schema value to set. - * @return the IndexRecommendationDetails object itself. + * @return the ObjectRecommendationDetails object itself. */ - public IndexRecommendationDetails withSchema(String schema) { + public ObjectRecommendationDetails withSchema(String schema) { this.schema = schema; return this; } @@ -111,9 +111,9 @@ public String table() { * Set the table property: Table name. * * @param table the table value to set. - * @return the IndexRecommendationDetails object itself. + * @return the ObjectRecommendationDetails object itself. */ - public IndexRecommendationDetails withTable(String table) { + public ObjectRecommendationDetails withTable(String table) { this.table = table; return this; } @@ -131,9 +131,9 @@ public String indexType() { * Set the indexType property: Index type. * * @param indexType the indexType value to set. - * @return the IndexRecommendationDetails object itself. + * @return the ObjectRecommendationDetails object itself. */ - public IndexRecommendationDetails withIndexType(String indexType) { + public ObjectRecommendationDetails withIndexType(String indexType) { this.indexType = indexType; return this; } @@ -151,9 +151,9 @@ public String indexName() { * Set the indexName property: Index name. * * @param indexName the indexName value to set. - * @return the IndexRecommendationDetails object itself. + * @return the ObjectRecommendationDetails object itself. */ - public IndexRecommendationDetails withIndexName(String indexName) { + public ObjectRecommendationDetails withIndexName(String indexName) { this.indexName = indexName; return this; } @@ -171,9 +171,9 @@ public List indexColumns() { * Set the indexColumns property: Index columns. * * @param indexColumns the indexColumns value to set. - * @return the IndexRecommendationDetails object itself. + * @return the ObjectRecommendationDetails object itself. */ - public IndexRecommendationDetails withIndexColumns(List indexColumns) { + public ObjectRecommendationDetails withIndexColumns(List indexColumns) { this.indexColumns = indexColumns; return this; } @@ -191,9 +191,9 @@ public List includedColumns() { * Set the includedColumns property: Index included columns. * * @param includedColumns the includedColumns value to set. - * @return the IndexRecommendationDetails object itself. + * @return the ObjectRecommendationDetails object itself. */ - public IndexRecommendationDetails withIncludedColumns(List includedColumns) { + public ObjectRecommendationDetails withIncludedColumns(List includedColumns) { this.includedColumns = includedColumns; return this; } @@ -224,42 +224,42 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of IndexRecommendationDetails from the JsonReader. + * Reads an instance of ObjectRecommendationDetails from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of IndexRecommendationDetails if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IndexRecommendationDetails. + * @return An instance of ObjectRecommendationDetails if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ObjectRecommendationDetails. */ - public static IndexRecommendationDetails fromJson(JsonReader jsonReader) throws IOException { + public static ObjectRecommendationDetails fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - IndexRecommendationDetails deserializedIndexRecommendationDetails = new IndexRecommendationDetails(); + ObjectRecommendationDetails deserializedObjectRecommendationDetails = new ObjectRecommendationDetails(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("databaseName".equals(fieldName)) { - deserializedIndexRecommendationDetails.databaseName = reader.getString(); + deserializedObjectRecommendationDetails.databaseName = reader.getString(); } else if ("schema".equals(fieldName)) { - deserializedIndexRecommendationDetails.schema = reader.getString(); + deserializedObjectRecommendationDetails.schema = reader.getString(); } else if ("table".equals(fieldName)) { - deserializedIndexRecommendationDetails.table = reader.getString(); + deserializedObjectRecommendationDetails.table = reader.getString(); } else if ("indexType".equals(fieldName)) { - deserializedIndexRecommendationDetails.indexType = reader.getString(); + deserializedObjectRecommendationDetails.indexType = reader.getString(); } else if ("indexName".equals(fieldName)) { - deserializedIndexRecommendationDetails.indexName = reader.getString(); + deserializedObjectRecommendationDetails.indexName = reader.getString(); } else if ("indexColumns".equals(fieldName)) { List indexColumns = reader.readArray(reader1 -> reader1.getString()); - deserializedIndexRecommendationDetails.indexColumns = indexColumns; + deserializedObjectRecommendationDetails.indexColumns = indexColumns; } else if ("includedColumns".equals(fieldName)) { List includedColumns = reader.readArray(reader1 -> reader1.getString()); - deserializedIndexRecommendationDetails.includedColumns = includedColumns; + deserializedObjectRecommendationDetails.includedColumns = includedColumns; } else { reader.skipChildren(); } } - return deserializedIndexRecommendationDetails; + return deserializedObjectRecommendationDetails; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionDetailsListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationList.java similarity index 56% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionDetailsListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationList.java index 6a0193fbdba9..7b76bcc71f93 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionDetailsListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationList.java @@ -9,55 +9,53 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionDetailsResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; import java.io.IOException; import java.util.List; /** - * A list of tuning configuration sessions. + * List of available object recommendations. */ @Fluent -public final class SessionDetailsListResult implements JsonSerializable { +public final class ObjectRecommendationList implements JsonSerializable { /* - * A list of details of the session. + * List of available object recommendations. */ - private List value; + private List value; /* - * URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. + * Link used to get the next page of results. */ private String nextLink; /** - * Creates an instance of SessionDetailsListResult class. + * Creates an instance of ObjectRecommendationList class. */ - public SessionDetailsListResult() { + public ObjectRecommendationList() { } /** - * Get the value property: A list of details of the session. + * Get the value property: List of available object recommendations. * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** - * Set the value property: A list of details of the session. + * Set the value property: List of available object recommendations. * * @param value the value value to set. - * @return the SessionDetailsListResult object itself. + * @return the ObjectRecommendationList object itself. */ - public SessionDetailsListResult withValue(List value) { + public ObjectRecommendationList withValue(List value) { this.value = value; return this; } /** - * Get the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. + * Get the nextLink property: Link used to get the next page of results. * * @return the nextLink value. */ @@ -66,13 +64,12 @@ public String nextLink() { } /** - * Set the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. + * Set the nextLink property: Link used to get the next page of results. * * @param nextLink the nextLink value to set. - * @return the SessionDetailsListResult object itself. + * @return the ObjectRecommendationList object itself. */ - public SessionDetailsListResult withNextLink(String nextLink) { + public ObjectRecommendationList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } @@ -100,32 +97,32 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of SessionDetailsListResult from the JsonReader. + * Reads an instance of ObjectRecommendationList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of SessionDetailsListResult if the JsonReader was pointing to an instance of it, or null if + * @return An instance of ObjectRecommendationList if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SessionDetailsListResult. + * @throws IOException If an error occurs while reading the ObjectRecommendationList. */ - public static SessionDetailsListResult fromJson(JsonReader jsonReader) throws IOException { + public static ObjectRecommendationList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - SessionDetailsListResult deserializedSessionDetailsListResult = new SessionDetailsListResult(); + ObjectRecommendationList deserializedObjectRecommendationList = new ObjectRecommendationList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> SessionDetailsResourceInner.fromJson(reader1)); - deserializedSessionDetailsListResult.value = value; + List value + = reader.readArray(reader1 -> ObjectRecommendationInner.fromJson(reader1)); + deserializedObjectRecommendationList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedSessionDetailsListResult.nextLink = reader.getString(); + deserializedObjectRecommendationList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedSessionDetailsListResult; + return deserializedObjectRecommendationList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResourcePropertiesAnalyzedWorkload.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesAnalyzedWorkload.java similarity index 55% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResourcePropertiesAnalyzedWorkload.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesAnalyzedWorkload.java index a4f20b53c738..74b1aface6e4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResourcePropertiesAnalyzedWorkload.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesAnalyzedWorkload.java @@ -15,34 +15,35 @@ import java.time.format.DateTimeFormatter; /** - * Stores workload information for the recommended action. + * Workload information for the recommended action. */ @Fluent -public final class IndexRecommendationResourcePropertiesAnalyzedWorkload - implements JsonSerializable { +public final class ObjectRecommendationPropertiesAnalyzedWorkload + implements JsonSerializable { /* - * Workload start time in UTC date-time string format. + * Start time (UTC) of the workload analyzed. */ private OffsetDateTime startTime; /* - * Workload end time in UTC date-time string format. + * End time (UTC) of the workload analyzed. */ private OffsetDateTime endTime; /* - * Workload query examined count. For DROP INDEX will be 0. + * Number of queries from the workload that were examined to produce this recommendation. For DROP INDEX + * recommendations it's 0 (zero). */ private Integer queryCount; /** - * Creates an instance of IndexRecommendationResourcePropertiesAnalyzedWorkload class. + * Creates an instance of ObjectRecommendationPropertiesAnalyzedWorkload class. */ - public IndexRecommendationResourcePropertiesAnalyzedWorkload() { + public ObjectRecommendationPropertiesAnalyzedWorkload() { } /** - * Get the startTime property: Workload start time in UTC date-time string format. + * Get the startTime property: Start time (UTC) of the workload analyzed. * * @return the startTime value. */ @@ -51,18 +52,18 @@ public OffsetDateTime startTime() { } /** - * Set the startTime property: Workload start time in UTC date-time string format. + * Set the startTime property: Start time (UTC) of the workload analyzed. * * @param startTime the startTime value to set. - * @return the IndexRecommendationResourcePropertiesAnalyzedWorkload object itself. + * @return the ObjectRecommendationPropertiesAnalyzedWorkload object itself. */ - public IndexRecommendationResourcePropertiesAnalyzedWorkload withStartTime(OffsetDateTime startTime) { + public ObjectRecommendationPropertiesAnalyzedWorkload withStartTime(OffsetDateTime startTime) { this.startTime = startTime; return this; } /** - * Get the endTime property: Workload end time in UTC date-time string format. + * Get the endTime property: End time (UTC) of the workload analyzed. * * @return the endTime value. */ @@ -71,18 +72,19 @@ public OffsetDateTime endTime() { } /** - * Set the endTime property: Workload end time in UTC date-time string format. + * Set the endTime property: End time (UTC) of the workload analyzed. * * @param endTime the endTime value to set. - * @return the IndexRecommendationResourcePropertiesAnalyzedWorkload object itself. + * @return the ObjectRecommendationPropertiesAnalyzedWorkload object itself. */ - public IndexRecommendationResourcePropertiesAnalyzedWorkload withEndTime(OffsetDateTime endTime) { + public ObjectRecommendationPropertiesAnalyzedWorkload withEndTime(OffsetDateTime endTime) { this.endTime = endTime; return this; } /** - * Get the queryCount property: Workload query examined count. For DROP INDEX will be 0. + * Get the queryCount property: Number of queries from the workload that were examined to produce this + * recommendation. For DROP INDEX recommendations it's 0 (zero). * * @return the queryCount value. */ @@ -91,12 +93,13 @@ public Integer queryCount() { } /** - * Set the queryCount property: Workload query examined count. For DROP INDEX will be 0. + * Set the queryCount property: Number of queries from the workload that were examined to produce this + * recommendation. For DROP INDEX recommendations it's 0 (zero). * * @param queryCount the queryCount value to set. - * @return the IndexRecommendationResourcePropertiesAnalyzedWorkload object itself. + * @return the ObjectRecommendationPropertiesAnalyzedWorkload object itself. */ - public IndexRecommendationResourcePropertiesAnalyzedWorkload withQueryCount(Integer queryCount) { + public ObjectRecommendationPropertiesAnalyzedWorkload withQueryCount(Integer queryCount) { this.queryCount = queryCount; return this; } @@ -124,37 +127,36 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of IndexRecommendationResourcePropertiesAnalyzedWorkload from the JsonReader. + * Reads an instance of ObjectRecommendationPropertiesAnalyzedWorkload from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of IndexRecommendationResourcePropertiesAnalyzedWorkload if the JsonReader was pointing to an + * @return An instance of ObjectRecommendationPropertiesAnalyzedWorkload if the JsonReader was pointing to an * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IndexRecommendationResourcePropertiesAnalyzedWorkload. + * @throws IOException If an error occurs while reading the ObjectRecommendationPropertiesAnalyzedWorkload. */ - public static IndexRecommendationResourcePropertiesAnalyzedWorkload fromJson(JsonReader jsonReader) - throws IOException { + public static ObjectRecommendationPropertiesAnalyzedWorkload fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - IndexRecommendationResourcePropertiesAnalyzedWorkload deserializedIndexRecommendationResourcePropertiesAnalyzedWorkload - = new IndexRecommendationResourcePropertiesAnalyzedWorkload(); + ObjectRecommendationPropertiesAnalyzedWorkload deserializedObjectRecommendationPropertiesAnalyzedWorkload + = new ObjectRecommendationPropertiesAnalyzedWorkload(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("startTime".equals(fieldName)) { - deserializedIndexRecommendationResourcePropertiesAnalyzedWorkload.startTime = reader + deserializedObjectRecommendationPropertiesAnalyzedWorkload.startTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("endTime".equals(fieldName)) { - deserializedIndexRecommendationResourcePropertiesAnalyzedWorkload.endTime = reader + deserializedObjectRecommendationPropertiesAnalyzedWorkload.endTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("queryCount".equals(fieldName)) { - deserializedIndexRecommendationResourcePropertiesAnalyzedWorkload.queryCount + deserializedObjectRecommendationPropertiesAnalyzedWorkload.queryCount = reader.getNullable(JsonReader::getInt); } else { reader.skipChildren(); } } - return deserializedIndexRecommendationResourcePropertiesAnalyzedWorkload; + return deserializedObjectRecommendationPropertiesAnalyzedWorkload; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResourcePropertiesImplementationDetails.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesImplementationDetails.java similarity index 54% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResourcePropertiesImplementationDetails.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesImplementationDetails.java index 62f9bd9fac37..2e34b6d9b494 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IndexRecommendationResourcePropertiesImplementationDetails.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesImplementationDetails.java @@ -12,25 +12,25 @@ import java.io.IOException; /** - * Stores implementation details for the recommended action. + * Implementation details for the recommended action. */ @Fluent -public final class IndexRecommendationResourcePropertiesImplementationDetails - implements JsonSerializable { +public final class ObjectRecommendationPropertiesImplementationDetails + implements JsonSerializable { /* - * Method of implementation for recommended action + * Method of implementation for recommended action. */ private String method; /* - * Implementation script for the recommended action + * Implementation script for the recommended action. */ private String script; /** - * Creates an instance of IndexRecommendationResourcePropertiesImplementationDetails class. + * Creates an instance of ObjectRecommendationPropertiesImplementationDetails class. */ - public IndexRecommendationResourcePropertiesImplementationDetails() { + public ObjectRecommendationPropertiesImplementationDetails() { } /** @@ -46,9 +46,9 @@ public String method() { * Set the method property: Method of implementation for recommended action. * * @param method the method value to set. - * @return the IndexRecommendationResourcePropertiesImplementationDetails object itself. + * @return the ObjectRecommendationPropertiesImplementationDetails object itself. */ - public IndexRecommendationResourcePropertiesImplementationDetails withMethod(String method) { + public ObjectRecommendationPropertiesImplementationDetails withMethod(String method) { this.method = method; return this; } @@ -66,9 +66,9 @@ public String script() { * Set the script property: Implementation script for the recommended action. * * @param script the script value to set. - * @return the IndexRecommendationResourcePropertiesImplementationDetails object itself. + * @return the ObjectRecommendationPropertiesImplementationDetails object itself. */ - public IndexRecommendationResourcePropertiesImplementationDetails withScript(String script) { + public ObjectRecommendationPropertiesImplementationDetails withScript(String script) { this.script = script; return this; } @@ -93,33 +93,32 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of IndexRecommendationResourcePropertiesImplementationDetails from the JsonReader. + * Reads an instance of ObjectRecommendationPropertiesImplementationDetails from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of IndexRecommendationResourcePropertiesImplementationDetails if the JsonReader was pointing - * to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * IndexRecommendationResourcePropertiesImplementationDetails. + * @return An instance of ObjectRecommendationPropertiesImplementationDetails if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ObjectRecommendationPropertiesImplementationDetails. */ - public static IndexRecommendationResourcePropertiesImplementationDetails fromJson(JsonReader jsonReader) + public static ObjectRecommendationPropertiesImplementationDetails fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - IndexRecommendationResourcePropertiesImplementationDetails deserializedIndexRecommendationResourcePropertiesImplementationDetails - = new IndexRecommendationResourcePropertiesImplementationDetails(); + ObjectRecommendationPropertiesImplementationDetails deserializedObjectRecommendationPropertiesImplementationDetails + = new ObjectRecommendationPropertiesImplementationDetails(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("method".equals(fieldName)) { - deserializedIndexRecommendationResourcePropertiesImplementationDetails.method = reader.getString(); + deserializedObjectRecommendationPropertiesImplementationDetails.method = reader.getString(); } else if ("script".equals(fieldName)) { - deserializedIndexRecommendationResourcePropertiesImplementationDetails.script = reader.getString(); + deserializedObjectRecommendationPropertiesImplementationDetails.script = reader.getString(); } else { reader.skipChildren(); } } - return deserializedIndexRecommendationResourcePropertiesImplementationDetails; + return deserializedObjectRecommendationPropertiesImplementationDetails; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineResizeSupportedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineResizeSupportedEnum.java deleted file mode 100644 index 87b9162a1709..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineResizeSupportedEnum.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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether online resize is supported in this region for the given subscription. "Enabled" means - * storage online resize is supported. "Disabled" means storage online resize is not supported. Will be deprecated in - * future, please look to Supported Features for "OnlineResize". - */ -public final class OnlineResizeSupportedEnum extends ExpandableStringEnum { - /** - * Static value Enabled for OnlineResizeSupportedEnum. - */ - public static final OnlineResizeSupportedEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for OnlineResizeSupportedEnum. - */ - public static final OnlineResizeSupportedEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of OnlineResizeSupportedEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OnlineResizeSupportedEnum() { - } - - /** - * Creates or finds a OnlineResizeSupportedEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding OnlineResizeSupportedEnum. - */ - public static OnlineResizeSupportedEnum fromString(String name) { - return fromString(name, OnlineResizeSupportedEnum.class); - } - - /** - * Gets known OnlineResizeSupportedEnum values. - * - * @return known OnlineResizeSupportedEnum values. - */ - public static Collection values() { - return values(OnlineResizeSupportedEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineStorageResizeSupport.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineStorageResizeSupport.java new file mode 100644 index 000000000000..faadde7dad4b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineStorageResizeSupport.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if resizing the storage, without interrupting the operation of the database engine, is supported in this + * location for the given subscription. 'Enabled' means resizing the storage without interrupting the operation of the + * database engine is supported. 'Disabled' means resizing the storage without interrupting the operation of the + * database engine is not supported. Will be deprecated in the future. Look to Supported Features for 'OnlineResize'. + */ +public final class OnlineStorageResizeSupport extends ExpandableStringEnum { + /** + * Static value Enabled for OnlineStorageResizeSupport. + */ + public static final OnlineStorageResizeSupport ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for OnlineStorageResizeSupport. + */ + public static final OnlineStorageResizeSupport DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of OnlineStorageResizeSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OnlineStorageResizeSupport() { + } + + /** + * Creates or finds a OnlineStorageResizeSupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding OnlineStorageResizeSupport. + */ + public static OnlineStorageResizeSupport fromString(String name) { + return fromString(name, OnlineStorageResizeSupport.class); + } + + /** + * Gets known OnlineStorageResizeSupport values. + * + * @return known OnlineStorageResizeSupport values. + */ + public static Collection values() { + return values(OnlineStorageResizeSupport.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operation.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operation.java index 4b2f806f69c6..c1afcdc793c3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operation.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operation.java @@ -12,28 +12,28 @@ */ public interface Operation { /** - * Gets the name property: The name of the operation being performed on this particular object. + * Gets the name property: Name of the operation being performed on this particular object. * * @return the name value. */ String name(); /** - * Gets the display property: The localized display information for this particular operation or action. + * Gets the display property: Localized display information for this particular operation or action. * * @return the display value. */ OperationDisplay display(); /** - * Gets the isDataAction property: Indicates whether the operation is a data action. + * Gets the isDataAction property: Indicates if the operation is a data action. * * @return the isDataAction value. */ Boolean isDataAction(); /** - * Gets the origin property: The intended executor of the operation. + * Gets the origin property: Intended executor of the operation. * * @return the origin value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationDisplay.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationDisplay.java index 5b22250f12e8..d2fe3603baa4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationDisplay.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationDisplay.java @@ -17,22 +17,22 @@ @Immutable public final class OperationDisplay implements JsonSerializable { /* - * Operation resource provider name. + * Name of the resource provider. */ private String provider; /* - * Resource on which the operation is performed. + * Type of resource on which the operation is performed. */ private String resource; /* - * Localized friendly name for the operation. + * Name of the operation. */ private String operation; /* - * Operation description. + * Description of the operation. */ private String description; @@ -43,7 +43,7 @@ public OperationDisplay() { } /** - * Get the provider property: Operation resource provider name. + * Get the provider property: Name of the resource provider. * * @return the provider value. */ @@ -52,7 +52,7 @@ public String provider() { } /** - * Get the resource property: Resource on which the operation is performed. + * Get the resource property: Type of resource on which the operation is performed. * * @return the resource value. */ @@ -61,7 +61,7 @@ public String resource() { } /** - * Get the operation property: Localized friendly name for the operation. + * Get the operation property: Name of the operation. * * @return the operation value. */ @@ -70,7 +70,7 @@ public String operation() { } /** - * Get the description property: Operation description. + * Get the description property: Description of the operation. * * @return the description value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationList.java similarity index 64% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationList.java index a009ba9cbd91..8c34887c3c0e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationList.java @@ -14,25 +14,24 @@ import java.util.List; /** - * A list of resource provider operations. + * List of resource provider operations. */ @Fluent -public final class OperationListResult implements JsonSerializable { +public final class OperationList implements JsonSerializable { /* * Collection of available operation details */ private List value; /* - * URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. + * Link used to get the next page of results. */ private String nextLink; /** - * Creates an instance of OperationListResult class. + * Creates an instance of OperationList class. */ - public OperationListResult() { + public OperationList() { } /** @@ -48,16 +47,15 @@ public List value() { * Set the value property: Collection of available operation details. * * @param value the value value to set. - * @return the OperationListResult object itself. + * @return the OperationList object itself. */ - public OperationListResult withValue(List value) { + public OperationList withValue(List value) { this.value = value; return this; } /** - * Get the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. + * Get the nextLink property: Link used to get the next page of results. * * @return the nextLink value. */ @@ -66,13 +64,12 @@ public String nextLink() { } /** - * Set the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. + * Set the nextLink property: Link used to get the next page of results. * * @param nextLink the nextLink value to set. - * @return the OperationListResult object itself. + * @return the OperationList object itself. */ - public OperationListResult withNextLink(String nextLink) { + public OperationList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } @@ -100,31 +97,31 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of OperationListResult from the JsonReader. + * Reads an instance of OperationList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was + * @return An instance of OperationList if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationListResult. + * @throws IOException If an error occurs while reading the OperationList. */ - public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { + public static OperationList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - OperationListResult deserializedOperationListResult = new OperationListResult(); + OperationList deserializedOperationList = new OperationList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); - deserializedOperationListResult.value = value; + deserializedOperationList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedOperationListResult.nextLink = reader.getString(); + deserializedOperationList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedOperationListResult; + return deserializedOperationList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationOrigin.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationOrigin.java index 3b04d1469f67..e5cda79be066 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationOrigin.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationOrigin.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The intended executor of the operation. + * Intended executor of the operation. */ public final class OperationOrigin extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operations.java index 21ec92f2e236..3c736f1ef48c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operations.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operations.java @@ -12,22 +12,22 @@ */ public interface Operations { /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations as paginated response with {@link PagedIterable}. + * @return list of resource provider operations as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * Lists all of the available REST API operations. + * Lists all available REST API operations. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations as paginated response with {@link PagedIterable}. + * @return list of resource provider operations as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Origin.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Origin.java deleted file mode 100644 index e7d922b5db80..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Origin.java +++ /dev/null @@ -1,51 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Backup type. - */ -public final class Origin extends ExpandableStringEnum { - /** - * Static value Full for Origin. - */ - public static final Origin FULL = fromString("Full"); - - /** - * Static value Customer On-Demand for Origin. - */ - public static final Origin CUSTOMER_ON_DEMAND = fromString("Customer On-Demand"); - - /** - * Creates a new instance of Origin value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Origin() { - } - - /** - * Creates or finds a Origin from its string representation. - * - * @param name a name to look for. - * @return the corresponding Origin. - */ - public static Origin fromString(String name) { - return fromString(name, Origin.class); - } - - /** - * Gets known Origin values. - * - * @return known Origin values. - */ - public static Collection values() { - return values(Origin.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDatabasesOnTargetServer.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDatabasesOnTargetServer.java new file mode 100644 index 000000000000..5ddb664f5978 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDatabasesOnTargetServer.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if databases on the target server can be overwritten when already present. If set to 'False', when the + * migration workflow detects that the database already exists on the target server, it will wait for a confirmation. + */ +public final class OverwriteDatabasesOnTargetServer extends ExpandableStringEnum { + /** + * Static value True for OverwriteDatabasesOnTargetServer. + */ + public static final OverwriteDatabasesOnTargetServer TRUE = fromString("True"); + + /** + * Static value False for OverwriteDatabasesOnTargetServer. + */ + public static final OverwriteDatabasesOnTargetServer FALSE = fromString("False"); + + /** + * Creates a new instance of OverwriteDatabasesOnTargetServer value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OverwriteDatabasesOnTargetServer() { + } + + /** + * Creates or finds a OverwriteDatabasesOnTargetServer from its string representation. + * + * @param name a name to look for. + * @return the corresponding OverwriteDatabasesOnTargetServer. + */ + public static OverwriteDatabasesOnTargetServer fromString(String name) { + return fromString(name, OverwriteDatabasesOnTargetServer.class); + } + + /** + * Gets known OverwriteDatabasesOnTargetServer values. + * + * @return known OverwriteDatabasesOnTargetServer values. + */ + public static Collection values() { + return values(OverwriteDatabasesOnTargetServer.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDbsInTargetEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDbsInTargetEnum.java deleted file mode 100644 index 98675472ec45..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDbsInTargetEnum.java +++ /dev/null @@ -1,52 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the - * migration workflow will wait for a confirmation, if it detects that the database already exists. - */ -public final class OverwriteDbsInTargetEnum extends ExpandableStringEnum { - /** - * Static value True for OverwriteDbsInTargetEnum. - */ - public static final OverwriteDbsInTargetEnum TRUE = fromString("True"); - - /** - * Static value False for OverwriteDbsInTargetEnum. - */ - public static final OverwriteDbsInTargetEnum FALSE = fromString("False"); - - /** - * Creates a new instance of OverwriteDbsInTargetEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OverwriteDbsInTargetEnum() { - } - - /** - * Creates or finds a OverwriteDbsInTargetEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding OverwriteDbsInTargetEnum. - */ - public static OverwriteDbsInTargetEnum fromString(String name) { - return fromString(name, OverwriteDbsInTargetEnum.class); - } - - /** - * Gets known OverwriteDbsInTargetEnum values. - * - * @return known OverwriteDbsInTargetEnum values. - */ - public static Collection values() { - return values(OverwriteDbsInTargetEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordAuthEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordAuthEnum.java deleted file mode 100644 index 51301b7a1c71..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordAuthEnum.java +++ /dev/null @@ -1,51 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * If Enabled, Password authentication is enabled. - */ -public final class PasswordAuthEnum extends ExpandableStringEnum { - /** - * Static value Enabled for PasswordAuthEnum. - */ - public static final PasswordAuthEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for PasswordAuthEnum. - */ - public static final PasswordAuthEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of PasswordAuthEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PasswordAuthEnum() { - } - - /** - * Creates or finds a PasswordAuthEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding PasswordAuthEnum. - */ - public static PasswordAuthEnum fromString(String name) { - return fromString(name, PasswordAuthEnum.class); - } - - /** - * Gets known PasswordAuthEnum values. - * - * @return known PasswordAuthEnum values. - */ - public static Collection values() { - return values(PasswordAuthEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordBasedAuth.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordBasedAuth.java new file mode 100644 index 000000000000..16998ada41dd --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordBasedAuth.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if the server supports password based authentication. + */ +public final class PasswordBasedAuth extends ExpandableStringEnum { + /** + * Static value Enabled for PasswordBasedAuth. + */ + public static final PasswordBasedAuth ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for PasswordBasedAuth. + */ + public static final PasswordBasedAuth DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of PasswordBasedAuth value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PasswordBasedAuth() { + } + + /** + * Creates or finds a PasswordBasedAuth from its string representation. + * + * @param name a name to look for. + * @return the corresponding PasswordBasedAuth. + */ + public static PasswordBasedAuth fromString(String name) { + return fromString(name, PasswordBasedAuth.class); + } + + /** + * Gets known PasswordBasedAuth values. + * + * @return known PasswordBasedAuth values. + */ + public static Collection values() { + return values(PasswordBasedAuth.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PostgresMajorVersion.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PostgresMajorVersion.java new file mode 100644 index 000000000000..b3846939172c --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PostgresMajorVersion.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Major version of PostgreSQL database engine. + */ +public final class PostgresMajorVersion extends ExpandableStringEnum { + /** + * Static value 18 for PostgresMajorVersion. + */ + public static final PostgresMajorVersion ONE_EIGHT = fromString("18"); + + /** + * Static value 17 for PostgresMajorVersion. + */ + public static final PostgresMajorVersion ONE_SEVEN = fromString("17"); + + /** + * Static value 16 for PostgresMajorVersion. + */ + public static final PostgresMajorVersion ONE_SIX = fromString("16"); + + /** + * Static value 15 for PostgresMajorVersion. + */ + public static final PostgresMajorVersion ONE_FIVE = fromString("15"); + + /** + * Static value 14 for PostgresMajorVersion. + */ + public static final PostgresMajorVersion ONE_FOUR = fromString("14"); + + /** + * Static value 13 for PostgresMajorVersion. + */ + public static final PostgresMajorVersion ONE_THREE = fromString("13"); + + /** + * Static value 12 for PostgresMajorVersion. + */ + public static final PostgresMajorVersion ONE_TWO = fromString("12"); + + /** + * Static value 11 for PostgresMajorVersion. + */ + public static final PostgresMajorVersion ONE_ONE = fromString("11"); + + /** + * Creates a new instance of PostgresMajorVersion value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PostgresMajorVersion() { + } + + /** + * Creates or finds a PostgresMajorVersion from its string representation. + * + * @param name a name to look for. + * @return the corresponding PostgresMajorVersion. + */ + public static PostgresMajorVersion fromString(String name) { + return fromString(name, PostgresMajorVersion.class); + } + + /** + * Gets known PostgresMajorVersion values. + * + * @return known PostgresMajorVersion values. + */ + public static Collection values() { + return values(PostgresMajorVersion.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrincipalType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrincipalType.java index 3861d9728641..c791312fb102 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrincipalType.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrincipalType.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The principal type used to represent the type of Microsoft Entra Administrator. + * Type of Microsoft Entra principal to which the server administrator is associated. */ public final class PrincipalType extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GetPrivateDnsZoneSuffixes.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateDnsZoneSuffixes.java similarity index 69% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GetPrivateDnsZoneSuffixes.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateDnsZoneSuffixes.java index c88444d810f2..2d2647295b5b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GetPrivateDnsZoneSuffixes.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateDnsZoneSuffixes.java @@ -8,26 +8,26 @@ import com.azure.core.util.Context; /** - * Resource collection API of GetPrivateDnsZoneSuffixes. + * Resource collection API of PrivateDnsZoneSuffixes. */ -public interface GetPrivateDnsZoneSuffixes { +public interface PrivateDnsZoneSuffixes { /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private DNS zone suffix in the cloud along with {@link Response}. + * @return the private DNS zone suffix along with {@link Response}. */ - Response executeWithResponse(Context context); + Response getWithResponse(Context context); /** - * Get private DNS zone suffix in the cloud. + * Gets the private DNS zone suffix. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private DNS zone suffix in the cloud. + * @return the private DNS zone suffix. */ - String execute(); + String get(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionList.java similarity index 58% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionList.java index 14523227de14..1e11351ac766 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionList.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,25 +14,24 @@ import java.util.List; /** - * A list of private endpoint connections. + * List of private endpoint connections. */ -@Immutable -public final class PrivateEndpointConnectionListResult - implements JsonSerializable { +@Fluent +public final class PrivateEndpointConnectionList implements JsonSerializable { /* * Array of results. */ private List value; /* - * The URL to get the next set of results. + * Link used to get the next page of results. */ private String nextLink; /** - * Creates an instance of PrivateEndpointConnectionListResult class. + * Creates an instance of PrivateEndpointConnectionList class. */ - public PrivateEndpointConnectionListResult() { + public PrivateEndpointConnectionList() { } /** @@ -45,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The URL to get the next set of results. + * Get the nextLink property: Link used to get the next page of results. * * @return the nextLink value. */ @@ -53,6 +52,17 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: Link used to get the next page of results. + * + * @param nextLink the nextLink value to set. + * @return the PrivateEndpointConnectionList object itself. + */ + public PrivateEndpointConnectionList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + /** * Validates the instance. * @@ -70,21 +80,22 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } /** - * Reads an instance of PrivateEndpointConnectionListResult from the JsonReader. + * Reads an instance of PrivateEndpointConnectionList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionListResult if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateEndpointConnectionListResult. + * @return An instance of PrivateEndpointConnectionList if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateEndpointConnectionList. */ - public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) throws IOException { + public static PrivateEndpointConnectionList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - PrivateEndpointConnectionListResult deserializedPrivateEndpointConnectionListResult - = new PrivateEndpointConnectionListResult(); + PrivateEndpointConnectionList deserializedPrivateEndpointConnectionList + = new PrivateEndpointConnectionList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -92,15 +103,15 @@ public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); - deserializedPrivateEndpointConnectionListResult.value = value; + deserializedPrivateEndpointConnectionList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedPrivateEndpointConnectionListResult.nextLink = reader.getString(); + deserializedPrivateEndpointConnectionList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedPrivateEndpointConnectionListResult; + return deserializedPrivateEndpointConnectionList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionOperations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionOperations.java deleted file mode 100644 index 842fffe652c9..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionOperations.java +++ /dev/null @@ -1,69 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; - -/** - * Resource collection API of PrivateEndpointConnectionOperations. - */ -public interface PrivateEndpointConnectionOperations { - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 private endpoint connection resource. - */ - PrivateEndpointConnection update(String resourceGroupName, String serverName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters); - - /** - * Approve or reject a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters The required parameters for updating private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 private endpoint connection resource. - */ - PrivateEndpointConnection update(String resourceGroupName, String serverName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, Context context); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection with a given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnections.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnections.java index 8c858de04154..f8eb70a3b453 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnections.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnections.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; /** * Resource collection API of PrivateEndpointConnections. @@ -41,19 +42,75 @@ Response getWithResponse(String resourceGroupName, St PrivateEndpointConnection get(String resourceGroupName, String serverName, String privateEndpointConnectionName); /** - * Gets all private endpoint connections on a server. + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 private endpoint connection resource. + */ + PrivateEndpointConnection update(String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters); + + /** + * Approves or rejects a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Parameters required to update a private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 private endpoint connection resource. + */ + PrivateEndpointConnection update(String resourceGroupName, String serverName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, Context context); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context); + + /** + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. + * @return list of private endpoint connections as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets all private endpoint connections on a server. + * Lists all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -61,7 +118,7 @@ Response getWithResponse(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. + * @return list of private endpoint connections as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceList.java similarity index 64% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceList.java index 5dc1a8b2446f..a93a9bf36982 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceList.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,8 +16,8 @@ /** * A list of private link resources. */ -@Immutable -public final class PrivateLinkResourceListResult implements JsonSerializable { +@Fluent +public final class PrivateLinkResourceList implements JsonSerializable { /* * Array of results. */ @@ -29,9 +29,9 @@ public final class PrivateLinkResourceListResult implements JsonSerializable { - PrivateLinkResourceListResult deserializedPrivateLinkResourceListResult - = new PrivateLinkResourceListResult(); + PrivateLinkResourceList deserializedPrivateLinkResourceList = new PrivateLinkResourceList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -91,15 +102,15 @@ public static PrivateLinkResourceListResult fromJson(JsonReader jsonReader) thro if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> PrivateLinkResourceInner.fromJson(reader1)); - deserializedPrivateLinkResourceListResult.value = value; + deserializedPrivateLinkResourceList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedPrivateLinkResourceListResult.nextLink = reader.getString(); + deserializedPrivateLinkResourceList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedPrivateLinkResourceListResult; + return deserializedPrivateLinkResourceList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsage.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsage.java index 42fc8e3aba59..0044cd095fbb 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsage.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsage.java @@ -11,7 +11,7 @@ */ public interface QuotaUsage { /** - * Gets the name property: Name of quota usage for flexible servers. + * Gets the name property: Name of quota usage for servers. * * @return the name value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsagesListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsageList.java similarity index 66% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsagesListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsageList.java index 30745c74c1f3..a21cdcb5c556 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsagesListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsageList.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,8 +16,8 @@ /** * Capability for the PostgreSQL server. */ -@Immutable -public final class QuotaUsagesListResult implements JsonSerializable { +@Fluent +public final class QuotaUsageList implements JsonSerializable { /* * A list of quota usages. */ @@ -29,9 +29,9 @@ public final class QuotaUsagesListResult implements JsonSerializable { - QuotaUsagesListResult deserializedQuotaUsagesListResult = new QuotaUsagesListResult(); + QuotaUsageList deserializedQuotaUsageList = new QuotaUsageList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> QuotaUsageInner.fromJson(reader1)); - deserializedQuotaUsagesListResult.value = value; + deserializedQuotaUsageList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedQuotaUsagesListResult.nextLink = reader.getString(); + deserializedQuotaUsageList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedQuotaUsagesListResult; + return deserializedQuotaUsageList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteMode.java index dab7f7eff01b..c972f8a7d05c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteMode.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteMode.java @@ -8,18 +8,20 @@ import java.util.Collection; /** - * Sets the promote mode for a replica server. This is a write only property. + * Type of operation to apply on the read replica. This property is write only. Standalone means that the read replica + * will be promoted to a standalone server, and will become a completely independent entity from the replication set. + * Switchover means that the read replica will roles with the primary server. */ public final class ReadReplicaPromoteMode extends ExpandableStringEnum { /** - * Static value standalone for ReadReplicaPromoteMode. + * Static value Standalone for ReadReplicaPromoteMode. */ - public static final ReadReplicaPromoteMode STANDALONE = fromString("standalone"); + public static final ReadReplicaPromoteMode STANDALONE = fromString("Standalone"); /** - * Static value switchover for ReadReplicaPromoteMode. + * Static value Switchover for ReadReplicaPromoteMode. */ - public static final ReadReplicaPromoteMode SWITCHOVER = fromString("switchover"); + public static final ReadReplicaPromoteMode SWITCHOVER = fromString("Switchover"); /** * Creates a new instance of ReadReplicaPromoteMode value. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteOption.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteOption.java new file mode 100644 index 000000000000..10b4fc9ea6d9 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteOption.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Data synchronization option to use when processing the operation specified in the promoteMode property. This property + * is write only. + */ +public final class ReadReplicaPromoteOption extends ExpandableStringEnum { + /** + * Static value Planned for ReadReplicaPromoteOption. + */ + public static final ReadReplicaPromoteOption PLANNED = fromString("Planned"); + + /** + * Static value Forced for ReadReplicaPromoteOption. + */ + public static final ReadReplicaPromoteOption FORCED = fromString("Forced"); + + /** + * Creates a new instance of ReadReplicaPromoteOption value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ReadReplicaPromoteOption() { + } + + /** + * Creates or finds a ReadReplicaPromoteOption from its string representation. + * + * @param name a name to look for. + * @return the corresponding ReadReplicaPromoteOption. + */ + public static ReadReplicaPromoteOption fromString(String name) { + return fromString(name, ReadReplicaPromoteOption.class); + } + + /** + * Gets known ReadReplicaPromoteOption values. + * + * @return known ReadReplicaPromoteOption values. + */ + public static Collection values() { + return values(ReadReplicaPromoteOption.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationType.java deleted file mode 100644 index 884e90b6f9a0..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationType.java +++ /dev/null @@ -1,51 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for RecommendationType. - */ -public final class RecommendationType extends ExpandableStringEnum { - /** - * Static value CreateIndex for RecommendationType. - */ - public static final RecommendationType CREATE_INDEX = fromString("CreateIndex"); - - /** - * Static value DropIndex for RecommendationType. - */ - public static final RecommendationType DROP_INDEX = fromString("DropIndex"); - - /** - * Creates a new instance of RecommendationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RecommendationType() { - } - - /** - * Creates or finds a RecommendationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding RecommendationType. - */ - public static RecommendationType fromString(String name) { - return fromString(name, RecommendationType.class); - } - - /** - * Gets known RecommendationType values. - * - * @return known RecommendationType values. - */ - public static Collection values() { - return values(RecommendationType.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeEnum.java index c50400a131fd..2e8af8ac605e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeEnum.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeEnum.java @@ -26,6 +26,11 @@ public final class RecommendationTypeEnum extends ExpandableStringEnum { + /** + * Static value CreateIndex for RecommendationTypeParameterEnum. + */ + public static final RecommendationTypeParameterEnum CREATE_INDEX = fromString("CreateIndex"); + + /** + * Static value DropIndex for RecommendationTypeParameterEnum. + */ + public static final RecommendationTypeParameterEnum DROP_INDEX = fromString("DropIndex"); + + /** + * Static value ReIndex for RecommendationTypeParameterEnum. + */ + public static final RecommendationTypeParameterEnum RE_INDEX = fromString("ReIndex"); + + /** + * Static value AnalyzeTable for RecommendationTypeParameterEnum. + */ + public static final RecommendationTypeParameterEnum ANALYZE_TABLE = fromString("AnalyzeTable"); + + /** + * Creates a new instance of RecommendationTypeParameterEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RecommendationTypeParameterEnum() { + } + + /** + * Creates or finds a RecommendationTypeParameterEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding RecommendationTypeParameterEnum. + */ + public static RecommendationTypeParameterEnum fromString(String name) { + return fromString(name, RecommendationTypeParameterEnum.class); + } + + /** + * Gets known RecommendationTypeParameterEnum values. + * + * @return known RecommendationTypeParameterEnum values. + */ + public static Collection values() { + return values(RecommendationTypeParameterEnum.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replica.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replica.java index d0805d9180c5..c771b5214aa8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replica.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replica.java @@ -17,30 +17,33 @@ @Fluent public final class Replica implements JsonSerializable { /* - * Used to indicate role of the server in replication set. + * Role of the server in a replication set. */ private ReplicationRole role; /* - * Replicas allowed for a server. + * Maximum number of read replicas allowed for a server. */ private Integer capacity; /* - * Gets the replication state of a replica server. This property is returned only for replicas api call. Supported - * values are Active, Catchup, Provisioning, Updating, Broken, Reconfiguring + * Indicates the replication state of a read replica. This property is returned only when the target server is a + * read replica. Possible values are Active, Broken, Catchup, Provisioning, Reconfiguring, and Updating */ private ReplicationState replicationState; /* - * Sets the promote mode for a replica server. This is a write only property. + * Type of operation to apply on the read replica. This property is write only. Standalone means that the read + * replica will be promoted to a standalone server, and will become a completely independent entity from the + * replication set. Switchover means that the read replica will roles with the primary server. */ private ReadReplicaPromoteMode promoteMode; /* - * Sets the promote options for a replica server. This is a write only property. + * Data synchronization option to use when processing the operation specified in the promoteMode property. This + * property is write only. */ - private ReplicationPromoteOption promoteOption; + private ReadReplicaPromoteOption promoteOption; /** * Creates an instance of Replica class. @@ -49,7 +52,7 @@ public Replica() { } /** - * Get the role property: Used to indicate role of the server in replication set. + * Get the role property: Role of the server in a replication set. * * @return the role value. */ @@ -58,7 +61,7 @@ public ReplicationRole role() { } /** - * Set the role property: Used to indicate role of the server in replication set. + * Set the role property: Role of the server in a replication set. * * @param role the role value to set. * @return the Replica object itself. @@ -69,7 +72,7 @@ public Replica withRole(ReplicationRole role) { } /** - * Get the capacity property: Replicas allowed for a server. + * Get the capacity property: Maximum number of read replicas allowed for a server. * * @return the capacity value. */ @@ -78,8 +81,9 @@ public Integer capacity() { } /** - * Get the replicationState property: Gets the replication state of a replica server. This property is returned only - * for replicas api call. Supported values are Active, Catchup, Provisioning, Updating, Broken, Reconfiguring. + * Get the replicationState property: Indicates the replication state of a read replica. This property is returned + * only when the target server is a read replica. Possible values are Active, Broken, Catchup, Provisioning, + * Reconfiguring, and Updating. * * @return the replicationState value. */ @@ -88,7 +92,10 @@ public ReplicationState replicationState() { } /** - * Get the promoteMode property: Sets the promote mode for a replica server. This is a write only property. + * Get the promoteMode property: Type of operation to apply on the read replica. This property is write only. + * Standalone means that the read replica will be promoted to a standalone server, and will become a completely + * independent entity from the replication set. Switchover means that the read replica will roles with the primary + * server. * * @return the promoteMode value. */ @@ -97,7 +104,10 @@ public ReadReplicaPromoteMode promoteMode() { } /** - * Set the promoteMode property: Sets the promote mode for a replica server. This is a write only property. + * Set the promoteMode property: Type of operation to apply on the read replica. This property is write only. + * Standalone means that the read replica will be promoted to a standalone server, and will become a completely + * independent entity from the replication set. Switchover means that the read replica will roles with the primary + * server. * * @param promoteMode the promoteMode value to set. * @return the Replica object itself. @@ -108,21 +118,23 @@ public Replica withPromoteMode(ReadReplicaPromoteMode promoteMode) { } /** - * Get the promoteOption property: Sets the promote options for a replica server. This is a write only property. + * Get the promoteOption property: Data synchronization option to use when processing the operation specified in the + * promoteMode property. This property is write only. * * @return the promoteOption value. */ - public ReplicationPromoteOption promoteOption() { + public ReadReplicaPromoteOption promoteOption() { return this.promoteOption; } /** - * Set the promoteOption property: Sets the promote options for a replica server. This is a write only property. + * Set the promoteOption property: Data synchronization option to use when processing the operation specified in the + * promoteMode property. This property is write only. * * @param promoteOption the promoteOption value to set. * @return the Replica object itself. */ - public Replica withPromoteOption(ReplicationPromoteOption promoteOption) { + public Replica withPromoteOption(ReadReplicaPromoteOption promoteOption) { this.promoteOption = promoteOption; return this; } @@ -171,7 +183,7 @@ public static Replica fromJson(JsonReader jsonReader) throws IOException { } else if ("promoteMode".equals(fieldName)) { deserializedReplica.promoteMode = ReadReplicaPromoteMode.fromString(reader.getString()); } else if ("promoteOption".equals(fieldName)) { - deserializedReplica.promoteOption = ReplicationPromoteOption.fromString(reader.getString()); + deserializedReplica.promoteOption = ReadReplicaPromoteOption.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replicas.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replicas.java index 5b670bf3deb4..fa95fe78bf23 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replicas.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replicas.java @@ -12,7 +12,7 @@ */ public interface Replicas { /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -24,7 +24,7 @@ public interface Replicas { PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the replicas for a given server. + * Lists all read replicas of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationPromoteOption.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationPromoteOption.java deleted file mode 100644 index a8937dbd5ed9..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationPromoteOption.java +++ /dev/null @@ -1,51 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Sets the promote options for a replica server. This is a write only property. - */ -public final class ReplicationPromoteOption extends ExpandableStringEnum { - /** - * Static value planned for ReplicationPromoteOption. - */ - public static final ReplicationPromoteOption PLANNED = fromString("planned"); - - /** - * Static value forced for ReplicationPromoteOption. - */ - public static final ReplicationPromoteOption FORCED = fromString("forced"); - - /** - * Creates a new instance of ReplicationPromoteOption value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ReplicationPromoteOption() { - } - - /** - * Creates or finds a ReplicationPromoteOption from its string representation. - * - * @param name a name to look for. - * @return the corresponding ReplicationPromoteOption. - */ - public static ReplicationPromoteOption fromString(String name) { - return fromString(name, ReplicationPromoteOption.class); - } - - /** - * Gets known ReplicationPromoteOption values. - * - * @return known ReplicationPromoteOption values. - */ - public static Collection values() { - return values(ReplicationPromoteOption.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationRole.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationRole.java index ae7f74ce4717..bb64fc3cf56c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationRole.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationRole.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Used to indicate role of the server in replication set. + * Role of the server in a replication set. */ public final class ReplicationRole extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationState.java index 1b71b1d08b40..46041d3abf52 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationState.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationState.java @@ -8,8 +8,8 @@ import java.util.Collection; /** - * Gets the replication state of a replica server. This property is returned only for replicas api call. Supported - * values are Active, Catchup, Provisioning, Updating, Broken, Reconfiguring. + * Indicates the replication state of a read replica. This property is returned only when the target server is a read + * replica. Possible values are Active, Broken, Catchup, Provisioning, Reconfiguring, and Updating. */ public final class ReplicationState extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ResourceProviders.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ResourceProviders.java deleted file mode 100644 index 69fa542400f5..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ResourceProviders.java +++ /dev/null @@ -1,50 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; - -/** - * Resource collection API of ResourceProviders. - */ -public interface ResourceProviders { - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration name's availability along with {@link Response}. - */ - Response checkMigrationNameAvailabilityWithResponse(String subscriptionId, - String resourceGroupName, String targetDbServerName, MigrationNameAvailabilityResourceInner parameters, - Context context); - - /** - * Check migration name validity and availability - * - * This method checks whether a proposed migration name is valid and available. - * - * @param subscriptionId The subscription ID of the target database server. - * @param resourceGroupName The resource group name of the target database server. - * @param targetDbServerName The name of the target database server. - * @param parameters The required parameters for checking if a migration name is available. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a migration name's availability. - */ - MigrationNameAvailabilityResource checkMigrationNameAvailability(String subscriptionId, String resourceGroupName, - String targetDbServerName, MigrationNameAvailabilityResourceInner parameters); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestartParameter.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestartParameter.java index 9a459e14d921..af701e82f5e2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestartParameter.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestartParameter.java @@ -12,12 +12,13 @@ import java.io.IOException; /** - * Represents server restart parameters. + * PostgreSQL database engine restart parameters. */ @Fluent public final class RestartParameter implements JsonSerializable { /* - * Indicates whether to restart the server with failover. + * Indicates if restart the PostgreSQL database engine should failover or switch over from primary to standby. This + * only works if server has high availability enabled. */ private Boolean restartWithFailover; @@ -33,7 +34,8 @@ public RestartParameter() { } /** - * Get the restartWithFailover property: Indicates whether to restart the server with failover. + * Get the restartWithFailover property: Indicates if restart the PostgreSQL database engine should failover or + * switch over from primary to standby. This only works if server has high availability enabled. * * @return the restartWithFailover value. */ @@ -42,7 +44,8 @@ public Boolean restartWithFailover() { } /** - * Set the restartWithFailover property: Indicates whether to restart the server with failover. + * Set the restartWithFailover property: Indicates if restart the PostgreSQL database engine should failover or + * switch over from primary to standby. This only works if server has high availability enabled. * * @param restartWithFailover the restartWithFailover value to set. * @return the RestartParameter object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestrictedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestrictedEnum.java deleted file mode 100644 index a4432f0b0764..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestrictedEnum.java +++ /dev/null @@ -1,52 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether this region is restricted. "Enabled" means region is restricted. "Disabled" stands for - * region is not restricted. Will be deprecated in future, please look to Supported Features for "Restricted". - */ -public final class RestrictedEnum extends ExpandableStringEnum { - /** - * Static value Enabled for RestrictedEnum. - */ - public static final RestrictedEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for RestrictedEnum. - */ - public static final RestrictedEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of RestrictedEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RestrictedEnum() { - } - - /** - * Creates or finds a RestrictedEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding RestrictedEnum. - */ - public static RestrictedEnum fromString(String name) { - return fromString(name, RestrictedEnum.class); - } - - /** - * Gets known RestrictedEnum values. - * - * @return known RestrictedEnum values. - */ - public static Collection values() { - return values(RestrictedEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Server.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Server.java index 5b22aebb4ac7..6979f5df6243 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Server.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Server.java @@ -52,14 +52,14 @@ public interface Server { Map tags(); /** - * Gets the sku property: The SKU (pricing tier) of the server. + * Gets the sku property: Compute tier and size of a server. * * @return the sku value. */ Sku sku(); /** - * Gets the identity property: Describes the identity of the application. + * Gets the identity property: User assigned managed identities assigned to the server. * * @return the identity value. */ @@ -73,43 +73,47 @@ public interface Server { SystemData systemData(); /** - * Gets the administratorLogin property: The administrator's login name of a server. Can only be specified when the - * server is being created (and is required for creation). + * Gets the administratorLogin property: Name of the login designated as the first password based administrator + * assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based + * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. + * If you disable password based authentication on a server which had it enabled, this password based role isn't + * deleted. * * @return the administratorLogin value. */ String administratorLogin(); /** - * Gets the administratorLoginPassword property: The administrator login password (required for server creation). + * Gets the administratorLoginPassword property: Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * * @return the administratorLoginPassword value. */ String administratorLoginPassword(); /** - * Gets the version property: PostgreSQL Server version. + * Gets the version property: Major version of PostgreSQL database engine. * * @return the version value. */ - ServerVersion version(); + PostgresMajorVersion version(); /** - * Gets the minorVersion property: The minor version of the server. + * Gets the minorVersion property: Minor version of PostgreSQL database engine. * * @return the minorVersion value. */ String minorVersion(); /** - * Gets the state property: A state of a server that is visible to user. + * Gets the state property: Possible states of a server. * * @return the state value. */ ServerState state(); /** - * Gets the fullyQualifiedDomainName property: The fully qualified domain name of a server. + * Gets the fullyQualifiedDomainName property: Fully qualified domain name of a server. * * @return the fullyQualifiedDomainName value. */ @@ -123,7 +127,7 @@ public interface Server { Storage storage(); /** - * Gets the authConfig property: AuthConfig properties of a server. + * Gets the authConfig property: Authentication configuration properties of a server. * * @return the authConfig value. */ @@ -144,8 +148,8 @@ public interface Server { Backup backup(); /** - * Gets the network property: Network properties of a server. This Network property is required to be passed only in - * case you want the server to be Private access server. + * Gets the network property: Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * * @return the network value. */ @@ -166,53 +170,53 @@ public interface Server { MaintenanceWindow maintenanceWindow(); /** - * Gets the sourceServerResourceId property: The source server resource ID to restore from. It's required when - * 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This property is returned - * only for Replica server. + * Gets the sourceServerResourceId property: Identifier of the server to be used as the source of the new server. + * Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or 'ReviveDropped'. This property is + * returned only when the target server is a read replica. * * @return the sourceServerResourceId value. */ String sourceServerResourceId(); /** - * Gets the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time to restore - * from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'ReviveDropped'. + * Gets the pointInTimeUtc property: Creation time (in ISO8601 format) of the backup which you want to restore in + * the new server. It's required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', or 'ReviveDropped'. * * @return the pointInTimeUtc value. */ OffsetDateTime pointInTimeUtc(); /** - * Gets the availabilityZone property: availability zone information of the server. + * Gets the availabilityZone property: Availability zone of a server. * * @return the availabilityZone value. */ String availabilityZone(); /** - * Gets the replicationRole property: Replication role of the server. + * Gets the replicationRole property: Role of the server in a replication set. * * @return the replicationRole value. */ ReplicationRole replicationRole(); /** - * Gets the replicaCapacity property: Replicas allowed for a server. + * Gets the replicaCapacity property: Maximum number of read replicas allowed for a server. * * @return the replicaCapacity value. */ Integer replicaCapacity(); /** - * Gets the replica property: Replica properties of a server. These Replica properties are required to be passed - * only in case you want to Promote a server. + * Gets the replica property: Read replica properties of a server. Required only in case that you want to promote a + * server. * * @return the replica value. */ Replica replica(); /** - * Gets the createMode property: The mode to create a new PostgreSQL server. + * Gets the createMode property: Creation mode of a new server. * * @return the createMode value. */ @@ -220,7 +224,7 @@ public interface Server { /** * Gets the privateEndpointConnections property: List of private endpoint connections associated with the specified - * resource. + * server. * * @return the privateEndpointConnections value. */ @@ -357,9 +361,9 @@ interface WithTags { */ interface WithSku { /** - * Specifies the sku property: The SKU (pricing tier) of the server.. + * Specifies the sku property: Compute tier and size of a server.. * - * @param sku The SKU (pricing tier) of the server. + * @param sku Compute tier and size of a server. * @return the next definition stage. */ WithCreate withSku(Sku sku); @@ -370,9 +374,9 @@ interface WithSku { */ interface WithIdentity { /** - * Specifies the identity property: Describes the identity of the application.. + * Specifies the identity property: User assigned managed identities assigned to the server.. * - * @param identity Describes the identity of the application. + * @param identity User assigned managed identities assigned to the server. * @return the next definition stage. */ WithCreate withIdentity(UserAssignedIdentity identity); @@ -383,11 +387,17 @@ interface WithIdentity { */ interface WithAdministratorLogin { /** - * Specifies the administratorLogin property: The administrator's login name of a server. Can only be - * specified when the server is being created (and is required for creation).. + * Specifies the administratorLogin property: Name of the login designated as the first password based + * administrator assigned to your instance of PostgreSQL. Must be specified the first time that you enable + * password based authentication on a server. Once set to a given value, it cannot be changed for the rest + * of the life of a server. If you disable password based authentication on a server which had it enabled, + * this password based role isn't deleted.. * - * @param administratorLogin The administrator's login name of a server. Can only be specified when the - * server is being created (and is required for creation). + * @param administratorLogin Name of the login designated as the first password based administrator assigned + * to your instance of PostgreSQL. Must be specified the first time that you enable password based + * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a + * server. If you disable password based authentication on a server which had it enabled, this password + * based role isn't deleted. * @return the next definition stage. */ WithCreate withAdministratorLogin(String administratorLogin); @@ -398,10 +408,11 @@ interface WithAdministratorLogin { */ interface WithAdministratorLoginPassword { /** - * Specifies the administratorLoginPassword property: The administrator login password (required for server - * creation).. + * Specifies the administratorLoginPassword property: Password assigned to the administrator login. As long + * as password authentication is enabled, this password can be changed at any time.. * - * @param administratorLoginPassword The administrator login password (required for server creation). + * @param administratorLoginPassword Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * @return the next definition stage. */ WithCreate withAdministratorLoginPassword(String administratorLoginPassword); @@ -412,12 +423,12 @@ interface WithAdministratorLoginPassword { */ interface WithVersion { /** - * Specifies the version property: PostgreSQL Server version.. + * Specifies the version property: Major version of PostgreSQL database engine.. * - * @param version PostgreSQL Server version. + * @param version Major version of PostgreSQL database engine. * @return the next definition stage. */ - WithCreate withVersion(ServerVersion version); + WithCreate withVersion(PostgresMajorVersion version); } /** @@ -438,9 +449,9 @@ interface WithStorage { */ interface WithAuthConfig { /** - * Specifies the authConfig property: AuthConfig properties of a server.. + * Specifies the authConfig property: Authentication configuration properties of a server.. * - * @param authConfig AuthConfig properties of a server. + * @param authConfig Authentication configuration properties of a server. * @return the next definition stage. */ WithCreate withAuthConfig(AuthConfig authConfig); @@ -477,11 +488,11 @@ interface WithBackup { */ interface WithNetwork { /** - * Specifies the network property: Network properties of a server. This Network property is required to be - * passed only in case you want the server to be Private access server.. + * Specifies the network property: Network properties of a server. Only required if you want your server to + * be integrated into a virtual network provided by customer.. * - * @param network Network properties of a server. This Network property is required to be passed only in - * case you want the server to be Private access server. + * @param network Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * @return the next definition stage. */ WithCreate withNetwork(Network network); @@ -505,13 +516,13 @@ interface WithHighAvailability { */ interface WithSourceServerResourceId { /** - * Specifies the sourceServerResourceId property: The source server resource ID to restore from. It's - * required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This - * property is returned only for Replica server. + * Specifies the sourceServerResourceId property: Identifier of the server to be used as the source of the + * new server. Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or + * 'ReviveDropped'. This property is returned only when the target server is a read replica.. * - * @param sourceServerResourceId The source server resource ID to restore from. It's required when - * 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This property is - * returned only for Replica server. + * @param sourceServerResourceId Identifier of the server to be used as the source of the new server. + * Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or 'ReviveDropped'. This + * property is returned only when the target server is a read replica. * @return the next definition stage. */ WithCreate withSourceServerResourceId(String sourceServerResourceId); @@ -522,12 +533,12 @@ interface WithSourceServerResourceId { */ interface WithPointInTimeUtc { /** - * Specifies the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time - * to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or + * Specifies the pointInTimeUtc property: Creation time (in ISO8601 format) of the backup which you want to + * restore in the new server. It's required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', or * 'ReviveDropped'.. * - * @param pointInTimeUtc Restore point creation time (ISO8601 format), specifying the time to restore from. - * It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'ReviveDropped'. + * @param pointInTimeUtc Creation time (in ISO8601 format) of the backup which you want to restore in the + * new server. It's required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', or 'ReviveDropped'. * @return the next definition stage. */ WithCreate withPointInTimeUtc(OffsetDateTime pointInTimeUtc); @@ -538,9 +549,9 @@ interface WithPointInTimeUtc { */ interface WithAvailabilityZone { /** - * Specifies the availabilityZone property: availability zone information of the server.. + * Specifies the availabilityZone property: Availability zone of a server.. * - * @param availabilityZone availability zone information of the server. + * @param availabilityZone Availability zone of a server. * @return the next definition stage. */ WithCreate withAvailabilityZone(String availabilityZone); @@ -551,9 +562,9 @@ interface WithAvailabilityZone { */ interface WithReplicationRole { /** - * Specifies the replicationRole property: Replication role of the server. + * Specifies the replicationRole property: Role of the server in a replication set.. * - * @param replicationRole Replication role of the server. + * @param replicationRole Role of the server in a replication set. * @return the next definition stage. */ WithCreate withReplicationRole(ReplicationRole replicationRole); @@ -564,9 +575,9 @@ interface WithReplicationRole { */ interface WithCreateMode { /** - * Specifies the createMode property: The mode to create a new PostgreSQL server.. + * Specifies the createMode property: Creation mode of a new server.. * - * @param createMode The mode to create a new PostgreSQL server. + * @param createMode Creation mode of a new server. * @return the next definition stage. */ WithCreate withCreateMode(CreateMode createMode); @@ -597,9 +608,9 @@ interface WithCluster { * The template for Server update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, UpdateStages.WithIdentity, - UpdateStages.WithAdministratorLogin, UpdateStages.WithAdministratorLoginPassword, UpdateStages.WithVersion, - UpdateStages.WithStorage, UpdateStages.WithBackup, UpdateStages.WithHighAvailability, - UpdateStages.WithMaintenanceWindow, UpdateStages.WithAuthConfig, UpdateStages.WithDataEncryption, + UpdateStages.WithAdministratorLoginPassword, UpdateStages.WithVersion, UpdateStages.WithStorage, + UpdateStages.WithBackup, UpdateStages.WithHighAvailability, UpdateStages.WithMaintenanceWindow, + UpdateStages.WithAuthConfig, UpdateStages.WithDataEncryption, UpdateStages.WithAvailabilityZone, UpdateStages.WithCreateMode, UpdateStages.WithReplicationRole, UpdateStages.WithReplica, UpdateStages.WithNetwork, UpdateStages.WithCluster { /** @@ -640,12 +651,12 @@ interface WithTags { */ interface WithSku { /** - * Specifies the sku property: The SKU (pricing tier) of the server.. + * Specifies the sku property: Compute tier and size of a server.. * - * @param sku The SKU (pricing tier) of the server. + * @param sku Compute tier and size of a server. * @return the next definition stage. */ - Update withSku(Sku sku); + Update withSku(SkuForPatch sku); } /** @@ -661,30 +672,16 @@ interface WithIdentity { Update withIdentity(UserAssignedIdentity identity); } - /** - * The stage of the Server update allowing to specify administratorLogin. - */ - interface WithAdministratorLogin { - /** - * Specifies the administratorLogin property: The administrator's login name of a server. Can only be - * specified when the server is trying to switch to password authentication and does not have default - * administrator login.. - * - * @param administratorLogin The administrator's login name of a server. Can only be specified when the - * server is trying to switch to password authentication and does not have default administrator login. - * @return the next definition stage. - */ - Update withAdministratorLogin(String administratorLogin); - } - /** * The stage of the Server update allowing to specify administratorLoginPassword. */ interface WithAdministratorLoginPassword { /** - * Specifies the administratorLoginPassword property: The password of the administrator login.. + * Specifies the administratorLoginPassword property: Password assigned to the administrator login. As long + * as password authentication is enabled, this password can be changed at any time.. * - * @param administratorLoginPassword The password of the administrator login. + * @param administratorLoginPassword Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * @return the next definition stage. */ Update withAdministratorLoginPassword(String administratorLoginPassword); @@ -695,13 +692,12 @@ interface WithAdministratorLoginPassword { */ interface WithVersion { /** - * Specifies the version property: PostgreSQL Server version. Version 17 is currently not supported for - * MVU.. + * Specifies the version property: Major version of PostgreSQL database engine.. * - * @param version PostgreSQL Server version. Version 17 is currently not supported for MVU. + * @param version Major version of PostgreSQL database engine. * @return the next definition stage. */ - Update withVersion(ServerVersion version); + Update withVersion(PostgresMajorVersion version); } /** @@ -727,7 +723,7 @@ interface WithBackup { * @param backup Backup properties of a server. * @return the next definition stage. */ - Update withBackup(Backup backup); + Update withBackup(BackupForPatch backup); } /** @@ -740,7 +736,7 @@ interface WithHighAvailability { * @param highAvailability High availability properties of a server. * @return the next definition stage. */ - Update withHighAvailability(HighAvailability highAvailability); + Update withHighAvailability(HighAvailabilityForPatch highAvailability); } /** @@ -753,7 +749,7 @@ interface WithMaintenanceWindow { * @param maintenanceWindow Maintenance window properties of a server. * @return the next definition stage. */ - Update withMaintenanceWindow(MaintenanceWindow maintenanceWindow); + Update withMaintenanceWindow(MaintenanceWindowForPatch maintenanceWindow); } /** @@ -761,12 +757,12 @@ interface WithMaintenanceWindow { */ interface WithAuthConfig { /** - * Specifies the authConfig property: AuthConfig properties of a server.. + * Specifies the authConfig property: Authentication configuration properties of a server.. * - * @param authConfig AuthConfig properties of a server. + * @param authConfig Authentication configuration properties of a server. * @return the next definition stage. */ - Update withAuthConfig(AuthConfig authConfig); + Update withAuthConfig(AuthConfigForPatch authConfig); } /** @@ -782,17 +778,30 @@ interface WithDataEncryption { Update withDataEncryption(DataEncryption dataEncryption); } + /** + * The stage of the Server update allowing to specify availabilityZone. + */ + interface WithAvailabilityZone { + /** + * Specifies the availabilityZone property: Availability zone of a server.. + * + * @param availabilityZone Availability zone of a server. + * @return the next definition stage. + */ + Update withAvailabilityZone(String availabilityZone); + } + /** * The stage of the Server update allowing to specify createMode. */ interface WithCreateMode { /** - * Specifies the createMode property: The mode to update a new PostgreSQL server.. + * Specifies the createMode property: Update mode of an existing server.. * - * @param createMode The mode to update a new PostgreSQL server. + * @param createMode Update mode of an existing server. * @return the next definition stage. */ - Update withCreateMode(CreateModeForUpdate createMode); + Update withCreateMode(CreateModeForPatch createMode); } /** @@ -800,9 +809,9 @@ interface WithCreateMode { */ interface WithReplicationRole { /** - * Specifies the replicationRole property: Replication role of the server. + * Specifies the replicationRole property: Role of the server in a replication set.. * - * @param replicationRole Replication role of the server. + * @param replicationRole Role of the server in a replication set. * @return the next definition stage. */ Update withReplicationRole(ReplicationRole replicationRole); @@ -813,11 +822,11 @@ interface WithReplicationRole { */ interface WithReplica { /** - * Specifies the replica property: Replica properties of a server. These Replica properties are required to - * be passed only in case you want to Promote a server.. + * Specifies the replica property: Read replica properties of a server. Required only in case that you want + * to promote a server.. * - * @param replica Replica properties of a server. These Replica properties are required to be passed only in - * case you want to Promote a server. + * @param replica Read replica properties of a server. Required only in case that you want to promote a + * server. * @return the next definition stage. */ Update withReplica(Replica replica); @@ -828,11 +837,11 @@ interface WithReplica { */ interface WithNetwork { /** - * Specifies the network property: Network properties of a server. These are required to be passed only in - * case if server is a private access server.. + * Specifies the network property: Network properties of a server. Only required if you want your server to + * be integrated into a virtual network provided by customer.. * - * @param network Network properties of a server. These are required to be passed only in case if server is - * a private access server. + * @param network Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * @return the next definition stage. */ Update withNetwork(Network network); @@ -868,7 +877,7 @@ interface WithCluster { Server refresh(Context context); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -876,9 +885,9 @@ interface WithCluster { void restart(); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -887,7 +896,7 @@ interface WithCluster { void restart(RestartParameter parameters, Context context); /** - * Starts a server. + * Starts a stopped server. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -895,7 +904,7 @@ interface WithCluster { void start(); /** - * Starts a server. + * Starts a stopped server. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerEditionCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerEditionCapability.java similarity index 65% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerEditionCapability.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerEditionCapability.java index d2c5843c34b8..9972bc7aefa0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerEditionCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerEditionCapability.java @@ -12,27 +12,27 @@ import java.util.List; /** - * Flexible server edition capabilities. + * Capabilities in terms of compute tier. */ @Immutable -public final class FlexibleServerEditionCapability extends CapabilityBase { +public final class ServerEditionCapability extends CapabilityBase { /* - * Server edition name + * Name of compute tier. */ private String name; /* - * Default sku name for the server edition + * Default compute name (SKU) for this computer tier. */ private String defaultSkuName; /* - * The list of editions supported by this server edition. + * List of storage editions supported by this compute tier and compute name. */ private List supportedStorageEditions; /* - * List of supported server SKUs. + * List of supported compute names (SKUs). */ private List supportedServerSkus; @@ -47,13 +47,13 @@ public final class FlexibleServerEditionCapability extends CapabilityBase { private CapabilityStatus status; /** - * Creates an instance of FlexibleServerEditionCapability class. + * Creates an instance of ServerEditionCapability class. */ - public FlexibleServerEditionCapability() { + public ServerEditionCapability() { } /** - * Get the name property: Server edition name. + * Get the name property: Name of compute tier. * * @return the name value. */ @@ -62,7 +62,7 @@ public String name() { } /** - * Get the defaultSkuName property: Default sku name for the server edition. + * Get the defaultSkuName property: Default compute name (SKU) for this computer tier. * * @return the defaultSkuName value. */ @@ -71,7 +71,8 @@ public String defaultSkuName() { } /** - * Get the supportedStorageEditions property: The list of editions supported by this server edition. + * Get the supportedStorageEditions property: List of storage editions supported by this compute tier and compute + * name. * * @return the supportedStorageEditions value. */ @@ -80,7 +81,7 @@ public List supportedStorageEditions() { } /** - * Get the supportedServerSkus property: List of supported server SKUs. + * Get the supportedServerSkus property: List of supported compute names (SKUs). * * @return the supportedServerSkus value. */ @@ -133,44 +134,42 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of FlexibleServerEditionCapability from the JsonReader. + * Reads an instance of ServerEditionCapability from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of FlexibleServerEditionCapability if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the FlexibleServerEditionCapability. + * @return An instance of ServerEditionCapability if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerEditionCapability. */ - public static FlexibleServerEditionCapability fromJson(JsonReader jsonReader) throws IOException { + public static ServerEditionCapability fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - FlexibleServerEditionCapability deserializedFlexibleServerEditionCapability - = new FlexibleServerEditionCapability(); + ServerEditionCapability deserializedServerEditionCapability = new ServerEditionCapability(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("status".equals(fieldName)) { - deserializedFlexibleServerEditionCapability.status - = CapabilityStatus.fromString(reader.getString()); + deserializedServerEditionCapability.status = CapabilityStatus.fromString(reader.getString()); } else if ("reason".equals(fieldName)) { - deserializedFlexibleServerEditionCapability.reason = reader.getString(); + deserializedServerEditionCapability.reason = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedFlexibleServerEditionCapability.name = reader.getString(); + deserializedServerEditionCapability.name = reader.getString(); } else if ("defaultSkuName".equals(fieldName)) { - deserializedFlexibleServerEditionCapability.defaultSkuName = reader.getString(); + deserializedServerEditionCapability.defaultSkuName = reader.getString(); } else if ("supportedStorageEditions".equals(fieldName)) { List supportedStorageEditions = reader.readArray(reader1 -> StorageEditionCapability.fromJson(reader1)); - deserializedFlexibleServerEditionCapability.supportedStorageEditions = supportedStorageEditions; + deserializedServerEditionCapability.supportedStorageEditions = supportedStorageEditions; } else if ("supportedServerSkus".equals(fieldName)) { List supportedServerSkus = reader.readArray(reader1 -> ServerSkuCapability.fromJson(reader1)); - deserializedFlexibleServerEditionCapability.supportedServerSkus = supportedServerSkus; + deserializedServerEditionCapability.supportedServerSkus = supportedServerSkus; } else { reader.skipChildren(); } } - return deserializedFlexibleServerEditionCapability; + return deserializedServerEditionCapability; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForUpdate.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForPatch.java similarity index 57% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForUpdate.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForPatch.java index 165e061be555..670d701f4109 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForUpdate.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForPatch.java @@ -9,7 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerPropertiesForUpdate; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerPropertiesForPatch; import java.io.IOException; import java.util.Map; @@ -17,11 +17,11 @@ * Represents a server to be updated. */ @Fluent -public final class ServerForUpdate implements JsonSerializable { +public final class ServerForPatch implements JsonSerializable { /* - * The SKU (pricing tier) of the server. + * Compute tier and size of a server. */ - private Sku sku; + private SkuForPatch sku; /* * Describes the identity of the application. @@ -31,7 +31,7 @@ public final class ServerForUpdate implements JsonSerializable /* * Properties of the server. */ - private ServerPropertiesForUpdate innerProperties; + private ServerPropertiesForPatch innerProperties; /* * Application-specific metadata in the form of key-value pairs. @@ -39,27 +39,27 @@ public final class ServerForUpdate implements JsonSerializable private Map tags; /** - * Creates an instance of ServerForUpdate class. + * Creates an instance of ServerForPatch class. */ - public ServerForUpdate() { + public ServerForPatch() { } /** - * Get the sku property: The SKU (pricing tier) of the server. + * Get the sku property: Compute tier and size of a server. * * @return the sku value. */ - public Sku sku() { + public SkuForPatch sku() { return this.sku; } /** - * Set the sku property: The SKU (pricing tier) of the server. + * Set the sku property: Compute tier and size of a server. * * @param sku the sku value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withSku(Sku sku) { + public ServerForPatch withSku(SkuForPatch sku) { this.sku = sku; return this; } @@ -77,9 +77,9 @@ public UserAssignedIdentity identity() { * Set the identity property: Describes the identity of the application. * * @param identity the identity value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withIdentity(UserAssignedIdentity identity) { + public ServerForPatch withIdentity(UserAssignedIdentity identity) { this.identity = identity; return this; } @@ -89,7 +89,7 @@ public ServerForUpdate withIdentity(UserAssignedIdentity identity) { * * @return the innerProperties value. */ - private ServerPropertiesForUpdate innerProperties() { + private ServerPropertiesForPatch innerProperties() { return this.innerProperties; } @@ -106,16 +106,19 @@ public Map tags() { * Set the tags property: Application-specific metadata in the form of key-value pairs. * * @param tags the tags value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withTags(Map tags) { + public ServerForPatch withTags(Map tags) { this.tags = tags; return this; } /** - * Get the administratorLogin property: The administrator's login name of a server. Can only be specified when the - * server is trying to switch to password authentication and does not have default administrator login. + * Get the administratorLogin property: Name of the login designated as the first password based administrator + * assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based + * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. + * If you disable password based authentication on a server which had it enabled, this password based role isn't + * deleted. * * @return the administratorLogin value. */ @@ -124,22 +127,26 @@ public String administratorLogin() { } /** - * Set the administratorLogin property: The administrator's login name of a server. Can only be specified when the - * server is trying to switch to password authentication and does not have default administrator login. + * Set the administratorLogin property: Name of the login designated as the first password based administrator + * assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based + * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. + * If you disable password based authentication on a server which had it enabled, this password based role isn't + * deleted. * * @param administratorLogin the administratorLogin value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withAdministratorLogin(String administratorLogin) { + public ServerForPatch withAdministratorLogin(String administratorLogin) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withAdministratorLogin(administratorLogin); return this; } /** - * Get the administratorLoginPassword property: The password of the administrator login. + * Get the administratorLoginPassword property: Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * * @return the administratorLoginPassword value. */ @@ -148,37 +155,38 @@ public String administratorLoginPassword() { } /** - * Set the administratorLoginPassword property: The password of the administrator login. + * Set the administratorLoginPassword property: Password assigned to the administrator login. As long as password + * authentication is enabled, this password can be changed at any time. * * @param administratorLoginPassword the administratorLoginPassword value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withAdministratorLoginPassword(String administratorLoginPassword) { + public ServerForPatch withAdministratorLoginPassword(String administratorLoginPassword) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withAdministratorLoginPassword(administratorLoginPassword); return this; } /** - * Get the version property: PostgreSQL Server version. Version 17 is currently not supported for MVU. + * Get the version property: Major version of PostgreSQL database engine. * * @return the version value. */ - public ServerVersion version() { + public PostgresMajorVersion version() { return this.innerProperties() == null ? null : this.innerProperties().version(); } /** - * Set the version property: PostgreSQL Server version. Version 17 is currently not supported for MVU. + * Set the version property: Major version of PostgreSQL database engine. * * @param version the version value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withVersion(ServerVersion version) { + public ServerForPatch withVersion(PostgresMajorVersion version) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withVersion(version); return this; @@ -197,11 +205,11 @@ public Storage storage() { * Set the storage property: Storage properties of a server. * * @param storage the storage value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withStorage(Storage storage) { + public ServerForPatch withStorage(Storage storage) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withStorage(storage); return this; @@ -212,7 +220,7 @@ public ServerForUpdate withStorage(Storage storage) { * * @return the backup value. */ - public Backup backup() { + public BackupForPatch backup() { return this.innerProperties() == null ? null : this.innerProperties().backup(); } @@ -220,11 +228,11 @@ public Backup backup() { * Set the backup property: Backup properties of a server. * * @param backup the backup value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withBackup(Backup backup) { + public ServerForPatch withBackup(BackupForPatch backup) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withBackup(backup); return this; @@ -235,7 +243,7 @@ public ServerForUpdate withBackup(Backup backup) { * * @return the highAvailability value. */ - public HighAvailability highAvailability() { + public HighAvailabilityForPatch highAvailability() { return this.innerProperties() == null ? null : this.innerProperties().highAvailability(); } @@ -243,11 +251,11 @@ public HighAvailability highAvailability() { * Set the highAvailability property: High availability properties of a server. * * @param highAvailability the highAvailability value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withHighAvailability(HighAvailability highAvailability) { + public ServerForPatch withHighAvailability(HighAvailabilityForPatch highAvailability) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withHighAvailability(highAvailability); return this; @@ -258,7 +266,7 @@ public ServerForUpdate withHighAvailability(HighAvailability highAvailability) { * * @return the maintenanceWindow value. */ - public MaintenanceWindow maintenanceWindow() { + public MaintenanceWindowForPatch maintenanceWindow() { return this.innerProperties() == null ? null : this.innerProperties().maintenanceWindow(); } @@ -266,34 +274,34 @@ public MaintenanceWindow maintenanceWindow() { * Set the maintenanceWindow property: Maintenance window properties of a server. * * @param maintenanceWindow the maintenanceWindow value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withMaintenanceWindow(MaintenanceWindow maintenanceWindow) { + public ServerForPatch withMaintenanceWindow(MaintenanceWindowForPatch maintenanceWindow) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withMaintenanceWindow(maintenanceWindow); return this; } /** - * Get the authConfig property: AuthConfig properties of a server. + * Get the authConfig property: Authentication configuration properties of a server. * * @return the authConfig value. */ - public AuthConfig authConfig() { + public AuthConfigForPatch authConfig() { return this.innerProperties() == null ? null : this.innerProperties().authConfig(); } /** - * Set the authConfig property: AuthConfig properties of a server. + * Set the authConfig property: Authentication configuration properties of a server. * * @param authConfig the authConfig value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withAuthConfig(AuthConfig authConfig) { + public ServerForPatch withAuthConfig(AuthConfigForPatch authConfig) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withAuthConfig(authConfig); return this; @@ -312,41 +320,64 @@ public DataEncryption dataEncryption() { * Set the dataEncryption property: Data encryption properties of a server. * * @param dataEncryption the dataEncryption value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withDataEncryption(DataEncryption dataEncryption) { + public ServerForPatch withDataEncryption(DataEncryption dataEncryption) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withDataEncryption(dataEncryption); return this; } /** - * Get the createMode property: The mode to update a new PostgreSQL server. + * Get the availabilityZone property: Availability zone of a server. + * + * @return the availabilityZone value. + */ + public String availabilityZone() { + return this.innerProperties() == null ? null : this.innerProperties().availabilityZone(); + } + + /** + * Set the availabilityZone property: Availability zone of a server. + * + * @param availabilityZone the availabilityZone value to set. + * @return the ServerForPatch object itself. + */ + public ServerForPatch withAvailabilityZone(String availabilityZone) { + if (this.innerProperties() == null) { + this.innerProperties = new ServerPropertiesForPatch(); + } + this.innerProperties().withAvailabilityZone(availabilityZone); + return this; + } + + /** + * Get the createMode property: Update mode of an existing server. * * @return the createMode value. */ - public CreateModeForUpdate createMode() { + public CreateModeForPatch createMode() { return this.innerProperties() == null ? null : this.innerProperties().createMode(); } /** - * Set the createMode property: The mode to update a new PostgreSQL server. + * Set the createMode property: Update mode of an existing server. * * @param createMode the createMode value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withCreateMode(CreateModeForUpdate createMode) { + public ServerForPatch withCreateMode(CreateModeForPatch createMode) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withCreateMode(createMode); return this; } /** - * Get the replicationRole property: Replication role of the server. + * Get the replicationRole property: Role of the server in a replication set. * * @return the replicationRole value. */ @@ -355,22 +386,22 @@ public ReplicationRole replicationRole() { } /** - * Set the replicationRole property: Replication role of the server. + * Set the replicationRole property: Role of the server in a replication set. * * @param replicationRole the replicationRole value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withReplicationRole(ReplicationRole replicationRole) { + public ServerForPatch withReplicationRole(ReplicationRole replicationRole) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withReplicationRole(replicationRole); return this; } /** - * Get the replica property: Replica properties of a server. These Replica properties are required to be passed only - * in case you want to Promote a server. + * Get the replica property: Read replica properties of a server. Required only in case that you want to promote a + * server. * * @return the replica value. */ @@ -379,23 +410,23 @@ public Replica replica() { } /** - * Set the replica property: Replica properties of a server. These Replica properties are required to be passed only - * in case you want to Promote a server. + * Set the replica property: Read replica properties of a server. Required only in case that you want to promote a + * server. * * @param replica the replica value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withReplica(Replica replica) { + public ServerForPatch withReplica(Replica replica) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withReplica(replica); return this; } /** - * Get the network property: Network properties of a server. These are required to be passed only in case if server - * is a private access server. + * Get the network property: Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * * @return the network value. */ @@ -404,15 +435,15 @@ public Network network() { } /** - * Set the network property: Network properties of a server. These are required to be passed only in case if server - * is a private access server. + * Set the network property: Network properties of a server. Only required if you want your server to be integrated + * into a virtual network provided by customer. * * @param network the network value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withNetwork(Network network) { + public ServerForPatch withNetwork(Network network) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withNetwork(network); return this; @@ -431,11 +462,11 @@ public Cluster cluster() { * Set the cluster property: Cluster properties of a server. * * @param cluster the cluster value to set. - * @return the ServerForUpdate object itself. + * @return the ServerForPatch object itself. */ - public ServerForUpdate withCluster(Cluster cluster) { + public ServerForPatch withCluster(Cluster cluster) { if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForUpdate(); + this.innerProperties = new ServerPropertiesForPatch(); } this.innerProperties().withCluster(cluster); return this; @@ -472,35 +503,35 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ServerForUpdate from the JsonReader. + * Reads an instance of ServerForPatch from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ServerForUpdate if the JsonReader was pointing to an instance of it, or null if it was + * @return An instance of ServerForPatch if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IOException If an error occurs while reading the ServerForUpdate. + * @throws IOException If an error occurs while reading the ServerForPatch. */ - public static ServerForUpdate fromJson(JsonReader jsonReader) throws IOException { + public static ServerForPatch fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ServerForUpdate deserializedServerForUpdate = new ServerForUpdate(); + ServerForPatch deserializedServerForPatch = new ServerForPatch(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("sku".equals(fieldName)) { - deserializedServerForUpdate.sku = Sku.fromJson(reader); + deserializedServerForPatch.sku = SkuForPatch.fromJson(reader); } else if ("identity".equals(fieldName)) { - deserializedServerForUpdate.identity = UserAssignedIdentity.fromJson(reader); + deserializedServerForPatch.identity = UserAssignedIdentity.fromJson(reader); } else if ("properties".equals(fieldName)) { - deserializedServerForUpdate.innerProperties = ServerPropertiesForUpdate.fromJson(reader); + deserializedServerForPatch.innerProperties = ServerPropertiesForPatch.fromJson(reader); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedServerForUpdate.tags = tags; + deserializedServerForPatch.tags = tags; } else { reader.skipChildren(); } } - return deserializedServerForUpdate; + return deserializedServerForPatch; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerHAState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerHAState.java deleted file mode 100644 index a483089e1881..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerHAState.java +++ /dev/null @@ -1,71 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A state of a HA server that is visible to user. - */ -public final class ServerHAState extends ExpandableStringEnum { - /** - * Static value NotEnabled for ServerHAState. - */ - public static final ServerHAState NOT_ENABLED = fromString("NotEnabled"); - - /** - * Static value CreatingStandby for ServerHAState. - */ - public static final ServerHAState CREATING_STANDBY = fromString("CreatingStandby"); - - /** - * Static value ReplicatingData for ServerHAState. - */ - public static final ServerHAState REPLICATING_DATA = fromString("ReplicatingData"); - - /** - * Static value FailingOver for ServerHAState. - */ - public static final ServerHAState FAILING_OVER = fromString("FailingOver"); - - /** - * Static value Healthy for ServerHAState. - */ - public static final ServerHAState HEALTHY = fromString("Healthy"); - - /** - * Static value RemovingStandby for ServerHAState. - */ - public static final ServerHAState REMOVING_STANDBY = fromString("RemovingStandby"); - - /** - * Creates a new instance of ServerHAState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ServerHAState() { - } - - /** - * Creates or finds a ServerHAState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ServerHAState. - */ - public static ServerHAState fromString(String name) { - return fromString(name, ServerHAState.class); - } - - /** - * Gets known ServerHAState values. - * - * @return known ServerHAState values. - */ - public static Collection values() { - return values(ServerHAState.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerList.java similarity index 70% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerList.java index 18be8a706d16..862777192d6d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerList.java @@ -17,9 +17,9 @@ * A list of servers. */ @Fluent -public final class ServerListResult implements JsonSerializable { +public final class ServerList implements JsonSerializable { /* - * The list of flexible servers + * The list of servers */ private List value; @@ -29,13 +29,13 @@ public final class ServerListResult implements JsonSerializable value() { } /** - * Set the value property: The list of flexible servers. + * Set the value property: The list of servers. * * @param value the value value to set. - * @return the ServerListResult object itself. + * @return the ServerList object itself. */ - public ServerListResult withValue(List value) { + public ServerList withValue(List value) { this.value = value; return this; } @@ -67,9 +67,9 @@ public String nextLink() { * Set the nextLink property: The link used to get the next page of operations. * * @param nextLink the nextLink value to set. - * @return the ServerListResult object itself. + * @return the ServerList object itself. */ - public ServerListResult withNextLink(String nextLink) { + public ServerList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } @@ -97,31 +97,31 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ServerListResult from the JsonReader. + * Reads an instance of ServerList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ServerListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ServerListResult. + * @return An instance of ServerList if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the ServerList. */ - public static ServerListResult fromJson(JsonReader jsonReader) throws IOException { + public static ServerList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ServerListResult deserializedServerListResult = new ServerListResult(); + ServerList deserializedServerList = new ServerList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ServerInner.fromJson(reader1)); - deserializedServerListResult.value = value; + deserializedServerList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedServerListResult.nextLink = reader.getString(); + deserializedServerList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedServerListResult; + return deserializedServerList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerPublicNetworkAccessState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerPublicNetworkAccessState.java index 095df310bd12..77c01af64dea 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerPublicNetworkAccessState.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerPublicNetworkAccessState.java @@ -8,7 +8,8 @@ import java.util.Collection; /** - * public network access is enabled or not. + * Indicates if public network access is enabled or not. This is only supported for servers that are not integrated into + * a virtual network which is owned and provided by customer when server is deployed. */ public final class ServerPublicNetworkAccessState extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSku.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSku.java index 63f99216aa9e..a2fe07ed0362 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSku.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSku.java @@ -12,17 +12,18 @@ import java.io.IOException; /** - * Sku information related properties of a server. + * Compute information of a server. */ @Fluent public final class ServerSku implements JsonSerializable { /* - * The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. + * Compute tier and size of the database server. This object is empty for an Azure Database for PostgreSQL single + * server. */ private String name; /* - * The tier of the particular SKU, e.g. Burstable. + * Tier of the compute assigned to a server. */ private SkuTier tier; @@ -33,7 +34,8 @@ public ServerSku() { } /** - * Get the name property: The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. + * Get the name property: Compute tier and size of the database server. This object is empty for an Azure Database + * for PostgreSQL single server. * * @return the name value. */ @@ -42,7 +44,8 @@ public String name() { } /** - * Set the name property: The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. + * Set the name property: Compute tier and size of the database server. This object is empty for an Azure Database + * for PostgreSQL single server. * * @param name the name value to set. * @return the ServerSku object itself. @@ -53,7 +56,7 @@ public ServerSku withName(String name) { } /** - * Get the tier property: The tier of the particular SKU, e.g. Burstable. + * Get the tier property: Tier of the compute assigned to a server. * * @return the tier value. */ @@ -62,7 +65,7 @@ public SkuTier tier() { } /** - * Set the tier property: The tier of the particular SKU, e.g. Burstable. + * Set the tier property: Tier of the compute assigned to a server. * * @param tier the tier value to set. * @return the ServerSku object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSkuCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSkuCapability.java index 3d2b935bf3ee..97a567f0ed30 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSkuCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSkuCapability.java @@ -12,47 +12,47 @@ import java.util.List; /** - * Sku capability. + * Capabilities in terms of compute. */ @Immutable public final class ServerSkuCapability extends CapabilityBase { /* - * Sku name + * Name of the compute (SKU). */ private String name; /* - * Supported vCores + * vCores available for this compute. */ private Integer vCores; /* - * Supported IOPS + * Maximum IOPS supported by this compute. */ private Integer supportedIops; /* - * Supported memory per vCore in MB + * Supported memory (in MB) per virtual core assigned to this compute. */ private Long supportedMemoryPerVcoreMb; /* - * List of supported Availability Zones. E.g. "1", "2", "3" + * List of supported availability zones. E.g. '1', '2', '3' */ private List supportedZones; /* - * Supported high availability mode + * Modes of high availability supported for this compute. */ - private List supportedHaMode; + private List supportedHaMode; /* - * The supported features. + * Features supported. */ private List supportedFeatures; /* - * The value of security profile indicating if its confidential vm + * Security profile of the compute. Indicates if it's a Confidential Compute virtual machine. */ private String securityProfile; @@ -73,7 +73,7 @@ public ServerSkuCapability() { } /** - * Get the name property: Sku name. + * Get the name property: Name of the compute (SKU). * * @return the name value. */ @@ -82,7 +82,7 @@ public String name() { } /** - * Get the vCores property: Supported vCores. + * Get the vCores property: vCores available for this compute. * * @return the vCores value. */ @@ -91,7 +91,7 @@ public Integer vCores() { } /** - * Get the supportedIops property: Supported IOPS. + * Get the supportedIops property: Maximum IOPS supported by this compute. * * @return the supportedIops value. */ @@ -100,7 +100,7 @@ public Integer supportedIops() { } /** - * Get the supportedMemoryPerVcoreMb property: Supported memory per vCore in MB. + * Get the supportedMemoryPerVcoreMb property: Supported memory (in MB) per virtual core assigned to this compute. * * @return the supportedMemoryPerVcoreMb value. */ @@ -109,7 +109,7 @@ public Long supportedMemoryPerVcoreMb() { } /** - * Get the supportedZones property: List of supported Availability Zones. E.g. "1", "2", "3". + * Get the supportedZones property: List of supported availability zones. E.g. '1', '2', '3'. * * @return the supportedZones value. */ @@ -118,16 +118,16 @@ public List supportedZones() { } /** - * Get the supportedHaMode property: Supported high availability mode. + * Get the supportedHaMode property: Modes of high availability supported for this compute. * * @return the supportedHaMode value. */ - public List supportedHaMode() { + public List supportedHaMode() { return this.supportedHaMode; } /** - * Get the supportedFeatures property: The supported features. + * Get the supportedFeatures property: Features supported. * * @return the supportedFeatures value. */ @@ -136,7 +136,8 @@ public List supportedFeatures() { } /** - * Get the securityProfile property: The value of security profile indicating if its confidential vm. + * Get the securityProfile property: Security profile of the compute. Indicates if it's a Confidential Compute + * virtual machine. * * @return the securityProfile value. */ @@ -216,7 +217,8 @@ public static ServerSkuCapability fromJson(JsonReader jsonReader) throws IOExcep List supportedZones = reader.readArray(reader1 -> reader1.getString()); deserializedServerSkuCapability.supportedZones = supportedZones; } else if ("supportedHaMode".equals(fieldName)) { - List supportedHaMode = reader.readArray(reader1 -> HaMode.fromString(reader1.getString())); + List supportedHaMode + = reader.readArray(reader1 -> HighAvailabilityMode.fromString(reader1.getString())); deserializedServerSkuCapability.supportedHaMode = supportedHaMode; } else if ("supportedFeatures".equals(fieldName)) { List supportedFeatures diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerState.java index c0d72cc1c59a..cdb7e1b2a03a 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerState.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerState.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * A state of a server that is visible to user. + * Possible states of a server. */ public final class ServerState extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionListResult.java deleted file mode 100644 index cf42365a2e8b..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionListResult.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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerThreatProtectionSettingsModelInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of the server's Advanced Threat Protection settings. - */ -@Immutable -public final class ServerThreatProtectionListResult implements JsonSerializable { - /* - * Array of results. - */ - private List value; - - /* - * Link to retrieve next page of results. - */ - private String nextLink; - - /** - * Creates an instance of ServerThreatProtectionListResult class. - */ - public ServerThreatProtectionListResult() { - } - - /** - * Get the value property: Array of results. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: Link to retrieve next page of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServerThreatProtectionListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServerThreatProtectionListResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ServerThreatProtectionListResult. - */ - public static ServerThreatProtectionListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServerThreatProtectionListResult deserializedServerThreatProtectionListResult - = new ServerThreatProtectionListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ServerThreatProtectionSettingsModelInner.fromJson(reader1)); - deserializedServerThreatProtectionListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedServerThreatProtectionListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedServerThreatProtectionListResult; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettings.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettings.java index 83802a4e1ba3..028b26e00a9c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettings.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettings.java @@ -4,97 +4,15 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - /** * Resource collection API of ServerThreatProtectionSettings. */ public interface ServerThreatProtectionSettings { /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server's Threat Protection state as paginated response with {@link PagedIterable}. - */ - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Get a list of server's Threat Protection state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server's Threat Protection state as paginated response with {@link PagedIterable}. - */ - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, Context context); - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName The name of the Threat Protection state. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings. - */ - ServerThreatProtectionSettingsModel get(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName); - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings along with {@link Response}. - */ - ServerThreatProtectionSettingsModel getById(String id); - - /** - * Get a server's Advanced Threat Protection settings. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's Advanced Threat Protection settings along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ServerThreatProtectionSettingsModel resource. + * Begins definition for a new AdvancedThreatProtectionSettingsModel resource. * * @param name resource name. - * @return the first stage of the new ServerThreatProtectionSettingsModel definition. + * @return the first stage of the new AdvancedThreatProtectionSettingsModel definition. */ - ServerThreatProtectionSettingsModel.DefinitionStages.Blank define(ThreatProtectionName name); + AdvancedThreatProtectionSettingsModel.DefinitionStages.Blank define(ThreatProtectionName name); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersion.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersion.java deleted file mode 100644 index d32b5c9d571f..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersion.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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The version of a server. - */ -public final class ServerVersion extends ExpandableStringEnum { - /** - * Static value 17 for ServerVersion. - */ - public static final ServerVersion ONE_SEVEN = fromString("17"); - - /** - * Static value 16 for ServerVersion. - */ - public static final ServerVersion ONE_SIX = fromString("16"); - - /** - * Static value 15 for ServerVersion. - */ - public static final ServerVersion ONE_FIVE = fromString("15"); - - /** - * Static value 14 for ServerVersion. - */ - public static final ServerVersion ONE_FOUR = fromString("14"); - - /** - * Static value 13 for ServerVersion. - */ - public static final ServerVersion ONE_THREE = fromString("13"); - - /** - * Static value 12 for ServerVersion. - */ - public static final ServerVersion ONE_TWO = fromString("12"); - - /** - * Static value 11 for ServerVersion. - */ - public static final ServerVersion ONE_ONE = fromString("11"); - - /** - * Creates a new instance of ServerVersion value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ServerVersion() { - } - - /** - * Creates or finds a ServerVersion from its string representation. - * - * @param name a name to look for. - * @return the corresponding ServerVersion. - */ - public static ServerVersion fromString(String name) { - return fromString(name, ServerVersion.class); - } - - /** - * Gets known ServerVersion values. - * - * @return known ServerVersion values. - */ - public static Collection values() { - return values(ServerVersion.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersionCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersionCapability.java index c380981455ef..67436e57527d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersionCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersionCapability.java @@ -12,22 +12,22 @@ import java.util.List; /** - * Server version capabilities. + * Capabilities in terms of major versions of PostgreSQL database engine. */ @Immutable public final class ServerVersionCapability extends CapabilityBase { /* - * Server version + * Major version of PostgreSQL database engine. */ private String name; /* - * Supported servers versions to upgrade + * Major versions of PostgreSQL database engine to which this version can be automatically upgraded. */ private List supportedVersionsToUpgrade; /* - * The supported features. + * Features supported. */ private List supportedFeatures; @@ -48,7 +48,7 @@ public ServerVersionCapability() { } /** - * Get the name property: Server version. + * Get the name property: Major version of PostgreSQL database engine. * * @return the name value. */ @@ -57,7 +57,8 @@ public String name() { } /** - * Get the supportedVersionsToUpgrade property: Supported servers versions to upgrade. + * Get the supportedVersionsToUpgrade property: Major versions of PostgreSQL database engine to which this version + * can be automatically upgraded. * * @return the supportedVersionsToUpgrade value. */ @@ -66,7 +67,7 @@ public List supportedVersionsToUpgrade() { } /** - * Get the supportedFeatures property: The supported features. + * Get the supportedFeatures property: Features supported. * * @return the supportedFeatures value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Servers.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Servers.java index 5077d2a93544..f5c9744b0e41 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Servers.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Servers.java @@ -13,7 +13,7 @@ */ public interface Servers { /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -24,7 +24,7 @@ public interface Servers { void deleteByResourceGroup(String resourceGroupName, String serverName); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -36,7 +36,7 @@ public interface Servers { void delete(String resourceGroupName, String serverName, Context context); /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -44,24 +44,24 @@ public interface Servers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about an existing server along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, Context context); /** - * Gets information about a server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about an existing server. */ Server getByResourceGroup(String resourceGroupName, String serverName); /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,7 +72,7 @@ public interface Servers { PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the servers in a given resource group. + * Lists all servers in a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -84,7 +84,7 @@ public interface Servers { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -93,7 +93,7 @@ public interface Servers { PagedIterable list(); /** - * List all the servers in a given subscription. + * Lists all servers in a subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -104,7 +104,7 @@ public interface Servers { PagedIterable list(Context context); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -115,11 +115,11 @@ public interface Servers { void restart(String resourceGroupName, String serverName); /** - * Restarts a server. + * Restarts PostgreSQL database engine in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param parameters The parameters for restarting a server. + * @param parameters Parameters to restart a server. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -128,7 +128,7 @@ public interface Servers { void restart(String resourceGroupName, String serverName, RestartParameter parameters, Context context); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -139,7 +139,7 @@ public interface Servers { void start(String resourceGroupName, String serverName); /** - * Starts a server. + * Starts a stopped server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -174,30 +174,30 @@ public interface Servers { void stop(String resourceGroupName, String serverName, Context context); /** - * Gets information about a server. + * Gets information about an existing server. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about an existing server along with {@link Response}. */ Server getById(String id); /** - * Gets information about a server. + * Gets information about an existing server. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server along with {@link Response}. + * @return information about an existing server along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -207,7 +207,7 @@ public interface Servers { void deleteById(String id); /** - * Deletes a server. + * Deletes or drops an existing server. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionDetailsResource.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionDetailsResource.java deleted file mode 100644 index 64cf897507f4..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionDetailsResource.java +++ /dev/null @@ -1,62 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionDetailsResourceInner; - -/** - * An immutable client-side representation of SessionDetailsResource. - */ -public interface SessionDetailsResource { - /** - * Gets the iterationId property: Iteration id. - * - * @return the iterationId value. - */ - String iterationId(); - - /** - * Gets the sessionId property: Session id. - * - * @return the sessionId value. - */ - String sessionId(); - - /** - * Gets the appliedConfiguration property: Applied configuration for the iteration. - * - * @return the appliedConfiguration value. - */ - String appliedConfiguration(); - - /** - * Gets the iterationStartTime property: Iteration start time. - * - * @return the iterationStartTime value. - */ - String iterationStartTime(); - - /** - * Gets the averageQueryRuntimeMs property: The aqr for the iteration. - * - * @return the averageQueryRuntimeMs value. - */ - String averageQueryRuntimeMs(); - - /** - * Gets the transactionsPerSecond property: The tps for the iteration. - * - * @return the transactionsPerSecond value. - */ - String transactionsPerSecond(); - - /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionDetailsResourceInner - * object. - * - * @return the inner object. - */ - SessionDetailsResourceInner innerModel(); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionResource.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionResource.java deleted file mode 100644 index 0b52ee8553d8..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionResource.java +++ /dev/null @@ -1,68 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionResourceInner; - -/** - * An immutable client-side representation of SessionResource. - */ -public interface SessionResource { - /** - * Gets the sessionStartTime property: the tuning session start time. - * - * @return the sessionStartTime value. - */ - String sessionStartTime(); - - /** - * Gets the sessionId property: Session id. - * - * @return the sessionId value. - */ - String sessionId(); - - /** - * Gets the status property: The status of the tuning session. - * - * @return the status value. - */ - String status(); - - /** - * Gets the preTuningAqr property: The pre tuning aqr. - * - * @return the preTuningAqr value. - */ - String preTuningAqr(); - - /** - * Gets the postTuningAqr property: The post tuning aqr. - * - * @return the postTuningAqr value. - */ - String postTuningAqr(); - - /** - * Gets the preTuningTps property: The pre tuning tps. - * - * @return the preTuningTps value. - */ - String preTuningTps(); - - /** - * Gets the postTuningTps property: The post tuning tps. - * - * @return the postTuningTps value. - */ - String postTuningTps(); - - /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionResourceInner object. - * - * @return the inner object. - */ - SessionResourceInner innerModel(); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionsListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionsListResult.java deleted file mode 100644 index dc73b8e394fb..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SessionsListResult.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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.SessionResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of tuning configuration sessions. - */ -@Fluent -public final class SessionsListResult implements JsonSerializable { - /* - * A list of tuning configuration sessions. - */ - private List value; - - /* - * URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - */ - private String nextLink; - - /** - * Creates an instance of SessionsListResult class. - */ - public SessionsListResult() { - } - - /** - * Get the value property: A list of tuning configuration sessions. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of tuning configuration sessions. - * - * @param value the value value to set. - * @return the SessionsListResult object itself. - */ - public SessionsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - * - * @param nextLink the nextLink value to set. - * @return the SessionsListResult object itself. - */ - public SessionsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SessionsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SessionsListResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SessionsListResult. - */ - public static SessionsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SessionsListResult deserializedSessionsListResult = new SessionsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> SessionResourceInner.fromJson(reader1)); - deserializedSessionsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedSessionsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSessionsListResult; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Sku.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Sku.java index f701ebf4ec05..b357c4ab7638 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Sku.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Sku.java @@ -13,17 +13,17 @@ import java.io.IOException; /** - * Sku information related properties of a server. + * Compute information of a server. */ @Fluent public final class Sku implements JsonSerializable { /* - * The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. + * Name by which is known a given compute size assigned to a server. */ private String name; /* - * The tier of the particular SKU, e.g. Burstable. + * Tier of the compute assigned to a server. */ private SkuTier tier; @@ -34,7 +34,7 @@ public Sku() { } /** - * Get the name property: The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. + * Get the name property: Name by which is known a given compute size assigned to a server. * * @return the name value. */ @@ -43,7 +43,7 @@ public String name() { } /** - * Set the name property: The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. + * Set the name property: Name by which is known a given compute size assigned to a server. * * @param name the name value to set. * @return the Sku object itself. @@ -54,7 +54,7 @@ public Sku withName(String name) { } /** - * Get the tier property: The tier of the particular SKU, e.g. Burstable. + * Get the tier property: Tier of the compute assigned to a server. * * @return the tier value. */ @@ -63,7 +63,7 @@ public SkuTier tier() { } /** - * Set the tier property: The tier of the particular SKU, e.g. Burstable. + * Set the tier property: Tier of the compute assigned to a server. * * @param tier the tier value to set. * @return the Sku object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuForPatch.java new file mode 100644 index 000000000000..51e7fe8838bd --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuForPatch.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Compute information of a server. + */ +@Fluent +public final class SkuForPatch implements JsonSerializable { + /* + * Name by which is known a given compute size assigned to a server. + */ + private String name; + + /* + * Tier of the compute assigned to a server. + */ + private SkuTier tier; + + /** + * Creates an instance of SkuForPatch class. + */ + public SkuForPatch() { + } + + /** + * Get the name property: Name by which is known a given compute size assigned to a server. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name by which is known a given compute size assigned to a server. + * + * @param name the name value to set. + * @return the SkuForPatch object itself. + */ + public SkuForPatch withName(String name) { + this.name = name; + return this; + } + + /** + * Get the tier property: Tier of the compute assigned to a server. + * + * @return the tier value. + */ + public SkuTier tier() { + return this.tier; + } + + /** + * Set the tier property: Tier of the compute assigned to a server. + * + * @param tier the tier value to set. + * @return the SkuForPatch object itself. + */ + public SkuForPatch withTier(SkuTier tier) { + this.tier = tier; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("tier", this.tier == null ? null : this.tier.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SkuForPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SkuForPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SkuForPatch. + */ + public static SkuForPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SkuForPatch deserializedSkuForPatch = new SkuForPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedSkuForPatch.name = reader.getString(); + } else if ("tier".equals(fieldName)) { + deserializedSkuForPatch.tier = SkuTier.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSkuForPatch; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuTier.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuTier.java index c3b03fcf1340..dbdaf5ede1c0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuTier.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuTier.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The tier of the particular SKU, e.g. Burstable. + * Tier of the compute assigned to a server. */ public final class SkuTier extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SourceType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SourceType.java index a4a35c753c4c..dd9574fbaa70 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SourceType.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SourceType.java @@ -8,10 +8,10 @@ import java.util.Collection; /** - * Migration source server type : OnPremises, AWS, GCP, AzureVM, PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, AWS_EC2, - * GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, EDB, EDB_Oracle_Server, EDB_PostgreSQL, PostgreSQLFlexibleServer, - * PostgreSQLCosmosDB, Huawei_RDS, Huawei_Compute, Heroku_PostgreSQL, Crunchy_PostgreSQL, ApsaraDB_RDS, - * Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, or Supabase_PostgreSQL. + * Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, AWS_RDS, AzureVM, + * Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, EDB_PostgreSQL, GCP, + * GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, OnPremises, + * PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL. */ public final class SourceType extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SslMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SslMode.java index 87df7d86f9c0..280d61b5f58c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SslMode.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SslMode.java @@ -8,8 +8,8 @@ import java.util.Collection; /** - * Supported SSL modes for migration. VerifyFull is the recommended SSL mode for Single server migration. Prefer, - * Require are recommended SSL modes for other source types. + * SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for + * other source types is 'Prefer'. */ public final class SslMode extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigration.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigration.java new file mode 100644 index 000000000000..1cece04f7e97 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigration.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if data migration must start right away. + */ +public final class StartDataMigration extends ExpandableStringEnum { + /** + * Static value True for StartDataMigration. + */ + public static final StartDataMigration TRUE = fromString("True"); + + /** + * Static value False for StartDataMigration. + */ + public static final StartDataMigration FALSE = fromString("False"); + + /** + * Creates a new instance of StartDataMigration value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StartDataMigration() { + } + + /** + * Creates or finds a StartDataMigration from its string representation. + * + * @param name a name to look for. + * @return the corresponding StartDataMigration. + */ + public static StartDataMigration fromString(String name) { + return fromString(name, StartDataMigration.class); + } + + /** + * Gets known StartDataMigration values. + * + * @return known StartDataMigration values. + */ + public static Collection values() { + return values(StartDataMigration.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigrationEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigrationEnum.java deleted file mode 100644 index dc18937a429f..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigrationEnum.java +++ /dev/null @@ -1,51 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Indicates whether the data migration should start right away. - */ -public final class StartDataMigrationEnum extends ExpandableStringEnum { - /** - * Static value True for StartDataMigrationEnum. - */ - public static final StartDataMigrationEnum TRUE = fromString("True"); - - /** - * Static value False for StartDataMigrationEnum. - */ - public static final StartDataMigrationEnum FALSE = fromString("False"); - - /** - * Creates a new instance of StartDataMigrationEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public StartDataMigrationEnum() { - } - - /** - * Creates or finds a StartDataMigrationEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding StartDataMigrationEnum. - */ - public static StartDataMigrationEnum fromString(String name) { - return fromString(name, StartDataMigrationEnum.class); - } - - /** - * Gets known StartDataMigrationEnum values. - * - * @return known StartDataMigrationEnum values. - */ - public static Collection values() { - return values(StartDataMigrationEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Storage.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Storage.java index 2fbf44928867..65356fe6c68e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Storage.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Storage.java @@ -17,33 +17,34 @@ @Fluent public final class Storage implements JsonSerializable { /* - * Max storage allowed for a server. + * Size of storage assigned to a server. */ private Integer storageSizeGB; /* - * Flag to enable / disable Storage Auto grow for flexible server. + * Flag to enable or disable the automatic growth of storage size of a server when available space is nearing zero + * and conditions allow for automatically growing storage size. */ private StorageAutoGrow autoGrow; /* - * Name of storage tier for IOPS. + * Storage tier of a server. */ - private AzureManagedDiskPerformanceTiers tier; + private AzureManagedDiskPerformanceTier tier; /* - * Storage IOPS quantity. This property is required to be set for storage Type PremiumV2_LRS and UltraSSD_LRS. + * Maximum IOPS supported for storage. Required when type of storage is PremiumV2_LRS or UltraSSD_LRS. */ private Integer iops; /* - * Storage throughput for the server. This is required to be set for storage Type PremiumV2_LRS and UltraSSD_LRS. + * Maximum throughput supported for storage. Required when type of storage is PremiumV2_LRS or UltraSSD_LRS. */ private Integer throughput; /* - * Storage type for the server. Allowed values are Premium_LRS, PremiumV2_LRS, and UltraSSD_LRS. Default is - * Premium_LRS if not specified + * Type of storage assigned to a server. Allowed values are Premium_LRS, PremiumV2_LRS, or UltraSSD_LRS. If not + * specified, it defaults to Premium_LRS. */ private StorageType type; @@ -54,7 +55,7 @@ public Storage() { } /** - * Get the storageSizeGB property: Max storage allowed for a server. + * Get the storageSizeGB property: Size of storage assigned to a server. * * @return the storageSizeGB value. */ @@ -63,7 +64,7 @@ public Integer storageSizeGB() { } /** - * Set the storageSizeGB property: Max storage allowed for a server. + * Set the storageSizeGB property: Size of storage assigned to a server. * * @param storageSizeGB the storageSizeGB value to set. * @return the Storage object itself. @@ -74,7 +75,8 @@ public Storage withStorageSizeGB(Integer storageSizeGB) { } /** - * Get the autoGrow property: Flag to enable / disable Storage Auto grow for flexible server. + * Get the autoGrow property: Flag to enable or disable the automatic growth of storage size of a server when + * available space is nearing zero and conditions allow for automatically growing storage size. * * @return the autoGrow value. */ @@ -83,7 +85,8 @@ public StorageAutoGrow autoGrow() { } /** - * Set the autoGrow property: Flag to enable / disable Storage Auto grow for flexible server. + * Set the autoGrow property: Flag to enable or disable the automatic growth of storage size of a server when + * available space is nearing zero and conditions allow for automatically growing storage size. * * @param autoGrow the autoGrow value to set. * @return the Storage object itself. @@ -94,28 +97,28 @@ public Storage withAutoGrow(StorageAutoGrow autoGrow) { } /** - * Get the tier property: Name of storage tier for IOPS. + * Get the tier property: Storage tier of a server. * * @return the tier value. */ - public AzureManagedDiskPerformanceTiers tier() { + public AzureManagedDiskPerformanceTier tier() { return this.tier; } /** - * Set the tier property: Name of storage tier for IOPS. + * Set the tier property: Storage tier of a server. * * @param tier the tier value to set. * @return the Storage object itself. */ - public Storage withTier(AzureManagedDiskPerformanceTiers tier) { + public Storage withTier(AzureManagedDiskPerformanceTier tier) { this.tier = tier; return this; } /** - * Get the iops property: Storage IOPS quantity. This property is required to be set for storage Type PremiumV2_LRS - * and UltraSSD_LRS. + * Get the iops property: Maximum IOPS supported for storage. Required when type of storage is PremiumV2_LRS or + * UltraSSD_LRS. * * @return the iops value. */ @@ -124,8 +127,8 @@ public Integer iops() { } /** - * Set the iops property: Storage IOPS quantity. This property is required to be set for storage Type PremiumV2_LRS - * and UltraSSD_LRS. + * Set the iops property: Maximum IOPS supported for storage. Required when type of storage is PremiumV2_LRS or + * UltraSSD_LRS. * * @param iops the iops value to set. * @return the Storage object itself. @@ -136,8 +139,8 @@ public Storage withIops(Integer iops) { } /** - * Get the throughput property: Storage throughput for the server. This is required to be set for storage Type - * PremiumV2_LRS and UltraSSD_LRS. + * Get the throughput property: Maximum throughput supported for storage. Required when type of storage is + * PremiumV2_LRS or UltraSSD_LRS. * * @return the throughput value. */ @@ -146,8 +149,8 @@ public Integer throughput() { } /** - * Set the throughput property: Storage throughput for the server. This is required to be set for storage Type - * PremiumV2_LRS and UltraSSD_LRS. + * Set the throughput property: Maximum throughput supported for storage. Required when type of storage is + * PremiumV2_LRS or UltraSSD_LRS. * * @param throughput the throughput value to set. * @return the Storage object itself. @@ -158,8 +161,8 @@ public Storage withThroughput(Integer throughput) { } /** - * Get the type property: Storage type for the server. Allowed values are Premium_LRS, PremiumV2_LRS, and - * UltraSSD_LRS. Default is Premium_LRS if not specified. + * Get the type property: Type of storage assigned to a server. Allowed values are Premium_LRS, PremiumV2_LRS, or + * UltraSSD_LRS. If not specified, it defaults to Premium_LRS. * * @return the type value. */ @@ -168,8 +171,8 @@ public StorageType type() { } /** - * Set the type property: Storage type for the server. Allowed values are Premium_LRS, PremiumV2_LRS, and - * UltraSSD_LRS. Default is Premium_LRS if not specified. + * Set the type property: Type of storage assigned to a server. Allowed values are Premium_LRS, PremiumV2_LRS, or + * UltraSSD_LRS. If not specified, it defaults to Premium_LRS. * * @param type the type value to set. * @return the Storage object itself. @@ -222,7 +225,7 @@ public static Storage fromJson(JsonReader jsonReader) throws IOException { } else if ("autoGrow".equals(fieldName)) { deserializedStorage.autoGrow = StorageAutoGrow.fromString(reader.getString()); } else if ("tier".equals(fieldName)) { - deserializedStorage.tier = AzureManagedDiskPerformanceTiers.fromString(reader.getString()); + deserializedStorage.tier = AzureManagedDiskPerformanceTier.fromString(reader.getString()); } else if ("iops".equals(fieldName)) { deserializedStorage.iops = reader.getNullable(JsonReader::getInt); } else if ("throughput".equals(fieldName)) { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrow.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrow.java index c39333f9ff84..3464db964731 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrow.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrow.java @@ -8,7 +8,8 @@ import java.util.Collection; /** - * Flag to enable / disable Storage Auto grow for flexible server. + * Flag to enable or disable the automatic growth of storage size of a server when available space is nearing zero and + * conditions allow for automatically growing storage size. */ public final class StorageAutoGrow extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupport.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupport.java new file mode 100644 index 000000000000..5de2b28b18c2 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupport.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if storage autogrow is supported in this location. 'Enabled' means storage autogrow is supported. + * 'Disabled' stands for storage autogrow is not supported. Will be deprecated in the future. Look to Supported Features + * for 'StorageAutoGrowth'. + */ +public final class StorageAutoGrowthSupport extends ExpandableStringEnum { + /** + * Static value Enabled for StorageAutoGrowthSupport. + */ + public static final StorageAutoGrowthSupport ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for StorageAutoGrowthSupport. + */ + public static final StorageAutoGrowthSupport DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of StorageAutoGrowthSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StorageAutoGrowthSupport() { + } + + /** + * Creates or finds a StorageAutoGrowthSupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding StorageAutoGrowthSupport. + */ + public static StorageAutoGrowthSupport fromString(String name) { + return fromString(name, StorageAutoGrowthSupport.class); + } + + /** + * Gets known StorageAutoGrowthSupport values. + * + * @return known StorageAutoGrowthSupport values. + */ + public static Collection values() { + return values(StorageAutoGrowthSupport.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupportedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupportedEnum.java deleted file mode 100644 index 5ce1e1e5ac26..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupportedEnum.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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether storage auto-grow is supported in this region. "Enabled" means storage auto-grow is - * supported. "Disabled" stands for storage auto-grow is not supported. Will be deprecated in future, please look to - * Supported Features for "StorageAutoGrowth". - */ -public final class StorageAutoGrowthSupportedEnum extends ExpandableStringEnum { - /** - * Static value Enabled for StorageAutoGrowthSupportedEnum. - */ - public static final StorageAutoGrowthSupportedEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for StorageAutoGrowthSupportedEnum. - */ - public static final StorageAutoGrowthSupportedEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of StorageAutoGrowthSupportedEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public StorageAutoGrowthSupportedEnum() { - } - - /** - * Creates or finds a StorageAutoGrowthSupportedEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding StorageAutoGrowthSupportedEnum. - */ - public static StorageAutoGrowthSupportedEnum fromString(String name) { - return fromString(name, StorageAutoGrowthSupportedEnum.class); - } - - /** - * Gets known StorageAutoGrowthSupportedEnum values. - * - * @return known StorageAutoGrowthSupportedEnum values. - */ - public static Collection values() { - return values(StorageAutoGrowthSupportedEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageEditionCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageEditionCapability.java index eb27a7d7bd27..2f78571e1f4d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageEditionCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageEditionCapability.java @@ -12,22 +12,22 @@ import java.util.List; /** - * Storage edition capability. + * Capabilities in terms of storage tier. */ @Immutable public final class StorageEditionCapability extends CapabilityBase { /* - * Storage edition name + * Name of storage tier. */ private String name; /* - * Default storage size in MB for storage edition + * Default storage size (in MB) for this storage tier. */ private Long defaultStorageSizeMb; /* - * Flexible server supported storage range in MB + * Configurations of storage supported for this storage tier. */ private List supportedStorageMb; @@ -48,7 +48,7 @@ public StorageEditionCapability() { } /** - * Get the name property: Storage edition name. + * Get the name property: Name of storage tier. * * @return the name value. */ @@ -57,7 +57,7 @@ public String name() { } /** - * Get the defaultStorageSizeMb property: Default storage size in MB for storage edition. + * Get the defaultStorageSizeMb property: Default storage size (in MB) for this storage tier. * * @return the defaultStorageSizeMb value. */ @@ -66,7 +66,7 @@ public Long defaultStorageSizeMb() { } /** - * Get the supportedStorageMb property: Flexible server supported storage range in MB. + * Get the supportedStorageMb property: Configurations of storage supported for this storage tier. * * @return the supportedStorageMb value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageMbCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageMbCapability.java index dbaeb01a635e..9e669f7962b4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageMbCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageMbCapability.java @@ -12,47 +12,47 @@ import java.util.List; /** - * storage size in MB capability. + * Storage size (in MB) capability. */ @Immutable public final class StorageMbCapability extends CapabilityBase { /* - * Supported IOPS + * Minimum IOPS supported by the storage size. */ private Integer supportedIops; /* - * Maximum IOPS supported by this #Vcores or PremiumV2_LRS Storage Size + * Maximum IOPS supported by the storage size. */ private Integer supportedMaximumIops; /* - * Storage size in MB + * Minimum supported size (in MB) of storage. */ private Long storageSizeMb; /* - * Maximum value of Storage size in MB + * Maximum supported size (in MB) of storage. */ private Long maximumStorageSizeMb; /* - * Values of throughput in MB/s + * Minimum supported throughput (in MB/s) of storage. */ private Integer supportedThroughput; /* - * Maximum values of throughput in MB/s + * Maximum supported throughput (in MB/s) of storage. */ private Integer supportedMaximumThroughput; /* - * Default tier for IOPS + * Default IOPS for this tier and storage size. */ private String defaultIopsTier; /* - * List of available options to upgrade the storage performance + * List of all supported storage tiers for this tier and storage size. */ private List supportedIopsTiers; @@ -73,7 +73,7 @@ public StorageMbCapability() { } /** - * Get the supportedIops property: Supported IOPS. + * Get the supportedIops property: Minimum IOPS supported by the storage size. * * @return the supportedIops value. */ @@ -82,7 +82,7 @@ public Integer supportedIops() { } /** - * Get the supportedMaximumIops property: Maximum IOPS supported by this #Vcores or PremiumV2_LRS Storage Size. + * Get the supportedMaximumIops property: Maximum IOPS supported by the storage size. * * @return the supportedMaximumIops value. */ @@ -91,7 +91,7 @@ public Integer supportedMaximumIops() { } /** - * Get the storageSizeMb property: Storage size in MB. + * Get the storageSizeMb property: Minimum supported size (in MB) of storage. * * @return the storageSizeMb value. */ @@ -100,7 +100,7 @@ public Long storageSizeMb() { } /** - * Get the maximumStorageSizeMb property: Maximum value of Storage size in MB. + * Get the maximumStorageSizeMb property: Maximum supported size (in MB) of storage. * * @return the maximumStorageSizeMb value. */ @@ -109,7 +109,7 @@ public Long maximumStorageSizeMb() { } /** - * Get the supportedThroughput property: Values of throughput in MB/s. + * Get the supportedThroughput property: Minimum supported throughput (in MB/s) of storage. * * @return the supportedThroughput value. */ @@ -118,7 +118,7 @@ public Integer supportedThroughput() { } /** - * Get the supportedMaximumThroughput property: Maximum values of throughput in MB/s. + * Get the supportedMaximumThroughput property: Maximum supported throughput (in MB/s) of storage. * * @return the supportedMaximumThroughput value. */ @@ -127,7 +127,7 @@ public Integer supportedMaximumThroughput() { } /** - * Get the defaultIopsTier property: Default tier for IOPS. + * Get the defaultIopsTier property: Default IOPS for this tier and storage size. * * @return the defaultIopsTier value. */ @@ -136,7 +136,7 @@ public String defaultIopsTier() { } /** - * Get the supportedIopsTiers property: List of available options to upgrade the storage performance. + * Get the supportedIopsTiers property: List of all supported storage tiers for this tier and storage size. * * @return the supportedIopsTiers value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageTierCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageTierCapability.java index 537025404534..c886ec63fe26 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageTierCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageTierCapability.java @@ -11,17 +11,17 @@ import java.io.IOException; /** - * Represents capability of a storage tier. + * Capability of a storage tier. */ @Immutable public final class StorageTierCapability extends CapabilityBase { /* - * Name to represent Storage tier capability + * Name of the storage tier. */ private String name; /* - * Supported IOPS for this storage tier + * Supported IOPS for the storage tier. */ private Integer iops; @@ -42,7 +42,7 @@ public StorageTierCapability() { } /** - * Get the name property: Name to represent Storage tier capability. + * Get the name property: Name of the storage tier. * * @return the name value. */ @@ -51,7 +51,7 @@ public String name() { } /** - * Get the iops property: Supported IOPS for this storage tier. + * Get the iops property: Supported IOPS for the storage tier. * * @return the iops value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageType.java index 95d307215ab0..2c0b523f7b07 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageType.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageType.java @@ -8,8 +8,8 @@ import java.util.Collection; /** - * Storage type for the server. Allowed values are Premium_LRS, PremiumV2_LRS, and UltraSSD_LRS. Default is Premium_LRS - * if not specified. + * Type of storage assigned to a server. Allowed values are Premium_LRS, PremiumV2_LRS, or UltraSSD_LRS. If not + * specified, it defaults to Premium_LRS. */ public final class StorageType extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeature.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeature.java index 10ea9a216afd..57964df1a66e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeature.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeature.java @@ -12,19 +12,19 @@ import java.io.IOException; /** - * The supported features. + * Features supported. */ @Immutable public final class SupportedFeature implements JsonSerializable { /* - * Name of feature + * Name of the feature. */ private String name; /* - * Status of feature + * Status of the feature. Indicates if the feature is enabled or not. */ - private SupportedFeatureStatusEnum status; + private FeatureStatus status; /** * Creates an instance of SupportedFeature class. @@ -33,7 +33,7 @@ public SupportedFeature() { } /** - * Get the name property: Name of feature. + * Get the name property: Name of the feature. * * @return the name value. */ @@ -42,11 +42,11 @@ public String name() { } /** - * Get the status property: Status of feature. + * Get the status property: Status of the feature. Indicates if the feature is enabled or not. * * @return the status value. */ - public SupportedFeatureStatusEnum status() { + public FeatureStatus status() { return this.status; } @@ -85,7 +85,7 @@ public static SupportedFeature fromJson(JsonReader jsonReader) throws IOExceptio if ("name".equals(fieldName)) { deserializedSupportedFeature.name = reader.getString(); } else if ("status".equals(fieldName)) { - deserializedSupportedFeature.status = SupportedFeatureStatusEnum.fromString(reader.getString()); + deserializedSupportedFeature.status = FeatureStatus.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeatureStatusEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeatureStatusEnum.java deleted file mode 100644 index 2d1e2755bc6d..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeatureStatusEnum.java +++ /dev/null @@ -1,51 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Status of feature. - */ -public final class SupportedFeatureStatusEnum extends ExpandableStringEnum { - /** - * Static value Enabled for SupportedFeatureStatusEnum. - */ - public static final SupportedFeatureStatusEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for SupportedFeatureStatusEnum. - */ - public static final SupportedFeatureStatusEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of SupportedFeatureStatusEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SupportedFeatureStatusEnum() { - } - - /** - * Creates or finds a SupportedFeatureStatusEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding SupportedFeatureStatusEnum. - */ - public static SupportedFeatureStatusEnum fromString(String name) { - return fromString(name, SupportedFeatureStatusEnum.class); - } - - /** - * Gets known SupportedFeatureStatusEnum values. - * - * @return known SupportedFeatureStatusEnum values. - */ - public static Collection values() { - return values(SupportedFeatureStatusEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ThreatProtectionState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ThreatProtectionState.java index da405aa4bf57..a253e5c69e92 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ThreatProtectionState.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ThreatProtectionState.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; /** - * Specifies the state of the Threat Protection, whether it is enabled or disabled or a state has not been applied yet - * on the specific server. + * Specifies the state of the advanced threat protection, whether it is enabled, disabled, or a state has not been + * applied yet on the server. */ public enum ThreatProtectionState { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TriggerCutover.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TriggerCutover.java new file mode 100644 index 000000000000..66b6d0b61ec1 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TriggerCutover.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if cutover must be triggered for the entire migration. + */ +public final class TriggerCutover extends ExpandableStringEnum { + /** + * Static value True for TriggerCutover. + */ + public static final TriggerCutover TRUE = fromString("True"); + + /** + * Static value False for TriggerCutover. + */ + public static final TriggerCutover FALSE = fromString("False"); + + /** + * Creates a new instance of TriggerCutover value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TriggerCutover() { + } + + /** + * Creates or finds a TriggerCutover from its string representation. + * + * @param name a name to look for. + * @return the corresponding TriggerCutover. + */ + public static TriggerCutover fromString(String name) { + return fromString(name, TriggerCutover.class); + } + + /** + * Gets known TriggerCutover values. + * + * @return known TriggerCutover values. + */ + public static Collection values() { + return values(TriggerCutover.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TriggerCutoverEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TriggerCutoverEnum.java deleted file mode 100644 index 38fa75b73176..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TriggerCutoverEnum.java +++ /dev/null @@ -1,51 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * To trigger cutover for entire migration we need to send this flag as True. - */ -public final class TriggerCutoverEnum extends ExpandableStringEnum { - /** - * Static value True for TriggerCutoverEnum. - */ - public static final TriggerCutoverEnum TRUE = fromString("True"); - - /** - * Static value False for TriggerCutoverEnum. - */ - public static final TriggerCutoverEnum FALSE = fromString("False"); - - /** - * Creates a new instance of TriggerCutoverEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TriggerCutoverEnum() { - } - - /** - * Creates or finds a TriggerCutoverEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding TriggerCutoverEnum. - */ - public static TriggerCutoverEnum fromString(String name) { - return fromString(name, TriggerCutoverEnum.class); - } - - /** - * Gets known TriggerCutoverEnum values. - * - * @return known TriggerCutoverEnum values. - */ - public static Collection values() { - return values(TriggerCutoverEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningIndexes.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningIndexes.java deleted file mode 100644 index d5960ae63403..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningIndexes.java +++ /dev/null @@ -1,43 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of TuningIndexes. - */ -public interface TuningIndexes { - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available index recommendations as paginated response with {@link PagedIterable}. - */ - PagedIterable listRecommendations(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption); - - /** - * Retrieve the list of available tuning index recommendations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available index recommendations as paginated response with {@link PagedIterable}. - */ - PagedIterable listRecommendations(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, RecommendationType recommendationType, Context context); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionEnum.java deleted file mode 100644 index 2050090c9a3b..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionEnum.java +++ /dev/null @@ -1,51 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for TuningOptionEnum. - */ -public final class TuningOptionEnum extends ExpandableStringEnum { - /** - * Static value index for TuningOptionEnum. - */ - public static final TuningOptionEnum INDEX = fromString("index"); - - /** - * Static value configuration for TuningOptionEnum. - */ - public static final TuningOptionEnum CONFIGURATION = fromString("configuration"); - - /** - * Creates a new instance of TuningOptionEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TuningOptionEnum() { - } - - /** - * Creates or finds a TuningOptionEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding TuningOptionEnum. - */ - public static TuningOptionEnum fromString(String name) { - return fromString(name, TuningOptionEnum.class); - } - - /** - * Gets known TuningOptionEnum values. - * - * @return known TuningOptionEnum values. - */ - public static Collection values() { - return values(TuningOptionEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionParameterEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionParameterEnum.java new file mode 100644 index 000000000000..fb3f287cdf26 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionParameterEnum.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for TuningOptionParameterEnum. + */ +public final class TuningOptionParameterEnum extends ExpandableStringEnum { + /** + * Static value index for TuningOptionParameterEnum. + */ + public static final TuningOptionParameterEnum INDEX = fromString("index"); + + /** + * Static value table for TuningOptionParameterEnum. + */ + public static final TuningOptionParameterEnum TABLE = fromString("table"); + + /** + * Creates a new instance of TuningOptionParameterEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TuningOptionParameterEnum() { + } + + /** + * Creates or finds a TuningOptionParameterEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding TuningOptionParameterEnum. + */ + public static TuningOptionParameterEnum fromString(String name) { + return fromString(name, TuningOptionParameterEnum.class); + } + + /** + * Gets known TuningOptionParameterEnum values. + * + * @return known TuningOptionParameterEnum values. + */ + public static Collection values() { + return values(TuningOptionParameterEnum.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptions.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptions.java index 35f1f517f30e..575ba179e7c0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptions.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptions.java @@ -4,65 +4,45 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; /** - * Resource collection API of TuningOptions. + * An immutable client-side representation of TuningOptions. */ public interface TuningOptions { /** - * Retrieve the tuning option on a server. + * Gets the id property: Fully qualified resource Id for the resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stores property that features impact on some metric if this recommended action is applied along with - * {@link Response}. + * @return the id value. */ - Response getWithResponse(String resourceGroupName, String serverName, - TuningOptionEnum tuningOption, Context context); + String id(); /** - * Retrieve the tuning option on a server. + * Gets the name property: The name of the resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stores property that features impact on some metric if this recommended action is applied. + * @return the name value. */ - TuningOptionsResource get(String resourceGroupName, String serverName, TuningOptionEnum tuningOption); + String name(); /** - * Retrieve the list of available tuning options. + * Gets the type property: The type of the resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server tuning options as paginated response with {@link PagedIterable}. + * @return the type value. */ - PagedIterable listByServer(String resourceGroupName, String serverName); + String type(); /** - * Retrieve the list of available tuning options. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server tuning options as paginated response with {@link PagedIterable}. + * @return the systemData value. */ - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner object. + * + * @return the inner object. + */ + TuningOptionsInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFileListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsList.java similarity index 61% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFileListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsList.java index 83517b041fb4..56de034101e1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFileListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsList.java @@ -9,53 +9,53 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LogFileInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; import java.io.IOException; import java.util.List; /** - * A List of logFiles. + * List of server tuning options. */ @Fluent -public final class LogFileListResult implements JsonSerializable { +public final class TuningOptionsList implements JsonSerializable { /* - * The list of logFiles in a server + * List of available tuning options. */ - private List value; + private List value; /* - * The link used to get the next page of operations. + * Link used to get the next page of results. */ private String nextLink; /** - * Creates an instance of LogFileListResult class. + * Creates an instance of TuningOptionsList class. */ - public LogFileListResult() { + public TuningOptionsList() { } /** - * Get the value property: The list of logFiles in a server. + * Get the value property: List of available tuning options. * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** - * Set the value property: The list of logFiles in a server. + * Set the value property: List of available tuning options. * * @param value the value value to set. - * @return the LogFileListResult object itself. + * @return the TuningOptionsList object itself. */ - public LogFileListResult withValue(List value) { + public TuningOptionsList withValue(List value) { this.value = value; return this; } /** - * Get the nextLink property: The link used to get the next page of operations. + * Get the nextLink property: Link used to get the next page of results. * * @return the nextLink value. */ @@ -64,12 +64,12 @@ public String nextLink() { } /** - * Set the nextLink property: The link used to get the next page of operations. + * Set the nextLink property: Link used to get the next page of results. * * @param nextLink the nextLink value to set. - * @return the LogFileListResult object itself. + * @return the TuningOptionsList object itself. */ - public LogFileListResult withNextLink(String nextLink) { + public TuningOptionsList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } @@ -97,31 +97,31 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of LogFileListResult from the JsonReader. + * Reads an instance of TuningOptionsList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of LogFileListResult if the JsonReader was pointing to an instance of it, or null if it was + * @return An instance of TuningOptionsList if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. - * @throws IOException If an error occurs while reading the LogFileListResult. + * @throws IOException If an error occurs while reading the TuningOptionsList. */ - public static LogFileListResult fromJson(JsonReader jsonReader) throws IOException { + public static TuningOptionsList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - LogFileListResult deserializedLogFileListResult = new LogFileListResult(); + TuningOptionsList deserializedTuningOptionsList = new TuningOptionsList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> LogFileInner.fromJson(reader1)); - deserializedLogFileListResult.value = value; + List value = reader.readArray(reader1 -> TuningOptionsInner.fromJson(reader1)); + deserializedTuningOptionsList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedLogFileListResult.nextLink = reader.getString(); + deserializedTuningOptionsList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedLogFileListResult; + return deserializedTuningOptionsList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsListResult.java deleted file mode 100644 index db3fbdfdcca7..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsListResult.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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of server tuning options. - */ -@Fluent -public final class TuningOptionsListResult implements JsonSerializable { - /* - * A list of available tuning options. - */ - private List value; - - /* - * URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - */ - private String nextLink; - - /** - * Creates an instance of TuningOptionsListResult class. - */ - public TuningOptionsListResult() { - } - - /** - * Get the value property: A list of available tuning options. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of available tuning options. - * - * @param value the value value to set. - * @return the TuningOptionsListResult object itself. - */ - public TuningOptionsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - * - * @param nextLink the nextLink value to set. - * @return the TuningOptionsListResult object itself. - */ - public TuningOptionsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TuningOptionsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TuningOptionsListResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the TuningOptionsListResult. - */ - public static TuningOptionsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TuningOptionsListResult deserializedTuningOptionsListResult = new TuningOptionsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> TuningOptionsResourceInner.fromJson(reader1)); - deserializedTuningOptionsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedTuningOptionsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTuningOptionsListResult; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsOperations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsOperations.java new file mode 100644 index 000000000000..8916c88d3fa9 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsOperations.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of TuningOptionsOperations. + */ +public interface TuningOptionsOperations { + /** + * Gets the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 tuning options of a server along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, Context context); + + /** + * Gets the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 tuning options of a server. + */ + TuningOptions get(String resourceGroupName, String serverName, TuningOptionParameterEnum tuningOption); + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available object recommendations as paginated response with {@link PagedIterable}. + */ + PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption); + + /** + * Lists available object recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available object recommendations as paginated response with {@link PagedIterable}. + */ + PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType, Context context); + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of server tuning options as paginated response with {@link PagedIterable}. + */ + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of server tuning options as paginated response with {@link PagedIterable}. + */ + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsResource.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsResource.java deleted file mode 100644 index a998e785913a..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsResource.java +++ /dev/null @@ -1,49 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsResourceInner; - -/** - * An immutable client-side representation of TuningOptionsResource. - */ -public interface TuningOptionsResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsResourceInner - * object. - * - * @return the inner object. - */ - TuningOptionsResourceInner innerModel(); -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserAssignedIdentity.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserAssignedIdentity.java index 37460b560aab..99ba4c9f680c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserAssignedIdentity.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserAssignedIdentity.java @@ -14,27 +14,27 @@ import java.util.Map; /** - * Information describing the identities associated with this application. + * Identities associated with a server. */ @Fluent public final class UserAssignedIdentity implements JsonSerializable { /* - * represents user assigned identities map. + * Map of user assigned managed identities. */ private Map userAssignedIdentities; /* - * the identity principal Id of the server. + * Identifier of the object of the service principal associated to the user assigned managed identity. */ private String principalId; /* - * the types of identities associated with this resource + * Types of identities associated with a server. */ private IdentityType type; /* - * Tenant id of the server. + * Identifier of the tenant of a server. */ private String tenantId; @@ -45,7 +45,7 @@ public UserAssignedIdentity() { } /** - * Get the userAssignedIdentities property: represents user assigned identities map. + * Get the userAssignedIdentities property: Map of user assigned managed identities. * * @return the userAssignedIdentities value. */ @@ -54,7 +54,7 @@ public Map userAssignedIdentities() { } /** - * Set the userAssignedIdentities property: represents user assigned identities map. + * Set the userAssignedIdentities property: Map of user assigned managed identities. * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the UserAssignedIdentity object itself. @@ -65,7 +65,8 @@ public UserAssignedIdentity withUserAssignedIdentities(Map } /** - * Get the principalId property: the identity principal Id of the server. + * Get the principalId property: Identifier of the object of the service principal associated to the user assigned + * managed identity. * * @return the principalId value. */ @@ -74,7 +75,8 @@ public String principalId() { } /** - * Set the principalId property: the identity principal Id of the server. + * Set the principalId property: Identifier of the object of the service principal associated to the user assigned + * managed identity. * * @param principalId the principalId value to set. * @return the UserAssignedIdentity object itself. @@ -85,7 +87,7 @@ public UserAssignedIdentity withPrincipalId(String principalId) { } /** - * Get the type property: the types of identities associated with this resource. + * Get the type property: Types of identities associated with a server. * * @return the type value. */ @@ -94,7 +96,7 @@ public IdentityType type() { } /** - * Set the type property: the types of identities associated with this resource. + * Set the type property: Types of identities associated with a server. * * @param type the type value to set. * @return the UserAssignedIdentity object itself. @@ -105,7 +107,7 @@ public UserAssignedIdentity withType(IdentityType type) { } /** - * Get the tenantId property: Tenant id of the server. + * Get the tenantId property: Identifier of the tenant of a server. * * @return the tenantId value. */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserIdentity.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserIdentity.java index 9f72c7a2e49e..b280a19f40e8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserIdentity.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserIdentity.java @@ -12,17 +12,17 @@ import java.io.IOException; /** - * Describes a single user-assigned identity associated with the application. + * User assigned managed identity associated with a server. */ @Fluent public final class UserIdentity implements JsonSerializable { /* - * the object identifier of the Service Principal which this identity represents. + * Identifier of the object of the service principal associated to the user assigned managed identity. */ private String principalId; /* - * the client identifier of the Service Principal which this identity represents. + * Identifier of the client of the service principal associated to the user assigned managed identity. */ private String clientId; @@ -33,7 +33,8 @@ public UserIdentity() { } /** - * Get the principalId property: the object identifier of the Service Principal which this identity represents. + * Get the principalId property: Identifier of the object of the service principal associated to the user assigned + * managed identity. * * @return the principalId value. */ @@ -42,7 +43,8 @@ public String principalId() { } /** - * Set the principalId property: the object identifier of the Service Principal which this identity represents. + * Set the principalId property: Identifier of the object of the service principal associated to the user assigned + * managed identity. * * @param principalId the principalId value to set. * @return the UserIdentity object itself. @@ -53,7 +55,8 @@ public UserIdentity withPrincipalId(String principalId) { } /** - * Get the clientId property: the client identifier of the Service Principal which this identity represents. + * Get the clientId property: Identifier of the client of the service principal associated to the user assigned + * managed identity. * * @return the clientId value. */ @@ -62,7 +65,8 @@ public String clientId() { } /** - * Set the clientId property: the client identifier of the Service Principal which this identity represents. + * Set the clientId property: Identifier of the client of the service principal associated to the user assigned + * managed identity. * * @param clientId the clientId value to set. * @return the UserIdentity object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationDetails.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationDetails.java index a17d3218a63d..05135027c8a7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationDetails.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationDetails.java @@ -21,27 +21,27 @@ @Fluent public final class ValidationDetails implements JsonSerializable { /* - * Validation status for migration + * Validation status for migration. */ private ValidationState status; /* - * Validation Start date-time in UTC + * Start time (UTC) for validation. */ private OffsetDateTime validationStartTimeInUtc; /* - * Validation End date-time in UTC + * End time (UTC) for validation. */ private OffsetDateTime validationEndTimeInUtc; /* - * Details of server level validations + * Details of server level validations. */ private List serverLevelValidationDetails; /* - * Details of server level validations + * Details of server level validations. */ private List dbLevelValidationDetails; @@ -72,7 +72,7 @@ public ValidationDetails withStatus(ValidationState status) { } /** - * Get the validationStartTimeInUtc property: Validation Start date-time in UTC. + * Get the validationStartTimeInUtc property: Start time (UTC) for validation. * * @return the validationStartTimeInUtc value. */ @@ -81,7 +81,7 @@ public OffsetDateTime validationStartTimeInUtc() { } /** - * Set the validationStartTimeInUtc property: Validation Start date-time in UTC. + * Set the validationStartTimeInUtc property: Start time (UTC) for validation. * * @param validationStartTimeInUtc the validationStartTimeInUtc value to set. * @return the ValidationDetails object itself. @@ -92,7 +92,7 @@ public ValidationDetails withValidationStartTimeInUtc(OffsetDateTime validationS } /** - * Get the validationEndTimeInUtc property: Validation End date-time in UTC. + * Get the validationEndTimeInUtc property: End time (UTC) for validation. * * @return the validationEndTimeInUtc value. */ @@ -101,7 +101,7 @@ public OffsetDateTime validationEndTimeInUtc() { } /** - * Set the validationEndTimeInUtc property: Validation End date-time in UTC. + * Set the validationEndTimeInUtc property: End time (UTC) for validation. * * @param validationEndTimeInUtc the validationEndTimeInUtc value to set. * @return the ValidationDetails object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationMessage.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationMessage.java index 944cb1940af4..6e8bed7063db 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationMessage.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationMessage.java @@ -17,12 +17,12 @@ @Fluent public final class ValidationMessage implements JsonSerializable { /* - * Severity of validation message + * Severity of validation message. */ private ValidationState state; /* - * Validation message string + * Validation message string. */ private String message; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationSummaryItem.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationSummaryItem.java index 4345153db6aa..c00bb4c432f2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationSummaryItem.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationSummaryItem.java @@ -18,17 +18,17 @@ @Fluent public final class ValidationSummaryItem implements JsonSerializable { /* - * Validation type + * Validation type. */ private String type; /* - * Validation status for migration + * Validation status for migration. */ private ValidationState state; /* - * Validation messages + * Validation messages. */ private List messages; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResource.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoint.java similarity index 66% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResource.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoint.java index 94e1cfbba840..c408365e4654 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResource.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoint.java @@ -6,22 +6,22 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; import java.util.List; /** - * An immutable client-side representation of VirtualEndpointResource. + * An immutable client-side representation of VirtualEndpoint. */ -public interface VirtualEndpointResource { +public interface VirtualEndpoint { /** - * Gets the endpointType property: The endpoint type for the virtual endpoint. + * Gets the endpointType property: Type of endpoint for the virtual endpoints. * * @return the endpointType value. */ VirtualEndpointType endpointType(); /** - * Gets the members property: List of members for a virtual endpoint. + * Gets the members property: List of servers that one of the virtual endpoints can refer to. * * @return the members value. */ @@ -72,32 +72,31 @@ public interface VirtualEndpointResource { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceInner - * object. + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner object. * * @return the inner object. */ - VirtualEndpointResourceInner innerModel(); + VirtualEndpointInner innerModel(); /** - * The entirety of the VirtualEndpointResource definition. + * The entirety of the VirtualEndpoint definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } /** - * The VirtualEndpointResource definition stages. + * The VirtualEndpoint definition stages. */ interface DefinitionStages { /** - * The first stage of the VirtualEndpointResource definition. + * The first stage of the VirtualEndpoint definition. */ interface Blank extends WithParentResource { } /** - * The stage of the VirtualEndpointResource definition allowing to specify parent resource. + * The stage of the VirtualEndpoint definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -111,8 +110,8 @@ interface WithParentResource { } /** - * The stage of the VirtualEndpointResource definition which contains all the minimum required properties for - * the resource to be created, but also allows for any other optional properties to be specified. + * The stage of the VirtualEndpoint definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate extends DefinitionStages.WithEndpointType, DefinitionStages.WithMembers { /** @@ -120,7 +119,7 @@ interface WithCreate extends DefinitionStages.WithEndpointType, DefinitionStages * * @return the created resource. */ - VirtualEndpointResource create(); + VirtualEndpoint create(); /** * Executes the create request. @@ -128,30 +127,30 @@ interface WithCreate extends DefinitionStages.WithEndpointType, DefinitionStages * @param context The context to associate with this operation. * @return the created resource. */ - VirtualEndpointResource create(Context context); + VirtualEndpoint create(Context context); } /** - * The stage of the VirtualEndpointResource definition allowing to specify endpointType. + * The stage of the VirtualEndpoint definition allowing to specify endpointType. */ interface WithEndpointType { /** - * Specifies the endpointType property: The endpoint type for the virtual endpoint.. + * Specifies the endpointType property: Type of endpoint for the virtual endpoints.. * - * @param endpointType The endpoint type for the virtual endpoint. + * @param endpointType Type of endpoint for the virtual endpoints. * @return the next definition stage. */ WithCreate withEndpointType(VirtualEndpointType endpointType); } /** - * The stage of the VirtualEndpointResource definition allowing to specify members. + * The stage of the VirtualEndpoint definition allowing to specify members. */ interface WithMembers { /** - * Specifies the members property: List of members for a virtual endpoint. + * Specifies the members property: List of servers that one of the virtual endpoints can refer to.. * - * @param members List of members for a virtual endpoint. + * @param members List of servers that one of the virtual endpoints can refer to. * @return the next definition stage. */ WithCreate withMembers(List members); @@ -159,14 +158,14 @@ interface WithMembers { } /** - * Begins update for the VirtualEndpointResource resource. + * Begins update for the VirtualEndpoint resource. * * @return the stage of resource update. */ - VirtualEndpointResource.Update update(); + VirtualEndpoint.Update update(); /** - * The template for VirtualEndpointResource update. + * The template for VirtualEndpoint update. */ interface Update extends UpdateStages.WithEndpointType, UpdateStages.WithMembers { /** @@ -174,7 +173,7 @@ interface Update extends UpdateStages.WithEndpointType, UpdateStages.WithMembers * * @return the updated resource. */ - VirtualEndpointResource apply(); + VirtualEndpoint apply(); /** * Executes the update request. @@ -182,34 +181,34 @@ interface Update extends UpdateStages.WithEndpointType, UpdateStages.WithMembers * @param context The context to associate with this operation. * @return the updated resource. */ - VirtualEndpointResource apply(Context context); + VirtualEndpoint apply(Context context); } /** - * The VirtualEndpointResource update stages. + * The VirtualEndpoint update stages. */ interface UpdateStages { /** - * The stage of the VirtualEndpointResource update allowing to specify endpointType. + * The stage of the VirtualEndpoint update allowing to specify endpointType. */ interface WithEndpointType { /** - * Specifies the endpointType property: The endpoint type for the virtual endpoint.. + * Specifies the endpointType property: Type of endpoint for the virtual endpoints.. * - * @param endpointType The endpoint type for the virtual endpoint. + * @param endpointType Type of endpoint for the virtual endpoints. * @return the next definition stage. */ Update withEndpointType(VirtualEndpointType endpointType); } /** - * The stage of the VirtualEndpointResource update allowing to specify members. + * The stage of the VirtualEndpoint update allowing to specify members. */ interface WithMembers { /** - * Specifies the members property: List of members for a virtual endpoint. + * Specifies the members property: List of servers that one of the virtual endpoints can refer to.. * - * @param members List of members for a virtual endpoint. + * @param members List of servers that one of the virtual endpoints can refer to. * @return the next definition stage. */ Update withMembers(List members); @@ -221,7 +220,7 @@ interface WithMembers { * * @return the refreshed resource. */ - VirtualEndpointResource refresh(); + VirtualEndpoint refresh(); /** * Refreshes the resource to sync with Azure. @@ -229,5 +228,5 @@ interface WithMembers { * @param context The context to associate with this operation. * @return the refreshed resource. */ - VirtualEndpointResource refresh(Context context); + VirtualEndpoint refresh(Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResourceForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResourceForPatch.java index 979ecb992ddb..22ec5fa5b809 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResourceForPatch.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResourceForPatch.java @@ -14,12 +14,12 @@ import java.util.List; /** - * Represents a virtual endpoint for a server. + * Pair of virtual endpoints for a server. */ @Fluent public class VirtualEndpointResourceForPatch implements JsonSerializable { /* - * Properties of the virtual endpoint resource. + * Properties of the pair of virtual endpoints. */ private VirtualEndpointResourceProperties innerProperties; @@ -30,7 +30,7 @@ public VirtualEndpointResourceForPatch() { } /** - * Get the innerProperties property: Properties of the virtual endpoint resource. + * Get the innerProperties property: Properties of the pair of virtual endpoints. * * @return the innerProperties value. */ @@ -39,7 +39,7 @@ private VirtualEndpointResourceProperties innerProperties() { } /** - * Set the innerProperties property: Properties of the virtual endpoint resource. + * Set the innerProperties property: Properties of the pair of virtual endpoints. * * @param innerProperties the innerProperties value to set. * @return the VirtualEndpointResourceForPatch object itself. @@ -50,7 +50,7 @@ VirtualEndpointResourceForPatch withInnerProperties(VirtualEndpointResourcePrope } /** - * Get the endpointType property: The endpoint type for the virtual endpoint. + * Get the endpointType property: Type of endpoint for the virtual endpoints. * * @return the endpointType value. */ @@ -59,7 +59,7 @@ public VirtualEndpointType endpointType() { } /** - * Set the endpointType property: The endpoint type for the virtual endpoint. + * Set the endpointType property: Type of endpoint for the virtual endpoints. * * @param endpointType the endpointType value to set. * @return the VirtualEndpointResourceForPatch object itself. @@ -73,7 +73,7 @@ public VirtualEndpointResourceForPatch withEndpointType(VirtualEndpointType endp } /** - * Get the members property: List of members for a virtual endpoint. + * Get the members property: List of servers that one of the virtual endpoints can refer to. * * @return the members value. */ @@ -82,7 +82,7 @@ public List members() { } /** - * Set the members property: List of members for a virtual endpoint. + * Set the members property: List of servers that one of the virtual endpoints can refer to. * * @param members the members value to set. * @return the VirtualEndpointResourceForPatch object itself. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointType.java index 4dc3ffcb3e75..fca4579d570b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointType.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointType.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * The endpoint type for the virtual endpoint. + * Type of endpoint for the virtual endpoints. */ public final class VirtualEndpointType extends ExpandableStringEnum { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoints.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoints.java index 7cdc907e4bbe..e04ee5714df7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoints.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoints.java @@ -13,11 +13,11 @@ */ public interface VirtualEndpoints { /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -25,11 +25,11 @@ public interface VirtualEndpoints { void delete(String resourceGroupName, String serverName, String virtualEndpointName); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -38,47 +38,47 @@ public interface VirtualEndpoints { void delete(String resourceGroupName, String serverName, String virtualEndpointName, Context context); /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint along with {@link Response}. + * @return information about a pair of virtual endpoints along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String serverName, - String virtualEndpointName, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String virtualEndpointName, + Context context); /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param virtualEndpointName The name of the virtual endpoint. + * @param virtualEndpointName Base name of the virtual endpoints. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint. + * @return information about a pair of virtual endpoints. */ - VirtualEndpointResource get(String resourceGroupName, String serverName, String virtualEndpointName); + VirtualEndpoint get(String resourceGroupName, String serverName, String virtualEndpointName); /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of virtual endpoints as paginated response with {@link PagedIterable}. + * @return list of virtual endpoints as paginated response with {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * List all the servers in a given resource group. + * Lists pair of virtual endpoints associated to a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -86,35 +86,35 @@ Response getWithResponse(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of virtual endpoints as paginated response with {@link PagedIterable}. + * @return list of virtual endpoints as paginated response with {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint along with {@link Response}. + * @return information about a pair of virtual endpoints along with {@link Response}. */ - VirtualEndpointResource getById(String id); + VirtualEndpoint getById(String id); /** - * Gets information about a virtual endpoint. + * Gets information about a pair of virtual endpoints. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a virtual endpoint along with {@link Response}. + * @return information about a pair of virtual endpoints along with {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + Response getByIdWithResponse(String id, Context context); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,7 +124,7 @@ Response getWithResponse(String resourceGroupName, Stri void deleteById(String id); /** - * Deletes a virtual endpoint. + * Deletes a pair of virtual endpoints. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -135,10 +135,10 @@ Response getWithResponse(String resourceGroupName, Stri void deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new VirtualEndpointResource resource. + * Begins definition for a new VirtualEndpoint resource. * * @param name resource name. - * @return the first stage of the new VirtualEndpointResource definition. + * @return the first stage of the new VirtualEndpoint definition. */ - VirtualEndpointResource.DefinitionStages.Blank define(String name); + VirtualEndpoint.DefinitionStages.Blank define(String name); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerBackupListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointsList.java similarity index 57% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerBackupListResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointsList.java index 858cae530190..3c29b9a5ac37 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerBackupListResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointsList.java @@ -9,53 +9,53 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; import java.io.IOException; import java.util.List; /** - * A list of server backups. + * List of virtual endpoints. */ @Fluent -public final class ServerBackupListResult implements JsonSerializable { +public final class VirtualEndpointsList implements JsonSerializable { /* - * The list of backups of a server. + * List of virtual endpoints. */ - private List value; + private List value; /* - * The link used to get the next page of operations. + * Link used to get the next page of results. */ private String nextLink; /** - * Creates an instance of ServerBackupListResult class. + * Creates an instance of VirtualEndpointsList class. */ - public ServerBackupListResult() { + public VirtualEndpointsList() { } /** - * Get the value property: The list of backups of a server. + * Get the value property: List of virtual endpoints. * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** - * Set the value property: The list of backups of a server. + * Set the value property: List of virtual endpoints. * * @param value the value value to set. - * @return the ServerBackupListResult object itself. + * @return the VirtualEndpointsList object itself. */ - public ServerBackupListResult withValue(List value) { + public VirtualEndpointsList withValue(List value) { this.value = value; return this; } /** - * Get the nextLink property: The link used to get the next page of operations. + * Get the nextLink property: Link used to get the next page of results. * * @return the nextLink value. */ @@ -64,12 +64,12 @@ public String nextLink() { } /** - * Set the nextLink property: The link used to get the next page of operations. + * Set the nextLink property: Link used to get the next page of results. * * @param nextLink the nextLink value to set. - * @return the ServerBackupListResult object itself. + * @return the VirtualEndpointsList object itself. */ - public ServerBackupListResult withNextLink(String nextLink) { + public VirtualEndpointsList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } @@ -97,31 +97,32 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ServerBackupListResult from the JsonReader. + * Reads an instance of VirtualEndpointsList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ServerBackupListResult if the JsonReader was pointing to an instance of it, or null if it + * @return An instance of VirtualEndpointsList if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ServerBackupListResult. + * @throws IOException If an error occurs while reading the VirtualEndpointsList. */ - public static ServerBackupListResult fromJson(JsonReader jsonReader) throws IOException { + public static VirtualEndpointsList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ServerBackupListResult deserializedServerBackupListResult = new ServerBackupListResult(); + VirtualEndpointsList deserializedVirtualEndpointsList = new VirtualEndpointsList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ServerBackupInner.fromJson(reader1)); - deserializedServerBackupListResult.value = value; + List value + = reader.readArray(reader1 -> VirtualEndpointInner.fromJson(reader1)); + deserializedVirtualEndpointsList.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedServerBackupListResult.nextLink = reader.getString(); + deserializedVirtualEndpointsList.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedServerBackupListResult; + return deserializedVirtualEndpointsList; }); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointsListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointsListResult.java deleted file mode 100644 index 6ab12b620882..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointsListResult.java +++ /dev/null @@ -1,128 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of virtual endpoints. - */ -@Fluent -public final class VirtualEndpointsListResult implements JsonSerializable { - /* - * The list of virtual endpoints - */ - private List value; - - /* - * The link used to get the next page of operations. - */ - private String nextLink; - - /** - * Creates an instance of VirtualEndpointsListResult class. - */ - public VirtualEndpointsListResult() { - } - - /** - * Get the value property: The list of virtual endpoints. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of virtual endpoints. - * - * @param value the value value to set. - * @return the VirtualEndpointsListResult object itself. - */ - public VirtualEndpointsListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link used to get the next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the VirtualEndpointsListResult object itself. - */ - public VirtualEndpointsListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualEndpointsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualEndpointsListResult if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VirtualEndpointsListResult. - */ - public static VirtualEndpointsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualEndpointsListResult deserializedVirtualEndpointsListResult = new VirtualEndpointsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> VirtualEndpointResourceInner.fromJson(reader1)); - deserializedVirtualEndpointsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedVirtualEndpointsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualEndpointsListResult; - }); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageModel.java similarity index 83% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageResult.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageModel.java index d43ba8509089..847409abb36e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageResult.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageModel.java @@ -4,13 +4,13 @@ package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageResultInner; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageModelInner; import java.util.List; /** - * An immutable client-side representation of VirtualNetworkSubnetUsageResult. + * An immutable client-side representation of VirtualNetworkSubnetUsageModel. */ -public interface VirtualNetworkSubnetUsageResult { +public interface VirtualNetworkSubnetUsageModel { /** * Gets the delegatedSubnetsUsage property: The delegatedSubnetsUsage property. * @@ -34,9 +34,9 @@ public interface VirtualNetworkSubnetUsageResult { /** * Gets the inner - * com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageResultInner object. + * com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageModelInner object. * * @return the inner object. */ - VirtualNetworkSubnetUsageResultInner innerModel(); + VirtualNetworkSubnetUsageModelInner innerModel(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsages.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsages.java index 7c2b9420e91b..7a58b27450f9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsages.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsages.java @@ -12,7 +12,7 @@ */ public interface VirtualNetworkSubnetUsages { /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. @@ -20,20 +20,20 @@ public interface VirtualNetworkSubnetUsages { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network subnet usage for a given vNet resource id along with {@link Response}. + * @return virtual network subnet usage data along with {@link Response}. */ - Response executeWithResponse(String locationName, + Response listWithResponse(String locationName, VirtualNetworkSubnetUsageParameter parameters, Context context); /** - * Get virtual network subnet usage for a given vNet resource id. + * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. * @param parameters The required parameters for creating or updating a server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual network subnet usage for a given vNet resource id. + * @return virtual network subnet usage data. */ - VirtualNetworkSubnetUsageResult execute(String locationName, VirtualNetworkSubnetUsageParameter parameters); + VirtualNetworkSubnetUsageModel list(String locationName, VirtualNetworkSubnetUsageParameter parameters); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHaAndGeoBackupSupportedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHaAndGeoBackupSupportedEnum.java deleted file mode 100644 index 3d603c02c172..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHaAndGeoBackupSupportedEnum.java +++ /dev/null @@ -1,54 +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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether Zone Redundant HA and Geo-backup is supported in this region. "Enabled" means zone - * redundant HA and geo-backup is supported. "Disabled" stands for zone redundant HA and geo-backup is not supported. - * Will be deprecated in future, please look to Supported Features for "ZoneRedundantHaAndGeoBackup". - */ -public final class ZoneRedundantHaAndGeoBackupSupportedEnum - extends ExpandableStringEnum { - /** - * Static value Enabled for ZoneRedundantHaAndGeoBackupSupportedEnum. - */ - public static final ZoneRedundantHaAndGeoBackupSupportedEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for ZoneRedundantHaAndGeoBackupSupportedEnum. - */ - public static final ZoneRedundantHaAndGeoBackupSupportedEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of ZoneRedundantHaAndGeoBackupSupportedEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ZoneRedundantHaAndGeoBackupSupportedEnum() { - } - - /** - * Creates or finds a ZoneRedundantHaAndGeoBackupSupportedEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding ZoneRedundantHaAndGeoBackupSupportedEnum. - */ - public static ZoneRedundantHaAndGeoBackupSupportedEnum fromString(String name) { - return fromString(name, ZoneRedundantHaAndGeoBackupSupportedEnum.class); - } - - /** - * Gets known ZoneRedundantHaAndGeoBackupSupportedEnum values. - * - * @return known ZoneRedundantHaAndGeoBackupSupportedEnum values. - */ - public static Collection values() { - return values(ZoneRedundantHaAndGeoBackupSupportedEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHaSupportedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHaSupportedEnum.java deleted file mode 100644 index afa367f7b085..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHaSupportedEnum.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.resourcemanager.postgresqlflexibleserver.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A value indicating whether Zone Redundant HA is supported in this region. "Enabled" means zone redundant HA is - * supported. "Disabled" stands for zone redundant HA is not supported. Will be deprecated in future, please look to - * Supported Features for "ZoneRedundantHa". - */ -public final class ZoneRedundantHaSupportedEnum extends ExpandableStringEnum { - /** - * Static value Enabled for ZoneRedundantHaSupportedEnum. - */ - public static final ZoneRedundantHaSupportedEnum ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for ZoneRedundantHaSupportedEnum. - */ - public static final ZoneRedundantHaSupportedEnum DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of ZoneRedundantHaSupportedEnum value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ZoneRedundantHaSupportedEnum() { - } - - /** - * Creates or finds a ZoneRedundantHaSupportedEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding ZoneRedundantHaSupportedEnum. - */ - public static ZoneRedundantHaSupportedEnum fromString(String name) { - return fromString(name, ZoneRedundantHaSupportedEnum.class); - } - - /** - * Gets known ZoneRedundantHaSupportedEnum values. - * - * @return known ZoneRedundantHaSupportedEnum values. - */ - public static Collection values() { - return values(ZoneRedundantHaSupportedEnum.class); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport.java new file mode 100644 index 000000000000..126dee36fd15 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if high availability with zone redundancy is supported in conjunction with geographically redundant backups + * in this location. 'Enabled' means high availability with zone redundancy is supported in conjunction with + * geographically redundant backups is supported. 'Disabled' stands for high availability with zone redundancy is + * supported in conjunction with geographically redundant backups is not supported. Will be deprecated in the future. + * Look to Supported Features for 'ZoneRedundantHaAndGeoBackup'. + */ +public final class ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport + extends ExpandableStringEnum { + /** + * Static value Enabled for ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport. + */ + public static final ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport ENABLED + = fromString("Enabled"); + + /** + * Static value Disabled for ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport. + */ + public static final ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport DISABLED + = fromString("Disabled"); + + /** + * Creates a new instance of ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport() { + } + + /** + * Creates or finds a ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport from its string + * representation. + * + * @param name a name to look for. + * @return the corresponding ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport. + */ + public static ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport fromString(String name) { + return fromString(name, ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport.class); + } + + /** + * Gets known ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport values. + * + * @return known ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport values. + */ + public static Collection values() { + return values(ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilitySupport.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilitySupport.java new file mode 100644 index 000000000000..eaa3073c0715 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilitySupport.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates if high availability with zone redundancy is supported in this location. 'Enabled' means high availability + * with zone redundancy is supported. 'Disabled' stands for high availability with zone redundancy is not supported. + * Will be deprecated in the future. Look to Supported Features for 'ZoneRedundantHa'. + */ +public final class ZoneRedundantHighAvailabilitySupport + extends ExpandableStringEnum { + /** + * Static value Enabled for ZoneRedundantHighAvailabilitySupport. + */ + public static final ZoneRedundantHighAvailabilitySupport ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for ZoneRedundantHighAvailabilitySupport. + */ + public static final ZoneRedundantHighAvailabilitySupport DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ZoneRedundantHighAvailabilitySupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ZoneRedundantHighAvailabilitySupport() { + } + + /** + * Creates or finds a ZoneRedundantHighAvailabilitySupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding ZoneRedundantHighAvailabilitySupport. + */ + public static ZoneRedundantHighAvailabilitySupport fromString(String name) { + return fromString(name, ZoneRedundantHighAvailabilitySupport.class); + } + + /** + * Gets known ZoneRedundantHighAvailabilitySupport values. + * + * @return known ZoneRedundantHighAvailabilitySupport values. + */ + public static Collection values() { + return values(ZoneRedundantHighAvailabilitySupport.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/package-info.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/package-info.java index 0a81bec78ff1..4be91fe90b9d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/package-info.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/package-info.java @@ -4,8 +4,8 @@ /** * Package containing the data models for PostgreSqlManagementClient. - * The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL - * resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and - * configurations with new business model. + * The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure + * PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, + * log files and configurations with new business model. */ package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/package-info.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/package-info.java index fa3c7eaa8d7c..ce951214f674 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/package-info.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/package-info.java @@ -4,8 +4,8 @@ /** * Package containing the classes for PostgreSqlManagementClient. - * The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL - * resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and - * configurations with new business model. + * The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure + * PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, + * log files and configurations with new business model. */ package com.azure.resourcemanager.postgresqlflexibleserver; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-postgresqlflexibleserver/proxy-config.json b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-postgresqlflexibleserver/proxy-config.json index 7f70e5e05fa3..d89ef7f7f6c0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-postgresqlflexibleserver/proxy-config.json +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-postgresqlflexibleserver/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.postgresqlflexibleserver.implementation.AdministratorsClientImpl$AdministratorsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.BackupsClientImpl$BackupsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.CheckNameAvailabilitiesClientImpl$CheckNameAvailabilitiesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.CheckNameAvailabilityWithLocationsClientImpl$CheckNameAvailabilityWithLocationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ConfigurationsClientImpl$ConfigurationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.DatabasesClientImpl$DatabasesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.FirewallRulesClientImpl$FirewallRulesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.FlexibleServersClientImpl$FlexibleServersService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.GetPrivateDnsZoneSuffixesClientImpl$GetPrivateDnsZoneSuffixesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.LocationBasedCapabilitiesClientImpl$LocationBasedCapabilitiesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.LogFilesClientImpl$LogFilesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.LtrBackupOperationsClientImpl$LtrBackupOperationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.MigrationsClientImpl$MigrationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateEndpointConnectionOperationsClientImpl$PrivateEndpointConnectionOperationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.QuotaUsagesClientImpl$QuotaUsagesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ReplicasClientImpl$ReplicasService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ResourceProvidersClientImpl$ResourceProvidersService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerCapabilitiesClientImpl$ServerCapabilitiesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerThreatProtectionSettingsClientImpl$ServerThreatProtectionSettingsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServersClientImpl$ServersService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.TuningConfigurationsClientImpl$TuningConfigurationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.TuningIndexesClientImpl$TuningIndexesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.TuningOptionsClientImpl$TuningOptionsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.VirtualEndpointsClientImpl$VirtualEndpointsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.VirtualNetworkSubnetUsagesClientImpl$VirtualNetworkSubnetUsagesService"]] \ No newline at end of file +[["com.azure.resourcemanager.postgresqlflexibleserver.implementation.AdministratorsMicrosoftEntrasClientImpl$AdministratorsMicrosoftEntrasService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.AdvancedThreatProtectionSettingsClientImpl$AdvancedThreatProtectionSettingsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.BackupsAutomaticAndOnDemandsClientImpl$BackupsAutomaticAndOnDemandsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.BackupsLongTermRetentionsClientImpl$BackupsLongTermRetentionsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.CapabilitiesByLocationsClientImpl$CapabilitiesByLocationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.CapabilitiesByServersClientImpl$CapabilitiesByServersService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.CapturedLogsClientImpl$CapturedLogsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ConfigurationsClientImpl$ConfigurationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.DatabasesClientImpl$DatabasesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.FirewallRulesClientImpl$FirewallRulesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.MigrationsClientImpl$MigrationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.NameAvailabilitiesClientImpl$NameAvailabilitiesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateDnsZoneSuffixesClientImpl$PrivateDnsZoneSuffixesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.QuotaUsagesClientImpl$QuotaUsagesService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ReplicasClientImpl$ReplicasService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerThreatProtectionSettingsClientImpl$ServerThreatProtectionSettingsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServersClientImpl$ServersService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.TuningOptionsOperationsClientImpl$TuningOptionsOperationsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.VirtualEndpointsClientImpl$VirtualEndpointsService"],["com.azure.resourcemanager.postgresqlflexibleserver.implementation.VirtualNetworkSubnetUsagesClientImpl$VirtualNetworkSubnetUsagesService"]] \ No newline at end of file diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsDeleteSamples.java deleted file mode 100644 index a1525a223f2a..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsDeleteSamples.java +++ /dev/null @@ -1,26 +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.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for Administrators Delete. - */ -public final class AdministratorsDeleteSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * AdministratorDelete.json - */ - /** - * Sample code: AdministratorDelete. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - administratorDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.administrators() - .delete("testrg", "testserver", "oooooooo-oooo-oooo-oooo-oooooooooooo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsGetSamples.java deleted file mode 100644 index ed5440a383a2..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsGetSamples.java +++ /dev/null @@ -1,26 +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.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for Administrators Get. - */ -public final class AdministratorsGetSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * AdministratorGet.json - */ - /** - * Sample code: ServerGet. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void serverGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.administrators() - .getWithResponse("testrg", "pgtestsvc1", "oooooooo-oooo-oooo-oooo-oooooooooooo", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsListByServerSamples.java deleted file mode 100644 index 037cf0d88b51..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsListByServerSamples.java +++ /dev/null @@ -1,25 +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.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for Administrators ListByServer. - */ -public final class AdministratorsListByServerSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * AdministratorsListByServer.json - */ - /** - * Sample code: AdministratorsListByServer. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - administratorsListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.administrators().listByServer("testrg", "pgtestsvc1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraCreateOrUpdateSamples.java similarity index 58% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsCreateSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraCreateOrUpdateSamples.java index e143b6ff5413..6b8b765b74bc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsCreateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraCreateOrUpdateSamples.java @@ -7,26 +7,26 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; /** - * Samples for Administrators Create. + * Samples for AdministratorsMicrosoftEntra CreateOrUpdate. */ -public final class AdministratorsCreateSamples { +public final class AdministratorsMicrosoftEntraCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * AdministratorAdd.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdministratorsMicrosoftEntraAdd.json */ /** - * Sample code: Adds an Microsoft Entra Administrator for the server. + * Sample code: Add a server administrator associated to a Microsoft Entra principal. * * @param manager Entry point to PostgreSqlManager. */ - public static void addsAnMicrosoftEntraAdministratorForTheServer( + public static void addAServerAdministratorAssociatedToAMicrosoftEntraPrincipal( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.administrators() + manager.administratorsMicrosoftEntras() .define("oooooooo-oooo-oooo-oooo-oooooooooooo") - .withExistingFlexibleServer("testrg", "testserver") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withPrincipalType(PrincipalType.USER) - .withPrincipalName("testuser1@microsoft.com") + .withPrincipalName("exampleuser@contoso.com") .withTenantId("tttttttt-tttt-tttt-tttt-tttttttttttt") .create(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraDeleteSamples.java similarity index 51% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationDeleteSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraDeleteSamples.java index 6e63c7746916..6544d969ec34 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraDeleteSamples.java @@ -5,23 +5,23 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; /** - * Samples for PrivateEndpointConnectionOperation Delete. + * Samples for AdministratorsMicrosoftEntra Delete. */ -public final class PrivateEndpointConnectionOperationDeleteSamples { +public final class AdministratorsMicrosoftEntraDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateEndpointConnectionDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdministratorsMicrosoftEntraDelete.json */ /** - * Sample code: Deletes a private endpoint connection with a given name. + * Sample code: Delete a server administrator associated to a Microsoft Entra principal. * * @param manager Entry point to PostgreSqlManager. */ - public static void deletesAPrivateEndpointConnectionWithAGivenName( + public static void deleteAServerAdministratorAssociatedToAMicrosoftEntraPrincipal( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateEndpointConnectionOperations() - .delete("Default", "test-svr", "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", + manager.administratorsMicrosoftEntras() + .delete("exampleresourcegroup", "exampleserver", "oooooooo-oooo-oooo-oooo-oooooooooooo", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraGetSamples.java new file mode 100644 index 000000000000..0c59c058f589 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraGetSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for AdministratorsMicrosoftEntra Get. + */ +public final class AdministratorsMicrosoftEntraGetSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdministratorsMicrosoftEntraGet.json + */ + /** + * Sample code: Get information about a server administrator associated to a Microsoft Entra principal. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void getInformationAboutAServerAdministratorAssociatedToAMicrosoftEntraPrincipal( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.administratorsMicrosoftEntras() + .getWithResponse("exampleresourcegroup", "exampleserver", "oooooooo-oooo-oooo-oooo-oooooooooooo", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraListByServerSamples.java new file mode 100644 index 000000000000..d4eb4fcc22f9 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraListByServerSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for AdministratorsMicrosoftEntra ListByServer. + */ +public final class AdministratorsMicrosoftEntraListByServerSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdministratorsMicrosoftEntraListByServer.json + */ + /** + * Sample code: List information about all server administrators associated to Microsoft Entra principals. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listInformationAboutAllServerAdministratorsAssociatedToMicrosoftEntraPrincipals( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.administratorsMicrosoftEntras() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetSamples.java similarity index 56% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsGetSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetSamples.java index 0618d0313953..dac7d747c178 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetSamples.java @@ -7,23 +7,23 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; /** - * Samples for ServerThreatProtectionSettings Get. + * Samples for AdvancedThreatProtectionSettings Get. */ -public final class ServerThreatProtectionSettingsGetSamples { +public final class AdvancedThreatProtectionSettingsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerThreatProtectionSettingsGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdvancedThreatProtectionSettingsGet.json */ /** - * Sample code: Get a server's Threat Protection settings. + * Sample code: Get state of advanced threat protection settings for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void getAServerSThreatProtectionSettings( + public static void getStateOfAdvancedThreatProtectionSettingsForAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.serverThreatProtectionSettings() - .getWithResponse("threatprotection-6852", "threatprotection-2080", ThreatProtectionName.DEFAULT, + manager.advancedThreatProtectionSettings() + .getWithResponse("exampleresourcegroup", "exampleserver", ThreatProtectionName.DEFAULT, com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerSamples.java new file mode 100644 index 000000000000..05251efe6118 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for AdvancedThreatProtectionSettings ListByServer. + */ +public final class AdvancedThreatProtectionSettingsListByServerSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * AdvancedThreatProtectionSettingsListByServer.json + */ + /** + * Sample code: List state of advanced threat protection settings for a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listStateOfAdvancedThreatProtectionSettingsForAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.advancedThreatProtectionSettings() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandCreateSamples.java new file mode 100644 index 000000000000..a4600bab59b2 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandCreateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for BackupsAutomaticAndOnDemand Create. + */ +public final class BackupsAutomaticAndOnDemandCreateSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsAutomaticAndOnDemandCreate.json + */ + /** + * Sample code: Create an on demand backup of a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + createAnOnDemandBackupOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsAutomaticAndOnDemands() + .create("exampleresourcegroup", "exampleserver", "ondemandbackup-20250601T183022", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrBackupOperationsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandDeleteSamples.java similarity index 50% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrBackupOperationsListByServerSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandDeleteSamples.java index 8cd7161a5f0d..7360f2d62277 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrBackupOperationsListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandDeleteSamples.java @@ -5,22 +5,23 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; /** - * Samples for LtrBackupOperations ListByServer. + * Samples for BackupsAutomaticAndOnDemand Delete. */ -public final class LtrBackupOperationsListByServerSamples { +public final class BackupsAutomaticAndOnDemandDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LongTermRetentionOperationListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsAutomaticAndOnDemandDelete.json */ /** - * Sample code: Sample List of Long Tern Retention Operations by Flexible Server. + * Sample code: Delete an on demand backup, given its name. * * @param manager Entry point to PostgreSqlManager. */ - public static void sampleListOfLongTernRetentionOperationsByFlexibleServer( + public static void deleteAnOnDemandBackupGivenItsName( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.ltrBackupOperations() - .listByServer("rgLongTermRetention", "pgsqlltrtestserver", com.azure.core.util.Context.NONE); + manager.backupsAutomaticAndOnDemands() + .delete("exampleresourcegroup", "exampleserver", "ondemandbackup-20250601T183022", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandGetSamples.java new file mode 100644 index 000000000000..7ddf221053f9 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandGetSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for BackupsAutomaticAndOnDemand Get. + */ +public final class BackupsAutomaticAndOnDemandGetSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsAutomaticAndOnDemandGet.json + */ + /** + * Sample code: Get an on demand backup, given its name. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + getAnOnDemandBackupGivenItsName(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsAutomaticAndOnDemands() + .getWithResponse("exampleresourcegroup", "exampleserver", "backup_638830782181266873", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandListByServerSamples.java new file mode 100644 index 000000000000..3d0880157955 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandListByServerSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for BackupsAutomaticAndOnDemand ListByServer. + */ +public final class BackupsAutomaticAndOnDemandListByServerSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsAutomaticAndOnDemandListByServer.json + */ + /** + * Sample code: List all available backups of a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + listAllAvailableBackupsOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsAutomaticAndOnDemands() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsDeleteSamples.java deleted file mode 100644 index a244ecab93a8..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsDeleteSamples.java +++ /dev/null @@ -1,25 +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.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for Backups Delete. - */ -public final class BackupsDeleteSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * BackupDelete.json - */ - /** - * Sample code: Delete a specific backup. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - deleteASpecificBackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.backups().delete("TestGroup", "testserver", "backup_20250303T160516", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsGetSamples.java deleted file mode 100644 index 21d653002839..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsGetSamples.java +++ /dev/null @@ -1,27 +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.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for Backups Get. - */ -public final class BackupsGetSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/BackupGet - * .json - */ - /** - * Sample code: Get a backup for a server. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - getABackupForAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.backups() - .getWithResponse("TestGroup", "postgresqltestserver", "daily_20250303T160516", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsListByServerSamples.java deleted file mode 100644 index 9ad6c27b13f0..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsListByServerSamples.java +++ /dev/null @@ -1,25 +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.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for Backups ListByServer. - */ -public final class BackupsListByServerSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * BackupListByServer.json - */ - /** - * Sample code: List backups for a server. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - listBackupsForAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.backups().listByServer("TestGroup", "postgresqltestserver", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServerTriggerLtrPreBackupSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionCheckPrerequisitesSamples.java similarity index 50% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServerTriggerLtrPreBackupSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionCheckPrerequisitesSamples.java index 424845d3271c..9d9c5113cebf 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServerTriggerLtrPreBackupSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionCheckPrerequisitesSamples.java @@ -8,23 +8,24 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; /** - * Samples for FlexibleServer TriggerLtrPreBackup. + * Samples for BackupsLongTermRetention CheckPrerequisites. */ -public final class FlexibleServerTriggerLtrPreBackupSamples { +public final class BackupsLongTermRetentionCheckPrerequisitesSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LongTermRetentionPreBackup.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsLongTermRetentionCheckPrerequisites.json */ /** - * Sample code: Sample_Prebackup. + * Sample code: Perform all checks required for a long term retention backup operation to succeed. * * @param manager Entry point to PostgreSqlManager. */ - public static void samplePrebackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.flexibleServers() - .triggerLtrPreBackupWithResponse("rgLongTermRetention", "pgsqlltrtestserver", - new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("backup1")), + public static void performAllChecksRequiredForALongTermRetentionBackupOperationToSucceed( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsLongTermRetentions() + .checkPrerequisitesWithResponse("exampleresourcegroup", "exampleserver", + new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("exampleltrbackup")), com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionGetSamples.java new file mode 100644 index 000000000000..2c53f4c4b5ee --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionGetSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for BackupsLongTermRetention Get. + */ +public final class BackupsLongTermRetentionGetSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsLongTermRetentionGet.json + */ + /** + * Sample code: Get the results of a long retention backup operation for a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void getTheResultsOfALongRetentionBackupOperationForAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsLongTermRetentions() + .getWithResponse("exampleresourcegroup", "exampleserver", "exampleltrbackup", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionListByServerSamples.java new file mode 100644 index 000000000000..74d93de9e121 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionListByServerSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for BackupsLongTermRetention ListByServer. + */ +public final class BackupsLongTermRetentionListByServerSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsLongTermRetentionListByServer.json + */ + /** + * Sample code: List the results of the long term retention backup operations for a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listTheResultsOfTheLongTermRetentionBackupOperationsForAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsLongTermRetentions() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServerStartLtrBackupSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionStartSamples.java similarity index 56% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServerStartLtrBackupSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionStartSamples.java index d0db810e140a..9d0c6ab9ab1b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServerStartLtrBackupSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionStartSamples.java @@ -6,28 +6,29 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupStoreDetails; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrBackupRequest; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionRequest; import java.util.Arrays; /** - * Samples for FlexibleServer StartLtrBackup. + * Samples for BackupsLongTermRetention Start. */ -public final class FlexibleServerStartLtrBackupSamples { +public final class BackupsLongTermRetentionStartSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LongTermRetentionBackup.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * BackupsLongTermRetentionStart.json */ /** - * Sample code: Sample_ExecuteBackup. + * Sample code: Initiate a long term retention backup. * * @param manager Entry point to PostgreSqlManager. */ public static void - sampleExecuteBackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.flexibleServers() - .startLtrBackup("rgLongTermRetention", "pgsqlltrtestserver", - new LtrBackupRequest().withBackupSettings(new BackupSettings().withBackupName("backup1")) + initiateALongTermRetentionBackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.backupsLongTermRetentions() + .start("exampleresourcegroup", "exampleserver", + new BackupsLongTermRetentionRequest() + .withBackupSettings(new BackupSettings().withBackupName("exampleltrbackup")) .withTargetDetails(new BackupStoreDetails().withSasUriList(Arrays.asList("sasuri"))), com.azure.core.util.Context.NONE); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationListSamples.java new file mode 100644 index 000000000000..2be7ee86c9ea --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for CapabilitiesByLocation List. + */ +public final class CapabilitiesByLocationListSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * CapabilitiesByLocationList.json + */ + /** + * Sample code: List the capabilities available in a given location for a specific subscription. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listTheCapabilitiesAvailableInAGivenLocationForASpecificSubscription( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.capabilitiesByLocations().list("eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServerListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServerListSamples.java new file mode 100644 index 000000000000..e863118ce555 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServerListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for CapabilitiesByServer List. + */ +public final class CapabilitiesByServerListSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * CapabilitiesByServerList.json + */ + /** + * Sample code: List the capabilities available for a given server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listTheCapabilitiesAvailableForAGivenServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.capabilitiesByServers().list("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerSamples.java similarity index 54% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsCreateSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerSamples.java index 723466f0536c..96eb7dda0e4b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsCreateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerSamples.java @@ -5,22 +5,21 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; /** - * Samples for Backups Create. + * Samples for CapturedLogs ListByServer. */ -public final class BackupsCreateSamples { +public final class CapturedLogsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * BackupCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * CapturedLogsListByServer.json */ /** - * Sample code: Create a new Backup for a flexible server. + * Sample code: List all captured logs for download in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void createANewBackupForAFlexibleServer( + public static void listAllCapturedLogsForDownloadInAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.backups() - .create("TestGroup", "postgresqltestserver", "backup_20250303T160516", com.azure.core.util.Context.NONE); + manager.capturedLogs().listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityExecuteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityExecuteSamples.java deleted file mode 100644 index 123b614436de..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityExecuteSamples.java +++ /dev/null @@ -1,28 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; - -/** - * Samples for CheckNameAvailability Execute. - */ -public final class CheckNameAvailabilityExecuteSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * CheckNameAvailability.json - */ - /** - * Sample code: NameAvailability. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void nameAvailability(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.checkNameAvailabilities() - .executeWithResponse(new CheckNameAvailabilityRequest().withName("name1") - .withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityWithLocationExecuteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityWithLocationExecuteSamples.java deleted file mode 100644 index 81c5255e966d..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityWithLocationExecuteSamples.java +++ /dev/null @@ -1,28 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; - -/** - * Samples for CheckNameAvailabilityWithLocation Execute. - */ -public final class CheckNameAvailabilityWithLocationExecuteSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * CheckNameAvailabilityLocationBased.json - */ - /** - * Sample code: NameAvailability. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void nameAvailability(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.checkNameAvailabilityWithLocations() - .executeWithResponse("westus", new CheckNameAvailabilityRequest().withName("name1") - .withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetSamples.java index 71c407fc1147..7bb881bdac61 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetSamples.java @@ -10,16 +10,17 @@ public final class ConfigurationsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ConfigurationGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ConfigurationsGet. + * json */ /** - * Sample code: ConfigurationGet. + * Sample code: Get information about a specific configuration (also known as server parameter) of a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void configurationGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void getInformationAboutASpecificConfigurationAlsoKnownAsServerParameterOfAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.configurations() - .getWithResponse("testrg", "testserver", "array_nulls", com.azure.core.util.Context.NONE); + .getWithResponse("exampleresourcegroup", "exampleserver", "array_nulls", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerSamples.java index 02537eb0552a..9a2356cb2c07 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerSamples.java @@ -10,15 +10,17 @@ public final class ConfigurationsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ConfigurationListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ConfigurationsListByServer.json */ /** - * Sample code: ConfigurationList. + * Sample code: List all configurations (also known as server parameters) of a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void configurationList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.configurations().listByServer("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void listAllConfigurationsAlsoKnownAsServerParametersOfAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.configurations() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutSamples.java index 09776d77f4ca..9466687d8135 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutSamples.java @@ -10,19 +10,21 @@ public final class ConfigurationsPutSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ConfigurationUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ConfigurationsUpdateUsingPut.json */ /** - * Sample code: Update a user configuration. + * Sample code: Update, using Put verb, the value assigned to a specific modifiable configuration (also known as + * server parameter) of a server. * * @param manager Entry point to PostgreSqlManager. */ public static void - updateAUserConfiguration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + updateUsingPutVerbTheValueAssignedToASpecificModifiableConfigurationAlsoKnownAsServerParameterOfAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.configurations() .define("constraint_exclusion") - .withExistingFlexibleServer("testrg", "testserver") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withValue("on") .withSource("user-override") .create(); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsUpdateSamples.java index aff7bc555e9e..c75988cff7a3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsUpdateSamples.java @@ -12,18 +12,20 @@ public final class ConfigurationsUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ConfigurationUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ConfigurationsUpdate.json */ /** - * Sample code: Update a user configuration. + * Sample code: Update the value assigned to a specific modifiable configuration (also known as server parameter) of + * a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - updateAUserConfiguration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void updateTheValueAssignedToASpecificModifiableConfigurationAlsoKnownAsServerParameterOfAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Configuration resource = manager.configurations() - .getWithResponse("testrg", "testserver", "constraint_exclusion", com.azure.core.util.Context.NONE) + .getWithResponse("exampleresourcegroup", "exampleserver", "constraint_exclusion", + com.azure.core.util.Context.NONE) .getValue(); resource.update().withValue("on").withSource("user-override").apply(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateSamples.java index 77a77204da47..054e0a36a2e7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateSamples.java @@ -10,8 +10,8 @@ public final class DatabasesCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * DatabaseCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesCreate. + * json */ /** * Sample code: Create a database. @@ -20,8 +20,8 @@ public final class DatabasesCreateSamples { */ public static void createADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.databases() - .define("db1") - .withExistingFlexibleServer("TestGroup", "testserver") + .define("exampledatabase") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withCharset("utf8") .withCollation("en_US.utf8") .create(); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteSamples.java index 991c2b9aa5a6..6a36d90fc658 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteSamples.java @@ -10,15 +10,17 @@ public final class DatabasesDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * DatabaseDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesDelete. + * json */ /** - * Sample code: Delete a database. + * Sample code: Delete an existing database. * * @param manager Entry point to PostgreSqlManager. */ - public static void deleteADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.databases().delete("TestGroup", "testserver", "db1", com.azure.core.util.Context.NONE); + public static void + deleteAnExistingDatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.databases() + .delete("exampleresourcegroup", "exampleserver", "exampledatabase", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetSamples.java index 5d36c746aa3c..f2b8ec1d1e9f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetSamples.java @@ -10,15 +10,17 @@ public final class DatabasesGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * DatabaseGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesGet.json */ /** - * Sample code: Get a database. + * Sample code: Get information about an existing database. * * @param manager Entry point to PostgreSqlManager. */ - public static void getADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.databases().getWithResponse("TestGroup", "testserver", "db1", com.azure.core.util.Context.NONE); + public static void getInformationAboutAnExistingDatabase( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.databases() + .getWithResponse("exampleresourcegroup", "exampleserver", "exampledatabase", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerSamples.java index 1fed2eac0881..d7f2436ea5c7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerSamples.java @@ -10,16 +10,16 @@ public final class DatabasesListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * DatabasesListByServer.json */ /** - * Sample code: List databases in a server. + * Sample code: List all databases in a server. * * @param manager Entry point to PostgreSqlManager. */ public static void - listDatabasesInAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.databases().listByServer("TestGroup", "testserver", com.azure.core.util.Context.NONE); + listAllDatabasesInAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.databases().listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateSamples.java index 06fa11067ea6..9d48148ab60f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateSamples.java @@ -10,19 +10,19 @@ public final class FirewallRulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * FirewallRuleCreate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * FirewallRulesCreateOrUpdate.json */ /** - * Sample code: FirewallRuleCreate. + * Sample code: Create a new firewall rule or update an existing firewall rule. * * @param manager Entry point to PostgreSqlManager. */ - public static void - firewallRuleCreate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void createANewFirewallRuleOrUpdateAnExistingFirewallRule( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.firewallRules() - .define("rule1") - .withExistingFlexibleServer("testrg", "testserver") + .define("examplefirewallrule") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withStartIpAddress("0.0.0.0") .withEndIpAddress("255.255.255.255") .create(); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteSamples.java index 6501c0749027..d336fdfa0846 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteSamples.java @@ -10,16 +10,17 @@ public final class FirewallRulesDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * FirewallRuleDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * FirewallRulesDelete.json */ /** - * Sample code: FirewallRuleDelete. + * Sample code: Delete an existing firewall rule. * * @param manager Entry point to PostgreSqlManager. */ public static void - firewallRuleDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.firewallRules().delete("testrg", "testserver", "rule1", com.azure.core.util.Context.NONE); + deleteAnExistingFirewallRule(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.firewallRules() + .delete("exampleresourcegroup", "exampleserver", "examplefirewallrule", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetSamples.java index 8794b840ff97..b611392bcafe 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetSamples.java @@ -10,15 +10,18 @@ public final class FirewallRulesGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * FirewallRuleGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/FirewallRulesGet. + * json */ /** - * Sample code: FirewallRuleList. + * Sample code: Get information about a firewall rule in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void firewallRuleList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.firewallRules().getWithResponse("testrg", "testserver", "rule1", com.azure.core.util.Context.NONE); + public static void getInformationAboutAFirewallRuleInAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.firewallRules() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplefirewallrule", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerSamples.java index 50e295e870ff..514d36ebe14b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerSamples.java @@ -10,15 +10,16 @@ public final class FirewallRulesListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * FirewallRuleListByServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * FirewallRulesListByServer.json */ /** - * Sample code: FirewallRuleList. + * Sample code: List information about all firewall rules in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void firewallRuleList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.firewallRules().listByServer("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void listInformationAboutAllFirewallRulesInAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.firewallRules().listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/GetPrivateDnsZoneSuffixExecuteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/GetPrivateDnsZoneSuffixExecuteSamples.java deleted file mode 100644 index 43f61c40b939..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/GetPrivateDnsZoneSuffixExecuteSamples.java +++ /dev/null @@ -1,25 +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.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for GetPrivateDnsZoneSuffix Execute. - */ -public final class GetPrivateDnsZoneSuffixExecuteSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * GetPrivateDnsZoneSuffix.json - */ - /** - * Sample code: GetPrivateDnsZoneSuffix. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - getPrivateDnsZoneSuffix(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.getPrivateDnsZoneSuffixes().executeWithResponse(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LocationBasedCapabilitiesExecuteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LocationBasedCapabilitiesExecuteSamples.java deleted file mode 100644 index ab59124b8f86..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LocationBasedCapabilitiesExecuteSamples.java +++ /dev/null @@ -1,24 +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.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for LocationBasedCapabilities Execute. - */ -public final class LocationBasedCapabilitiesExecuteSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * CapabilitiesByLocation.json - */ - /** - * Sample code: CapabilitiesList. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void capabilitiesList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.locationBasedCapabilities().execute("eastus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LogFilesListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LogFilesListByServerSamples.java deleted file mode 100644 index 340a1125c0ec..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LogFilesListByServerSamples.java +++ /dev/null @@ -1,25 +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.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for LogFiles ListByServer. - */ -public final class LogFilesListByServerSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LogFilesListByServer.json - */ - /** - * Sample code: List all server log files for a server. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - listAllServerLogFilesForAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.logFiles().listByServer("testrg", "postgresqltestsvc1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrBackupOperationsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrBackupOperationsGetSamples.java deleted file mode 100644 index 42e7112ad748..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrBackupOperationsGetSamples.java +++ /dev/null @@ -1,25 +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.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for LtrBackupOperations Get. - */ -public final class LtrBackupOperationsGetSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * LongTermRetentionOperationGet.json - */ - /** - * Sample code: Sample. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void sample(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.ltrBackupOperations() - .getWithResponse("rgLongTermRetention", "pgsqlltrtestserver", "backup1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCancelSamples.java similarity index 54% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsDeleteSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCancelSamples.java index e42aaf8c27ed..39ae8ac0aca5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCancelSamples.java @@ -5,22 +5,23 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; /** - * Samples for Migrations Delete. + * Samples for Migrations Cancel. */ -public final class MigrationsDeleteSamples { +public final class MigrationsCancelSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Delete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsCancel. + * json */ /** - * Sample code: Migrations_Delete. + * Sample code: Cancel an active migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + cancelAnActiveMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .deleteWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", + .cancelWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilitySamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilitySamples.java new file mode 100644 index 000000000000..2e6e0169c251 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilitySamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; + +/** + * Samples for Migrations CheckNameAvailability. + */ +public final class MigrationsCheckNameAvailabilitySamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCheckNameAvailability.json + */ + /** + * Sample code: Check the validity and availability of the given name, to assign it to a new migration. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void checkTheValidityAndAvailabilityOfTheGivenNameToAssignItToANewMigration( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.migrations() + .checkNameAvailabilityWithResponse("exampleresourcegroup", "exampleserver", + new MigrationNameAvailabilityInner().withName("examplemigration") + .withType("Microsoft.DBforPostgreSQL/flexibleServers/migrations"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCreateSamples.java index e4679b5666af..d4c73c668391 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCreateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCreateSamples.java @@ -5,11 +5,11 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.resourcemanager.postgresqlflexibleserver.models.AdminCredentials; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesAndPermissions; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationMode; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationOption; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParameters; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDbsInTargetEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDatabasesOnTargetServer; import com.azure.resourcemanager.postgresqlflexibleserver.models.SourceType; import com.azure.resourcemanager.postgresqlflexibleserver.models.SslMode; import java.util.Arrays; @@ -20,198 +20,205 @@ public final class MigrationsCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_With_PrivateEndpoint_Servers.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateWithOtherUsers.json */ /** - * Sample code: Migrations Create with private endpoint. + * Sample code: Create a migration specifying user names. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsCreateWithPrivateEndpoint( + public static void createAMigrationSpecifyingUserNames( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") - .withMigrationInstanceResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testsourcemigration") + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withMigrationMode(MigrationMode.OFFLINE) .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") .withSecretParameters(new MigrationSecretParameters() .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) + .withTargetServerPassword("fakeTokenPlaceholder")) + .withSourceServerUsername("newadmin@examplesource") + .withTargetServerUsername("targetadmin")) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_With_Roles.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateOtherSourceTypesValidateMigrate.json */ /** - * Sample code: Migrations Create with roles. + * Sample code: Create a migration with other source type for validating and migrating. * * @param manager Entry point to PostgreSqlManager. */ - public static void - migrationsCreateWithRoles(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void createAMigrationWithOtherSourceTypeForValidatingAndMigrating( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withMigrationMode(MigrationMode.OFFLINE) - .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") + .withMigrationOption(MigrationOption.VALIDATE_AND_MIGRATE) + .withSourceType(SourceType.ON_PREMISES) + .withSslMode(SslMode.PREFER) + .withSourceDbServerResourceId("examplesource:5432@exampleuser") .withSecretParameters(new MigrationSecretParameters() .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) - .withMigrateRoles(MigrateRolesEnum.TRUE) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_With_FullyQualifiedDomainName.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateWithPrivateEndpointServers.json */ /** - * Sample code: Migrations Create with fully qualified domain name. + * Sample code: Create a migration with private endpoint. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsCreateWithFullyQualifiedDomainName( + public static void createAMigrationWithPrivateEndpoint( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") + .withMigrationInstanceResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/examplesourcemigration") .withMigrationMode(MigrationMode.OFFLINE) .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") - .withSourceDbServerFullyQualifiedDomainName("testsourcefqdn.example.com") - .withTargetDbServerFullyQualifiedDomainName("test-target-fqdn.example.com") + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") .withSecretParameters(new MigrationSecretParameters() .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_Validate_Only.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsCreate. + * json */ /** - * Sample code: Create Pre-migration Validation. + * Sample code: Create a migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void - createPreMigrationValidation(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void createAMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withMigrationMode(MigrationMode.OFFLINE) - .withMigrationOption(MigrationOption.VALIDATE) .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") .withSecretParameters(new MigrationSecretParameters() .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_With_Other_Users.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateWithRoles.json */ /** - * Sample code: Migrations Create by passing user names. + * Sample code: Create a migration with roles. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsCreateByPassingUserNames( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + createAMigrationWithRoles(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withMigrationMode(MigrationMode.OFFLINE) .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") .withSecretParameters(new MigrationSecretParameters() .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") - .withTargetServerPassword("fakeTokenPlaceholder")) - .withSourceServerUsername("newadmin@testsource") - .withTargetServerUsername("targetadmin")) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) + .withTargetServerPassword("fakeTokenPlaceholder"))) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) + .withMigrateRoles(MigrateRolesAndPermissions.TRUE) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateWithFullyQualifiedDomainName.json */ /** - * Sample code: Migrations_Create. + * Sample code: Create a migration with fully qualified domain names for source and target servers. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsCreate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void createAMigrationWithFullyQualifiedDomainNamesForSourceAndTargetServers( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withMigrationMode(MigrationMode.OFFLINE) .withSourceDbServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource") + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") + .withSourceDbServerFullyQualifiedDomainName("examplesource.contoso.com") + .withTargetDbServerFullyQualifiedDomainName("exampletarget.contoso.com") .withSecretParameters(new MigrationSecretParameters() .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) .create(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Create_Other_SourceTypes_Validate_Migrate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsCreateValidateOnly.json */ /** - * Sample code: Create Migration with other source types for Validate and Migrate. + * Sample code: Create a migration for validating only. * * @param manager Entry point to PostgreSqlManager. */ - public static void createMigrationWithOtherSourceTypesForValidateAndMigrate( + public static void createAMigrationForValidatingOnly( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .define("testmigration") - .withRegion("westus") - .withExistingFlexibleServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget") + .define("examplemigration") + .withRegion("eastus") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withMigrationMode(MigrationMode.OFFLINE) - .withMigrationOption(MigrationOption.VALIDATE_AND_MIGRATE) - .withSourceType(SourceType.ON_PREMISES) - .withSslMode(SslMode.PREFER) - .withSourceDbServerResourceId("testsource:5432@pguser") + .withMigrationOption(MigrationOption.VALIDATE) + .withSourceDbServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource") .withSecretParameters(new MigrationSecretParameters() .withAdminCredentials(new AdminCredentials().withSourceServerPassword("fakeTokenPlaceholder") .withTargetServerPassword("fakeTokenPlaceholder"))) - .withDbsToMigrate(Arrays.asList("db1", "db2", "db3", "db4")) - .withOverwriteDbsInTarget(OverwriteDbsInTargetEnum.TRUE) + .withDbsToMigrate( + Arrays.asList("exampledatabase1", "exampledatabase2", "exampledatabase3", "exampledatabase4")) + .withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer.TRUE) .create(); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsGetSamples.java index 3afdecbfe1e6..b030aa579d2c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsGetSamples.java @@ -10,85 +10,85 @@ public final class MigrationsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_GetMigrationWithSuccessfulValidationOnly.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsGetMigrationWithSuccessfulValidationOnly.json */ /** - * Sample code: Migrations_GetMigrationWithSuccessfulValidationOnly. + * Sample code: Get information about a migration with successful validation only. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGetMigrationWithSuccessfulValidationOnly( + public static void getInformationAboutAMigrationWithSuccessfulValidationOnly( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - "testmigrationwithsuccessfulvalidationonly", com.azure.core.util.Context.NONE); + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Get.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsGetMigrationWithSuccessfulValidationAndMigration.json */ /** - * Sample code: Migrations_Get. + * Sample code: Get information about a migration with successful validation and successful migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void getInformationAboutAMigrationWithSuccessfulValidationAndSuccessfulMigration( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_GetMigrationWithSuccessfulValidationButMigrationFailure.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsGetMigrationWithSuccessfulValidationButMigrationFailure.json */ /** - * Sample code: Migrations_GetMigrationWithSuccessfulValidationButMigrationFailure. + * Sample code: Get information about a migration with successful validation but failed migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGetMigrationWithSuccessfulValidationButMigrationFailure( + public static void getInformationAboutAMigrationWithSuccessfulValidationButFailedMigration( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - "testmigrationwithsuccessfulvalidationbutmigrationfailure", com.azure.core.util.Context.NONE); + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_GetMigrationWithSuccessfulValidationAndMigration.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsGetMigrationWithValidationFailures.json */ /** - * Sample code: Migrations_GetMigrationWithSuccessfulValidationAndMigration. + * Sample code: Get information about a migration with validation failures. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGetMigrationWithSuccessfulValidationAndMigration( + public static void getInformationAboutAMigrationWithValidationFailures( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - "testmigrationwithsuccessfulvalidationandmigration", com.azure.core.util.Context.NONE); + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_GetMigrationWithValidationFailures.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGet.json */ /** - * Sample code: Migrations_GetMigrationWithValidationFailures. + * Sample code: Get information about a migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void migrationsGetMigrationWithValidationFailures( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + getInformationAboutAMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - "testmigrationwithvalidationfailure", com.azure.core.util.Context.NONE); + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsListByTargetServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsListByTargetServerSamples.java index ed455ca7348a..becd7ce3531e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsListByTargetServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsListByTargetServerSamples.java @@ -12,18 +12,18 @@ public final class MigrationsListByTargetServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_ListByTargetServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * MigrationsListByTargetServer.json */ /** - * Sample code: Migrations_ListByTargetServer. + * Sample code: List all migrations of a target flexible server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - migrationsListByTargetServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void listAllMigrationsOfATargetFlexibleServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.migrations() - .listByTargetServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", MigrationListFilter.ALL, + .listByTargetServer("exampleresourcegroup", "exampleserver", MigrationListFilter.ALL, com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsUpdateSamples.java index d18fe57294e3..bc56196e44ca 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsUpdateSamples.java @@ -4,9 +4,8 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CancelEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceDbEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResource; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceServer; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Migration; /** * Samples for Migrations Update. @@ -14,37 +13,20 @@ public final class MigrationsUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Cancel.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsUpdate. + * json */ /** - * Sample code: Cancel migration. + * Sample code: Update an existing migration. * * @param manager Entry point to PostgreSqlManager. */ - public static void cancelMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - MigrationResource resource = manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", + public static void + updateAnExistingMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + Migration resource = manager.migrations() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withCancel(CancelEnum.TRUE).apply(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Migrations_Update.json - */ - /** - * Sample code: Migrations_Update. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void migrationsUpdate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - MigrationResource resource = manager.migrations() - .getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withSetupLogicalReplicationOnSourceDbIfNeeded(LogicalReplicationOnSourceDbEnum.TRUE).apply(); + resource.update().withSetupLogicalReplicationOnSourceDbIfNeeded(LogicalReplicationOnSourceServer.TRUE).apply(); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckGloballySamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckGloballySamples.java new file mode 100644 index 000000000000..a727ee61a817 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckGloballySamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; + +/** + * Samples for NameAvailability CheckGlobally. + */ +public final class NameAvailabilityCheckGloballySamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * NameAvailabilityCheckGlobally.json + */ + /** + * Sample code: Check the validity and availability of the given name, to assign it to a new server or to use it as + * the base name of a new pair of virtual endpoints. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + checkTheValidityAndAvailabilityOfTheGivenNameToAssignItToANewServerOrToUseItAsTheBaseNameOfANewPairOfVirtualEndpoints( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.nameAvailabilities() + .checkGloballyWithResponse(new CheckNameAvailabilityRequest().withName("exampleserver") + .withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckWithLocationSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckWithLocationSamples.java new file mode 100644 index 000000000000..0a461b63149b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckWithLocationSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; + +/** + * Samples for NameAvailability CheckWithLocation. + */ +public final class NameAvailabilityCheckWithLocationSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * NameAvailabilityCheckWithLocation.json + */ + /** + * Sample code: Check the validity and availability of the given name, in the given location, to assign it to a new + * server or to use it as the base name of a new pair of virtual endpoints. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + checkTheValidityAndAvailabilityOfTheGivenNameInTheGivenLocationToAssignItToANewServerOrToUseItAsTheBaseNameOfANewPairOfVirtualEndpoints( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.nameAvailabilities() + .checkWithLocationWithResponse("eastus", new CheckNameAvailabilityRequest().withName("exampleserver") + .withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListSamples.java index efe722b23299..ed926e36d4b0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListSamples.java @@ -10,15 +10,16 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * OperationList.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/OperationsList. + * json */ /** - * Sample code: OperationList. + * Sample code: List all available REST API operations. * * @param manager Entry point to PostgreSqlManager. */ - public static void operationList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void listAllAvailableRESTAPIOperations( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerCapabilitiesListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixGetSamples.java similarity index 56% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerCapabilitiesListSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixGetSamples.java index 1b06c9d34a8c..70b453043d90 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerCapabilitiesListSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixGetSamples.java @@ -5,21 +5,21 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; /** - * Samples for ServerCapabilities List. + * Samples for PrivateDnsZoneSuffix Get. */ -public final class ServerCapabilitiesListSamples { +public final class PrivateDnsZoneSuffixGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCapabilities.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateDnsZoneSuffixGet.json */ /** - * Sample code: ServerCapabilitiesList. + * Sample code: Get the private DNS suffix. * * @param manager Entry point to PostgreSqlManager. */ public static void - serverCapabilitiesList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.serverCapabilities().list("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE); + getThePrivateDNSSuffix(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateDnsZoneSuffixes().getWithResponse(com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsDeleteSamples.java new file mode 100644 index 000000000000..a2d54858b036 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for PrivateEndpointConnections Delete. + */ +public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateEndpointConnectionsDelete.json + */ + /** + * Sample code: Delete a private endpoint connection. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + deleteAPrivateEndpointConnection(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.privateEndpointConnections() + .delete("exampleresourcegroup", "exampleserver", + "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetSamples.java index ca86d978097a..bb26636d82af 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetSamples.java @@ -10,18 +10,18 @@ public final class PrivateEndpointConnectionsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateEndpointConnectionGet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateEndpointConnectionsGet.json */ /** - * Sample code: Gets private endpoint connection. + * Sample code: Get a private endpoint connection. * * @param manager Entry point to PostgreSqlManager. */ public static void - getsPrivateEndpointConnection(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + getAPrivateEndpointConnection(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.privateEndpointConnections() - .getWithResponse("Default", "test-svr", + .getWithResponse("exampleresourcegroup", "exampleserver", "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", com.azure.core.util.Context.NONE); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerSamples.java index b269a97e90e4..44338ecc7ae7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerSamples.java @@ -10,16 +10,17 @@ public final class PrivateEndpointConnectionsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateEndpointConnectionList.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateEndpointConnectionsList.json */ /** - * Sample code: Gets list of private endpoint connections on a server. + * Sample code: List all private endpoint connections on a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void getsListOfPrivateEndpointConnectionsOnAServer( + public static void listAllPrivateEndpointConnectionsOnAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateEndpointConnections().listByServer("Default", "test-svr", com.azure.core.util.Context.NONE); + manager.privateEndpointConnections() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateSamples.java similarity index 75% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationUpdateSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateSamples.java index df28322ad6c2..f49499e80907 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateSamples.java @@ -9,23 +9,24 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionState; /** - * Samples for PrivateEndpointConnectionOperation Update. + * Samples for PrivateEndpointConnections Update. */ -public final class PrivateEndpointConnectionOperationUpdateSamples { +public final class PrivateEndpointConnectionsUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PrivateEndpointConnectionUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * PrivateEndpointConnectionsUpdate.json */ /** - * Sample code: Approve or reject a private endpoint connection with a given name. + * Sample code: Approve or reject a private endpoint connection. * * @param manager Entry point to PostgreSqlManager. */ - public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName( + public static void approveOrRejectAPrivateEndpointConnection( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateEndpointConnectionOperations() - .update("Default", "test-svr", "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", + manager.privateEndpointConnections() + .update("exampleresourcegroup", "exampleserver", + "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e", new PrivateEndpointConnectionInner().withPrivateLinkServiceConnectionState( new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) .withDescription("Approved by johndoe@contoso.com")), diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetSamples.java index a19014df95d5..06b363803049 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetSamples.java @@ -10,7 +10,7 @@ public final class PrivateLinkResourcesGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * PrivateLinkResourcesGet.json */ /** @@ -20,6 +20,8 @@ public final class PrivateLinkResourcesGetSamples { */ public static void getsAPrivateLinkResourceForPostgreSQL( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateLinkResources().getWithResponse("Default", "test-svr", "plr", com.azure.core.util.Context.NONE); + manager.privateLinkResources() + .getWithResponse("exampleresourcegroup", "exampleserver", "exampleprivatelink", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerSamples.java index 225b5b3b2811..09df133a3368 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerSamples.java @@ -10,7 +10,7 @@ public final class PrivateLinkResourcesListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * PrivateLinkResourcesList.json */ /** @@ -20,6 +20,7 @@ public final class PrivateLinkResourcesListByServerSamples { */ public static void getsPrivateLinkResourcesForPostgreSQL( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.privateLinkResources().listByServer("Default", "test-svr", com.azure.core.util.Context.NONE); + manager.privateLinkResources() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListSamples.java index 0aafad9b5dc7..160a52278faf 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListSamples.java @@ -10,16 +10,16 @@ public final class QuotaUsagesListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * QuotaUsagesForFlexibleServers.json */ /** - * Sample code: List of quota usages for flexible servers. + * Sample code: List of quota usages for servers. * * @param manager Entry point to PostgreSqlManager. */ - public static void listOfQuotaUsagesForFlexibleServers( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.quotaUsages().list("westus", com.azure.core.util.Context.NONE); + public static void + listOfQuotaUsagesForServers(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.quotaUsages().list("eastus", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicasListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicasListByServerSamples.java index dec17080dec6..ccd67ee28ee5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicasListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicasListByServerSamples.java @@ -10,16 +10,16 @@ public final class ReplicasListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * ReplicasListByServer.json */ /** - * Sample code: ReplicasListByServer. + * Sample code: List all read replicas of a server. * * @param manager Entry point to PostgreSqlManager. */ public static void - replicasListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.replicas().listByServer("testrg", "sourcepgservername", com.azure.core.util.Context.NONE); + listAllReadReplicasOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.replicas().listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ResourceProviderCheckMigrationNameAvailabilitySamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ResourceProviderCheckMigrationNameAvailabilitySamples.java deleted file mode 100644 index 634166243f74..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ResourceProviderCheckMigrationNameAvailabilitySamples.java +++ /dev/null @@ -1,31 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; - -/** - * Samples for ResourceProvider CheckMigrationNameAvailability. - */ -public final class ResourceProviderCheckMigrationNameAvailabilitySamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * CheckMigrationNameAvailability.json - */ - /** - * Sample code: CheckMigrationNameAvailability. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - checkMigrationNameAvailability(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.resourceProviders() - .checkMigrationNameAvailabilityWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", - new MigrationNameAvailabilityResourceInner().withName("name1") - .withType("Microsoft.DBforPostgreSQL/flexibleServers/migrations"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateSamples.java deleted file mode 100644 index 94229f939356..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateSamples.java +++ /dev/null @@ -1,33 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettingsModel; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState; - -/** - * Samples for ServerThreatProtectionSettings CreateOrUpdate. - */ -public final class ServerThreatProtectionSettingsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerThreatProtectionSettingsCreateOrUpdate.json - */ - /** - * Sample code: Update a server's Threat Protection settings. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void updateAServerSThreatProtectionSettings( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - ServerThreatProtectionSettingsModel resource = manager.serverThreatProtectionSettings() - .getWithResponse("threatprotection-4799", "threatprotection-6440", ThreatProtectionName.DEFAULT, - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withState(ThreatProtectionState.ENABLED).apply(); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsListByServerSamples.java deleted file mode 100644 index a883cb18a8f7..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsListByServerSamples.java +++ /dev/null @@ -1,26 +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.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for ServerThreatProtectionSettings ListByServer. - */ -public final class ServerThreatProtectionSettingsListByServerSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerThreatProtectionSettingsListByServer.json - */ - /** - * Sample code: Get a server's Advanced Threat Protection settings. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void getAServerSAdvancedThreatProtectionSettings( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.serverThreatProtectionSettings() - .listByServer("threatprotection-6852", "threatprotection-2080", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateOrUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..54da2b76e959 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateOrUpdateSamples.java @@ -0,0 +1,431 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTier; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Cluster; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryptionType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MicrosoftEntraAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordBasedAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerPublicNetworkAccessState; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrow; +import com.azure.resourcemanager.postgresqlflexibleserver.models.UserAssignedIdentity; +import com.azure.resourcemanager.postgresqlflexibleserver.models.UserIdentity; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Servers CreateOrUpdate. + */ +public final class ServersCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateReviveDropped.json + */ + /** + * Sample code: Create a new server using a backup of a server that was deleted or dropped recently. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createANewServerUsingABackupOfAServerThatWasDeletedOrDroppedRecently( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSourceServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampledeletedserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:30:22.123456Z")) + .withCreateMode(CreateMode.REVIVE_DROPPED) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateInMicrosoftOwnedVirtualNetworkWithZoneRedundantHighAvailability.json + */ + /** + * Sample code: Create a new server in Microsoft owned virtual network with zone redundant high availability. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createANewServerInMicrosoftOwnedVirtualNetworkWithZoneRedundantHighAvailability( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withTags(mapOf("InCustomerVnet", "false", "InMicrosoftVnet", "true")) + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.ENABLED)) + .withNetwork(new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.ENABLED)) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) + .withAvailabilityZone("1") + .withCreateMode(CreateMode.CREATE) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateGeoRestoreWithDataEncryptionEnabledAutoUpdate.json + */ + /** + * Sample code: Create a new server using a restore of a geographically redundant backup of an existing server, with + * data encryption based on customer managed key with automatic key version update. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + createANewServerUsingARestoreOfAGeographicallyRedundantBackupOfAnExistingServerWithDataEncryptionBasedOnCustomerManagedKeyWithAutomaticKeyVersionUpdate( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity", + new UserIdentity(), + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withSourceServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:35:22.123456Z")) + .withCreateMode(CreateMode.GEO_RESTORE) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateWithDataEncryptionEnabled.json + */ + /** + * Sample code: Create a new server with data encryption based on customer managed key. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createANewServerWithDataEncryptionBasedOnCustomerManagedKey( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId("") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) + .withNetwork(new Network().withDelegatedSubnetResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") + .withPrivateDnsZoneArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) + .withAvailabilityZone("1") + .withCreateMode(CreateMode.CREATE) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateGeoRestoreWithDataEncryptionEnabled.json + */ + /** + * Sample code: Create a new server using a restore of a geographically redundant backup of an existing server, with + * data encryption based on customer managed key. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + createANewServerUsingARestoreOfAGeographicallyRedundantBackupOfAnExistingServerWithDataEncryptionBasedOnCustomerManagedKey( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity", + new UserIdentity(), + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withSourceServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:35:22.123456Z")) + .withCreateMode(CreateMode.GEO_RESTORE) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateReplica.json + */ + /** + * Sample code: Create a read replica of an existing server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createAReadReplicaOfAnExistingServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId("") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withSourceServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:35:22.123456Z")) + .withCreateMode(CreateMode.REPLICA) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateInYourOwnVirtualNetworkWithSameZoneHighAvailability.json + */ + /** + * Sample code: Create a new server in your own virtual network with same zone high availability. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createANewServerInYourOwnVirtualNetworkWithSameZoneHighAvailability( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withTags(mapOf("InCustomerVnet", "true", "InMicrosoftVnet", "false")) + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.ENABLED)) + .withNetwork(new Network().withDelegatedSubnetResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") + .withPrivateDnsZoneArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.private.postgres.database")) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.SAME_ZONE)) + .withAvailabilityZone("1") + .withCreateMode(CreateMode.CREATE) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersClusterCreate.json + */ + /** + * Sample code: Create a new elastic cluster. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + createANewElasticCluster(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLogin("examplelogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SIX) + .withStorage(new Storage().withStorageSizeGB(256) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P15)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) + .withNetwork(new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.DISABLED)) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.fromString("Disabled"))) + .withCreateMode(CreateMode.CREATE) + .withCluster(new Cluster().withClusterSize(2).withDefaultDatabaseName("clusterdb")) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreatePointInTimeRestore.json + */ + /** + * Sample code: Create a new server using a point in time restore of a backup of an existing server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createANewServerUsingAPointInTimeRestoreOfABackupOfAnExistingServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSourceServerResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/examplesourceserver") + .withPointInTimeUtc(OffsetDateTime.parse("2025-06-01T18:35:22.123456Z")) + .withCreateMode(CreateMode.POINT_IN_TIME_RESTORE) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateWithMicrosoftEntraEnabledInYourOwnVirtualNetworkWithoutHighAvailability.json + */ + /** + * Sample code: Create a new server with Microsoft Entra authentication enabled in your own virtual network and + * without high availability. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + createANewServerWithMicrosoftEntraAuthenticationEnabledInYourOwnVirtualNetworkAndWithoutHighAvailability( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(MicrosoftEntraAuth.ENABLED) + .withPasswordAuth(PasswordBasedAuth.ENABLED) + .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) + .withDataEncryption(new DataEncryption().withType(DataEncryptionType.SYSTEM_MANAGED)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) + .withNetwork(new Network().withDelegatedSubnetResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") + .withPrivateDnsZoneArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.fromString("Disabled"))) + .withAvailabilityZone("1") + .withCreateMode(CreateMode.CREATE) + .create(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersCreateWithDataEncryptionEnabledAutoUpdate.json + */ + /** + * Sample code: Create a new server with data encryption based on customer managed key with automatic key version + * update. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void createANewServerWithDataEncryptionBasedOnCustomerManagedKeyWithAutomaticKeyVersionUpdate( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .define("exampleserver") + .withRegion("eastus") + .withExistingResourceGroup("exampleresourcegroup") + .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withAdministratorLogin("exampleadministratorlogin") + .withAdministratorLoginPassword("examplepassword") + .withVersion(PostgresMajorVersion.ONE_SEVEN) + .withStorage(new Storage().withStorageSizeGB(512) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P20)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId("") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withBackup( + new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) + .withNetwork(new Network().withDelegatedSubnetResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") + .withPrivateDnsZoneArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) + .withAvailabilityZone("1") + .withCreateMode(CreateMode.CREATE) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateSamples.java deleted file mode 100644 index 114c96b9bad9..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateSamples.java +++ /dev/null @@ -1,307 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAuthEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ArmServerKeyType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTiers; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Cluster; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption; -import com.azure.resourcemanager.postgresqlflexibleserver.models.GeoRedundantBackupEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordAuthEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerPublicNetworkAccessState; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; -import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrow; -import com.azure.resourcemanager.postgresqlflexibleserver.models.UserAssignedIdentity; -import com.azure.resourcemanager.postgresqlflexibleserver.models.UserIdentity; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Servers Create. - */ -public final class ServersCreateSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateWithDataEncryptionEnabled.json - */ - /** - * Sample code: ServerCreateWithDataEncryptionEnabled. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void serverCreateWithDataEncryptionEnabled( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .define("pgtestsvc4") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) - .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity", - new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) - .withAdministratorLogin("login") - .withAdministratorLoginPassword("Password1") - .withVersion(ServerVersion.ONE_SIX) - .withStorage(new Storage().withStorageSizeGB(512) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P20)) - .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") - .withPrimaryUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity") - .withGeoBackupKeyUri("fakeTokenPlaceholder") - .withGeoBackupUserAssignedIdentityId("") - .withType(ArmServerKeyType.AZURE_KEY_VAULT)) - .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED)) - .withNetwork(new Network().withDelegatedSubnetResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet") - .withPrivateDnsZoneArmResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) - .withAvailabilityZone("1") - .withCreateMode(CreateMode.CREATE) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateReviveDropped.json - */ - /** - * Sample code: ServerCreateReviveDropped. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - serverCreateReviveDropped(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .define("pgtestsvc5-rev") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withSourceServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc5") - .withPointInTimeUtc(OffsetDateTime.parse("2023-04-27T00:04:59.4078005+00:00")) - .withCreateMode(CreateMode.REVIVE_DROPPED) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateGeoRestoreWithDataEncryptionEnabled.json - */ - /** - * Sample code: Create a database as a geo-restore in geo-paired location. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void createADatabaseAsAGeoRestoreInGeoPairedLocation( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .define("pgtestsvc5geo") - .withRegion("eastus") - .withExistingResourceGroup("testrg") - .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity", - new UserIdentity(), - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity", - new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) - .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") - .withPrimaryUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity") - .withGeoBackupKeyUri("fakeTokenPlaceholder") - .withGeoBackupUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity") - .withType(ArmServerKeyType.AZURE_KEY_VAULT)) - .withSourceServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/sourcepgservername") - .withPointInTimeUtc(OffsetDateTime.parse("2021-06-27T00:04:59.4078005+00:00")) - .withCreateMode(CreateMode.GEO_RESTORE) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreate.json - */ - /** - * Sample code: Create a new server. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void createANewServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .define("testpgflex") - .withRegion("eastus") - .withExistingResourceGroup("testrg") - .withTags(mapOf("VNetServer", "1")) - .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLogin("login") - .withAdministratorLoginPassword("Password1") - .withVersion(ServerVersion.ONE_SIX) - .withStorage(new Storage().withStorageSizeGB(512) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P20)) - .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.ENABLED)) - .withNetwork(new Network().withDelegatedSubnetResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-subnet") - .withPrivateDnsZoneArmResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/privateDnsZones/testpgflex.private.postgres.database")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) - .withAvailabilityZone("1") - .withCreateMode(CreateMode.CREATE) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateWithMicrosoftEntraEnabled.json - */ - /** - * Sample code: Create a new server with Microsoft Entra authentication enabled. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void createANewServerWithMicrosoftEntraAuthenticationEnabled( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .define("pgtestsvc4") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withTags(mapOf("ElasticServer", "1")) - .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLogin("login") - .withAdministratorLoginPassword("Password1") - .withVersion(ServerVersion.ONE_SIX) - .withStorage(new Storage().withStorageSizeGB(512) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P20)) - .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(ActiveDirectoryAuthEnum.ENABLED) - .withPasswordAuth(PasswordAuthEnum.ENABLED) - .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) - .withDataEncryption(new DataEncryption().withType(ArmServerKeyType.SYSTEM_MANAGED)) - .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED)) - .withNetwork(new Network().withDelegatedSubnetResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet") - .withPrivateDnsZoneArmResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) - .withAvailabilityZone("1") - .withCreateMode(CreateMode.CREATE) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreateReplica.json - */ - /** - * Sample code: ServerCreateReplica. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - serverCreateReplica(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .define("pgtestsvc5rep") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity", - new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) - .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") - .withPrimaryUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity") - .withGeoBackupKeyUri("fakeTokenPlaceholder") - .withGeoBackupUserAssignedIdentityId("") - .withType(ArmServerKeyType.AZURE_KEY_VAULT)) - .withSourceServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/sourcepgservername") - .withPointInTimeUtc(OffsetDateTime.parse("2021-06-27T00:04:59.4078005+00:00")) - .withCreateMode(CreateMode.REPLICA) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ClusterCreate.json - */ - /** - * Sample code: ClusterCreate. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void clusterCreate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .define("pgtestcluster") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withSku(new Sku().withName("Standard_D4ds_v5").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLogin("login") - .withAdministratorLoginPassword("Password1") - .withVersion(ServerVersion.ONE_SIX) - .withStorage(new Storage().withStorageSizeGB(256) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P15)) - .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED)) - .withNetwork(new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.DISABLED)) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.DISABLED)) - .withCreateMode(CreateMode.CREATE) - .withCluster(new Cluster().withClusterSize(2)) - .create(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerCreatePointInTimeRestore.json - */ - /** - * Sample code: Create a database as a point in time restore. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void createADatabaseAsAPointInTimeRestore( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .define("pgtestsvc5") - .withRegion("westus") - .withExistingResourceGroup("testrg") - .withSourceServerResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/sourcepgservername") - .withPointInTimeUtc(OffsetDateTime.parse("2021-06-27T00:04:59.4078005+00:00")) - .withCreateMode(CreateMode.POINT_IN_TIME_RESTORE) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteSamples.java index ded3289d49fd..829ca4139aed 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteSamples.java @@ -10,15 +10,15 @@ public final class ServersDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerDelete.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersDelete.json */ /** - * Sample code: ServerDelete. + * Sample code: Delete or drop an existing server. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().delete("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void + deleteOrDropAnExistingServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().delete("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersGetByResourceGroupSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersGetByResourceGroupSamples.java index 2022d7ad4685..79042f4faeee 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersGetByResourceGroupSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersGetByResourceGroupSamples.java @@ -10,44 +10,51 @@ public final class ServersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerGetWithPrivateEndpoints.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersGetWithPrivateEndpoints.json */ /** - * Sample code: ServerGetWithPrivateEndpoints. + * Sample code: Get information about an existing server that isn't integrated into a virtual network provided by + * customer and has private endpoint connections. * * @param manager Entry point to PostgreSqlManager. */ public static void - serverGetWithPrivateEndpoints(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().getByResourceGroupWithResponse("testrg", "pgtestsvc2", com.azure.core.util.Context.NONE); + getInformationAboutAnExistingServerThatIsnTIntegratedIntoAVirtualNetworkProvidedByCustomerAndHasPrivateEndpointConnections( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ServerGet + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersGetWithVnet * .json */ /** - * Sample code: ServerGet. + * Sample code: Get information about an existing server that is integrated into a virtual network provided by + * customer. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().getByResourceGroupWithResponse("testrg", "testpgflex", com.azure.core.util.Context.NONE); + public static void getInformationAboutAnExistingServerThatIsIntegratedIntoAVirtualNetworkProvidedByCustomer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerGetWithVnet.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersGet.json */ /** - * Sample code: ServerGetWithVnet. + * Sample code: Get information about an existing server. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverGetWithVnet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().getByResourceGroupWithResponse("testrg", "testpgflex", com.azure.core.util.Context.NONE); + public static void getInformationAboutAnExistingServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListByResourceGroupSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListByResourceGroupSamples.java index a00499c9a33e..c7864f1a402d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListByResourceGroupSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListByResourceGroupSamples.java @@ -10,16 +10,16 @@ public final class ServersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerListByResourceGroup.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersListByResourceGroup.json */ /** - * Sample code: ServerListByResourceGroup. + * Sample code: List all servers in a resource group. * * @param manager Entry point to PostgreSqlManager. */ public static void - serverListByResourceGroup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().listByResourceGroup("testrgn", com.azure.core.util.Context.NONE); + listAllServersInAResourceGroup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().listByResourceGroup("exampleresourcegroup", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListSamples.java index 5d95c0d67633..e715d1df9820 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListSamples.java @@ -10,15 +10,16 @@ public final class ServersListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerList.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersListBySubscription.json */ /** - * Sample code: ServerList. + * Sample code: List all servers in a subscription. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + listAllServersInASubscription(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.servers().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartSamples.java index 47965aed7b3c..4caca8d0d288 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartSamples.java @@ -13,33 +13,34 @@ public final class ServersRestartSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerRestart.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersRestartWithFailover.json */ /** - * Sample code: ServerRestart. + * Sample code: Restart PostgreSQL database engine in a server with a forced failover to standby server. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverRestart(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().restart("testrg", "testserver", null, com.azure.core.util.Context.NONE); + public static void restartPostgreSQLDatabaseEngineInAServerWithAForcedFailoverToStandbyServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers() + .restart("exampleresourcegroup", "exampleserver", + new RestartParameter().withRestartWithFailover(true).withFailoverMode(FailoverMode.FORCED_FAILOVER), + com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerRestartWithFailover.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersRestart. + * json */ /** - * Sample code: ServerRestartWithFailover. + * Sample code: Restart PostgreSQL database engine in a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - serverRestartWithFailover(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers() - .restart("testrg", "testserver", - new RestartParameter().withRestartWithFailover(true).withFailoverMode(FailoverMode.FORCED_FAILOVER), - com.azure.core.util.Context.NONE); + public static void restartPostgreSQLDatabaseEngineInAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().restart("exampleresourcegroup", "exampleserver", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartSamples.java index 55fadc31dcfb..693846408651 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartSamples.java @@ -10,15 +10,15 @@ public final class ServersStartSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerStart.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersStart.json */ /** - * Sample code: ServerStart. + * Sample code: Start a stopped server. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverStart(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().start("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void + startAStoppedServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().start("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopSamples.java index 7185755a2f11..80f6564cd943 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopSamples.java @@ -10,15 +10,14 @@ public final class ServersStopSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerStop.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersStop.json */ /** - * Sample code: ServerStop. + * Sample code: Stop a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverStop(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.servers().stop("testrg", "testserver", com.azure.core.util.Context.NONE); + public static void stopAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().stop("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersUpdateSamples.java index ba0715516b92..f77a1378a4ed 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersUpdateSamples.java @@ -4,22 +4,22 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAuthEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ArmServerKeyType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTiers; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForUpdate; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfigForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTier; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryptionType; import com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordAuthEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindowForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MicrosoftEntraAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordBasedAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.ReadReplicaPromoteMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ReadReplicaPromoteOption; import com.azure.resourcemanager.postgresqlflexibleserver.models.Replica; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationPromoteOption; import com.azure.resourcemanager.postgresqlflexibleserver.models.Server; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrow; @@ -34,223 +34,264 @@ public final class ServersUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdateWithDataEncryptionEnabled.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersPromoteReplicaAsForcedSwitchover.json */ /** - * Sample code: ServerUpdateWithDataEncryptionEnabled. + * Sample code: Switch over a read replica to primary server with forced data synchronization. Meaning that it + * doesn't wait for data in the read replica to be synchronized with its source server before it initiates the + * switching of roles between the read replica and the primary server. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdateWithDataEncryptionEnabled( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + switchOverAReadReplicaToPrimaryServerWithForcedDataSynchronizationMeaningThatItDoesnTWaitForDataInTheReadReplicaToBeSynchronizedWithItsSourceServerBeforeItInitiatesTheSwitchingOfRolesBetweenTheReadReplicaAndThePrimaryServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("TestGroup", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withSku(new Sku().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) - .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity", - new UserIdentity(), - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity", - new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) - .withAdministratorLoginPassword("newpassword") - .withBackup(new Backup().withBackupRetentionDays(20)) - .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") - .withPrimaryUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-usermanagedidentity") - .withGeoBackupKeyUri("fakeTokenPlaceholder") - .withGeoBackupUserAssignedIdentityId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-usermanagedidentity") - .withType(ArmServerKeyType.AZURE_KEY_VAULT)) - .withCreateMode(CreateModeForUpdate.UPDATE) + .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.SWITCHOVER) + .withPromoteOption(ReadReplicaPromoteOption.FORCED)) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PromoteReplicaAsPlannedSwitchover.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersPromoteReplicaAsPlannedSwitchover.json */ /** - * Sample code: SwitchOver a replica server as planned, i.e. it will wait for replication to complete before - * promoting replica as Primary and original primary as replica. + * Sample code: Switch over a read replica to primary server with planned data synchronization. Meaning that it + * waits for data in the read replica to be fully synchronized with its source server before it initiates the + * switching of roles between the read replica and the primary server. * * @param manager Entry point to PostgreSqlManager. */ public static void - switchOverAReplicaServerAsPlannedIEItWillWaitForReplicationToCompleteBeforePromotingReplicaAsPrimaryAndOriginalPrimaryAsReplica( + switchOverAReadReplicaToPrimaryServerWithPlannedDataSynchronizationMeaningThatItWaitsForDataInTheReadReplicaToBeFullySynchronizedWithItsSourceServerBeforeItInitiatesTheSwitchingOfRolesBetweenTheReadReplicaAndThePrimaryServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.SWITCHOVER) - .withPromoteOption(ReplicationPromoteOption.PLANNED)) + .withPromoteOption(ReadReplicaPromoteOption.PLANNED)) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PromoteReplicaAsForcedSwitchover.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithMicrosoftEntraEnabled.json */ /** - * Sample code: SwitchOver a replica server as forced, i.e. it will replica as Primary and original primary as - * replica immediately without waiting for primary and replica to be in sync. + * Sample code: Update an existing server with Microsoft Entra authentication enabled. * * @param manager Entry point to PostgreSqlManager. */ - public static void - switchOverAReplicaServerAsForcedIEItWillReplicaAsPrimaryAndOriginalPrimaryAsReplicaImmediatelyWithoutWaitingForPrimaryAndReplicaToBeInSync( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void updateAnExistingServerWithMicrosoftEntraAuthenticationEnabled( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.SWITCHOVER) - .withPromoteOption(ReplicationPromoteOption.FORCED)) + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLoginPassword("examplenewpassword") + .withStorage(new Storage().withStorageSizeGB(1024) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P30)) + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withAuthConfig(new AuthConfigForPatch().withActiveDirectoryAuth(MicrosoftEntraAuth.ENABLED) + .withPasswordAuth(PasswordBasedAuth.ENABLED) + .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) + .withCreateMode(CreateModeForPatch.UPDATE) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdate.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithDataEncryptionEnabledAutoUpdate.json */ /** - * Sample code: ServerUpdate. + * Sample code: Update an existing server with data encryption based on customer managed key with automatic key + * version update. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void updateAnExistingServerWithDataEncryptionBasedOnCustomerManagedKeyWithAutomaticKeyVersionUpdate( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("TestGroup", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withSku(new Sku().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLoginPassword("newpassword") - .withStorage(new Storage().withStorageSizeGB(1024) - .withAutoGrow(StorageAutoGrow.ENABLED) - .withTier(AzureManagedDiskPerformanceTiers.P30)) - .withBackup(new Backup().withBackupRetentionDays(20)) - .withCreateMode(CreateModeForUpdate.UPDATE) + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity", + new UserIdentity(), + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withAdministratorLoginPassword("examplenewpassword") + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withCreateMode(CreateModeForPatch.UPDATE) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdateWithMajorVersionUpgrade.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithMajorVersionUpgrade.json */ /** - * Sample code: ServerUpdateWithMajorVersionUpgrade. + * Sample code: Update an existing server to upgrade the major version of PostgreSQL database engine. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdateWithMajorVersionUpgrade( + public static void updateAnExistingServerToUpgradeTheMajorVersionOfPostgreSQLDatabaseEngine( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withVersion(ServerVersion.ONE_SIX).withCreateMode(CreateModeForUpdate.UPDATE).apply(); + resource.update().withVersion(PostgresMajorVersion.ONE_SEVEN).withCreateMode(CreateModeForPatch.UPDATE).apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdateWithCustomerMaintenanceWindow.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithCustomMaintenanceWindow.json */ /** - * Sample code: ServerUpdateWithCustomerMaintenanceWindow. + * Sample code: Update an existing server with custom maintenance window. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdateWithCustomerMaintenanceWindow( + public static void updateAnExistingServerWithCustomMaintenanceWindow( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withMaintenanceWindow(new MaintenanceWindow().withCustomWindow("Enabled") + .withMaintenanceWindow(new MaintenanceWindowForPatch().withCustomWindow("Enabled") .withStartHour(8) .withStartMinute(0) .withDayOfWeek(0)) - .withCreateMode(CreateModeForUpdate.UPDATE) + .withCreateMode(CreateModeForPatch.UPDATE) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * ServerUpdateWithMicrosoftEntraEnabled.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersUpdateWithDataEncryptionEnabled.json */ /** - * Sample code: ServerUpdateWithMicrosoftEntraEnabled. + * Sample code: Update an existing server with data encryption based on customer managed key. * * @param manager Entry point to PostgreSqlManager. */ - public static void serverUpdateWithMicrosoftEntraEnabled( + public static void updateAnExistingServerWithDataEncryptionBasedOnCustomerManagedKey( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("TestGroup", "pgtestsvc4", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withSku(new Sku().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLoginPassword("newpassword") + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withIdentity(new UserAssignedIdentity().withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity", + new UserIdentity(), + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity", + new UserIdentity())).withType(IdentityType.USER_ASSIGNED)) + .withAdministratorLoginPassword("examplenewpassword") + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withDataEncryption(new DataEncryption().withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity") + .withGeoBackupKeyUri("fakeTokenPlaceholder") + .withGeoBackupUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity") + .withType(DataEncryptionType.AZURE_KEY_VAULT)) + .withCreateMode(CreateModeForPatch.UPDATE) + .apply(); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersUpdate.json + */ + /** + * Sample code: Update an existing server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + updateAnExistingServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + Server resource = manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLoginPassword("examplenewpassword") .withStorage(new Storage().withStorageSizeGB(1024) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTiers.P30)) - .withBackup(new Backup().withBackupRetentionDays(20)) - .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(ActiveDirectoryAuthEnum.ENABLED) - .withPasswordAuth(PasswordAuthEnum.ENABLED) - .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) - .withCreateMode(CreateModeForUpdate.UPDATE) + .withAutoGrow(StorageAutoGrow.ENABLED) + .withTier(AzureManagedDiskPerformanceTier.P30)) + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withCreateMode(CreateModeForPatch.UPDATE) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PromoteReplicaAsForcedStandaloneServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersPromoteReplicaAsForcedStandaloneServer.json */ /** - * Sample code: Promote a replica server as a Standalone server as forced, i.e. it will promote a replica server - * immediately without waiting for primary and replica to be in sync. + * Sample code: Promote a read replica to a standalone server with forced data synchronization. Meaning that it + * doesn't wait for data in the read replica to be synchronized with its source server before it initiates the + * promotion to a standalone server. * * @param manager Entry point to PostgreSqlManager. */ public static void - promoteAReplicaServerAsAStandaloneServerAsForcedIEItWillPromoteAReplicaServerImmediatelyWithoutWaitingForPrimaryAndReplicaToBeInSync( + promoteAReadReplicaToAStandaloneServerWithForcedDataSynchronizationMeaningThatItDoesnTWaitForDataInTheReadReplicaToBeSynchronizedWithItsSourceServerBeforeItInitiatesThePromotionToAStandaloneServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.STANDALONE) - .withPromoteOption(ReplicationPromoteOption.FORCED)) + .withPromoteOption(ReadReplicaPromoteOption.FORCED)) .apply(); } /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * PromoteReplicaAsPlannedStandaloneServer.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * ServersPromoteReplicaAsPlannedStandaloneServer.json */ /** - * Sample code: Promote a replica server as a Standalone server as planned, i.e. it will wait for replication to - * complete. + * Sample code: Promote a read replica to a standalone server with planned data synchronization. Meaning that it + * waits for data in the read replica to be fully synchronized with its source server before it initiates the + * promotion to a standalone server. * * @param manager Entry point to PostgreSqlManager. */ - public static void promoteAReplicaServerAsAStandaloneServerAsPlannedIEItWillWaitForReplicationToComplete( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void + promoteAReadReplicaToAStandaloneServerWithPlannedDataSynchronizationMeaningThatItWaitsForDataInTheReadReplicaToBeFullySynchronizedWithItsSourceServerBeforeItInitiatesThePromotionToAStandaloneServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() - .getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withReplica(new Replica().withPromoteMode(ReadReplicaPromoteMode.STANDALONE) - .withPromoteOption(ReplicationPromoteOption.PLANNED)) + .withPromoteOption(ReadReplicaPromoteOption.PLANNED)) .apply(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationDisableSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationDisableSamples.java deleted file mode 100644 index f36a34096904..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationDisableSamples.java +++ /dev/null @@ -1,28 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * Samples for TuningConfiguration Disable. - */ -public final class TuningConfigurationDisableSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_Disable.json - */ - /** - * Sample code: TuningConfiguration_Disable. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - tuningConfigurationDisable(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .disable("testrg", "testserver", TuningOptionEnum.CONFIGURATION, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationEnableSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationEnableSamples.java deleted file mode 100644 index 52edc04a36bd..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationEnableSamples.java +++ /dev/null @@ -1,28 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * Samples for TuningConfiguration Enable. - */ -public final class TuningConfigurationEnableSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_Enable.json - */ - /** - * Sample code: TuningConfiguration_Enable. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - tuningConfigurationEnable(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .enable("testrg", "testserver", TuningOptionEnum.CONFIGURATION, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationListSessionDetailsSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationListSessionDetailsSamples.java deleted file mode 100644 index 546a4d3e1912..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationListSessionDetailsSamples.java +++ /dev/null @@ -1,29 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * Samples for TuningConfiguration ListSessionDetails. - */ -public final class TuningConfigurationListSessionDetailsSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_ListSessionDetails.json - */ - /** - * Sample code: TuningConfiguration_ListSessionDetails. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void tuningConfigurationListSessionDetails( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .listSessionDetails("testrg", "testserver", TuningOptionEnum.CONFIGURATION, - "oooooooo-oooo-oooo-oooo-oooooooooooo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationListSessionsSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationListSessionsSamples.java deleted file mode 100644 index dd6044b10b78..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationListSessionsSamples.java +++ /dev/null @@ -1,28 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * Samples for TuningConfiguration ListSessions. - */ -public final class TuningConfigurationListSessionsSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_ListSessions.json - */ - /** - * Sample code: TuningConfiguration_ListSessions. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - tuningConfigurationListSessions(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .listSessions("testrg", "testserver", TuningOptionEnum.CONFIGURATION, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationStartSessionSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationStartSessionSamples.java deleted file mode 100644 index 9509be701cfc..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationStartSessionSamples.java +++ /dev/null @@ -1,32 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigTuningRequestParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * Samples for TuningConfiguration StartSession. - */ -public final class TuningConfigurationStartSessionSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_StartSession.json - */ - /** - * Sample code: TuningConfiguration_StartSession. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - tuningConfigurationStartSession(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .startSession("testrg", "testserver", TuningOptionEnum.CONFIGURATION, - new ConfigTuningRequestParameter().withAllowServerRestarts(false) - .withTargetImprovementMetric("targetImprovementMetric"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationStopSessionSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationStopSessionSamples.java deleted file mode 100644 index 6d183f5bb366..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationStopSessionSamples.java +++ /dev/null @@ -1,28 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * Samples for TuningConfiguration StopSession. - */ -public final class TuningConfigurationStopSessionSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningConfiguration_StopSession.json - */ - /** - * Sample code: TuningConfiguration_StopSession. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - tuningConfigurationStopSession(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningConfigurations() - .stopSession("testrg", "testserver", TuningOptionEnum.CONFIGURATION, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningIndexListRecommendationsSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningIndexListRecommendationsSamples.java deleted file mode 100644 index 78119d315e35..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningIndexListRecommendationsSamples.java +++ /dev/null @@ -1,47 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * Samples for TuningIndex ListRecommendations. - */ -public final class TuningIndexListRecommendationsSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningIndex_GetFilteredRecommendations.json - */ - /** - * Sample code: TuningIndex_ListFilteredRecommendations. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void tuningIndexListFilteredRecommendations( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningIndexes() - .listRecommendations("testrg", "pgtestrecs", TuningOptionEnum.INDEX, RecommendationType.CREATE_INDEX, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * TuningIndex_GetRecommendations.json - */ - /** - * Sample code: TuningIndex_ListRecommendations. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - tuningIndexListRecommendations(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningIndexes() - .listRecommendations("testrg", "pgtestsvc4", TuningOptionEnum.INDEX, null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsGetSamples.java deleted file mode 100644 index 50f364ae79cc..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsGetSamples.java +++ /dev/null @@ -1,27 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; - -/** - * Samples for TuningOptions Get. - */ -public final class TuningOptionsGetSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Tuning_GetTuningOption.json - */ - /** - * Sample code: TuningOptions_Get. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void tuningOptionsGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningOptions() - .getWithResponse("testrg", "testserver", TuningOptionEnum.INDEX, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListByServerSamples.java deleted file mode 100644 index 1e241568361b..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListByServerSamples.java +++ /dev/null @@ -1,25 +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.resourcemanager.postgresqlflexibleserver.generated; - -/** - * Samples for TuningOptions ListByServer. - */ -public final class TuningOptionsListByServerSamples { - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * Tuning_ListTuningOptions.json - */ - /** - * Sample code: TuningOptions_ListByServer. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void - tuningOptionsListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.tuningOptions().listByServer("testrg", "testserver", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationGetSamples.java new file mode 100644 index 000000000000..084e694e58e8 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationGetSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; + +/** + * Samples for TuningOptionsOperation Get. + */ +public final class TuningOptionsOperationGetSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/TuningOptionsGet. + * json + */ + /** + * Sample code: Get the tuning options of a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + getTheTuningOptionsOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .getWithResponse("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.INDEX, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListByServerSamples.java new file mode 100644 index 000000000000..4cab630713c1 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListByServerSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for TuningOptionsOperation ListByServer. + */ +public final class TuningOptionsOperationListByServerSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListByServer.json + */ + /** + * Sample code: List the tuning options of a server. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void + listTheTuningOptionsOfAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListRecommendationsSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListRecommendationsSamples.java new file mode 100644 index 000000000000..5d281d530cdf --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListRecommendationsSamples.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; + +/** + * Samples for TuningOptionsOperation ListRecommendations. + */ +public final class TuningOptionsOperationListRecommendationsSamples { + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListIndexRecommendations.json + */ + /** + * Sample code: List available index recommendations. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listAvailableIndexRecommendations( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listRecommendations("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.INDEX, null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListTableRecommendations.json + */ + /** + * Sample code: List available table recommendations. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listAvailableTableRecommendations( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listRecommendations("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.TABLE, null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListIndexRecommendationsFilteredForCreateIndex.json + */ + /** + * Sample code: List available index recommendations, filtered to exclusively get those of CREATE INDEX type. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listAvailableIndexRecommendationsFilteredToExclusivelyGetThoseOfCREATEINDEXType( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listRecommendations("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.INDEX, + RecommendationTypeParameterEnum.CREATE_INDEX, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * TuningOptionsListTableRecommendationsFilteredForAnalyzeTable.json + */ + /** + * Sample code: List available table recommendations, filtered to exclusively get those of ANALYZE TABLE type. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void listAvailableTableRecommendationsFilteredToExclusivelyGetThoseOfANALYZETABLEType( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.tuningOptionsOperations() + .listRecommendations("exampleresourcegroup", "exampleserver", TuningOptionParameterEnum.TABLE, + RecommendationTypeParameterEnum.ANALYZE_TABLE, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateSamples.java index cc87c9e45078..eef8520b25e5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateSamples.java @@ -13,21 +13,21 @@ public final class VirtualEndpointsCreateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * VirtualEndpointCreate.json */ /** - * Sample code: Create a new virtual endpoint for a flexible server. + * Sample code: Create a pair of virtual endpoints for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void createANewVirtualEndpointForAFlexibleServer( + public static void createAPairOfVirtualEndpointsForAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.virtualEndpoints() - .define("pgVirtualEndpoint1") - .withExistingFlexibleServer("testrg", "pgtestsvc4") + .define("examplebasename") + .withExistingFlexibleServer("exampleresourcegroup", "exampleserver") .withEndpointType(VirtualEndpointType.READ_WRITE) - .withMembers(Arrays.asList("testPrimary1")) + .withMembers(Arrays.asList("exampleprimaryserver")) .create(); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsDeleteSamples.java index 1d93491f21b6..4ce11332d8b2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsDeleteSamples.java @@ -10,17 +10,17 @@ public final class VirtualEndpointsDeleteSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * VirtualEndpointDelete.json */ /** - * Sample code: Delete a virtual endpoint. + * Sample code: Delete a pair of virtual endpoints. * * @param manager Entry point to PostgreSqlManager. */ public static void - deleteAVirtualEndpoint(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + deleteAPairOfVirtualEndpoints(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.virtualEndpoints() - .delete("testrg", "pgtestsvc4", "pgVirtualEndpoint1", com.azure.core.util.Context.NONE); + .delete("exampleresourcegroup", "exampleserver", "examplebasename", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetSamples.java index 3e14be038bbf..4ec2297e6715 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetSamples.java @@ -10,17 +10,18 @@ public final class VirtualEndpointsGetSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * VirtualEndpointsGet.json */ /** - * Sample code: Get a virtual endpoint. + * Sample code: Get information about a pair of virtual endpoints. * * @param manager Entry point to PostgreSqlManager. */ - public static void - getAVirtualEndpoint(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void getInformationAboutAPairOfVirtualEndpoints( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.virtualEndpoints() - .getWithResponse("testrg", "pgtestsvc4", "pgVirtualEndpoint1", com.azure.core.util.Context.NONE); + .getWithResponse("exampleresourcegroup", "exampleserver", "examplebasename", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerSamples.java index 6b60ccf14627..b3bad9315212 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerSamples.java @@ -10,16 +10,17 @@ public final class VirtualEndpointsListByServerSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * VirtualEndpointsListByServer.json */ /** - * Sample code: VirtualEndpointListByServer. + * Sample code: List pair of virtual endpoints associated to a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void - virtualEndpointListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - manager.virtualEndpoints().listByServer("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE); + public static void listPairOfVirtualEndpointsAssociatedToAServer( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.virtualEndpoints() + .listByServer("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsUpdateSamples.java index a72338b64c50..363f44e1ae17 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsUpdateSamples.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.postgresqlflexibleserver.generated; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResource; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoint; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; import java.util.Arrays; @@ -14,22 +14,23 @@ public final class VirtualEndpointsUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ * VirtualEndpointUpdate.json */ /** - * Sample code: Update a virtual endpoint for a server to update the. + * Sample code: Update a pair of virtual endpoints for a server. * * @param manager Entry point to PostgreSqlManager. */ - public static void updateAVirtualEndpointForAServerToUpdateThe( + public static void updateAPairOfVirtualEndpointsForAServer( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - VirtualEndpointResource resource = manager.virtualEndpoints() - .getWithResponse("testrg", "pgtestsvc4", "pgVirtualEndpoint1", com.azure.core.util.Context.NONE) + VirtualEndpoint resource = manager.virtualEndpoints() + .getWithResponse("exampleresourcegroup", "exampleserver", "examplebasename", + com.azure.core.util.Context.NONE) .getValue(); resource.update() .withEndpointType(VirtualEndpointType.READ_WRITE) - .withMembers(Arrays.asList("testReplica1")) + .withMembers(Arrays.asList("exampleprimaryserver")) .apply(); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageExecuteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageListSamples.java similarity index 50% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageExecuteSamples.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageListSamples.java index 383d56df2a30..e8bcce758553 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageExecuteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageListSamples.java @@ -7,24 +7,24 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; /** - * Samples for VirtualNetworkSubnetUsage Execute. + * Samples for VirtualNetworkSubnetUsage List. */ -public final class VirtualNetworkSubnetUsageExecuteSamples { +public final class VirtualNetworkSubnetUsageListSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2025-01-01-preview/examples/ - * VirtualNetworkSubnetUsage.json + * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ + * VirtualNetworkSubnetUsageList.json */ /** - * Sample code: VirtualNetworkSubnetUsageList. + * Sample code: List the virtual network subnet usage for a given virtual network. * * @param manager Entry point to PostgreSqlManager. */ - public static void - virtualNetworkSubnetUsageList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + public static void listTheVirtualNetworkSubnetUsageForAGivenVirtualNetwork( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { manager.virtualNetworkSubnetUsages() - .executeWithResponse("westus", new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId( - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/testvnet"), + .listWithResponse("eastus", new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManagerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManagerTests.java index b6d5139c6d59..87536bb94d99 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManagerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManagerTests.java @@ -13,20 +13,20 @@ import com.azure.core.test.annotation.LiveOnly; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryptionType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MicrosoftEntraAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordBasedAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.test.utils.TestUtilities; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAuthEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ArmServerKeyType; import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig; import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption; -import com.azure.resourcemanager.postgresqlflexibleserver.models.GeoRedundantBackupEnum; import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode; import com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordAuthEnum; import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationRole; import com.azure.resourcemanager.postgresqlflexibleserver.models.Server; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; @@ -98,16 +98,16 @@ public void testCreateServer() { .withAdministratorLogin(adminName) .withAdministratorLoginPassword(adminPwd) .withSku(new Sku().withName("Standard_D2ds_v4").withTier(SkuTier.GENERAL_PURPOSE)) - .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(ActiveDirectoryAuthEnum.DISABLED) - .withPasswordAuth(PasswordAuthEnum.ENABLED)) + .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(MicrosoftEntraAuth.DISABLED) + .withPasswordAuth(PasswordBasedAuth.ENABLED)) .withIdentity(new UserAssignedIdentity().withType(IdentityType.NONE)) - .withDataEncryption(new DataEncryption().withType(ArmServerKeyType.SYSTEM_MANAGED)) - .withVersion(ServerVersion.ONE_FOUR) + .withDataEncryption(new DataEncryption().withType(DataEncryptionType.SYSTEM_MANAGED)) + .withVersion(PostgresMajorVersion.ONE_FOUR) .withAvailabilityZone("2") .withStorage(new Storage().withStorageSizeGB(128)) - .withBackup( - new Backup().withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED).withBackupRetentionDays(7)) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.DISABLED)) + .withBackup(new Backup().withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED) + .withBackupRetentionDays(7)) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.SAME_ZONE)) .withReplicationRole(ReplicationRole.PRIMARY) .create(); // @embedmeEnd diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraAddTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraAddTests.java new file mode 100644 index 000000000000..5bf630cde256 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraAddTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntraAdd; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; +import org.junit.jupiter.api.Assertions; + +public final class AdministratorMicrosoftEntraAddTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdministratorMicrosoftEntraAdd model = BinaryData + .fromString( + "{\"properties\":{\"principalType\":\"Unknown\",\"principalName\":\"uv\",\"tenantId\":\"xpyb\"}}") + .toObject(AdministratorMicrosoftEntraAdd.class); + Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); + Assertions.assertEquals("uv", model.principalName()); + Assertions.assertEquals("xpyb", model.tenantId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdministratorMicrosoftEntraAdd model + = new AdministratorMicrosoftEntraAdd().withPrincipalType(PrincipalType.UNKNOWN) + .withPrincipalName("uv") + .withTenantId("xpyb"); + model = BinaryData.fromObject(model).toObject(AdministratorMicrosoftEntraAdd.class); + Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); + Assertions.assertEquals("uv", model.principalName()); + Assertions.assertEquals("xpyb", model.tenantId()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraInnerTests.java new file mode 100644 index 000000000000..845bbf348fe2 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraInnerTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; +import org.junit.jupiter.api.Assertions; + +public final class AdministratorMicrosoftEntraInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdministratorMicrosoftEntraInner model = BinaryData.fromString( + "{\"properties\":{\"principalType\":\"Unknown\",\"principalName\":\"msxaobhd\",\"objectId\":\"mtqio\",\"tenantId\":\"zehtbmu\"},\"id\":\"ownoizhw\",\"name\":\"rxybqsoq\",\"type\":\"jgkdmbpazlobcu\"}") + .toObject(AdministratorMicrosoftEntraInner.class); + Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); + Assertions.assertEquals("msxaobhd", model.principalName()); + Assertions.assertEquals("mtqio", model.objectId()); + Assertions.assertEquals("zehtbmu", model.tenantId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdministratorMicrosoftEntraInner model + = new AdministratorMicrosoftEntraInner().withPrincipalType(PrincipalType.UNKNOWN) + .withPrincipalName("msxaobhd") + .withObjectId("mtqio") + .withTenantId("zehtbmu"); + model = BinaryData.fromObject(model).toObject(AdministratorMicrosoftEntraInner.class); + Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); + Assertions.assertEquals("msxaobhd", model.principalName()); + Assertions.assertEquals("mtqio", model.objectId()); + Assertions.assertEquals("zehtbmu", model.tenantId()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraListTests.java new file mode 100644 index 000000000000..4b5d83469b18 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraListTests.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntraList; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AdministratorMicrosoftEntraListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdministratorMicrosoftEntraList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"principalType\":\"User\",\"principalName\":\"xrifkwmrvkts\",\"objectId\":\"nt\",\"tenantId\":\"ipa\"},\"id\":\"ajpsquc\",\"name\":\"poyfdkfogkn\",\"type\":\"gjofjd\"},{\"properties\":{\"principalType\":\"Unknown\",\"principalName\":\"rd\",\"objectId\":\"pewnw\",\"tenantId\":\"itjz\"},\"id\":\"lusarh\",\"name\":\"ofcqhsm\",\"type\":\"urkdtmlx\"},{\"properties\":{\"principalType\":\"Group\",\"principalName\":\"k\",\"objectId\":\"txukcdmp\",\"tenantId\":\"cryuan\"},\"id\":\"uxzdxtay\",\"name\":\"lhmwhfpmrqobm\",\"type\":\"u\"},{\"properties\":{\"principalType\":\"User\",\"principalName\":\"yrtih\",\"objectId\":\"tijbpzvgnwzsymgl\",\"tenantId\":\"fcyzkohdbihanufh\"},\"id\":\"bj\",\"name\":\"s\",\"type\":\"git\"}],\"nextLink\":\"qhabifpikxwcz\"}") + .toObject(AdministratorMicrosoftEntraList.class); + Assertions.assertEquals(PrincipalType.USER, model.value().get(0).principalType()); + Assertions.assertEquals("xrifkwmrvkts", model.value().get(0).principalName()); + Assertions.assertEquals("nt", model.value().get(0).objectId()); + Assertions.assertEquals("ipa", model.value().get(0).tenantId()); + Assertions.assertEquals("qhabifpikxwcz", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdministratorMicrosoftEntraList model = new AdministratorMicrosoftEntraList().withValue(Arrays.asList( + new AdministratorMicrosoftEntraInner().withPrincipalType(PrincipalType.USER) + .withPrincipalName("xrifkwmrvkts") + .withObjectId("nt") + .withTenantId("ipa"), + new AdministratorMicrosoftEntraInner().withPrincipalType(PrincipalType.UNKNOWN) + .withPrincipalName("rd") + .withObjectId("pewnw") + .withTenantId("itjz"), + new AdministratorMicrosoftEntraInner().withPrincipalType(PrincipalType.GROUP) + .withPrincipalName("k") + .withObjectId("txukcdmp") + .withTenantId("cryuan"), + new AdministratorMicrosoftEntraInner().withPrincipalType(PrincipalType.USER) + .withPrincipalName("yrtih") + .withObjectId("tijbpzvgnwzsymgl") + .withTenantId("fcyzkohdbihanufh"))) + .withNextLink("qhabifpikxwcz"); + model = BinaryData.fromObject(model).toObject(AdministratorMicrosoftEntraList.class); + Assertions.assertEquals(PrincipalType.USER, model.value().get(0).principalType()); + Assertions.assertEquals("xrifkwmrvkts", model.value().get(0).principalName()); + Assertions.assertEquals("nt", model.value().get(0).objectId()); + Assertions.assertEquals("ipa", model.value().get(0).tenantId()); + Assertions.assertEquals("qhabifpikxwcz", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesForAddTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesForAddTests.java new file mode 100644 index 000000000000..9a518322d7bf --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesForAddTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraPropertiesForAdd; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; +import org.junit.jupiter.api.Assertions; + +public final class AdministratorMicrosoftEntraPropertiesForAddTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdministratorMicrosoftEntraPropertiesForAdd model = BinaryData + .fromString( + "{\"principalType\":\"Unknown\",\"principalName\":\"hmtzopbsphrup\",\"tenantId\":\"gsybbejhp\"}") + .toObject(AdministratorMicrosoftEntraPropertiesForAdd.class); + Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); + Assertions.assertEquals("hmtzopbsphrup", model.principalName()); + Assertions.assertEquals("gsybbejhp", model.tenantId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdministratorMicrosoftEntraPropertiesForAdd model + = new AdministratorMicrosoftEntraPropertiesForAdd().withPrincipalType(PrincipalType.UNKNOWN) + .withPrincipalName("hmtzopbsphrup") + .withTenantId("gsybbejhp"); + model = BinaryData.fromObject(model).toObject(AdministratorMicrosoftEntraPropertiesForAdd.class); + Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); + Assertions.assertEquals("hmtzopbsphrup", model.principalName()); + Assertions.assertEquals("gsybbejhp", model.tenantId()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesTests.java new file mode 100644 index 000000000000..c97133beb0b5 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraProperties; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; +import org.junit.jupiter.api.Assertions; + +public final class AdministratorMicrosoftEntraPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdministratorMicrosoftEntraProperties model = BinaryData.fromString( + "{\"principalType\":\"Group\",\"principalName\":\"nrbtcqqjnq\",\"objectId\":\"hqgnufooojywif\",\"tenantId\":\"esaagdfm\"}") + .toObject(AdministratorMicrosoftEntraProperties.class); + Assertions.assertEquals(PrincipalType.GROUP, model.principalType()); + Assertions.assertEquals("nrbtcqqjnq", model.principalName()); + Assertions.assertEquals("hqgnufooojywif", model.objectId()); + Assertions.assertEquals("esaagdfm", model.tenantId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdministratorMicrosoftEntraProperties model + = new AdministratorMicrosoftEntraProperties().withPrincipalType(PrincipalType.GROUP) + .withPrincipalName("nrbtcqqjnq") + .withObjectId("hqgnufooojywif") + .withTenantId("esaagdfm"); + model = BinaryData.fromObject(model).toObject(AdministratorMicrosoftEntraProperties.class); + Assertions.assertEquals(PrincipalType.GROUP, model.principalType()); + Assertions.assertEquals("nrbtcqqjnq", model.principalName()); + Assertions.assertEquals("hqgnufooojywif", model.objectId()); + Assertions.assertEquals("esaagdfm", model.tenantId()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsDeleteMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsDeleteMockTests.java deleted file mode 100644 index 00d6cccbf39a..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsDeleteMockTests.java +++ /dev/null @@ -1,33 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AdministratorsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.administrators().delete("eqw", "gp", "bu", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsCreateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasCreateOrUpdateMockTests.java similarity index 58% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsCreateMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasCreateOrUpdateMockTests.java index 973c838e9bbd..34dca5f9eff5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsCreateMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasCreateOrUpdateMockTests.java @@ -10,7 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministrator; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntra; import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class AdministratorsCreateMockTests { +public final class AdministratorsMicrosoftEntrasCreateOrUpdateMockTests { @Test - public void testCreate() throws Exception { + public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"principalType\":\"Unknown\",\"principalName\":\"tuodxeszabbelaw\",\"objectId\":\"ua\",\"tenantId\":\"zkwrrwoyc\"},\"id\":\"cwyhahno\",\"name\":\"drkywuhps\",\"type\":\"fuurutlwexx\"}"; + = "{\"properties\":{\"principalType\":\"Group\",\"principalName\":\"eaahhvjhhn\",\"objectId\":\"zybbj\",\"tenantId\":\"dj\"},\"id\":\"yxkyxvx\",\"name\":\"vblbjednljlageua\",\"type\":\"lxunsmjbnkppxy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,17 +31,17 @@ public void testCreate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ActiveDirectoryAdministrator response = manager.administrators() - .define("hmkdasvfl") - .withExistingFlexibleServer("uwwltvuqjctz", "nkeifz") - .withPrincipalType(PrincipalType.GROUP) - .withPrincipalName("udchxgsrboldforo") - .withTenantId("jlvizbfhfovva") + AdministratorMicrosoftEntra response = manager.administratorsMicrosoftEntras() + .define("xakjsqzhzb") + .withExistingFlexibleServer("omfaj", "wasqvdaeyyg") + .withPrincipalType(PrincipalType.UNKNOWN) + .withPrincipalName("msidxasicddyvv") + .withTenantId("kgfmocwahpq") .create(); - Assertions.assertEquals(PrincipalType.UNKNOWN, response.principalType()); - Assertions.assertEquals("tuodxeszabbelaw", response.principalName()); - Assertions.assertEquals("ua", response.objectId()); - Assertions.assertEquals("zkwrrwoyc", response.tenantId()); + Assertions.assertEquals(PrincipalType.GROUP, response.principalType()); + Assertions.assertEquals("eaahhvjhhn", response.principalName()); + Assertions.assertEquals("zybbj", response.objectId()); + Assertions.assertEquals("dj", response.tenantId()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasGetWithResponseMockTests.java similarity index 64% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsGetWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasGetWithResponseMockTests.java index 6c27bb75e383..a423ac18ec27 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasGetWithResponseMockTests.java @@ -10,7 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministrator; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntra; import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class AdministratorsGetWithResponseMockTests { +public final class AdministratorsMicrosoftEntrasGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"principalType\":\"Group\",\"principalName\":\"xpdlcgqlsis\",\"objectId\":\"qfrddgam\",\"tenantId\":\"hiosrsjuiv\"},\"id\":\"disyirnxz\",\"name\":\"czexrxzbujrtrhqv\",\"type\":\"revkhgnlnzo\"}"; + = "{\"properties\":{\"principalType\":\"User\",\"principalName\":\"iv\",\"objectId\":\"oyzunbixxr\",\"tenantId\":\"kvcpwpgclr\"},\"id\":\"vtsoxf\",\"name\":\"kenx\",\"type\":\"m\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ActiveDirectoryAdministrator response = manager.administrators() - .getWithResponse("qwyxebeybpm", "znrtffyaqit", "hheioqaqhvseuf", com.azure.core.util.Context.NONE) + AdministratorMicrosoftEntra response = manager.administratorsMicrosoftEntras() + .getWithResponse("qzdz", "tilaxh", "fhqlyvi", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(PrincipalType.GROUP, response.principalType()); - Assertions.assertEquals("xpdlcgqlsis", response.principalName()); - Assertions.assertEquals("qfrddgam", response.objectId()); - Assertions.assertEquals("hiosrsjuiv", response.tenantId()); + Assertions.assertEquals(PrincipalType.USER, response.principalType()); + Assertions.assertEquals("iv", response.principalName()); + Assertions.assertEquals("oyzunbixxr", response.objectId()); + Assertions.assertEquals("kvcpwpgclr", response.tenantId()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasListByServerMockTests.java similarity index 66% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsListByServerMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasListByServerMockTests.java index 0718ba74ac17..6242a523c14e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasListByServerMockTests.java @@ -11,7 +11,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministrator; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntra; import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -19,11 +19,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class AdministratorsListByServerMockTests { +public final class AdministratorsMicrosoftEntrasListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"principalType\":\"ServicePrincipal\",\"principalName\":\"jkv\",\"objectId\":\"ljeamu\",\"tenantId\":\"zmlovuanash\"},\"id\":\"lpmjerb\",\"name\":\"kelvidizozsdb\",\"type\":\"cxjmonfdgnwncyp\"}]}"; + = "{\"value\":[{\"properties\":{\"principalType\":\"Group\",\"principalName\":\"bnpqfrtqlkzme\",\"objectId\":\"itgvkx\",\"tenantId\":\"yqdrf\"},\"id\":\"cealzxwh\",\"name\":\"ansym\",\"type\":\"yqhlwigdivbkbx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testListByServer() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.administrators().listByServer("zlrpiqywncvj", "szcofizeht", com.azure.core.util.Context.NONE); + PagedIterable response = manager.administratorsMicrosoftEntras() + .listByServer("yefrpmpdnqqska", "ao", com.azure.core.util.Context.NONE); - Assertions.assertEquals(PrincipalType.SERVICE_PRINCIPAL, response.iterator().next().principalType()); - Assertions.assertEquals("jkv", response.iterator().next().principalName()); - Assertions.assertEquals("ljeamu", response.iterator().next().objectId()); - Assertions.assertEquals("zmlovuanash", response.iterator().next().tenantId()); + Assertions.assertEquals(PrincipalType.GROUP, response.iterator().next().principalType()); + Assertions.assertEquals("bnpqfrtqlkzme", response.iterator().next().principalName()); + Assertions.assertEquals("itgvkx", response.iterator().next().objectId()); + Assertions.assertEquals("yqdrf", response.iterator().next().tenantId()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetWithResponseMockTests.java similarity index 72% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsGetWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetWithResponseMockTests.java index d1c62205ea0e..2291983321cb 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetWithResponseMockTests.java @@ -10,7 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettingsModel; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettingsModel; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState; import java.nio.charset.StandardCharsets; @@ -19,11 +19,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class ServerThreatProtectionSettingsGetWithResponseMockTests { +public final class AdvancedThreatProtectionSettingsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"state\":\"Disabled\",\"creationTime\":\"2021-06-09T03:17:06Z\"},\"id\":\"yqyybxubmdna\",\"name\":\"cbq\",\"type\":\"remj\"}"; + = "{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-06-22T06:39:41Z\"},\"id\":\"ibabxvititvtzeex\",\"name\":\"vo\",\"type\":\"tfgle\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,10 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ServerThreatProtectionSettingsModel response = manager.serverThreatProtectionSettings() - .getWithResponse("qthwmgnmbscbb", "igdhxiidlo", ThreatProtectionName.DEFAULT, - com.azure.core.util.Context.NONE) + AdvancedThreatProtectionSettingsModel response = manager.advancedThreatProtectionSettings() + .getWithResponse("eesvecu", "jpxtxsuwprtuj", ThreatProtectionName.DEFAULT, com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(ThreatProtectionState.DISABLED, response.state()); + Assertions.assertEquals(ThreatProtectionState.ENABLED, response.state()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerMockTests.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsListByServerMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerMockTests.java index c718255997cd..f3f16f405260 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerMockTests.java @@ -11,7 +11,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettingsModel; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettingsModel; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -19,11 +19,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class ServerThreatProtectionSettingsListByServerMockTests { +public final class AdvancedThreatProtectionSettingsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-02-14T18:09:59Z\"},\"id\":\"oawjqoyueay\",\"name\":\"bpcms\",\"type\":\"lbyrru\"}]}"; + = "{\"value\":[{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-06-20T13:46:53Z\"},\"id\":\"ymerteeammxq\",\"name\":\"ekkkzd\",\"type\":\"rtkgdojbmxvavref\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testListByServer() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.serverThreatProtectionSettings() - .listByServer("sgl", "rczezkhhlt", com.azure.core.util.Context.NONE); + PagedIterable response = manager.advancedThreatProtectionSettings() + .listByServer("enlsvxeizzgwkln", "rmffeyc", com.azure.core.util.Context.NONE); Assertions.assertEquals(ThreatProtectionState.ENABLED, response.iterator().next().state()); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListTests.java new file mode 100644 index 000000000000..31106f8a6ba6 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettingsList; +import org.junit.jupiter.api.Assertions; + +public final class AdvancedThreatProtectionSettingsListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdvancedThreatProtectionSettingsList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-02-24T21:11:33Z\"},\"id\":\"uhivyqniw\",\"name\":\"ybrk\",\"type\":\"vd\"},{\"properties\":{\"state\":\"Disabled\",\"creationTime\":\"2021-10-08T05:03:40Z\"},\"id\":\"fwvuk\",\"name\":\"gaudcc\",\"type\":\"nhsjcnyej\"},{\"properties\":{\"state\":\"Disabled\",\"creationTime\":\"2021-10-13T18:09:40Z\"},\"id\":\"napczwlokjy\",\"name\":\"mkkvnip\",\"type\":\"oxzjnchgejspod\"}],\"nextLink\":\"ilzyd\"}") + .toObject(AdvancedThreatProtectionSettingsList.class); + Assertions.assertEquals("ilzyd", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdvancedThreatProtectionSettingsList model = new AdvancedThreatProtectionSettingsList().withNextLink("ilzyd"); + model = BinaryData.fromObject(model).toObject(AdvancedThreatProtectionSettingsList.class); + Assertions.assertEquals("ilzyd", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsModelInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsModelInnerTests.java new file mode 100644 index 000000000000..8128cb3ea365 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsModelInnerTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState; +import org.junit.jupiter.api.Assertions; + +public final class AdvancedThreatProtectionSettingsModelInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdvancedThreatProtectionSettingsModelInner model = BinaryData.fromString( + "{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-01-09T01:59:33Z\"},\"id\":\"ahuxinpm\",\"name\":\"njaqwixjspro\",\"type\":\"vcputegj\"}") + .toObject(AdvancedThreatProtectionSettingsModelInner.class); + Assertions.assertEquals(ThreatProtectionState.ENABLED, model.state()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdvancedThreatProtectionSettingsModelInner model + = new AdvancedThreatProtectionSettingsModelInner().withState(ThreatProtectionState.ENABLED); + model = BinaryData.fromObject(model).toObject(AdvancedThreatProtectionSettingsModelInner.class); + Assertions.assertEquals(ThreatProtectionState.ENABLED, model.state()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsPropertiesTests.java new file mode 100644 index 000000000000..fe5af36aec36 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsProperties; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState; +import org.junit.jupiter.api.Assertions; + +public final class AdvancedThreatProtectionSettingsPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AdvancedThreatProtectionSettingsProperties model + = BinaryData.fromString("{\"state\":\"Disabled\",\"creationTime\":\"2021-06-23T09:15:06Z\"}") + .toObject(AdvancedThreatProtectionSettingsProperties.class); + Assertions.assertEquals(ThreatProtectionState.DISABLED, model.state()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AdvancedThreatProtectionSettingsProperties model + = new AdvancedThreatProtectionSettingsProperties().withState(ThreatProtectionState.DISABLED); + model = BinaryData.fromObject(model).toObject(AdvancedThreatProtectionSettingsProperties.class); + Assertions.assertEquals(ThreatProtectionState.DISABLED, model.state()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandInnerTests.java new file mode 100644 index 000000000000..0e466aff4ea8 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandInnerTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class BackupAutomaticAndOnDemandInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupAutomaticAndOnDemandInner model = BinaryData.fromString( + "{\"properties\":{\"backupType\":\"Full\",\"completedTime\":\"2021-09-13T14:44:26Z\",\"source\":\"dvpjhulsuuvmk\"},\"id\":\"zkrwfn\",\"name\":\"iodjp\",\"type\":\"lwejdpv\"}") + .toObject(BackupAutomaticAndOnDemandInner.class); + Assertions.assertEquals(BackupType.FULL, model.backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T14:44:26Z"), model.completedTime()); + Assertions.assertEquals("dvpjhulsuuvmk", model.source()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupAutomaticAndOnDemandInner model = new BackupAutomaticAndOnDemandInner().withBackupType(BackupType.FULL) + .withCompletedTime(OffsetDateTime.parse("2021-09-13T14:44:26Z")) + .withSource("dvpjhulsuuvmk"); + model = BinaryData.fromObject(model).toObject(BackupAutomaticAndOnDemandInner.class); + Assertions.assertEquals(BackupType.FULL, model.backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T14:44:26Z"), model.completedTime()); + Assertions.assertEquals("dvpjhulsuuvmk", model.source()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandListTests.java new file mode 100644 index 000000000000..f149153d8b18 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandListTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupAutomaticAndOnDemandList; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BackupAutomaticAndOnDemandListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupAutomaticAndOnDemandList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"backupType\":\"Full\",\"completedTime\":\"2021-10-01T21:39:25Z\",\"source\":\"fdfdosygexpa\"},\"id\":\"akhmsbzjhcrz\",\"name\":\"vdphlxaolthqtr\",\"type\":\"qjbpfzfsin\"}],\"nextLink\":\"v\"}") + .toObject(BackupAutomaticAndOnDemandList.class); + Assertions.assertEquals(BackupType.FULL, model.value().get(0).backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-01T21:39:25Z"), model.value().get(0).completedTime()); + Assertions.assertEquals("fdfdosygexpa", model.value().get(0).source()); + Assertions.assertEquals("v", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupAutomaticAndOnDemandList model = new BackupAutomaticAndOnDemandList() + .withValue(Arrays.asList(new BackupAutomaticAndOnDemandInner().withBackupType(BackupType.FULL) + .withCompletedTime(OffsetDateTime.parse("2021-10-01T21:39:25Z")) + .withSource("fdfdosygexpa"))) + .withNextLink("v"); + model = BinaryData.fromObject(model).toObject(BackupAutomaticAndOnDemandList.class); + Assertions.assertEquals(BackupType.FULL, model.value().get(0).backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-01T21:39:25Z"), model.value().get(0).completedTime()); + Assertions.assertEquals("fdfdosygexpa", model.value().get(0).source()); + Assertions.assertEquals("v", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandPropertiesTests.java new file mode 100644 index 000000000000..c065ac61d19a --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandPropertiesTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandProperties; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class BackupAutomaticAndOnDemandPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupAutomaticAndOnDemandProperties model = BinaryData.fromString( + "{\"backupType\":\"Customer On-Demand\",\"completedTime\":\"2021-02-03T13:19:32Z\",\"source\":\"soacctazakl\"}") + .toObject(BackupAutomaticAndOnDemandProperties.class); + Assertions.assertEquals(BackupType.CUSTOMER_ON_DEMAND, model.backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-03T13:19:32Z"), model.completedTime()); + Assertions.assertEquals("soacctazakl", model.source()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupAutomaticAndOnDemandProperties model + = new BackupAutomaticAndOnDemandProperties().withBackupType(BackupType.CUSTOMER_ON_DEMAND) + .withCompletedTime(OffsetDateTime.parse("2021-02-03T13:19:32Z")) + .withSource("soacctazakl"); + model = BinaryData.fromObject(model).toObject(BackupAutomaticAndOnDemandProperties.class); + Assertions.assertEquals(BackupType.CUSTOMER_ON_DEMAND, model.backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-03T13:19:32Z"), model.completedTime()); + Assertions.assertEquals("soacctazakl", model.source()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupForPatchTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupForPatchTests.java new file mode 100644 index 000000000000..96ab7bdc0a6a --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupForPatchTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackup; +import org.junit.jupiter.api.Assertions; + +public final class BackupForPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupForPatch model = BinaryData.fromString( + "{\"backupRetentionDays\":704877183,\"geoRedundantBackup\":\"Disabled\",\"earliestRestoreDate\":\"2021-01-17T07:38:08Z\"}") + .toObject(BackupForPatch.class); + Assertions.assertEquals(704877183, model.backupRetentionDays()); + Assertions.assertEquals(GeographicallyRedundantBackup.DISABLED, model.geoRedundantBackup()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupForPatch model = new BackupForPatch().withBackupRetentionDays(704877183) + .withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED); + model = BinaryData.fromObject(model).toObject(BackupForPatch.class); + Assertions.assertEquals(704877183, model.backupRetentionDays()); + Assertions.assertEquals(GeographicallyRedundantBackup.DISABLED, model.geoRedundantBackup()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupRequestBaseTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupRequestBaseTests.java new file mode 100644 index 000000000000..395ff65bc1e6 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupRequestBaseTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupRequestBase; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; +import org.junit.jupiter.api.Assertions; + +public final class BackupRequestBaseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupRequestBase model = BinaryData.fromString("{\"backupSettings\":{\"backupName\":\"kbogqxndlkzgx\"}}") + .toObject(BackupRequestBase.class); + Assertions.assertEquals("kbogqxndlkzgx", model.backupSettings().backupName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupRequestBase model + = new BackupRequestBase().withBackupSettings(new BackupSettings().withBackupName("kbogqxndlkzgx")); + model = BinaryData.fromObject(model).toObject(BackupRequestBase.class); + Assertions.assertEquals("kbogqxndlkzgx", model.backupSettings().backupName()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupSettingsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupSettingsTests.java new file mode 100644 index 000000000000..7941c85d35e6 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupSettingsTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; +import org.junit.jupiter.api.Assertions; + +public final class BackupSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupSettings model + = BinaryData.fromString("{\"backupName\":\"uriplbpodxunkb\"}").toObject(BackupSettings.class); + Assertions.assertEquals("uriplbpodxunkb", model.backupName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupSettings model = new BackupSettings().withBackupName("uriplbpodxunkb"); + model = BinaryData.fromObject(model).toObject(BackupSettings.class); + Assertions.assertEquals("uriplbpodxunkb", model.backupName()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupStoreDetailsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupStoreDetailsTests.java new file mode 100644 index 000000000000..8318533b93f5 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupStoreDetailsTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupStoreDetails; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BackupStoreDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupStoreDetails model + = BinaryData.fromString("{\"sasUriList\":[\"wlauwzizxbmpg\"]}").toObject(BackupStoreDetails.class); + Assertions.assertEquals("wlauwzizxbmpg", model.sasUriList().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupStoreDetails model = new BackupStoreDetails().withSasUriList(Arrays.asList("wlauwzizxbmpg")); + model = BinaryData.fromObject(model).toObject(BackupStoreDetails.class); + Assertions.assertEquals("wlauwzizxbmpg", model.sasUriList().get(0)); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupTests.java new file mode 100644 index 000000000000..dfd8ee9ac090 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackup; +import org.junit.jupiter.api.Assertions; + +public final class BackupTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Backup model = BinaryData.fromString( + "{\"backupRetentionDays\":1112510482,\"geoRedundantBackup\":\"Disabled\",\"earliestRestoreDate\":\"2021-10-31T10:15:37Z\"}") + .toObject(Backup.class); + Assertions.assertEquals(1112510482, model.backupRetentionDays()); + Assertions.assertEquals(GeographicallyRedundantBackup.DISABLED, model.geoRedundantBackup()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Backup model = new Backup().withBackupRetentionDays(1112510482) + .withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED); + model = BinaryData.fromObject(model).toObject(Backup.class); + Assertions.assertEquals(1112510482, model.backupRetentionDays()); + Assertions.assertEquals(GeographicallyRedundantBackup.DISABLED, model.geoRedundantBackup()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsCreateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsCreateMockTests.java similarity index 68% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsCreateMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsCreateMockTests.java index dca992549738..ddee7d2f3fa9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsCreateMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsCreateMockTests.java @@ -10,19 +10,19 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Origin; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerBackup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupAutomaticAndOnDemand; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class BackupsCreateMockTests { +public final class BackupsAutomaticAndOnDemandsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"backupType\":\"Customer On-Demand\",\"completedTime\":\"2021-02-19T23:36:25Z\",\"source\":\"rkcxkj\"},\"id\":\"nxm\",\"name\":\"suxswqrntvlwijp\",\"type\":\"ttexoqqpwcyyufmh\"}"; + = "{\"properties\":{\"backupType\":\"Customer On-Demand\",\"completedTime\":\"2021-11-19T03:35:41Z\",\"source\":\"nrzvuljraaer\"},\"id\":\"okqgukkjq\",\"name\":\"vbroylaxxu\",\"type\":\"cdisd\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testCreate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ServerBackup response - = manager.backups().create("lalniex", "srzpgepqtybbww", "gdakchz", com.azure.core.util.Context.NONE); + BackupAutomaticAndOnDemand response + = manager.backupsAutomaticAndOnDemands().create("nac", "cc", "knh", com.azure.core.util.Context.NONE); - Assertions.assertEquals(Origin.CUSTOMER_ON_DEMAND, response.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-19T23:36:25Z"), response.completedTime()); - Assertions.assertEquals("rkcxkj", response.source()); + Assertions.assertEquals(BackupType.CUSTOMER_ON_DEMAND, response.backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-19T03:35:41Z"), response.completedTime()); + Assertions.assertEquals("nrzvuljraaer", response.source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsGetWithResponseMockTests.java similarity index 67% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsGetWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsGetWithResponseMockTests.java index 2ecd04ac2d24..e3220c47c8df 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsGetWithResponseMockTests.java @@ -10,19 +10,19 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Origin; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerBackup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupAutomaticAndOnDemand; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class BackupsGetWithResponseMockTests { +public final class BackupsAutomaticAndOnDemandsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"backupType\":\"Customer On-Demand\",\"completedTime\":\"2021-06-20T13:20:36Z\",\"source\":\"gydcw\"},\"id\":\"xjumvq\",\"name\":\"olihrra\",\"type\":\"ouau\"}"; + = "{\"properties\":{\"backupType\":\"Customer On-Demand\",\"completedTime\":\"2021-02-24T21:00:57Z\",\"source\":\"ttzaefed\"},\"id\":\"hchrphkmcrjdqn\",\"name\":\"dfzpbgtgkylkdg\",\"type\":\"rjeuut\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,12 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ServerBackup response = manager.backups() - .getWithResponse("uncuw", "qspkcdqzhlctd", "unqndyfpchrqb", com.azure.core.util.Context.NONE) + BackupAutomaticAndOnDemand response = manager.backupsAutomaticAndOnDemands() + .getWithResponse("sfjbjsvg", "rwhryvycytd", "lxgccknfnwmbtm", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(Origin.CUSTOMER_ON_DEMAND, response.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-20T13:20:36Z"), response.completedTime()); - Assertions.assertEquals("gydcw", response.source()); + Assertions.assertEquals(BackupType.CUSTOMER_ON_DEMAND, response.backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-24T21:00:57Z"), response.completedTime()); + Assertions.assertEquals("ttzaefed", response.source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsListByServerMockTests.java similarity index 68% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsListByServerMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsListByServerMockTests.java index 7507b376b5df..d4036ec44a1f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsListByServerMockTests.java @@ -11,19 +11,19 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Origin; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerBackup; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupAutomaticAndOnDemand; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class BackupsListByServerMockTests { +public final class BackupsAutomaticAndOnDemandsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"backupType\":\"Full\",\"completedTime\":\"2021-09-29T00:55:24Z\",\"source\":\"cb\"},\"id\":\"imzdlyj\",\"name\":\"fqwmkyoquf\",\"type\":\"vruzslzojhpctfnm\"}]}"; + = "{\"value\":[{\"properties\":{\"backupType\":\"Full\",\"completedTime\":\"2021-03-11T01:19:47Z\",\"source\":\"pifhpfeoajvgcxtx\"},\"id\":\"sheafid\",\"name\":\"tugsresmkssjh\",\"type\":\"iftxfkf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testListByServer() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.backups().listByServer("rjtloq", "fuojrngif", com.azure.core.util.Context.NONE); + PagedIterable response = manager.backupsAutomaticAndOnDemands() + .listByServer("wxezwzhok", "bwnhhtql", com.azure.core.util.Context.NONE); - Assertions.assertEquals(Origin.FULL, response.iterator().next().backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-29T00:55:24Z"), + Assertions.assertEquals(BackupType.FULL, response.iterator().next().backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-11T01:19:47Z"), response.iterator().next().completedTime()); - Assertions.assertEquals("cb", response.iterator().next().source()); + Assertions.assertEquals("pifhpfeoajvgcxtx", response.iterator().next().source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionRequestTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionRequestTests.java new file mode 100644 index 000000000000..d89d35905bc9 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionRequestTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupStoreDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionRequest; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class BackupsLongTermRetentionRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupsLongTermRetentionRequest model = BinaryData.fromString( + "{\"targetDetails\":{\"sasUriList\":[\"ubyyntw\",\"rbqtkoie\"]},\"backupSettings\":{\"backupName\":\"seotgqrllt\"}}") + .toObject(BackupsLongTermRetentionRequest.class); + Assertions.assertEquals("seotgqrllt", model.backupSettings().backupName()); + Assertions.assertEquals("ubyyntw", model.targetDetails().sasUriList().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupsLongTermRetentionRequest model = new BackupsLongTermRetentionRequest() + .withBackupSettings(new BackupSettings().withBackupName("seotgqrllt")) + .withTargetDetails(new BackupStoreDetails().withSasUriList(Arrays.asList("ubyyntw", "rbqtkoie"))); + model = BinaryData.fromObject(model).toObject(BackupsLongTermRetentionRequest.class); + Assertions.assertEquals("seotgqrllt", model.backupSettings().backupName()); + Assertions.assertEquals("ubyyntw", model.targetDetails().sasUriList().get(0)); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionResponsePropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionResponsePropertiesTests.java new file mode 100644 index 000000000000..a9b6ecfd14c3 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionResponsePropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseProperties; +import org.junit.jupiter.api.Assertions; + +public final class BackupsLongTermRetentionResponsePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupsLongTermRetentionResponseProperties model = BinaryData.fromString("{\"numberOfContainers\":1097302991}") + .toObject(BackupsLongTermRetentionResponseProperties.class); + Assertions.assertEquals(1097302991, model.numberOfContainers()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupsLongTermRetentionResponseProperties model + = new BackupsLongTermRetentionResponseProperties().withNumberOfContainers(1097302991); + model = BinaryData.fromObject(model).toObject(BackupsLongTermRetentionResponseProperties.class); + Assertions.assertEquals(1097302991, model.numberOfContainers()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServersTriggerLtrPreBackupWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionsCheckPrerequisitesWithResponseMockTests.java similarity index 70% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServersTriggerLtrPreBackupWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionsCheckPrerequisitesWithResponseMockTests.java index 102edb5978e3..2aa46b41b80d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FlexibleServersTriggerLtrPreBackupWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionsCheckPrerequisitesWithResponseMockTests.java @@ -19,10 +19,10 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class FlexibleServersTriggerLtrPreBackupWithResponseMockTests { +public final class BackupsLongTermRetentionsCheckPrerequisitesWithResponseMockTests { @Test - public void testTriggerLtrPreBackupWithResponse() throws Exception { - String responseStr = "{\"properties\":{\"numberOfContainers\":64736512}}"; + public void testCheckPrerequisitesWithResponse() throws Exception { + String responseStr = "{\"properties\":{\"numberOfContainers\":1706604371}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,12 @@ public void testTriggerLtrPreBackupWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - LtrPreBackupResponse response - = manager.flexibleServers() - .triggerLtrPreBackupWithResponse("bsre", "rfqkfuar", - new LtrPreBackupRequest().withBackupSettings( - new BackupSettings().withBackupName("nlvhhtklnvnafvv")), - com.azure.core.util.Context.NONE) - .getValue(); + LtrPreBackupResponse response = manager.backupsLongTermRetentions() + .checkPrerequisitesWithResponse("lrohkpig", "fusuckzmkwklsno", + new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("axmqeqal")), + com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals(64736512, response.numberOfContainers()); + Assertions.assertEquals(1706604371, response.numberOfContainers()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationsListMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationsListMockTests.java new file mode 100644 index 000000000000..20ccc42a3c6d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationsListMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Capability; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class CapabilitiesByLocationsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"name\":\"cbiqtgdqoh\",\"supportedServerEditions\":[{\"name\":\"ldrizetpwbra\",\"defaultSkuName\":\"libph\",\"supportedStorageEditions\":[{\"name\":\"izakak\",\"defaultStorageSizeMb\":2736442030278845624,\"supportedStorageMb\":[{},{}],\"status\":\"Available\",\"reason\":\"ha\"},{\"name\":\"ylhjlm\",\"defaultStorageSizeMb\":1077522990830391189,\"supportedStorageMb\":[{},{}],\"status\":\"Available\",\"reason\":\"sopteecj\"},{\"name\":\"islstv\",\"defaultStorageSizeMb\":2601870801725359637,\"supportedStorageMb\":[{}],\"status\":\"Visible\",\"reason\":\"umweoohguufuzboy\"}],\"supportedServerSkus\":[{\"name\":\"wtzolbaemwmdxmeb\",\"vCores\":8048243,\"supportedIops\":120953176,\"supportedMemoryPerVcoreMb\":4829986004787621888,\"supportedZones\":[\"veabfqxnmwmqtib\",\"yijddtvqcttad\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"sieekpndzaapm\",\"status\":\"Disabled\",\"reason\":\"eqw\"},{\"name\":\"pibudqwyxebeybpm\",\"vCores\":11524370,\"supportedIops\":1945693134,\"supportedMemoryPerVcoreMb\":7788648309029183931,\"supportedZones\":[\"itmhhei\",\"qaqhvseufu\",\"yrxpdlcgqls\",\"smjqfrddgam\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"uivfcdis\",\"status\":\"Available\",\"reason\":\"xzhczexrxz\"}],\"status\":\"Default\",\"reason\":\"trhqvw\"},{\"name\":\"vk\",\"defaultSkuName\":\"nlnzonzlrpi\",\"supportedStorageEditions\":[{\"name\":\"cvjtszcofiz\",\"defaultStorageSizeMb\":4146962922880294634,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Visible\",\"reason\":\"vreljea\"},{\"name\":\"rvzmlovuana\",\"defaultStorageSizeMb\":1138155605453758000,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Disabled\",\"reason\":\"rbdkelvidiz\"},{\"name\":\"sdbccxjmonfdgnwn\",\"defaultStorageSizeMb\":4527807456286813914,\"supportedStorageMb\":[{}],\"status\":\"Visible\",\"reason\":\"v\"},{\"name\":\"jctzenkei\",\"defaultStorageSizeMb\":3883485074610487115,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Visible\",\"reason\":\"vflyhbxcu\"}],\"supportedServerSkus\":[{\"name\":\"gsrboldforobw\",\"vCores\":2116230034,\"supportedIops\":447073477,\"supportedMemoryPerVcoreMb\":6875255372638477871,\"supportedZones\":[\"vvacqpb\",\"uodxesza\",\"belawumuaslzkwr\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"wyh\",\"status\":\"Disabled\",\"reason\":\"mdr\"},{\"name\":\"wuhpsvfuur\",\"vCores\":1702145471,\"supportedIops\":1783251204,\"supportedMemoryPerVcoreMb\":6951866972489132006,\"supportedZones\":[\"lniexz\",\"rzpgep\",\"tybbwwpgda\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"nrkcxkj\",\"status\":\"Visible\",\"reason\":\"mysu\"},{\"name\":\"wq\",\"vCores\":1550616862,\"supportedIops\":790882759,\"supportedMemoryPerVcoreMb\":7173540378190876196,\"supportedZones\":[\"ttexoqqpwcyyufmh\",\"uncuw\"],\"supportedHaMode\":[\"SameZone\",\"SameZone\"],\"supportedFeatures\":[{}],\"securityProfile\":\"zhlctddunqndyfpc\",\"status\":\"Visible\",\"reason\":\"njjrcgegydcwbox\"}],\"status\":\"Available\",\"reason\":\"qqoli\"},{\"name\":\"raiouaubrjtl\",\"defaultSkuName\":\"xfuojrn\",\"supportedStorageEditions\":[{\"name\":\"rzpasccbiuimzdly\",\"defaultStorageSizeMb\":2207814252603311282,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Default\",\"reason\":\"qufdvruzslzojh\"},{\"name\":\"tfnmdx\",\"defaultStorageSizeMb\":9149647349466202254,\"supportedStorageMb\":[{}],\"status\":\"Disabled\",\"reason\":\"eyzihgrky\"}],\"supportedServerSkus\":[{\"name\":\"bsnmfpph\",\"vCores\":917571686,\"supportedIops\":474168225,\"supportedMemoryPerVcoreMb\":3280820966134981534,\"supportedZones\":[\"gzfc\",\"bgomfgbegl\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\",\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"nlu\",\"status\":\"Available\",\"reason\":\"rfxeeebtij\"}],\"status\":\"Available\",\"reason\":\"bmqzbqqxlajrnwx\"},{\"name\":\"evehjkuyxoaf\",\"defaultSkuName\":\"oqltfae\",\"supportedStorageEditions\":[{\"name\":\"mfgvxirpghriypo\",\"defaultStorageSizeMb\":7116262338386252749,\"supportedStorageMb\":[{},{},{}],\"status\":\"Default\",\"reason\":\"prlpy\"},{\"name\":\"uciqdsme\",\"defaultStorageSizeMb\":4627205265824000180,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Default\",\"reason\":\"yasiibmiy\"},{\"name\":\"nustgnljh\",\"defaultStorageSizeMb\":430611531006551205,\"supportedStorageMb\":[{},{},{}],\"status\":\"Available\",\"reason\":\"vmqfoud\"}],\"supportedServerSkus\":[{\"name\":\"gyyprotwy\",\"vCores\":677853893,\"supportedIops\":915134983,\"supportedMemoryPerVcoreMb\":6016947306008941575,\"supportedZones\":[\"cmjkavlgorbmftpm\",\"tzfjltf\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{}],\"securityProfile\":\"tpvopvpbdb\",\"status\":\"Default\",\"reason\":\"q\"},{\"name\":\"edsvqwthmk\",\"vCores\":1468707412,\"supportedIops\":669264341,\"supportedMemoryPerVcoreMb\":4975334479567653005,\"supportedZones\":[\"qcwdhoh\",\"dtmcd\",\"sufco\",\"dxbzlmcmuap\"],\"supportedHaMode\":[\"SameZone\",\"SameZone\",\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"xeyskonqzinkfkbg\",\"status\":\"Available\",\"reason\":\"wxeqocljmygvkzqk\"},{\"name\":\"eokbze\",\"vCores\":50022372,\"supportedIops\":2083826558,\"supportedMemoryPerVcoreMb\":8813876269554898921,\"supportedZones\":[\"tleipqxbkw\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"d\",\"status\":\"Disabled\",\"reason\":\"q\"}],\"status\":\"Disabled\",\"reason\":\"awopqh\"}],\"supportedServerVersions\":[{\"name\":\"tmcg\",\"supportedVersionsToUpgrade\":[\"stzelndlatut\",\"zlbiojlvfhrbbpn\",\"qvcww\"],\"supportedFeatures\":[{\"name\":\"mochpprprsnmok\",\"status\":\"Enabled\"},{\"name\":\"jnhlbkpbzpcpiljh\",\"status\":\"Enabled\"},{\"name\":\"echndbnwieholew\",\"status\":\"Disabled\"}],\"status\":\"Available\",\"reason\":\"wefqsfapaqtferr\"},{\"name\":\"ex\",\"supportedVersionsToUpgrade\":[\"fxapjwogqqnobpu\",\"cdabtqwpwya\",\"bzasqbucljgkyexa\",\"guyaip\"],\"supportedFeatures\":[{\"name\":\"ault\",\"status\":\"Enabled\"},{\"name\":\"um\",\"status\":\"Enabled\"},{\"name\":\"z\",\"status\":\"Disabled\"}],\"status\":\"Visible\",\"reason\":\"jng\"},{\"name\":\"dqxtbjwgnyf\",\"supportedVersionsToUpgrade\":[\"zsvtuikzhajqgl\",\"fh\",\"l\"],\"supportedFeatures\":[{\"name\":\"xynqnz\",\"status\":\"Enabled\"},{\"name\":\"ovw\",\"status\":\"Disabled\"},{\"name\":\"tgoe\",\"status\":\"Enabled\"}],\"status\":\"Available\",\"reason\":\"pfhvfslk\"}],\"supportedFeatures\":[{\"name\":\"lrigjkskyri\",\"status\":\"Disabled\"},{\"name\":\"idsxwaabzmifry\",\"status\":\"Disabled\"},{\"name\":\"maxriz\",\"status\":\"Enabled\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"lhslnelxieixyn\",\"supportedSku\":\"xecwcro\",\"supportedStorageGb\":1356428247,\"supportedServerVersions\":\"lhc\",\"serverCount\":1923192565,\"status\":\"Default\",\"reason\":\"fdwfmvigorqj\"}],\"geoBackupSupported\":\"Enabled\",\"zoneRedundantHaSupported\":\"Enabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Disabled\",\"storageAutoGrowthSupported\":\"Disabled\",\"onlineResizeSupported\":\"Enabled\",\"restricted\":\"Disabled\",\"status\":\"Visible\",\"reason\":\"juj\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PostgreSqlManager manager = PostgreSqlManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.capabilitiesByLocations().list("egprhptil", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("cbiqtgdqoh", response.iterator().next().name()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServersListMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServersListMockTests.java new file mode 100644 index 000000000000..c1dd72f96086 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServersListMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Capability; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class CapabilitiesByServersListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"name\":\"clt\",\"supportedServerEditions\":[{\"name\":\"ex\",\"defaultSkuName\":\"lfmk\",\"supportedStorageEditions\":[{\"name\":\"zuawxtzxpuamwa\",\"defaultStorageSizeMb\":5681353698337068642,\"supportedStorageMb\":[{},{}],\"status\":\"Available\",\"reason\":\"hsphaivmxyas\"},{\"name\":\"vgsgzwywakoihkn\",\"defaultStorageSizeMb\":3757192969147775574,\"supportedStorageMb\":[{}],\"status\":\"Disabled\",\"reason\":\"lnymzotqy\"}],\"supportedServerSkus\":[{\"name\":\"cbm\",\"vCores\":1331204401,\"supportedIops\":351004258,\"supportedMemoryPerVcoreMb\":3776684670219420412,\"supportedZones\":[\"ayxonsupeujl\"],\"supportedHaMode\":[\"SameZone\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"ql\",\"status\":\"Available\",\"reason\":\"ibg\"},{\"name\":\"gnxf\",\"vCores\":570995057,\"supportedIops\":1604903119,\"supportedMemoryPerVcoreMb\":4786688185160172368,\"supportedZones\":[\"dofdbxiqx\",\"iiqbi\",\"htmwwinh\"],\"supportedHaMode\":[\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"vwbcblembnkbwv\",\"status\":\"Visible\",\"reason\":\"divqi\"}],\"status\":\"Visible\",\"reason\":\"tswbzuwfmd\"},{\"name\":\"agegiz\",\"defaultSkuName\":\"jfelisdjubggbqig\",\"supportedStorageEditions\":[{\"name\":\"sazgakgacyrcmj\",\"defaultStorageSizeMb\":3103718277552317709,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Visible\",\"reason\":\"uhrylniofr\"},{\"name\":\"bzjedmstk\",\"defaultStorageSizeMb\":110896961983578283,\"supportedStorageMb\":[{},{}],\"status\":\"Disabled\",\"reason\":\"iznk\"}],\"supportedServerSkus\":[{\"name\":\"nsnvpd\",\"vCores\":671836726,\"supportedIops\":115574776,\"supportedMemoryPerVcoreMb\":4456554415141615101,\"supportedZones\":[\"bkiw\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"fy\",\"status\":\"Default\",\"reason\":\"rpfbcunezz\"}],\"status\":\"Default\",\"reason\":\"lfwyfwlwxjwetn\"},{\"name\":\"ihclafzv\",\"defaultSkuName\":\"lpt\",\"supportedStorageEditions\":[{\"name\":\"wztcmwqkchc\",\"defaultStorageSizeMb\":4460871614096839788,\"supportedStorageMb\":[{},{},{}],\"status\":\"Default\",\"reason\":\"kjexfdeqvhp\"},{\"name\":\"lkkshkbffmbmx\",\"defaultStorageSizeMb\":6471426075457466306,\"supportedStorageMb\":[{}],\"status\":\"Disabled\",\"reason\":\"jx\"}],\"supportedServerSkus\":[{\"name\":\"fujg\",\"vCores\":1062138693,\"supportedIops\":1279529449,\"supportedMemoryPerVcoreMb\":6918440632186080085,\"supportedZones\":[\"aqutdewemxswvruu\",\"zzjgehkfki\",\"rtixokff\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"whixmonstsh\",\"status\":\"Disabled\",\"reason\":\"velfcldu\"},{\"name\":\"birdsvuwcobiegs\",\"vCores\":1923237132,\"supportedIops\":2099523600,\"supportedMemoryPerVcoreMb\":2784649228663949858,\"supportedZones\":[\"i\",\"nghgshej\",\"tbxqmuluxlxq\",\"vnersbycucrw\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"rqbsmswziq\",\"status\":\"Visible\",\"reason\":\"okzrus\"},{\"name\":\"vhczznvfby\",\"vCores\":1906628483,\"supportedIops\":728305495,\"supportedMemoryPerVcoreMb\":2787720683354183168,\"supportedZones\":[\"vumwmxqh\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"sehaohdjhhflzok\",\"status\":\"Visible\",\"reason\":\"pelnjetag\"},{\"name\":\"sxoa\",\"vCores\":1674614666,\"supportedIops\":2037643049,\"supportedMemoryPerVcoreMb\":4444044351696890783,\"supportedZones\":[\"wvefloccsrmoz\",\"hmipgawtxxpkyjc\",\"cjxgrytf\",\"pcycilrmcaykg\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\",\"SameZone\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"sxwpndfcpfnznthj\",\"status\":\"Default\",\"reason\":\"aosrxuz\"}],\"status\":\"Disabled\",\"reason\":\"ktcqio\"}],\"supportedServerVersions\":[{\"name\":\"zah\",\"supportedVersionsToUpgrade\":[\"dl\",\"rtltla\"],\"supportedFeatures\":[{\"name\":\"zkatb\",\"status\":\"Disabled\"},{\"name\":\"nnbsoqeqa\",\"status\":\"Disabled\"},{\"name\":\"lagun\",\"status\":\"Enabled\"},{\"name\":\"ebwlnbmhyreeudzq\",\"status\":\"Disabled\"}],\"status\":\"Available\",\"reason\":\"mjxlyyzglgouw\"},{\"name\":\"mjjyuojq\",\"supportedVersionsToUpgrade\":[\"axkjeytunlbfjk\"],\"supportedFeatures\":[{\"name\":\"nkqbhsyrq\",\"status\":\"Enabled\"}],\"status\":\"Default\",\"reason\":\"enx\"},{\"name\":\"l\",\"supportedVersionsToUpgrade\":[\"kdk\",\"fmjnnawtqa\",\"pxuckpggq\",\"wey\"],\"supportedFeatures\":[{\"name\":\"lisn\",\"status\":\"Enabled\"},{\"name\":\"qqmpizruwnpqx\",\"status\":\"Disabled\"},{\"name\":\"fcngjsa\",\"status\":\"Enabled\"},{\"name\":\"xtmkzjvkviir\",\"status\":\"Disabled\"}],\"status\":\"Available\",\"reason\":\"sdp\"}],\"supportedFeatures\":[{\"name\":\"zvzbglbyv\",\"status\":\"Disabled\"}],\"fastProvisioningSupported\":\"Enabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"kjzwrgxf\",\"supportedSku\":\"shkwfbkgozxwopd\",\"supportedStorageGb\":1179999545,\"supportedServerVersions\":\"izqaclnapxbiyg\",\"serverCount\":966053961,\"status\":\"Disabled\",\"reason\":\"fsmfcttuxuuyi\"},{\"supportedTier\":\"lq\",\"supportedSku\":\"quvre\",\"supportedStorageGb\":2121197417,\"supportedServerVersions\":\"jhvsujztczyt\",\"serverCount\":178479099,\"status\":\"Visible\",\"reason\":\"uunfprnjletlxsm\"},{\"supportedTier\":\"ddoui\",\"supportedSku\":\"mowaziynknlqwzdv\",\"supportedStorageGb\":39952136,\"supportedServerVersions\":\"xqszdtmaajquh\",\"serverCount\":578758071,\"status\":\"Disabled\",\"reason\":\"vmtygj\"},{\"supportedTier\":\"zyos\",\"supportedSku\":\"p\",\"supportedStorageGb\":26175151,\"supportedServerVersions\":\"fkyjpmspbpssdfpp\",\"serverCount\":386298045,\"status\":\"Available\",\"reason\":\"yujtvczkcnyx\"}],\"geoBackupSupported\":\"Disabled\",\"zoneRedundantHaSupported\":\"Disabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Enabled\",\"storageAutoGrowthSupported\":\"Enabled\",\"onlineResizeSupported\":\"Enabled\",\"restricted\":\"Enabled\",\"status\":\"Visible\",\"reason\":\"xpaglqivbgkc\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PostgreSqlManager manager = PostgreSqlManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.capabilitiesByServers().list("ickpz", "cpopmxel", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("clt", response.iterator().next().name()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityBaseTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityBaseTests.java new file mode 100644 index 000000000000..95ea79ceb249 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityBaseTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityBase; + +public final class CapabilityBaseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapabilityBase model = BinaryData.fromString("{\"status\":\"Disabled\",\"reason\":\"twrupqsxvnm\"}") + .toObject(CapabilityBase.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CapabilityBase model = new CapabilityBase(); + model = BinaryData.fromObject(model).toObject(CapabilityBase.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityInnerTests.java new file mode 100644 index 000000000000..4103f11972d9 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityInnerTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; +import org.junit.jupiter.api.Assertions; + +public final class CapabilityInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapabilityInner model = BinaryData.fromString( + "{\"name\":\"fqpte\",\"supportedServerEditions\":[{\"name\":\"vypyqrimzinpv\",\"defaultSkuName\":\"jdkirsoodqx\",\"supportedStorageEditions\":[{\"name\":\"nohjt\",\"defaultStorageSizeMb\":2935021461506555781,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Disabled\",\"reason\":\"iy\"},{\"name\":\"jxsqwpgrjbz\",\"defaultStorageSizeMb\":6117195169735305207,\"supportedStorageMb\":[{}],\"status\":\"Visible\",\"reason\":\"byxqabn\"}],\"supportedServerSkus\":[{\"name\":\"cyshurzafbljjgp\",\"vCores\":293333183,\"supportedIops\":71717444,\"supportedMemoryPerVcoreMb\":7458924632572162672,\"supportedZones\":[\"a\",\"bqidtqaj\",\"yulpkudjkr\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"pgzgq\",\"status\":\"Visible\",\"reason\":\"ocxscpaierhhbcs\"}],\"status\":\"Default\",\"reason\":\"majtjaod\"},{\"name\":\"bnbdxkqpxokajion\",\"defaultSkuName\":\"mexgstxgcp\",\"supportedStorageEditions\":[{\"name\":\"aajrm\",\"defaultStorageSizeMb\":5608732709320879366,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Disabled\",\"reason\":\"mcl\"},{\"name\":\"ijcoejctb\",\"defaultStorageSizeMb\":4652283960591475965,\"supportedStorageMb\":[{},{}],\"status\":\"Available\",\"reason\":\"kbfkg\"}],\"supportedServerSkus\":[{\"name\":\"exxppofmxaxcfjp\",\"vCores\":1240813814,\"supportedIops\":1410609059,\"supportedMemoryPerVcoreMb\":8556120198731757598,\"supportedZones\":[\"vpmouexhdzxib\",\"eojnxqbzvddn\"],\"supportedHaMode\":[\"SameZone\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"btwnpzaoqvuhrhcf\",\"status\":\"Visible\",\"reason\":\"dglmjthjqkwp\"},{\"name\":\"icxm\",\"vCores\":1686193188,\"supportedIops\":102046613,\"supportedMemoryPerVcoreMb\":3455031391724056303,\"supportedZones\":[\"xuigdtopbobj\",\"ghmewuam\",\"uhrzayvvt\",\"gvdfgiotkftutq\"],\"supportedHaMode\":[\"SameZone\",\"SameZone\",\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{}],\"securityProfile\":\"gnxkrxdqmidtth\",\"status\":\"Available\",\"reason\":\"drabhjybige\"},{\"name\":\"qfbow\",\"vCores\":1200482188,\"supportedIops\":974943815,\"supportedMemoryPerVcoreMb\":6101929070226653978,\"supportedZones\":[\"u\",\"y\",\"gqywgndrv\"],\"supportedHaMode\":[\"SameZone\",\"SameZone\",\"SameZone\",\"SameZone\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"gyncocpecfvmmc\",\"status\":\"Disabled\",\"reason\":\"xlzevgbmqjqabcy\"}],\"status\":\"Disabled\",\"reason\":\"kwlzuvccfwnfn\"},{\"name\":\"cfionl\",\"defaultSkuName\":\"x\",\"supportedStorageEditions\":[{\"name\":\"tzxdpnqbqqwx\",\"defaultStorageSizeMb\":83601086548866102,\"supportedStorageMb\":[{},{}],\"status\":\"Default\",\"reason\":\"sub\"}],\"supportedServerSkus\":[{\"name\":\"ampmngnz\",\"vCores\":1460212605,\"supportedIops\":431293436,\"supportedMemoryPerVcoreMb\":4377641915122156936,\"supportedZones\":[\"cbonqvpk\",\"lrxnjeaseiphe\",\"f\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"nj\",\"status\":\"Default\",\"reason\":\"tgrhpdjpjumas\"},{\"name\":\"zj\",\"vCores\":1063088657,\"supportedIops\":973371108,\"supportedMemoryPerVcoreMb\":5443053800820392121,\"supportedZones\":[\"xxhejjzzvd\"],\"supportedHaMode\":[\"SameZone\",\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"otwmcyn\",\"status\":\"Disabled\",\"reason\":\"jnpg\"}],\"status\":\"Disabled\",\"reason\":\"adehxnltyfsopp\"},{\"name\":\"uesnzwdejbavo\",\"defaultSkuName\":\"zdmohctbqvu\",\"supportedStorageEditions\":[{\"name\":\"ndnvo\",\"defaultStorageSizeMb\":4292877192766299113,\"supportedStorageMb\":[{}],\"status\":\"Default\",\"reason\":\"kcglhslaz\"}],\"supportedServerSkus\":[{\"name\":\"gdtjixhbkuofqwey\",\"vCores\":1047075786,\"supportedIops\":31402912,\"supportedMemoryPerVcoreMb\":7006208031114197055,\"supportedZones\":[\"xfw\",\"ybcibvyvdcsit\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"ctehfiqscjey\",\"status\":\"Available\",\"reason\":\"zrkgqhcjrefovg\"},{\"name\":\"qsl\",\"vCores\":1641560645,\"supportedIops\":1069395538,\"supportedMemoryPerVcoreMb\":7599917226673683957,\"supportedZones\":[\"cattpngjcrcczsq\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{}],\"securityProfile\":\"ysou\",\"status\":\"Visible\",\"reason\":\"a\"},{\"name\":\"ae\",\"vCores\":1901274446,\"supportedIops\":1111397810,\"supportedMemoryPerVcoreMb\":9024707891893513418,\"supportedZones\":[\"mopjmc\",\"atuokthfuiu\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"odpuozmyzydag\",\"status\":\"Default\",\"reason\":\"bezy\"}],\"status\":\"Default\",\"reason\":\"ktwh\"}],\"supportedServerVersions\":[{\"name\":\"zywqsmbsu\",\"supportedVersionsToUpgrade\":[\"imoryocfsfksym\"],\"supportedFeatures\":[{\"name\":\"tki\",\"status\":\"Disabled\"}],\"status\":\"Visible\",\"reason\":\"udxorrqn\"}],\"supportedFeatures\":[{\"name\":\"zvyifqrvkdvj\",\"status\":\"Enabled\"},{\"name\":\"mvvd\",\"status\":\"Enabled\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"ulexxbczwtr\",\"supportedSku\":\"iqzbq\",\"supportedStorageGb\":1378529430,\"supportedServerVersions\":\"vmyokacspkwl\",\"serverCount\":1196709774,\"status\":\"Available\",\"reason\":\"xjmflbvv\"}],\"geoBackupSupported\":\"Enabled\",\"zoneRedundantHaSupported\":\"Disabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Disabled\",\"storageAutoGrowthSupported\":\"Disabled\",\"onlineResizeSupported\":\"Disabled\",\"restricted\":\"Disabled\",\"status\":\"Visible\",\"reason\":\"rsa\"}") + .toObject(CapabilityInner.class); + Assertions.assertEquals("fqpte", model.name()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CapabilityInner model = new CapabilityInner().withName("fqpte"); + model = BinaryData.fromObject(model).toObject(CapabilityInner.class); + Assertions.assertEquals("fqpte", model.name()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityListTests.java new file mode 100644 index 000000000000..07d2729a2717 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityListTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityList; +import org.junit.jupiter.api.Assertions; + +public final class CapabilityListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapabilityList model = BinaryData.fromString( + "{\"value\":[{\"name\":\"wzo\",\"supportedServerEditions\":[{\"name\":\"felluwfzitonpe\",\"defaultSkuName\":\"pjkjlxofpdv\",\"supportedStorageEditions\":[{},{},{},{}],\"supportedServerSkus\":[{},{},{},{}],\"status\":\"Visible\",\"reason\":\"ninmayhuyb\"}],\"supportedServerVersions\":[{\"name\":\"depoog\",\"supportedVersionsToUpgrade\":[\"vamih\",\"ognarxzxtheotus\",\"vyevcciqi\",\"nhungbw\"],\"supportedFeatures\":[{},{},{}],\"status\":\"Disabled\",\"reason\":\"gxg\"},{\"name\":\"pemvtzfkufubljof\",\"supportedVersionsToUpgrade\":[\"ofjaeqjhqjb\",\"s\",\"msmjqulngsntn\"],\"supportedFeatures\":[{},{},{}],\"status\":\"Available\",\"reason\":\"cwrwclxxwrljdous\"}],\"supportedFeatures\":[{\"name\":\"kocrcjdkwtnhx\",\"status\":\"Disabled\"},{\"name\":\"iksqr\",\"status\":\"Disabled\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"p\",\"supportedSku\":\"nzl\",\"supportedStorageGb\":1104675227,\"supportedServerVersions\":\"ppeebvmgxsab\",\"serverCount\":1248526317,\"status\":\"Available\",\"reason\":\"jitcjczdzevn\"},{\"supportedTier\":\"krwpdap\",\"supportedSku\":\"sbdkvwr\",\"supportedStorageGb\":1914162243,\"supportedServerVersions\":\"usnhutje\",\"serverCount\":1438650135,\"status\":\"Disabled\",\"reason\":\"hugjzzdatqxhoc\"},{\"supportedTier\":\"eablg\",\"supportedSku\":\"uticndvkaozwyif\",\"supportedStorageGb\":655079148,\"supportedServerVersions\":\"hurokftyxoln\",\"serverCount\":1438714337,\"status\":\"Available\",\"reason\":\"kjfkg\"},{\"supportedTier\":\"w\",\"supportedSku\":\"lryplwckbasyy\",\"supportedStorageGb\":893627335,\"supportedServerVersions\":\"hsgcbacphejkot\",\"serverCount\":2116203102,\"status\":\"Default\",\"reason\":\"l\"}],\"geoBackupSupported\":\"Disabled\",\"zoneRedundantHaSupported\":\"Enabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Disabled\",\"storageAutoGrowthSupported\":\"Disabled\",\"onlineResizeSupported\":\"Enabled\",\"restricted\":\"Enabled\",\"status\":\"Available\",\"reason\":\"adgakeqsrxybz\"},{\"name\":\"e\",\"supportedServerEditions\":[{\"name\":\"bciqfouflm\",\"defaultSkuName\":\"kzsmodm\",\"supportedStorageEditions\":[{},{}],\"supportedServerSkus\":[{},{},{}],\"status\":\"Visible\",\"reason\":\"wtmutduq\"}],\"supportedServerVersions\":[{\"name\":\"spwgcuertumkdosv\",\"supportedVersionsToUpgrade\":[\"bmdg\",\"bjf\",\"dgmb\"],\"supportedFeatures\":[{}],\"status\":\"Default\",\"reason\":\"bhtqqrolfpfpsa\"}],\"supportedFeatures\":[{\"name\":\"uxig\",\"status\":\"Disabled\"},{\"name\":\"zjaoyfhrtxil\",\"status\":\"Enabled\"}],\"fastProvisioningSupported\":\"Enabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"vlejuvfqa\",\"supportedSku\":\"lyxwjkcprbnwbx\",\"supportedStorageGb\":590807378,\"supportedServerVersions\":\"bvpyss\",\"serverCount\":881911115,\"status\":\"Visible\",\"reason\":\"qguhmuo\"},{\"supportedTier\":\"f\",\"supportedSku\":\"wzwbnguitn\",\"supportedStorageGb\":1661646001,\"supportedServerVersions\":\"gazxuf\",\"serverCount\":1325323583,\"status\":\"Visible\",\"reason\":\"fihrfi\"},{\"supportedTier\":\"vzwdzuhtymwis\",\"supportedSku\":\"fthwxmnteiwa\",\"supportedStorageGb\":1147717382,\"supportedServerVersions\":\"mijcmmxdcufufs\",\"serverCount\":1460749034,\"status\":\"Disabled\",\"reason\":\"dnsezcxtbzs\"}],\"geoBackupSupported\":\"Enabled\",\"zoneRedundantHaSupported\":\"Enabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Disabled\",\"storageAutoGrowthSupported\":\"Disabled\",\"onlineResizeSupported\":\"Disabled\",\"restricted\":\"Enabled\",\"status\":\"Disabled\",\"reason\":\"ac\"}],\"nextLink\":\"oosflnr\"}") + .toObject(CapabilityList.class); + Assertions.assertEquals("oosflnr", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CapabilityList model = new CapabilityList().withNextLink("oosflnr"); + model = BinaryData.fromObject(model).toObject(CapabilityList.class); + Assertions.assertEquals("oosflnr", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogInnerTests.java new file mode 100644 index 000000000000..6b7ceff8fb4f --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogInnerTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class CapturedLogInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapturedLogInner model = BinaryData.fromString( + "{\"properties\":{\"createdTime\":\"2021-03-18T11:55:12Z\",\"lastModifiedTime\":\"2021-03-31T11:05:30Z\",\"sizeInKb\":2907518339137583712,\"type\":\"vmeueci\",\"url\":\"hzceuojgjrwjue\"},\"id\":\"twm\",\"name\":\"dytdxwitx\",\"type\":\"rjaw\"}") + .toObject(CapturedLogInner.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-18T11:55:12Z"), model.createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-31T11:05:30Z"), model.lastModifiedTime()); + Assertions.assertEquals(2907518339137583712L, model.sizeInKb()); + Assertions.assertEquals("vmeueci", model.typePropertiesType()); + Assertions.assertEquals("hzceuojgjrwjue", model.url()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CapturedLogInner model = new CapturedLogInner().withCreatedTime(OffsetDateTime.parse("2021-03-18T11:55:12Z")) + .withLastModifiedTime(OffsetDateTime.parse("2021-03-31T11:05:30Z")) + .withSizeInKb(2907518339137583712L) + .withTypePropertiesType("vmeueci") + .withUrl("hzceuojgjrwjue"); + model = BinaryData.fromObject(model).toObject(CapturedLogInner.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-18T11:55:12Z"), model.createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-31T11:05:30Z"), model.lastModifiedTime()); + Assertions.assertEquals(2907518339137583712L, model.sizeInKb()); + Assertions.assertEquals("vmeueci", model.typePropertiesType()); + Assertions.assertEquals("hzceuojgjrwjue", model.url()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogListTests.java new file mode 100644 index 000000000000..4748924b9ec9 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogListTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapturedLogList; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class CapturedLogListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapturedLogList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"createdTime\":\"2021-06-09T13:42:27Z\",\"lastModifiedTime\":\"2021-10-13T05:34:59Z\",\"sizeInKb\":8070378860350059324,\"type\":\"lf\",\"url\":\"sgwbnbbeld\"},\"id\":\"k\",\"name\":\"baliourqhakauha\",\"type\":\"hsfwxosowzxcug\"}],\"nextLink\":\"jooxdjebw\"}") + .toObject(CapturedLogList.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T13:42:27Z"), model.value().get(0).createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T05:34:59Z"), model.value().get(0).lastModifiedTime()); + Assertions.assertEquals(8070378860350059324L, model.value().get(0).sizeInKb()); + Assertions.assertEquals("lf", model.value().get(0).typePropertiesType()); + Assertions.assertEquals("sgwbnbbeld", model.value().get(0).url()); + Assertions.assertEquals("jooxdjebw", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CapturedLogList model = new CapturedLogList().withValue( + Arrays.asList(new CapturedLogInner().withCreatedTime(OffsetDateTime.parse("2021-06-09T13:42:27Z")) + .withLastModifiedTime(OffsetDateTime.parse("2021-10-13T05:34:59Z")) + .withSizeInKb(8070378860350059324L) + .withTypePropertiesType("lf") + .withUrl("sgwbnbbeld"))) + .withNextLink("jooxdjebw"); + model = BinaryData.fromObject(model).toObject(CapturedLogList.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T13:42:27Z"), model.value().get(0).createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T05:34:59Z"), model.value().get(0).lastModifiedTime()); + Assertions.assertEquals(8070378860350059324L, model.value().get(0).sizeInKb()); + Assertions.assertEquals("lf", model.value().get(0).typePropertiesType()); + Assertions.assertEquals("sgwbnbbeld", model.value().get(0).url()); + Assertions.assertEquals("jooxdjebw", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogPropertiesTests.java new file mode 100644 index 000000000000..9308f71d5eae --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogPropertiesTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogProperties; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class CapturedLogPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapturedLogProperties model = BinaryData.fromString( + "{\"createdTime\":\"2021-05-13T06:47:58Z\",\"lastModifiedTime\":\"2021-10-18T22:59:22Z\",\"sizeInKb\":1588366635739120038,\"type\":\"kxfbkpycgklwndn\",\"url\":\"dauwhvylwzbtd\"}") + .toObject(CapturedLogProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-13T06:47:58Z"), model.createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T22:59:22Z"), model.lastModifiedTime()); + Assertions.assertEquals(1588366635739120038L, model.sizeInKb()); + Assertions.assertEquals("kxfbkpycgklwndn", model.type()); + Assertions.assertEquals("dauwhvylwzbtd", model.url()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CapturedLogProperties model + = new CapturedLogProperties().withCreatedTime(OffsetDateTime.parse("2021-05-13T06:47:58Z")) + .withLastModifiedTime(OffsetDateTime.parse("2021-10-18T22:59:22Z")) + .withSizeInKb(1588366635739120038L) + .withType("kxfbkpycgklwndn") + .withUrl("dauwhvylwzbtd"); + model = BinaryData.fromObject(model).toObject(CapturedLogProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-13T06:47:58Z"), model.createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T22:59:22Z"), model.lastModifiedTime()); + Assertions.assertEquals(1588366635739120038L, model.sizeInKb()); + Assertions.assertEquals("kxfbkpycgklwndn", model.type()); + Assertions.assertEquals("dauwhvylwzbtd", model.url()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LogFilesListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerMockTests.java similarity index 63% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LogFilesListByServerMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerMockTests.java index d7aec15fd9f7..c813b1519ac6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LogFilesListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerMockTests.java @@ -11,18 +11,18 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LogFile; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CapturedLog; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class LogFilesListByServerMockTests { +public final class CapturedLogsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"createdTime\":\"2021-04-22T23:18:02Z\",\"lastModifiedTime\":\"2021-03-11T16:19:04Z\",\"sizeInKb\":8880020840563284611,\"type\":\"rblmli\",\"url\":\"xihspnxwq\"},\"id\":\"nepzwakls\",\"name\":\"sbq\",\"type\":\"qagwwrxaomz\"}]}"; + = "{\"value\":[{\"properties\":{\"createdTime\":\"2021-09-15T09:21:05Z\",\"lastModifiedTime\":\"2021-08-22T03:52:29Z\",\"sizeInKb\":6217391043756366085,\"type\":\"dibgqjxgpnrhgov\",\"url\":\"pikqmh\"},\"id\":\"owjrmzvuporqz\",\"name\":\"fuyd\",\"type\":\"vkfvxcnqmxqpswok\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testListByServer() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.logFiles().listByServer("bpizxqltgr", "ogypxrxvbfihwu", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.capturedLogs().listByServer("khpzvuqdflv", "niypfpubcpzg", com.azure.core.util.Context.NONE); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-22T23:18:02Z"), response.iterator().next().createdTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-11T16:19:04Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-15T09:21:05Z"), response.iterator().next().createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-22T03:52:29Z"), response.iterator().next().lastModifiedTime()); - Assertions.assertEquals(8880020840563284611L, response.iterator().next().sizeInKb()); - Assertions.assertEquals("rblmli", response.iterator().next().typePropertiesType()); - Assertions.assertEquals("xihspnxwq", response.iterator().next().url()); + Assertions.assertEquals(6217391043756366085L, response.iterator().next().sizeInKb()); + Assertions.assertEquals("dibgqjxgpnrhgov", response.iterator().next().typePropertiesType()); + Assertions.assertEquals("pikqmh", response.iterator().next().url()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityRequestTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityRequestTests.java new file mode 100644 index 000000000000..864595646b72 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityRequestTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; +import org.junit.jupiter.api.Assertions; + +public final class CheckNameAvailabilityRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CheckNameAvailabilityRequest model = BinaryData.fromString("{\"name\":\"flsjc\",\"type\":\"szfjvfbgofelja\"}") + .toObject(CheckNameAvailabilityRequest.class); + Assertions.assertEquals("flsjc", model.name()); + Assertions.assertEquals("szfjvfbgofelja", model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CheckNameAvailabilityRequest model + = new CheckNameAvailabilityRequest().withName("flsjc").withType("szfjvfbgofelja"); + model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); + Assertions.assertEquals("flsjc", model.name()); + Assertions.assertEquals("szfjvfbgofelja", model.type()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityResponseTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityResponseTests.java new file mode 100644 index 000000000000..f9e0ae10780a --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityResponseTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityReason; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityResponse; +import org.junit.jupiter.api.Assertions; + +public final class CheckNameAvailabilityResponseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CheckNameAvailabilityResponse model + = BinaryData.fromString("{\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"hftqsxhqxujxukn\"}") + .toObject(CheckNameAvailabilityResponse.class); + Assertions.assertTrue(model.nameAvailable()); + Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); + Assertions.assertEquals("hftqsxhqxujxukn", model.message()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CheckNameAvailabilityResponse model = new CheckNameAvailabilityResponse().withNameAvailable(true) + .withReason(CheckNameAvailabilityReason.INVALID) + .withMessage("hftqsxhqxujxukn"); + model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponse.class); + Assertions.assertTrue(model.nameAvailable()); + Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); + Assertions.assertEquals("hftqsxhqxujxukn", model.message()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ClusterTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ClusterTests.java new file mode 100644 index 000000000000..756d30a3439a --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ClusterTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Cluster; +import org.junit.jupiter.api.Assertions; + +public final class ClusterTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Cluster model = BinaryData.fromString("{\"clusterSize\":179532208,\"defaultDatabaseName\":\"tg\"}") + .toObject(Cluster.class); + Assertions.assertEquals(179532208, model.clusterSize()); + Assertions.assertEquals("tg", model.defaultDatabaseName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Cluster model = new Cluster().withClusterSize(179532208).withDefaultDatabaseName("tg"); + model = BinaryData.fromObject(model).toObject(Cluster.class); + Assertions.assertEquals(179532208, model.clusterSize()); + Assertions.assertEquals("tg", model.defaultDatabaseName()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationForUpdateTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationForUpdateTests.java new file mode 100644 index 000000000000..1f2aa4ffc550 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationForUpdateTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationForUpdate; +import org.junit.jupiter.api.Assertions; + +public final class ConfigurationForUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConfigurationForUpdate model = BinaryData.fromString( + "{\"properties\":{\"value\":\"bkdmo\",\"description\":\"postmgrcfbunrm\",\"defaultValue\":\"jhhkxbp\",\"dataType\":\"Numeric\",\"allowedValues\":\"jhxxjyn\",\"source\":\"divkrt\",\"isDynamicConfig\":false,\"isReadOnly\":false,\"isConfigPendingRestart\":true,\"unit\":\"zjf\",\"documentationLink\":\"vjfdx\"}}") + .toObject(ConfigurationForUpdate.class); + Assertions.assertEquals("bkdmo", model.value()); + Assertions.assertEquals("divkrt", model.source()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConfigurationForUpdate model = new ConfigurationForUpdate().withValue("bkdmo").withSource("divkrt"); + model = BinaryData.fromObject(model).toObject(ConfigurationForUpdate.class); + Assertions.assertEquals("bkdmo", model.value()); + Assertions.assertEquals("divkrt", model.source()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationInnerTests.java new file mode 100644 index 000000000000..f1cc0d2ee767 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationInnerTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationInner; +import org.junit.jupiter.api.Assertions; + +public final class ConfigurationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConfigurationInner model = BinaryData.fromString( + "{\"properties\":{\"value\":\"yofd\",\"description\":\"uusdttouwa\",\"defaultValue\":\"ekqvkeln\",\"dataType\":\"Boolean\",\"allowedValues\":\"xwyjsflhhc\",\"source\":\"lnjixisxya\",\"isDynamicConfig\":true,\"isReadOnly\":false,\"isConfigPendingRestart\":false,\"unit\":\"lyjpk\",\"documentationLink\":\"dzyexznelixh\"},\"id\":\"ztfolhbnxk\",\"name\":\"alaulppggdtpnapn\",\"type\":\"iropuhpigvpgylg\"}") + .toObject(ConfigurationInner.class); + Assertions.assertEquals("yofd", model.value()); + Assertions.assertEquals("lnjixisxya", model.source()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConfigurationInner model = new ConfigurationInner().withValue("yofd").withSource("lnjixisxya"); + model = BinaryData.fromObject(model).toObject(ConfigurationInner.class); + Assertions.assertEquals("yofd", model.value()); + Assertions.assertEquals("lnjixisxya", model.source()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationListTests.java new file mode 100644 index 000000000000..f4ccd2964d20 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationListTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ConfigurationListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConfigurationList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"value\":\"nbmpowuwprzq\",\"description\":\"eualupjmkhf\",\"defaultValue\":\"bbcswsrtjri\",\"dataType\":\"Enumeration\",\"allowedValues\":\"pbewtghfgblcgwx\",\"source\":\"lvqhjkbegibtnmx\",\"isDynamicConfig\":false,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"ayqcgw\",\"documentationLink\":\"zjuzgwyz\"},\"id\":\"txon\",\"name\":\"mtsavjcbpwxqp\",\"type\":\"rknftguvriuhprwm\"},{\"properties\":{\"value\":\"xqtayriwwro\",\"description\":\"bexrmcq\",\"defaultValue\":\"ycnojvknmefqsg\",\"dataType\":\"Enumeration\",\"allowedValues\":\"apj\",\"source\":\"hpvgqz\",\"isDynamicConfig\":true,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"lmwlxkvugfhzo\",\"documentationLink\":\"wjvzunluthnn\"},\"id\":\"nxipeil\",\"name\":\"jzuaejxdultskzbb\",\"type\":\"dzumveekg\"}],\"nextLink\":\"ozuhkfp\"}") + .toObject(ConfigurationList.class); + Assertions.assertEquals("nbmpowuwprzq", model.value().get(0).value()); + Assertions.assertEquals("lvqhjkbegibtnmx", model.value().get(0).source()); + Assertions.assertEquals("ozuhkfp", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConfigurationList model + = new ConfigurationList() + .withValue( + Arrays.asList(new ConfigurationInner().withValue("nbmpowuwprzq").withSource("lvqhjkbegibtnmx"), + new ConfigurationInner().withValue("xqtayriwwro").withSource("hpvgqz"))) + .withNextLink("ozuhkfp"); + model = BinaryData.fromObject(model).toObject(ConfigurationList.class); + Assertions.assertEquals("nbmpowuwprzq", model.value().get(0).value()); + Assertions.assertEquals("lvqhjkbegibtnmx", model.value().get(0).source()); + Assertions.assertEquals("ozuhkfp", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationPropertiesTests.java new file mode 100644 index 000000000000..4062e6f0eb1a --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationPropertiesTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationProperties; +import org.junit.jupiter.api.Assertions; + +public final class ConfigurationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConfigurationProperties model = BinaryData.fromString( + "{\"value\":\"itxmedjvcslynqww\",\"description\":\"wzz\",\"defaultValue\":\"gktrmgucnapkte\",\"dataType\":\"String\",\"allowedValues\":\"wptfdy\",\"source\":\"fqbuaceopzf\",\"isDynamicConfig\":false,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"ppcqeqxolz\",\"documentationLink\":\"hzxct\"}") + .toObject(ConfigurationProperties.class); + Assertions.assertEquals("itxmedjvcslynqww", model.value()); + Assertions.assertEquals("fqbuaceopzf", model.source()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ConfigurationProperties model + = new ConfigurationProperties().withValue("itxmedjvcslynqww").withSource("fqbuaceopzf"); + model = BinaryData.fromObject(model).toObject(ConfigurationProperties.class); + Assertions.assertEquals("itxmedjvcslynqww", model.value()); + Assertions.assertEquals("fqbuaceopzf", model.source()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.java index c877fdfc29e9..93973b986ee3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class ConfigurationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"value\":\"hgfgrwsd\",\"description\":\"ra\",\"defaultValue\":\"vzbglbyvi\",\"dataType\":\"Enumeration\",\"allowedValues\":\"brxkjzwr\",\"source\":\"ffm\",\"isDynamicConfig\":false,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"ozxwopd\",\"documentationLink\":\"dpizq\"},\"id\":\"lnapxbiygn\",\"name\":\"gjkn\",\"type\":\"smfcttuxuuyilfl\"}"; + = "{\"properties\":{\"value\":\"xnjmxm\",\"description\":\"qudtcvclx\",\"defaultValue\":\"pdkvg\",\"dataType\":\"Integer\",\"allowedValues\":\"iyji\",\"source\":\"zphdugneiknp\",\"isDynamicConfig\":false,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"hibtozipqwjedmur\",\"documentationLink\":\"x\"},\"id\":\"wpktvqylkmqpzoyh\",\"name\":\"fbcgwgcloxoebqin\",\"type\":\"ipnwj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Configuration response = manager.configurations() - .getWithResponse("uwnpqxpxiwfcng", "saasiixtmkzj", "kv", com.azure.core.util.Context.NONE) + .getWithResponse("mribiat", "gplucfotangcfhny", "zcugswvxwlmzqw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hgfgrwsd", response.value()); - Assertions.assertEquals("ffm", response.source()); + Assertions.assertEquals("xnjmxm", response.value()); + Assertions.assertEquals("zphdugneiknp", response.source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerMockTests.java index c6b3189f960f..c628683cf3ad 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerMockTests.java @@ -22,7 +22,7 @@ public final class ConfigurationsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"value\":\"ouwtl\",\"description\":\"jyuojqtobaxkjeyt\",\"defaultValue\":\"lbfjkwr\",\"dataType\":\"Integer\",\"allowedValues\":\"qbhsyrq\",\"source\":\"jqhden\",\"isDynamicConfig\":false,\"isReadOnly\":false,\"isConfigPendingRestart\":true,\"unit\":\"d\",\"documentationLink\":\"fmjnnawtqa\"},\"id\":\"xuckpggqoweyir\",\"name\":\"hlisngw\",\"type\":\"lqqmpiz\"}]}"; + = "{\"value\":[{\"properties\":{\"value\":\"wtglxx\",\"description\":\"jfpgpicrmn\",\"defaultValue\":\"rgmqgjs\",\"dataType\":\"Enumeration\",\"allowedValues\":\"cbfrm\",\"source\":\"dths\",\"isDynamicConfig\":true,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"a\",\"documentationLink\":\"lacjfrnxo\"},\"id\":\"xauzlwvsgmwohqfz\",\"name\":\"zvuxm\",\"type\":\"kjsvthnwpzteko\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.configurations().listByServer("nbmhyree", "dzqavbpdqmjxlyyz", com.azure.core.util.Context.NONE); + = manager.configurations().listByServer("vkhlggdhbemz", "kzsz", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ouwtl", response.iterator().next().value()); - Assertions.assertEquals("jqhden", response.iterator().next().source()); + Assertions.assertEquals("wtglxx", response.iterator().next().value()); + Assertions.assertEquals("dths", response.iterator().next().source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutMockTests.java index 6d8a91cdd28a..634537854366 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutMockTests.java @@ -21,7 +21,7 @@ public final class ConfigurationsPutMockTests { @Test public void testPut() throws Exception { String responseStr - = "{\"properties\":{\"value\":\"bgkc\",\"description\":\"hpzvuqdflvoniyp\",\"defaultValue\":\"ubcpzgpxti\",\"dataType\":\"Boolean\",\"allowedValues\":\"nidibgqjxg\",\"source\":\"r\",\"isDynamicConfig\":false,\"isReadOnly\":false,\"isConfigPendingRestart\":false,\"unit\":\"kqmhhaowjr\",\"documentationLink\":\"vuporqzdfuydzv\"},\"id\":\"vxcnqmxqps\",\"name\":\"okmvkhlggd\",\"type\":\"bemzqkzszuwi\"}"; + = "{\"properties\":{\"value\":\"rngbtcjuahokqtob\",\"description\":\"uxofshfphwpnulai\",\"defaultValue\":\"zejywhslw\",\"dataType\":\"Integer\",\"allowedValues\":\"llndnpd\",\"source\":\"pqafgfugsnnfhy\",\"isDynamicConfig\":false,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"octfjgtixrjvzuyt\",\"documentationLink\":\"mlmuowol\"},\"id\":\"uir\",\"name\":\"p\",\"type\":\"ons\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testPut() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Configuration response = manager.configurations() - .define("w") - .withExistingFlexibleServer("oiquvrehmrnjhvs", "jztczytqj") - .withValue("unfprnjletlxs") - .withSource("mzyospspshck") + .define("kkholvdndvia") + .withExistingFlexibleServer("ujqlafcbahh", "zpofoiyjwpfilk") + .withValue("phuartv") + .withSource("snewmozqvbub") .create(); - Assertions.assertEquals("bgkc", response.value()); - Assertions.assertEquals("r", response.source()); + Assertions.assertEquals("rngbtcjuahokqtob", response.value()); + Assertions.assertEquals("pqafgfugsnnfhy", response.source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseInnerTests.java new file mode 100644 index 000000000000..39d3709c0e1b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseInnerTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.DatabaseInner; +import org.junit.jupiter.api.Assertions; + +public final class DatabaseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DatabaseInner model = BinaryData.fromString( + "{\"properties\":{\"charset\":\"e\",\"collation\":\"t\"},\"id\":\"aqtdoqmcbx\",\"name\":\"wvxysl\",\"type\":\"bhsfxob\"}") + .toObject(DatabaseInner.class); + Assertions.assertEquals("e", model.charset()); + Assertions.assertEquals("t", model.collation()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DatabaseInner model = new DatabaseInner().withCharset("e").withCollation("t"); + model = BinaryData.fromObject(model).toObject(DatabaseInner.class); + Assertions.assertEquals("e", model.charset()); + Assertions.assertEquals("t", model.collation()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseListTests.java new file mode 100644 index 000000000000..36681967bf75 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseListTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.DatabaseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DatabaseList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DatabaseListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DatabaseList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"charset\":\"ohxcrsbfova\",\"collation\":\"ruvw\"},\"id\":\"sqfsubcgjbirxb\",\"name\":\"ybsrfbjfdtwss\",\"type\":\"t\"},{\"properties\":{\"charset\":\"vjz\",\"collation\":\"xilzznf\"},\"id\":\"nvwpmqtaruouj\",\"name\":\"kcjhwqytjrybnwj\",\"type\":\"wgdrjervnaenqp\"},{\"properties\":{\"charset\":\"ndoygmifthnzdnd\",\"collation\":\"gnayqigynduh\"},\"id\":\"hqlkthumaqo\",\"name\":\"bgycduiertgccym\",\"type\":\"aolps\"},{\"properties\":{\"charset\":\"lfmmdnbbglzpswi\",\"collation\":\"mcwyhzdxssadb\"},\"id\":\"nvdfznuda\",\"name\":\"dvxzbncblylpst\",\"type\":\"bhhxsrzdzuc\"}],\"nextLink\":\"scdntnevf\"}") + .toObject(DatabaseList.class); + Assertions.assertEquals("ohxcrsbfova", model.value().get(0).charset()); + Assertions.assertEquals("ruvw", model.value().get(0).collation()); + Assertions.assertEquals("scdntnevf", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DatabaseList model = new DatabaseList() + .withValue(Arrays.asList(new DatabaseInner().withCharset("ohxcrsbfova").withCollation("ruvw"), + new DatabaseInner().withCharset("vjz").withCollation("xilzznf"), + new DatabaseInner().withCharset("ndoygmifthnzdnd").withCollation("gnayqigynduh"), + new DatabaseInner().withCharset("lfmmdnbbglzpswi").withCollation("mcwyhzdxssadb"))) + .withNextLink("scdntnevf"); + model = BinaryData.fromObject(model).toObject(DatabaseList.class); + Assertions.assertEquals("ohxcrsbfova", model.value().get(0).charset()); + Assertions.assertEquals("ruvw", model.value().get(0).collation()); + Assertions.assertEquals("scdntnevf", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseMigrationStateTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseMigrationStateTests.java new file mode 100644 index 000000000000..f0ed5985d27f --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseMigrationStateTests.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DatabaseMigrationState; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationDatabaseState; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class DatabaseMigrationStateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DatabaseMigrationState model = BinaryData.fromString( + "{\"databaseName\":\"obqwcsdbnwdcfh\",\"migrationState\":\"Succeeded\",\"migrationOperation\":\"pfuvglsbjjca\",\"startedOn\":\"2021-05-27T00:53:27Z\",\"endedOn\":\"2021-05-06T23:29:51Z\",\"fullLoadQueuedTables\":152007455,\"fullLoadErroredTables\":596883756,\"fullLoadLoadingTables\":1601872964,\"fullLoadCompletedTables\":1320056895,\"cdcUpdateCounter\":574519404,\"cdcDeleteCounter\":175295404,\"cdcInsertCounter\":1945766703,\"appliedChanges\":1218996877,\"incomingChanges\":1229712399,\"latency\":754766432,\"message\":\"dflvkg\"}") + .toObject(DatabaseMigrationState.class); + Assertions.assertEquals("obqwcsdbnwdcfh", model.databaseName()); + Assertions.assertEquals(MigrationDatabaseState.SUCCEEDED, model.migrationState()); + Assertions.assertEquals("pfuvglsbjjca", model.migrationOperation()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-27T00:53:27Z"), model.startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T23:29:51Z"), model.endedOn()); + Assertions.assertEquals(152007455, model.fullLoadQueuedTables()); + Assertions.assertEquals(596883756, model.fullLoadErroredTables()); + Assertions.assertEquals(1601872964, model.fullLoadLoadingTables()); + Assertions.assertEquals(1320056895, model.fullLoadCompletedTables()); + Assertions.assertEquals(574519404, model.cdcUpdateCounter()); + Assertions.assertEquals(175295404, model.cdcDeleteCounter()); + Assertions.assertEquals(1945766703, model.cdcInsertCounter()); + Assertions.assertEquals(1218996877, model.appliedChanges()); + Assertions.assertEquals(1229712399, model.incomingChanges()); + Assertions.assertEquals(754766432, model.latency()); + Assertions.assertEquals("dflvkg", model.message()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DatabaseMigrationState model = new DatabaseMigrationState().withDatabaseName("obqwcsdbnwdcfh") + .withMigrationState(MigrationDatabaseState.SUCCEEDED) + .withMigrationOperation("pfuvglsbjjca") + .withStartedOn(OffsetDateTime.parse("2021-05-27T00:53:27Z")) + .withEndedOn(OffsetDateTime.parse("2021-05-06T23:29:51Z")) + .withFullLoadQueuedTables(152007455) + .withFullLoadErroredTables(596883756) + .withFullLoadLoadingTables(1601872964) + .withFullLoadCompletedTables(1320056895) + .withCdcUpdateCounter(574519404) + .withCdcDeleteCounter(175295404) + .withCdcInsertCounter(1945766703) + .withAppliedChanges(1218996877) + .withIncomingChanges(1229712399) + .withLatency(754766432) + .withMessage("dflvkg"); + model = BinaryData.fromObject(model).toObject(DatabaseMigrationState.class); + Assertions.assertEquals("obqwcsdbnwdcfh", model.databaseName()); + Assertions.assertEquals(MigrationDatabaseState.SUCCEEDED, model.migrationState()); + Assertions.assertEquals("pfuvglsbjjca", model.migrationOperation()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-27T00:53:27Z"), model.startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T23:29:51Z"), model.endedOn()); + Assertions.assertEquals(152007455, model.fullLoadQueuedTables()); + Assertions.assertEquals(596883756, model.fullLoadErroredTables()); + Assertions.assertEquals(1601872964, model.fullLoadLoadingTables()); + Assertions.assertEquals(1320056895, model.fullLoadCompletedTables()); + Assertions.assertEquals(574519404, model.cdcUpdateCounter()); + Assertions.assertEquals(175295404, model.cdcDeleteCounter()); + Assertions.assertEquals(1945766703, model.cdcInsertCounter()); + Assertions.assertEquals(1218996877, model.appliedChanges()); + Assertions.assertEquals(1229712399, model.incomingChanges()); + Assertions.assertEquals(754766432, model.latency()); + Assertions.assertEquals("dflvkg", model.message()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasePropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasePropertiesTests.java new file mode 100644 index 000000000000..170250a5719d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasePropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.DatabaseProperties; +import org.junit.jupiter.api.Assertions; + +public final class DatabasePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DatabaseProperties model = BinaryData.fromString("{\"charset\":\"tkblmpewww\",\"collation\":\"krvrns\"}") + .toObject(DatabaseProperties.class); + Assertions.assertEquals("tkblmpewww", model.charset()); + Assertions.assertEquals("krvrns", model.collation()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DatabaseProperties model = new DatabaseProperties().withCharset("tkblmpewww").withCollation("krvrns"); + model = BinaryData.fromObject(model).toObject(DatabaseProperties.class); + Assertions.assertEquals("tkblmpewww", model.charset()); + Assertions.assertEquals("krvrns", model.collation()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateMockTests.java index 3c8c884b51e8..93e01c30f16b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateMockTests.java @@ -21,7 +21,7 @@ public final class DatabasesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"charset\":\"nwjfu\",\"collation\":\"lafcbahh\"},\"id\":\"pofoi\",\"name\":\"jwpfilkm\",\"type\":\"kholvd\"}"; + = "{\"properties\":{\"charset\":\"lbnseqac\",\"collation\":\"vpilg\"},\"id\":\"oq\",\"name\":\"agmdit\",\"type\":\"ueio\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Database response = manager.databases() - .define("oxgjiuqhibt") - .withExistingFlexibleServer("dkvgfabuiyjibuzp", "dugneiknp") - .withCharset("pqwjedm") - .withCollation("r") + .define("cnwfepbnwgfmxjg") + .withExistingFlexibleServer("o", "gebx") + .withCharset("jbgdlfgtdysnaquf") + .withCollation("bctqhamzjrwd") .create(); - Assertions.assertEquals("nwjfu", response.charset()); - Assertions.assertEquals("lafcbahh", response.collation()); + Assertions.assertEquals("lbnseqac", response.charset()); + Assertions.assertEquals("vpilg", response.collation()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteMockTests.java deleted file mode 100644 index cc17c89bc865..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteMockTests.java +++ /dev/null @@ -1,33 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DatabasesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.databases().delete("tglxx", "ljfp", "picrmnzhrgmqgjsx", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetWithResponseMockTests.java index baf269a4b70d..a0417baef6f3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class DatabasesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"charset\":\"usx\",\"collation\":\"zlwvsgmwohqfz\"},\"id\":\"vux\",\"name\":\"mk\",\"type\":\"svth\"}"; + = "{\"properties\":{\"charset\":\"ekhenl\",\"collation\":\"fnrdtjxtxr\"},\"id\":\"qtj\",\"name\":\"idttgepus\",\"type\":\"vyjtcvu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Database response = manager.databases() - .getWithResponse("pqcbfrmbodthsq", "gvriibakclac", "fr", com.azure.core.util.Context.NONE) + .getWithResponse("onwpnga", "innixjawrtmjfj", "yccxlzhcox", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("usx", response.charset()); - Assertions.assertEquals("zlwvsgmwohqfz", response.collation()); + Assertions.assertEquals("ekhenl", response.charset()); + Assertions.assertEquals("fnrdtjxtxr", response.collation()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerMockTests.java index ed4b73701b23..0d453e7f1518 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerMockTests.java @@ -22,7 +22,7 @@ public final class DatabasesListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"charset\":\"fhnykzcugs\",\"collation\":\"x\"},\"id\":\"mzqwmvtxnjmxmcu\",\"name\":\"udtc\",\"type\":\"clxyn\"}]}"; + = "{\"value\":[{\"properties\":{\"charset\":\"ygtuhx\",\"collation\":\"cbuewmrswnjlxuz\"},\"id\":\"wpusxjbaqehg\",\"name\":\"dohzjq\",\"type\":\"tu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.databases().listByServer("wpztekovmribia", "tgplucfota", com.azure.core.util.Context.NONE); + = manager.databases().listByServer("kasizie", "fuughtuqfec", com.azure.core.util.Context.NONE); - Assertions.assertEquals("fhnykzcugs", response.iterator().next().charset()); - Assertions.assertEquals("x", response.iterator().next().collation()); + Assertions.assertEquals("ygtuhx", response.iterator().next().charset()); + Assertions.assertEquals("cbuewmrswnjlxuz", response.iterator().next().collation()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbLevelValidationStatusTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbLevelValidationStatusTests.java new file mode 100644 index 000000000000..f4f5ed37e2c4 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbLevelValidationStatusTests.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DbLevelValidationStatus; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationMessage; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationState; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationSummaryItem; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DbLevelValidationStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DbLevelValidationStatus model = BinaryData.fromString( + "{\"databaseName\":\"yuhhziu\",\"startedOn\":\"2021-07-06T04:06:38Z\",\"endedOn\":\"2021-08-01T09:41:30Z\",\"summary\":[{\"type\":\"msmlmzq\",\"state\":\"Failed\",\"messages\":[{\"state\":\"Failed\",\"message\":\"qu\"},{\"state\":\"Succeeded\",\"message\":\"icslfaoq\"}]},{\"type\":\"iyylhalnswhccsp\",\"state\":\"Warning\",\"messages\":[{\"state\":\"Succeeded\",\"message\":\"qscywu\"},{\"state\":\"Succeeded\",\"message\":\"luhczbw\"},{\"state\":\"Succeeded\",\"message\":\"i\"}]},{\"type\":\"brgz\",\"state\":\"Warning\",\"messages\":[{\"state\":\"Succeeded\",\"message\":\"qwdxggicc\"}]},{\"type\":\"xqhuexm\",\"state\":\"Failed\",\"messages\":[{\"state\":\"Failed\",\"message\":\"zywemhzrncsdtclu\"},{\"state\":\"Succeeded\",\"message\":\"bsfgytguslfea\"},{\"state\":\"Succeeded\",\"message\":\"qukyhejhzi\"},{\"state\":\"Succeeded\",\"message\":\"pelol\"}]}]}") + .toObject(DbLevelValidationStatus.class); + Assertions.assertEquals("yuhhziu", model.databaseName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-06T04:06:38Z"), model.startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-01T09:41:30Z"), model.endedOn()); + Assertions.assertEquals("msmlmzq", model.summary().get(0).type()); + Assertions.assertEquals(ValidationState.FAILED, model.summary().get(0).state()); + Assertions.assertEquals(ValidationState.FAILED, model.summary().get(0).messages().get(0).state()); + Assertions.assertEquals("qu", model.summary().get(0).messages().get(0).message()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DbLevelValidationStatus model + = new DbLevelValidationStatus().withDatabaseName("yuhhziu") + .withStartedOn(OffsetDateTime.parse("2021-07-06T04:06:38Z")) + .withEndedOn(OffsetDateTime.parse("2021-08-01T09:41:30Z")) + .withSummary( + Arrays + .asList( + new ValidationSummaryItem().withType("msmlmzq") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList( + new ValidationMessage().withState(ValidationState.FAILED).withMessage("qu"), + new ValidationMessage().withState(ValidationState.SUCCEEDED) + .withMessage("icslfaoq"))), + new ValidationSummaryItem().withType("iyylhalnswhccsp") + .withState(ValidationState.WARNING) + .withMessages(Arrays.asList( + new ValidationMessage().withState(ValidationState.SUCCEEDED).withMessage("qscywu"), + new ValidationMessage().withState(ValidationState.SUCCEEDED) + .withMessage("luhczbw"), + new ValidationMessage().withState(ValidationState.SUCCEEDED).withMessage("i"))), + new ValidationSummaryItem().withType("brgz") + .withState(ValidationState.WARNING) + .withMessages( + Arrays + .asList(new ValidationMessage().withState(ValidationState.SUCCEEDED) + .withMessage("qwdxggicc"))), + new ValidationSummaryItem().withType("xqhuexm") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList( + new ValidationMessage().withState(ValidationState.FAILED) + .withMessage("zywemhzrncsdtclu"), + new ValidationMessage() + .withState(ValidationState.SUCCEEDED) + .withMessage("bsfgytguslfea"), + new ValidationMessage() + .withState(ValidationState.SUCCEEDED) + .withMessage("qukyhejhzi"), + new ValidationMessage().withState(ValidationState.SUCCEEDED) + .withMessage("pelol"))))); + model = BinaryData.fromObject(model).toObject(DbLevelValidationStatus.class); + Assertions.assertEquals("yuhhziu", model.databaseName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-06T04:06:38Z"), model.startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-01T09:41:30Z"), model.endedOn()); + Assertions.assertEquals("msmlmzq", model.summary().get(0).type()); + Assertions.assertEquals(ValidationState.FAILED, model.summary().get(0).state()); + Assertions.assertEquals(ValidationState.FAILED, model.summary().get(0).messages().get(0).state()); + Assertions.assertEquals("qu", model.summary().get(0).messages().get(0).message()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbServerMetadataTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbServerMetadataTests.java new file mode 100644 index 000000000000..29cd27678fe4 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbServerMetadataTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DbServerMetadata; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerSku; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; +import org.junit.jupiter.api.Assertions; + +public final class DbServerMetadataTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DbServerMetadata model = BinaryData.fromString( + "{\"location\":\"vk\",\"version\":\"pqvujzraehtwdwrf\",\"storageMb\":575939452,\"sku\":{\"name\":\"yrcdlbhshfwprac\",\"tier\":\"Burstable\"}}") + .toObject(DbServerMetadata.class); + Assertions.assertEquals("pqvujzraehtwdwrf", model.version()); + Assertions.assertEquals(575939452, model.storageMb()); + Assertions.assertEquals("yrcdlbhshfwprac", model.sku().name()); + Assertions.assertEquals(SkuTier.BURSTABLE, model.sku().tier()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DbServerMetadata model = new DbServerMetadata().withVersion("pqvujzraehtwdwrf") + .withStorageMb(575939452) + .withSku(new ServerSku().withName("yrcdlbhshfwprac").withTier(SkuTier.BURSTABLE)); + model = BinaryData.fromObject(model).toObject(DbServerMetadata.class); + Assertions.assertEquals("pqvujzraehtwdwrf", model.version()); + Assertions.assertEquals(575939452, model.storageMb()); + Assertions.assertEquals("yrcdlbhshfwprac", model.sku().name()); + Assertions.assertEquals(SkuTier.BURSTABLE, model.sku().tier()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DelegatedSubnetUsageTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DelegatedSubnetUsageTests.java new file mode 100644 index 000000000000..555d2e44725b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DelegatedSubnetUsageTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DelegatedSubnetUsage; + +public final class DelegatedSubnetUsageTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DelegatedSubnetUsage model + = BinaryData.fromString("{\"subnetName\":\"brlttymsjnygq\",\"usage\":5868166807959460587}") + .toObject(DelegatedSubnetUsage.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DelegatedSubnetUsage model = new DelegatedSubnetUsage(); + model = BinaryData.fromObject(model).toObject(DelegatedSubnetUsage.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FastProvisioningEditionCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FastProvisioningEditionCapabilityTests.java new file mode 100644 index 000000000000..775232e0dbdb --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FastProvisioningEditionCapabilityTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningEditionCapability; + +public final class FastProvisioningEditionCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FastProvisioningEditionCapability model = BinaryData.fromString( + "{\"supportedTier\":\"eemaofmxagkvtme\",\"supportedSku\":\"qkrhahvljua\",\"supportedStorageGb\":836090349,\"supportedServerVersions\":\"hcdhmdual\",\"serverCount\":115440556,\"status\":\"Default\",\"reason\":\"fadmws\"}") + .toObject(FastProvisioningEditionCapability.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FastProvisioningEditionCapability model = new FastProvisioningEditionCapability(); + model = BinaryData.fromObject(model).toObject(FastProvisioningEditionCapability.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleInnerTests.java new file mode 100644 index 000000000000..571fdc7e4763 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleInnerTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FirewallRuleInner; +import org.junit.jupiter.api.Assertions; + +public final class FirewallRuleInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FirewallRuleInner model = BinaryData.fromString( + "{\"properties\":{\"startIpAddress\":\"wjmy\",\"endIpAddress\":\"tdss\"},\"id\":\"wtmwerio\",\"name\":\"zpyqsemwab\",\"type\":\"ets\"}") + .toObject(FirewallRuleInner.class); + Assertions.assertEquals("wjmy", model.startIpAddress()); + Assertions.assertEquals("tdss", model.endIpAddress()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FirewallRuleInner model = new FirewallRuleInner().withStartIpAddress("wjmy").withEndIpAddress("tdss"); + model = BinaryData.fromObject(model).toObject(FirewallRuleInner.class); + Assertions.assertEquals("wjmy", model.startIpAddress()); + Assertions.assertEquals("tdss", model.endIpAddress()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleListTests.java new file mode 100644 index 000000000000..7795d1274bda --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleListTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FirewallRuleInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.FirewallRuleList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class FirewallRuleListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FirewallRuleList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"startIpAddress\":\"k\",\"endIpAddress\":\"wtppjflcxogaoko\"},\"id\":\"m\",\"name\":\"sikvmkqzeqqkdlt\",\"type\":\"zxmhhvhgu\"}],\"nextLink\":\"odkwobd\"}") + .toObject(FirewallRuleList.class); + Assertions.assertEquals("k", model.value().get(0).startIpAddress()); + Assertions.assertEquals("wtppjflcxogaoko", model.value().get(0).endIpAddress()); + Assertions.assertEquals("odkwobd", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FirewallRuleList model = new FirewallRuleList() + .withValue( + Arrays.asList(new FirewallRuleInner().withStartIpAddress("k").withEndIpAddress("wtppjflcxogaoko"))) + .withNextLink("odkwobd"); + model = BinaryData.fromObject(model).toObject(FirewallRuleList.class); + Assertions.assertEquals("k", model.value().get(0).startIpAddress()); + Assertions.assertEquals("wtppjflcxogaoko", model.value().get(0).endIpAddress()); + Assertions.assertEquals("odkwobd", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulePropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulePropertiesTests.java new file mode 100644 index 000000000000..bc8a3535404b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulePropertiesTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FirewallRuleProperties; +import org.junit.jupiter.api.Assertions; + +public final class FirewallRulePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FirewallRuleProperties model + = BinaryData.fromString("{\"startIpAddress\":\"hszhedplvwiwu\",\"endIpAddress\":\"mwmbes\"}") + .toObject(FirewallRuleProperties.class); + Assertions.assertEquals("hszhedplvwiwu", model.startIpAddress()); + Assertions.assertEquals("mwmbes", model.endIpAddress()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FirewallRuleProperties model + = new FirewallRuleProperties().withStartIpAddress("hszhedplvwiwu").withEndIpAddress("mwmbes"); + model = BinaryData.fromObject(model).toObject(FirewallRuleProperties.class); + Assertions.assertEquals("hszhedplvwiwu", model.startIpAddress()); + Assertions.assertEquals("mwmbes", model.endIpAddress()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateMockTests.java index 2283ce9a8b3c..ea6767a839c9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateMockTests.java @@ -21,7 +21,7 @@ public final class FirewallRulesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"startIpAddress\":\"jxtxrdc\",\"endIpAddress\":\"tjvidt\"},\"id\":\"epu\",\"name\":\"lvyjtcvuwkas\",\"type\":\"zies\"}"; + = "{\"properties\":{\"startIpAddress\":\"nchrszizoyu\",\"endIpAddress\":\"lyetndnbfqygg\"},\"id\":\"flnlgmtr\",\"name\":\"ahzjmucftb\",\"type\":\"r\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FirewallRule response = manager.firewallRules() - .define("rmlmuowo") - .withExistingFlexibleServer("tefypococtfjgti", "rjvzuyt") - .withStartIpAddress("bauiropi") - .withEndIpAddress("nszonwpngaj") + .define("guaucmfdjwnla") + .withExistingFlexibleServer("penuy", "bqeqqekewvnqvcd") + .withStartIpAddress("punj") + .withEndIpAddress("ikczvvitacgxmf") .create(); - Assertions.assertEquals("jxtxrdc", response.startIpAddress()); - Assertions.assertEquals("tjvidt", response.endIpAddress()); + Assertions.assertEquals("nchrszizoyu", response.startIpAddress()); + Assertions.assertEquals("lyetndnbfqygg", response.endIpAddress()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteMockTests.java deleted file mode 100644 index 11e519e7d722..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteMockTests.java +++ /dev/null @@ -1,33 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FirewallRulesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.firewallRules().delete("dviauogp", "uartvti", "kyefchnmnahmnxhk", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetWithResponseMockTests.java index 47f7d4eb28fd..48618e3c3ff6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class FirewallRulesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"startIpAddress\":\"hx\",\"endIpAddress\":\"rsnewmozqvbubqma\"},\"id\":\"sycxhxzgaz\",\"name\":\"taboidvmf\",\"type\":\"hppubowsepdfgkmt\"}"; + = "{\"properties\":{\"startIpAddress\":\"xofvcjk\",\"endIpAddress\":\"dirazf\"},\"id\":\"ejwabmdujtmvco\",\"name\":\"excmjurbuhhl\",\"type\":\"yqltqsro\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FirewallRule response = manager.firewallRules() - .getWithResponse("jqirwrw", "ooxf", "i", com.azure.core.util.Context.NONE) + .getWithResponse("kjbsah", "tdtpdelqacslmo", "oebn", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hx", response.startIpAddress()); - Assertions.assertEquals("rsnewmozqvbubqma", response.endIpAddress()); + Assertions.assertEquals("xofvcjk", response.startIpAddress()); + Assertions.assertEquals("dirazf", response.endIpAddress()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerMockTests.java index 2d66516df0eb..4877dba352c4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerMockTests.java @@ -22,7 +22,7 @@ public final class FirewallRulesListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"startIpAddress\":\"uahokq\",\"endIpAddress\":\"obkauxofsh\"},\"id\":\"hwpnulaiywzejywh\",\"name\":\"lwkojpllndnpdw\",\"type\":\"pqafgfugsnnfhy\"}]}"; + = "{\"value\":[{\"properties\":{\"startIpAddress\":\"fvcl\",\"endIpAddress\":\"lxnfuijtkbusqogs\"},\"id\":\"kayi\",\"name\":\"nsharujtjiqxfzyj\",\"type\":\"ttvwkpqh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.firewallRules().listByServer("herngb", "c", com.azure.core.util.Context.NONE); + = manager.firewallRules().listByServer("tuwkffdj", "tsysi", com.azure.core.util.Context.NONE); - Assertions.assertEquals("uahokq", response.iterator().next().startIpAddress()); - Assertions.assertEquals("obkauxofsh", response.iterator().next().endIpAddress()); + Assertions.assertEquals("fvcl", response.iterator().next().startIpAddress()); + Assertions.assertEquals("lxnfuijtkbusqogs", response.iterator().next().endIpAddress()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityForPatchTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityForPatchTests.java new file mode 100644 index 000000000000..2dd804451484 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityForPatchTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode; +import org.junit.jupiter.api.Assertions; + +public final class HighAvailabilityForPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HighAvailabilityForPatch model = BinaryData + .fromString("{\"mode\":\"SameZone\",\"state\":\"Healthy\",\"standbyAvailabilityZone\":\"fkyrk\"}") + .toObject(HighAvailabilityForPatch.class); + Assertions.assertEquals(HighAvailabilityMode.SAME_ZONE, model.mode()); + Assertions.assertEquals("fkyrk", model.standbyAvailabilityZone()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HighAvailabilityForPatch model = new HighAvailabilityForPatch().withMode(HighAvailabilityMode.SAME_ZONE) + .withStandbyAvailabilityZone("fkyrk"); + model = BinaryData.fromObject(model).toObject(HighAvailabilityForPatch.class); + Assertions.assertEquals(HighAvailabilityMode.SAME_ZONE, model.mode()); + Assertions.assertEquals("fkyrk", model.standbyAvailabilityZone()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityTests.java new file mode 100644 index 000000000000..8aee4f3a7ab7 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode; +import org.junit.jupiter.api.Assertions; + +public final class HighAvailabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HighAvailability model = BinaryData + .fromString( + "{\"mode\":\"ZoneRedundant\",\"state\":\"FailingOver\",\"standbyAvailabilityZone\":\"hgkfmin\"}") + .toObject(HighAvailability.class); + Assertions.assertEquals(HighAvailabilityMode.ZONE_REDUNDANT, model.mode()); + Assertions.assertEquals("hgkfmin", model.standbyAvailabilityZone()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HighAvailability model = new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT) + .withStandbyAvailabilityZone("hgkfmin"); + model = BinaryData.fromObject(model).toObject(HighAvailability.class); + Assertions.assertEquals(HighAvailabilityMode.ZONE_REDUNDANT, model.mode()); + Assertions.assertEquals("hgkfmin", model.standbyAvailabilityZone()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ImpactRecordTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ImpactRecordTests.java new file mode 100644 index 000000000000..ef00c91f2f6d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ImpactRecordTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ImpactRecord; +import org.junit.jupiter.api.Assertions; + +public final class ImpactRecordTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ImpactRecord model = BinaryData.fromString( + "{\"dimensionName\":\"qikfxcv\",\"unit\":\"fsphuagrttikt\",\"queryId\":6566397554835939309,\"absoluteValue\":40.716755209430964}") + .toObject(ImpactRecord.class); + Assertions.assertEquals("qikfxcv", model.dimensionName()); + Assertions.assertEquals("fsphuagrttikt", model.unit()); + Assertions.assertEquals(6566397554835939309L, model.queryId()); + Assertions.assertEquals(40.716755209430964D, model.absoluteValue()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ImpactRecord model = new ImpactRecord().withDimensionName("qikfxcv") + .withUnit("fsphuagrttikt") + .withQueryId(6566397554835939309L) + .withAbsoluteValue(40.716755209430964D); + model = BinaryData.fromObject(model).toObject(ImpactRecord.class); + Assertions.assertEquals("qikfxcv", model.dimensionName()); + Assertions.assertEquals("fsphuagrttikt", model.unit()); + Assertions.assertEquals(6566397554835939309L, model.queryId()); + Assertions.assertEquals(40.716755209430964D, model.absoluteValue()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LocationBasedCapabilitiesExecuteMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LocationBasedCapabilitiesExecuteMockTests.java deleted file mode 100644 index 9389521161db..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LocationBasedCapabilitiesExecuteMockTests.java +++ /dev/null @@ -1,39 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerCapability; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LocationBasedCapabilitiesExecuteMockTests { - @Test - public void testExecute() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"i\",\"supportedServerEditions\":[{\"name\":\"yui\",\"defaultSkuName\":\"bsnmfpph\",\"supportedStorageEditions\":[{\"name\":\"vyhyhsgzfc\",\"defaultStorageSizeMb\":1704315015203532161,\"supportedStorageMb\":[{},{}],\"status\":\"Available\",\"reason\":\"glqgleoh\"}],\"supportedServerSkus\":[{\"name\":\"nlu\",\"vCores\":1087949642,\"supportedIops\":416708927,\"supportedMemoryPerVcoreMb\":8132506550445245383,\"supportedZones\":[\"btijvacvbm\",\"z\",\"qqxlajr\",\"wxacevehj\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"aoqltfaey\",\"status\":\"Visible\",\"reason\":\"fgvxirpghriypoqe\"},{\"name\":\"lqhykprlpyz\",\"vCores\":1860731641,\"supportedIops\":184808617,\"supportedMemoryPerVcoreMb\":987189156165861537,\"supportedZones\":[\"iitdfuxt\",\"asiibmiybnnust\",\"nlj\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"vmqfoud\",\"status\":\"Default\",\"reason\":\"gyyprotwy\"},{\"name\":\"ndm\",\"vCores\":384308231,\"supportedIops\":2095603265,\"supportedMemoryPerVcoreMb\":4812116818794427948,\"supportedZones\":[\"vlgo\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"tzfjltf\",\"status\":\"Available\",\"reason\":\"yj\"}],\"status\":\"Default\",\"reason\":\"vopvp\"},{\"name\":\"bzqgqqi\",\"defaultSkuName\":\"dsvqwt\",\"supportedStorageEditions\":[{\"name\":\"ibcysihsgqc\",\"defaultStorageSizeMb\":5483811337729194379,\"supportedStorageMb\":[{},{}],\"status\":\"Default\",\"reason\":\"cdzsu\"}],\"supportedServerSkus\":[{\"name\":\"dxbzlmcmuap\",\"vCores\":1828890303,\"supportedIops\":311384823,\"supportedMemoryPerVcoreMb\":258255264781262334,\"supportedZones\":[\"xeyskonqzinkfkbg\",\"z\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"SameZone\",\"SameZone\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"mygvkzqkj\",\"status\":\"Available\",\"reason\":\"bzefezr\"},{\"name\":\"czurtlei\",\"vCores\":1316938253,\"supportedIops\":796775151,\"supportedMemoryPerVcoreMb\":1743008436896438735,\"supportedZones\":[\"zvd\",\"bzdixzmq\",\"noda\",\"opqhewjptmc\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"lnd\",\"status\":\"Available\",\"reason\":\"tmzlbiojlv\"},{\"name\":\"rbbpneqvcwwyy\",\"vCores\":1475443279,\"supportedIops\":996816888,\"supportedMemoryPerVcoreMb\":2957311369623929946,\"supportedZones\":[\"rsnm\",\"k\",\"yzejnhlbk\",\"bzpcpiljhahzvec\"],\"supportedHaMode\":[\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"ehol\",\"status\":\"Disabled\",\"reason\":\"iuubwefqsf\"}],\"status\":\"Available\",\"reason\":\"tf\"}],\"supportedServerVersions\":[{\"name\":\"wexjkmfxapjwogq\",\"supportedVersionsToUpgrade\":[\"bpudcdab\"],\"supportedFeatures\":[{\"name\":\"wyawbzasqbuc\",\"status\":\"Disabled\"},{\"name\":\"yexaoguy\",\"status\":\"Enabled\"}],\"status\":\"Disabled\",\"reason\":\"daultxijjumfq\"},{\"name\":\"z\",\"supportedVersionsToUpgrade\":[\"nm\",\"jng\",\"qdqx\"],\"supportedFeatures\":[{\"name\":\"gny\",\"status\":\"Enabled\"}],\"status\":\"Disabled\",\"reason\":\"vtuikzhajq\"},{\"name\":\"cfhmlrqryxyn\",\"supportedVersionsToUpgrade\":[\"rd\",\"sovwxznptgoeiyb\",\"abpfhvfs\",\"kvntjlrigjkskyri\"],\"supportedFeatures\":[{\"name\":\"idsxwaabzmifry\",\"status\":\"Disabled\"},{\"name\":\"maxriz\",\"status\":\"Enabled\"},{\"name\":\"gopxlhslnelxie\",\"status\":\"Enabled\"}],\"status\":\"Available\",\"reason\":\"xecwcro\"},{\"name\":\"hslhca\",\"supportedVersionsToUpgrade\":[\"tifdwfmvi\"],\"supportedFeatures\":[{\"name\":\"jbt\",\"status\":\"Enabled\"}],\"status\":\"Default\",\"reason\":\"lkafhonqjuje\"}],\"supportedFeatures\":[{\"name\":\"zvcpopm\",\"status\":\"Disabled\"},{\"name\":\"wcltyjede\",\"status\":\"Enabled\"},{\"name\":\"f\",\"status\":\"Disabled\"},{\"name\":\"cazuaw\",\"status\":\"Enabled\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"wabzxrvxcushsp\",\"supportedSku\":\"ivmxyasfl\",\"supportedStorageGb\":1652128908,\"supportedServerVersions\":\"zwywako\",\"serverCount\":1976456758,\"status\":\"Disabled\",\"reason\":\"jblmljhlnymz\"},{\"supportedTier\":\"qyryuzcbmqqvxm\",\"supportedSku\":\"fgtayxonsup\",\"supportedStorageGb\":1744580177,\"supportedServerVersions\":\"zqn\",\"serverCount\":1503247909,\"status\":\"Visible\",\"reason\":\"tnzoibgsxgnxfy\"},{\"supportedTier\":\"nmpqoxwdofdb\",\"supportedSku\":\"qxeiiqbimhtmwwi\",\"supportedStorageGb\":708075307,\"supportedServerVersions\":\"f\",\"serverCount\":1711839978,\"status\":\"Disabled\",\"reason\":\"bcblemb\"},{\"supportedTier\":\"bwvqvxkdi\",\"supportedSku\":\"ihebwtsw\",\"supportedStorageGb\":1832502698,\"supportedServerVersions\":\"fmd\",\"serverCount\":1559781271,\"status\":\"Available\",\"reason\":\"izvcjfe\"}],\"geoBackupSupported\":\"Disabled\",\"zoneRedundantHaSupported\":\"Disabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Enabled\",\"storageAutoGrowthSupported\":\"Enabled\",\"onlineResizeSupported\":\"Enabled\",\"restricted\":\"Disabled\",\"status\":\"Default\",\"reason\":\"bsazgakg\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.locationBasedCapabilities().execute("xotngfdguge", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("i", response.iterator().next().name()); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupRequestTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupRequestTests.java new file mode 100644 index 000000000000..237b78c26f50 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupRequestTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings; +import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; +import org.junit.jupiter.api.Assertions; + +public final class LtrPreBackupRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LtrPreBackupRequest model = BinaryData.fromString("{\"backupSettings\":{\"backupName\":\"gxtibqdxbxw\"}}") + .toObject(LtrPreBackupRequest.class); + Assertions.assertEquals("gxtibqdxbxw", model.backupSettings().backupName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LtrPreBackupRequest model + = new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("gxtibqdxbxw")); + model = BinaryData.fromObject(model).toObject(LtrPreBackupRequest.class); + Assertions.assertEquals("gxtibqdxbxw", model.backupSettings().backupName()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupResponseInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupResponseInnerTests.java new file mode 100644 index 000000000000..a77feacfa140 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupResponseInnerTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner; +import org.junit.jupiter.api.Assertions; + +public final class LtrPreBackupResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LtrPreBackupResponseInner model = BinaryData.fromString("{\"properties\":{\"numberOfContainers\":81041412}}") + .toObject(LtrPreBackupResponseInner.class); + Assertions.assertEquals(81041412, model.numberOfContainers()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LtrPreBackupResponseInner model = new LtrPreBackupResponseInner().withNumberOfContainers(81041412); + model = BinaryData.fromObject(model).toObject(LtrPreBackupResponseInner.class); + Assertions.assertEquals(81041412, model.numberOfContainers()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowForPatchTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowForPatchTests.java new file mode 100644 index 000000000000..a5b3671cdeed --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowForPatchTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindowForPatch; +import org.junit.jupiter.api.Assertions; + +public final class MaintenanceWindowForPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceWindowForPatch model = BinaryData + .fromString( + "{\"customWindow\":\"dg\",\"startHour\":649228036,\"startMinute\":1593534784,\"dayOfWeek\":1141536781}") + .toObject(MaintenanceWindowForPatch.class); + Assertions.assertEquals("dg", model.customWindow()); + Assertions.assertEquals(649228036, model.startHour()); + Assertions.assertEquals(1593534784, model.startMinute()); + Assertions.assertEquals(1141536781, model.dayOfWeek()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MaintenanceWindowForPatch model = new MaintenanceWindowForPatch().withCustomWindow("dg") + .withStartHour(649228036) + .withStartMinute(1593534784) + .withDayOfWeek(1141536781); + model = BinaryData.fromObject(model).toObject(MaintenanceWindowForPatch.class); + Assertions.assertEquals("dg", model.customWindow()); + Assertions.assertEquals(649228036, model.startHour()); + Assertions.assertEquals(1593534784, model.startMinute()); + Assertions.assertEquals(1141536781, model.dayOfWeek()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowTests.java new file mode 100644 index 000000000000..c68e3b5fdd60 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow; +import org.junit.jupiter.api.Assertions; + +public final class MaintenanceWindowTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceWindow model = BinaryData.fromString( + "{\"customWindow\":\"owzfttsttkt\",\"startHour\":631157488,\"startMinute\":1941309010,\"dayOfWeek\":520028629}") + .toObject(MaintenanceWindow.class); + Assertions.assertEquals("owzfttsttkt", model.customWindow()); + Assertions.assertEquals(631157488, model.startHour()); + Assertions.assertEquals(1941309010, model.startMinute()); + Assertions.assertEquals(520028629, model.dayOfWeek()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MaintenanceWindow model = new MaintenanceWindow().withCustomWindow("owzfttsttkt") + .withStartHour(631157488) + .withStartMinute(1941309010) + .withDayOfWeek(520028629); + model = BinaryData.fromObject(model).toObject(MaintenanceWindow.class); + Assertions.assertEquals("owzfttsttkt", model.customWindow()); + Assertions.assertEquals(631157488, model.startHour()); + Assertions.assertEquals(1941309010, model.startMinute()); + Assertions.assertEquals(520028629, model.dayOfWeek()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationNameAvailabilityInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationNameAvailabilityInnerTests.java new file mode 100644 index 000000000000..4a0df8accef0 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationNameAvailabilityInnerTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; +import org.junit.jupiter.api.Assertions; + +public final class MigrationNameAvailabilityInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MigrationNameAvailabilityInner model = BinaryData.fromString( + "{\"name\":\"xrjqcirgzpfrlazs\",\"type\":\"rnwoiindfp\",\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"bt\"}") + .toObject(MigrationNameAvailabilityInner.class); + Assertions.assertEquals("xrjqcirgzpfrlazs", model.name()); + Assertions.assertEquals("rnwoiindfp", model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MigrationNameAvailabilityInner model + = new MigrationNameAvailabilityInner().withName("xrjqcirgzpfrlazs").withType("rnwoiindfp"); + model = BinaryData.fromObject(model).toObject(MigrationNameAvailabilityInner.class); + Assertions.assertEquals("xrjqcirgzpfrlazs", model.name()); + Assertions.assertEquals("rnwoiindfp", model.type()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationStatusTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationStatusTests.java new file mode 100644 index 000000000000..117b37b40940 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationStatusTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationStatus; + +public final class MigrationStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MigrationStatus model = BinaryData.fromString( + "{\"state\":\"Succeeded\",\"error\":\"c\",\"currentSubStateDetails\":{\"currentSubState\":\"WaitingForDataMigrationScheduling\",\"dbDetails\":{\"npkukghimdblx\":{\"databaseName\":\"nxxmueedndrdv\",\"migrationState\":\"Canceling\",\"migrationOperation\":\"qqtch\",\"startedOn\":\"2021-06-10T11:36:20Z\",\"endedOn\":\"2021-05-03T12:58:02Z\",\"fullLoadQueuedTables\":669500000,\"fullLoadErroredTables\":1035796586,\"fullLoadLoadingTables\":1434664141,\"fullLoadCompletedTables\":2035762000,\"cdcUpdateCounter\":2007823107,\"cdcDeleteCounter\":1689077175,\"cdcInsertCounter\":772691250,\"appliedChanges\":490559476,\"incomingChanges\":976430532,\"latency\":434631779,\"message\":\"fudxepxgyqagvrv\"},\"abfatkl\":{\"databaseName\":\"imfnjhfjx\",\"migrationState\":\"Succeeded\",\"migrationOperation\":\"kkfoqr\",\"startedOn\":\"2021-06-21T22:48:50Z\",\"endedOn\":\"2021-05-31T03:25:20Z\",\"fullLoadQueuedTables\":508782992,\"fullLoadErroredTables\":2032728059,\"fullLoadLoadingTables\":1528851064,\"fullLoadCompletedTables\":398738394,\"cdcUpdateCounter\":693357808,\"cdcDeleteCounter\":641008490,\"cdcInsertCounter\":322973840,\"appliedChanges\":1950360907,\"incomingChanges\":1038031643,\"latency\":1240770029,\"message\":\"elsfeaen\"},\"zikhl\":{\"databaseName\":\"xbjhwuaanozjosph\",\"migrationState\":\"Succeeded\",\"migrationOperation\":\"pjrvxagl\",\"startedOn\":\"2021-11-16T13:26:47Z\",\"endedOn\":\"2021-09-23T10:13:50Z\",\"fullLoadQueuedTables\":1410903229,\"fullLoadErroredTables\":2140169496,\"fullLoadLoadingTables\":861887507,\"fullLoadCompletedTables\":802895356,\"cdcUpdateCounter\":835762361,\"cdcDeleteCounter\":992939840,\"cdcInsertCounter\":212130052,\"appliedChanges\":1489104850,\"incomingChanges\":2030573756,\"latency\":1569245436,\"message\":\"ke\"}},\"validationDetails\":{\"status\":\"Warning\",\"validationStartTimeInUtc\":\"2021-06-13T17:28:05Z\",\"validationEndTimeInUtc\":\"2021-02-18T07:54:44Z\",\"serverLevelValidationDetails\":[{\"type\":\"dunyg\",\"state\":\"Succeeded\",\"messages\":[{}]},{\"type\":\"qfatpxllrxcyjm\",\"state\":\"Failed\",\"messages\":[{},{},{},{}]}],\"dbLevelValidationDetails\":[{\"databaseName\":\"m\",\"startedOn\":\"2021-04-05T03:20:46Z\",\"endedOn\":\"2021-05-10T10:07:34Z\",\"summary\":[{},{}]}]}}}") + .toObject(MigrationStatus.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MigrationStatus model = new MigrationStatus(); + model = BinaryData.fromObject(model).toObject(MigrationStatus.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationSubstateDetailsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationSubstateDetailsTests.java new file mode 100644 index 000000000000..fc76d5e8440b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationSubstateDetailsTests.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DatabaseMigrationState; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DbLevelValidationStatus; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationDatabaseState; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSubstateDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationMessage; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationState; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationSummaryItem; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class MigrationSubstateDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MigrationSubstateDetails model = BinaryData.fromString( + "{\"currentSubState\":\"MigratingData\",\"dbDetails\":{\"cqqudf\":{\"databaseName\":\"yxxrwlycoduh\",\"migrationState\":\"Failed\",\"migrationOperation\":\"gymare\",\"startedOn\":\"2021-03-16T20:45:43Z\",\"endedOn\":\"2021-11-23T08:29:11Z\",\"fullLoadQueuedTables\":1568573740,\"fullLoadErroredTables\":1691251601,\"fullLoadLoadingTables\":432489630,\"fullLoadCompletedTables\":1068546777,\"cdcUpdateCounter\":314169873,\"cdcDeleteCounter\":642347272,\"cdcInsertCounter\":1615439443,\"appliedChanges\":2056337569,\"incomingChanges\":1063119881,\"latency\":1853639964,\"message\":\"zqalkrmnjijpx\"},\"aytdwkqbrq\":{\"databaseName\":\"yxbaaabjyvayf\",\"migrationState\":\"InProgress\",\"migrationOperation\":\"zrtuzq\",\"startedOn\":\"2021-05-14T21:16:38Z\",\"endedOn\":\"2021-10-01T08:47:38Z\",\"fullLoadQueuedTables\":218306871,\"fullLoadErroredTables\":850324011,\"fullLoadLoadingTables\":1536688095,\"fullLoadCompletedTables\":512160368,\"cdcUpdateCounter\":2059840008,\"cdcDeleteCounter\":377160768,\"cdcInsertCounter\":1440499034,\"appliedChanges\":10547913,\"incomingChanges\":1475196585,\"latency\":1576556557,\"message\":\"oibjudpfrxtrthz\"}},\"validationDetails\":{\"status\":\"Failed\",\"validationStartTimeInUtc\":\"2021-06-19T07:52:19Z\",\"validationEndTimeInUtc\":\"2021-08-03T15:35:30Z\",\"serverLevelValidationDetails\":[{\"type\":\"ivpdtiir\",\"state\":\"Failed\",\"messages\":[{\"state\":\"Failed\",\"message\":\"r\"},{\"state\":\"Succeeded\",\"message\":\"squyfxrxxlep\"},{\"state\":\"Succeeded\",\"message\":\"xje\"}]}],\"dbLevelValidationDetails\":[{\"databaseName\":\"nwxuqlcvydyp\",\"startedOn\":\"2021-03-01T02:46:01Z\",\"endedOn\":\"2021-08-27T20:00:04Z\",\"summary\":[{\"type\":\"kniod\",\"state\":\"Warning\",\"messages\":[{}]},{\"type\":\"nuj\",\"state\":\"Failed\",\"messages\":[{},{},{},{}]}]},{\"databaseName\":\"vdkcrodtj\",\"startedOn\":\"2021-03-09T18:26:05Z\",\"endedOn\":\"2021-03-22T21:04:29Z\",\"summary\":[{\"type\":\"kacjvefkdlfo\",\"state\":\"Warning\",\"messages\":[{},{}]}]},{\"databaseName\":\"pagao\",\"startedOn\":\"2021-02-23T21:26:17Z\",\"endedOn\":\"2021-11-09T20:51:35Z\",\"summary\":[{\"type\":\"ylsyxkqjnsje\",\"state\":\"Warning\",\"messages\":[{},{},{}]},{\"type\":\"xsdszuempsb\",\"state\":\"Failed\",\"messages\":[{},{},{},{}]},{\"type\":\"yvpnqicvinvkjj\",\"state\":\"Warning\",\"messages\":[{},{},{},{}]},{\"type\":\"ukzclewyhmlwpaz\",\"state\":\"Failed\",\"messages\":[{}]}]},{\"databaseName\":\"cckwyfzqwhxxbu\",\"startedOn\":\"2021-05-27T03:07:24Z\",\"endedOn\":\"2020-12-30T00:37:41Z\",\"summary\":[{\"type\":\"ztppriolxorjalto\",\"state\":\"Succeeded\",\"messages\":[{},{},{}]}]}]}}") + .toObject(MigrationSubstateDetails.class); + Assertions.assertEquals("yxxrwlycoduh", model.dbDetails().get("cqqudf").databaseName()); + Assertions.assertEquals(MigrationDatabaseState.FAILED, model.dbDetails().get("cqqudf").migrationState()); + Assertions.assertEquals("gymare", model.dbDetails().get("cqqudf").migrationOperation()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-16T20:45:43Z"), + model.dbDetails().get("cqqudf").startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-23T08:29:11Z"), + model.dbDetails().get("cqqudf").endedOn()); + Assertions.assertEquals(1568573740, model.dbDetails().get("cqqudf").fullLoadQueuedTables()); + Assertions.assertEquals(1691251601, model.dbDetails().get("cqqudf").fullLoadErroredTables()); + Assertions.assertEquals(432489630, model.dbDetails().get("cqqudf").fullLoadLoadingTables()); + Assertions.assertEquals(1068546777, model.dbDetails().get("cqqudf").fullLoadCompletedTables()); + Assertions.assertEquals(314169873, model.dbDetails().get("cqqudf").cdcUpdateCounter()); + Assertions.assertEquals(642347272, model.dbDetails().get("cqqudf").cdcDeleteCounter()); + Assertions.assertEquals(1615439443, model.dbDetails().get("cqqudf").cdcInsertCounter()); + Assertions.assertEquals(2056337569, model.dbDetails().get("cqqudf").appliedChanges()); + Assertions.assertEquals(1063119881, model.dbDetails().get("cqqudf").incomingChanges()); + Assertions.assertEquals(1853639964, model.dbDetails().get("cqqudf").latency()); + Assertions.assertEquals("zqalkrmnjijpx", model.dbDetails().get("cqqudf").message()); + Assertions.assertEquals(ValidationState.FAILED, model.validationDetails().status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T07:52:19Z"), + model.validationDetails().validationStartTimeInUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T15:35:30Z"), + model.validationDetails().validationEndTimeInUtc()); + Assertions.assertEquals("ivpdtiir", model.validationDetails().serverLevelValidationDetails().get(0).type()); + Assertions.assertEquals(ValidationState.FAILED, + model.validationDetails().serverLevelValidationDetails().get(0).state()); + Assertions.assertEquals(ValidationState.FAILED, + model.validationDetails().serverLevelValidationDetails().get(0).messages().get(0).state()); + Assertions.assertEquals("r", + model.validationDetails().serverLevelValidationDetails().get(0).messages().get(0).message()); + Assertions.assertEquals("nwxuqlcvydyp", + model.validationDetails().dbLevelValidationDetails().get(0).databaseName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-01T02:46:01Z"), + model.validationDetails().dbLevelValidationDetails().get(0).startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-27T20:00:04Z"), + model.validationDetails().dbLevelValidationDetails().get(0).endedOn()); + Assertions.assertEquals("kniod", + model.validationDetails().dbLevelValidationDetails().get(0).summary().get(0).type()); + Assertions.assertEquals(ValidationState.WARNING, + model.validationDetails().dbLevelValidationDetails().get(0).summary().get(0).state()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MigrationSubstateDetails model + = new MigrationSubstateDetails() + .withDbDetails(mapOf("cqqudf", + new DatabaseMigrationState().withDatabaseName("yxxrwlycoduh") + .withMigrationState(MigrationDatabaseState.FAILED) + .withMigrationOperation("gymare") + .withStartedOn(OffsetDateTime.parse("2021-03-16T20:45:43Z")) + .withEndedOn(OffsetDateTime.parse("2021-11-23T08:29:11Z")) + .withFullLoadQueuedTables(1568573740) + .withFullLoadErroredTables(1691251601) + .withFullLoadLoadingTables(432489630) + .withFullLoadCompletedTables(1068546777) + .withCdcUpdateCounter(314169873) + .withCdcDeleteCounter(642347272) + .withCdcInsertCounter(1615439443) + .withAppliedChanges(2056337569) + .withIncomingChanges(1063119881) + .withLatency(1853639964) + .withMessage("zqalkrmnjijpx"), + "aytdwkqbrq", + new DatabaseMigrationState().withDatabaseName("yxbaaabjyvayf") + .withMigrationState(MigrationDatabaseState.IN_PROGRESS) + .withMigrationOperation("zrtuzq") + .withStartedOn(OffsetDateTime.parse("2021-05-14T21:16:38Z")) + .withEndedOn(OffsetDateTime.parse("2021-10-01T08:47:38Z")) + .withFullLoadQueuedTables(218306871) + .withFullLoadErroredTables(850324011) + .withFullLoadLoadingTables(1536688095) + .withFullLoadCompletedTables(512160368) + .withCdcUpdateCounter(2059840008) + .withCdcDeleteCounter(377160768) + .withCdcInsertCounter(1440499034) + .withAppliedChanges(10547913) + .withIncomingChanges(1475196585) + .withLatency(1576556557) + .withMessage("oibjudpfrxtrthz"))) + .withValidationDetails( + new ValidationDetails().withStatus(ValidationState.FAILED) + .withValidationStartTimeInUtc(OffsetDateTime.parse("2021-06-19T07:52:19Z")) + .withValidationEndTimeInUtc(OffsetDateTime.parse("2021-08-03T15:35:30Z")) + .withServerLevelValidationDetails(Arrays.asList(new ValidationSummaryItem().withType("ivpdtiir") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList( + new ValidationMessage().withState(ValidationState.FAILED).withMessage("r"), + new ValidationMessage().withState(ValidationState.SUCCEEDED) + .withMessage("squyfxrxxlep"), + new ValidationMessage().withState(ValidationState.SUCCEEDED).withMessage("xje"))))) + .withDbLevelValidationDetails(Arrays.asList( + new DbLevelValidationStatus().withDatabaseName("nwxuqlcvydyp") + .withStartedOn(OffsetDateTime.parse("2021-03-01T02:46:01Z")) + .withEndedOn(OffsetDateTime.parse("2021-08-27T20:00:04Z")) + .withSummary(Arrays.asList( + new ValidationSummaryItem().withType("kniod") + .withState(ValidationState.WARNING) + .withMessages(Arrays.asList(new ValidationMessage())), + new ValidationSummaryItem().withType("nuj") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), + new ValidationMessage(), new ValidationMessage())))), + new DbLevelValidationStatus().withDatabaseName("vdkcrodtj") + .withStartedOn(OffsetDateTime.parse("2021-03-09T18:26:05Z")) + .withEndedOn(OffsetDateTime.parse("2021-03-22T21:04:29Z")) + .withSummary(Arrays.asList(new ValidationSummaryItem().withType("kacjvefkdlfo") + .withState(ValidationState.WARNING) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage())))), + new DbLevelValidationStatus().withDatabaseName("pagao") + .withStartedOn(OffsetDateTime.parse("2021-02-23T21:26:17Z")) + .withEndedOn(OffsetDateTime.parse("2021-11-09T20:51:35Z")) + .withSummary(Arrays.asList( + new ValidationSummaryItem().withType("ylsyxkqjnsje") + .withState(ValidationState.WARNING) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), + new ValidationMessage())), + new ValidationSummaryItem().withType("xsdszuempsb") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), + new ValidationMessage(), new ValidationMessage())), + new ValidationSummaryItem().withType("yvpnqicvinvkjj") + .withState(ValidationState.WARNING) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), + new ValidationMessage(), new ValidationMessage())), + new ValidationSummaryItem().withType("ukzclewyhmlwpaz") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList(new ValidationMessage())))), + new DbLevelValidationStatus().withDatabaseName("cckwyfzqwhxxbu") + .withStartedOn(OffsetDateTime.parse("2021-05-27T03:07:24Z")) + .withEndedOn(OffsetDateTime.parse("2020-12-30T00:37:41Z")) + .withSummary(Arrays.asList(new ValidationSummaryItem().withType("ztppriolxorjalto") + .withState(ValidationState.SUCCEEDED) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), + new ValidationMessage()))))))); + model = BinaryData.fromObject(model).toObject(MigrationSubstateDetails.class); + Assertions.assertEquals("yxxrwlycoduh", model.dbDetails().get("cqqudf").databaseName()); + Assertions.assertEquals(MigrationDatabaseState.FAILED, model.dbDetails().get("cqqudf").migrationState()); + Assertions.assertEquals("gymare", model.dbDetails().get("cqqudf").migrationOperation()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-16T20:45:43Z"), + model.dbDetails().get("cqqudf").startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-23T08:29:11Z"), + model.dbDetails().get("cqqudf").endedOn()); + Assertions.assertEquals(1568573740, model.dbDetails().get("cqqudf").fullLoadQueuedTables()); + Assertions.assertEquals(1691251601, model.dbDetails().get("cqqudf").fullLoadErroredTables()); + Assertions.assertEquals(432489630, model.dbDetails().get("cqqudf").fullLoadLoadingTables()); + Assertions.assertEquals(1068546777, model.dbDetails().get("cqqudf").fullLoadCompletedTables()); + Assertions.assertEquals(314169873, model.dbDetails().get("cqqudf").cdcUpdateCounter()); + Assertions.assertEquals(642347272, model.dbDetails().get("cqqudf").cdcDeleteCounter()); + Assertions.assertEquals(1615439443, model.dbDetails().get("cqqudf").cdcInsertCounter()); + Assertions.assertEquals(2056337569, model.dbDetails().get("cqqudf").appliedChanges()); + Assertions.assertEquals(1063119881, model.dbDetails().get("cqqudf").incomingChanges()); + Assertions.assertEquals(1853639964, model.dbDetails().get("cqqudf").latency()); + Assertions.assertEquals("zqalkrmnjijpx", model.dbDetails().get("cqqudf").message()); + Assertions.assertEquals(ValidationState.FAILED, model.validationDetails().status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T07:52:19Z"), + model.validationDetails().validationStartTimeInUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T15:35:30Z"), + model.validationDetails().validationEndTimeInUtc()); + Assertions.assertEquals("ivpdtiir", model.validationDetails().serverLevelValidationDetails().get(0).type()); + Assertions.assertEquals(ValidationState.FAILED, + model.validationDetails().serverLevelValidationDetails().get(0).state()); + Assertions.assertEquals(ValidationState.FAILED, + model.validationDetails().serverLevelValidationDetails().get(0).messages().get(0).state()); + Assertions.assertEquals("r", + model.validationDetails().serverLevelValidationDetails().get(0).messages().get(0).message()); + Assertions.assertEquals("nwxuqlcvydyp", + model.validationDetails().dbLevelValidationDetails().get(0).databaseName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-01T02:46:01Z"), + model.validationDetails().dbLevelValidationDetails().get(0).startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-27T20:00:04Z"), + model.validationDetails().dbLevelValidationDetails().get(0).endedOn()); + Assertions.assertEquals("kniod", + model.validationDetails().dbLevelValidationDetails().get(0).summary().get(0).type()); + Assertions.assertEquals(ValidationState.WARNING, + model.validationDetails().dbLevelValidationDetails().get(0).summary().get(0).state()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ResourceProvidersCheckMigrationNameAvailabilityWithRMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilityWithResponseMockTests.java similarity index 64% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ResourceProvidersCheckMigrationNameAvailabilityWithRMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilityWithResponseMockTests.java index 7a20fa55d3e9..13c473a5ad33 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ResourceProvidersCheckMigrationNameAvailabilityWithRMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilityWithResponseMockTests.java @@ -10,19 +10,19 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationNameAvailabilityResource; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationNameAvailability; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class ResourceProvidersCheckMigrationNameAvailabilityWithRMockTests { +public final class MigrationsCheckNameAvailabilityWithResponseMockTests { @Test - public void testCheckMigrationNameAvailabilityWithResponse() throws Exception { + public void testCheckNameAvailabilityWithResponse() throws Exception { String responseStr - = "{\"name\":\"idwcwvmzegjon\",\"type\":\"hj\",\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"qzbrf\"}"; + = "{\"name\":\"c\",\"type\":\"jikzoeovvtzej\",\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"tikyj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testCheckMigrationNameAvailabilityWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - MigrationNameAvailabilityResource response = manager.resourceProviders() - .checkMigrationNameAvailabilityWithResponse("pjhmqrhvthl", "iwdcxsmlzzhzd", "xetlgydlhqv", - new MigrationNameAvailabilityResourceInner().withName("n").withType("pxy"), + MigrationNameAvailability response = manager.migrations() + .checkNameAvailabilityWithResponse("agb", "idqlvhu", + new MigrationNameAvailabilityInner().withName("oveofizrvjfnmj").withType("vlwyzg"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("idwcwvmzegjon", response.name()); - Assertions.assertEquals("hj", response.type()); + Assertions.assertEquals("c", response.name()); + Assertions.assertEquals("jikzoeovvtzej", response.type()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsDeleteWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsDeleteWithResponseMockTests.java deleted file mode 100644 index 1c6fce22d126..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,34 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MigrationsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.migrations() - .deleteWithResponse("llklmtk", "lowkxxpvb", "dfjmzsyzfhotlh", "k", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityWithLocationsExecuteWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckGloballyWithResponseMockTests.java similarity index 70% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityWithLocationsExecuteWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckGloballyWithResponseMockTests.java index e883c95bc05f..253cecafe025 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityWithLocationsExecuteWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckGloballyWithResponseMockTests.java @@ -12,18 +12,18 @@ import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityReason; import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailabilityModel; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class CheckNameAvailabilityWithLocationsExecuteWithResponseMockTests { +public final class NameAvailabilitiesCheckGloballyWithResponseMockTests { @Test - public void testExecuteWithResponse() throws Exception { + public void testCheckGloballyWithResponse() throws Exception { String responseStr - = "{\"name\":\"atbhjmznn\",\"type\":\"oqeq\",\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"agunbtgfebw\"}"; + = "{\"name\":\"glklb\",\"type\":\"lidwcwvmzegjon\",\"nameAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"gdn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,13 @@ public void testExecuteWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - NameAvailability response = manager.checkNameAvailabilityWithLocations() - .executeWithResponse("tcqiosmg", - new CheckNameAvailabilityRequest().withName("ahgx").withType("lyrtltlaprlt"), + NameAvailabilityModel response = manager.nameAvailabilities() + .checkGloballyWithResponse(new CheckNameAvailabilityRequest().withName("qvlnnpxybafiqgea").withType("bgj"), com.azure.core.util.Context.NONE) .getValue(); Assertions.assertTrue(response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("agunbtgfebw", response.message()); + Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, response.reason()); + Assertions.assertEquals("gdn", response.message()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckWithLocationWithResponseMockTests.java similarity index 71% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckWithLocationWithResponseMockTests.java index 0aaa43412389..135fe8b2b5b7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckWithLocationWithResponseMockTests.java @@ -12,18 +12,18 @@ import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityReason; import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailability; +import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailabilityModel; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class CheckNameAvailabilitiesExecuteWithResponseMockTests { +public final class NameAvailabilitiesCheckWithLocationWithResponseMockTests { @Test - public void testExecuteWithResponse() throws Exception { + public void testCheckWithLocationWithResponse() throws Exception { String responseStr - = "{\"name\":\"t\",\"type\":\"sxwpndfcpfnznthj\",\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"srxuzvoam\"}"; + = "{\"name\":\"acht\",\"type\":\"flrytswfpfm\",\"nameAvailable\":false,\"reason\":\"Invalid\",\"message\":\"mskwhqjjysl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testExecuteWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - NameAvailability response = manager.checkNameAvailabilities() - .executeWithResponse( - new CheckNameAvailabilityRequest().withName("pkyjcxcjxgrytfm").withType("ycilrmcaykggnox"), + NameAvailabilityModel response = manager.nameAvailabilities() + .checkWithLocationWithResponse("z", + new CheckNameAvailabilityRequest().withName("fkspzhzmtksjci").withType("igsxcdgljplk"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertTrue(response.nameAvailable()); + Assertions.assertFalse(response.nameAvailable()); Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("srxuzvoam", response.message()); + Assertions.assertEquals("mskwhqjjysl", response.message()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityModelInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityModelInnerTests.java new file mode 100644 index 000000000000..b9978cafc7ff --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityModelInnerTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityReason; +import org.junit.jupiter.api.Assertions; + +public final class NameAvailabilityModelInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NameAvailabilityModelInner model = BinaryData.fromString( + "{\"name\":\"qmqhldvriii\",\"type\":\"nalghfkvtvsexso\",\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"hhahhxvrhmzkwpjg\"}") + .toObject(NameAvailabilityModelInner.class); + Assertions.assertFalse(model.nameAvailable()); + Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); + Assertions.assertEquals("hhahhxvrhmzkwpjg", model.message()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NameAvailabilityModelInner model = new NameAvailabilityModelInner().withNameAvailable(false) + .withReason(CheckNameAvailabilityReason.ALREADY_EXISTS) + .withMessage("hhahhxvrhmzkwpjg"); + model = BinaryData.fromObject(model).toObject(NameAvailabilityModelInner.class); + Assertions.assertFalse(model.nameAvailable()); + Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); + Assertions.assertEquals("hhahhxvrhmzkwpjg", model.message()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NamePropertyTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NamePropertyTests.java new file mode 100644 index 000000000000..a0738f425a7e --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NamePropertyTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.NameProperty; +import org.junit.jupiter.api.Assertions; + +public final class NamePropertyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NameProperty model = BinaryData.fromString("{\"value\":\"gfwsrtaw\",\"localizedValue\":\"ezbrhubskh\"}") + .toObject(NameProperty.class); + Assertions.assertEquals("gfwsrtaw", model.value()); + Assertions.assertEquals("ezbrhubskh", model.localizedValue()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NameProperty model = new NameProperty().withValue("gfwsrtaw").withLocalizedValue("ezbrhubskh"); + model = BinaryData.fromObject(model).toObject(NameProperty.class); + Assertions.assertEquals("gfwsrtaw", model.value()); + Assertions.assertEquals("ezbrhubskh", model.localizedValue()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NetworkTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NetworkTests.java new file mode 100644 index 000000000000..211418763ecf --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NetworkTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerPublicNetworkAccessState; +import org.junit.jupiter.api.Assertions; + +public final class NetworkTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Network model = BinaryData.fromString( + "{\"publicNetworkAccess\":\"Enabled\",\"delegatedSubnetResourceId\":\"w\",\"privateDnsZoneArmResourceId\":\"oupfgfb\"}") + .toObject(Network.class); + Assertions.assertEquals(ServerPublicNetworkAccessState.ENABLED, model.publicNetworkAccess()); + Assertions.assertEquals("w", model.delegatedSubnetResourceId()); + Assertions.assertEquals("oupfgfb", model.privateDnsZoneArmResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Network model = new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.ENABLED) + .withDelegatedSubnetResourceId("w") + .withPrivateDnsZoneArmResourceId("oupfgfb"); + model = BinaryData.fromObject(model).toObject(Network.class); + Assertions.assertEquals(ServerPublicNetworkAccessState.ENABLED, model.publicNetworkAccess()); + Assertions.assertEquals("w", model.delegatedSubnetResourceId()); + Assertions.assertEquals("oupfgfb", model.privateDnsZoneArmResourceId()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationDetailsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationDetailsTests.java new file mode 100644 index 000000000000..719ea00bf98c --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationDetailsTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationDetails; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ObjectRecommendationDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ObjectRecommendationDetails model = BinaryData.fromString( + "{\"databaseName\":\"yklxubyjaffmmfbl\",\"schema\":\"cuubgq\",\"table\":\"rtalmet\",\"indexType\":\"wgdsl\",\"indexName\":\"ihhrmo\",\"indexColumns\":[\"qseypxiutcxa\"],\"includedColumns\":[\"y\",\"petogebjox\",\"lhvnhlab\",\"q\"]}") + .toObject(ObjectRecommendationDetails.class); + Assertions.assertEquals("yklxubyjaffmmfbl", model.databaseName()); + Assertions.assertEquals("cuubgq", model.schema()); + Assertions.assertEquals("rtalmet", model.table()); + Assertions.assertEquals("wgdsl", model.indexType()); + Assertions.assertEquals("ihhrmo", model.indexName()); + Assertions.assertEquals("qseypxiutcxa", model.indexColumns().get(0)); + Assertions.assertEquals("y", model.includedColumns().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ObjectRecommendationDetails model = new ObjectRecommendationDetails().withDatabaseName("yklxubyjaffmmfbl") + .withSchema("cuubgq") + .withTable("rtalmet") + .withIndexType("wgdsl") + .withIndexName("ihhrmo") + .withIndexColumns(Arrays.asList("qseypxiutcxa")) + .withIncludedColumns(Arrays.asList("y", "petogebjox", "lhvnhlab", "q")); + model = BinaryData.fromObject(model).toObject(ObjectRecommendationDetails.class); + Assertions.assertEquals("yklxubyjaffmmfbl", model.databaseName()); + Assertions.assertEquals("cuubgq", model.schema()); + Assertions.assertEquals("rtalmet", model.table()); + Assertions.assertEquals("wgdsl", model.indexType()); + Assertions.assertEquals("ihhrmo", model.indexName()); + Assertions.assertEquals("qseypxiutcxa", model.indexColumns().get(0)); + Assertions.assertEquals("y", model.includedColumns().get(0)); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationInnerTests.java new file mode 100644 index 000000000000..cc5472eb6723 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationInnerTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; +import org.junit.jupiter.api.Assertions; + +public final class ObjectRecommendationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ObjectRecommendationInner model = BinaryData.fromString( + "{\"kind\":\"pvz\",\"properties\":{\"initialRecommendedTime\":\"2021-10-27T23:39:54Z\",\"lastRecommendedTime\":\"2021-08-29T10:44:42Z\",\"timesRecommended\":763019330,\"improvedQueryIds\":[1962664267869044370,7705373271443062413,7572255712595871668],\"recommendationReason\":\"pkc\",\"currentState\":\"yzriykhy\",\"recommendationType\":\"AnalyzeTable\",\"implementationDetails\":{\"method\":\"lboxqvkjl\",\"script\":\"ho\"},\"analyzedWorkload\":{\"startTime\":\"2021-10-09T04:46:26Z\",\"endTime\":\"2021-11-30T18:11:35Z\",\"queryCount\":2141225677},\"estimatedImpact\":[{\"dimensionName\":\"mbnraauzzp\",\"unit\":\"a\",\"queryId\":8740215687103788004,\"absoluteValue\":53.76406796396901},{\"dimensionName\":\"wwvaiqyuvvfonk\",\"unit\":\"hqyikvy\",\"queryId\":4524825461883558353,\"absoluteValue\":68.83579712649399},{\"dimensionName\":\"wmn\",\"unit\":\"ttijfybvpoekrs\",\"queryId\":4160555160765706368,\"absoluteValue\":33.48124737837169},{\"dimensionName\":\"qgnjdgkynscli\",\"unit\":\"zvhxnk\",\"queryId\":620897221549417842,\"absoluteValue\":10.444343586936233}],\"details\":{\"databaseName\":\"pnvdxz\",\"schema\":\"ihfrbbcevqa\",\"table\":\"ltd\",\"indexType\":\"fkqojpy\",\"indexName\":\"gtrd\",\"indexColumns\":[\"fmzzsdymbrny\",\"u\"],\"includedColumns\":[\"rafwgckhocxvdf\",\"fwafqrouda\",\"pavehhr\"]}},\"id\":\"bunzozudh\",\"name\":\"xg\",\"type\":\"moy\"}") + .toObject(ObjectRecommendationInner.class); + Assertions.assertEquals("pvz", model.kind()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ObjectRecommendationInner model = new ObjectRecommendationInner().withKind("pvz"); + model = BinaryData.fromObject(model).toObject(ObjectRecommendationInner.class); + Assertions.assertEquals("pvz", model.kind()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationListTests.java new file mode 100644 index 000000000000..7fe16b933af4 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationListTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ObjectRecommendationListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ObjectRecommendationList model = BinaryData.fromString( + "{\"value\":[{\"kind\":\"podbzevwrdnh\",\"properties\":{\"initialRecommendedTime\":\"2021-08-05T14:25:50Z\",\"lastRecommendedTime\":\"2021-04-26T19:15:59Z\",\"timesRecommended\":437386763,\"improvedQueryIds\":[5191466923245315601,841676963872449061,5004966782756902203,4895796694367228378],\"recommendationReason\":\"ypfcvlerchpqbmf\",\"currentState\":\"babwidfcxss\",\"recommendationType\":\"DropIndex\",\"implementationDetails\":{\"method\":\"oxyhkxgqddrihpf\",\"script\":\"qcaaewdaomdjvl\"},\"analyzedWorkload\":{\"startTime\":\"2021-04-29T09:29:01Z\",\"endTime\":\"2021-05-04T10:40:20Z\",\"queryCount\":1445056578},\"estimatedImpact\":[{\"dimensionName\":\"eivsiykzkdnc\",\"unit\":\"xonbzoggculapz\",\"queryId\":1506759531951154202,\"absoluteValue\":74.37869960880928},{\"dimensionName\":\"qxepnylbfuaj\",\"unit\":\"jtlvofqzhvfciby\",\"queryId\":3860000272436496584,\"absoluteValue\":43.901636834880186}],\"details\":{\"databaseName\":\"pvdwxf\",\"schema\":\"iivwzjbhyzsxjrka\",\"table\":\"trnegvmnvuqeqvld\",\"indexType\":\"astjbkkdmflvestm\",\"indexName\":\"xrrilozapee\",\"indexColumns\":[\"pxlktwkuziycsl\",\"vu\",\"uztcktyhjtqed\",\"gzulwmmrqzzr\"],\"includedColumns\":[\"pglydz\",\"krvq\"]}},\"id\":\"vtoepryutnw\",\"name\":\"tpzdmovzvfvaawzq\",\"type\":\"dflgzuri\"}],\"nextLink\":\"aecxndtic\"}") + .toObject(ObjectRecommendationList.class); + Assertions.assertEquals("podbzevwrdnh", model.value().get(0).kind()); + Assertions.assertEquals("aecxndtic", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ObjectRecommendationList model = new ObjectRecommendationList() + .withValue(Arrays.asList(new ObjectRecommendationInner().withKind("podbzevwrdnh"))) + .withNextLink("aecxndtic"); + model = BinaryData.fromObject(model).toObject(ObjectRecommendationList.class); + Assertions.assertEquals("podbzevwrdnh", model.value().get(0).kind()); + Assertions.assertEquals("aecxndtic", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesAnalyzedWorkloadTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesAnalyzedWorkloadTests.java new file mode 100644 index 000000000000..834aae0e7999 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesAnalyzedWorkloadTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesAnalyzedWorkload; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class ObjectRecommendationPropertiesAnalyzedWorkloadTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ObjectRecommendationPropertiesAnalyzedWorkload model = BinaryData.fromString( + "{\"startTime\":\"2021-03-15T08:57:58Z\",\"endTime\":\"2021-09-15T05:47:21Z\",\"queryCount\":594381501}") + .toObject(ObjectRecommendationPropertiesAnalyzedWorkload.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-15T08:57:58Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-15T05:47:21Z"), model.endTime()); + Assertions.assertEquals(594381501, model.queryCount()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ObjectRecommendationPropertiesAnalyzedWorkload model = new ObjectRecommendationPropertiesAnalyzedWorkload() + .withStartTime(OffsetDateTime.parse("2021-03-15T08:57:58Z")) + .withEndTime(OffsetDateTime.parse("2021-09-15T05:47:21Z")) + .withQueryCount(594381501); + model = BinaryData.fromObject(model).toObject(ObjectRecommendationPropertiesAnalyzedWorkload.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-15T08:57:58Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-15T05:47:21Z"), model.endTime()); + Assertions.assertEquals(594381501, model.queryCount()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesImplementationDetailsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesImplementationDetailsTests.java new file mode 100644 index 000000000000..68025d4152d4 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesImplementationDetailsTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesImplementationDetails; +import org.junit.jupiter.api.Assertions; + +public final class ObjectRecommendationPropertiesImplementationDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ObjectRecommendationPropertiesImplementationDetails model + = BinaryData.fromString("{\"method\":\"txmwoteyow\",\"script\":\"uqovekqvgqouwif\"}") + .toObject(ObjectRecommendationPropertiesImplementationDetails.class); + Assertions.assertEquals("txmwoteyow", model.method()); + Assertions.assertEquals("uqovekqvgqouwif", model.script()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ObjectRecommendationPropertiesImplementationDetails model + = new ObjectRecommendationPropertiesImplementationDetails().withMethod("txmwoteyow") + .withScript("uqovekqvgqouwif"); + model = BinaryData.fromObject(model).toObject(ObjectRecommendationPropertiesImplementationDetails.class); + Assertions.assertEquals("txmwoteyow", model.method()); + Assertions.assertEquals("uqovekqvgqouwif", model.script()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesTests.java new file mode 100644 index 000000000000..52f52a335c61 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesTests.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationProperties; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesAnalyzedWorkload; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesImplementationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeEnum; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ObjectRecommendationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ObjectRecommendationProperties model = BinaryData.fromString( + "{\"initialRecommendedTime\":\"2021-11-01T06:19:12Z\",\"lastRecommendedTime\":\"2021-04-27T04:32:10Z\",\"timesRecommended\":1904472040,\"improvedQueryIds\":[2557149039383671323],\"recommendationReason\":\"bzydvfvfcj\",\"currentState\":\"eoisrvhmgor\",\"recommendationType\":\"ReIndex\",\"implementationDetails\":{\"method\":\"scvwmzhwplef\",\"script\":\"vxilcbt\"},\"analyzedWorkload\":{\"startTime\":\"2021-02-03T00:44:07Z\",\"endTime\":\"2021-09-14T23:20:53Z\",\"queryCount\":1529157680},\"estimatedImpact\":[{\"dimensionName\":\"jfzqlqhycavodgg\",\"unit\":\"beesmieknlra\",\"queryId\":5499561988006889896,\"absoluteValue\":94.1788999123394}],\"details\":{\"databaseName\":\"ydwqfbylyrf\",\"schema\":\"agt\",\"table\":\"jocqwogfnzjvusf\",\"indexType\":\"dmozu\",\"indexName\":\"lfsbtkadpysow\",\"indexColumns\":[\"gkbugrjqct\",\"jc\",\"isofieypefojyqd\",\"cuplcplcwkhih\"],\"includedColumns\":[\"hzdsqtzbsrgnow\",\"jhf\",\"mvec\"]}}") + .toObject(ObjectRecommendationProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T06:19:12Z"), model.initialRecommendedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T04:32:10Z"), model.lastRecommendedTime()); + Assertions.assertEquals(1904472040, model.timesRecommended()); + Assertions.assertEquals(2557149039383671323L, model.improvedQueryIds().get(0)); + Assertions.assertEquals("bzydvfvfcj", model.recommendationReason()); + Assertions.assertEquals("eoisrvhmgor", model.currentState()); + Assertions.assertEquals(RecommendationTypeEnum.RE_INDEX, model.recommendationType()); + Assertions.assertEquals("scvwmzhwplef", model.implementationDetails().method()); + Assertions.assertEquals("vxilcbt", model.implementationDetails().script()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-03T00:44:07Z"), model.analyzedWorkload().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-14T23:20:53Z"), model.analyzedWorkload().endTime()); + Assertions.assertEquals(1529157680, model.analyzedWorkload().queryCount()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ObjectRecommendationProperties model = new ObjectRecommendationProperties() + .withInitialRecommendedTime(OffsetDateTime.parse("2021-11-01T06:19:12Z")) + .withLastRecommendedTime(OffsetDateTime.parse("2021-04-27T04:32:10Z")) + .withTimesRecommended(1904472040) + .withImprovedQueryIds(Arrays.asList(2557149039383671323L)) + .withRecommendationReason("bzydvfvfcj") + .withCurrentState("eoisrvhmgor") + .withRecommendationType(RecommendationTypeEnum.RE_INDEX) + .withImplementationDetails( + new ObjectRecommendationPropertiesImplementationDetails().withMethod("scvwmzhwplef") + .withScript("vxilcbt")) + .withAnalyzedWorkload(new ObjectRecommendationPropertiesAnalyzedWorkload() + .withStartTime(OffsetDateTime.parse("2021-02-03T00:44:07Z")) + .withEndTime(OffsetDateTime.parse("2021-09-14T23:20:53Z")) + .withQueryCount(1529157680)); + model = BinaryData.fromObject(model).toObject(ObjectRecommendationProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T06:19:12Z"), model.initialRecommendedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T04:32:10Z"), model.lastRecommendedTime()); + Assertions.assertEquals(1904472040, model.timesRecommended()); + Assertions.assertEquals(2557149039383671323L, model.improvedQueryIds().get(0)); + Assertions.assertEquals("bzydvfvfcj", model.recommendationReason()); + Assertions.assertEquals("eoisrvhmgor", model.currentState()); + Assertions.assertEquals(RecommendationTypeEnum.RE_INDEX, model.recommendationType()); + Assertions.assertEquals("scvwmzhwplef", model.implementationDetails().method()); + Assertions.assertEquals("vxilcbt", model.implementationDetails().script()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-03T00:44:07Z"), model.analyzedWorkload().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-14T23:20:53Z"), model.analyzedWorkload().endTime()); + Assertions.assertEquals(1529157680, model.analyzedWorkload().queryCount()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationDisplayTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationDisplayTests.java new file mode 100644 index 000000000000..f01790b8cae4 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationDisplayTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OperationDisplay; + +public final class OperationDisplayTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationDisplay model = BinaryData + .fromString("{\"provider\":\"zpxdt\",\"resource\":\"dm\",\"operation\":\"j\",\"description\":\"wuenvr\"}") + .toObject(OperationDisplay.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OperationDisplay model = new OperationDisplay(); + model = BinaryData.fromObject(model).toObject(OperationDisplay.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationInnerTests.java new file mode 100644 index 000000000000..8ca2f5b7c615 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationInnerTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.OperationInner; +import org.junit.jupiter.api.Assertions; + +public final class OperationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationInner model = BinaryData.fromString( + "{\"name\":\"xt\",\"display\":{\"provider\":\"mhjglikkxwslolb\",\"resource\":\"vuzlm\",\"operation\":\"elfk\",\"description\":\"plcrpwjxeznoig\"},\"isDataAction\":true,\"origin\":\"user\",\"properties\":{\"azej\":\"datakpnb\",\"hsxttaugzxnf\":\"dataoqkag\"}}") + .toObject(OperationInner.class); + Assertions.assertTrue(model.isDataAction()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OperationInner model = new OperationInner().withIsDataAction(true); + model = BinaryData.fromObject(model).toObject(OperationInner.class); + Assertions.assertTrue(model.isDataAction()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationListTests.java new file mode 100644 index 000000000000..db88f539f891 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationListTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.OperationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.OperationList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class OperationListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationList model = BinaryData.fromString( + "{\"value\":[{\"name\":\"grjguufzd\",\"display\":{\"provider\":\"qtfihwhbotzinga\",\"resource\":\"pph\",\"operation\":\"zqzudph\",\"description\":\"mvdk\"},\"isDataAction\":false,\"origin\":\"system\",\"properties\":{\"atkzwpcnpw\":\"datatbvkayhmtnvyq\",\"cyajguqf\":\"datacjaesgvvs\"}},{\"name\":\"ygz\",\"display\":{\"provider\":\"nk\",\"resource\":\"usemdwzrmuhap\",\"operation\":\"qdpsqxqvpsvu\",\"description\":\"mgccelvezrypq\"},\"isDataAction\":false,\"origin\":\"user\",\"properties\":{\"kobopgxed\":\"datarqwky\",\"ccsnjvcdwxlpq\":\"dataowepbqpcrfkb\",\"wfqatmtd\":\"datakftnkhtjsyin\",\"ywkbirryuzhlhkjo\":\"datatmdvypgikdgs\"}},{\"name\":\"vqqaatjinrvgo\",\"display\":{\"provider\":\"fiibfggjioolvr\",\"resource\":\"kvtkkg\",\"operation\":\"qwjygvja\",\"description\":\"blmhvkzuhb\"},\"isDataAction\":false,\"origin\":\"user\",\"properties\":{\"wz\":\"dataopbyrqufegxu\"}},{\"name\":\"nhlmctlpdng\",\"display\":{\"provider\":\"gbmhrixkwmyi\",\"resource\":\"jvegrhbpnaixexcc\",\"operation\":\"reaxhcexdr\",\"description\":\"qahqkghtpwijn\"},\"isDataAction\":true,\"origin\":\"system\",\"properties\":{\"mtg\":\"datacxzbfvoowvr\",\"y\":\"dataqp\",\"ronzmyhgfip\":\"datas\"}}],\"nextLink\":\"xkmcwaekrrjre\"}") + .toObject(OperationList.class); + Assertions.assertFalse(model.value().get(0).isDataAction()); + Assertions.assertEquals("xkmcwaekrrjre", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OperationList model = new OperationList().withValue( + Arrays.asList(new OperationInner().withIsDataAction(false), new OperationInner().withIsDataAction(false), + new OperationInner().withIsDataAction(false), new OperationInner().withIsDataAction(true))) + .withNextLink("xkmcwaekrrjre"); + model = BinaryData.fromObject(model).toObject(OperationList.class); + Assertions.assertFalse(model.value().get(0).isDataAction()); + Assertions.assertEquals("xkmcwaekrrjre", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListMockTests.java index 1af78e32632b..7f39c3fcd04e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListMockTests.java @@ -22,7 +22,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"pzhz\",\"display\":{\"provider\":\"sjcitdigsxc\",\"resource\":\"l\",\"operation\":\"lkeuac\",\"description\":\"omflrytswfp\"},\"isDataAction\":true,\"origin\":\"system\",\"properties\":{\"yslu\":\"datanmskwhqj\"}}]}"; + = "{\"value\":[{\"name\":\"lpshhkvpedwqslsr\",\"display\":{\"provider\":\"qvwwsko\",\"resource\":\"cbrwi\",\"operation\":\"vqejosovy\",\"description\":\"leaesi\"},\"isDataAction\":true,\"origin\":\"system\",\"properties\":{\"cy\":\"dataobbpihehc\",\"kfrexcrseqwjks\":\"datamrqbrjbbmpxdlv\",\"zhxogjggsvo\":\"datahud\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/GetPrivateDnsZoneSuffixesExecuteWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixesGetWithResponseMockTests.java similarity index 75% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/GetPrivateDnsZoneSuffixesExecuteWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixesGetWithResponseMockTests.java index b6673ecda65d..3c7a290f5887 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/GetPrivateDnsZoneSuffixesExecuteWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixesGetWithResponseMockTests.java @@ -16,10 +16,10 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class GetPrivateDnsZoneSuffixesExecuteWithResponseMockTests { +public final class PrivateDnsZoneSuffixesGetWithResponseMockTests { @Test - public void testExecuteWithResponse() throws Exception { - String responseStr = "\"lpshhkvpedwqslsr\""; + public void testGetWithResponse() throws Exception { + String responseStr = "\"jkxibda\""; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -28,9 +28,8 @@ public void testExecuteWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - String response - = manager.getPrivateDnsZoneSuffixes().executeWithResponse(com.azure.core.util.Context.NONE).getValue(); + String response = manager.privateDnsZoneSuffixes().getWithResponse(com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("lpshhkvpedwqslsr", response); + Assertions.assertEquals("jkxibda", response); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionInnerTests.java new file mode 100644 index 000000000000..c186bef8cc30 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionInnerTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpoint; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionInner model = BinaryData.fromString( + "{\"properties\":{\"groupIds\":[\"uaibrebqaaysj\"],\"privateEndpoint\":{\"id\":\"qtnqtt\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"fffiak\",\"actionsRequired\":\"pqqmted\"},\"provisioningState\":\"Succeeded\"},\"id\":\"jihy\",\"name\":\"ozphvwauyqncygu\",\"type\":\"kvi\"}") + .toObject(PrivateEndpointConnectionInner.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("fffiak", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("pqqmted", model.privateLinkServiceConnectionState().actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpointConnectionInner model + = new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) + .withDescription("fffiak") + .withActionsRequired("pqqmted")); + model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("fffiak", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("pqqmted", model.privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionListTests.java new file mode 100644 index 000000000000..7abc69caa1f2 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionListTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnectionList; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"groupIds\":[\"ntwjch\",\"dgoihxumwctondzj\",\"uu\"],\"privateEndpoint\":{\"id\":\"lwg\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"bwtovvtgseinqf\",\"actionsRequired\":\"fxqknpirgneptt\"},\"provisioningState\":\"Creating\"},\"id\":\"niffcdmqnroj\",\"name\":\"pij\",\"type\":\"k\"}],\"nextLink\":\"frddhcrati\"}") + .toObject(PrivateEndpointConnectionList.class); + Assertions.assertEquals("frddhcrati", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpointConnectionList model = new PrivateEndpointConnectionList().withNextLink("frddhcrati"); + model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionList.class); + Assertions.assertEquals("frddhcrati", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionPropertiesTests.java new file mode 100644 index 000000000000..fd46c37f8195 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionPropertiesTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionProperties; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpoint; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionProperties model = BinaryData.fromString( + "{\"groupIds\":[\"scw\",\"qupevzh\",\"stotxh\",\"jujbypelmcuvhixb\"],\"privateEndpoint\":{\"id\":\"fw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"coolsttpkiwkkb\",\"actionsRequired\":\"jrywvtylbfpnc\"},\"provisioningState\":\"Creating\"}") + .toObject(PrivateEndpointConnectionProperties.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("coolsttpkiwkkb", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("jrywvtylbfpnc", model.privateLinkServiceConnectionState().actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpointConnectionProperties model + = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) + .withDescription("coolsttpkiwkkb") + .withActionsRequired("jrywvtylbfpnc")); + model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("coolsttpkiwkkb", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("jrywvtylbfpnc", model.privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java index 379f24c98b72..6d28655f657d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class PrivateEndpointConnectionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"groupIds\":[\"nu\",\"tljqobbpih\"],\"privateEndpoint\":{\"id\":\"ecybmrqbrj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"xdlvykfrexc\",\"actionsRequired\":\"eqwjksgh\"},\"provisioningState\":\"Creating\"},\"id\":\"hxogjggsvoujkxi\",\"name\":\"dafhr\",\"type\":\"mdyomkxfbvfbh\"}"; + = "{\"properties\":{\"groupIds\":[\"eimawzovgkkumui\",\"jcjcazt\",\"wsnsqowx\"],\"privateEndpoint\":{\"id\":\"mlikytw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"swkacvej\",\"actionsRequired\":\"dvlvhbwrnfxtgdd\"},\"provisioningState\":\"Succeeded\"},\"id\":\"ehnmnaoyankco\",\"name\":\"qswankltytmhdr\",\"type\":\"znnhd\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateEndpointConnection response = manager.privateEndpointConnections() - .getWithResponse("mpqvwwsk", "ndcbrwi", "uvqejosovyrrle", com.azure.core.util.Context.NONE) + .getWithResponse("hrkmdyomkxfbvfbh", "y", "rhpw", com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("xdlvykfrexc", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("eqwjksgh", response.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("swkacvej", response.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("dvlvhbwrnfxtgdd", response.privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerMockTests.java index cb744ed5767e..bf3d58a68487 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerMockTests.java @@ -23,7 +23,7 @@ public final class PrivateEndpointConnectionsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"groupIds\":[\"eimawzovgkkumui\",\"jcjcazt\",\"wsnsqowx\"],\"privateEndpoint\":{\"id\":\"mlikytw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"swkacvej\",\"actionsRequired\":\"dvlvhbwrnfxtgdd\"},\"provisioningState\":\"Succeeded\"},\"id\":\"ehnmnaoyankco\",\"name\":\"qswankltytmhdr\",\"type\":\"znnhd\"}]}"; + = "{\"value\":[{\"properties\":{\"groupIds\":[\"jpmcub\",\"mifoxxkub\"],\"privateEndpoint\":{\"id\":\"avp\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"bqgvgovpbbtte\",\"actionsRequired\":\"oknssqyzqedikdf\"},\"provisioningState\":\"Deleting\"},\"id\":\"qmrjg\",\"name\":\"ihfqlggwfiwzc\",\"type\":\"mjpb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,13 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.privateEndpointConnections().listByServer("y", "rhpw", com.azure.core.util.Context.NONE); + = manager.privateEndpointConnections().listByServer("d", "fypiv", com.azure.core.util.Context.NONE); Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("swkacvej", + Assertions.assertEquals("bqgvgovpbbtte", response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dvlvhbwrnfxtgdd", + Assertions.assertEquals("oknssqyzqedikdf", response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationsUpdateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateMockTests.java similarity index 96% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationsUpdateMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateMockTests.java index 5cf96841db06..b2657b3bf9e9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionOperationsUpdateMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateMockTests.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class PrivateEndpointConnectionOperationsUpdateMockTests { +public final class PrivateEndpointConnectionsUpdateMockTests { @Test public void testUpdate() throws Exception { String responseStr @@ -34,7 +34,7 @@ public void testUpdate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PrivateEndpointConnection response = manager.privateEndpointConnectionOperations() + PrivateEndpointConnection response = manager.privateEndpointConnections() .update("lktgjc", "gguxhemlwyw", "eeczgfbu", new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointTests.java new file mode 100644 index 000000000000..a4c31e75acd2 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpoint; + +public final class PrivateEndpointTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpoint model = BinaryData.fromString("{\"id\":\"iwii\"}").toObject(PrivateEndpoint.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpoint model = new PrivateEndpoint(); + model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceInnerTests.java new file mode 100644 index 000000000000..cdbd27ea0fd1 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceInnerTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateLinkResourceInner; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceInner model = BinaryData.fromString( + "{\"properties\":{\"groupId\":\"rsre\",\"requiredMembers\":[\"xurisjnhnyt\",\"ifqjz\",\"xmrhu\",\"lw\"],\"requiredZoneNames\":[\"sutrgjup\",\"uutpwoqhih\",\"jqgwzp\",\"fqntcyp\"]},\"id\":\"jv\",\"name\":\"oimwkslirc\",\"type\":\"zjxvydfcea\"}") + .toObject(PrivateLinkResourceInner.class); + Assertions.assertEquals("sutrgjup", model.requiredZoneNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateLinkResourceInner model = new PrivateLinkResourceInner() + .withRequiredZoneNames(Arrays.asList("sutrgjup", "uutpwoqhih", "jqgwzp", "fqntcyp")); + model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); + Assertions.assertEquals("sutrgjup", model.requiredZoneNames().get(0)); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceListTests.java new file mode 100644 index 000000000000..b446270bfe9f --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceListTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkResourceList; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"groupId\":\"asxifto\",\"requiredMembers\":[\"zh\",\"tw\",\"sgogczhonnxk\",\"lgnyhmo\"],\"requiredZoneNames\":[\"kkgthr\"]},\"id\":\"hxjbdhqxvc\",\"name\":\"gf\",\"type\":\"pdso\"},{\"properties\":{\"groupId\":\"hrnsvbu\",\"requiredMembers\":[\"vz\",\"ybycnunvj\",\"rtkfawnopq\"],\"requiredZoneNames\":[\"yzirtxdyuxzejn\",\"psew\",\"ioilqukrydxtq\"]},\"id\":\"eoxorggufhyao\",\"name\":\"tbghhavgrvkf\",\"type\":\"ovjzhpjbibgjmfx\"},{\"properties\":{\"groupId\":\"fcluyov\",\"requiredMembers\":[\"bkfezzxscyhwzdgi\",\"ujb\",\"bomvzzbtdcqv\"],\"requiredZoneNames\":[\"yujviylwdshfssn\",\"bgye\",\"rymsgaojfmw\",\"cotmr\"]},\"id\":\"irctymoxoftpipiw\",\"name\":\"czuhxacpqjlihh\",\"type\":\"usps\"}],\"nextLink\":\"sdvlmfwdgzxulucv\"}") + .toObject(PrivateLinkResourceList.class); + Assertions.assertEquals("sdvlmfwdgzxulucv", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateLinkResourceList model = new PrivateLinkResourceList().withNextLink("sdvlmfwdgzxulucv"); + model = BinaryData.fromObject(model).toObject(PrivateLinkResourceList.class); + Assertions.assertEquals("sdvlmfwdgzxulucv", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcePropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcePropertiesTests.java new file mode 100644 index 000000000000..79db0b00ca1d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcePropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateLinkResourceProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceProperties model = BinaryData.fromString( + "{\"groupId\":\"lhvygdyftu\",\"requiredMembers\":[\"wnawjslbiw\",\"ojgcyzt\",\"fmznba\",\"qphchqnrnrpxehuw\"],\"requiredZoneNames\":[\"qgaifmviklbydv\"]}") + .toObject(PrivateLinkResourceProperties.class); + Assertions.assertEquals("qgaifmviklbydv", model.requiredZoneNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateLinkResourceProperties model + = new PrivateLinkResourceProperties().withRequiredZoneNames(Arrays.asList("qgaifmviklbydv")); + model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); + Assertions.assertEquals("qgaifmviklbydv", model.requiredZoneNames().get(0)); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetWithResponseMockTests.java index cf2c94484b4c..40a7778e4ed7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class PrivateLinkResourcesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"groupId\":\"vrcmyfqipgxhnpo\",\"requiredMembers\":[\"wcabvnuileeya\",\"wlpaugmrmfjlrxwt\",\"aukhfkvcisiz\"],\"requiredZoneNames\":[\"eds\"]},\"id\":\"wuived\",\"name\":\"cgyee\",\"type\":\"xeiqbpsmg\"}"; + = "{\"properties\":{\"groupId\":\"aoypny\",\"requiredMembers\":[\"hxcylhkgm\",\"sghpx\",\"cphdrwjjkhvyo\"],\"requiredZoneNames\":[\"luzvxnq\"]},\"id\":\"rpqpd\",\"name\":\"wmkoisq\",\"type\":\"ssffxuifmc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateLinkResource response = manager.privateLinkResources() - .getWithResponse("lg", "wfiwzcxmj", "byephmgt", com.azure.core.util.Context.NONE) + .getWithResponse("gmsplzgaufcshhv", "ewgnxkympqanxrj", "ixt", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("eds", response.requiredZoneNames().get(0)); + Assertions.assertEquals("luzvxnq", response.requiredZoneNames().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerMockTests.java index 2ae1bc7ba7e3..996f3255803f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerMockTests.java @@ -22,7 +22,7 @@ public final class PrivateLinkResourcesListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"bjpmcubk\",\"requiredMembers\":[\"oxxkubvp\"],\"requiredZoneNames\":[\"pmhbrbq\"]},\"id\":\"govpbbtte\",\"name\":\"joknssqyzqedik\",\"type\":\"frdbiqmrjgeihf\"}]}"; + = "{\"value\":[{\"properties\":{\"groupId\":\"myqwcab\",\"requiredMembers\":[\"ilee\"],\"requiredZoneNames\":[\"wlpaugmrmfjlrxwt\",\"aukhfkvcisiz\",\"oaedsxjwuivedwcg\"]},\"id\":\"ewxeiqbpsm\",\"name\":\"omguamlj\",\"type\":\"l\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.privateLinkResources().listByServer("d", "fypiv", com.azure.core.util.Context.NONE); + = manager.privateLinkResources().listByServer("ephmgtvljvrcmyfq", "pgxh", com.azure.core.util.Context.NONE); - Assertions.assertEquals("pmhbrbq", response.iterator().next().requiredZoneNames().get(0)); + Assertions.assertEquals("wlpaugmrmfjlrxwt", response.iterator().next().requiredZoneNames().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkServiceConnectionStateTests.java new file mode 100644 index 000000000000..e0ed2d208bbf --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkServiceConnectionStateTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkServiceConnectionStateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkServiceConnectionState model + = BinaryData.fromString("{\"status\":\"Pending\",\"description\":\"wubxc\",\"actionsRequired\":\"h\"}") + .toObject(PrivateLinkServiceConnectionState.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); + Assertions.assertEquals("wubxc", model.description()); + Assertions.assertEquals("h", model.actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateLinkServiceConnectionState model + = new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.PENDING) + .withDescription("wubxc") + .withActionsRequired("h"); + model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); + Assertions.assertEquals("wubxc", model.description()); + Assertions.assertEquals("h", model.actionsRequired()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageInnerTests.java new file mode 100644 index 000000000000..5ef1a452572b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageInnerTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.QuotaUsageInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.NameProperty; +import org.junit.jupiter.api.Assertions; + +public final class QuotaUsageInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + QuotaUsageInner model = BinaryData.fromString( + "{\"name\":{\"value\":\"ostgkts\",\"localizedValue\":\"dxeclzedqbcvh\"},\"limit\":236699607082183058,\"unit\":\"odqkdlwwqfb\",\"currentValue\":3679022657074806419,\"id\":\"trqjfsmlmbtx\"}") + .toObject(QuotaUsageInner.class); + Assertions.assertEquals("ostgkts", model.name().value()); + Assertions.assertEquals("dxeclzedqbcvh", model.name().localizedValue()); + Assertions.assertEquals(236699607082183058L, model.limit()); + Assertions.assertEquals("odqkdlwwqfb", model.unit()); + Assertions.assertEquals(3679022657074806419L, model.currentValue()); + Assertions.assertEquals("trqjfsmlmbtx", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + QuotaUsageInner model = new QuotaUsageInner() + .withName(new NameProperty().withValue("ostgkts").withLocalizedValue("dxeclzedqbcvh")) + .withLimit(236699607082183058L) + .withUnit("odqkdlwwqfb") + .withCurrentValue(3679022657074806419L) + .withId("trqjfsmlmbtx"); + model = BinaryData.fromObject(model).toObject(QuotaUsageInner.class); + Assertions.assertEquals("ostgkts", model.name().value()); + Assertions.assertEquals("dxeclzedqbcvh", model.name().localizedValue()); + Assertions.assertEquals(236699607082183058L, model.limit()); + Assertions.assertEquals("odqkdlwwqfb", model.unit()); + Assertions.assertEquals(3679022657074806419L, model.currentValue()); + Assertions.assertEquals("trqjfsmlmbtx", model.id()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageListTests.java new file mode 100644 index 000000000000..42f5277aa015 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageListTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.QuotaUsageList; +import org.junit.jupiter.api.Assertions; + +public final class QuotaUsageListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + QuotaUsageList model = BinaryData.fromString( + "{\"value\":[{\"name\":{\"value\":\"dznx\",\"localizedValue\":\"dsrhnjiv\"},\"limit\":8488959780262323,\"unit\":\"ovqfzge\",\"currentValue\":4588468813568796443,\"id\":\"uljltduceamtmcz\"},{\"name\":{\"value\":\"ejwcwwqiok\",\"localizedValue\":\"sx\"},\"limit\":9165184616629712222,\"unit\":\"vpkjpr\",\"currentValue\":2543879941778862448,\"id\":\"zqljyxgtczh\"},{\"name\":{\"value\":\"bsdshmkxmaehvbbx\",\"localizedValue\":\"iplt\"},\"limit\":3525559326756666639,\"unit\":\"axkgx\",\"currentValue\":1452554072563405259,\"id\":\"pyklyhpluodpvru\"}],\"nextLink\":\"lgzi\"}") + .toObject(QuotaUsageList.class); + Assertions.assertEquals("lgzi", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + QuotaUsageList model = new QuotaUsageList().withNextLink("lgzi"); + model = BinaryData.fromObject(model).toObject(QuotaUsageList.class); + Assertions.assertEquals("lgzi", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListMockTests.java index df11da6ce1a0..6d2286bcedbf 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListMockTests.java @@ -22,7 +22,7 @@ public final class QuotaUsagesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":{\"value\":\"rgmsplzga\",\"localizedValue\":\"cshhv\"},\"limit\":5821657988601371961,\"unit\":\"xkym\",\"currentValue\":5759368920772451636,\"id\":\"rjkixtw\"}]}"; + = "{\"value\":[{\"name\":{\"value\":\"ylollgtrczzydmxz\",\"localizedValue\":\"jpvuaurkihcirld\"},\"limit\":3662886964591682986,\"unit\":\"c\",\"currentValue\":4478329422803924367,\"id\":\"kjanur\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.quotaUsages().list("mguaml", com.azure.core.util.Context.NONE); + PagedIterable response = manager.quotaUsages().list("ypobkdqzr", com.azure.core.util.Context.NONE); - Assertions.assertEquals("rgmsplzga", response.iterator().next().name().value()); - Assertions.assertEquals("cshhv", response.iterator().next().name().localizedValue()); - Assertions.assertEquals(5821657988601371961L, response.iterator().next().limit()); - Assertions.assertEquals("xkym", response.iterator().next().unit()); - Assertions.assertEquals(5759368920772451636L, response.iterator().next().currentValue()); - Assertions.assertEquals("rjkixtw", response.iterator().next().id()); + Assertions.assertEquals("ylollgtrczzydmxz", response.iterator().next().name().value()); + Assertions.assertEquals("jpvuaurkihcirld", response.iterator().next().name().localizedValue()); + Assertions.assertEquals(3662886964591682986L, response.iterator().next().limit()); + Assertions.assertEquals("c", response.iterator().next().unit()); + Assertions.assertEquals(4478329422803924367L, response.iterator().next().currentValue()); + Assertions.assertEquals("kjanur", response.iterator().next().id()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicaTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicaTests.java new file mode 100644 index 000000000000..63b2baed7dd2 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicaTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ReadReplicaPromoteMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ReadReplicaPromoteOption; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Replica; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationRole; +import org.junit.jupiter.api.Assertions; + +public final class ReplicaTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Replica model = BinaryData.fromString( + "{\"role\":\"GeoAsyncReplica\",\"capacity\":118535522,\"replicationState\":\"Updating\",\"promoteMode\":\"Switchover\",\"promoteOption\":\"Forced\"}") + .toObject(Replica.class); + Assertions.assertEquals(ReplicationRole.GEO_ASYNC_REPLICA, model.role()); + Assertions.assertEquals(ReadReplicaPromoteMode.SWITCHOVER, model.promoteMode()); + Assertions.assertEquals(ReadReplicaPromoteOption.FORCED, model.promoteOption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Replica model = new Replica().withRole(ReplicationRole.GEO_ASYNC_REPLICA) + .withPromoteMode(ReadReplicaPromoteMode.SWITCHOVER) + .withPromoteOption(ReadReplicaPromoteOption.FORCED); + model = BinaryData.fromObject(model).toObject(Replica.class); + Assertions.assertEquals(ReplicationRole.GEO_ASYNC_REPLICA, model.role()); + Assertions.assertEquals(ReadReplicaPromoteMode.SWITCHOVER, model.promoteMode()); + Assertions.assertEquals(ReadReplicaPromoteOption.FORCED, model.promoteOption()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/RestartParameterTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/RestartParameterTests.java new file mode 100644 index 000000000000..beb891f591be --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/RestartParameterTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.FailoverMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter; +import org.junit.jupiter.api.Assertions; + +public final class RestartParameterTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RestartParameter model + = BinaryData.fromString("{\"restartWithFailover\":true,\"failoverMode\":\"PlannedFailover\"}") + .toObject(RestartParameter.class); + Assertions.assertTrue(model.restartWithFailover()); + Assertions.assertEquals(FailoverMode.PLANNED_FAILOVER, model.failoverMode()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RestartParameter model + = new RestartParameter().withRestartWithFailover(true).withFailoverMode(FailoverMode.PLANNED_FAILOVER); + model = BinaryData.fromObject(model).toObject(RestartParameter.class); + Assertions.assertTrue(model.restartWithFailover()); + Assertions.assertEquals(FailoverMode.PLANNED_FAILOVER, model.failoverMode()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerCapabilitiesListMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerCapabilitiesListMockTests.java deleted file mode 100644 index e7c73705ed1e..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerCapabilitiesListMockTests.java +++ /dev/null @@ -1,39 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerCapability; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServerCapabilitiesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"ylnio\",\"supportedServerEditions\":[{\"name\":\"bzjedmstk\",\"defaultSkuName\":\"l\",\"supportedStorageEditions\":[{\"name\":\"uiiznktwfansnvpd\",\"defaultStorageSizeMb\":2885516766254746853,\"supportedStorageMb\":[{},{},{}],\"status\":\"Disabled\",\"reason\":\"z\"},{\"name\":\"iwbuqny\",\"defaultStorageSizeMb\":5628376431700848630,\"supportedStorageMb\":[{}],\"status\":\"Disabled\",\"reason\":\"crpfbcunez\"}],\"supportedServerSkus\":[{\"name\":\"elfwy\",\"vCores\":2072196821,\"supportedIops\":1173398556,\"supportedMemoryPerVcoreMb\":989271166878506268,\"supportedZones\":[\"psihcla\",\"zvaylptrsqqw\",\"tcmwqkchc\"],\"supportedHaMode\":[\"SameZone\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"zjkjexfdeqv\",\"status\":\"Available\",\"reason\":\"lkkshkbffmbmx\"}],\"status\":\"Available\",\"reason\":\"ywwpgjxsnptfuj\"}],\"supportedServerVersions\":[{\"name\":\"aaoepttaqut\",\"supportedVersionsToUpgrade\":[\"emxswvruu\",\"zzjgehkfki\",\"rtixokff\",\"yinljqe\"],\"supportedFeatures\":[{\"name\":\"ixmonstshiyxg\",\"status\":\"Enabled\"},{\"name\":\"clduc\",\"status\":\"Disabled\"},{\"name\":\"ds\",\"status\":\"Enabled\"}],\"status\":\"Visible\",\"reason\":\"iegstm\"}],\"supportedFeatures\":[{\"name\":\"jizcilnghgs\",\"status\":\"Disabled\"},{\"name\":\"tbxqmuluxlxq\",\"status\":\"Enabled\"},{\"name\":\"rsbycucrwn\",\"status\":\"Enabled\"},{\"name\":\"ze\",\"status\":\"Enabled\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"ziqgfuh\",\"supportedSku\":\"zruswh\",\"supportedStorageGb\":1276166311,\"supportedServerVersions\":\"znvfbycjsxjww\",\"serverCount\":184999250,\"status\":\"Default\",\"reason\":\"wmxqhndvnoamlds\"},{\"supportedTier\":\"aohdjh\",\"supportedSku\":\"lzok\",\"supportedStorageGb\":434777672,\"supportedServerVersions\":\"pelnjetag\",\"serverCount\":1066573650,\"status\":\"Disabled\",\"reason\":\"tft\"}],\"geoBackupSupported\":\"Disabled\",\"zoneRedundantHaSupported\":\"Disabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Disabled\",\"storageAutoGrowthSupported\":\"Disabled\",\"onlineResizeSupported\":\"Disabled\",\"restricted\":\"Enabled\",\"status\":\"Visible\",\"reason\":\"rmozihmipgawt\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.serverCapabilities().list("cyrcmjdmspo", "apvu", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ylnio", response.iterator().next().name()); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerEditionCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerEditionCapabilityTests.java new file mode 100644 index 000000000000..b66b303dc588 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerEditionCapabilityTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerEditionCapability; + +public final class ServerEditionCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServerEditionCapability model = BinaryData.fromString( + "{\"name\":\"wkuofoskghsauu\",\"defaultSkuName\":\"jmvxie\",\"supportedStorageEditions\":[{\"name\":\"idyjrrfbyaosvexc\",\"defaultStorageSizeMb\":2728585991559305610,\"supportedStorageMb\":[{\"supportedIops\":817727758,\"supportedMaximumIops\":675704984,\"storageSizeMb\":7973148990313454716,\"maximumStorageSizeMb\":1899078480578944633,\"supportedThroughput\":1486272447,\"supportedMaximumThroughput\":529592400,\"defaultIopsTier\":\"fbuhfmvfaxkffe\",\"supportedIopsTiers\":[{}],\"status\":\"Disabled\",\"reason\":\"m\"},{\"supportedIops\":1857517478,\"supportedMaximumIops\":2122365511,\"storageSizeMb\":2218388246099346962,\"maximumStorageSizeMb\":5112966990971322380,\"supportedThroughput\":2042967034,\"supportedMaximumThroughput\":681165656,\"defaultIopsTier\":\"igrxwburvjxxjn\",\"supportedIopsTiers\":[{},{}],\"status\":\"Default\",\"reason\":\"koen\"},{\"supportedIops\":232907016,\"supportedMaximumIops\":333094369,\"storageSizeMb\":316131865784554272,\"maximumStorageSizeMb\":5918766078843387031,\"supportedThroughput\":1340454664,\"supportedMaximumThroughput\":45967354,\"defaultIopsTier\":\"ngkpocipazy\",\"supportedIopsTiers\":[{},{},{}],\"status\":\"Disabled\",\"reason\":\"g\"}],\"status\":\"Visible\",\"reason\":\"ucgygevqz\"},{\"name\":\"yp\",\"defaultStorageSizeMb\":7669982417206267558,\"supportedStorageMb\":[{\"supportedIops\":2078386445,\"supportedMaximumIops\":1616487247,\"storageSizeMb\":8467461328750687020,\"maximumStorageSizeMb\":5607759174193347785,\"supportedThroughput\":1342514759,\"supportedMaximumThroughput\":1880549577,\"defaultIopsTier\":\"de\",\"supportedIopsTiers\":[{},{},{}],\"status\":\"Default\",\"reason\":\"w\"},{\"supportedIops\":764179455,\"supportedMaximumIops\":1909902819,\"storageSizeMb\":1558927295996088992,\"maximumStorageSizeMb\":7437509251632449086,\"supportedThroughput\":22083476,\"supportedMaximumThroughput\":643021552,\"defaultIopsTier\":\"hajdeyeamdpha\",\"supportedIopsTiers\":[{},{},{},{}],\"status\":\"Available\",\"reason\":\"xw\"},{\"supportedIops\":9013568,\"supportedMaximumIops\":1260987021,\"storageSizeMb\":8145480673542216699,\"maximumStorageSizeMb\":6256253136283246565,\"supportedThroughput\":1714142157,\"supportedMaximumThroughput\":1446067033,\"defaultIopsTier\":\"kix\",\"supportedIopsTiers\":[{},{}],\"status\":\"Default\",\"reason\":\"pu\"},{\"supportedIops\":885179399,\"supportedMaximumIops\":1846682482,\"storageSizeMb\":4290539980849845271,\"maximumStorageSizeMb\":4868014576917618697,\"supportedThroughput\":591392190,\"supportedMaximumThroughput\":1184256001,\"defaultIopsTier\":\"zrnkcqvyxlwh\",\"supportedIopsTiers\":[{},{},{},{}],\"status\":\"Available\",\"reason\":\"hoqqnwvlr\"}],\"status\":\"Disabled\",\"reason\":\"hheunmmqhgyx\"}],\"supportedServerSkus\":[{\"name\":\"ocukoklyax\",\"vCores\":891942589,\"supportedIops\":1520112594,\"supportedMemoryPerVcoreMb\":6577393684401905724,\"supportedZones\":[\"beypewrmjmw\",\"vjektcxsenh\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\",\"SameZone\",\"SameZone\"],\"supportedFeatures\":[{\"name\":\"v\",\"status\":\"Disabled\"},{\"name\":\"gbiqylihkaet\",\"status\":\"Disabled\"}],\"securityProfile\":\"fcivfsnkym\",\"status\":\"Default\",\"reason\":\"hjfbebrjcxe\"},{\"name\":\"uwutttxfvjrbi\",\"vCores\":1236632858,\"supportedIops\":684290279,\"supportedMemoryPerVcoreMb\":427273766733730009,\"supportedZones\":[\"hfnljkyq\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{\"name\":\"idokgjlj\",\"status\":\"Enabled\"},{\"name\":\"vcltbgsncgh\",\"status\":\"Enabled\"},{\"name\":\"zz\",\"status\":\"Enabled\"}],\"securityProfile\":\"htxfvgxbfsmxnehm\",\"status\":\"Visible\",\"reason\":\"xgodebfqkkrbmp\"}],\"status\":\"Visible\",\"reason\":\"iw\"}") + .toObject(ServerEditionCapability.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServerEditionCapability model = new ServerEditionCapability(); + model = BinaryData.fromObject(model).toObject(ServerEditionCapability.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuCapabilityTests.java new file mode 100644 index 000000000000..7d6be6b12e5d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuCapabilityTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerSkuCapability; + +public final class ServerSkuCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServerSkuCapability model = BinaryData.fromString( + "{\"name\":\"ykvceoveil\",\"vCores\":1344905503,\"supportedIops\":2133356892,\"supportedMemoryPerVcoreMb\":1277468706791148582,\"supportedZones\":[\"njbkcnxdhbttkph\",\"wpn\",\"jtoqne\"],\"supportedHaMode\":[\"ZoneRedundant\"],\"supportedFeatures\":[{\"name\":\"phoxus\",\"status\":\"Enabled\"},{\"name\":\"bgyepsbj\",\"status\":\"Enabled\"}],\"securityProfile\":\"ugxywpmueef\",\"status\":\"Available\",\"reason\":\"qkqujidsu\"}") + .toObject(ServerSkuCapability.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServerSkuCapability model = new ServerSkuCapability(); + model = BinaryData.fromObject(model).toObject(ServerSkuCapability.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuTests.java new file mode 100644 index 000000000000..804ae16be3aa --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerSku; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; +import org.junit.jupiter.api.Assertions; + +public final class ServerSkuTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServerSku model + = BinaryData.fromString("{\"name\":\"ty\",\"tier\":\"MemoryOptimized\"}").toObject(ServerSku.class); + Assertions.assertEquals("ty", model.name()); + Assertions.assertEquals(SkuTier.MEMORY_OPTIMIZED, model.tier()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServerSku model = new ServerSku().withName("ty").withTier(SkuTier.MEMORY_OPTIMIZED); + model = BinaryData.fromObject(model).toObject(ServerSku.class); + Assertions.assertEquals("ty", model.name()); + Assertions.assertEquals(SkuTier.MEMORY_OPTIMIZED, model.tier()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateMockTests.java index ef5cbc0affc3..30661eca4524 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateMockTests.java @@ -10,7 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettingsModel; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettingsModel; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState; import java.nio.charset.StandardCharsets; @@ -23,7 +23,7 @@ public final class ServerThreatProtectionSettingsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-01-23T08:15:21Z\"},\"id\":\"gyki\",\"name\":\"emv\",\"type\":\"nbwzohmnrxxbso\"}"; + = "{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-01-18T07:47:20Z\"},\"id\":\"kdlpa\",\"name\":\"zrcxfailcfxwmdbo\",\"type\":\"dfgsftufqobrj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testCreateOrUpdate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ServerThreatProtectionSettingsModel response = manager.serverThreatProtectionSettings() + AdvancedThreatProtectionSettingsModel response = manager.serverThreatProtectionSettings() .define(ThreatProtectionName.DEFAULT) - .withExistingFlexibleServer("laqacigele", "hdbvqvwzkjop") + .withExistingFlexibleServer("dmdqb", "pypqtgsfj") .withState(ThreatProtectionState.DISABLED) .create(); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerVersionCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerVersionCapabilityTests.java new file mode 100644 index 000000000000..8d526b7160a4 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerVersionCapabilityTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersionCapability; + +public final class ServerVersionCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServerVersionCapability model = BinaryData.fromString( + "{\"name\":\"mgyudxytlmoyrxv\",\"supportedVersionsToUpgrade\":[\"dw\"],\"supportedFeatures\":[{\"name\":\"xhdzhlrqjbhckf\",\"status\":\"Enabled\"},{\"name\":\"xsbkyvpyca\",\"status\":\"Enabled\"},{\"name\":\"p\",\"status\":\"Enabled\"},{\"name\":\"kuwbcrnwb\",\"status\":\"Enabled\"}],\"status\":\"Available\",\"reason\":\"yvjusrtslhsp\"}") + .toObject(ServerVersionCapability.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServerVersionCapability model = new ServerVersionCapability(); + model = BinaryData.fromObject(model).toObject(ServerVersionCapability.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteMockTests.java deleted file mode 100644 index 4e0a529cad19..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteMockTests.java +++ /dev/null @@ -1,33 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.servers().delete("uughtuqfecjxeyg", "uhxu", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartMockTests.java deleted file mode 100644 index d6639dd41255..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartMockTests.java +++ /dev/null @@ -1,38 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FailoverMode; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServersRestartMockTests { - @Test - public void testRestart() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.servers() - .restart("er", "htvs", - new RestartParameter().withRestartWithFailover(true).withFailoverMode(FailoverMode.PLANNED_SWITCHOVER), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartMockTests.java deleted file mode 100644 index 0f3b46898fa9..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartMockTests.java +++ /dev/null @@ -1,33 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServersStartMockTests { - @Test - public void testStart() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.servers().start("ntsj", "qrsxyp", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopMockTests.java deleted file mode 100644 index ce90e0af8699..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopMockTests.java +++ /dev/null @@ -1,33 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServersStopMockTests { - @Test - public void testStop() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.servers().stop("uuuybnchrsziz", "yuel", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuForPatchTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuForPatchTests.java new file mode 100644 index 000000000000..b182cc001ffc --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuForPatchTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; +import org.junit.jupiter.api.Assertions; + +public final class SkuForPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SkuForPatch model + = BinaryData.fromString("{\"name\":\"j\",\"tier\":\"MemoryOptimized\"}").toObject(SkuForPatch.class); + Assertions.assertEquals("j", model.name()); + Assertions.assertEquals(SkuTier.MEMORY_OPTIMIZED, model.tier()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SkuForPatch model = new SkuForPatch().withName("j").withTier(SkuTier.MEMORY_OPTIMIZED); + model = BinaryData.fromObject(model).toObject(SkuForPatch.class); + Assertions.assertEquals("j", model.name()); + Assertions.assertEquals(SkuTier.MEMORY_OPTIMIZED, model.tier()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuTests.java new file mode 100644 index 000000000000..1e63fe910f81 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; +import org.junit.jupiter.api.Assertions; + +public final class SkuTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Sku model = BinaryData.fromString("{\"name\":\"rk\",\"tier\":\"Burstable\"}").toObject(Sku.class); + Assertions.assertEquals("rk", model.name()); + Assertions.assertEquals(SkuTier.BURSTABLE, model.tier()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Sku model = new Sku().withName("rk").withTier(SkuTier.BURSTABLE); + model = BinaryData.fromObject(model).toObject(Sku.class); + Assertions.assertEquals("rk", model.name()); + Assertions.assertEquals(SkuTier.BURSTABLE, model.tier()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageEditionCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageEditionCapabilityTests.java new file mode 100644 index 000000000000..f65e54374f4a --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageEditionCapabilityTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageEditionCapability; + +public final class StorageEditionCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StorageEditionCapability model = BinaryData.fromString( + "{\"name\":\"zlfbxzpuzycispnq\",\"defaultStorageSizeMb\":276524201323621430,\"supportedStorageMb\":[{\"supportedIops\":318334591,\"supportedMaximumIops\":567432535,\"storageSizeMb\":7247932824726952770,\"maximumStorageSizeMb\":762877145565948123,\"supportedThroughput\":312010573,\"supportedMaximumThroughput\":486608625,\"defaultIopsTier\":\"ik\",\"supportedIopsTiers\":[{\"name\":\"vtq\",\"iops\":122034029,\"status\":\"Available\",\"reason\":\"nhijggmebfsi\"},{\"name\":\"butr\",\"iops\":1477198207,\"status\":\"Disabled\",\"reason\":\"zmhjrunmp\"}],\"status\":\"Default\",\"reason\":\"bh\"},{\"supportedIops\":826548714,\"supportedMaximumIops\":1474388654,\"storageSizeMb\":1322573122193945613,\"maximumStorageSizeMb\":8942368239178938465,\"supportedThroughput\":734884561,\"supportedMaximumThroughput\":1438226066,\"defaultIopsTier\":\"nbtkcxywnytnr\",\"supportedIopsTiers\":[{\"name\":\"qidybyx\",\"iops\":2121722850,\"status\":\"Default\",\"reason\":\"aaxdbabphlwrq\"},{\"name\":\"ktsthsucocmny\",\"iops\":533461500,\"status\":\"Visible\",\"reason\":\"twwrqp\"},{\"name\":\"dckzywbiexz\",\"iops\":1043765409,\"status\":\"Available\",\"reason\":\"xibxujwbhqwalm\"}],\"status\":\"Visible\",\"reason\":\"xaepdkzjancuxr\"},{\"supportedIops\":714190447,\"supportedMaximumIops\":1879785159,\"storageSizeMb\":8686302020366055834,\"maximumStorageSizeMb\":6669094246951991149,\"supportedThroughput\":485576970,\"supportedMaximumThroughput\":413176852,\"defaultIopsTier\":\"tsdbpgn\",\"supportedIopsTiers\":[{\"name\":\"hpzxbzpfzab\",\"iops\":687811406,\"status\":\"Visible\",\"reason\":\"wtctyqi\"}],\"status\":\"Disabled\",\"reason\":\"ovplw\"},{\"supportedIops\":869574502,\"supportedMaximumIops\":487628587,\"storageSizeMb\":151235075959718301,\"maximumStorageSizeMb\":4627558794387697712,\"supportedThroughput\":1732351990,\"supportedMaximumThroughput\":1013735837,\"defaultIopsTier\":\"sxqu\",\"supportedIopsTiers\":[{\"name\":\"l\",\"iops\":1362242180,\"status\":\"Default\",\"reason\":\"kjz\"}],\"status\":\"Visible\",\"reason\":\"lpvlopw\"}],\"status\":\"Available\",\"reason\":\"hxpkd\"}") + .toObject(StorageEditionCapability.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StorageEditionCapability model = new StorageEditionCapability(); + model = BinaryData.fromObject(model).toObject(StorageEditionCapability.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageMbCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageMbCapabilityTests.java new file mode 100644 index 000000000000..6e902260d2e8 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageMbCapabilityTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageMbCapability; + +public final class StorageMbCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StorageMbCapability model = BinaryData.fromString( + "{\"supportedIops\":1060544654,\"supportedMaximumIops\":413325201,\"storageSizeMb\":3085775452141512212,\"maximumStorageSizeMb\":574738342939177032,\"supportedThroughput\":1617320432,\"supportedMaximumThroughput\":635482352,\"defaultIopsTier\":\"ped\",\"supportedIopsTiers\":[{\"name\":\"a\",\"iops\":996509936,\"status\":\"Default\",\"reason\":\"txp\"}],\"status\":\"Default\",\"reason\":\"tfhvpesapskrdqmh\"}") + .toObject(StorageMbCapability.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StorageMbCapability model = new StorageMbCapability(); + model = BinaryData.fromObject(model).toObject(StorageMbCapability.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTests.java new file mode 100644 index 000000000000..c5f32b6e2ab2 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTier; +import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrow; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageType; +import org.junit.jupiter.api.Assertions; + +public final class StorageTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Storage model = BinaryData.fromString( + "{\"storageSizeGB\":1828523289,\"autoGrow\":\"Enabled\",\"tier\":\"P3\",\"iops\":836392203,\"throughput\":313242233,\"type\":\"Premium_LRS\"}") + .toObject(Storage.class); + Assertions.assertEquals(1828523289, model.storageSizeGB()); + Assertions.assertEquals(StorageAutoGrow.ENABLED, model.autoGrow()); + Assertions.assertEquals(AzureManagedDiskPerformanceTier.P3, model.tier()); + Assertions.assertEquals(836392203, model.iops()); + Assertions.assertEquals(313242233, model.throughput()); + Assertions.assertEquals(StorageType.PREMIUM_LRS, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Storage model = new Storage().withStorageSizeGB(1828523289) + .withAutoGrow(StorageAutoGrow.ENABLED) + .withTier(AzureManagedDiskPerformanceTier.P3) + .withIops(836392203) + .withThroughput(313242233) + .withType(StorageType.PREMIUM_LRS); + model = BinaryData.fromObject(model).toObject(Storage.class); + Assertions.assertEquals(1828523289, model.storageSizeGB()); + Assertions.assertEquals(StorageAutoGrow.ENABLED, model.autoGrow()); + Assertions.assertEquals(AzureManagedDiskPerformanceTier.P3, model.tier()); + Assertions.assertEquals(836392203, model.iops()); + Assertions.assertEquals(313242233, model.throughput()); + Assertions.assertEquals(StorageType.PREMIUM_LRS, model.type()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTierCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTierCapabilityTests.java new file mode 100644 index 000000000000..3df6574b3866 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTierCapabilityTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageTierCapability; + +public final class StorageTierCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StorageTierCapability model = BinaryData + .fromString("{\"name\":\"dhtldwkyz\",\"iops\":1335454628,\"status\":\"Visible\",\"reason\":\"cwscwsvlx\"}") + .toObject(StorageTierCapability.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StorageTierCapability model = new StorageTierCapability(); + model = BinaryData.fromObject(model).toObject(StorageTierCapability.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SupportedFeatureTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SupportedFeatureTests.java new file mode 100644 index 000000000000..ba1803665412 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SupportedFeatureTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.SupportedFeature; + +public final class SupportedFeatureTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SupportedFeature model + = BinaryData.fromString("{\"name\":\"nobglaocq\",\"status\":\"Enabled\"}").toObject(SupportedFeature.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SupportedFeature model = new SupportedFeature(); + model = BinaryData.fromObject(model).toObject(SupportedFeature.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationsListSessionDetailsMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationsListSessionDetailsMockTests.java deleted file mode 100644 index bf6ed55b8b4b..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationsListSessionDetailsMockTests.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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SessionDetailsResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TuningConfigurationsListSessionDetailsMockTests { - @Test - public void testListSessionDetails() throws Exception { - String responseStr - = "{\"value\":[{\"iterationId\":\"mecvogygzyvneeza\",\"sessionId\":\"gh\",\"appliedConfiguration\":\"oqqtl\",\"iterationStartTime\":\"hzbkrkjj\",\"averageQueryRuntimeMs\":\"vfqnvhnqoewdo\",\"transactionsPerSecond\":\"yetesy\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.tuningConfigurations() - .listSessionDetails("ygbpvnwswmt", "k", TuningOptionEnum.INDEX, "twwgzwx", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mecvogygzyvneeza", response.iterator().next().iterationId()); - Assertions.assertEquals("gh", response.iterator().next().sessionId()); - Assertions.assertEquals("oqqtl", response.iterator().next().appliedConfiguration()); - Assertions.assertEquals("hzbkrkjj", response.iterator().next().iterationStartTime()); - Assertions.assertEquals("vfqnvhnqoewdo", response.iterator().next().averageQueryRuntimeMs()); - Assertions.assertEquals("yetesy", response.iterator().next().transactionsPerSecond()); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationsListSessionsMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationsListSessionsMockTests.java deleted file mode 100644 index 740b03e018d0..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningConfigurationsListSessionsMockTests.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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.SessionResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TuningConfigurationsListSessionsMockTests { - @Test - public void testListSessions() throws Exception { - String responseStr - = "{\"value\":[{\"sessionStartTime\":\"tlbijpzg\",\"sessionId\":\"srfhf\",\"status\":\"lmknbnxwcdom\",\"preTuningAqr\":\"vfqawzfgbrttuiac\",\"postTuningAqr\":\"iexhajl\",\"preTuningTps\":\"t\",\"postTuningTps\":\"qfyuttd\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.tuningConfigurations() - .listSessions("wvqsgny", "uuzivensrpmeyyvp", TuningOptionEnum.INDEX, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("tlbijpzg", response.iterator().next().sessionStartTime()); - Assertions.assertEquals("srfhf", response.iterator().next().sessionId()); - Assertions.assertEquals("lmknbnxwcdom", response.iterator().next().status()); - Assertions.assertEquals("vfqawzfgbrttuiac", response.iterator().next().preTuningAqr()); - Assertions.assertEquals("iexhajl", response.iterator().next().postTuningAqr()); - Assertions.assertEquals("t", response.iterator().next().preTuningTps()); - Assertions.assertEquals("qfyuttd", response.iterator().next().postTuningTps()); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningIndexesListRecommendationsMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningIndexesListRecommendationsMockTests.java deleted file mode 100644 index 6d0d63923e8d..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningIndexesListRecommendationsMockTests.java +++ /dev/null @@ -1,40 +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.resourcemanager.postgresqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.IndexRecommendationResource; -import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TuningIndexesListRecommendationsMockTests { - @Test - public void testListRecommendations() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"initialRecommendedTime\":\"2021-08-14T01:37:51Z\",\"lastRecommendedTime\":\"2021-05-27T22:38:34Z\",\"timesRecommended\":1214046395,\"improvedQueryIds\":[1464612539790608915,8608381823862362175,5891893224233637084,7315546447064539633],\"recommendationReason\":\"tzlswvaj\",\"recommendationType\":\"DropIndex\",\"implementationDetails\":{\"method\":\"x\",\"script\":\"qzasunwqrjzfrgqh\"},\"analyzedWorkload\":{\"startTime\":\"2021-04-05T15:21:07Z\",\"endTime\":\"2021-06-25T08:11:06Z\",\"queryCount\":280737276},\"estimatedImpact\":[{\"dimensionName\":\"r\",\"unit\":\"mbpyryxamebly\",\"queryId\":5825870420723879875,\"absoluteValue\":47.90070362234346},{\"dimensionName\":\"ocxnehvsmtodl\",\"unit\":\"yapucygvoa\",\"queryId\":6485859784985209976,\"absoluteValue\":72.88003049869354},{\"dimensionName\":\"ghiee\",\"unit\":\"lgvvpaseksgbu\",\"queryId\":6893190449137526055,\"absoluteValue\":92.07427386165983}],\"details\":{\"databaseName\":\"gaqi\",\"schema\":\"rpiwrqofulo\",\"table\":\"jnlex\",\"indexType\":\"cbjpibkephuu\",\"indexName\":\"rctat\",\"indexColumns\":[\"ntqpbr\",\"cyrduczkg\",\"fxyfsrucvcrrpcj\"],\"includedColumns\":[\"st\",\"jeaq\"]}},\"id\":\"mvvfko\",\"name\":\"mlghktuidvrmazlp\",\"type\":\"wwexymzvlazipbh\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.tuningIndexes() - .listRecommendations("z", "izvg", TuningOptionEnum.INDEX, RecommendationType.CREATE_INDEX, - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsInnerTests.java new file mode 100644 index 000000000000..b3a7f4fdb9fd --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsInnerTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; + +public final class TuningOptionsInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TuningOptionsInner model + = BinaryData.fromString("{\"id\":\"yhddvia\",\"name\":\"egfnmntfpmvmemfn\",\"type\":\"zdwvvbalxl\"}") + .toObject(TuningOptionsInner.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TuningOptionsInner model = new TuningOptionsInner(); + model = BinaryData.fromObject(model).toObject(TuningOptionsInner.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListTests.java new file mode 100644 index 000000000000..d3fb62b57dce --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class TuningOptionsListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TuningOptionsList model = BinaryData.fromString( + "{\"value\":[{\"id\":\"jcjbt\",\"name\":\"gaehvvibrxjjst\",\"type\":\"qbeitpkxztmoob\"},{\"id\":\"ft\",\"name\":\"dgfcwqmp\",\"type\":\"maqxzhemjyh\"},{\"id\":\"uj\",\"name\":\"wtwko\",\"type\":\"zwculkbawpfajnj\"}],\"nextLink\":\"tlwtjjguktalhsn\"}") + .toObject(TuningOptionsList.class); + Assertions.assertEquals("tlwtjjguktalhsn", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TuningOptionsList model = new TuningOptionsList() + .withValue(Arrays.asList(new TuningOptionsInner(), new TuningOptionsInner(), new TuningOptionsInner())) + .withNextLink("tlwtjjguktalhsn"); + model = BinaryData.fromObject(model).toObject(TuningOptionsList.class); + Assertions.assertEquals("tlwtjjguktalhsn", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsGetWithResponseMockTests.java similarity index 76% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsGetWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsGetWithResponseMockTests.java index a83c42f47e02..12fb647b35c8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsGetWithResponseMockTests.java @@ -10,17 +10,17 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsResource; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptions; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class TuningOptionsGetWithResponseMockTests { +public final class TuningOptionsOperationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - String responseStr = "{\"id\":\"iufiqwo\",\"name\":\"xqvapcohh\",\"type\":\"ucqpqojxcxzrz\"}"; + String responseStr = "{\"id\":\"ghihpvecms\",\"name\":\"clbl\",\"type\":\"jxl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -29,8 +29,9 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - TuningOptionsResource response = manager.tuningOptions() - .getWithResponse("klinhmdptysprq", "gnzxojpslsvj", TuningOptionEnum.INDEX, com.azure.core.util.Context.NONE) + TuningOptions response = manager.tuningOptionsOperations() + .getWithResponse("ccxnafbwqroohtuo", "maonurj", TuningOptionParameterEnum.TABLE, + com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListByServerMockTests.java similarity index 78% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListByServerMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListByServerMockTests.java index 1198c9fb0e16..15dfbc7062e6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListByServerMockTests.java @@ -11,16 +11,16 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsResource; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptions; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class TuningOptionsListByServerMockTests { +public final class TuningOptionsOperationsListByServerMockTests { @Test public void testListByServer() throws Exception { - String responseStr = "{\"value\":[{\"id\":\"etzqd\",\"name\":\"tjwfljhznamtua\",\"type\":\"mzwcjjncqt\"}]}"; + String responseStr = "{\"value\":[{\"id\":\"k\",\"name\":\"utvlxhr\",\"type\":\"qhvmblcouqe\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -29,8 +29,8 @@ public void testListByServer() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.tuningOptions().listByServer("cgdz", "enribc", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.tuningOptionsOperations().listByServer("yskbruff", "l", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListRecommendationsMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListRecommendationsMockTests.java new file mode 100644 index 000000000000..b7dea5f701e3 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListRecommendationsMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendation; +import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeParameterEnum; +import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class TuningOptionsOperationsListRecommendationsMockTests { + @Test + public void testListRecommendations() throws Exception { + String responseStr + = "{\"value\":[{\"kind\":\"rtceukdqkkyihzt\",\"properties\":{\"initialRecommendedTime\":\"2021-05-22T15:04:10Z\",\"lastRecommendedTime\":\"2021-04-01T19:50:36Z\",\"timesRecommended\":1149844590,\"improvedQueryIds\":[6059301836291431066,3026246036385723404],\"recommendationReason\":\"illcecfehu\",\"currentState\":\"oaguhic\",\"recommendationType\":\"DropIndex\",\"implementationDetails\":{\"method\":\"stacsjvhrweftkwq\",\"script\":\"pmvssehaep\"},\"analyzedWorkload\":{\"startTime\":\"2021-03-25T19:23:18Z\",\"endTime\":\"2021-08-18T20:43:29Z\",\"queryCount\":1805575440},\"estimatedImpact\":[{\"dimensionName\":\"euknijduyyes\",\"unit\":\"djfbocyv\",\"queryId\":2704241280285106932,\"absoluteValue\":37.16266942814275},{\"dimensionName\":\"ikdmhlakuflgbhga\",\"unit\":\"cdixmx\",\"queryId\":2007885947993273503,\"absoluteValue\":18.025093855472196},{\"dimensionName\":\"gdkfnoz\",\"unit\":\"oqbvjhvefgwbmqj\",\"queryId\":2962662676791309250,\"absoluteValue\":12.358462224037792},{\"dimensionName\":\"ymxbulpzealb\",\"unit\":\"kyojwyvfk\",\"queryId\":2743088131386651750,\"absoluteValue\":59.117992706724365}],\"details\":{\"databaseName\":\"gxjc\",\"schema\":\"zrrscub\",\"table\":\"sd\",\"indexType\":\"pxqwo\",\"indexName\":\"ffjxcjrmmuabwib\",\"indexColumns\":[\"gjonmcy\"],\"includedColumns\":[\"y\",\"bamwineo\",\"vfkakpold\",\"vevboclzh\"]}},\"id\":\"knyuxgvttxpn\",\"name\":\"upzaamrdixtre\",\"type\":\"ids\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PostgreSqlManager manager = PostgreSqlManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.tuningOptionsOperations() + .listRecommendations("bsjuscvsfx", "gctmgxuupbezq", TuningOptionParameterEnum.TABLE, + RecommendationTypeParameterEnum.DROP_INDEX, com.azure.core.util.Context.NONE); + + Assertions.assertEquals("rtceukdqkkyihzt", response.iterator().next().kind()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserAssignedIdentityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserAssignedIdentityTests.java new file mode 100644 index 000000000000..89ffb608594c --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserAssignedIdentityTests.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.UserAssignedIdentity; +import com.azure.resourcemanager.postgresqlflexibleserver.models.UserIdentity; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class UserAssignedIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserAssignedIdentity model = BinaryData.fromString( + "{\"userAssignedIdentities\":{\"ox\":{\"principalId\":\"jhhgdnhxmsi\",\"clientId\":\"omi\"},\"fgdo\":{\"principalId\":\"dufiq\",\"clientId\":\"ieuzaofjchvcyyy\"},\"shqvcimpev\":{\"principalId\":\"ubiipuipwoqonma\",\"clientId\":\"ekni\"}},\"principalId\":\"mblrrilbywd\",\"type\":\"SystemAssigned\",\"tenantId\":\"icc\"}") + .toObject(UserAssignedIdentity.class); + Assertions.assertEquals("jhhgdnhxmsi", model.userAssignedIdentities().get("ox").principalId()); + Assertions.assertEquals("omi", model.userAssignedIdentities().get("ox").clientId()); + Assertions.assertEquals("mblrrilbywd", model.principalId()); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserAssignedIdentity model = new UserAssignedIdentity() + .withUserAssignedIdentities( + mapOf("ox", new UserIdentity().withPrincipalId("jhhgdnhxmsi").withClientId("omi"), "fgdo", + new UserIdentity().withPrincipalId("dufiq").withClientId("ieuzaofjchvcyyy"), "shqvcimpev", + new UserIdentity().withPrincipalId("ubiipuipwoqonma").withClientId("ekni"))) + .withPrincipalId("mblrrilbywd") + .withType(IdentityType.SYSTEM_ASSIGNED); + model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); + Assertions.assertEquals("jhhgdnhxmsi", model.userAssignedIdentities().get("ox").principalId()); + Assertions.assertEquals("omi", model.userAssignedIdentities().get("ox").clientId()); + Assertions.assertEquals("mblrrilbywd", model.principalId()); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.type()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserIdentityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserIdentityTests.java new file mode 100644 index 000000000000..10e85a8f531f --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserIdentityTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.UserIdentity; +import org.junit.jupiter.api.Assertions; + +public final class UserIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UserIdentity model = BinaryData.fromString("{\"principalId\":\"wfscjfn\",\"clientId\":\"szqujizdvoq\"}") + .toObject(UserIdentity.class); + Assertions.assertEquals("wfscjfn", model.principalId()); + Assertions.assertEquals("szqujizdvoq", model.clientId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UserIdentity model = new UserIdentity().withPrincipalId("wfscjfn").withClientId("szqujizdvoq"); + model = BinaryData.fromObject(model).toObject(UserIdentity.class); + Assertions.assertEquals("wfscjfn", model.principalId()); + Assertions.assertEquals("szqujizdvoq", model.clientId()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationDetailsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationDetailsTests.java new file mode 100644 index 000000000000..d744a0c3ef3e --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationDetailsTests.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.DbLevelValidationStatus; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationDetails; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationMessage; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationState; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationSummaryItem; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ValidationDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ValidationDetails model = BinaryData.fromString( + "{\"status\":\"Succeeded\",\"validationStartTimeInUtc\":\"2021-08-28T01:51:20Z\",\"validationEndTimeInUtc\":\"2021-09-06T22:54:10Z\",\"serverLevelValidationDetails\":[{\"type\":\"saznqntoruds\",\"state\":\"Failed\",\"messages\":[{\"state\":\"Warning\",\"message\":\"grauwjuetaebur\"},{\"state\":\"Warning\",\"message\":\"ovsm\"}]},{\"type\":\"xwabmqoe\",\"state\":\"Succeeded\",\"messages\":[{\"state\":\"Failed\",\"message\":\"u\"}]},{\"type\":\"jmqlgkfb\",\"state\":\"Warning\",\"messages\":[{\"state\":\"Succeeded\",\"message\":\"bjcntujitc\"},{\"state\":\"Succeeded\",\"message\":\"twwaezkojvdcpzf\"}]},{\"type\":\"ouicybxarzgszu\",\"state\":\"Failed\",\"messages\":[{\"state\":\"Warning\",\"message\":\"idoamciodhkha\"},{\"state\":\"Succeeded\",\"message\":\"nz\"},{\"state\":\"Succeeded\",\"message\":\"wntoegokdwbwh\"},{\"state\":\"Failed\",\"message\":\"cmrvexzt\"}]}],\"dbLevelValidationDetails\":[{\"databaseName\":\"gsfraoyzkoow\",\"startedOn\":\"2021-01-01T04:06:13Z\",\"endedOn\":\"2021-11-23T22:05:35Z\",\"summary\":[{\"type\":\"wqaldsyu\",\"state\":\"Warning\",\"messages\":[{}]},{\"type\":\"qfobwyz\",\"state\":\"Succeeded\",\"messages\":[{},{}]},{\"type\":\"t\",\"state\":\"Failed\",\"messages\":[{},{},{}]},{\"type\":\"gmhrskdsnfdsdoak\",\"state\":\"Warning\",\"messages\":[{},{},{}]}]}]}") + .toObject(ValidationDetails.class); + Assertions.assertEquals(ValidationState.SUCCEEDED, model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-28T01:51:20Z"), model.validationStartTimeInUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T22:54:10Z"), model.validationEndTimeInUtc()); + Assertions.assertEquals("saznqntoruds", model.serverLevelValidationDetails().get(0).type()); + Assertions.assertEquals(ValidationState.FAILED, model.serverLevelValidationDetails().get(0).state()); + Assertions.assertEquals(ValidationState.WARNING, + model.serverLevelValidationDetails().get(0).messages().get(0).state()); + Assertions.assertEquals("grauwjuetaebur", + model.serverLevelValidationDetails().get(0).messages().get(0).message()); + Assertions.assertEquals("gsfraoyzkoow", model.dbLevelValidationDetails().get(0).databaseName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T04:06:13Z"), + model.dbLevelValidationDetails().get(0).startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-23T22:05:35Z"), + model.dbLevelValidationDetails().get(0).endedOn()); + Assertions.assertEquals("wqaldsyu", model.dbLevelValidationDetails().get(0).summary().get(0).type()); + Assertions.assertEquals(ValidationState.WARNING, + model.dbLevelValidationDetails().get(0).summary().get(0).state()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ValidationDetails model + = new ValidationDetails().withStatus(ValidationState.SUCCEEDED) + .withValidationStartTimeInUtc(OffsetDateTime.parse("2021-08-28T01:51:20Z")) + .withValidationEndTimeInUtc(OffsetDateTime.parse("2021-09-06T22:54:10Z")) + .withServerLevelValidationDetails( + Arrays.asList( + new ValidationSummaryItem() + .withType("saznqntoruds") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList( + new ValidationMessage().withState(ValidationState.WARNING) + .withMessage("grauwjuetaebur"), + new ValidationMessage().withState(ValidationState.WARNING).withMessage("ovsm"))), + new ValidationSummaryItem() + .withType("xwabmqoe") + .withState(ValidationState.SUCCEEDED) + .withMessages(Arrays + .asList(new ValidationMessage().withState(ValidationState.FAILED).withMessage("u"))), + new ValidationSummaryItem().withType("jmqlgkfb") + .withState(ValidationState.WARNING) + .withMessages(Arrays.asList( + new ValidationMessage().withState(ValidationState.SUCCEEDED).withMessage("bjcntujitc"), + new ValidationMessage().withState(ValidationState.SUCCEEDED) + .withMessage("twwaezkojvdcpzf"))), + new ValidationSummaryItem().withType("ouicybxarzgszu") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList( + new ValidationMessage().withState(ValidationState.WARNING).withMessage("idoamciodhkha"), + new ValidationMessage().withState(ValidationState.SUCCEEDED).withMessage("nz"), + new ValidationMessage().withState(ValidationState.SUCCEEDED) + .withMessage("wntoegokdwbwh"), + new ValidationMessage().withState(ValidationState.FAILED).withMessage("cmrvexzt"))))) + .withDbLevelValidationDetails( + Arrays.asList(new DbLevelValidationStatus().withDatabaseName("gsfraoyzkoow") + .withStartedOn(OffsetDateTime.parse("2021-01-01T04:06:13Z")) + .withEndedOn(OffsetDateTime.parse("2021-11-23T22:05:35Z")) + .withSummary(Arrays.asList( + new ValidationSummaryItem().withType("wqaldsyu") + .withState(ValidationState.WARNING) + .withMessages(Arrays.asList(new ValidationMessage())), + new ValidationSummaryItem().withType("qfobwyz") + .withState(ValidationState.SUCCEEDED) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage())), + new ValidationSummaryItem().withType("t") + .withState(ValidationState.FAILED) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), + new ValidationMessage())), + new ValidationSummaryItem().withType("gmhrskdsnfdsdoak") + .withState(ValidationState.WARNING) + .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), + new ValidationMessage())))))); + model = BinaryData.fromObject(model).toObject(ValidationDetails.class); + Assertions.assertEquals(ValidationState.SUCCEEDED, model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-28T01:51:20Z"), model.validationStartTimeInUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T22:54:10Z"), model.validationEndTimeInUtc()); + Assertions.assertEquals("saznqntoruds", model.serverLevelValidationDetails().get(0).type()); + Assertions.assertEquals(ValidationState.FAILED, model.serverLevelValidationDetails().get(0).state()); + Assertions.assertEquals(ValidationState.WARNING, + model.serverLevelValidationDetails().get(0).messages().get(0).state()); + Assertions.assertEquals("grauwjuetaebur", + model.serverLevelValidationDetails().get(0).messages().get(0).message()); + Assertions.assertEquals("gsfraoyzkoow", model.dbLevelValidationDetails().get(0).databaseName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T04:06:13Z"), + model.dbLevelValidationDetails().get(0).startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-23T22:05:35Z"), + model.dbLevelValidationDetails().get(0).endedOn()); + Assertions.assertEquals("wqaldsyu", model.dbLevelValidationDetails().get(0).summary().get(0).type()); + Assertions.assertEquals(ValidationState.WARNING, + model.dbLevelValidationDetails().get(0).summary().get(0).state()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationMessageTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationMessageTests.java new file mode 100644 index 000000000000..d86bef56a4b8 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationMessageTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationMessage; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationState; +import org.junit.jupiter.api.Assertions; + +public final class ValidationMessageTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ValidationMessage model = BinaryData.fromString("{\"state\":\"Warning\",\"message\":\"uzkopbminrfd\"}") + .toObject(ValidationMessage.class); + Assertions.assertEquals(ValidationState.WARNING, model.state()); + Assertions.assertEquals("uzkopbminrfd", model.message()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ValidationMessage model + = new ValidationMessage().withState(ValidationState.WARNING).withMessage("uzkopbminrfd"); + model = BinaryData.fromObject(model).toObject(ValidationMessage.class); + Assertions.assertEquals(ValidationState.WARNING, model.state()); + Assertions.assertEquals("uzkopbminrfd", model.message()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationSummaryItemTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationSummaryItemTests.java new file mode 100644 index 000000000000..dc39dc689145 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationSummaryItemTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationMessage; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationState; +import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationSummaryItem; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ValidationSummaryItemTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ValidationSummaryItem model = BinaryData.fromString( + "{\"type\":\"kzevdlhewpusds\",\"state\":\"Warning\",\"messages\":[{\"state\":\"Warning\",\"message\":\"bejdcn\"},{\"state\":\"Failed\",\"message\":\"oakufgm\"},{\"state\":\"Failed\",\"message\":\"rdgrtw\"}]}") + .toObject(ValidationSummaryItem.class); + Assertions.assertEquals("kzevdlhewpusds", model.type()); + Assertions.assertEquals(ValidationState.WARNING, model.state()); + Assertions.assertEquals(ValidationState.WARNING, model.messages().get(0).state()); + Assertions.assertEquals("bejdcn", model.messages().get(0).message()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ValidationSummaryItem model = new ValidationSummaryItem().withType("kzevdlhewpusds") + .withState(ValidationState.WARNING) + .withMessages( + Arrays.asList(new ValidationMessage().withState(ValidationState.WARNING).withMessage("bejdcn"), + new ValidationMessage().withState(ValidationState.FAILED).withMessage("oakufgm"), + new ValidationMessage().withState(ValidationState.FAILED).withMessage("rdgrtw"))); + model = BinaryData.fromObject(model).toObject(ValidationSummaryItem.class); + Assertions.assertEquals("kzevdlhewpusds", model.type()); + Assertions.assertEquals(ValidationState.WARNING, model.state()); + Assertions.assertEquals(ValidationState.WARNING, model.messages().get(0).state()); + Assertions.assertEquals("bejdcn", model.messages().get(0).message()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointInnerTests.java new file mode 100644 index 000000000000..2d9195d23c20 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointInnerTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VirtualEndpointInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualEndpointInner model = BinaryData.fromString( + "{\"id\":\"cdmxzrpoaiml\",\"name\":\"iaaomylweazul\",\"type\":\"ethwwnpjhlfz\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"hfbousnfepgfew\",\"twly\"],\"virtualEndpoints\":[\"cxy\",\"xhdjhl\",\"mmbcxfhbcp\",\"rxvxcjzh\"]}}") + .toObject(VirtualEndpointInner.class); + Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); + Assertions.assertEquals("hfbousnfepgfew", model.members().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualEndpointInner model = new VirtualEndpointInner().withEndpointType(VirtualEndpointType.READ_WRITE) + .withMembers(Arrays.asList("hfbousnfepgfew", "twly")); + model = BinaryData.fromObject(model).toObject(VirtualEndpointInner.class); + Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); + Assertions.assertEquals("hfbousnfepgfew", model.members().get(0)); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourceForPatchTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourceForPatchTests.java new file mode 100644 index 000000000000..64eee632762d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourceForPatchTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResourceForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VirtualEndpointResourceForPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualEndpointResourceForPatch model = BinaryData.fromString( + "{\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"xtgqscjavftjuh\",\"qaz\",\"mtggu\"],\"virtualEndpoints\":[\"jrajcivm\"]}}") + .toObject(VirtualEndpointResourceForPatch.class); + Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); + Assertions.assertEquals("xtgqscjavftjuh", model.members().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualEndpointResourceForPatch model + = new VirtualEndpointResourceForPatch().withEndpointType(VirtualEndpointType.READ_WRITE) + .withMembers(Arrays.asList("xtgqscjavftjuh", "qaz", "mtggu")); + model = BinaryData.fromObject(model).toObject(VirtualEndpointResourceForPatch.class); + Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); + Assertions.assertEquals("xtgqscjavftjuh", model.members().get(0)); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourcePropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourcePropertiesTests.java new file mode 100644 index 000000000000..0a1c5e0872ff --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourcePropertiesTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceProperties; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VirtualEndpointResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualEndpointResourceProperties model = BinaryData + .fromString( + "{\"endpointType\":\"ReadWrite\",\"members\":[\"fiwrxgkn\"],\"virtualEndpoints\":[\"yinzqodfvpgs\"]}") + .toObject(VirtualEndpointResourceProperties.class); + Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); + Assertions.assertEquals("fiwrxgkn", model.members().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualEndpointResourceProperties model + = new VirtualEndpointResourceProperties().withEndpointType(VirtualEndpointType.READ_WRITE) + .withMembers(Arrays.asList("fiwrxgkn")); + model = BinaryData.fromObject(model).toObject(VirtualEndpointResourceProperties.class); + Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); + Assertions.assertEquals("fiwrxgkn", model.members().get(0)); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateMockTests.java index cc3df2e33cd7..49812ea6f50d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateMockTests.java @@ -10,7 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResource; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoint; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -23,7 +23,7 @@ public final class VirtualEndpointsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"id\":\"cmmzrrs\",\"name\":\"biwsd\",\"type\":\"pxqwo\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"jrmmuabwib\",\"jogjonmc\"],\"virtualEndpoints\":[\"oyzbamwineofvf\",\"akpoldtvevbo\",\"lz\",\"zjknyuxg\"]}}"; + = "{\"id\":\"jszlb\",\"name\":\"mnlzijiufehgmvf\",\"type\":\"wyvq\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"iylylyfw\",\"zutgqztwhghmupg\"],\"virtualEndpoints\":[\"tcdxabbujftaben\",\"bklqpxz\",\"cafeddw\",\"nlzafwxudgnh\"]}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testCreate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - VirtualEndpointResource response = manager.virtualEndpoints() - .define("hulrtywikdmhla") - .withExistingFlexibleServer("c", "v") + VirtualEndpoint response = manager.virtualEndpoints() + .define("pt") + .withExistingFlexibleServer("abzoghktdpyczhco", "ocnhzqrottjzcfyj") .withEndpointType(VirtualEndpointType.READ_WRITE) - .withMembers(Arrays.asList("mqjch")) + .withMembers(Arrays.asList("psjoqcjenk", "hf")) .create(); Assertions.assertEquals(VirtualEndpointType.READ_WRITE, response.endpointType()); - Assertions.assertEquals("jrmmuabwib", response.members().get(0)); + Assertions.assertEquals("iylylyfw", response.members().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetWithResponseMockTests.java index baf1228423fd..363d69e8d94e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetWithResponseMockTests.java @@ -10,7 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResource; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoint; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,7 +22,7 @@ public final class VirtualEndpointsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"id\":\"upia\",\"name\":\"xnafbw\",\"type\":\"oohtuovmaonurjtu\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"ecmslclbl\"],\"virtualEndpoints\":[\"lt\",\"sjuscvsfxigctmg\",\"uupb\"]}}"; + = "{\"id\":\"rmkfqlwxldykals\",\"name\":\"aolnjpnnbmjk\",\"type\":\"bjgsjjxxahmrn\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"xyivpinbm\",\"wbjijkgq\",\"nhmbkez\"],\"virtualEndpoints\":[\"ujvaannggi\",\"cwkdtaaw\"]}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - VirtualEndpointResource response = manager.virtualEndpoints() - .getWithResponse("vidbztjhqtfb", "vnynkb", "etnjuhpsprkz", com.azure.core.util.Context.NONE) + VirtualEndpoint response = manager.virtualEndpoints() + .getWithResponse("bhbcdszir", "randoypmb", "t", com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(VirtualEndpointType.READ_WRITE, response.endpointType()); - Assertions.assertEquals("ecmslclbl", response.members().get(0)); + Assertions.assertEquals("xyivpinbm", response.members().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerMockTests.java index 90f876a7f433..7541aaccdfba 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerMockTests.java @@ -11,7 +11,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResource; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoint; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -23,7 +23,7 @@ public final class VirtualEndpointsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"id\":\"qm\",\"name\":\"zgwldoychillcec\",\"type\":\"huwaoaguhic\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"ac\"],\"virtualEndpoints\":[\"hrweftkw\",\"ejpmvssehaepwa\",\"cxtczhupeukn\",\"jduyyespydjfb\"]}}]}"; + = "{\"value\":[{\"id\":\"nxwbjsidbirkfp\",\"name\":\"okdgoge\",\"type\":\"jymrhbg\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"wnf\"],\"virtualEndpoints\":[\"hhqosmffjku\",\"ycyarnroohg\"]}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testListByServer() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.virtualEndpoints().listByServer("zqccydrtce", "kdqkkyihzt", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.virtualEndpoints().listByServer("wfekaumrrqmb", "mqkra", com.azure.core.util.Context.NONE); Assertions.assertEquals(VirtualEndpointType.READ_WRITE, response.iterator().next().endpointType()); - Assertions.assertEquals("ac", response.iterator().next().members().get(0)); + Assertions.assertEquals("wnf", response.iterator().next().members().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListTests.java new file mode 100644 index 000000000000..4465c682b37f --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointsList; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VirtualEndpointsListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualEndpointsList model = BinaryData.fromString( + "{\"value\":[{\"id\":\"sgbpfgzdjtx\",\"name\":\"flbqvgaq\",\"type\":\"gafcqu\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"wsdtutnwl\",\"uycvuzhyrmewip\",\"vekdxukuqgsjjxu\",\"dxgketwzhhzjhfj\"],\"virtualEndpoints\":[\"vmuvgpmu\"]}}],\"nextLink\":\"qsxvmhf\"}") + .toObject(VirtualEndpointsList.class); + Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.value().get(0).endpointType()); + Assertions.assertEquals("wsdtutnwl", model.value().get(0).members().get(0)); + Assertions.assertEquals("qsxvmhf", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualEndpointsList model = new VirtualEndpointsList() + .withValue(Arrays.asList(new VirtualEndpointInner().withEndpointType(VirtualEndpointType.READ_WRITE) + .withMembers(Arrays.asList("wsdtutnwl", "uycvuzhyrmewip", "vekdxukuqgsjjxu", "dxgketwzhhzjhfj")))) + .withNextLink("qsxvmhf"); + model = BinaryData.fromObject(model).toObject(VirtualEndpointsList.class); + Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.value().get(0).endpointType()); + Assertions.assertEquals("wsdtutnwl", model.value().get(0).members().get(0)); + Assertions.assertEquals("qsxvmhf", model.nextLink()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageModelInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageModelInnerTests.java new file mode 100644 index 000000000000..61cc3c4d01bf --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageModelInnerTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageModelInner; + +public final class VirtualNetworkSubnetUsageModelInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkSubnetUsageModelInner model = BinaryData.fromString( + "{\"delegatedSubnetsUsage\":[{\"subnetName\":\"bhu\",\"usage\":7040334631304760179}],\"location\":\"yue\",\"subscriptionId\":\"lynsqyrpf\"}") + .toObject(VirtualNetworkSubnetUsageModelInner.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualNetworkSubnetUsageModelInner model = new VirtualNetworkSubnetUsageModelInner(); + model = BinaryData.fromObject(model).toObject(VirtualNetworkSubnetUsageModelInner.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageParameterTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageParameterTests.java new file mode 100644 index 000000000000..ae77a8f84c82 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageParameterTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; +import org.junit.jupiter.api.Assertions; + +public final class VirtualNetworkSubnetUsageParameterTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualNetworkSubnetUsageParameter model = BinaryData.fromString("{\"virtualNetworkArmResourceId\":\"zjyi\"}") + .toObject(VirtualNetworkSubnetUsageParameter.class); + Assertions.assertEquals("zjyi", model.virtualNetworkArmResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VirtualNetworkSubnetUsageParameter model + = new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId("zjyi"); + model = BinaryData.fromObject(model).toObject(VirtualNetworkSubnetUsageParameter.class); + Assertions.assertEquals("zjyi", model.virtualNetworkArmResourceId()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsagesExecuteWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsagesListWithResponseMockTests.java similarity index 68% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsagesExecuteWithResponseMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsagesListWithResponseMockTests.java index 5ef740a70eff..b75b7cb4cf3f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsagesExecuteWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsagesListWithResponseMockTests.java @@ -10,18 +10,18 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; +import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageModel; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageResult; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class VirtualNetworkSubnetUsagesExecuteWithResponseMockTests { +public final class VirtualNetworkSubnetUsagesListWithResponseMockTests { @Test - public void testExecuteWithResponse() throws Exception { + public void testListWithResponse() throws Exception { String responseStr - = "{\"delegatedSubnetsUsage\":[{\"subnetName\":\"dswys\",\"usage\":1520186438026533179},{\"subnetName\":\"fgllukkutvlx\",\"usage\":8876141444455718154}],\"location\":\"vmblcouqe\",\"subscriptionId\":\"hbcdsziry\"}"; + = "{\"delegatedSubnetsUsage\":[{\"subnetName\":\"yrdnqod\",\"usage\":5546827774753159814},{\"subnetName\":\"hqfaqnvz\",\"usage\":6550733116742453800},{\"subnetName\":\"pem\",\"usage\":1397083088436358597},{\"subnetName\":\"sczuejdtxptlghwz\",\"usage\":4250319032943911677}],\"location\":\"jjstliuhqawmo\",\"subscriptionId\":\"ancz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,9 +30,9 @@ public void testExecuteWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - VirtualNetworkSubnetUsageResult response = manager.virtualNetworkSubnetUsages() - .executeWithResponse("ttxpnrupza", - new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId("rdixt"), + VirtualNetworkSubnetUsageModel response = manager.virtualNetworkSubnetUsages() + .listWithResponse("ookrtalvnbw", + new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId("bemeluclvd"), com.azure.core.util.Context.NONE) .getValue(); From 4d443591e1a7ea5079a6812b6bcf330743116a71 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Sun, 23 Nov 2025 23:40:46 -0800 Subject: [PATCH 13/26] [Automation] Generate Fluent Lite from Swagger newrelic#package-2025-05-01-preview (#47364) --- .../CHANGELOG.md | 80 +- .../README.md | 8 +- .../SAMPLE.md | 326 +- .../pom.xml | 4 +- .../NewRelicObservabilityManager.java | 53 +- .../fluent/AccountsClient.java | 6 +- .../fluent/BillingInfoesClient.java | 13 +- .../ConnectedPartnerResourcesClient.java | 4 + .../fluent/MonitoredSubscriptionsClient.java | 91 +- .../fluent/MonitorsClient.java | 385 +- .../fluent/NewRelicObservability.java | 19 +- .../fluent/OrganizationsClient.java | 6 +- .../fluent/PlansClient.java | 4 +- .../fluent/SaaSClient.java | 43 + .../fluent/TagRulesClient.java | 88 +- .../models/LatestLinkedSaaSResponseInner.java | 122 + .../fluent/models/MetricRulesInner.java | 6 +- .../fluent/models/MonitorProperties.java | 32 + .../MonitoredSubscriptionPropertiesInner.java | 17 + .../models/NewRelicMonitorResourceInner.java | 24 + ...wRelicMonitorResourceUpdateProperties.java | 32 + .../SaaSResourceDetailsResponseInner.java | 163 + .../implementation/AccountsClientImpl.java | 185 +- .../BillingInfoesClientImpl.java | 98 +- .../ConnectedPartnerResourcesClientImpl.java | 206 +- .../LatestLinkedSaaSResponseImpl.java | 36 + .../MonitoredSubscriptionPropertiesImpl.java | 9 +- .../MonitoredSubscriptionsClientImpl.java | 935 +++-- .../implementation/MonitorsClientImpl.java | 3216 ++++++++++++----- .../implementation/MonitorsImpl.java | 136 +- .../NewRelicMonitorResourceImpl.java | 81 +- .../NewRelicObservabilityImpl.java | 64 +- .../implementation/OperationsClientImpl.java | 127 +- .../OrganizationsClientImpl.java | 187 +- .../implementation/PlansClientImpl.java | 171 +- .../implementation/SaaSClientImpl.java | 176 + .../implementation/SaaSImpl.java | 58 + .../SaaSResourceDetailsResponseImpl.java | 49 + .../implementation/TagRuleImpl.java | 2 +- .../implementation/TagRulesClientImpl.java | 871 +++-- .../models/AccountInfo.java | 6 +- .../models/Accounts.java | 6 +- .../models/ActivateSaaSParameterRequest.java | 135 + .../models/AppServicesGetRequest.java | 6 +- .../models/BillingCycle.java | 56 - .../models/BillingInfoes.java | 13 +- .../models/ConnectedPartnerResources.java | 4 + ...ConnectedPartnerResourcesListResponse.java | 22 +- .../models/HostsGetRequest.java | 6 +- .../models/LatestLinkedSaaSResponse.java | 34 + .../models/LinkedResourceListResponse.java | 22 +- .../models/ManagedServiceIdentityType.java | 4 +- .../models/MarketplaceSaaSInfo.java | 56 + .../models/MetricRules.java | 2 +- .../models/MetricsRequest.java | 6 +- .../models/MetricsStatusRequest.java | 6 +- .../MonitoredSubscriptionProperties.java | 8 + .../MonitoredSubscriptionPropertiesList.java | 18 +- .../models/MonitoredSubscriptions.java | 61 +- .../models/Monitors.java | 238 +- .../models/MonitorsSwitchBillingHeaders.java | 2 + .../models/NewRelicMonitorResource.java | 206 +- .../models/NewRelicMonitorResourceUpdate.java | 23 + .../models/Organizations.java | 6 +- .../models/PlanData.java | 16 +- .../newrelicobservability/models/Plans.java | 4 +- .../models/ResubscribeProperties.java | 265 ++ .../newrelicobservability/models/SaaS.java | 37 + .../models/SaaSData.java | 93 + .../models/SaaSResourceDetailsResponse.java | 56 + .../models/SwitchBillingRequest.java | 6 +- .../models/TagRules.java | 38 +- .../models/UserInfo.java | 6 +- .../proxy-config.json | 2 +- ...cemanager-newrelicobservability.properties | 1 + .../generated/AccountsListSamples.java | 6 +- .../generated/BillingInfoGetSamples.java | 3 +- .../ConnectedPartnerResourcesListSamples.java | 3 +- ...edSubscriptionsCreateOrUpdateSamples.java} | 9 +- .../MonitoredSubscriptionsDeleteSamples.java | 3 +- .../MonitoredSubscriptionsGetSamples.java | 3 +- .../MonitoredSubscriptionsListSamples.java | 3 +- .../MonitoredSubscriptionsUpdateSamples.java | 3 +- .../MonitorsCreateOrUpdateSamples.java | 9 +- .../generated/MonitorsDeleteSamples.java | 10 +- .../MonitorsGetByResourceGroupSamples.java | 3 +- .../MonitorsGetMetricRulesSamples.java | 6 +- .../MonitorsGetMetricStatusSamples.java | 6 +- .../MonitorsLatestLinkedSaaSSamples.java | 42 + .../generated/MonitorsLinkSaaSSamples.java | 30 + .../MonitorsListAppServicesSamples.java | 6 +- .../MonitorsListByResourceGroupSamples.java | 3 +- .../generated/MonitorsListHostsSamples.java | 6 +- .../MonitorsListLinkedResourcesSamples.java | 4 +- ...MonitorsListMonitoredResourcesSamples.java | 6 +- .../generated/MonitorsListSamples.java | 3 +- .../MonitorsRefreshIngestionKeySamples.java | 26 + .../generated/MonitorsResubscribeSamples.java | 25 + .../MonitorsSwitchBillingSamples.java | 9 +- .../generated/MonitorsUpdateSamples.java | 6 +- .../MonitorsVmHostPayloadSamples.java | 6 +- .../generated/OperationsListSamples.java | 6 +- .../generated/OrganizationsListSamples.java | 6 +- .../generated/PlansListSamples.java | 6 +- .../SaaSActivateResourceSamples.java | 31 + .../TagRulesCreateOrUpdateSamples.java | 6 +- .../generated/TagRulesDeleteSamples.java | 6 +- .../generated/TagRulesGetSamples.java | 6 +- ...sListByNewRelicMonitorResourceSamples.java | 6 +- .../generated/TagRulesUpdateSamples.java | 6 +- .../generated/AccountsListMockTests.java | 16 +- .../ActivateSaaSParameterRequestTests.java | 29 + .../generated/AppServiceInfoInnerTests.java | 23 +- .../generated/AppServicesGetRequestTests.java | 18 +- .../AppServicesListResponseTests.java | 34 +- .../BillingInfoResponseInnerTests.java | 49 +- ...BillingInfoesGetWithResponseMockTests.java | 24 +- ...nnectedPartnerResourcePropertiesTests.java | 27 +- ...dPartnerResourcesListFormatInnerTests.java | 26 +- ...onnectedPartnerResourcesListMockTests.java | 18 +- ...ctedPartnerResourcesListResponseTests.java | 53 +- .../generated/FilteringTagTests.java | 19 +- .../generated/HostsGetRequestTests.java | 13 +- .../LatestLinkedSaaSResponseInnerTests.java | 29 + .../generated/LinkedResourceInnerTests.java | 8 +- .../LinkedResourceListResponseTests.java | 18 +- .../generated/LogRulesTests.java | 28 +- .../ManagedServiceIdentityTests.java | 14 +- .../generated/MarketplaceSaaSInfoTests.java | 38 +- .../generated/MetricRulesInnerTests.java | 34 +- .../generated/MetricsRequestTests.java | 8 +- .../generated/MetricsStatusRequestTests.java | 19 +- .../MetricsStatusResponseInnerTests.java | 9 +- .../MonitoredResourceInnerTests.java | 26 +- .../MonitoredResourceListResponseTests.java | 34 +- .../MonitoredSubscriptionInnerTests.java | 82 +- ...toredSubscriptionPropertiesInnerTests.java | 55 +- ...itoredSubscriptionPropertiesListTests.java | 85 +- ...SubscriptionsCreateOrUpdateMockTests.java} | 44 +- ...SubscriptionsGetWithResponseMockTests.java | 16 +- .../MonitoredSubscriptionsListMockTests.java | 14 +- ...onitoringTagRulesPropertiesInnerTests.java | 65 +- .../generated/MonitorsDeleteMockTests.java | 6 +- ...rsGetMetricRulesWithResponseMockTests.java | 16 +- ...sGetMetricStatusWithResponseMockTests.java | 22 +- ...LatestLinkedSaaSWithResponseMockTests.java | 39 + .../MonitorsListAppServicesMockTests.java | 19 +- .../generated/MonitorsListHostsMockTests.java | 19 +- .../MonitorsListLinkedResourcesMockTests.java | 10 +- ...nitorsListMonitoredResourcesMockTests.java | 16 +- ...reshIngestionKeyWithResponseMockTests.java | 33 + .../NewRelicSingleSignOnPropertiesTests.java | 26 +- .../generated/OperationsListMockTests.java | 6 +- .../generated/OrganizationInfoTests.java | 8 +- .../OrganizationPropertiesTests.java | 16 +- .../OrganizationResourceInnerTests.java | 20 +- .../generated/OrganizationsListMockTests.java | 14 +- .../OrganizationsListResponseTests.java | 33 +- .../generated/PartnerBillingEntityTests.java | 12 +- .../generated/PlanDataListResponseTests.java | 59 +- .../generated/PlanDataPropertiesTests.java | 27 +- .../generated/PlanDataResourceInnerTests.java | 33 +- .../generated/PlanDataTests.java | 21 +- .../generated/PlansListMockTests.java | 17 +- .../generated/ResubscribePropertiesTests.java | 44 + ...ActivateResourceWithResponseMockTests.java | 42 + .../generated/SaaSDataTests.java | 24 + ...SaaSResourceDetailsResponseInnerTests.java | 26 + .../generated/SubscriptionListTests.java | 90 +- .../generated/SwitchBillingRequestTests.java | 45 +- .../generated/TagRuleInnerTests.java | 67 +- .../generated/TagRuleListResultTests.java | 47 +- .../generated/TagRuleUpdateInnerTests.java | 61 +- .../TagRuleUpdatePropertiesInnerTests.java | 62 +- .../TagRulesCreateOrUpdateMockTests.java | 48 +- .../generated/TagRulesDeleteMockTests.java | 6 +- .../TagRulesGetWithResponseMockTests.java | 28 +- ...istByNewRelicMonitorResourceMockTests.java | 29 +- .../generated/UserAssignedIdentityTests.java | 2 +- .../generated/UserInfoTests.java | 32 +- .../generated/VMHostsListResponseTests.java | 28 +- .../generated/VMInfoInnerTests.java | 21 +- 182 files changed, 8592 insertions(+), 3478 deletions(-) create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/SaaSClient.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/LatestLinkedSaaSResponseInner.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/SaaSResourceDetailsResponseInner.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/LatestLinkedSaaSResponseImpl.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSClientImpl.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSImpl.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSResourceDetailsResponseImpl.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ActivateSaaSParameterRequest.java delete mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/BillingCycle.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/LatestLinkedSaaSResponse.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ResubscribeProperties.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaS.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaSData.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaSResourceDetailsResponse.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/resources/azure-resourcemanager-newrelicobservability.properties rename sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/{MonitoredSubscriptionsCreateorUpdateSamples.java => MonitoredSubscriptionsCreateOrUpdateSamples.java} (72%) create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLatestLinkedSaaSSamples.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLinkSaaSSamples.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsRefreshIngestionKeySamples.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsResubscribeSamples.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSActivateResourceSamples.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ActivateSaaSParameterRequestTests.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LatestLinkedSaaSResponseInnerTests.java rename sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/{MonitoredSubscriptionsCreateorUpdateMockTests.java => MonitoredSubscriptionsCreateOrUpdateMockTests.java} (59%) create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLatestLinkedSaaSWithResponseMockTests.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsRefreshIngestionKeyWithResponseMockTests.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ResubscribePropertiesTests.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSActivateResourceWithResponseMockTests.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSDataTests.java create mode 100644 sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSResourceDetailsResponseInnerTests.java diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md index c33a6a0f4e61..e42f57197c73 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md @@ -1,14 +1,86 @@ # Release History -## 1.3.0-beta.1 (Unreleased) +## 1.3.0-beta.1 (2025-11-24) -### Features Added +- Azure Resource Manager NewRelicObservability client library for Java. This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. Package tag package-2025-05-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.BillingCycle` was removed + +#### `models.PlanData` was modified + +* `models.BillingCycle billingCycle()` -> `java.lang.String billingCycle()` +* `withBillingCycle(models.BillingCycle)` was removed + +### Features Added + +* `models.SaaS` was added + +* `models.LatestLinkedSaaSResponse` was added + +* `models.ActivateSaaSParameterRequest` was added + +* `models.ResubscribeProperties` was added + +* `models.SaaSData` was added + +* `models.SaaSResourceDetailsResponse` was added + +#### `models.PlanData` was modified + +* `withBillingCycle(java.lang.String)` was added + +#### `models.MarketplaceSaaSInfo` was modified + +* `withOfferId(java.lang.String)` was added +* `offerId()` was added +* `withPublisherId(java.lang.String)` was added +* `publisherId()` was added + +#### `models.NewRelicMonitorResource$Update` was modified + +* `withSaaSData(models.SaaSData)` was added + +#### `models.NewRelicMonitorResource` was modified + +* `resubscribe(models.ResubscribeProperties,com.azure.core.util.Context)` was added +* `saaSData()` was added +* `latestLinkedSaaSWithResponse(com.azure.core.util.Context)` was added +* `linkSaaS(models.SaaSData,com.azure.core.util.Context)` was added +* `resubscribe()` was added +* `refreshIngestionKey()` was added +* `latestLinkedSaaS()` was added +* `linkSaaS(models.SaaSData)` was added +* `refreshIngestionKeyWithResponse(com.azure.core.util.Context)` was added + +#### `models.NewRelicMonitorResource$Definition` was modified + +* `withSaaSData(models.SaaSData)` was added + +#### `models.NewRelicMonitorResourceUpdate` was modified + +* `saaSData()` was added +* `withSaaSData(models.SaaSData)` was added + +#### `models.MonitoredSubscriptionProperties` was modified + +* `systemData()` was added + +#### `models.Monitors` was modified + +* `refreshIngestionKey(java.lang.String,java.lang.String)` was added +* `linkSaaS(java.lang.String,java.lang.String,models.SaaSData,com.azure.core.util.Context)` was added +* `refreshIngestionKeyWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `resubscribe(java.lang.String,java.lang.String,models.ResubscribeProperties,com.azure.core.util.Context)` was added +* `latestLinkedSaaSWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `latestLinkedSaaS(java.lang.String,java.lang.String)` was added +* `linkSaaS(java.lang.String,java.lang.String,models.SaaSData)` was added +* `resubscribe(java.lang.String,java.lang.String)` was added + +#### `NewRelicObservabilityManager` was modified -### Other Changes +* `saaS()` was added ## 1.2.0 (2024-12-19) diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/README.md b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/README.md index c59c56d1ba2b..def001411d76 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/README.md +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/README.md @@ -2,7 +2,7 @@ Azure Resource Manager NewRelicObservability client library for Java. -This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. Package tag package-2024-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. Package tag package-2025-05-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ NewRelicObservabilityManager manager = NewRelicObservabilityManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/SAMPLE.md b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/SAMPLE.md index c2df2326dd3b..9be8fa73682a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/SAMPLE.md +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/SAMPLE.md @@ -15,7 +15,7 @@ ## MonitoredSubscriptions -- [CreateorUpdate](#monitoredsubscriptions_createorupdate) +- [CreateOrUpdate](#monitoredsubscriptions_createorupdate) - [Delete](#monitoredsubscriptions_delete) - [Get](#monitoredsubscriptions_get) - [List](#monitoredsubscriptions_list) @@ -28,12 +28,16 @@ - [GetByResourceGroup](#monitors_getbyresourcegroup) - [GetMetricRules](#monitors_getmetricrules) - [GetMetricStatus](#monitors_getmetricstatus) +- [LatestLinkedSaaS](#monitors_latestlinkedsaas) +- [LinkSaaS](#monitors_linksaas) - [List](#monitors_list) - [ListAppServices](#monitors_listappservices) - [ListByResourceGroup](#monitors_listbyresourcegroup) - [ListHosts](#monitors_listhosts) - [ListLinkedResources](#monitors_listlinkedresources) - [ListMonitoredResources](#monitors_listmonitoredresources) +- [RefreshIngestionKey](#monitors_refreshingestionkey) +- [Resubscribe](#monitors_resubscribe) - [SwitchBilling](#monitors_switchbilling) - [Update](#monitors_update) - [VmHostPayload](#monitors_vmhostpayload) @@ -50,6 +54,10 @@ - [List](#plans_list) +## SaaS + +- [ActivateResource](#saas_activateresource) + ## TagRules - [CreateOrUpdate](#tagrules_createorupdate) @@ -65,7 +73,8 @@ */ public final class AccountsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Accounts_List_MinimumSet_Gen.json */ /** @@ -79,7 +88,8 @@ public final class AccountsListSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Accounts_List_MaximumSet_Gen.json */ /** @@ -103,7 +113,8 @@ public final class AccountsListSamples { public final class BillingInfoGetSamples { /* * x-ms-original-file: - * specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/BillingInfo_Get.json + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * BillingInfo_Get.json */ /** * Sample code: BillingInfo_Get. @@ -125,7 +136,8 @@ public final class BillingInfoGetSamples { */ public final class ConnectedPartnerResourcesListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * ConnectedPartnerResources_List.json */ /** @@ -141,18 +153,19 @@ public final class ConnectedPartnerResourcesListSamples { } ``` -### MonitoredSubscriptions_CreateorUpdate +### MonitoredSubscriptions_CreateOrUpdate ```java import com.azure.resourcemanager.newrelicobservability.models.ConfigurationName; /** - * Samples for MonitoredSubscriptions CreateorUpdate. + * Samples for MonitoredSubscriptions CreateOrUpdate. */ -public final class MonitoredSubscriptionsCreateorUpdateSamples { +public final class MonitoredSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ - * MonitoredSubscriptions_CreateorUpdate.json + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * MonitoredSubscriptions_CreateOrUpdate.json */ /** * Sample code: Monitors_AddMonitoredSubscriptions. @@ -179,7 +192,8 @@ import com.azure.resourcemanager.newrelicobservability.models.ConfigurationName; */ public final class MonitoredSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * MonitoredSubscriptions_Delete.json */ /** @@ -205,7 +219,8 @@ import com.azure.resourcemanager.newrelicobservability.models.ConfigurationName; */ public final class MonitoredSubscriptionsGetSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * MonitoredSubscriptions_Get.json */ /** @@ -230,7 +245,8 @@ public final class MonitoredSubscriptionsGetSamples { */ public final class MonitoredSubscriptionsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * MonitoredSubscriptions_List.json */ /** @@ -256,7 +272,8 @@ import com.azure.resourcemanager.newrelicobservability.models.MonitoredSubscript */ public final class MonitoredSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * MonitoredSubscriptions_Update.json */ /** @@ -280,7 +297,6 @@ public final class MonitoredSubscriptionsUpdateSamples { ```java import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource; import com.azure.resourcemanager.newrelicobservability.models.AccountInfo; -import com.azure.resourcemanager.newrelicobservability.models.BillingCycle; import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentity; import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentityType; import com.azure.resourcemanager.newrelicobservability.models.NewRelicAccountProperties; @@ -289,6 +305,7 @@ import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource; import com.azure.resourcemanager.newrelicobservability.models.OrganizationInfo; import com.azure.resourcemanager.newrelicobservability.models.PlanData; import com.azure.resourcemanager.newrelicobservability.models.ProvisioningState; +import com.azure.resourcemanager.newrelicobservability.models.SaaSData; import com.azure.resourcemanager.newrelicobservability.models.SingleSignOnStates; import com.azure.resourcemanager.newrelicobservability.models.UsageType; import com.azure.resourcemanager.newrelicobservability.models.UserAssignedIdentity; @@ -302,7 +319,8 @@ import java.util.Map; */ public final class MonitorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_CreateOrUpdate_MaximumSet_Gen.json */ /** @@ -335,9 +353,11 @@ public final class MonitorsCreateOrUpdateSamples { .withPhoneNumber("krf") .withCountry("hslqnwdanrconqyekwbnttaetv")) .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.YEARLY) + .withBillingCycle("Yearly") .withPlanDetails("tbbiaga") .withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z"))) + .withSaaSData(new SaaSData().withSaaSResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/Microsoft.SaaS/resources/abcd")) .withOrgCreationSource(OrgCreationSource.LIFTR) .withAccountCreationSource(AccountCreationSource.LIFTR) .withSubscriptionState("Suspended") @@ -367,7 +387,8 @@ public final class MonitorsCreateOrUpdateSamples { */ public final class MonitorsDeleteSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_Delete_MinimumSet_Gen.json */ /** @@ -378,12 +399,13 @@ public final class MonitorsDeleteSamples { public static void monitorsDeleteMinimumSetGen( com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { manager.monitors() - .delete("rgopenapi", "ruxvg@xqkmdhrnoo.hlmbpm", "ipxmlcbonyxtolzejcjshkmlron", + .delete("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "ruxvg@xqkmdhrnoo.hlmbpm", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_Delete_MaximumSet_Gen.json */ /** @@ -394,7 +416,7 @@ public final class MonitorsDeleteSamples { public static void monitorsDeleteMaximumSetGen( com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { manager.monitors() - .delete("rgopenapi", "ruxvg@xqkmdhrnoo.hlmbpm", "ipxmlcbonyxtolzejcjshkmlron", + .delete("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "ruxvg@xqkmdhrnoo.hlmbpm", com.azure.core.util.Context.NONE); } } @@ -408,7 +430,8 @@ public final class MonitorsDeleteSamples { */ public final class MonitorsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_Get_MaximumSet_Gen.json */ /** @@ -433,7 +456,8 @@ import com.azure.resourcemanager.newrelicobservability.models.MetricsRequest; */ public final class MonitorsGetMetricRulesSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_GetMetricRules_MinimumSet_Gen.json */ /** @@ -449,7 +473,8 @@ public final class MonitorsGetMetricRulesSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_GetMetricRules_MaximumSet_Gen.json */ /** @@ -477,7 +502,8 @@ import java.util.Arrays; */ public final class MonitorsGetMetricStatusSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_GetMetricStatus_MinimumSet_Gen.json */ /** @@ -496,7 +522,8 @@ public final class MonitorsGetMetricStatusSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_GetMetricStatus_MaximumSet_Gen.json */ /** @@ -516,6 +543,76 @@ public final class MonitorsGetMetricStatusSamples { } ``` +### Monitors_LatestLinkedSaaS + +```java +/** + * Samples for Monitors LatestLinkedSaaS. + */ +public final class MonitorsLatestLinkedSaaSSamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_LatestLinkedSaaS_MinimumSet_Gen.json + */ + /** + * Sample code: Monitors_LatestLinkedSaaS_MinimumSet_Gen. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void monitorsLatestLinkedSaaSMinimumSetGen( + com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors() + .latestLinkedSaaSWithResponse("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_LatestLinkedSaaS_MaximumSet_Gen.json + */ + /** + * Sample code: Monitors_LatestLinkedSaaS_MaximumSet_Gen. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void monitorsLatestLinkedSaaSMaximumSetGen( + com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors() + .latestLinkedSaaSWithResponse("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", com.azure.core.util.Context.NONE); + } +} +``` + +### Monitors_LinkSaaS + +```java +import com.azure.resourcemanager.newrelicobservability.models.SaaSData; + +/** + * Samples for Monitors LinkSaaS. + */ +public final class MonitorsLinkSaaSSamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_LinkSaaS.json + */ + /** + * Sample code: Monitors_LinkSaaS. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void + monitorsLinkSaaS(com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors() + .linkSaaS("myResourceGroup", "myMonitor", new SaaSData().withSaaSResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/Microsoft.SaaS/resources/abcd"), + com.azure.core.util.Context.NONE); + } +} +``` + ### Monitors_List ```java @@ -524,7 +621,8 @@ public final class MonitorsGetMetricStatusSamples { */ public final class MonitorsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListBySubscription_MaximumSet_Gen.json */ /** @@ -550,7 +648,8 @@ import java.util.Arrays; */ public final class MonitorsListAppServicesSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListAppServices_MaximumSet_Gen.json */ /** @@ -569,7 +668,8 @@ public final class MonitorsListAppServicesSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListAppServices_MinimumSet_Gen.json */ /** @@ -597,7 +697,8 @@ public final class MonitorsListAppServicesSamples { */ public final class MonitorsListByResourceGroupSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListByResourceGroup_MaximumSet_Gen.json */ /** @@ -623,7 +724,8 @@ import java.util.Arrays; */ public final class MonitorsListHostsSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListHosts_MinimumSet_Gen.json */ /** @@ -641,7 +743,8 @@ public final class MonitorsListHostsSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListHosts_MaximumSet_Gen.json */ /** @@ -669,8 +772,8 @@ public final class MonitorsListHostsSamples { public final class MonitorsListLinkedResourcesSamples { /* * x-ms-original-file: - * specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/LinkedResources_List. - * json + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * LinkedResources_List.json */ /** * Sample code: Monitors_ListLinkedResources. @@ -692,7 +795,8 @@ public final class MonitorsListLinkedResourcesSamples { */ public final class MonitorsListMonitoredResourcesSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListMonitoredResources_MinimumSet_Gen.json */ /** @@ -707,7 +811,8 @@ public final class MonitorsListMonitoredResourcesSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListMonitoredResources_MaximumSet_Gen.json */ /** @@ -723,10 +828,59 @@ public final class MonitorsListMonitoredResourcesSamples { } ``` +### Monitors_RefreshIngestionKey + +```java +/** + * Samples for Monitors RefreshIngestionKey. + */ +public final class MonitorsRefreshIngestionKeySamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_RefreshIngestionKey.json + */ + /** + * Sample code: Monitors_RefreshIngestionKey. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void monitorsRefreshIngestionKey( + com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors() + .refreshIngestionKeyWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} +``` + +### Monitors_Resubscribe + +```java + +/** + * Samples for Monitors Resubscribe. + */ +public final class MonitorsResubscribeSamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_Resubscribe.json + */ + /** + * Sample code: Monitors_Resubscribe. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void + monitorsResubscribe(com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors().resubscribe("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE); + } +} +``` + ### Monitors_SwitchBilling ```java -import com.azure.resourcemanager.newrelicobservability.models.BillingCycle; import com.azure.resourcemanager.newrelicobservability.models.PlanData; import com.azure.resourcemanager.newrelicobservability.models.SwitchBillingRequest; import com.azure.resourcemanager.newrelicobservability.models.UsageType; @@ -737,7 +891,8 @@ import java.time.OffsetDateTime; */ public final class MonitorsSwitchBillingSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_SwitchBilling_MinimumSet_Gen.json */ /** @@ -753,7 +908,8 @@ public final class MonitorsSwitchBillingSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_SwitchBilling_MaximumSet_Gen.json */ /** @@ -769,7 +925,7 @@ public final class MonitorsSwitchBillingSamples { "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz") .withOrganizationId("k") .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.YEARLY) + .withBillingCycle("Yearly") .withPlanDetails("tbbiaga") .withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z"))) .withUserEmail("ruxvg@xqkmdhrnoo.hlmbpm"), @@ -783,7 +939,6 @@ public final class MonitorsSwitchBillingSamples { ```java import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource; import com.azure.resourcemanager.newrelicobservability.models.AccountInfo; -import com.azure.resourcemanager.newrelicobservability.models.BillingCycle; import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentity; import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentityType; import com.azure.resourcemanager.newrelicobservability.models.NewRelicAccountProperties; @@ -806,7 +961,8 @@ import java.util.Map; */ public final class MonitorsUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_Update_MaximumSet_Gen.json */ /** @@ -839,7 +995,7 @@ public final class MonitorsUpdateSamples { .withPhoneNumber("krf") .withCountry("hslqnwdanrconqyekwbnttaetv")) .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.YEARLY) + .withBillingCycle("Yearly") .withPlanDetails("tbbiaga") .withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z"))) .withOrgCreationSource(OrgCreationSource.LIFTR) @@ -869,7 +1025,8 @@ public final class MonitorsUpdateSamples { */ public final class MonitorsVmHostPayloadSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_VmHostPayload_MinimumSet_Gen.json */ /** @@ -884,7 +1041,8 @@ public final class MonitorsVmHostPayloadSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_VmHostPayload_MaximumSet_Gen.json */ /** @@ -908,7 +1066,8 @@ public final class MonitorsVmHostPayloadSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Operations_List_MinimumSet_Gen.json */ /** @@ -922,7 +1081,8 @@ public final class OperationsListSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Operations_List_MaximumSet_Gen.json */ /** @@ -945,7 +1105,8 @@ public final class OperationsListSamples { */ public final class OrganizationsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Organizations_List_MinimumSet_Gen.json */ /** @@ -959,7 +1120,8 @@ public final class OrganizationsListSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Organizations_List_MaximumSet_Gen.json */ /** @@ -982,7 +1144,8 @@ public final class OrganizationsListSamples { */ public final class PlansListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Plans_List_MaximumSet_Gen.json */ /** @@ -996,7 +1159,8 @@ public final class PlansListSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Plans_List_MinimumSet_Gen.json */ /** @@ -1011,6 +1175,36 @@ public final class PlansListSamples { } ``` +### SaaS_ActivateResource + +```java +import com.azure.resourcemanager.newrelicobservability.models.ActivateSaaSParameterRequest; + +/** + * Samples for SaaS ActivateResource. + */ +public final class SaaSActivateResourceSamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ActivateSaaS. + * json + */ + /** + * Sample code: ActivateSaaS. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void + activateSaaS(com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.saaS() + .activateResourceWithResponse( + new ActivateSaaSParameterRequest().withSaasGuid("00000000-0000-0000-0000-000005430000") + .withPublisherId("publisherId"), + com.azure.core.util.Context.NONE); + } +} +``` + ### TagRules_CreateOrUpdate ```java @@ -1028,7 +1222,8 @@ import java.util.Arrays; */ public final class TagRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_CreateOrUpdate_MaximumSet_Gen.json */ /** @@ -1056,7 +1251,8 @@ public final class TagRulesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_CreateOrUpdate_MinimumSet_Gen.json */ /** @@ -1082,7 +1278,8 @@ public final class TagRulesCreateOrUpdateSamples { */ public final class TagRulesDeleteSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Delete_MinimumSet_Gen.json */ /** @@ -1098,7 +1295,8 @@ public final class TagRulesDeleteSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Delete_MaximumSet_Gen.json */ /** @@ -1123,7 +1321,8 @@ public final class TagRulesDeleteSamples { */ public final class TagRulesGetSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Get_MinimumSet_Gen.json */ /** @@ -1139,7 +1338,8 @@ public final class TagRulesGetSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Get_MaximumSet_Gen.json */ /** @@ -1164,7 +1364,8 @@ public final class TagRulesGetSamples { */ public final class TagRulesListByNewRelicMonitorResourceSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_ListByNewRelicMonitorResource_MinimumSet_Gen.json */ /** @@ -1180,7 +1381,8 @@ public final class TagRulesListByNewRelicMonitorResourceSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_ListByNewRelicMonitorResource_MaximumSet_Gen.json */ /** @@ -1215,7 +1417,8 @@ import java.util.Arrays; */ public final class TagRulesUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Update_MaximumSet_Gen.json */ /** @@ -1245,7 +1448,8 @@ public final class TagRulesUpdateSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Update_MinimumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml index 639c2590f2ca..8d4aebe84ea3 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for NewRelicObservability Management - This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-01-01. + This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2025-05-01-preview. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,7 @@ UTF-8 0 0 - false + true diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/NewRelicObservabilityManager.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/NewRelicObservabilityManager.java index 37e31488cc71..065dbe346afe 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/NewRelicObservabilityManager.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/NewRelicObservabilityManager.java @@ -22,6 +22,7 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.newrelicobservability.fluent.NewRelicObservability; import com.azure.resourcemanager.newrelicobservability.implementation.AccountsImpl; @@ -33,6 +34,7 @@ import com.azure.resourcemanager.newrelicobservability.implementation.OperationsImpl; import com.azure.resourcemanager.newrelicobservability.implementation.OrganizationsImpl; import com.azure.resourcemanager.newrelicobservability.implementation.PlansImpl; +import com.azure.resourcemanager.newrelicobservability.implementation.SaaSImpl; import com.azure.resourcemanager.newrelicobservability.implementation.TagRulesImpl; import com.azure.resourcemanager.newrelicobservability.models.Accounts; import com.azure.resourcemanager.newrelicobservability.models.BillingInfoes; @@ -42,11 +44,13 @@ import com.azure.resourcemanager.newrelicobservability.models.Operations; import com.azure.resourcemanager.newrelicobservability.models.Organizations; import com.azure.resourcemanager.newrelicobservability.models.Plans; +import com.azure.resourcemanager.newrelicobservability.models.SaaS; import com.azure.resourcemanager.newrelicobservability.models.TagRules; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -58,6 +62,8 @@ public final class NewRelicObservabilityManager { private Accounts accounts; + private SaaS saaS; + private Monitors monitors; private Organizations organizations; @@ -68,10 +74,10 @@ public final class NewRelicObservabilityManager { private ConnectedPartnerResources connectedPartnerResources; - private TagRules tagRules; - private MonitoredSubscriptions monitoredSubscriptions; + private TagRules tagRules; + private final NewRelicObservability clientObject; private NewRelicObservabilityManager(HttpPipeline httpPipeline, AzureProfile profile, @@ -125,6 +131,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-newrelicobservability.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -232,12 +241,14 @@ public NewRelicObservabilityManager authenticate(TokenCredential credential, Azu Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.newrelicobservability") .append("/") - .append("1.2.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -307,6 +318,18 @@ public Accounts accounts() { return accounts; } + /** + * Gets the resource collection API of SaaS. + * + * @return Resource collection API of SaaS. + */ + public SaaS saaS() { + if (this.saaS == null) { + this.saaS = new SaaSImpl(clientObject.getSaaS(), this); + } + return saaS; + } + /** * Gets the resource collection API of Monitors. It manages NewRelicMonitorResource. * @@ -368,18 +391,6 @@ public ConnectedPartnerResources connectedPartnerResources() { return connectedPartnerResources; } - /** - * Gets the resource collection API of TagRules. It manages TagRule. - * - * @return Resource collection API of TagRules. - */ - public TagRules tagRules() { - if (this.tagRules == null) { - this.tagRules = new TagRulesImpl(clientObject.getTagRules(), this); - } - return tagRules; - } - /** * Gets the resource collection API of MonitoredSubscriptions. It manages MonitoredSubscriptionProperties. * @@ -393,6 +404,18 @@ public MonitoredSubscriptions monitoredSubscriptions() { return monitoredSubscriptions; } + /** + * Gets the resource collection API of TagRules. It manages TagRule. + * + * @return Resource collection API of TagRules. + */ + public TagRules tagRules() { + if (this.tagRules == null) { + this.tagRules = new TagRulesImpl(clientObject.getTagRules(), this); + } + return tagRules; + } + /** * Gets wrapped service client NewRelicObservability providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/AccountsClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/AccountsClient.java index c8897603e468..dcb32fb4dbf3 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/AccountsClient.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/AccountsClient.java @@ -15,7 +15,8 @@ */ public interface AccountsClient { /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -28,7 +29,8 @@ public interface AccountsClient { PagedIterable list(String userEmail, String location); /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/BillingInfoesClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/BillingInfoesClient.java index 24fbecdcd7ca..c9c0bb41cad3 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/BillingInfoesClient.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/BillingInfoesClient.java @@ -15,7 +15,9 @@ */ public interface BillingInfoesClient { /** - * Get marketplace info mapped to the given monitor. + * Retrieves marketplace and organization information mapped to the given New Relic monitor resource + * + * A synchronous resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -23,20 +25,23 @@ public interface BillingInfoesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return marketplace info mapped to the given monitor along with {@link Response}. + * @return marketplace Subscription and Organization details to which resource gets billed into along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String monitorName, Context context); /** - * Get marketplace info mapped to the given monitor. + * Retrieves marketplace and organization information mapped to the given New Relic monitor resource + * + * A synchronous resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return marketplace info mapped to the given monitor. + * @return marketplace Subscription and Organization details to which resource gets billed into. */ @ServiceMethod(returns = ReturnType.SINGLE) BillingInfoResponseInner get(String resourceGroupName, String monitorName); diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/ConnectedPartnerResourcesClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/ConnectedPartnerResourcesClient.java index fdb42682cc57..dc7939712ef0 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/ConnectedPartnerResourcesClient.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/ConnectedPartnerResourcesClient.java @@ -17,6 +17,8 @@ public interface ConnectedPartnerResourcesClient { /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,6 +32,8 @@ public interface ConnectedPartnerResourcesClient { /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param body Email Id of the user. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitoredSubscriptionsClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitoredSubscriptionsClient.java index 9363f36ddcc4..cc878c80383c 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitoredSubscriptionsClient.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitoredSubscriptionsClient.java @@ -19,20 +19,25 @@ */ public interface MonitoredSubscriptionsClient { /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 paginated response with {@link PagedIterable}. + * @return paged collection of MonitoredSubscriptionProperties items as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String monitorName); /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -40,14 +45,17 @@ public interface MonitoredSubscriptionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 paginated response with {@link PagedIterable}. + * @return paged collection of MonitoredSubscriptionProperties items as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String monitorName, Context context); /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -56,15 +64,16 @@ PagedIterable list(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response}. + * @return a MonitoredSubscriptionProperties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String monitorName, ConfigurationName configurationName, Context context); /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -72,14 +81,16 @@ Response getWithResponse(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 request to update subscriptions needed to be monitored by the NewRelic monitor resource. + * @return a MonitoredSubscriptionProperties. */ @ServiceMethod(returns = ReturnType.SINGLE) MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String monitorName, ConfigurationName configurationName); /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -92,10 +103,12 @@ MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String monito */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, MonitoredSubscriptionPropertiesInner> - beginCreateorUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName); + beginCreateOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName); /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -110,11 +123,13 @@ MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String monito */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, MonitoredSubscriptionPropertiesInner> - beginCreateorUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, + beginCreateOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context); /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -125,11 +140,13 @@ MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String monito * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, String monitorName, + MonitoredSubscriptionPropertiesInner createOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName); /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -142,11 +159,14 @@ MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, St * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, String monitorName, + MonitoredSubscriptionPropertiesInner createOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -162,7 +182,10 @@ MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, St beginUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -181,7 +204,10 @@ SyncPoller, MonitoredSubscripti MonitoredSubscriptionPropertiesInner body, Context context); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -196,7 +222,10 @@ MonitoredSubscriptionPropertiesInner update(String resourceGroupName, String mon ConfigurationName configurationName); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -213,7 +242,10 @@ MonitoredSubscriptionPropertiesInner update(String resourceGroupName, String mon ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -228,7 +260,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String ConfigurationName configurationName); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -244,7 +279,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String ConfigurationName configurationName, Context context); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -257,7 +295,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String monitorName, ConfigurationName configurationName); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitorsClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitorsClient.java index 549902266fa9..480f4bdeae16 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitorsClient.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/MonitorsClient.java @@ -12,6 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.newrelicobservability.fluent.models.AppServiceInfoInner; +import com.azure.resourcemanager.newrelicobservability.fluent.models.LatestLinkedSaaSResponseInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.LinkedResourceInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricRulesInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricsStatusResponseInner; @@ -25,6 +26,8 @@ import com.azure.resourcemanager.newrelicobservability.models.MetricsStatusRequest; import com.azure.resourcemanager.newrelicobservability.models.MonitorsSwitchBillingResponse; import com.azure.resourcemanager.newrelicobservability.models.NewRelicMonitorResourceUpdate; +import com.azure.resourcemanager.newrelicobservability.models.ResubscribeProperties; +import com.azure.resourcemanager.newrelicobservability.models.SaaSData; import com.azure.resourcemanager.newrelicobservability.models.SwitchBillingRequest; /** @@ -32,7 +35,7 @@ */ public interface MonitorsClient { /** - * List NewRelicMonitorResource resources by subscription ID. + * Lists all New Relic monitor resources either within a specific subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -43,7 +46,7 @@ public interface MonitorsClient { PagedIterable list(); /** - * List NewRelicMonitorResource resources by subscription ID. + * Lists all New Relic monitor resources either within a specific subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -56,7 +59,7 @@ public interface MonitorsClient { PagedIterable list(Context context); /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -69,7 +72,7 @@ public interface MonitorsClient { PagedIterable listByResourceGroup(String resourceGroupName); /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -83,7 +86,8 @@ public interface MonitorsClient { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -91,27 +95,30 @@ public interface MonitorsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a NewRelicMonitorResource along with {@link Response}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, String monitorName, Context context); /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a NewRelicMonitorResource. + * @return a Monitor Resource by NewRelic. */ @ServiceMethod(returns = ReturnType.SINGLE) NewRelicMonitorResourceInner getByResourceGroup(String resourceGroupName, String monitorName); /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -126,7 +133,9 @@ Response getByResourceGroupWithResponse(String res beginCreateOrUpdate(String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource); /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -142,7 +151,9 @@ SyncPoller, NewRelicMonitorResourceInne String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource, Context context); /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -157,7 +168,9 @@ NewRelicMonitorResourceInner createOrUpdate(String resourceGroupName, String mon NewRelicMonitorResourceInner resource); /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -173,7 +186,22 @@ NewRelicMonitorResourceInner createOrUpdate(String resourceGroupName, String mon NewRelicMonitorResourceInner resource, Context context); /** - * Update a NewRelicMonitorResource. + * Updates an existing New Relic monitor resource from your Azure subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NewRelicMonitorResourceInner> + beginUpdate(String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate properties); + + /** + * Updates an existing New Relic monitor resource from your Azure subscription. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -182,14 +210,14 @@ NewRelicMonitorResourceInner createOrUpdate(String resourceGroupName, String mon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Monitor Resource by NewRelic along with {@link Response}. + * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String monitorName, - NewRelicMonitorResourceUpdate properties, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NewRelicMonitorResourceInner> beginUpdate( + String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate properties, Context context); /** - * Update a NewRelicMonitorResource. + * Updates an existing New Relic monitor resource from your Azure subscription. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -204,25 +232,43 @@ NewRelicMonitorResourceInner update(String resourceGroupName, String monitorName NewRelicMonitorResourceUpdate properties); /** - * Delete a NewRelicMonitorResource. + * Updates an existing New Relic monitor resource from your Azure subscription. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param userEmail User Email. * @param monitorName Name of the Monitors resource. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NewRelicMonitorResourceInner update(String resourceGroupName, String monitorName, + NewRelicMonitorResourceUpdate properties, Context context); + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String userEmail, String monitorName); + SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String userEmail); /** - * Delete a NewRelicMonitorResource. + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param userEmail User Email. * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -230,38 +276,40 @@ NewRelicMonitorResourceInner update(String resourceGroupName, String monitorName * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String userEmail, String monitorName, + SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String userEmail, Context context); /** - * Delete a NewRelicMonitorResource. + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param userEmail User Email. * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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) - void delete(String resourceGroupName, String userEmail, String monitorName); + void delete(String resourceGroupName, String monitorName, String userEmail); /** - * Delete a NewRelicMonitorResource. + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param userEmail User Email. * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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) - void delete(String resourceGroupName, String userEmail, String monitorName, Context context); + void delete(String resourceGroupName, String monitorName, String userEmail, Context context); /** - * Get metric rules. + * Retrieves the metric rules that are configured in the New Relic monitor resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -270,14 +318,14 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metric rules along with {@link Response}. + * @return set of rules for sending metrics for the Monitor resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getMetricRulesWithResponse(String resourceGroupName, String monitorName, MetricsRequest request, Context context); /** - * Get metric rules. + * Retrieves the metric rules that are configured in the New Relic monitor resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -285,13 +333,13 @@ Response getMetricRulesWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metric rules. + * @return set of rules for sending metrics for the Monitor resource. */ @ServiceMethod(returns = ReturnType.SINGLE) MetricRulesInner getMetricRules(String resourceGroupName, String monitorName, MetricsRequest request); /** - * Get metric status. + * Retrieves the metric status that are configured in the New Relic monitor resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -300,14 +348,14 @@ Response getMetricRulesWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metric status along with {@link Response}. + * @return response of get metrics status Operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getMetricStatusWithResponse(String resourceGroupName, String monitorName, MetricsStatusRequest request, Context context); /** - * Get metric status. + * Retrieves the metric status that are configured in the New Relic monitor resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -315,76 +363,136 @@ Response getMetricStatusWithResponse(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metric status. + * @return response of get metrics status Operation. */ @ServiceMethod(returns = ReturnType.SINGLE) MetricsStatusResponseInner getMetricStatus(String resourceGroupName, String monitorName, MetricsStatusRequest request); /** - * List the app service resources currently being monitored by the NewRelic resource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the app services get request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list app services Operation as paginated response with {@link PagedIterable}. + * @return response of get latest linked SaaS resource operation along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAppServices(String resourceGroupName, String monitorName, - AppServicesGetRequest request); + @ServiceMethod(returns = ReturnType.SINGLE) + Response latestLinkedSaaSWithResponse(String resourceGroupName, String monitorName, + Context context); /** - * List the app service resources currently being monitored by the NewRelic resource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the app services get request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list app services Operation as paginated response with {@link PagedIterable}. + * @return response of get latest linked SaaS resource operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAppServices(String resourceGroupName, String monitorName, - AppServicesGetRequest request, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + LatestLinkedSaaSResponseInner latestLinkedSaaS(String resourceGroupName, String monitorName); /** - * Switches the billing for NewRelic monitor resource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the switch billing request. + * @param body Link SaaS body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NewRelicMonitorResourceInner> + beginLinkSaaS(String resourceGroupName, String monitorName, SaaSData body); + + /** + * Links a new SaaS to the newrelic organization of the underlying monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param body Link SaaS body parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NewRelicMonitorResourceInner> + beginLinkSaaS(String resourceGroupName, String monitorName, SaaSData body, Context context); + + /** + * Links a new SaaS to the newrelic organization of the underlying monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param body Link SaaS body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Monitor Resource by NewRelic. */ @ServiceMethod(returns = ReturnType.SINGLE) - MonitorsSwitchBillingResponse switchBillingWithResponse(String resourceGroupName, String monitorName, - SwitchBillingRequest request, Context context); + NewRelicMonitorResourceInner linkSaaS(String resourceGroupName, String monitorName, SaaSData body); /** - * Switches the billing for NewRelic monitor resource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the switch billing request. + * @param body Link SaaS body parameter. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Monitor Resource by NewRelic. */ @ServiceMethod(returns = ReturnType.SINGLE) - NewRelicMonitorResourceInner switchBilling(String resourceGroupName, String monitorName, - SwitchBillingRequest request); + NewRelicMonitorResourceInner linkSaaS(String resourceGroupName, String monitorName, SaaSData body, Context context); + + /** + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the app services get request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list app services Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAppServices(String resourceGroupName, String monitorName, + AppServicesGetRequest request); /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the app services get request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list app services Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAppServices(String resourceGroupName, String monitorName, + AppServicesGetRequest request, Context context); + + /** + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -398,7 +506,8 @@ NewRelicMonitorResourceInner switchBilling(String resourceGroupName, String moni PagedIterable listHosts(String resourceGroupName, String monitorName, HostsGetRequest request); /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -414,7 +523,38 @@ PagedIterable listHosts(String resourceGroupName, String monitorNam Context context); /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listLinkedResources(String resourceGroupName, String monitorName); + + /** + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listLinkedResources(String resourceGroupName, String monitorName, + Context context); + + /** + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -428,7 +568,8 @@ PagedIterable listHosts(String resourceGroupName, String monitorNam PagedIterable listMonitoredResources(String resourceGroupName, String monitorName); /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -444,35 +585,132 @@ PagedIterable listMonitoredResources(String resourceGrou Context context); /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedIterable}. + * @return the {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listLinkedResources(String resourceGroupName, String monitorName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response refreshIngestionKeyWithResponse(String resourceGroupName, String monitorName, Context context); /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + void refreshIngestionKey(String resourceGroupName, String monitorName); + + /** + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NewRelicMonitorResourceInner> + beginResubscribe(String resourceGroupName, String monitorName); + + /** + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param body Resubscribe Properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listLinkedResources(String resourceGroupName, String monitorName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NewRelicMonitorResourceInner> + beginResubscribe(String resourceGroupName, String monitorName, ResubscribeProperties body, Context context); + + /** + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NewRelicMonitorResourceInner resubscribe(String resourceGroupName, String monitorName); + + /** + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param body Resubscribe Properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NewRelicMonitorResourceInner resubscribe(String resourceGroupName, String monitorName, ResubscribeProperties body, Context context); /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the switch billing request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MonitorsSwitchBillingResponse switchBillingWithResponse(String resourceGroupName, String monitorName, + SwitchBillingRequest request, Context context); + + /** + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the switch billing request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NewRelicMonitorResourceInner switchBilling(String resourceGroupName, String monitorName, + SwitchBillingRequest request); + + /** + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -487,7 +725,8 @@ Response vmHostPayloadWithResponse(String resourceGroup Context context); /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/NewRelicObservability.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/NewRelicObservability.java index 7e0ff48dea9d..86cba2bb9dd9 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/NewRelicObservability.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/NewRelicObservability.java @@ -60,6 +60,13 @@ public interface NewRelicObservability { */ AccountsClient getAccounts(); + /** + * Gets the SaaSClient object to access its operations. + * + * @return the SaaSClient object. + */ + SaaSClient getSaaS(); + /** * Gets the MonitorsClient object to access its operations. * @@ -96,16 +103,16 @@ public interface NewRelicObservability { ConnectedPartnerResourcesClient getConnectedPartnerResources(); /** - * Gets the TagRulesClient object to access its operations. + * Gets the MonitoredSubscriptionsClient object to access its operations. * - * @return the TagRulesClient object. + * @return the MonitoredSubscriptionsClient object. */ - TagRulesClient getTagRules(); + MonitoredSubscriptionsClient getMonitoredSubscriptions(); /** - * Gets the MonitoredSubscriptionsClient object to access its operations. + * Gets the TagRulesClient object to access its operations. * - * @return the MonitoredSubscriptionsClient object. + * @return the TagRulesClient object. */ - MonitoredSubscriptionsClient getMonitoredSubscriptions(); + TagRulesClient getTagRules(); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/OrganizationsClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/OrganizationsClient.java index 491a4703922a..fb94d3ee469e 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/OrganizationsClient.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/OrganizationsClient.java @@ -15,7 +15,8 @@ */ public interface OrganizationsClient { /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -28,7 +29,8 @@ public interface OrganizationsClient { PagedIterable list(String userEmail, String location); /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/PlansClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/PlansClient.java index 0b27f3e793e2..a32f6ad514e2 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/PlansClient.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/PlansClient.java @@ -15,7 +15,7 @@ */ public interface PlansClient { /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -25,7 +25,7 @@ public interface PlansClient { PagedIterable list(); /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @param accountId Account Id. * @param organizationId Organization Id. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/SaaSClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/SaaSClient.java new file mode 100644 index 000000000000..daa2eb9bbfbe --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/SaaSClient.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.newrelicobservability.fluent.models.SaaSResourceDetailsResponseInner; +import com.azure.resourcemanager.newrelicobservability.models.ActivateSaaSParameterRequest; + +/** + * An instance of this class provides access to all the operations defined in SaaSClient. + */ +public interface SaaSClient { + /** + * Resolve the token to get the SaaS resource ID and activate the SaaS resource. + * + * @param request The request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response activateResourceWithResponse(ActivateSaaSParameterRequest request, + Context context); + + /** + * Resolve the token to get the SaaS resource ID and activate the SaaS resource. + * + * @param request The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SaaSResourceDetailsResponseInner activateResource(ActivateSaaSParameterRequest request); +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/TagRulesClient.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/TagRulesClient.java index e3d1e34d15e1..80a143d06ef8 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/TagRulesClient.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/TagRulesClient.java @@ -19,7 +19,8 @@ */ public interface TagRulesClient { /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -32,7 +33,8 @@ public interface TagRulesClient { PagedIterable listByNewRelicMonitorResource(String resourceGroupName, String monitorName); /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -47,7 +49,8 @@ PagedIterable listByNewRelicMonitorResource(String resourceGroupNa Context context); /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -56,14 +59,15 @@ PagedIterable listByNewRelicMonitorResource(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a TagRule along with {@link Response}. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String monitorName, String ruleSetName, Context context); /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -71,13 +75,14 @@ Response getWithResponse(String resourceGroupName, String monitorN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a TagRule. + * @return a tag rule belonging to NewRelic account. */ @ServiceMethod(returns = ReturnType.SINGLE) TagRuleInner get(String resourceGroupName, String monitorName, String ruleSetName); /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -93,7 +98,8 @@ SyncPoller, TagRuleInner> beginCreateOrUpdate(String re String ruleSetName, TagRuleInner resource); /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -110,7 +116,8 @@ SyncPoller, TagRuleInner> beginCreateOrUpdate(String re String ruleSetName, TagRuleInner resource, Context context); /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -126,7 +133,8 @@ TagRuleInner createOrUpdate(String resourceGroupName, String monitorName, String TagRuleInner resource); /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -143,37 +151,43 @@ TagRuleInner createOrUpdate(String resourceGroupName, String monitorName, String Context context); /** - * Delete a TagRule. + * Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control + * which Azure resources are monitored. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String ruleSetName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + TagRuleUpdateInner properties, Context context); /** - * Delete a TagRule. + * Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control + * which Azure resources are monitored. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. - * @param context The context to associate with this operation. + * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. + * @return a tag rule belonging to NewRelic account. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String ruleSetName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + TagRuleInner update(String resourceGroupName, String monitorName, String ruleSetName, + TagRuleUpdateInner properties); /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -181,12 +195,14 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String monitorName, String ruleSetName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String ruleSetName); /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -195,40 +211,38 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String monitorName, String ruleSetName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String ruleSetName, + Context context); /** - * Update a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a tag rule belonging to NewRelic account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String monitorName, String ruleSetName, - TagRuleUpdateInner properties, Context context); + void delete(String resourceGroupName, String monitorName, String ruleSetName); /** - * Update a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. - * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a tag rule belonging to NewRelic account. */ @ServiceMethod(returns = ReturnType.SINGLE) - TagRuleInner update(String resourceGroupName, String monitorName, String ruleSetName, - TagRuleUpdateInner properties); + void delete(String resourceGroupName, String monitorName, String ruleSetName, Context context); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/LatestLinkedSaaSResponseInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/LatestLinkedSaaSResponseInner.java new file mode 100644 index 000000000000..f8b66e5a312a --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/LatestLinkedSaaSResponseInner.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Response of get latest linked SaaS resource operation. + */ +@Fluent +public final class LatestLinkedSaaSResponseInner implements JsonSerializable { + /* + * SaaS resource id + */ + private String saaSResourceId; + + /* + * Flag indicating if the SaaS resource is hidden + */ + private Boolean isHiddenSaaS; + + /** + * Creates an instance of LatestLinkedSaaSResponseInner class. + */ + public LatestLinkedSaaSResponseInner() { + } + + /** + * Get the saaSResourceId property: SaaS resource id. + * + * @return the saaSResourceId value. + */ + public String saaSResourceId() { + return this.saaSResourceId; + } + + /** + * Set the saaSResourceId property: SaaS resource id. + * + * @param saaSResourceId the saaSResourceId value to set. + * @return the LatestLinkedSaaSResponseInner object itself. + */ + public LatestLinkedSaaSResponseInner withSaaSResourceId(String saaSResourceId) { + this.saaSResourceId = saaSResourceId; + return this; + } + + /** + * Get the isHiddenSaaS property: Flag indicating if the SaaS resource is hidden. + * + * @return the isHiddenSaaS value. + */ + public Boolean isHiddenSaaS() { + return this.isHiddenSaaS; + } + + /** + * Set the isHiddenSaaS property: Flag indicating if the SaaS resource is hidden. + * + * @param isHiddenSaaS the isHiddenSaaS value to set. + * @return the LatestLinkedSaaSResponseInner object itself. + */ + public LatestLinkedSaaSResponseInner withIsHiddenSaaS(Boolean isHiddenSaaS) { + this.isHiddenSaaS = isHiddenSaaS; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("saaSResourceId", this.saaSResourceId); + jsonWriter.writeBooleanField("isHiddenSaaS", this.isHiddenSaaS); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LatestLinkedSaaSResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LatestLinkedSaaSResponseInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LatestLinkedSaaSResponseInner. + */ + public static LatestLinkedSaaSResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LatestLinkedSaaSResponseInner deserializedLatestLinkedSaaSResponseInner + = new LatestLinkedSaaSResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("saaSResourceId".equals(fieldName)) { + deserializedLatestLinkedSaaSResponseInner.saaSResourceId = reader.getString(); + } else if ("isHiddenSaaS".equals(fieldName)) { + deserializedLatestLinkedSaaSResponseInner.isHiddenSaaS = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedLatestLinkedSaaSResponseInner; + }); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MetricRulesInner.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MetricRulesInner.java index 737bb3631ac9..4ffb4c3dc6c0 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MetricRulesInner.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MetricRulesInner.java @@ -30,7 +30,7 @@ public final class MetricRulesInner implements JsonSerializable filteringTags; /* - * User Email + * Reusable representation of an email address */ private String userEmail; @@ -81,7 +81,7 @@ public MetricRulesInner withFilteringTags(List filteringTags) { } /** - * Get the userEmail property: User Email. + * Get the userEmail property: Reusable representation of an email address. * * @return the userEmail value. */ @@ -90,7 +90,7 @@ public String userEmail() { } /** - * Set the userEmail property: User Email. + * Set the userEmail property: Reusable representation of an email address. * * @param userEmail the userEmail value to set. * @return the MetricRulesInner object itself. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitorProperties.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitorProperties.java index 454404c3be46..0946bdf977b8 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitorProperties.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/fluent/models/MonitorProperties.java @@ -17,6 +17,7 @@ import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource; import com.azure.resourcemanager.newrelicobservability.models.PlanData; import com.azure.resourcemanager.newrelicobservability.models.ProvisioningState; +import com.azure.resourcemanager.newrelicobservability.models.SaaSData; import com.azure.resourcemanager.newrelicobservability.models.UserInfo; import java.io.IOException; @@ -60,6 +61,11 @@ public final class MonitorProperties implements JsonSerializable { + SaaSResourceDetailsResponseInner deserializedSaaSResourceDetailsResponseInner + = new SaaSResourceDetailsResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSaaSResourceDetailsResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSaaSResourceDetailsResponseInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSaaSResourceDetailsResponseInner.type = reader.getString(); + } else if ("saasId".equals(fieldName)) { + deserializedSaaSResourceDetailsResponseInner.saasId = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedSaaSResourceDetailsResponseInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSaaSResourceDetailsResponseInner; + }); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountsClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountsClientImpl.java index 354f27cf8b47..2ad72d769a8e 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountsClientImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/AccountsClientImpl.java @@ -25,6 +25,7 @@ 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.resourcemanager.newrelicobservability.fluent.AccountsClient; import com.azure.resourcemanager.newrelicobservability.fluent.models.AccountResourceInner; import com.azure.resourcemanager.newrelicobservability.models.AccountsListResponse; @@ -59,7 +60,7 @@ public final class AccountsClientImpl implements AccountsClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityAccounts") public interface AccountsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/accounts") @@ -70,16 +71,33 @@ Mono> list(@HostParam("$host") String endpoint, @QueryParam("userEmail") String userEmail, @QueryParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/accounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("userEmail") String userEmail, @QueryParam("location") String location, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -115,61 +133,63 @@ private Mono> listSinglePageAsync(String use } /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. - * @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 response of get all accounts Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return response of get all accounts Operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String userEmail, String location, - Context context) { - 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.")); - } - if (userEmail == null) { - return Mono.error(new IllegalArgumentException("Parameter userEmail is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), userEmail, - location, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String userEmail, String location) { + return new PagedFlux<>(() -> listSinglePageAsync(userEmail, location), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. * @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 response of get all accounts Operation as paginated response with {@link PagedFlux}. + * @return response of get all accounts Operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String userEmail, String location) { - return new PagedFlux<>(() -> listSinglePageAsync(userEmail, location), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String userEmail, String location) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (userEmail == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter userEmail is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), userEmail, location, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -177,16 +197,38 @@ private PagedFlux listAsync(String userEmail, String locat * @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 response of get all accounts Operation as paginated response with {@link PagedFlux}. + * @return response of get all accounts Operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String userEmail, String location, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(userEmail, location, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String userEmail, String location, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (userEmail == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter userEmail is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), userEmail, location, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -197,11 +239,12 @@ private PagedFlux listAsync(String userEmail, String locat */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String userEmail, String location) { - return new PagedIterable<>(listAsync(userEmail, location)); + return new PagedIterable<>(() -> listSinglePage(userEmail, location), nextLink -> listNextSinglePage(nextLink)); } /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -213,7 +256,8 @@ public PagedIterable list(String userEmail, String locatio */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String userEmail, String location, Context context) { - return new PagedIterable<>(listAsync(userEmail, location, context)); + return new PagedIterable<>(() -> listSinglePage(userEmail, location, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -242,6 +286,33 @@ private Mono> listNextSinglePageAsync(String .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of get all accounts Operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -250,22 +321,24 @@ private Mono> listNextSinglePageAsync(String * @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 response of get all accounts Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return response of get all accounts Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(AccountsClientImpl.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/BillingInfoesClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/BillingInfoesClientImpl.java index 8751c9d24dfd..c9f50bf28e86 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/BillingInfoesClientImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/BillingInfoesClientImpl.java @@ -21,6 +21,7 @@ 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.resourcemanager.newrelicobservability.fluent.BillingInfoesClient; import com.azure.resourcemanager.newrelicobservability.fluent.models.BillingInfoResponseInner; import reactor.core.publisher.Mono; @@ -55,7 +56,7 @@ public final class BillingInfoesClientImpl implements BillingInfoesClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityBillingInfoes") public interface BillingInfoesService { @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/getBillingInfo") @@ -65,18 +66,29 @@ Mono> get(@HostParam("$host") String endpoint @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/getBillingInfo") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @HeaderParam("Accept") String accept, Context context); } /** - * Get marketplace info mapped to the given monitor. + * Retrieves marketplace and organization information mapped to the given New Relic monitor resource + * + * A synchronous resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @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 marketplace info mapped to the given monitor along with {@link Response} on successful completion of - * {@link Mono}. + * @return marketplace Subscription and Organization details to which resource gets billed into along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, @@ -104,50 +116,17 @@ private Mono> getWithResponseAsync(String res } /** - * Get marketplace info mapped to the given monitor. + * Retrieves marketplace and organization information mapped to the given New Relic monitor resource * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Name of the Monitors resource. - * @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 marketplace info mapped to the given monitor along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, - Context context) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, accept, context); - } - - /** - * Get marketplace info mapped to the given monitor. + * A synchronous resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @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 marketplace info mapped to the given monitor on successful completion of {@link Mono}. + * @return marketplace Subscription and Organization details to which resource gets billed into on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String monitorName) { @@ -155,7 +134,9 @@ private Mono getAsync(String resourceGroupName, String } /** - * Get marketplace info mapped to the given monitor. + * Retrieves marketplace and organization information mapped to the given New Relic monitor resource + * + * A synchronous resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -163,26 +144,51 @@ private Mono getAsync(String resourceGroupName, String * @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 marketplace info mapped to the given monitor along with {@link Response}. + * @return marketplace Subscription and Organization details to which resource gets billed into along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String monitorName, Context context) { - return getWithResponseAsync(resourceGroupName, monitorName, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, accept, context); } /** - * Get marketplace info mapped to the given monitor. + * Retrieves marketplace and organization information mapped to the given New Relic monitor resource + * + * A synchronous resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @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 marketplace info mapped to the given monitor. + * @return marketplace Subscription and Organization details to which resource gets billed into. */ @ServiceMethod(returns = ReturnType.SINGLE) public BillingInfoResponseInner get(String resourceGroupName, String monitorName) { return getWithResponse(resourceGroupName, monitorName, Context.NONE).getValue(); } + + private static final ClientLogger LOGGER = new ClientLogger(BillingInfoesClientImpl.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/ConnectedPartnerResourcesClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/ConnectedPartnerResourcesClientImpl.java index 0d8517e85136..2e46e35bc460 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/ConnectedPartnerResourcesClientImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/ConnectedPartnerResourcesClientImpl.java @@ -27,6 +27,7 @@ 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.resourcemanager.newrelicobservability.fluent.ConnectedPartnerResourcesClient; import com.azure.resourcemanager.newrelicobservability.fluent.models.ConnectedPartnerResourcesListFormatInner; import com.azure.resourcemanager.newrelicobservability.models.ConnectedPartnerResourcesListResponse; @@ -62,7 +63,7 @@ public final class ConnectedPartnerResourcesClientImpl implements ConnectedPartn * proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityConnectedPartnerResources") public interface ConnectedPartnerResourcesService { @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listConnectedPartnerResources") @@ -73,6 +74,15 @@ Mono> list(@HostParam("$host") S @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @BodyParam("application/json") String body, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listConnectedPartnerResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") String body, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -80,11 +90,21 @@ Mono> list(@HostParam("$host") S Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param body Email Id of the user. @@ -125,57 +145,39 @@ private Mono> listSingle /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param body Email Id of the user. - * @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 list of all active newrelic deployments along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of all active newrelic deployments as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String monitorName, String body, Context context) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, body, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String monitorName, + String body) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, body), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param body Email Id of the user. * @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 list of all active newrelic deployments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String monitorName, - String body) { + private PagedFlux listAsync(String resourceGroupName, + String monitorName) { + final String body = null; return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, body), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -183,24 +185,50 @@ private PagedFlux listAsync(String res /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @param body Email Id of the user. * @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 list of all active newrelic deployments as paginated response with {@link PagedFlux}. + * @return list of all active newrelic deployments along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, - String monitorName) { - final String body = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, body), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String monitorName, String body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, body, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param body Email Id of the user. @@ -208,18 +236,42 @@ private PagedFlux listAsync(String res * @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 list of all active newrelic deployments as paginated response with {@link PagedFlux}. + * @return list of all active newrelic deployments along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String monitorName, - String body, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, body, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String monitorName, String body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, body, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -230,12 +282,15 @@ private PagedFlux listAsync(String res @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String monitorName) { final String body = null; - return new PagedIterable<>(listAsync(resourceGroupName, monitorName, body)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, monitorName, body), + nextLink -> listNextSinglePage(nextLink)); } /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param body Email Id of the user. @@ -248,10 +303,13 @@ public PagedIterable list(String resou @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String monitorName, String body, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, monitorName, body, context)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, monitorName, body, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** + * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -279,6 +337,37 @@ private Mono> listNextSi } /** + * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 list of all active newrelic deployments along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -286,23 +375,26 @@ private Mono> listNextSi * @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 list of all active newrelic deployments along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of all active newrelic deployments along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(ConnectedPartnerResourcesClientImpl.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/LatestLinkedSaaSResponseImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/LatestLinkedSaaSResponseImpl.java new file mode 100644 index 000000000000..ab1a1e2a106a --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/LatestLinkedSaaSResponseImpl.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.implementation; + +import com.azure.resourcemanager.newrelicobservability.fluent.models.LatestLinkedSaaSResponseInner; +import com.azure.resourcemanager.newrelicobservability.models.LatestLinkedSaaSResponse; + +public final class LatestLinkedSaaSResponseImpl implements LatestLinkedSaaSResponse { + private LatestLinkedSaaSResponseInner innerObject; + + private final com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager; + + LatestLinkedSaaSResponseImpl(LatestLinkedSaaSResponseInner innerObject, + com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String saaSResourceId() { + return this.innerModel().saaSResourceId(); + } + + public Boolean isHiddenSaaS() { + return this.innerModel().isHiddenSaaS(); + } + + public LatestLinkedSaaSResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionPropertiesImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionPropertiesImpl.java index 72257cb8dd98..37be0cb7a972 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionPropertiesImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionPropertiesImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.newrelicobservability.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.newrelicobservability.fluent.models.MonitoredSubscriptionPropertiesInner; import com.azure.resourcemanager.newrelicobservability.models.ConfigurationName; @@ -32,6 +33,10 @@ public SubscriptionList properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -59,14 +64,14 @@ public MonitoredSubscriptionPropertiesImpl withExistingMonitor(String resourceGr public MonitoredSubscriptionProperties create() { this.innerObject = serviceManager.serviceClient() .getMonitoredSubscriptions() - .createorUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), Context.NONE); + .createOrUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), Context.NONE); return this; } public MonitoredSubscriptionProperties create(Context context) { this.innerObject = serviceManager.serviceClient() .getMonitoredSubscriptions() - .createorUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), context); + .createOrUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), context); return this; } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionsClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionsClientImpl.java index 78b8b8f60490..57fc62716664 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionsClientImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitoredSubscriptionsClientImpl.java @@ -28,8 +28,10 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.newrelicobservability.fluent.MonitoredSubscriptionsClient; @@ -70,36 +72,65 @@ public final class MonitoredSubscriptionsClientImpl implements MonitoredSubscrip * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityMonitoredSubscriptions") public interface MonitoredSubscriptionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("configurationName") ConfigurationName configurationName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("configurationName") ConfigurationName configurationName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @PathParam("configurationName") ConfigurationName configurationName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @BodyParam("application/json") MonitoredSubscriptionPropertiesInner body, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createorUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @PathParam("configurationName") ConfigurationName configurationName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") MonitoredSubscriptionPropertiesInner body, @HeaderParam("Accept") String accept, Context context); @@ -108,10 +139,20 @@ Mono>> createorUpdate(@HostParam("$host") String endpo @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("configurationName") ConfigurationName configurationName, + @BodyParam("application/json") MonitoredSubscriptionPropertiesInner body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @PathParam("configurationName") ConfigurationName configurationName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") MonitoredSubscriptionPropertiesInner body, @HeaderParam("Accept") String accept, Context context); @@ -120,10 +161,20 @@ Mono>> update(@HostParam("$host") String endpoint, @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, - @PathParam("configurationName") ConfigurationName configurationName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("configurationName") ConfigurationName configurationName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("configurationName") ConfigurationName configurationName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @@ -132,17 +183,28 @@ Mono>> delete(@HostParam("$host") String endpoint, Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @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 response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of MonitoredSubscriptionProperties items along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, @@ -164,69 +226,76 @@ private Mono> listSinglePage } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @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 paged collection of MonitoredSubscriptionProperties items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String monitorName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @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 response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of MonitoredSubscriptionProperties items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String monitorName, Context context) { + private PagedResponse listSinglePage(String resourceGroupName, + String monitorName) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Name of the Monitors resource. - * @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 paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String monitorName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -234,32 +303,60 @@ private PagedFlux listAsync(String resourc * @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 paginated response with {@link PagedFlux}. + * @return paged collection of MonitoredSubscriptionProperties items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String monitorName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @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 paginated response with {@link PagedIterable}. + * @return paged collection of MonitoredSubscriptionProperties items as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String monitorName) { - return new PagedIterable<>(listAsync(resourceGroupName, monitorName)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, monitorName), + nextLink -> listNextSinglePage(nextLink)); } /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -267,16 +364,20 @@ public PagedIterable list(String resourceG * @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 paginated response with {@link PagedIterable}. + * @return paged collection of MonitoredSubscriptionProperties items as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String monitorName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, monitorName, context)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, monitorName, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -284,8 +385,7 @@ public PagedIterable list(String resourceG * @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response} on successful completion of {@link Mono}. + * @return a MonitoredSubscriptionProperties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, @@ -311,54 +411,15 @@ private Mono> getWithResponseAsyn } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, configurationName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Name of the Monitors resource. - * @param configurationName The configuration name. Only 'default' value is supported. - * @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String monitorName, ConfigurationName configurationName, Context context) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - if (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, - configurationName, this.client.getApiVersion(), accept, context); - } - - /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Get a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -366,8 +427,7 @@ private Mono> getWithResponseAsyn * @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource on successful - * completion of {@link Mono}. + * @return a MonitoredSubscriptionProperties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String monitorName, @@ -377,7 +437,9 @@ private Mono getAsync(String resourceGroup } /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -386,17 +448,42 @@ private Mono getAsync(String resourceGroup * @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response}. + * @return a MonitoredSubscriptionProperties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String monitorName, ConfigurationName configurationName, Context context) { - return getWithResponseAsync(resourceGroupName, monitorName, configurationName, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (configurationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, configurationName, accept, context); } /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -404,7 +491,7 @@ public Response getWithResponse(String res * @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource. + * @return a MonitoredSubscriptionProperties. */ @ServiceMethod(returns = ReturnType.SINGLE) public MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String monitorName, @@ -413,7 +500,9 @@ public MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -426,7 +515,7 @@ public MonitoredSubscriptionPropertiesInner get(String resourceGroupName, String * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createorUpdateWithResponseAsync(String resourceGroupName, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -452,13 +541,65 @@ private Mono>> createorUpdateWithResponseAsync(String } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createorUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, configurationName, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param configurationName The configuration name. Only 'default' value is supported. + * @param body The body parameter. + * @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (configurationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept, + Context.NONE); + } + + /** + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -469,42 +610,45 @@ private Mono>> createorUpdateWithResponseAsync(String * @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createorUpdateWithResponseAsync(String resourceGroupName, - String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, - Context context) { + private Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } if (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } if (body != null) { body.validate(); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createorUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - monitorName, configurationName, this.client.getApiVersion(), body, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept, context); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -518,17 +662,19 @@ private Mono>> createorUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, MonitoredSubscriptionPropertiesInner> - beginCreateorUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName, + beginCreateOrUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body) { Mono>> mono - = createorUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body); + = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body); return this.client.getLroResult( mono, this.client.getHttpPipeline(), MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, this.client.getContext()); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -541,43 +687,45 @@ private Mono>> createorUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, MonitoredSubscriptionPropertiesInner> - beginCreateorUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName) { + beginCreateOrUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName) { final MonitoredSubscriptionPropertiesInner body = null; Mono>> mono - = createorUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body); + = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body); return this.client.getLroResult( mono, this.client.getHttpPipeline(), MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, this.client.getContext()); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param configurationName The configuration name. Only 'default' value is supported. * @param body The body parameter. - * @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 {@link PollerFlux} for polling of the request to update subscriptions needed to be monitored by the + * @return the {@link SyncPoller} for polling of the request to update subscriptions needed to be monitored by the * NewRelic monitor resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MonitoredSubscriptionPropertiesInner> - beginCreateorUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName, - MonitoredSubscriptionPropertiesInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createorUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body, context); + public SyncPoller, MonitoredSubscriptionPropertiesInner> + beginCreateOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, + MonitoredSubscriptionPropertiesInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, monitorName, configurationName, body); return this.client.getLroResult( - mono, this.client.getHttpPipeline(), MonitoredSubscriptionPropertiesInner.class, - MonitoredSubscriptionPropertiesInner.class, context); + response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, + Context.NONE); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -590,13 +738,19 @@ private Mono>> createorUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MonitoredSubscriptionPropertiesInner> - beginCreateorUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName) { + beginCreateOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName) { final MonitoredSubscriptionPropertiesInner body = null; - return this.beginCreateorUpdateAsync(resourceGroupName, monitorName, configurationName, body).getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, monitorName, configurationName, body); + return this.client.getLroResult( + response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, + Context.NONE); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -611,14 +765,18 @@ private Mono>> createorUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MonitoredSubscriptionPropertiesInner> - beginCreateorUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, + beginCreateOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) { - return this.beginCreateorUpdateAsync(resourceGroupName, monitorName, configurationName, body, context) - .getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, monitorName, configurationName, body, context); + return this.client.getLroResult( + response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, context); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -631,14 +789,16 @@ private Mono>> createorUpdateWithResponseAsync(String * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createorUpdateAsync(String resourceGroupName, String monitorName, + private Mono createOrUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body) { - return beginCreateorUpdateAsync(resourceGroupName, monitorName, configurationName, body).last() + return beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -650,36 +810,17 @@ private Mono createorUpdateAsync(String re * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createorUpdateAsync(String resourceGroupName, String monitorName, + private Mono createOrUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName) { final MonitoredSubscriptionPropertiesInner body = null; - return beginCreateorUpdateAsync(resourceGroupName, monitorName, configurationName, body).last() + return beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Name of the Monitors resource. - * @param configurationName The configuration name. Only 'default' value is supported. - * @param body The body parameter. - * @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createorUpdateAsync(String resourceGroupName, String monitorName, - ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) { - return beginCreateorUpdateAsync(resourceGroupName, monitorName, configurationName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -690,14 +831,16 @@ private Mono createorUpdateAsync(String re * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, String monitorName, + public MonitoredSubscriptionPropertiesInner createOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName) { final MonitoredSubscriptionPropertiesInner body = null; - return createorUpdateAsync(resourceGroupName, monitorName, configurationName, body).block(); + return beginCreateOrUpdate(resourceGroupName, monitorName, configurationName, body).getFinalResult(); } /** - * Add the subscriptions that should be monitored by the NewRelic monitor resource. + * Add subscriptions to be monitored by the New Relic monitor resource, enabling observability and monitoring. + * + * Create a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -710,13 +853,16 @@ public MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupN * @return the request to update subscriptions needed to be monitored by the NewRelic monitor resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MonitoredSubscriptionPropertiesInner createorUpdate(String resourceGroupName, String monitorName, + public MonitoredSubscriptionPropertiesInner createOrUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) { - return createorUpdateAsync(resourceGroupName, monitorName, configurationName, body, context).block(); + return beginCreateOrUpdate(resourceGroupName, monitorName, configurationName, body, context).getFinalResult(); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -754,14 +900,66 @@ private Mono>> updateWithResponseAsync(String resource body.validate(); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, configurationName, this.client.getApiVersion(), body, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param configurationName The configuration name. Only 'default' value is supported. + * @param body The body parameter. + * @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String monitorName, + ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (configurationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept, + Context.NONE); + } + + /** + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -772,41 +970,46 @@ private Mono>> updateWithResponseAsync(String resource * @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String monitorName, + private Response updateWithResponse(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } if (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } if (body != null) { body.validate(); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - monitorName, configurationName, this.client.getApiVersion(), body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, body, accept, context); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -830,7 +1033,10 @@ private Mono>> updateWithResponseAsync(String resource } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -853,33 +1059,36 @@ private Mono>> updateWithResponseAsync(String resource } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param configurationName The configuration name. Only 'default' value is supported. * @param body The body parameter. - * @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 {@link PollerFlux} for polling of the request to update subscriptions needed to be monitored by the + * @return the {@link SyncPoller} for polling of the request to update subscriptions needed to be monitored by the * NewRelic monitor resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MonitoredSubscriptionPropertiesInner> - beginUpdateAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName, - MonitoredSubscriptionPropertiesInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, monitorName, configurationName, body, context); + public SyncPoller, MonitoredSubscriptionPropertiesInner> + beginUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, + MonitoredSubscriptionPropertiesInner body) { + Response response = updateWithResponse(resourceGroupName, monitorName, configurationName, body); return this.client.getLroResult( - mono, this.client.getHttpPipeline(), MonitoredSubscriptionPropertiesInner.class, - MonitoredSubscriptionPropertiesInner.class, context); + response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, + Context.NONE); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -894,11 +1103,17 @@ private Mono>> updateWithResponseAsync(String resource public SyncPoller, MonitoredSubscriptionPropertiesInner> beginUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName) { final MonitoredSubscriptionPropertiesInner body = null; - return this.beginUpdateAsync(resourceGroupName, monitorName, configurationName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, monitorName, configurationName, body); + return this.client.getLroResult( + response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, + Context.NONE); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -915,11 +1130,17 @@ private Mono>> updateWithResponseAsync(String resource public SyncPoller, MonitoredSubscriptionPropertiesInner> beginUpdate(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) { - return this.beginUpdateAsync(resourceGroupName, monitorName, configurationName, body, context).getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, monitorName, configurationName, body, context); + return this.client.getLroResult( + response, MonitoredSubscriptionPropertiesInner.class, MonitoredSubscriptionPropertiesInner.class, context); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -939,7 +1160,10 @@ private Mono updateAsync(String resourceGr } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -959,28 +1183,10 @@ private Mono updateAsync(String resourceGr } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Name of the Monitors resource. - * @param configurationName The configuration name. Only 'default' value is supported. - * @param body The body parameter. - * @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 request to update subscriptions needed to be monitored by the NewRelic monitor resource on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String monitorName, - ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) { - return beginUpdateAsync(resourceGroupName, monitorName, configurationName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -994,11 +1200,14 @@ private Mono updateAsync(String resourceGr public MonitoredSubscriptionPropertiesInner update(String resourceGroupName, String monitorName, ConfigurationName configurationName) { final MonitoredSubscriptionPropertiesInner body = null; - return updateAsync(resourceGroupName, monitorName, configurationName, body).block(); + return beginUpdate(resourceGroupName, monitorName, configurationName, body).getFinalResult(); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Update subscriptions to be monitored by the New Relic monitor resource, ensuring optimal observability and + * performance + * + * Update a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -1013,11 +1222,14 @@ public MonitoredSubscriptionPropertiesInner update(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) public MonitoredSubscriptionPropertiesInner update(String resourceGroupName, String monitorName, ConfigurationName configurationName, MonitoredSubscriptionPropertiesInner body, Context context) { - return updateAsync(resourceGroupName, monitorName, configurationName, body, context).block(); + return beginUpdate(resourceGroupName, monitorName, configurationName, body, context).getFinalResult(); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -1051,78 +1263,109 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, configurationName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param configurationName The configuration name. Only 'default' value is supported. - * @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 {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName, - ConfigurationName configurationName, Context context) { + private Response deleteWithResponse(String resourceGroupName, String monitorName, + ConfigurationName configurationName) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } if (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - monitorName, configurationName, this.client.getApiVersion(), accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, accept, Context.NONE); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param configurationName The configuration name. Only 'default' value is supported. + * @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 {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, - ConfigurationName configurationName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, monitorName, configurationName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String monitorName, + ConfigurationName configurationName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (configurationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, configurationName, accept, context); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param configurationName The configuration name. Only 'default' value is supported. - * @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. @@ -1130,16 +1373,18 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, - ConfigurationName configurationName, Context context) { - context = this.client.mergeContext(context); + ConfigurationName configurationName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, monitorName, configurationName, context); + = deleteWithResponseAsync(resourceGroupName, monitorName, configurationName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -1152,11 +1397,15 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, ConfigurationName configurationName) { - return this.beginDeleteAsync(resourceGroupName, monitorName, configurationName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, monitorName, configurationName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -1170,11 +1419,15 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, ConfigurationName configurationName, Context context) { - return this.beginDeleteAsync(resourceGroupName, monitorName, configurationName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, monitorName, configurationName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -1191,26 +1444,10 @@ private Mono deleteAsync(String resourceGroupName, String monitorName, Con } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Name of the Monitors resource. - * @param configurationName The configuration name. Only 'default' value is supported. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String monitorName, ConfigurationName configurationName, - Context context) { - return beginDeleteAsync(resourceGroupName, monitorName, configurationName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -1221,11 +1458,14 @@ private Mono deleteAsync(String resourceGroupName, String monitorName, Con */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String monitorName, ConfigurationName configurationName) { - deleteAsync(resourceGroupName, monitorName, configurationName).block(); + beginDelete(resourceGroupName, monitorName, configurationName).getFinalResult(); } /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -1238,17 +1478,20 @@ public void delete(String resourceGroupName, String monitorName, ConfigurationNa @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String monitorName, ConfigurationName configurationName, Context context) { - deleteAsync(resourceGroupName, monitorName, configurationName, context).block(); + beginDelete(resourceGroupName, monitorName, configurationName, context).getFinalResult(); } /** + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @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 response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of MonitoredSubscriptionProperties items along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1267,6 +1510,37 @@ private Mono> listNextSingle } /** + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 paged collection of MonitoredSubscriptionProperties items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1274,22 +1548,25 @@ private Mono> listNextSingle * @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 response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of MonitoredSubscriptionProperties items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(MonitoredSubscriptionsClientImpl.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitorsClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitorsClientImpl.java index 4c2acd40e870..511b9e6c4ca1 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitorsClientImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitorsClientImpl.java @@ -29,12 +29,15 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.newrelicobservability.fluent.MonitorsClient; import com.azure.resourcemanager.newrelicobservability.fluent.models.AppServiceInfoInner; +import com.azure.resourcemanager.newrelicobservability.fluent.models.LatestLinkedSaaSResponseInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.LinkedResourceInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricRulesInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricsStatusResponseInner; @@ -52,6 +55,8 @@ import com.azure.resourcemanager.newrelicobservability.models.MonitorsSwitchBillingResponse; import com.azure.resourcemanager.newrelicobservability.models.NewRelicMonitorResourceListResult; import com.azure.resourcemanager.newrelicobservability.models.NewRelicMonitorResourceUpdate; +import com.azure.resourcemanager.newrelicobservability.models.ResubscribeProperties; +import com.azure.resourcemanager.newrelicobservability.models.SaaSData; import com.azure.resourcemanager.newrelicobservability.models.SwitchBillingRequest; import com.azure.resourcemanager.newrelicobservability.models.VMHostsListResponse; import java.nio.ByteBuffer; @@ -87,7 +92,7 @@ public final class MonitorsClientImpl implements MonitorsClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityMonitors") public interface MonitorsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/monitors") @@ -97,6 +102,14 @@ Mono> list(@HostParam("$host") Strin @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/monitors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors") @ExpectedResponses({ 200 }) @@ -106,6 +119,15 @@ Mono> listByResourceGroup(@HostParam @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}") @ExpectedResponses({ 200 }) @@ -115,6 +137,15 @@ Mono> getByResourceGroup(@HostParam("$hos @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}") @ExpectedResponses({ 200, 201 }) @@ -125,11 +156,31 @@ Mono>> createOrUpdate(@HostParam("$host") String endpo @BodyParam("application/json") NewRelicMonitorResourceInner resource, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") NewRelicMonitorResourceInner resource, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") NewRelicMonitorResourceUpdate properties, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @BodyParam("application/json") NewRelicMonitorResourceUpdate properties, @@ -141,8 +192,17 @@ Mono> update(@HostParam("$host") String e @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("userEmail") String userEmail, - @PathParam("monitorName") String monitorName, @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("userEmail") String userEmail, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("userEmail") String userEmail, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/getMetricRules") @@ -154,6 +214,16 @@ Mono> getMetricRules(@HostParam("$host") String endpo @BodyParam("application/json") MetricsRequest request, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/getMetricRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getMetricRulesSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") MetricsRequest request, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/getMetricStatus") @ExpectedResponses({ 200 }) @@ -164,6 +234,52 @@ Mono> getMetricStatus(@HostParam("$host") S @BodyParam("application/json") MetricsStatusRequest request, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/getMetricStatus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getMetricStatusSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") MetricsStatusRequest request, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/latestLinkedSaaS") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> latestLinkedSaaS(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/latestLinkedSaaS") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response latestLinkedSaaSSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/linkSaaS") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> linkSaaS(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") SaaSData body, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/linkSaaS") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response linkSaaSSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") SaaSData body, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listAppServices") @ExpectedResponses({ 200 }) @@ -175,13 +291,13 @@ Mono> listAppServices(@HostParam("$host") Stri Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/switchBilling") - @ExpectedResponses({ 200, 202, 204 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listAppServices") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono switchBilling(@HostParam("$host") String endpoint, + Response listAppServicesSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, - @BodyParam("application/json") SwitchBillingRequest request, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AppServicesGetRequest request, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -194,6 +310,34 @@ Mono> listHosts(@HostParam("$host") String endpoin @BodyParam("application/json") HostsGetRequest request, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listHosts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listHostsSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") HostsGetRequest request, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listLinkedResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listLinkedResources(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listLinkedResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listLinkedResourcesSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredResources") @ExpectedResponses({ 200 }) @@ -204,13 +348,71 @@ Mono> listMonitoredResources(@HostParam( @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listLinkedResources") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listLinkedResources(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listMonitoredResourcesSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/refreshIngestionKey") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> refreshIngestionKey(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/refreshIngestionKey") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response refreshIngestionKeySync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/resubscribe") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resubscribe(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") ResubscribeProperties body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/resubscribe") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response resubscribeSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") ResubscribeProperties body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/switchBilling") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono switchBilling(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") SwitchBillingRequest request, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/switchBilling") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + MonitorsSwitchBillingResponse switchBillingSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @BodyParam("application/json") SwitchBillingRequest request, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/vmHostPayloads") @@ -221,6 +423,15 @@ Mono> vmHostPayload(@HostParam("$host") String @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/vmHostPayloads") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response vmHostPayloadSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -229,6 +440,14 @@ Mono> listBySubscriptionNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -237,6 +456,14 @@ Mono> listByResourceGroupNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -245,6 +472,14 @@ Mono> listAppServicesNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAppServicesNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -253,6 +488,29 @@ Mono> listHostsNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listHostsNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listLinkedResourcesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listLinkedResourcesNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -265,13 +523,13 @@ Mono> listMonitoredResourcesNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listLinkedResourcesNext( + Response listMonitoredResourcesNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List NewRelicMonitorResource resources by subscription ID. + * Lists all New Relic monitor resources either within a specific subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -298,36 +556,7 @@ private Mono> listSinglePageAsync() } /** - * List NewRelicMonitorResource resources by subscription ID. - * - * @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 response of a NewRelicMonitorResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - 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 accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List NewRelicMonitorResource resources by subscription ID. + * Lists all New Relic monitor resources either within a specific subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -340,35 +569,74 @@ private PagedFlux listAsync() { } /** - * List NewRelicMonitorResource resources by subscription ID. + * Lists all New Relic monitor resources either within a specific subscription. * - * @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 response of a NewRelicMonitorResource list operation as paginated response with {@link PagedFlux}. + * @return the response of a NewRelicMonitorResource list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NewRelicMonitorResource resources by subscription ID. + * Lists all New Relic monitor resources either within a specific subscription. * + * @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 response of a NewRelicMonitorResource list operation as paginated response with + * @return the response of a NewRelicMonitorResource list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all New Relic monitor resources either within a specific subscription. + * + * @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 response of a NewRelicMonitorResource list operation as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * List NewRelicMonitorResource resources by subscription ID. + * Lists all New Relic monitor resources either within a specific subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -379,11 +647,12 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -417,74 +686,88 @@ public PagedIterable list(Context context) { } /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 response of a NewRelicMonitorResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a NewRelicMonitorResource list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 response of a NewRelicMonitorResource list operation as paginated response with {@link PagedFlux}. + * @return the response of a NewRelicMonitorResource list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 response of a NewRelicMonitorResource list operation as paginated response with {@link PagedFlux}. + * @return the response of a NewRelicMonitorResource list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -495,11 +778,12 @@ private PagedFlux listByResourceGroupAsync(String */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -511,18 +795,20 @@ public PagedIterable listByResourceGroup(String re */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @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 a NewRelicMonitorResource along with {@link Response} on successful completion of {@link Mono}. + * @return a Monitor Resource by NewRelic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, @@ -550,49 +836,15 @@ private Mono> getByResourceGroupWithRespo } /** - * Get a NewRelicMonitorResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Name of the Monitors resource. - * @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 a NewRelicMonitorResource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String monitorName, Context context) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context); - } - - /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @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 a NewRelicMonitorResource on successful completion of {@link Mono}. + * @return a Monitor Resource by NewRelic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String monitorName) { @@ -601,7 +853,8 @@ private Mono getByResourceGroupAsync(String resour } /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -609,23 +862,44 @@ private Mono getByResourceGroupAsync(String resour * @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 a NewRelicMonitorResource along with {@link Response}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String monitorName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, monitorName, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context); } /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @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 a NewRelicMonitorResource. + * @return a Monitor Resource by NewRelic. */ @ServiceMethod(returns = ReturnType.SINGLE) public NewRelicMonitorResourceInner getByResourceGroup(String resourceGroupName, String monitorName) { @@ -633,7 +907,9 @@ public NewRelicMonitorResourceInner getByResourceGroup(String resourceGroupName, } /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -674,92 +950,123 @@ private Mono>> createOrUpdateWithResponseAsync(String } /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param resource Resource create parameters. - * @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 a Monitor Resource by NewRelic along with {@link Response} on successful completion of {@link Mono}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String monitorName, NewRelicMonitorResourceInner resource, Context context) { + private Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + NewRelicMonitorResourceInner resource) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); } else { resource.validate(); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, resource, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, resource, accept, Context.NONE); } /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param resource Resource create parameters. + * @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 {@link PollerFlux} for polling of a Monitor Resource by NewRelic. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NewRelicMonitorResourceInner> - beginCreateOrUpdateAsync(String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + NewRelicMonitorResourceInner resource, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, resource, accept, context); } /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param resource Resource create parameters. - * @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 {@link PollerFlux} for polling of a Monitor Resource by NewRelic. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NewRelicMonitorResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, NewRelicMonitorResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, resource, context); + = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, resource); return this.client.getLroResult(mono, this.client.getHttpPipeline(), NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, - context); + this.client.getContext()); } /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -772,11 +1079,15 @@ private PollerFlux, NewRelicMonitorReso @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NewRelicMonitorResourceInner> beginCreateOrUpdate(String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, monitorName, resource).getSyncPoller(); + Response response = createOrUpdateWithResponse(resourceGroupName, monitorName, resource); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, Context.NONE); } /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -790,11 +1101,15 @@ private PollerFlux, NewRelicMonitorReso @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NewRelicMonitorResourceInner> beginCreateOrUpdate( String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, monitorName, resource, context).getSyncPoller(); + Response response = createOrUpdateWithResponse(resourceGroupName, monitorName, resource, context); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, context); } /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -812,26 +1127,9 @@ private Mono createOrUpdateAsync(String resourceGr } /** - * Create a NewRelicMonitorResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Name of the Monitors resource. - * @param resource Resource create parameters. - * @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 a Monitor Resource by NewRelic on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String monitorName, - NewRelicMonitorResourceInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, monitorName, resource, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -844,11 +1142,13 @@ private Mono createOrUpdateAsync(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) public NewRelicMonitorResourceInner createOrUpdate(String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource) { - return createOrUpdateAsync(resourceGroupName, monitorName, resource).block(); + return beginCreateOrUpdate(resourceGroupName, monitorName, resource).getFinalResult(); } /** - * Create a NewRelicMonitorResource. + * Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the + * integration between Azure and your New Relic account, enabling observability and monitoring of your Azure + * resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -862,11 +1162,11 @@ public NewRelicMonitorResourceInner createOrUpdate(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) public NewRelicMonitorResourceInner createOrUpdate(String resourceGroupName, String monitorName, NewRelicMonitorResourceInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, monitorName, resource, context).block(); + return beginCreateOrUpdate(resourceGroupName, monitorName, resource, context).getFinalResult(); } /** - * Update a NewRelicMonitorResource. + * Updates an existing New Relic monitor resource from your Azure subscription. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -877,8 +1177,8 @@ public NewRelicMonitorResourceInner createOrUpdate(String resourceGroupName, Str * @return a Monitor Resource by NewRelic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String monitorName, NewRelicMonitorResourceUpdate properties) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String monitorName, + NewRelicMonitorResourceUpdate properties) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -907,7 +1207,50 @@ private Mono> updateWithResponseAsync(Str } /** - * Update a NewRelicMonitorResource. + * Updates an existing New Relic monitor resource from your Azure subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param properties The resource properties to 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 a Monitor Resource by NewRelic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String monitorName, + NewRelicMonitorResourceUpdate properties) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, properties, accept, Context.NONE); + } + + /** + * Updates an existing New Relic monitor resource from your Azure subscription. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -916,11 +1259,641 @@ private Mono> updateWithResponseAsync(Str * @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 a Monitor Resource by NewRelic along with {@link Response} on successful completion of {@link Mono}. + * @return a Monitor Resource by NewRelic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String monitorName, + NewRelicMonitorResourceUpdate properties, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, properties, accept, context); + } + + /** + * Updates an existing New Relic monitor resource from your Azure subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param properties The resource properties to 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 the {@link PollerFlux} for polling of a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NewRelicMonitorResourceInner> + beginUpdateAsync(String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate properties) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, monitorName, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, + this.client.getContext()); + } + + /** + * Updates an existing New Relic monitor resource from your Azure subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param properties The resource properties to 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 the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NewRelicMonitorResourceInner> + beginUpdate(String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate properties) { + Response response = updateWithResponse(resourceGroupName, monitorName, properties); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, Context.NONE); + } + + /** + * Updates an existing New Relic monitor resource from your Azure subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param properties The resource properties to 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 the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NewRelicMonitorResourceInner> beginUpdate( + String resourceGroupName, String monitorName, NewRelicMonitorResourceUpdate properties, Context context) { + Response response = updateWithResponse(resourceGroupName, monitorName, properties, context); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, context); + } + + /** + * Updates an existing New Relic monitor resource from your Azure subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param properties The resource properties to 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 a Monitor Resource by NewRelic on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String monitorName, + NewRelicMonitorResourceUpdate properties) { + return beginUpdateAsync(resourceGroupName, monitorName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an existing New Relic monitor resource from your Azure subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param properties The resource properties to 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 a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NewRelicMonitorResourceInner update(String resourceGroupName, String monitorName, + NewRelicMonitorResourceUpdate properties) { + return beginUpdate(resourceGroupName, monitorName, properties).getFinalResult(); + } + + /** + * Updates an existing New Relic monitor resource from your Azure subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param properties The resource properties to 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 a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NewRelicMonitorResourceInner update(String resourceGroupName, String monitorName, + NewRelicMonitorResourceUpdate properties, Context context) { + return beginUpdate(resourceGroupName, monitorName, properties, context).getFinalResult(); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName, + String userEmail) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (userEmail == null) { + return Mono.error(new IllegalArgumentException("Parameter userEmail is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, userEmail, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String monitorName, String userEmail) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (userEmail == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter userEmail is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, userEmail, accept, Context.NONE); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String monitorName, String userEmail, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (userEmail == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter userEmail is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, userEmail, accept, context); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, + String userEmail) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, monitorName, userEmail); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, + String userEmail) { + Response response = deleteWithResponse(resourceGroupName, monitorName, userEmail); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, + String userEmail, Context context) { + Response response = deleteWithResponse(resourceGroupName, monitorName, userEmail, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String monitorName, String userEmail) { + return beginDeleteAsync(resourceGroupName, monitorName, userEmail).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @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 monitorName, String userEmail) { + beginDelete(resourceGroupName, monitorName, userEmail).getFinalResult(); + } + + /** + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. + * @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 monitorName, String userEmail, Context context) { + beginDelete(resourceGroupName, monitorName, userEmail, context).getFinalResult(); + } + + /** + * Retrieves the metric rules that are configured in the New Relic monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the get metrics status request. + * @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 set of rules for sending metrics for the Monitor resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMetricRulesWithResponseAsync(String resourceGroupName, + String monitorName, MetricsRequest request) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getMetricRules(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves the metric rules that are configured in the New Relic monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the get metrics status request. + * @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 set of rules for sending metrics for the Monitor resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getMetricRulesAsync(String resourceGroupName, String monitorName, + MetricsRequest request) { + return getMetricRulesWithResponseAsync(resourceGroupName, monitorName, request) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieves the metric rules that are configured in the New Relic monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the get metrics status request. + * @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 set of rules for sending metrics for the Monitor resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMetricRulesWithResponse(String resourceGroupName, String monitorName, + MetricsRequest request, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (request == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return service.getMetricRulesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context); + } + + /** + * Retrieves the metric rules that are configured in the New Relic monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the get metrics status request. + * @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 set of rules for sending metrics for the Monitor resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MetricRulesInner getMetricRules(String resourceGroupName, String monitorName, MetricsRequest request) { + return getMetricRulesWithResponse(resourceGroupName, monitorName, request, Context.NONE).getValue(); + } + + /** + * Retrieves the metric status that are configured in the New Relic monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the get metrics status request. + * @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 response of get metrics status Operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMetricStatusWithResponseAsync(String resourceGroupName, + String monitorName, MetricsStatusRequest request) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getMetricStatus(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves the metric status that are configured in the New Relic monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the get metrics status request. + * @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 response of get metrics status Operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getMetricStatusAsync(String resourceGroupName, String monitorName, + MetricsStatusRequest request) { + return getMetricStatusWithResponseAsync(resourceGroupName, monitorName, request) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieves the metric status that are configured in the New Relic monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the get metrics status request. + * @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 response of get metrics status Operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMetricStatusWithResponse(String resourceGroupName, + String monitorName, MetricsStatusRequest request, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (request == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return service.getMetricStatusSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context); + } + + /** + * Retrieves the metric status that are configured in the New Relic monitor resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the get metrics status request. + * @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 response of get metrics status Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MetricsStatusResponseInner getMetricStatus(String resourceGroupName, String monitorName, + MetricsStatusRequest request) { + return getMetricStatusWithResponse(resourceGroupName, monitorName, request, Context.NONE).getValue(); + } + + /** + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @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 response of get latest linked SaaS resource operation along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String monitorName, NewRelicMonitorResourceUpdate properties, Context context) { + private Mono> latestLinkedSaaSWithResponseAsync(String resourceGroupName, + String monitorName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -936,84 +1909,95 @@ private Mono> updateWithResponseAsync(Str if (monitorName == null) { return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, properties, accept, context); + return FluxUtil + .withContext(context -> service.latestLinkedSaaS(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a NewRelicMonitorResource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param properties The resource properties to 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 a Monitor Resource by NewRelic on successful completion of {@link Mono}. + * @return response of get latest linked SaaS resource operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String monitorName, - NewRelicMonitorResourceUpdate properties) { - return updateWithResponseAsync(resourceGroupName, monitorName, properties) + private Mono latestLinkedSaaSAsync(String resourceGroupName, String monitorName) { + return latestLinkedSaaSWithResponseAsync(resourceGroupName, monitorName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Update a NewRelicMonitorResource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param properties The resource properties to 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 a Monitor Resource by NewRelic along with {@link Response}. + * @return response of get latest linked SaaS resource operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String monitorName, - NewRelicMonitorResourceUpdate properties, Context context) { - return updateWithResponseAsync(resourceGroupName, monitorName, properties, context).block(); + public Response latestLinkedSaaSWithResponse(String resourceGroupName, + String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.latestLinkedSaaSSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context); } /** - * Update a NewRelicMonitorResource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param properties The resource properties to 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 a Monitor Resource by NewRelic. + * @return response of get latest linked SaaS resource operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NewRelicMonitorResourceInner update(String resourceGroupName, String monitorName, - NewRelicMonitorResourceUpdate properties) { - return updateWithResponse(resourceGroupName, monitorName, properties, Context.NONE).getValue(); + public LatestLinkedSaaSResponseInner latestLinkedSaaS(String resourceGroupName, String monitorName) { + return latestLinkedSaaSWithResponse(resourceGroupName, monitorName, Context.NONE).getValue(); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param userEmail User Email. * @param monitorName Name of the Monitors resource. + * @param body Link SaaS body parameter. * @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 {@link Response} on successful completion of {@link Mono}. + * @return a Monitor Resource by NewRelic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String userEmail, - String monitorName) { + private Mono>> linkSaaSWithResponseAsync(String resourceGroupName, String monitorName, + SaaSData body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1026,214 +2010,232 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (userEmail == null) { - return Mono.error(new IllegalArgumentException("Parameter userEmail is required and cannot be null.")); - } if (monitorName == null) { return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, userEmail, monitorName, accept, context)) + .withContext(context -> service.linkSaaS(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param userEmail User Email. * @param monitorName Name of the Monitors resource. - * @param context The context to associate with this operation. + * @param body Link SaaS body parameter. * @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 {@link Response} on successful completion of {@link Mono}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String userEmail, - String monitorName, Context context) { + private Response linkSaaSWithResponse(String resourceGroupName, String monitorName, SaaSData body) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (userEmail == null) { - return Mono.error(new IllegalArgumentException("Parameter userEmail is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, userEmail, monitorName, accept, context); + return service.linkSaaSSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, body, accept, Context.NONE); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param userEmail User Email. * @param monitorName Name of the Monitors resource. + * @param body Link SaaS body parameter. + * @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 {@link PollerFlux} for polling of long-running operation. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String userEmail, - String monitorName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, userEmail, monitorName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response linkSaaSWithResponse(String resourceGroupName, String monitorName, SaaSData body, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return service.linkSaaSSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, body, accept, context); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param userEmail User Email. * @param monitorName Name of the Monitors resource. - * @param context The context to associate with this operation. + * @param body Link SaaS body parameter. * @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 {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of a Monitor Resource by NewRelic. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String userEmail, - String monitorName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, userEmail, monitorName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + private PollerFlux, NewRelicMonitorResourceInner> + beginLinkSaaSAsync(String resourceGroupName, String monitorName, SaaSData body) { + Mono>> mono = linkSaaSWithResponseAsync(resourceGroupName, monitorName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, + this.client.getContext()); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param userEmail User Email. * @param monitorName Name of the Monitors resource. + * @param body Link SaaS body parameter. * @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 {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String userEmail, - String monitorName) { - return this.beginDeleteAsync(resourceGroupName, userEmail, monitorName).getSyncPoller(); + public SyncPoller, NewRelicMonitorResourceInner> + beginLinkSaaS(String resourceGroupName, String monitorName, SaaSData body) { + Response response = linkSaaSWithResponse(resourceGroupName, monitorName, body); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, Context.NONE); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param userEmail User Email. * @param monitorName Name of the Monitors resource. + * @param body Link SaaS body parameter. * @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 {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String userEmail, - String monitorName, Context context) { - return this.beginDeleteAsync(resourceGroupName, userEmail, monitorName, context).getSyncPoller(); - } - - /** - * Delete a NewRelicMonitorResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param userEmail User Email. - * @param monitorName Name of the Monitors resource. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String userEmail, String monitorName) { - return beginDeleteAsync(resourceGroupName, userEmail, monitorName).last() - .flatMap(this.client::getLroFinalResultOrError); + public SyncPoller, NewRelicMonitorResourceInner> + beginLinkSaaS(String resourceGroupName, String monitorName, SaaSData body, Context context) { + Response response = linkSaaSWithResponse(resourceGroupName, monitorName, body, context); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, context); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param userEmail User Email. * @param monitorName Name of the Monitors resource. - * @param context The context to associate with this operation. + * @param body Link SaaS body parameter. * @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 A {@link Mono} that completes when a successful response is received. + * @return a Monitor Resource by NewRelic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String userEmail, String monitorName, Context context) { - return beginDeleteAsync(resourceGroupName, userEmail, monitorName, context).last() + private Mono linkSaaSAsync(String resourceGroupName, String monitorName, + SaaSData body) { + return beginLinkSaaSAsync(resourceGroupName, monitorName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param userEmail User Email. * @param monitorName Name of the Monitors resource. + * @param body Link SaaS body parameter. * @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 a Monitor Resource by NewRelic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String userEmail, String monitorName) { - deleteAsync(resourceGroupName, userEmail, monitorName).block(); + public NewRelicMonitorResourceInner linkSaaS(String resourceGroupName, String monitorName, SaaSData body) { + return beginLinkSaaS(resourceGroupName, monitorName, body).getFinalResult(); } /** - * Delete a NewRelicMonitorResource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param userEmail User Email. * @param monitorName Name of the Monitors resource. + * @param body Link SaaS body parameter. * @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 a Monitor Resource by NewRelic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String userEmail, String monitorName, Context context) { - deleteAsync(resourceGroupName, userEmail, monitorName, context).block(); + public NewRelicMonitorResourceInner linkSaaS(String resourceGroupName, String monitorName, SaaSData body, + Context context) { + return beginLinkSaaS(resourceGroupName, monitorName, body, context).getFinalResult(); } /** - * Get metric rules. + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the get metrics status request. + * @param request The details of the app services get request. * @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 metric rules along with {@link Response} on successful completion of {@link Mono}. + * @return response of a list app services Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getMetricRulesWithResponseAsync(String resourceGroupName, - String monitorName, MetricsRequest request) { + private Mono> listAppServicesSinglePageAsync(String resourceGroupName, + String monitorName, AppServicesGetRequest request) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1256,254 +2258,377 @@ private Mono> getMetricRulesWithResponseAsync(String } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getMetricRules(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.listAppServices(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get metric rules. + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the get metrics status request. - * @param context The context to associate with this operation. + * @param request The details of the app services get request. + * @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 response of a list app services Operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAppServicesAsync(String resourceGroupName, String monitorName, + AppServicesGetRequest request) { + return new PagedFlux<>(() -> listAppServicesSinglePageAsync(resourceGroupName, monitorName, request), + nextLink -> listAppServicesNextSinglePageAsync(nextLink)); + } + + /** + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the app services get request. * @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 metric rules along with {@link Response} on successful completion of {@link Mono}. + * @return response of a list app services Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getMetricRulesWithResponseAsync(String resourceGroupName, - String monitorName, MetricsRequest request, Context context) { + private PagedResponse listAppServicesSinglePage(String resourceGroupName, String monitorName, + AppServicesGetRequest request) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter request is required and cannot be null.")); } else { request.validate(); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getMetricRules(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context); + Response res + = service.listAppServicesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get metric rules. + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the get metrics status request. + * @param request The details of the app services get request. + * @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 metric rules on successful completion of {@link Mono}. + * @return response of a list app services Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getMetricRulesAsync(String resourceGroupName, String monitorName, - MetricsRequest request) { - return getMetricRulesWithResponseAsync(resourceGroupName, monitorName, request) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listAppServicesSinglePage(String resourceGroupName, String monitorName, + AppServicesGetRequest request, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (request == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + Response res + = service.listAppServicesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get metric rules. + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the get metrics status request. + * @param request The details of the app services get request. + * @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 response of a list app services Operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAppServices(String resourceGroupName, String monitorName, + AppServicesGetRequest request) { + return new PagedIterable<>(() -> listAppServicesSinglePage(resourceGroupName, monitorName, request), + nextLink -> listAppServicesNextSinglePage(nextLink)); + } + + /** + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the app services get request. * @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 metric rules along with {@link Response}. + * @return response of a list app services Operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getMetricRulesWithResponse(String resourceGroupName, String monitorName, - MetricsRequest request, Context context) { - return getMetricRulesWithResponseAsync(resourceGroupName, monitorName, request, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAppServices(String resourceGroupName, String monitorName, + AppServicesGetRequest request, Context context) { + return new PagedIterable<>(() -> listAppServicesSinglePage(resourceGroupName, monitorName, request, context), + nextLink -> listAppServicesNextSinglePage(nextLink, context)); } /** - * Get metric rules. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the get metrics status request. + * @param request The details of the Hosts get request. * @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 metric rules. + * @return response of a list VM Host Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MetricRulesInner getMetricRules(String resourceGroupName, String monitorName, MetricsRequest request) { - return getMetricRulesWithResponse(resourceGroupName, monitorName, request, Context.NONE).getValue(); + private Mono> listHostsSinglePageAsync(String resourceGroupName, String monitorName, + HostsGetRequest request) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listHosts(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the Hosts get request. + * @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 response of a list VM Host Operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listHostsAsync(String resourceGroupName, String monitorName, + HostsGetRequest request) { + return new PagedFlux<>(() -> listHostsSinglePageAsync(resourceGroupName, monitorName, request), + nextLink -> listHostsNextSinglePageAsync(nextLink)); } /** - * Get metric status. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the get metrics status request. + * @param request The details of the Hosts get request. * @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 metric status along with {@link Response} on successful completion of {@link Mono}. + * @return response of a list VM Host Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getMetricStatusWithResponseAsync(String resourceGroupName, - String monitorName, MetricsStatusRequest request) { + private PagedResponse listHostsSinglePage(String resourceGroupName, String monitorName, + HostsGetRequest request) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter request is required and cannot be null.")); } else { request.validate(); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getMetricStatus(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listHostsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get metric status. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the get metrics status request. + * @param request The details of the Hosts get request. * @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 metric status along with {@link Response} on successful completion of {@link Mono}. + * @return response of a list VM Host Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getMetricStatusWithResponseAsync(String resourceGroupName, - String monitorName, MetricsStatusRequest request, Context context) { + private PagedResponse listHostsSinglePage(String resourceGroupName, String monitorName, + HostsGetRequest request, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter request is required and cannot be null.")); } else { request.validate(); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getMetricStatus(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context); + Response res + = service.listHostsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get metric status. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the get metrics status request. + * @param request The details of the Hosts get request. * @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 metric status on successful completion of {@link Mono}. + * @return response of a list VM Host Operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getMetricStatusAsync(String resourceGroupName, String monitorName, - MetricsStatusRequest request) { - return getMetricStatusWithResponseAsync(resourceGroupName, monitorName, request) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHosts(String resourceGroupName, String monitorName, HostsGetRequest request) { + return new PagedIterable<>(() -> listHostsSinglePage(resourceGroupName, monitorName, request), + nextLink -> listHostsNextSinglePage(nextLink)); } /** - * Get metric status. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the get metrics status request. + * @param request The details of the Hosts get request. * @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 metric status along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getMetricStatusWithResponse(String resourceGroupName, - String monitorName, MetricsStatusRequest request, Context context) { - return getMetricStatusWithResponseAsync(resourceGroupName, monitorName, request, context).block(); - } - - /** - * Get metric status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Name of the Monitors resource. - * @param request The details of the get metrics status request. - * @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 metric status. + * @return response of a list VM Host Operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MetricsStatusResponseInner getMetricStatus(String resourceGroupName, String monitorName, - MetricsStatusRequest request) { - return getMetricStatusWithResponse(resourceGroupName, monitorName, request, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHosts(String resourceGroupName, String monitorName, HostsGetRequest request, + Context context) { + return new PagedIterable<>(() -> listHostsSinglePage(resourceGroupName, monitorName, request, context), + nextLink -> listHostsNextSinglePage(nextLink, context)); } /** - * List the app service resources currently being monitored by the NewRelic resource. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the app services get request. * @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 response of a list app services Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAppServicesSinglePageAsync(String resourceGroupName, - String monitorName, AppServicesGetRequest request) { + private Mono> listLinkedResourcesSinglePageAsync(String resourceGroupName, + String monitorName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1519,151 +2644,164 @@ private Mono> listAppServicesSinglePageAsync( if (monitorName == null) { return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listAppServices(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .withContext(context -> service.listLinkedResources(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List the app service resources currently being monitored by the NewRelic resource. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the app services get request. - * @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 response of a list app services Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAppServicesSinglePageAsync(String resourceGroupName, - String monitorName, AppServicesGetRequest request, Context context) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listAppServices(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, request, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listLinkedResourcesAsync(String resourceGroupName, String monitorName) { + return new PagedFlux<>(() -> listLinkedResourcesSinglePageAsync(resourceGroupName, monitorName), + nextLink -> listLinkedResourcesNextSinglePageAsync(nextLink)); } /** - * List the app service resources currently being monitored by the NewRelic resource. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the app services get request. * @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 response of a list app services Operation as paginated response with {@link PagedFlux}. + * @return response of a list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAppServicesAsync(String resourceGroupName, String monitorName, - AppServicesGetRequest request) { - return new PagedFlux<>(() -> listAppServicesSinglePageAsync(resourceGroupName, monitorName, request), - nextLink -> listAppServicesNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listLinkedResourcesSinglePage(String resourceGroupName, + String monitorName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listLinkedResourcesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List the app service resources currently being monitored by the NewRelic resource. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the app services get request. * @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 response of a list app services Operation as paginated response with {@link PagedFlux}. + * @return response of a list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAppServicesAsync(String resourceGroupName, String monitorName, - AppServicesGetRequest request, Context context) { - return new PagedFlux<>(() -> listAppServicesSinglePageAsync(resourceGroupName, monitorName, request, context), - nextLink -> listAppServicesNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listLinkedResourcesSinglePage(String resourceGroupName, + String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listLinkedResourcesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List the app service resources currently being monitored by the NewRelic resource. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the app services get request. * @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 response of a list app services Operation as paginated response with {@link PagedIterable}. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAppServices(String resourceGroupName, String monitorName, - AppServicesGetRequest request) { - return new PagedIterable<>(listAppServicesAsync(resourceGroupName, monitorName, request)); + public PagedIterable listLinkedResources(String resourceGroupName, String monitorName) { + return new PagedIterable<>(() -> listLinkedResourcesSinglePage(resourceGroupName, monitorName), + nextLink -> listLinkedResourcesNextSinglePage(nextLink)); } /** - * List the app service resources currently being monitored by the NewRelic resource. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the app services get request. * @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 response of a list app services Operation as paginated response with {@link PagedIterable}. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAppServices(String resourceGroupName, String monitorName, - AppServicesGetRequest request, Context context) { - return new PagedIterable<>(listAppServicesAsync(resourceGroupName, monitorName, request, context)); + public PagedIterable listLinkedResources(String resourceGroupName, String monitorName, + Context context) { + return new PagedIterable<>(() -> listLinkedResourcesSinglePage(resourceGroupName, monitorName, context), + nextLink -> listLinkedResourcesNextSinglePage(nextLink, context)); } /** - * Switches the billing for NewRelic monitor resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the switch billing request. * @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 a Monitor Resource by NewRelic on successful completion of {@link Mono}. + * @return list of all the resources being monitored by NewRelic monitor resource along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono switchBillingWithResponseAsync(String resourceGroupName, - String monitorName, SwitchBillingRequest request) { + private Mono> listMonitoredResourcesSinglePageAsync(String resourceGroupName, + String monitorName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1679,172 +2817,166 @@ private Mono switchBillingWithResponseAsync(Strin if (monitorName == null) { return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.switchBilling(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context)) + .withContext( + context -> service.listMonitoredResources(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Switches the billing for NewRelic monitor resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the switch billing request. - * @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 a Monitor Resource by NewRelic on successful completion of {@link Mono}. + * @return list of all the resources being monitored by NewRelic monitor resource as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono switchBillingWithResponseAsync(String resourceGroupName, - String monitorName, SwitchBillingRequest request, Context context) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.switchBilling(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMonitoredResourcesAsync(String resourceGroupName, + String monitorName) { + return new PagedFlux<>(() -> listMonitoredResourcesSinglePageAsync(resourceGroupName, monitorName), + nextLink -> listMonitoredResourcesNextSinglePageAsync(nextLink)); } /** - * Switches the billing for NewRelic monitor resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the switch billing request. * @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 a Monitor Resource by NewRelic on successful completion of {@link Mono}. + * @return list of all the resources being monitored by NewRelic monitor resource along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono switchBillingAsync(String resourceGroupName, String monitorName, - SwitchBillingRequest request) { - return switchBillingWithResponseAsync(resourceGroupName, monitorName, request) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listMonitoredResourcesSinglePage(String resourceGroupName, + String monitorName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listMonitoredResourcesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Switches the billing for NewRelic monitor resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the switch billing request. * @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 a Monitor Resource by NewRelic. + * @return list of all the resources being monitored by NewRelic monitor resource along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MonitorsSwitchBillingResponse switchBillingWithResponse(String resourceGroupName, String monitorName, - SwitchBillingRequest request, Context context) { - return switchBillingWithResponseAsync(resourceGroupName, monitorName, request, context).block(); + private PagedResponse listMonitoredResourcesSinglePage(String resourceGroupName, + String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listMonitoredResourcesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Switches the billing for NewRelic monitor resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the switch billing request. * @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 a Monitor Resource by NewRelic. + * @return list of all the resources being monitored by NewRelic monitor resource as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NewRelicMonitorResourceInner switchBilling(String resourceGroupName, String monitorName, - SwitchBillingRequest request) { - return switchBillingWithResponse(resourceGroupName, monitorName, request, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName) { + return new PagedIterable<>(() -> listMonitoredResourcesSinglePage(resourceGroupName, monitorName), + nextLink -> listMonitoredResourcesNextSinglePage(nextLink)); } /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the Hosts get request. + * @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 response of a list VM Host Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of all the resources being monitored by NewRelic monitor resource as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listHostsSinglePageAsync(String resourceGroupName, String monitorName, - HostsGetRequest request) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listHosts(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + Context context) { + return new PagedIterable<>(() -> listMonitoredResourcesSinglePage(resourceGroupName, monitorName, context), + nextLink -> listMonitoredResourcesNextSinglePage(nextLink, context)); } /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the Hosts get request. - * @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 response of a list VM Host Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listHostsSinglePageAsync(String resourceGroupName, String monitorName, - HostsGetRequest request, Context context) { + private Mono> refreshIngestionKeyWithResponseAsync(String resourceGroupName, String monitorName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1860,105 +2992,95 @@ private Mono> listHostsSinglePageAsync(String resourc if (monitorName == null) { return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } - if (request == null) { - return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); - } else { - request.validate(); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listHosts(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, request, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return FluxUtil + .withContext(context -> service.refreshIngestionKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the Hosts get request. * @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 response of a list VM Host Operation as paginated response with {@link PagedFlux}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listHostsAsync(String resourceGroupName, String monitorName, - HostsGetRequest request) { - return new PagedFlux<>(() -> listHostsSinglePageAsync(resourceGroupName, monitorName, request), - nextLink -> listHostsNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono refreshIngestionKeyAsync(String resourceGroupName, String monitorName) { + return refreshIngestionKeyWithResponseAsync(resourceGroupName, monitorName).flatMap(ignored -> Mono.empty()); } /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the Hosts get request. * @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 response of a list VM Host Operation as paginated response with {@link PagedFlux}. + * @return the {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listHostsAsync(String resourceGroupName, String monitorName, HostsGetRequest request, + @ServiceMethod(returns = ReturnType.SINGLE) + public Response refreshIngestionKeyWithResponse(String resourceGroupName, String monitorName, Context context) { - return new PagedFlux<>(() -> listHostsSinglePageAsync(resourceGroupName, monitorName, request, context), - nextLink -> listHostsNextSinglePageAsync(nextLink, context)); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.refreshIngestionKeySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context); } /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the Hosts get request. * @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 response of a list VM Host Operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listHosts(String resourceGroupName, String monitorName, HostsGetRequest request) { - return new PagedIterable<>(listHostsAsync(resourceGroupName, monitorName, request)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void refreshIngestionKey(String resourceGroupName, String monitorName) { + refreshIngestionKeyWithResponse(resourceGroupName, monitorName, Context.NONE); } /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Name of the Monitors resource. - * @param request The details of the Hosts get request. - * @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 response of a list VM Host Operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listHosts(String resourceGroupName, String monitorName, HostsGetRequest request, - Context context) { - return new PagedIterable<>(listHostsAsync(resourceGroupName, monitorName, request, context)); - } - - /** - * List the resources currently being monitored by the NewRelic monitor resource. + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @param body Resubscribe Properties. * @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 list of all the resources being monitored by NewRelic monitor resource along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a Monitor Resource by NewRelic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMonitoredResourcesSinglePageAsync(String resourceGroupName, - String monitorName) { + private Mono>> resubscribeWithResponseAsync(String resourceGroupName, String monitorName, + ResubscribeProperties body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1974,282 +3096,300 @@ private Mono> listMonitoredResourcesSingle if (monitorName == null) { return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } + if (body != null) { + body.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listMonitoredResources(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.resubscribe(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param context The context to associate with this operation. + * @param body Resubscribe Properties. * @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 list of all the resources being monitored by NewRelic monitor resource along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMonitoredResourcesSinglePageAsync(String resourceGroupName, - String monitorName, Context context) { + private Response resubscribeWithResponse(String resourceGroupName, String monitorName, + ResubscribeProperties body) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (body != null) { + body.validate(); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listMonitoredResources(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.resubscribeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, body, accept, Context.NONE); } /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @param body Resubscribe Properties. + * @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 list of all the resources being monitored by NewRelic monitor resource as paginated response with - * {@link PagedFlux}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listMonitoredResourcesAsync(String resourceGroupName, - String monitorName) { - return new PagedFlux<>(() -> listMonitoredResourcesSinglePageAsync(resourceGroupName, monitorName), - nextLink -> listMonitoredResourcesNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response resubscribeWithResponse(String resourceGroupName, String monitorName, + ResubscribeProperties body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return service.resubscribeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, body, accept, context); } /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param context The context to associate with this operation. + * @param body Resubscribe Properties. * @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 list of all the resources being monitored by NewRelic monitor resource as paginated response with - * {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listMonitoredResourcesAsync(String resourceGroupName, String monitorName, - Context context) { - return new PagedFlux<>(() -> listMonitoredResourcesSinglePageAsync(resourceGroupName, monitorName, context), - nextLink -> listMonitoredResourcesNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NewRelicMonitorResourceInner> + beginResubscribeAsync(String resourceGroupName, String monitorName, ResubscribeProperties body) { + Mono>> mono = resubscribeWithResponseAsync(resourceGroupName, monitorName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, + this.client.getContext()); } /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @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 list of all the resources being monitored by NewRelic monitor resource as paginated response with - * {@link PagedIterable}. + * @return the {@link PollerFlux} for polling of a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName) { - return new PagedIterable<>(listMonitoredResourcesAsync(resourceGroupName, monitorName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NewRelicMonitorResourceInner> + beginResubscribeAsync(String resourceGroupName, String monitorName) { + final ResubscribeProperties body = null; + Mono>> mono = resubscribeWithResponseAsync(resourceGroupName, monitorName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, + this.client.getContext()); } /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param context The context to associate with this operation. + * @param body Resubscribe Properties. * @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 list of all the resources being monitored by NewRelic monitor resource as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, - Context context) { - return new PagedIterable<>(listMonitoredResourcesAsync(resourceGroupName, monitorName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NewRelicMonitorResourceInner> + beginResubscribe(String resourceGroupName, String monitorName, ResubscribeProperties body) { + Response response = resubscribeWithResponse(resourceGroupName, monitorName, body); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, Context.NONE); } /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @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 response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listLinkedResourcesSinglePageAsync(String resourceGroupName, - String monitorName) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listLinkedResources(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NewRelicMonitorResourceInner> + beginResubscribe(String resourceGroupName, String monitorName) { + final ResubscribeProperties body = null; + Response response = resubscribeWithResponse(resourceGroupName, monitorName, body); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, Context.NONE); } /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @param body Resubscribe Properties. * @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 response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listLinkedResourcesSinglePageAsync(String resourceGroupName, - String monitorName, Context context) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listLinkedResources(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - monitorName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NewRelicMonitorResourceInner> + beginResubscribe(String resourceGroupName, String monitorName, ResubscribeProperties body, Context context) { + Response response = resubscribeWithResponse(resourceGroupName, monitorName, body, context); + return this.client.getLroResult(response, + NewRelicMonitorResourceInner.class, NewRelicMonitorResourceInner.class, context); } /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @param body Resubscribe Properties. * @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 response of a list operation as paginated response with {@link PagedFlux}. + * @return a Monitor Resource by NewRelic on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listLinkedResourcesAsync(String resourceGroupName, String monitorName) { - return new PagedFlux<>(() -> listLinkedResourcesSinglePageAsync(resourceGroupName, monitorName), - nextLink -> listLinkedResourcesNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resubscribeAsync(String resourceGroupName, String monitorName, + ResubscribeProperties body) { + return beginResubscribeAsync(resourceGroupName, monitorName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @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 response of a list operation as paginated response with {@link PagedFlux}. + * @return a Monitor Resource by NewRelic on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listLinkedResourcesAsync(String resourceGroupName, String monitorName, - Context context) { - return new PagedFlux<>(() -> listLinkedResourcesSinglePageAsync(resourceGroupName, monitorName, context), - nextLink -> listLinkedResourcesNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resubscribeAsync(String resourceGroupName, String monitorName) { + final ResubscribeProperties body = null; + return beginResubscribeAsync(resourceGroupName, monitorName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @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 response of a list operation as paginated response with {@link PagedIterable}. + * @return a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listLinkedResources(String resourceGroupName, String monitorName) { - return new PagedIterable<>(listLinkedResourcesAsync(resourceGroupName, monitorName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public NewRelicMonitorResourceInner resubscribe(String resourceGroupName, String monitorName) { + final ResubscribeProperties body = null; + return beginResubscribe(resourceGroupName, monitorName, body).getFinalResult(); } /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @param body Resubscribe Properties. * @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 response of a list operation as paginated response with {@link PagedIterable}. + * @return a Monitor Resource by NewRelic. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listLinkedResources(String resourceGroupName, String monitorName, - Context context) { - return new PagedIterable<>(listLinkedResourcesAsync(resourceGroupName, monitorName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public NewRelicMonitorResourceInner resubscribe(String resourceGroupName, String monitorName, + ResubscribeProperties body, Context context) { + return beginResubscribe(resourceGroupName, monitorName, body, context).getFinalResult(); } /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @param request The details of the switch billing request. * @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 response of payload to be passed while installing VM agent along with {@link Response} on successful - * completion of {@link Mono}. + * @return a Monitor Resource by NewRelic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> vmHostPayloadWithResponseAsync(String resourceGroupName, - String monitorName) { + private Mono switchBillingWithResponseAsync(String resourceGroupName, + String monitorName, SwitchBillingRequest request) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2265,28 +3405,112 @@ private Mono> vmHostPayloadWithResponseAsync(S if (monitorName == null) { return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } + if (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.vmHostPayload(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context)) + .withContext(context -> service.switchBilling(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the switch billing request. + * @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 a Monitor Resource by NewRelic on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono switchBillingAsync(String resourceGroupName, String monitorName, + SwitchBillingRequest request) { + return switchBillingWithResponseAsync(resourceGroupName, monitorName, request) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @param request The details of the switch billing request. * @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 a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MonitorsSwitchBillingResponse switchBillingWithResponse(String resourceGroupName, String monitorName, + SwitchBillingRequest request, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (request == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return service.switchBillingSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, request, accept, context); + } + + /** + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the switch billing request. + * @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 a Monitor Resource by NewRelic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NewRelicMonitorResourceInner switchBilling(String resourceGroupName, String monitorName, + SwitchBillingRequest request) { + return switchBillingWithResponse(resourceGroupName, monitorName, request, Context.NONE).getValue(); + } + + /** + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @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 response of payload to be passed while installing VM agent along with {@link Response} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> vmHostPayloadWithResponseAsync(String resourceGroupName, - String monitorName, Context context) { + String monitorName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2303,13 +3527,15 @@ private Mono> vmHostPayloadWithResponseAsync(S return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.vmHostPayload(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context); + return FluxUtil + .withContext(context -> service.vmHostPayload(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -2325,7 +3551,8 @@ private Mono vmHostPayloadAsync(String resourceGroupNam } /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -2338,11 +3565,32 @@ private Mono vmHostPayloadAsync(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) public Response vmHostPayloadWithResponse(String resourceGroupName, String monitorName, Context context) { - return vmHostPayloadWithResponseAsync(resourceGroupName, monitorName, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.vmHostPayloadSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context); } /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -2384,6 +3632,33 @@ private Mono> listBySubscriptionNext .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of a NewRelicMonitorResource list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2392,24 +3667,25 @@ private Mono> listBySubscriptionNext * @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 response of a NewRelicMonitorResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a NewRelicMonitorResource list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2440,6 +3716,33 @@ private Mono> listByResourceGroupNex .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of a NewRelicMonitorResource list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2448,24 +3751,25 @@ private Mono> listByResourceGroupNex * @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 response of a NewRelicMonitorResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a NewRelicMonitorResource list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2495,6 +3799,33 @@ private Mono> listAppServicesNextSinglePageAs .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of a list app services Operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAppServicesNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listAppServicesNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2503,24 +3834,24 @@ private Mono> listAppServicesNextSinglePageAs * @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 response of a list app services Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return response of a list app services Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAppServicesNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listAppServicesNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listAppServicesNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listAppServicesNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2550,6 +3881,33 @@ private Mono> listHostsNextSinglePageAsync(String nex .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of a list VM Host Operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listHostsNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listHostsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2558,37 +3916,40 @@ private Mono> listHostsNextSinglePageAsync(String nex * @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 response of a list VM Host Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return response of a list VM Host Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listHostsNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listHostsNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listHostsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listHostsNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @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 list of all the resources being monitored by NewRelic monitor resource along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMonitoredResourcesNextSinglePageAsync(String nextLink) { + private Mono> listLinkedResourcesNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2599,13 +3960,46 @@ private Mono> listMonitoredResourcesNextSi final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listMonitoredResourcesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + context -> service.listLinkedResourcesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of a list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listLinkedResourcesNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listLinkedResourcesNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2613,24 +4007,24 @@ private Mono> listMonitoredResourcesNextSi * @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 list of all the resources being monitored by NewRelic monitor resource along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return response of a list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMonitoredResourcesNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listLinkedResourcesNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listMonitoredResourcesNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listLinkedResourcesNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2640,10 +4034,11 @@ private Mono> listMonitoredResourcesNextSi * @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 response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of all the resources being monitored by NewRelic monitor resource along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listLinkedResourcesNextSinglePageAsync(String nextLink) { + private Mono> listMonitoredResourcesNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2654,12 +4049,39 @@ private Mono> listLinkedResourcesNextSinglePa final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listLinkedResourcesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + context -> service.listMonitoredResourcesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 list of all the resources being monitored by NewRelic monitor resource along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listMonitoredResourcesNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listMonitoredResourcesNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2668,22 +4090,26 @@ private Mono> listLinkedResourcesNextSinglePa * @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 response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of all the resources being monitored by NewRelic monitor resource along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listLinkedResourcesNextSinglePageAsync(String nextLink, + private PagedResponse listMonitoredResourcesNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listLinkedResourcesNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listMonitoredResourcesNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(MonitorsClientImpl.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitorsImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitorsImpl.java index 6b5c40a49849..ee402a75836a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitorsImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/MonitorsImpl.java @@ -11,6 +11,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.newrelicobservability.fluent.MonitorsClient; import com.azure.resourcemanager.newrelicobservability.fluent.models.AppServiceInfoInner; +import com.azure.resourcemanager.newrelicobservability.fluent.models.LatestLinkedSaaSResponseInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.LinkedResourceInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricRulesInner; import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricsStatusResponseInner; @@ -21,6 +22,7 @@ import com.azure.resourcemanager.newrelicobservability.models.AppServiceInfo; import com.azure.resourcemanager.newrelicobservability.models.AppServicesGetRequest; import com.azure.resourcemanager.newrelicobservability.models.HostsGetRequest; +import com.azure.resourcemanager.newrelicobservability.models.LatestLinkedSaaSResponse; import com.azure.resourcemanager.newrelicobservability.models.LinkedResource; import com.azure.resourcemanager.newrelicobservability.models.MetricRules; import com.azure.resourcemanager.newrelicobservability.models.MetricsRequest; @@ -30,6 +32,8 @@ import com.azure.resourcemanager.newrelicobservability.models.Monitors; import com.azure.resourcemanager.newrelicobservability.models.MonitorsSwitchBillingResponse; import com.azure.resourcemanager.newrelicobservability.models.NewRelicMonitorResource; +import com.azure.resourcemanager.newrelicobservability.models.ResubscribeProperties; +import com.azure.resourcemanager.newrelicobservability.models.SaaSData; import com.azure.resourcemanager.newrelicobservability.models.SwitchBillingRequest; import com.azure.resourcemanager.newrelicobservability.models.VMExtensionPayload; import com.azure.resourcemanager.newrelicobservability.models.VMInfo; @@ -89,12 +93,12 @@ public NewRelicMonitorResource getByResourceGroup(String resourceGroupName, Stri } } - public void delete(String resourceGroupName, String userEmail, String monitorName) { - this.serviceClient().delete(resourceGroupName, userEmail, monitorName); + public void delete(String resourceGroupName, String monitorName, String userEmail) { + this.serviceClient().delete(resourceGroupName, monitorName, userEmail); } - public void delete(String resourceGroupName, String userEmail, String monitorName, Context context) { - this.serviceClient().delete(resourceGroupName, userEmail, monitorName, context); + public void delete(String resourceGroupName, String monitorName, String userEmail, Context context) { + this.serviceClient().delete(resourceGroupName, monitorName, userEmail, context); } public Response getMetricRulesWithResponse(String resourceGroupName, String monitorName, @@ -141,36 +145,40 @@ public MetricsStatusResponse getMetricStatus(String resourceGroupName, String mo } } - public PagedIterable listAppServices(String resourceGroupName, String monitorName, - AppServicesGetRequest request) { - PagedIterable inner - = this.serviceClient().listAppServices(resourceGroupName, monitorName, request); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AppServiceInfoImpl(inner1, this.manager())); + public Response latestLinkedSaaSWithResponse(String resourceGroupName, String monitorName, + Context context) { + Response inner + = this.serviceClient().latestLinkedSaaSWithResponse(resourceGroupName, monitorName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LatestLinkedSaaSResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } } - public PagedIterable listAppServices(String resourceGroupName, String monitorName, - AppServicesGetRequest request, Context context) { - PagedIterable inner - = this.serviceClient().listAppServices(resourceGroupName, monitorName, request, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AppServiceInfoImpl(inner1, this.manager())); + public LatestLinkedSaaSResponse latestLinkedSaaS(String resourceGroupName, String monitorName) { + LatestLinkedSaaSResponseInner inner = this.serviceClient().latestLinkedSaaS(resourceGroupName, monitorName); + if (inner != null) { + return new LatestLinkedSaaSResponseImpl(inner, this.manager()); + } else { + return null; + } } - public Response switchBillingWithResponse(String resourceGroupName, String monitorName, - SwitchBillingRequest request, Context context) { - MonitorsSwitchBillingResponse inner - = this.serviceClient().switchBillingWithResponse(resourceGroupName, monitorName, request, context); + public NewRelicMonitorResource linkSaaS(String resourceGroupName, String monitorName, SaaSData body) { + NewRelicMonitorResourceInner inner = this.serviceClient().linkSaaS(resourceGroupName, monitorName, body); if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NewRelicMonitorResourceImpl(inner.getValue(), this.manager())); + return new NewRelicMonitorResourceImpl(inner, this.manager()); } else { return null; } } - public NewRelicMonitorResource switchBilling(String resourceGroupName, String monitorName, - SwitchBillingRequest request) { + public NewRelicMonitorResource linkSaaS(String resourceGroupName, String monitorName, SaaSData body, + Context context) { NewRelicMonitorResourceInner inner - = this.serviceClient().switchBilling(resourceGroupName, monitorName, request); + = this.serviceClient().linkSaaS(resourceGroupName, monitorName, body, context); if (inner != null) { return new NewRelicMonitorResourceImpl(inner, this.manager()); } else { @@ -178,6 +186,20 @@ public NewRelicMonitorResource switchBilling(String resourceGroupName, String mo } } + public PagedIterable listAppServices(String resourceGroupName, String monitorName, + AppServicesGetRequest request) { + PagedIterable inner + = this.serviceClient().listAppServices(resourceGroupName, monitorName, request); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AppServiceInfoImpl(inner1, this.manager())); + } + + public PagedIterable listAppServices(String resourceGroupName, String monitorName, + AppServicesGetRequest request, Context context) { + PagedIterable inner + = this.serviceClient().listAppServices(resourceGroupName, monitorName, request, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AppServiceInfoImpl(inner1, this.manager())); + } + public PagedIterable listHosts(String resourceGroupName, String monitorName, HostsGetRequest request) { PagedIterable inner = this.serviceClient().listHosts(resourceGroupName, monitorName, request); return ResourceManagerUtils.mapPage(inner, inner1 -> new VMInfoImpl(inner1, this.manager())); @@ -190,6 +212,19 @@ public PagedIterable listHosts(String resourceGroupName, String monitorN return ResourceManagerUtils.mapPage(inner, inner1 -> new VMInfoImpl(inner1, this.manager())); } + public PagedIterable listLinkedResources(String resourceGroupName, String monitorName) { + PagedIterable inner + = this.serviceClient().listLinkedResources(resourceGroupName, monitorName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LinkedResourceImpl(inner1, this.manager())); + } + + public PagedIterable listLinkedResources(String resourceGroupName, String monitorName, + Context context) { + PagedIterable inner + = this.serviceClient().listLinkedResources(resourceGroupName, monitorName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LinkedResourceImpl(inner1, this.manager())); + } + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName) { PagedIterable inner = this.serviceClient().listMonitoredResources(resourceGroupName, monitorName); @@ -203,17 +238,56 @@ public PagedIterable listMonitoredResources(String resourceGr return ResourceManagerUtils.mapPage(inner, inner1 -> new MonitoredResourceImpl(inner1, this.manager())); } - public PagedIterable listLinkedResources(String resourceGroupName, String monitorName) { - PagedIterable inner - = this.serviceClient().listLinkedResources(resourceGroupName, monitorName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LinkedResourceImpl(inner1, this.manager())); + public Response refreshIngestionKeyWithResponse(String resourceGroupName, String monitorName, + Context context) { + return this.serviceClient().refreshIngestionKeyWithResponse(resourceGroupName, monitorName, context); } - public PagedIterable listLinkedResources(String resourceGroupName, String monitorName, + public void refreshIngestionKey(String resourceGroupName, String monitorName) { + this.serviceClient().refreshIngestionKey(resourceGroupName, monitorName); + } + + public NewRelicMonitorResource resubscribe(String resourceGroupName, String monitorName) { + NewRelicMonitorResourceInner inner = this.serviceClient().resubscribe(resourceGroupName, monitorName); + if (inner != null) { + return new NewRelicMonitorResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public NewRelicMonitorResource resubscribe(String resourceGroupName, String monitorName, ResubscribeProperties body, Context context) { - PagedIterable inner - = this.serviceClient().listLinkedResources(resourceGroupName, monitorName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LinkedResourceImpl(inner1, this.manager())); + NewRelicMonitorResourceInner inner + = this.serviceClient().resubscribe(resourceGroupName, monitorName, body, context); + if (inner != null) { + return new NewRelicMonitorResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response switchBillingWithResponse(String resourceGroupName, String monitorName, + SwitchBillingRequest request, Context context) { + MonitorsSwitchBillingResponse inner + = this.serviceClient().switchBillingWithResponse(resourceGroupName, monitorName, request, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NewRelicMonitorResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NewRelicMonitorResource switchBilling(String resourceGroupName, String monitorName, + SwitchBillingRequest request) { + NewRelicMonitorResourceInner inner + = this.serviceClient().switchBilling(resourceGroupName, monitorName, request); + if (inner != null) { + return new NewRelicMonitorResourceImpl(inner, this.manager()); + } else { + return null; + } } public Response vmHostPayloadWithResponse(String resourceGroupName, String monitorName, diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicMonitorResourceImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicMonitorResourceImpl.java index ea4a7248f58a..0beed0c38f20 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicMonitorResourceImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicMonitorResourceImpl.java @@ -14,6 +14,7 @@ import com.azure.resourcemanager.newrelicobservability.models.AppServiceInfo; import com.azure.resourcemanager.newrelicobservability.models.AppServicesGetRequest; import com.azure.resourcemanager.newrelicobservability.models.HostsGetRequest; +import com.azure.resourcemanager.newrelicobservability.models.LatestLinkedSaaSResponse; import com.azure.resourcemanager.newrelicobservability.models.LiftrResourceCategories; import com.azure.resourcemanager.newrelicobservability.models.LinkedResource; import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentity; @@ -30,6 +31,8 @@ import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource; import com.azure.resourcemanager.newrelicobservability.models.PlanData; import com.azure.resourcemanager.newrelicobservability.models.ProvisioningState; +import com.azure.resourcemanager.newrelicobservability.models.ResubscribeProperties; +import com.azure.resourcemanager.newrelicobservability.models.SaaSData; import com.azure.resourcemanager.newrelicobservability.models.SwitchBillingRequest; import com.azure.resourcemanager.newrelicobservability.models.UserInfo; import com.azure.resourcemanager.newrelicobservability.models.VMExtensionPayload; @@ -104,6 +107,10 @@ public PlanData planData() { return this.innerModel().planData(); } + public SaaSData saaSData() { + return this.innerModel().saaSData(); + } + public LiftrResourceCategories liftrResourceCategory() { return this.innerModel().liftrResourceCategory(); } @@ -188,16 +195,14 @@ public NewRelicMonitorResourceImpl update() { public NewRelicMonitorResource apply() { this.innerObject = serviceManager.serviceClient() .getMonitors() - .updateWithResponse(resourceGroupName, monitorName, updateProperties, Context.NONE) - .getValue(); + .update(resourceGroupName, monitorName, updateProperties, Context.NONE); return this; } public NewRelicMonitorResource apply(Context context) { this.innerObject = serviceManager.serviceClient() .getMonitors() - .updateWithResponse(resourceGroupName, monitorName, updateProperties, context) - .getValue(); + .update(resourceGroupName, monitorName, updateProperties, context); return this; } @@ -241,20 +246,28 @@ public MetricsStatusResponse getMetricStatus(MetricsStatusRequest request) { return serviceManager.monitors().getMetricStatus(resourceGroupName, monitorName, request); } - public PagedIterable listAppServices(AppServicesGetRequest request) { - return serviceManager.monitors().listAppServices(resourceGroupName, monitorName, request); + public Response latestLinkedSaaSWithResponse(Context context) { + return serviceManager.monitors().latestLinkedSaaSWithResponse(resourceGroupName, monitorName, context); } - public PagedIterable listAppServices(AppServicesGetRequest request, Context context) { - return serviceManager.monitors().listAppServices(resourceGroupName, monitorName, request, context); + public LatestLinkedSaaSResponse latestLinkedSaaS() { + return serviceManager.monitors().latestLinkedSaaS(resourceGroupName, monitorName); } - public Response switchBillingWithResponse(SwitchBillingRequest request, Context context) { - return serviceManager.monitors().switchBillingWithResponse(resourceGroupName, monitorName, request, context); + public NewRelicMonitorResource linkSaaS(SaaSData body) { + return serviceManager.monitors().linkSaaS(resourceGroupName, monitorName, body); } - public NewRelicMonitorResource switchBilling(SwitchBillingRequest request) { - return serviceManager.monitors().switchBilling(resourceGroupName, monitorName, request); + public NewRelicMonitorResource linkSaaS(SaaSData body, Context context) { + return serviceManager.monitors().linkSaaS(resourceGroupName, monitorName, body, context); + } + + public PagedIterable listAppServices(AppServicesGetRequest request) { + return serviceManager.monitors().listAppServices(resourceGroupName, monitorName, request); + } + + public PagedIterable listAppServices(AppServicesGetRequest request, Context context) { + return serviceManager.monitors().listAppServices(resourceGroupName, monitorName, request, context); } public PagedIterable listHosts(HostsGetRequest request) { @@ -265,6 +278,14 @@ public PagedIterable listHosts(HostsGetRequest request, Context context) return serviceManager.monitors().listHosts(resourceGroupName, monitorName, request, context); } + public PagedIterable listLinkedResources() { + return serviceManager.monitors().listLinkedResources(resourceGroupName, monitorName); + } + + public PagedIterable listLinkedResources(Context context) { + return serviceManager.monitors().listLinkedResources(resourceGroupName, monitorName, context); + } + public PagedIterable listMonitoredResources() { return serviceManager.monitors().listMonitoredResources(resourceGroupName, monitorName); } @@ -273,12 +294,28 @@ public PagedIterable listMonitoredResources(Context context) return serviceManager.monitors().listMonitoredResources(resourceGroupName, monitorName, context); } - public PagedIterable listLinkedResources() { - return serviceManager.monitors().listLinkedResources(resourceGroupName, monitorName); + public Response refreshIngestionKeyWithResponse(Context context) { + return serviceManager.monitors().refreshIngestionKeyWithResponse(resourceGroupName, monitorName, context); } - public PagedIterable listLinkedResources(Context context) { - return serviceManager.monitors().listLinkedResources(resourceGroupName, monitorName, context); + public void refreshIngestionKey() { + serviceManager.monitors().refreshIngestionKey(resourceGroupName, monitorName); + } + + public NewRelicMonitorResource resubscribe() { + return serviceManager.monitors().resubscribe(resourceGroupName, monitorName); + } + + public NewRelicMonitorResource resubscribe(ResubscribeProperties body, Context context) { + return serviceManager.monitors().resubscribe(resourceGroupName, monitorName, body, context); + } + + public Response switchBillingWithResponse(SwitchBillingRequest request, Context context) { + return serviceManager.monitors().switchBillingWithResponse(resourceGroupName, monitorName, request, context); + } + + public NewRelicMonitorResource switchBilling(SwitchBillingRequest request) { + return serviceManager.monitors().switchBilling(resourceGroupName, monitorName, request); } public Response vmHostPayloadWithResponse(Context context) { @@ -350,6 +387,16 @@ public NewRelicMonitorResourceImpl withPlanData(PlanData planData) { } } + public NewRelicMonitorResourceImpl withSaaSData(SaaSData saaSData) { + if (isInCreateMode()) { + this.innerModel().withSaaSData(saaSData); + return this; + } else { + this.updateProperties.withSaaSData(saaSData); + return this; + } + } + public NewRelicMonitorResourceImpl withOrgCreationSource(OrgCreationSource orgCreationSource) { if (isInCreateMode()) { this.innerModel().withOrgCreationSource(orgCreationSource); @@ -381,6 +428,6 @@ public NewRelicMonitorResourceImpl withSaaSAzureSubscriptionStatus(String saaSAz } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicObservabilityImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicObservabilityImpl.java index 4a492601703a..2459f422aa5b 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicObservabilityImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/NewRelicObservabilityImpl.java @@ -15,12 +15,15 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.SyncPollerFactory; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.newrelicobservability.fluent.AccountsClient; @@ -32,6 +35,7 @@ import com.azure.resourcemanager.newrelicobservability.fluent.OperationsClient; import com.azure.resourcemanager.newrelicobservability.fluent.OrganizationsClient; import com.azure.resourcemanager.newrelicobservability.fluent.PlansClient; +import com.azure.resourcemanager.newrelicobservability.fluent.SaaSClient; import com.azure.resourcemanager.newrelicobservability.fluent.TagRulesClient; import java.io.IOException; import java.lang.reflect.Type; @@ -159,6 +163,20 @@ public AccountsClient getAccounts() { return this.accounts; } + /** + * The SaaSClient object to access its operations. + */ + private final SaaSClient saaS; + + /** + * Gets the SaaSClient object to access its operations. + * + * @return the SaaSClient object. + */ + public SaaSClient getSaaS() { + return this.saaS; + } + /** * The MonitorsClient object to access its operations. */ @@ -230,31 +248,31 @@ public ConnectedPartnerResourcesClient getConnectedPartnerResources() { } /** - * The TagRulesClient object to access its operations. + * The MonitoredSubscriptionsClient object to access its operations. */ - private final TagRulesClient tagRules; + private final MonitoredSubscriptionsClient monitoredSubscriptions; /** - * Gets the TagRulesClient object to access its operations. + * Gets the MonitoredSubscriptionsClient object to access its operations. * - * @return the TagRulesClient object. + * @return the MonitoredSubscriptionsClient object. */ - public TagRulesClient getTagRules() { - return this.tagRules; + public MonitoredSubscriptionsClient getMonitoredSubscriptions() { + return this.monitoredSubscriptions; } /** - * The MonitoredSubscriptionsClient object to access its operations. + * The TagRulesClient object to access its operations. */ - private final MonitoredSubscriptionsClient monitoredSubscriptions; + private final TagRulesClient tagRules; /** - * Gets the MonitoredSubscriptionsClient object to access its operations. + * Gets the TagRulesClient object to access its operations. * - * @return the MonitoredSubscriptionsClient object. + * @return the TagRulesClient object. */ - public MonitoredSubscriptionsClient getMonitoredSubscriptions() { - return this.monitoredSubscriptions; + public TagRulesClient getTagRules() { + return this.tagRules; } /** @@ -274,16 +292,17 @@ public MonitoredSubscriptionsClient getMonitoredSubscriptions() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2024-01-01"; + this.apiVersion = "2025-05-01-preview"; this.operations = new OperationsClientImpl(this); this.accounts = new AccountsClientImpl(this); + this.saaS = new SaaSClientImpl(this); this.monitors = new MonitorsClientImpl(this); this.organizations = new OrganizationsClientImpl(this); this.plans = new PlansClientImpl(this); this.billingInfoes = new BillingInfoesClientImpl(this); this.connectedPartnerResources = new ConnectedPartnerResourcesClientImpl(this); - this.tagRules = new TagRulesClientImpl(this); this.monitoredSubscriptions = new MonitoredSubscriptionsClientImpl(this); + this.tagRules = new TagRulesClientImpl(this); } /** @@ -323,6 +342,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result. + * @param type of final result. + * @return SyncPoller for poll result and final result. + */ + public SyncPoller, U> getLroResult(Response activationResponse, + Type pollResultType, Type finalResultType, Context context) { + return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, () -> activationResponse, context); + } + /** * Gets the final result, or an error, based on last async poll response. * diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OperationsClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OperationsClientImpl.java index 677c5fd1c791..37a12f0f1fd0 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OperationsClientImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OperationsClientImpl.java @@ -25,6 +25,7 @@ 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.resourcemanager.newrelicobservability.fluent.OperationsClient; import com.azure.resourcemanager.newrelicobservability.fluent.models.OperationInner; import com.azure.resourcemanager.newrelicobservability.models.OperationListResult; @@ -60,7 +61,7 @@ public final class OperationsClientImpl implements OperationsClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/NewRelic.Observability/operations") @@ -69,12 +70,26 @@ public interface OperationsService { Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/providers/NewRelic.Observability/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -103,24 +118,14 @@ private Mono> listSinglePageAsync() { /** * List the operations for the provider. * - * @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 a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -128,12 +133,20 @@ private Mono> listSinglePageAsync(Context context) * * @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 a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -143,13 +156,20 @@ private PagedFlux listAsync() { * @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 a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -162,7 +182,7 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** @@ -177,7 +197,7 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -206,6 +226,33 @@ private Mono> listNextSinglePageAsync(String nextL .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -214,22 +261,24 @@ private Mono> listNextSinglePageAsync(String nextL * @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 a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(OperationsClientImpl.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OrganizationsClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OrganizationsClientImpl.java index c566f056f48d..837afddfcf58 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OrganizationsClientImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/OrganizationsClientImpl.java @@ -25,6 +25,7 @@ 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.resourcemanager.newrelicobservability.fluent.OrganizationsClient; import com.azure.resourcemanager.newrelicobservability.fluent.models.OrganizationResourceInner; import com.azure.resourcemanager.newrelicobservability.models.OrganizationsListResponse; @@ -60,7 +61,7 @@ public final class OrganizationsClientImpl implements OrganizationsClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityOrganizations") public interface OrganizationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/organizations") @@ -71,6 +72,15 @@ Mono> list(@HostParam("$host") String endpoi @QueryParam("userEmail") String userEmail, @QueryParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/organizations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("userEmail") String userEmail, @QueryParam("location") String location, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -78,10 +88,18 @@ Mono> list(@HostParam("$host") String endpoi Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -117,61 +135,63 @@ private Mono> listSinglePageAsync(Strin } /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. - * @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 response of get all organizations Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return response of get all organizations Operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String userEmail, String location, - Context context) { - 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.")); - } - if (userEmail == null) { - return Mono.error(new IllegalArgumentException("Parameter userEmail is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), userEmail, - location, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String userEmail, String location) { + return new PagedFlux<>(() -> listSinglePageAsync(userEmail, location), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. * @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 response of get all organizations Operation as paginated response with {@link PagedFlux}. + * @return response of get all organizations Operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String userEmail, String location) { - return new PagedFlux<>(() -> listSinglePageAsync(userEmail, location), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String userEmail, String location) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (userEmail == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter userEmail is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), userEmail, location, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -179,16 +199,39 @@ private PagedFlux listAsync(String userEmail, String * @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 response of get all organizations Operation as paginated response with {@link PagedFlux}. + * @return response of get all organizations Operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String userEmail, String location, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(userEmail, location, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String userEmail, String location, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (userEmail == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter userEmail is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), userEmail, location, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -199,11 +242,12 @@ private PagedFlux listAsync(String userEmail, String */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String userEmail, String location) { - return new PagedIterable<>(listAsync(userEmail, location)); + return new PagedIterable<>(() -> listSinglePage(userEmail, location), nextLink -> listNextSinglePage(nextLink)); } /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -215,7 +259,8 @@ public PagedIterable list(String userEmail, String lo */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String userEmail, String location, Context context) { - return new PagedIterable<>(listAsync(userEmail, location, context)); + return new PagedIterable<>(() -> listSinglePage(userEmail, location, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -244,6 +289,33 @@ private Mono> listNextSinglePageAsync(S .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of get all organizations Operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -252,22 +324,25 @@ private Mono> listNextSinglePageAsync(S * @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 response of get all organizations Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return response of get all organizations Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(OrganizationsClientImpl.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/PlansClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/PlansClientImpl.java index 2f74169245a2..cdf38684d3c0 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/PlansClientImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/PlansClientImpl.java @@ -25,6 +25,7 @@ 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.resourcemanager.newrelicobservability.fluent.PlansClient; import com.azure.resourcemanager.newrelicobservability.fluent.models.PlanDataResourceInner; import com.azure.resourcemanager.newrelicobservability.models.PlanDataListResponse; @@ -59,7 +60,7 @@ public final class PlansClientImpl implements PlansClient { * REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityPlans") public interface PlansService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/plans") @@ -70,16 +71,32 @@ Mono> list(@HostParam("$host") String endpoint, @QueryParam("accountId") String accountId, @QueryParam("organizationId") String organizationId, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/plans") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("accountId") String accountId, @QueryParam("organizationId") String organizationId, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @param accountId Account Id. * @param organizationId Organization Id. @@ -109,39 +126,7 @@ private Mono> listSinglePageAsync(String ac } /** - * List plans data. - * - * @param accountId Account Id. - * @param organizationId Organization Id. - * @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 response of get all plan data Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String accountId, String organizationId, - Context context) { - 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 accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accountId, - organizationId, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @param accountId Account Id. * @param organizationId Organization Id. @@ -157,7 +142,7 @@ private PagedFlux listAsync(String accountId, String orga } /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -172,7 +157,36 @@ private PagedFlux listAsync() { } /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. + * + * @param accountId Account Id. + * @param organizationId Organization Id. + * @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 response of get all plan data Operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String accountId, String organizationId) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accountId, organizationId, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @param accountId Account Id. * @param organizationId Organization Id. @@ -180,16 +194,30 @@ private PagedFlux listAsync() { * @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 response of get all plan data Operation as paginated response with {@link PagedFlux}. + * @return response of get all plan data Operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String accountId, String organizationId, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(accountId, organizationId, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String accountId, String organizationId, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accountId, organizationId, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -199,11 +227,12 @@ private PagedFlux listAsync(String accountId, String orga public PagedIterable list() { final String accountId = null; final String organizationId = null; - return new PagedIterable<>(listAsync(accountId, organizationId)); + return new PagedIterable<>(() -> listSinglePage(accountId, organizationId), + nextLink -> listNextSinglePage(nextLink)); } /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @param accountId Account Id. * @param organizationId Organization Id. @@ -215,7 +244,8 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String accountId, String organizationId, Context context) { - return new PagedIterable<>(listAsync(accountId, organizationId, context)); + return new PagedIterable<>(() -> listSinglePage(accountId, organizationId, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -244,6 +274,33 @@ private Mono> listNextSinglePageAsync(Strin .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of get all plan data Operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -252,22 +309,24 @@ private Mono> listNextSinglePageAsync(Strin * @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 response of get all plan data Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return response of get all plan data Operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(PlansClientImpl.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSClientImpl.java new file mode 100644 index 000000000000..a99cb67a0daf --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSClientImpl.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +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.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.resourcemanager.newrelicobservability.fluent.SaaSClient; +import com.azure.resourcemanager.newrelicobservability.fluent.models.SaaSResourceDetailsResponseInner; +import com.azure.resourcemanager.newrelicobservability.models.ActivateSaaSParameterRequest; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SaaSClient. + */ +public final class SaaSClientImpl implements SaaSClient { + /** + * The proxy service used to perform REST calls. + */ + private final SaaSService service; + + /** + * The service client containing this operation class. + */ + private final NewRelicObservabilityImpl client; + + /** + * Initializes an instance of SaaSClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SaaSClientImpl(NewRelicObservabilityImpl client) { + this.service = RestProxy.create(SaaSService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NewRelicObservabilitySaaS to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "NewRelicObservabilitySaaS") + public interface SaaSService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/activateSaaS") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> activateResource(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") ActivateSaaSParameterRequest request, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/NewRelic.Observability/activateSaaS") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response activateResourceSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") ActivateSaaSParameterRequest request, @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Resolve the token to get the SaaS resource ID and activate the SaaS resource. + * + * @param request The request body. + * @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 marketplace SaaS resource details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + activateResourceWithResponseAsync(ActivateSaaSParameterRequest request) { + 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.")); + } + if (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.activateResource(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), request, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Resolve the token to get the SaaS resource ID and activate the SaaS resource. + * + * @param request The request body. + * @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 marketplace SaaS resource details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono activateResourceAsync(ActivateSaaSParameterRequest request) { + return activateResourceWithResponseAsync(request).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Resolve the token to get the SaaS resource ID and activate the SaaS resource. + * + * @param request The request body. + * @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 marketplace SaaS resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response activateResourceWithResponse(ActivateSaaSParameterRequest request, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (request == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return service.activateResourceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), request, accept, context); + } + + /** + * Resolve the token to get the SaaS resource ID and activate the SaaS resource. + * + * @param request The request body. + * @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 marketplace SaaS resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SaaSResourceDetailsResponseInner activateResource(ActivateSaaSParameterRequest request) { + return activateResourceWithResponse(request, Context.NONE).getValue(); + } + + private static final ClientLogger LOGGER = new ClientLogger(SaaSClientImpl.class); +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSImpl.java new file mode 100644 index 000000000000..3ca44b9fec4f --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSImpl.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.newrelicobservability.fluent.SaaSClient; +import com.azure.resourcemanager.newrelicobservability.fluent.models.SaaSResourceDetailsResponseInner; +import com.azure.resourcemanager.newrelicobservability.models.ActivateSaaSParameterRequest; +import com.azure.resourcemanager.newrelicobservability.models.SaaS; +import com.azure.resourcemanager.newrelicobservability.models.SaaSResourceDetailsResponse; + +public final class SaaSImpl implements SaaS { + private static final ClientLogger LOGGER = new ClientLogger(SaaSImpl.class); + + private final SaaSClient innerClient; + + private final com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager; + + public SaaSImpl(SaaSClient innerClient, + com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response activateResourceWithResponse(ActivateSaaSParameterRequest request, + Context context) { + Response inner + = this.serviceClient().activateResourceWithResponse(request, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SaaSResourceDetailsResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SaaSResourceDetailsResponse activateResource(ActivateSaaSParameterRequest request) { + SaaSResourceDetailsResponseInner inner = this.serviceClient().activateResource(request); + if (inner != null) { + return new SaaSResourceDetailsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private SaaSClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSResourceDetailsResponseImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSResourceDetailsResponseImpl.java new file mode 100644 index 000000000000..0ec75f80b4f7 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/SaaSResourceDetailsResponseImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.newrelicobservability.fluent.models.SaaSResourceDetailsResponseInner; +import com.azure.resourcemanager.newrelicobservability.models.SaaSResourceDetailsResponse; + +public final class SaaSResourceDetailsResponseImpl implements SaaSResourceDetailsResponse { + private SaaSResourceDetailsResponseInner innerObject; + + private final com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager; + + SaaSResourceDetailsResponseImpl(SaaSResourceDetailsResponseInner innerObject, + com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String saasId() { + return this.innerModel().saasId(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public SaaSResourceDetailsResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRuleImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRuleImpl.java index 3bf70202a68e..7aa55be22f40 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRuleImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRuleImpl.java @@ -166,6 +166,6 @@ public TagRuleImpl withMetricRules(MetricRulesInner metricRules) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRulesClientImpl.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRulesClientImpl.java index 54daa8f39d7a..2bfd926d1829 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRulesClientImpl.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/implementation/TagRulesClientImpl.java @@ -28,8 +28,10 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.newrelicobservability.fluent.TagRulesClient; @@ -69,7 +71,7 @@ public final class TagRulesClientImpl implements TagRulesClient { * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "NewRelicObservabilit") + @ServiceInterface(name = "NewRelicObservabilityTagRules") public interface TagRulesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules") @@ -80,6 +82,15 @@ Mono> listByNewRelicMonitorResource(@HostParam("$hos @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByNewRelicMonitorResourceSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") @ExpectedResponses({ 200 }) @@ -89,6 +100,15 @@ Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @PathParam("ruleSetName") String ruleSetName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("ruleSetName") String ruleSetName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") @ExpectedResponses({ 200, 201 }) @@ -100,13 +120,14 @@ Mono>> createOrUpdate(@HostParam("$host") String endpo @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") - @ExpectedResponses({ 200, 202, 204 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, - @PathParam("ruleSetName") String ruleSetName, @HeaderParam("Accept") String accept, Context context); + @PathParam("ruleSetName") String ruleSetName, @BodyParam("application/json") TagRuleInner resource, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") @@ -118,6 +139,34 @@ Mono> update(@HostParam("$host") String endpoint, @PathParam("ruleSetName") String ruleSetName, @BodyParam("application/json") TagRuleUpdateInner properties, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("ruleSetName") String ruleSetName, @BodyParam("application/json") TagRuleUpdateInner properties, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("ruleSetName") String ruleSetName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("ruleSetName") String ruleSetName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -125,10 +174,19 @@ Mono> update(@HostParam("$host") String endpoint, Mono> listByNewRelicMonitorResourceNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByNewRelicMonitorResourceNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -167,62 +225,65 @@ private Mono> listByNewRelicMonitorResourceSinglePag } /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @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 response of a TagRule list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a TagRule list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNewRelicMonitorResourceSinglePageAsync(String resourceGroupName, - String monitorName, Context context) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByNewRelicMonitorResource(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNewRelicMonitorResourceAsync(String resourceGroupName, String monitorName) { + return new PagedFlux<>(() -> listByNewRelicMonitorResourceSinglePageAsync(resourceGroupName, monitorName), + nextLink -> listByNewRelicMonitorResourceNextSinglePageAsync(nextLink)); } /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @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 response of a TagRule list operation as paginated response with {@link PagedFlux}. + * @return the response of a TagRule list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNewRelicMonitorResourceAsync(String resourceGroupName, String monitorName) { - return new PagedFlux<>(() -> listByNewRelicMonitorResourceSinglePageAsync(resourceGroupName, monitorName), - nextLink -> listByNewRelicMonitorResourceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNewRelicMonitorResourceSinglePage(String resourceGroupName, + String monitorName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByNewRelicMonitorResourceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -230,18 +291,40 @@ private PagedFlux listByNewRelicMonitorResourceAsync(String resour * @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 response of a TagRule list operation as paginated response with {@link PagedFlux}. + * @return the response of a TagRule list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNewRelicMonitorResourceAsync(String resourceGroupName, String monitorName, - Context context) { - return new PagedFlux<>( - () -> listByNewRelicMonitorResourceSinglePageAsync(resourceGroupName, monitorName, context), - nextLink -> listByNewRelicMonitorResourceNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNewRelicMonitorResourceSinglePage(String resourceGroupName, + String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByNewRelicMonitorResourceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -252,11 +335,13 @@ private PagedFlux listByNewRelicMonitorResourceAsync(String resour */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNewRelicMonitorResource(String resourceGroupName, String monitorName) { - return new PagedIterable<>(listByNewRelicMonitorResourceAsync(resourceGroupName, monitorName)); + return new PagedIterable<>(() -> listByNewRelicMonitorResourceSinglePage(resourceGroupName, monitorName), + nextLink -> listByNewRelicMonitorResourceNextSinglePage(nextLink)); } /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -269,11 +354,14 @@ public PagedIterable listByNewRelicMonitorResource(String resource @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByNewRelicMonitorResource(String resourceGroupName, String monitorName, Context context) { - return new PagedIterable<>(listByNewRelicMonitorResourceAsync(resourceGroupName, monitorName, context)); + return new PagedIterable<>( + () -> listByNewRelicMonitorResourceSinglePage(resourceGroupName, monitorName, context), + nextLink -> listByNewRelicMonitorResourceNextSinglePage(nextLink, context)); } /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -281,7 +369,8 @@ public PagedIterable listByNewRelicMonitorResource(String resource * @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 a TagRule along with {@link Response} on successful completion of {@link Mono}. + * @return a tag rule belonging to NewRelic account along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, @@ -312,46 +401,8 @@ private Mono> getWithResponseAsync(String resourceGroupNa } /** - * Get a TagRule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Name of the Monitors resource. - * @param ruleSetName Name of the TagRule. - * @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 a TagRule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, - String ruleSetName, Context context) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - if (ruleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, ruleSetName, accept, context); - } - - /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -359,7 +410,7 @@ private Mono> getWithResponseAsync(String resourceGroupNa * @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 a TagRule on successful completion of {@link Mono}. + * @return a tag rule belonging to NewRelic account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String monitorName, String ruleSetName) { @@ -368,7 +419,8 @@ private Mono getAsync(String resourceGroupName, String monitorName } /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -377,16 +429,41 @@ private Mono getAsync(String resourceGroupName, String monitorName * @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 a TagRule along with {@link Response}. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String monitorName, String ruleSetName, Context context) { - return getWithResponseAsync(resourceGroupName, monitorName, ruleSetName, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, ruleSetName, accept, context); } /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -394,7 +471,7 @@ public Response getWithResponse(String resourceGroupName, String m * @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 a TagRule. + * @return a tag rule belonging to NewRelic account. */ @ServiceMethod(returns = ReturnType.SINGLE) public TagRuleInner get(String resourceGroupName, String monitorName, String ruleSetName) { @@ -402,7 +479,8 @@ public TagRuleInner get(String resourceGroupName, String monitorName, String rul } /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -449,80 +527,113 @@ private Mono>> createOrUpdateWithResponseAsync(String } /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. * @param resource Resource create parameters. - * @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 a tag rule belonging to NewRelic account along with {@link Response} on successful completion of - * {@link Mono}. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String monitorName, String ruleSetName, TagRuleInner resource, Context context) { + private Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + String ruleSetName, TagRuleInner resource) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); } if (ruleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); } if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); } else { resource.validate(); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, resource, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, resource, accept, + Context.NONE); } /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. * @param resource Resource create parameters. + * @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 {@link PollerFlux} for polling of a tag rule belonging to NewRelic account. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, TagRuleInner> beginCreateOrUpdateAsync(String resourceGroupName, - String monitorName, String ruleSetName, TagRuleInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - TagRuleInner.class, TagRuleInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + String ruleSetName, TagRuleInner resource, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, resource, accept, context); } /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. * @param resource Resource create parameters. - * @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. @@ -530,16 +641,16 @@ private PollerFlux, TagRuleInner> beginCreateOrUpdateAs */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, TagRuleInner> beginCreateOrUpdateAsync(String resourceGroupName, - String monitorName, String ruleSetName, TagRuleInner resource, Context context) { - context = this.client.mergeContext(context); + String monitorName, String ruleSetName, TagRuleInner resource) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, resource, context); + = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, resource); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - TagRuleInner.class, TagRuleInner.class, context); + TagRuleInner.class, TagRuleInner.class, this.client.getContext()); } /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -553,11 +664,15 @@ private PollerFlux, TagRuleInner> beginCreateOrUpdateAs @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TagRuleInner> beginCreateOrUpdate(String resourceGroupName, String monitorName, String ruleSetName, TagRuleInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, monitorName, ruleSetName, resource).getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, monitorName, ruleSetName, resource); + return this.client.getLroResult(response, TagRuleInner.class, TagRuleInner.class, + Context.NONE); } /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -572,12 +687,15 @@ public SyncPoller, TagRuleInner> beginCreateOrUpdate(St @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TagRuleInner> beginCreateOrUpdate(String resourceGroupName, String monitorName, String ruleSetName, TagRuleInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, monitorName, ruleSetName, resource, context) - .getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, monitorName, ruleSetName, resource, context); + return this.client.getLroResult(response, TagRuleInner.class, TagRuleInner.class, + context); } /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -596,27 +714,8 @@ private Mono createOrUpdateAsync(String resourceGroupName, String } /** - * Create a TagRule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Name of the Monitors resource. - * @param ruleSetName Name of the TagRule. - * @param resource Resource create parameters. - * @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 a tag rule belonging to NewRelic account on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String monitorName, String ruleSetName, - TagRuleInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, monitorName, ruleSetName, resource, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -630,11 +729,12 @@ private Mono createOrUpdateAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public TagRuleInner createOrUpdate(String resourceGroupName, String monitorName, String ruleSetName, TagRuleInner resource) { - return createOrUpdateAsync(resourceGroupName, monitorName, ruleSetName, resource).block(); + return beginCreateOrUpdate(resourceGroupName, monitorName, ruleSetName, resource).getFinalResult(); } /** - * Create a TagRule. + * Creates a new set of tag rules for a specific New Relic monitor resource, determining which Azure resources are + * monitored based on their tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -649,23 +749,26 @@ public TagRuleInner createOrUpdate(String resourceGroupName, String monitorName, @ServiceMethod(returns = ReturnType.SINGLE) public TagRuleInner createOrUpdate(String resourceGroupName, String monitorName, String ruleSetName, TagRuleInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, monitorName, ruleSetName, resource, context).block(); + return beginCreateOrUpdate(resourceGroupName, monitorName, ruleSetName, resource, context).getFinalResult(); } /** - * Delete a TagRule. + * Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control + * which Azure resources are monitored. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. + * @param properties The resource properties to 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 the {@link Response} on successful completion of {@link Mono}. + * @return a tag rule belonging to NewRelic account along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName, - String ruleSetName) { + private Mono> updateWithResponseAsync(String resourceGroupName, String monitorName, + String ruleSetName, TagRuleUpdateInner properties) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -684,130 +787,109 @@ private Mono>> deleteWithResponseAsync(String resource if (ruleSetName == null) { return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, properties, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a TagRule. + * Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control + * which Azure resources are monitored. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. - * @param context The context to associate with this operation. + * @param properties The resource properties to 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 the {@link Response} on successful completion of {@link Mono}. + * @return a tag rule belonging to NewRelic account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName, - String ruleSetName, Context context) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - if (ruleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, ruleSetName, accept, context); - } - - /** - * Delete a TagRule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Name of the Monitors resource. - * @param ruleSetName Name of the TagRule. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, - String ruleSetName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, monitorName, ruleSetName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + private Mono updateAsync(String resourceGroupName, String monitorName, String ruleSetName, + TagRuleUpdateInner properties) { + return updateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Delete a TagRule. + * Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control + * which Azure resources are monitored. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. + * @param properties The resource properties to 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 the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, - String ruleSetName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, monitorName, ruleSetName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a TagRule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Name of the Monitors resource. - * @param ruleSetName Name of the TagRule. - * @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 {@link SyncPoller} for polling of long-running operation. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, - String ruleSetName) { - return this.beginDeleteAsync(resourceGroupName, monitorName, ruleSetName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + TagRuleUpdateInner properties, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, properties, accept, context); } /** - * Delete a TagRule. + * Updates the tag rules for a specific New Relic monitor resource, allowing you to modify the rules that control + * which Azure resources are monitored. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. - * @param context The context to associate with this operation. + * @param properties The resource properties to 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 the {@link SyncPoller} for polling of long-running operation. + * @return a tag rule belonging to NewRelic account. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, - String ruleSetName, Context context) { - return this.beginDeleteAsync(resourceGroupName, monitorName, ruleSetName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public TagRuleInner update(String resourceGroupName, String monitorName, String ruleSetName, + TagRuleUpdateInner properties) { + return updateWithResponse(resourceGroupName, monitorName, ruleSetName, properties, Context.NONE).getValue(); } /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -815,208 +897,228 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @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 A {@link Mono} that completes when a successful response is received. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String monitorName, String ruleSetName) { - return beginDeleteAsync(resourceGroupName, monitorName, ruleSetName).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName, + String ruleSetName) { + 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.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. - * @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 A {@link Mono} that completes when a successful response is received. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String monitorName, String ruleSetName, Context context) { - return beginDeleteAsync(resourceGroupName, monitorName, ruleSetName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response deleteWithResponse(String resourceGroupName, String monitorName, String ruleSetName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, accept, Context.NONE); } /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. + * @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 response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String monitorName, String ruleSetName) { - deleteAsync(resourceGroupName, monitorName, ruleSetName).block(); + private Response deleteWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + if (ruleSetName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, accept, context); } /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. - * @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 {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String monitorName, String ruleSetName, Context context) { - deleteAsync(resourceGroupName, monitorName, ruleSetName, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, + String ruleSetName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, monitorName, ruleSetName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Update a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. - * @param properties The resource properties to 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 a tag rule belonging to NewRelic account along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String monitorName, - String ruleSetName, TagRuleUpdateInner properties) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - if (ruleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, monitorName, ruleSetName, properties, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, + String ruleSetName) { + Response response = deleteWithResponse(resourceGroupName, monitorName, ruleSetName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. - * @param properties The resource properties to 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 a tag rule belonging to NewRelic account along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String monitorName, - String ruleSetName, TagRuleUpdateInner properties, Context context) { - 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.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - if (ruleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, monitorName, ruleSetName, properties, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, + String ruleSetName, Context context) { + Response response = deleteWithResponse(resourceGroupName, monitorName, ruleSetName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. - * @param properties The resource properties to 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 a tag rule belonging to NewRelic account on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String monitorName, String ruleSetName, - TagRuleUpdateInner properties) { - return updateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, properties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono deleteAsync(String resourceGroupName, String monitorName, String ruleSetName) { + return beginDeleteAsync(resourceGroupName, monitorName, ruleSetName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Update a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. - * @param properties The resource properties to 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 a tag rule belonging to NewRelic account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String monitorName, String ruleSetName, - TagRuleUpdateInner properties, Context context) { - return updateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, properties, context).block(); + public void delete(String resourceGroupName, String monitorName, String ruleSetName) { + beginDelete(resourceGroupName, monitorName, ruleSetName).getFinalResult(); } /** - * Update a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param ruleSetName Name of the TagRule. - * @param properties The resource properties to 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 a tag rule belonging to NewRelic account. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TagRuleInner update(String resourceGroupName, String monitorName, String ruleSetName, - TagRuleUpdateInner properties) { - return updateWithResponse(resourceGroupName, monitorName, ruleSetName, properties, Context.NONE).getValue(); + public void delete(String resourceGroupName, String monitorName, String ruleSetName, Context context) { + beginDelete(resourceGroupName, monitorName, ruleSetName, context).getFinalResult(); } /** @@ -1046,6 +1148,33 @@ private Mono> listByNewRelicMonitorResourceNextSingl .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of a TagRule list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByNewRelicMonitorResourceNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByNewRelicMonitorResourceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1054,23 +1183,25 @@ private Mono> listByNewRelicMonitorResourceNextSingl * @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 response of a TagRule list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a TagRule list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNewRelicMonitorResourceNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listByNewRelicMonitorResourceNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByNewRelicMonitorResourceNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByNewRelicMonitorResourceNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(TagRulesClientImpl.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AccountInfo.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AccountInfo.java index 00cbaac977b3..e4175cc2f974 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AccountInfo.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AccountInfo.java @@ -22,7 +22,7 @@ public final class AccountInfo implements JsonSerializable { private String accountId; /* - * ingestion key of account + * Credential string. */ private String ingestionKey; @@ -58,7 +58,7 @@ public AccountInfo withAccountId(String accountId) { } /** - * Get the ingestionKey property: ingestion key of account. + * Get the ingestionKey property: Credential string. * * @return the ingestionKey value. */ @@ -67,7 +67,7 @@ public String ingestionKey() { } /** - * Set the ingestionKey property: ingestion key of account. + * Set the ingestionKey property: Credential string. * * @param ingestionKey the ingestionKey value to set. * @return the AccountInfo object itself. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Accounts.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Accounts.java index ded2222f68a8..f5b05c224029 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Accounts.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Accounts.java @@ -12,7 +12,8 @@ */ public interface Accounts { /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -24,7 +25,8 @@ public interface Accounts { PagedIterable list(String userEmail, String location); /** - * List all the existing accounts. + * Lists all the New Relic accounts linked to your email address, helping you understand the existing accounts that + * have been created. * * @param userEmail User Email. * @param location Location for NewRelic. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ActivateSaaSParameterRequest.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ActivateSaaSParameterRequest.java new file mode 100644 index 000000000000..345489bed89e --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ActivateSaaSParameterRequest.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * SaaS guid & PublishedId for Activate and Validate SaaS Resource. + */ +@Fluent +public final class ActivateSaaSParameterRequest implements JsonSerializable { + /* + * SaaS guid for Activate and Validate SaaS Resource + */ + private String saasGuid; + + /* + * Publisher Id for NewRelic resource + */ + private String publisherId; + + /** + * Creates an instance of ActivateSaaSParameterRequest class. + */ + public ActivateSaaSParameterRequest() { + } + + /** + * Get the saasGuid property: SaaS guid for Activate and Validate SaaS Resource. + * + * @return the saasGuid value. + */ + public String saasGuid() { + return this.saasGuid; + } + + /** + * Set the saasGuid property: SaaS guid for Activate and Validate SaaS Resource. + * + * @param saasGuid the saasGuid value to set. + * @return the ActivateSaaSParameterRequest object itself. + */ + public ActivateSaaSParameterRequest withSaasGuid(String saasGuid) { + this.saasGuid = saasGuid; + return this; + } + + /** + * Get the publisherId property: Publisher Id for NewRelic resource. + * + * @return the publisherId value. + */ + public String publisherId() { + return this.publisherId; + } + + /** + * Set the publisherId property: Publisher Id for NewRelic resource. + * + * @param publisherId the publisherId value to set. + * @return the ActivateSaaSParameterRequest object itself. + */ + public ActivateSaaSParameterRequest withPublisherId(String publisherId) { + this.publisherId = publisherId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (saasGuid() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property saasGuid in model ActivateSaaSParameterRequest")); + } + if (publisherId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property publisherId in model ActivateSaaSParameterRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ActivateSaaSParameterRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("saasGuid", this.saasGuid); + jsonWriter.writeStringField("publisherId", this.publisherId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActivateSaaSParameterRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActivateSaaSParameterRequest if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ActivateSaaSParameterRequest. + */ + public static ActivateSaaSParameterRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActivateSaaSParameterRequest deserializedActivateSaaSParameterRequest = new ActivateSaaSParameterRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("saasGuid".equals(fieldName)) { + deserializedActivateSaaSParameterRequest.saasGuid = reader.getString(); + } else if ("publisherId".equals(fieldName)) { + deserializedActivateSaaSParameterRequest.publisherId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedActivateSaaSParameterRequest; + }); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AppServicesGetRequest.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AppServicesGetRequest.java index f9ffd7d72560..dfeabab0e7e6 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AppServicesGetRequest.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/AppServicesGetRequest.java @@ -24,7 +24,7 @@ public final class AppServicesGetRequest implements JsonSerializable azureResourceIds; /* - * User Email + * Reusable representation of an email address */ private String userEmail; @@ -55,7 +55,7 @@ public AppServicesGetRequest withAzureResourceIds(List azureResourceIds) } /** - * Get the userEmail property: User Email. + * Get the userEmail property: Reusable representation of an email address. * * @return the userEmail value. */ @@ -64,7 +64,7 @@ public String userEmail() { } /** - * Set the userEmail property: User Email. + * Set the userEmail property: Reusable representation of an email address. * * @param userEmail the userEmail value to set. * @return the AppServicesGetRequest object itself. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/BillingCycle.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/BillingCycle.java deleted file mode 100644 index feebfc64e425..000000000000 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/BillingCycle.java +++ /dev/null @@ -1,56 +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.resourcemanager.newrelicobservability.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Different usage type like YEARLY/MONTHLY. - */ -public final class BillingCycle extends ExpandableStringEnum { - /** - * Static value YEARLY for BillingCycle. - */ - public static final BillingCycle YEARLY = fromString("YEARLY"); - - /** - * Static value MONTHLY for BillingCycle. - */ - public static final BillingCycle MONTHLY = fromString("MONTHLY"); - - /** - * Static value WEEKLY for BillingCycle. - */ - public static final BillingCycle WEEKLY = fromString("WEEKLY"); - - /** - * Creates a new instance of BillingCycle value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BillingCycle() { - } - - /** - * Creates or finds a BillingCycle from its string representation. - * - * @param name a name to look for. - * @return the corresponding BillingCycle. - */ - public static BillingCycle fromString(String name) { - return fromString(name, BillingCycle.class); - } - - /** - * Gets known BillingCycle values. - * - * @return known BillingCycle values. - */ - public static Collection values() { - return values(BillingCycle.class); - } -} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/BillingInfoes.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/BillingInfoes.java index 16ae0506b26f..8338a5d72fd3 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/BillingInfoes.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/BillingInfoes.java @@ -12,7 +12,9 @@ */ public interface BillingInfoes { /** - * Get marketplace info mapped to the given monitor. + * Retrieves marketplace and organization information mapped to the given New Relic monitor resource + * + * A synchronous resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -20,19 +22,22 @@ public interface BillingInfoes { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return marketplace info mapped to the given monitor along with {@link Response}. + * @return marketplace Subscription and Organization details to which resource gets billed into along with + * {@link Response}. */ Response getWithResponse(String resourceGroupName, String monitorName, Context context); /** - * Get marketplace info mapped to the given monitor. + * Retrieves marketplace and organization information mapped to the given New Relic monitor resource + * + * A synchronous resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return marketplace info mapped to the given monitor. + * @return marketplace Subscription and Organization details to which resource gets billed into. */ BillingInfoResponse get(String resourceGroupName, String monitorName); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ConnectedPartnerResources.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ConnectedPartnerResources.java index 43e14ff91e51..ce50c123c28a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ConnectedPartnerResources.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ConnectedPartnerResources.java @@ -14,6 +14,8 @@ public interface ConnectedPartnerResources { /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -26,6 +28,8 @@ public interface ConnectedPartnerResources { /** * List of all active deployments that are associated with the marketplace subscription linked to the given monitor. * + * A synchronous resource action. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @param body Email Id of the user. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ConnectedPartnerResourcesListResponse.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ConnectedPartnerResourcesListResponse.java index 7d481faf8208..2721e2fd0d06 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ConnectedPartnerResourcesListResponse.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ConnectedPartnerResourcesListResponse.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.newrelicobservability.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,12 +21,12 @@ public final class ConnectedPartnerResourcesListResponse implements JsonSerializable { /* - * Results of a list operation. + * The ConnectedPartnerResourcesListFormat items on this page */ private List value; /* - * Link to the next set of results, if any. + * The link to the next page of items */ private String nextLink; @@ -36,7 +37,7 @@ public ConnectedPartnerResourcesListResponse() { } /** - * Get the value property: Results of a list operation. + * Get the value property: The ConnectedPartnerResourcesListFormat items on this page. * * @return the value value. */ @@ -45,7 +46,7 @@ public List value() { } /** - * Set the value property: Results of a list operation. + * Set the value property: The ConnectedPartnerResourcesListFormat items on this page. * * @param value the value value to set. * @return the ConnectedPartnerResourcesListResponse object itself. @@ -56,7 +57,7 @@ public ConnectedPartnerResourcesListResponse withValue(List e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ConnectedPartnerResourcesListResponse.class); + /** * {@inheritDoc} */ @@ -103,6 +110,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ConnectedPartnerResourcesListResponse if the JsonReader was pointing to an instance of it, * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ConnectedPartnerResourcesListResponse. */ public static ConnectedPartnerResourcesListResponse fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/HostsGetRequest.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/HostsGetRequest.java index 2e2ee7fe1d1e..56f672493a74 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/HostsGetRequest.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/HostsGetRequest.java @@ -24,7 +24,7 @@ public final class HostsGetRequest implements JsonSerializable private List vmIds; /* - * User Email + * Reusable representation of an email address */ private String userEmail; @@ -55,7 +55,7 @@ public HostsGetRequest withVmIds(List vmIds) { } /** - * Get the userEmail property: User Email. + * Get the userEmail property: Reusable representation of an email address. * * @return the userEmail value. */ @@ -64,7 +64,7 @@ public String userEmail() { } /** - * Set the userEmail property: User Email. + * Set the userEmail property: Reusable representation of an email address. * * @param userEmail the userEmail value to set. * @return the HostsGetRequest object itself. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/LatestLinkedSaaSResponse.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/LatestLinkedSaaSResponse.java new file mode 100644 index 000000000000..3dd52d39c82a --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/LatestLinkedSaaSResponse.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.models; + +import com.azure.resourcemanager.newrelicobservability.fluent.models.LatestLinkedSaaSResponseInner; + +/** + * An immutable client-side representation of LatestLinkedSaaSResponse. + */ +public interface LatestLinkedSaaSResponse { + /** + * Gets the saaSResourceId property: SaaS resource id. + * + * @return the saaSResourceId value. + */ + String saaSResourceId(); + + /** + * Gets the isHiddenSaaS property: Flag indicating if the SaaS resource is hidden. + * + * @return the isHiddenSaaS value. + */ + Boolean isHiddenSaaS(); + + /** + * Gets the inner com.azure.resourcemanager.newrelicobservability.fluent.models.LatestLinkedSaaSResponseInner + * object. + * + * @return the inner object. + */ + LatestLinkedSaaSResponseInner innerModel(); +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/LinkedResourceListResponse.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/LinkedResourceListResponse.java index aae3ce0d7903..0a4f855a8d3f 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/LinkedResourceListResponse.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/LinkedResourceListResponse.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.newrelicobservability.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,12 +20,12 @@ @Fluent public final class LinkedResourceListResponse implements JsonSerializable { /* - * Results of a list operation. + * The LinkedResource items on this page */ private List value; /* - * Link to the next set of results, if any. + * The link to the next page of items */ private String nextLink; @@ -35,7 +36,7 @@ public LinkedResourceListResponse() { } /** - * Get the value property: Results of a list operation. + * Get the value property: The LinkedResource items on this page. * * @return the value value. */ @@ -44,7 +45,7 @@ public List value() { } /** - * Set the value property: Results of a list operation. + * Set the value property: The LinkedResource items on this page. * * @param value the value value to set. * @return the LinkedResourceListResponse object itself. @@ -55,7 +56,7 @@ public LinkedResourceListResponse withValue(List value) { } /** - * Get the nextLink property: Link to the next set of results, if any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -64,7 +65,7 @@ public String nextLink() { } /** - * Set the nextLink property: Link to the next set of results, if any. + * Set the nextLink property: The link to the next page of items. * * @param nextLink the nextLink value to set. * @return the LinkedResourceListResponse object itself. @@ -80,11 +81,17 @@ public LinkedResourceListResponse withNextLink(String nextLink) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model LinkedResourceListResponse")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(LinkedResourceListResponse.class); + /** * {@inheritDoc} */ @@ -102,6 +109,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of LinkedResourceListResponse if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the LinkedResourceListResponse. */ public static LinkedResourceListResponse fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ManagedServiceIdentityType.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ManagedServiceIdentityType.java index f99582aab2d5..b676c3a46261 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ManagedServiceIdentityType.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ManagedServiceIdentityType.java @@ -27,10 +27,10 @@ public final class ManagedServiceIdentityType extends ExpandableStringEnum filteringTags(); /** - * Gets the userEmail property: User Email. + * Gets the userEmail property: Reusable representation of an email address. * * @return the userEmail value. */ diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsRequest.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsRequest.java index 828a11625efb..41be92f4d225 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsRequest.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsRequest.java @@ -18,7 +18,7 @@ @Fluent public final class MetricsRequest implements JsonSerializable { /* - * User Email + * Reusable representation of an email address */ private String userEmail; @@ -29,7 +29,7 @@ public MetricsRequest() { } /** - * Get the userEmail property: User Email. + * Get the userEmail property: Reusable representation of an email address. * * @return the userEmail value. */ @@ -38,7 +38,7 @@ public String userEmail() { } /** - * Set the userEmail property: User Email. + * Set the userEmail property: Reusable representation of an email address. * * @param userEmail the userEmail value to set. * @return the MetricsRequest object itself. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsStatusRequest.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsStatusRequest.java index fa78a76607e5..2f91207f0111 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsStatusRequest.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MetricsStatusRequest.java @@ -24,7 +24,7 @@ public final class MetricsStatusRequest implements JsonSerializable azureResourceIds; /* - * User Email + * Reusable representation of an email address */ private String userEmail; @@ -55,7 +55,7 @@ public MetricsStatusRequest withAzureResourceIds(List azureResourceIds) } /** - * Get the userEmail property: User Email. + * Get the userEmail property: Reusable representation of an email address. * * @return the userEmail value. */ @@ -64,7 +64,7 @@ public String userEmail() { } /** - * Set the userEmail property: User Email. + * Set the userEmail property: Reusable representation of an email address. * * @param userEmail the userEmail value to set. * @return the MetricsStatusRequest object itself. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptionProperties.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptionProperties.java index 45a7565b4328..a7a06db01d72 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptionProperties.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptionProperties.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.newrelicobservability.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.newrelicobservability.fluent.models.MonitoredSubscriptionPropertiesInner; @@ -40,6 +41,13 @@ public interface MonitoredSubscriptionProperties { */ SubscriptionList properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the name of the resource group. * diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptionPropertiesList.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptionPropertiesList.java index 2ad12d3124ef..8edd668a69ec 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptionPropertiesList.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptionPropertiesList.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.newrelicobservability.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,13 +15,13 @@ import java.util.List; /** - * The MonitoredSubscriptionPropertiesList model. + * Paged collection of MonitoredSubscriptionProperties items. */ @Fluent public final class MonitoredSubscriptionPropertiesList implements JsonSerializable { /* - * The value property. + * The MonitoredSubscriptionProperties items on this page */ private List value; @@ -36,7 +37,7 @@ public MonitoredSubscriptionPropertiesList() { } /** - * Get the value property: The value property. + * Get the value property: The MonitoredSubscriptionProperties items on this page. * * @return the value value. */ @@ -45,7 +46,7 @@ public List value() { } /** - * Set the value property: The value property. + * Set the value property: The MonitoredSubscriptionProperties items on this page. * * @param value the value value to set. * @return the MonitoredSubscriptionPropertiesList object itself. @@ -81,11 +82,17 @@ public MonitoredSubscriptionPropertiesList withNextLink(String nextLink) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model MonitoredSubscriptionPropertiesList")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(MonitoredSubscriptionPropertiesList.class); + /** * {@inheritDoc} */ @@ -103,6 +110,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of MonitoredSubscriptionPropertiesList if the JsonReader was pointing to an instance of it, * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the MonitoredSubscriptionPropertiesList. */ public static MonitoredSubscriptionPropertiesList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptions.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptions.java index ca59ee5b8b01..75ab3fabcc80 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptions.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitoredSubscriptions.java @@ -13,19 +13,24 @@ */ public interface MonitoredSubscriptions { /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 paginated response with {@link PagedIterable}. + * @return paged collection of MonitoredSubscriptionProperties items as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String monitorName); /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * List MonitoredSubscriptionProperties resources by NewRelicMonitorResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -33,12 +38,15 @@ public interface MonitoredSubscriptions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 paginated response with {@link PagedIterable}. + * @return paged collection of MonitoredSubscriptionProperties items as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String monitorName, Context context); /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -47,14 +55,15 @@ public interface MonitoredSubscriptions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response}. + * @return a MonitoredSubscriptionProperties along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String monitorName, ConfigurationName configurationName, Context context); /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -62,13 +71,16 @@ Response getWithResponse(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 request to update subscriptions needed to be monitored by the NewRelic monitor resource. + * @return a MonitoredSubscriptionProperties. */ MonitoredSubscriptionProperties get(String resourceGroupName, String monitorName, ConfigurationName configurationName); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -80,7 +92,10 @@ MonitoredSubscriptionProperties get(String resourceGroupName, String monitorName void delete(String resourceGroupName, String monitorName, ConfigurationName configurationName); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -93,32 +108,37 @@ MonitoredSubscriptionProperties get(String resourceGroupName, String monitorName void delete(String resourceGroupName, String monitorName, ConfigurationName configurationName, Context context); /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response}. + * @return a MonitoredSubscriptionProperties along with {@link Response}. */ MonitoredSubscriptionProperties getById(String id); /** - * List the subscriptions currently being monitored by the NewRelic monitor resource. + * Lists all the subscriptions currently being monitored by the NewRelic monitor resource. + * + * Get a MonitoredSubscriptionProperties. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 request to update subscriptions needed to be monitored by the NewRelic monitor resource along with - * {@link Response}. + * @return a MonitoredSubscriptionProperties along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -128,7 +148,10 @@ MonitoredSubscriptionProperties get(String resourceGroupName, String monitorName void deleteById(String id); /** - * Updates the subscriptions that are being monitored by the NewRelic monitor resource. + * Delete subscriptions being monitored by the New Relic monitor resource, removing their observability and + * monitoring capabilities + * + * Delete a MonitoredSubscriptionProperties. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Monitors.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Monitors.java index 726947bd0e70..41f5dd9b4c28 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Monitors.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Monitors.java @@ -13,7 +13,7 @@ */ public interface Monitors { /** - * List NewRelicMonitorResource resources by subscription ID. + * Lists all New Relic monitor resources either within a specific subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -23,7 +23,7 @@ public interface Monitors { PagedIterable list(); /** - * List NewRelicMonitorResource resources by subscription ID. + * Lists all New Relic monitor resources either within a specific subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -35,7 +35,7 @@ public interface Monitors { PagedIterable list(Context context); /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,7 +47,7 @@ public interface Monitors { PagedIterable listByResourceGroup(String resourceGroupName); /** - * List NewRelicMonitorResource resources by resource group. + * Retrieves a list of all New Relic monitor resources either a specific resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. @@ -60,7 +60,8 @@ public interface Monitors { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -68,50 +69,53 @@ public interface Monitors { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a NewRelicMonitorResource along with {@link Response}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String monitorName, Context context); /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a NewRelicMonitorResource. + * @return a Monitor Resource by NewRelic. */ NewRelicMonitorResource getByResourceGroup(String resourceGroupName, String monitorName); /** - * Delete a NewRelicMonitorResource. + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param userEmail User Email. * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete(String resourceGroupName, String userEmail, String monitorName); + void delete(String resourceGroupName, String monitorName, String userEmail); /** - * Delete a NewRelicMonitorResource. + * Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and + * stopping the observability of your Azure resources through New Relic. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param userEmail User Email. * @param monitorName Name of the Monitors resource. + * @param userEmail User Email. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete(String resourceGroupName, String userEmail, String monitorName, Context context); + void delete(String resourceGroupName, String monitorName, String userEmail, Context context); /** - * Get metric rules. + * Retrieves the metric rules that are configured in the New Relic monitor resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -120,13 +124,13 @@ Response getByResourceGroupWithResponse(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metric rules along with {@link Response}. + * @return set of rules for sending metrics for the Monitor resource along with {@link Response}. */ Response getMetricRulesWithResponse(String resourceGroupName, String monitorName, MetricsRequest request, Context context); /** - * Get metric rules. + * Retrieves the metric rules that are configured in the New Relic monitor resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -134,12 +138,12 @@ Response getMetricRulesWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metric rules. + * @return set of rules for sending metrics for the Monitor resource. */ MetricRules getMetricRules(String resourceGroupName, String monitorName, MetricsRequest request); /** - * Get metric status. + * Retrieves the metric status that are configured in the New Relic monitor resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -148,13 +152,13 @@ Response getMetricRulesWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metric status along with {@link Response}. + * @return response of get metrics status Operation along with {@link Response}. */ Response getMetricStatusWithResponse(String resourceGroupName, String monitorName, MetricsStatusRequest request, Context context); /** - * Get metric status. + * Retrieves the metric status that are configured in the New Relic monitor resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -162,69 +166,97 @@ Response getMetricStatusWithResponse(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metric status. + * @return response of get metrics status Operation. */ MetricsStatusResponse getMetricStatus(String resourceGroupName, String monitorName, MetricsStatusRequest request); /** - * List the app service resources currently being monitored by the NewRelic resource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the app services get request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list app services Operation as paginated response with {@link PagedIterable}. + * @return response of get latest linked SaaS resource operation along with {@link Response}. */ - PagedIterable listAppServices(String resourceGroupName, String monitorName, - AppServicesGetRequest request); + Response latestLinkedSaaSWithResponse(String resourceGroupName, String monitorName, + Context context); /** - * List the app service resources currently being monitored by the NewRelic resource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the app services get request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list app services Operation as paginated response with {@link PagedIterable}. + * @return response of get latest linked SaaS resource operation. */ - PagedIterable listAppServices(String resourceGroupName, String monitorName, - AppServicesGetRequest request, Context context); + LatestLinkedSaaSResponse latestLinkedSaaS(String resourceGroupName, String monitorName); /** - * Switches the billing for NewRelic monitor resource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the switch billing request. - * @param context The context to associate with this operation. + * @param body Link SaaS body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Monitor Resource by NewRelic. */ - Response switchBillingWithResponse(String resourceGroupName, String monitorName, - SwitchBillingRequest request, Context context); + NewRelicMonitorResource linkSaaS(String resourceGroupName, String monitorName, SaaSData body); /** - * Switches the billing for NewRelic monitor resource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. - * @param request The details of the switch billing request. + * @param body Link SaaS body parameter. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Monitor Resource by NewRelic. */ - NewRelicMonitorResource switchBilling(String resourceGroupName, String monitorName, SwitchBillingRequest request); + NewRelicMonitorResource linkSaaS(String resourceGroupName, String monitorName, SaaSData body, Context context); + + /** + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the app services get request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list app services Operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listAppServices(String resourceGroupName, String monitorName, + AppServicesGetRequest request); + + /** + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the app services get request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list app services Operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listAppServices(String resourceGroupName, String monitorName, + AppServicesGetRequest request, Context context); /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -237,7 +269,8 @@ Response switchBillingWithResponse(String resourceGroup PagedIterable listHosts(String resourceGroupName, String monitorName, HostsGetRequest request); /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -252,7 +285,35 @@ PagedIterable listHosts(String resourceGroupName, String monitorName, Ho Context context); /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listLinkedResources(String resourceGroupName, String monitorName); + + /** + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listLinkedResources(String resourceGroupName, String monitorName, Context context); + + /** + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -265,7 +326,8 @@ PagedIterable listHosts(String resourceGroupName, String monitorName, Ho PagedIterable listMonitoredResources(String resourceGroupName, String monitorName); /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -280,32 +342,91 @@ PagedIterable listMonitoredResources(String resourceGroupName Context context); /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedIterable}. + * @return the {@link Response}. */ - PagedIterable listLinkedResources(String resourceGroupName, String monitorName); + Response refreshIngestionKeyWithResponse(String resourceGroupName, String monitorName, Context context); + + /** + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void refreshIngestionKey(String resourceGroupName, String monitorName); /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Monitor Resource by NewRelic. + */ + NewRelicMonitorResource resubscribe(String resourceGroupName, String monitorName); + + /** + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param body Resubscribe Properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedIterable}. + * @return a Monitor Resource by NewRelic. */ - PagedIterable listLinkedResources(String resourceGroupName, String monitorName, Context context); + NewRelicMonitorResource resubscribe(String resourceGroupName, String monitorName, ResubscribeProperties body, + Context context); + + /** + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the switch billing request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Monitor Resource by NewRelic. + */ + Response switchBillingWithResponse(String resourceGroupName, String monitorName, + SwitchBillingRequest request, Context context); + + /** + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitors resource. + * @param request The details of the switch billing request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Monitor Resource by NewRelic. + */ + NewRelicMonitorResource switchBilling(String resourceGroupName, String monitorName, SwitchBillingRequest request); /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -319,7 +440,8 @@ Response vmHostPayloadWithResponse(String resourceGroupName, Context context); /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -331,25 +453,27 @@ Response vmHostPayloadWithResponse(String resourceGroupName, VMExtensionPayload vmHostPayload(String resourceGroupName, String monitorName); /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a NewRelicMonitorResource along with {@link Response}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ NewRelicMonitorResource getById(String id); /** - * Get a NewRelicMonitorResource. + * Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight + * into its setup and status. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a NewRelicMonitorResource along with {@link Response}. + * @return a Monitor Resource by NewRelic along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitorsSwitchBillingHeaders.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitorsSwitchBillingHeaders.java index 3964b79e475d..e09bcf8db1f4 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitorsSwitchBillingHeaders.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/MonitorsSwitchBillingHeaders.java @@ -28,6 +28,8 @@ public MonitorsSwitchBillingHeaders(HttpHeaders rawHeaders) { String retryAfter = rawHeaders.getValue(HttpHeaderName.RETRY_AFTER); if (retryAfter != null) { this.retryAfter = Integer.parseInt(retryAfter); + } else { + this.retryAfter = null; } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResource.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResource.java index 2ee32c6ed8c6..3f8c9669163a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResource.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResource.java @@ -114,6 +114,13 @@ public interface NewRelicMonitorResource { */ PlanData planData(); + /** + * Gets the saaSData property: SaaS details. + * + * @return the saaSData value. + */ + SaaSData saaSData(); + /** * Gets the liftrResourceCategory property: Liftr resource category. * @@ -241,7 +248,7 @@ interface WithResourceGroup { */ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithNewRelicAccountProperties, DefinitionStages.WithUserInfo, - DefinitionStages.WithPlanData, DefinitionStages.WithOrgCreationSource, + DefinitionStages.WithPlanData, DefinitionStages.WithSaaSData, DefinitionStages.WithOrgCreationSource, DefinitionStages.WithAccountCreationSource, DefinitionStages.WithSubscriptionState, DefinitionStages.WithSaaSAzureSubscriptionStatus { /** @@ -325,6 +332,19 @@ interface WithPlanData { WithCreate withPlanData(PlanData planData); } + /** + * The stage of the NewRelicMonitorResource definition allowing to specify saaSData. + */ + interface WithSaaSData { + /** + * Specifies the saaSData property: SaaS details. + * + * @param saaSData SaaS details. + * @return the next definition stage. + */ + WithCreate withSaaSData(SaaSData saaSData); + } + /** * The stage of the NewRelicMonitorResource definition allowing to specify orgCreationSource. */ @@ -392,7 +412,7 @@ interface WithSaaSAzureSubscriptionStatus { */ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithNewRelicAccountProperties, UpdateStages.WithUserInfo, UpdateStages.WithPlanData, - UpdateStages.WithOrgCreationSource, UpdateStages.WithAccountCreationSource { + UpdateStages.WithSaaSData, UpdateStages.WithOrgCreationSource, UpdateStages.WithAccountCreationSource { /** * Executes the update request. * @@ -478,6 +498,19 @@ interface WithPlanData { Update withPlanData(PlanData planData); } + /** + * The stage of the NewRelicMonitorResource update allowing to specify saaSData. + */ + interface WithSaaSData { + /** + * Specifies the saaSData property: SaaS details. + * + * @param saaSData SaaS details. + * @return the next definition stage. + */ + Update withSaaSData(SaaSData saaSData); + } + /** * The stage of the NewRelicMonitorResource update allowing to specify orgCreationSource. */ @@ -521,99 +554,122 @@ interface WithAccountCreationSource { NewRelicMonitorResource refresh(Context context); /** - * Get metric rules. + * Retrieves the metric rules that are configured in the New Relic monitor resource. * * @param request The details of the get metrics status request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metric rules along with {@link Response}. + * @return set of rules for sending metrics for the Monitor resource along with {@link Response}. */ Response getMetricRulesWithResponse(MetricsRequest request, Context context); /** - * Get metric rules. + * Retrieves the metric rules that are configured in the New Relic monitor resource. * * @param request The details of the get metrics status request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metric rules. + * @return set of rules for sending metrics for the Monitor resource. */ MetricRules getMetricRules(MetricsRequest request); /** - * Get metric status. + * Retrieves the metric status that are configured in the New Relic monitor resource. * * @param request The details of the get metrics status request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metric status along with {@link Response}. + * @return response of get metrics status Operation along with {@link Response}. */ Response getMetricStatusWithResponse(MetricsStatusRequest request, Context context); /** - * Get metric status. + * Retrieves the metric status that are configured in the New Relic monitor resource. * * @param request The details of the get metrics status request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metric status. + * @return response of get metrics status Operation. */ MetricsStatusResponse getMetricStatus(MetricsStatusRequest request); /** - * List the app service resources currently being monitored by the NewRelic resource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * - * @param request The details of the app services get request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list app services Operation as paginated response with {@link PagedIterable}. + * @return response of get latest linked SaaS resource operation along with {@link Response}. */ - PagedIterable listAppServices(AppServicesGetRequest request); + Response latestLinkedSaaSWithResponse(Context context); /** - * List the app service resources currently being monitored by the NewRelic resource. + * Returns the latest SaaS linked to the newrelic organization of the underlying monitor. * - * @param request The details of the app services get request. - * @param context The context to associate with this operation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of get latest linked SaaS resource operation. + */ + LatestLinkedSaaSResponse latestLinkedSaaS(); + + /** + * Links a new SaaS to the newrelic organization of the underlying monitor. + * + * @param body Link SaaS body parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list app services Operation as paginated response with {@link PagedIterable}. + * @return a Monitor Resource by NewRelic. */ - PagedIterable listAppServices(AppServicesGetRequest request, Context context); + NewRelicMonitorResource linkSaaS(SaaSData body); /** - * Switches the billing for NewRelic monitor resource. + * Links a new SaaS to the newrelic organization of the underlying monitor. * - * @param request The details of the switch billing request. + * @param body Link SaaS body parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Monitor Resource by NewRelic. */ - Response switchBillingWithResponse(SwitchBillingRequest request, Context context); + NewRelicMonitorResource linkSaaS(SaaSData body, Context context); /** - * Switches the billing for NewRelic monitor resource. + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. * - * @param request The details of the switch billing request. + * @param request The details of the app services get request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Monitor Resource by NewRelic. + * @return response of a list app services Operation as paginated response with {@link PagedIterable}. */ - NewRelicMonitorResource switchBilling(SwitchBillingRequest request); + PagedIterable listAppServices(AppServicesGetRequest request); /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Lists the app service resources currently being monitored by the New Relic resource, helping you understand which + * app services are under monitoring. + * + * @param request The details of the app services get request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list app services Operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listAppServices(AppServicesGetRequest request, Context context); + + /** + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @param request The details of the Hosts get request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -624,7 +680,8 @@ interface WithAccountCreationSource { PagedIterable listHosts(HostsGetRequest request); /** - * List the compute vm resources currently being monitored by the NewRelic resource. + * Lists all VM resources currently being monitored by the New Relic monitor resource, helping you manage + * observability. * * @param request The details of the Hosts get request. * @param context The context to associate with this operation. @@ -636,7 +693,30 @@ interface WithAccountCreationSource { PagedIterable listHosts(HostsGetRequest request, Context context); /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listLinkedResources(); + + /** + * Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, + * helping you understand the scope of integration. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listLinkedResources(Context context); + + /** + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -646,7 +726,8 @@ interface WithAccountCreationSource { PagedIterable listMonitoredResources(); /** - * List the resources currently being monitored by the NewRelic monitor resource. + * Lists all Azure resources that are currently being monitored by the specified New Relic monitor resource, + * providing insight into the coverage of your observability setup. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -658,27 +739,75 @@ interface WithAccountCreationSource { PagedIterable listMonitoredResources(Context context); /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedIterable}. + * @return the {@link Response}. */ - PagedIterable listLinkedResources(); + Response refreshIngestionKeyWithResponse(Context context); + + /** + * Refreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void refreshIngestionKey(); /** - * List all Azure resources associated to the same NewRelic organization and account as the target resource. + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace * + * A long-running resource action. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Monitor Resource by NewRelic. + */ + NewRelicMonitorResource resubscribe(); + + /** + * Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace + * + * A long-running resource action. + * + * @param body Resubscribe Properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedIterable}. + * @return a Monitor Resource by NewRelic. */ - PagedIterable listLinkedResources(Context context); + NewRelicMonitorResource resubscribe(ResubscribeProperties body, Context context); + + /** + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + * + * @param request The details of the switch billing request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Monitor Resource by NewRelic. + */ + Response switchBillingWithResponse(SwitchBillingRequest request, Context context); + + /** + * Switches the billing for the New Relic Monitor resource to be billed by Azure Marketplace. + * + * @param request The details of the switch billing request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Monitor Resource by NewRelic. + */ + NewRelicMonitorResource switchBilling(SwitchBillingRequest request); /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -689,7 +818,8 @@ interface WithAccountCreationSource { Response vmHostPayloadWithResponse(Context context); /** - * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. + * Returns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, + * providing the necessary configuration details. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResourceUpdate.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResourceUpdate.java index cb2401c5c93b..2ca577e307a7 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResourceUpdate.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/NewRelicMonitorResourceUpdate.java @@ -158,6 +158,29 @@ public NewRelicMonitorResourceUpdate withPlanData(PlanData planData) { return this; } + /** + * Get the saaSData property: SaaS details. + * + * @return the saaSData value. + */ + public SaaSData saaSData() { + return this.innerProperties() == null ? null : this.innerProperties().saaSData(); + } + + /** + * Set the saaSData property: SaaS details. + * + * @param saaSData the saaSData value to set. + * @return the NewRelicMonitorResourceUpdate object itself. + */ + public NewRelicMonitorResourceUpdate withSaaSData(SaaSData saaSData) { + if (this.innerProperties() == null) { + this.innerProperties = new NewRelicMonitorResourceUpdateProperties(); + } + this.innerProperties().withSaaSData(saaSData); + return this; + } + /** * Get the orgCreationSource property: Source of org creation. * diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Organizations.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Organizations.java index 691a8c4b7900..11528bf9848b 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Organizations.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Organizations.java @@ -12,7 +12,8 @@ */ public interface Organizations { /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. @@ -24,7 +25,8 @@ public interface Organizations { PagedIterable list(String userEmail, String location); /** - * List all the existing organizations. + * Lists all the New Relic organizations linked to your email address, helping you understand the existing + * organizations that have been created. * * @param userEmail User Email. * @param location Location for NewRelic. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/PlanData.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/PlanData.java index f272e0357177..0c5e84025a0e 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/PlanData.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/PlanData.java @@ -25,9 +25,9 @@ public final class PlanData implements JsonSerializable { private UsageType usageType; /* - * Different billing cycles like MONTHLY/WEEKLY. this could be enum + * Different billing cycles like Monthly/Weekly. */ - private BillingCycle billingCycle; + private String billingCycle; /* * plan id as published by NewRelic @@ -66,21 +66,21 @@ public PlanData withUsageType(UsageType usageType) { } /** - * Get the billingCycle property: Different billing cycles like MONTHLY/WEEKLY. this could be enum. + * Get the billingCycle property: Different billing cycles like Monthly/Weekly. * * @return the billingCycle value. */ - public BillingCycle billingCycle() { + public String billingCycle() { return this.billingCycle; } /** - * Set the billingCycle property: Different billing cycles like MONTHLY/WEEKLY. this could be enum. + * Set the billingCycle property: Different billing cycles like Monthly/Weekly. * * @param billingCycle the billingCycle value to set. * @return the PlanData object itself. */ - public PlanData withBillingCycle(BillingCycle billingCycle) { + public PlanData withBillingCycle(String billingCycle) { this.billingCycle = billingCycle; return this; } @@ -140,7 +140,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("usageType", this.usageType == null ? null : this.usageType.toString()); - jsonWriter.writeStringField("billingCycle", this.billingCycle == null ? null : this.billingCycle.toString()); + jsonWriter.writeStringField("billingCycle", this.billingCycle); jsonWriter.writeStringField("planDetails", this.planDetails); jsonWriter.writeStringField("effectiveDate", this.effectiveDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.effectiveDate)); @@ -165,7 +165,7 @@ public static PlanData fromJson(JsonReader jsonReader) throws IOException { if ("usageType".equals(fieldName)) { deserializedPlanData.usageType = UsageType.fromString(reader.getString()); } else if ("billingCycle".equals(fieldName)) { - deserializedPlanData.billingCycle = BillingCycle.fromString(reader.getString()); + deserializedPlanData.billingCycle = reader.getString(); } else if ("planDetails".equals(fieldName)) { deserializedPlanData.planDetails = reader.getString(); } else if ("effectiveDate".equals(fieldName)) { diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Plans.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Plans.java index bc1920e6e8c8..d423041be17c 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Plans.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/Plans.java @@ -12,7 +12,7 @@ */ public interface Plans { /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -21,7 +21,7 @@ public interface Plans { PagedIterable list(); /** - * List plans data. + * Lists the plans data linked to your organization, providing an overview of the available plans. * * @param accountId Account Id. * @param organizationId Organization Id. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ResubscribeProperties.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ResubscribeProperties.java new file mode 100644 index 000000000000..ae5e979f8ade --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/ResubscribeProperties.java @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Resubscribe Properties. + */ +@Fluent +public final class ResubscribeProperties implements JsonSerializable { + /* + * Newly selected plan Id to create the new Marketplace subscription for Resubscribe + */ + private String planId; + + /* + * Newly selected term Id to create the new Marketplace subscription for Resubscribe + */ + private String termId; + + /* + * Newly selected Azure Subscription Id in which the new Marketplace subscription will be created for Resubscribe + */ + private String subscriptionId; + + /* + * Newly selected Azure resource group in which the new Marketplace subscription will be created for Resubscribe + */ + private String resourceGroup; + + /* + * Organization Id of the NewRelic Organization that needs to be resubscribed + */ + private String organizationId; + + /* + * Publisher Id of the NewRelic offer that needs to be resubscribed + */ + private String publisherId; + + /* + * Offer Id of the NewRelic offer that needs to be resubscribed + */ + private String offerId; + + /** + * Creates an instance of ResubscribeProperties class. + */ + public ResubscribeProperties() { + } + + /** + * Get the planId property: Newly selected plan Id to create the new Marketplace subscription for Resubscribe. + * + * @return the planId value. + */ + public String planId() { + return this.planId; + } + + /** + * Set the planId property: Newly selected plan Id to create the new Marketplace subscription for Resubscribe. + * + * @param planId the planId value to set. + * @return the ResubscribeProperties object itself. + */ + public ResubscribeProperties withPlanId(String planId) { + this.planId = planId; + return this; + } + + /** + * Get the termId property: Newly selected term Id to create the new Marketplace subscription for Resubscribe. + * + * @return the termId value. + */ + public String termId() { + return this.termId; + } + + /** + * Set the termId property: Newly selected term Id to create the new Marketplace subscription for Resubscribe. + * + * @param termId the termId value to set. + * @return the ResubscribeProperties object itself. + */ + public ResubscribeProperties withTermId(String termId) { + this.termId = termId; + return this; + } + + /** + * Get the subscriptionId property: Newly selected Azure Subscription Id in which the new Marketplace subscription + * will be created for Resubscribe. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Newly selected Azure Subscription Id in which the new Marketplace subscription + * will be created for Resubscribe. + * + * @param subscriptionId the subscriptionId value to set. + * @return the ResubscribeProperties object itself. + */ + public ResubscribeProperties withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the resourceGroup property: Newly selected Azure resource group in which the new Marketplace subscription + * will be created for Resubscribe. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: Newly selected Azure resource group in which the new Marketplace subscription + * will be created for Resubscribe. + * + * @param resourceGroup the resourceGroup value to set. + * @return the ResubscribeProperties object itself. + */ + public ResubscribeProperties withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the organizationId property: Organization Id of the NewRelic Organization that needs to be resubscribed. + * + * @return the organizationId value. + */ + public String organizationId() { + return this.organizationId; + } + + /** + * Set the organizationId property: Organization Id of the NewRelic Organization that needs to be resubscribed. + * + * @param organizationId the organizationId value to set. + * @return the ResubscribeProperties object itself. + */ + public ResubscribeProperties withOrganizationId(String organizationId) { + this.organizationId = organizationId; + return this; + } + + /** + * Get the publisherId property: Publisher Id of the NewRelic offer that needs to be resubscribed. + * + * @return the publisherId value. + */ + public String publisherId() { + return this.publisherId; + } + + /** + * Set the publisherId property: Publisher Id of the NewRelic offer that needs to be resubscribed. + * + * @param publisherId the publisherId value to set. + * @return the ResubscribeProperties object itself. + */ + public ResubscribeProperties withPublisherId(String publisherId) { + this.publisherId = publisherId; + return this; + } + + /** + * Get the offerId property: Offer Id of the NewRelic offer that needs to be resubscribed. + * + * @return the offerId value. + */ + public String offerId() { + return this.offerId; + } + + /** + * Set the offerId property: Offer Id of the NewRelic offer that needs to be resubscribed. + * + * @param offerId the offerId value to set. + * @return the ResubscribeProperties object itself. + */ + public ResubscribeProperties withOfferId(String offerId) { + this.offerId = offerId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("planId", this.planId); + jsonWriter.writeStringField("termId", this.termId); + jsonWriter.writeStringField("subscriptionId", this.subscriptionId); + jsonWriter.writeStringField("resourceGroup", this.resourceGroup); + jsonWriter.writeStringField("organizationId", this.organizationId); + jsonWriter.writeStringField("publisherId", this.publisherId); + jsonWriter.writeStringField("offerId", this.offerId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResubscribeProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResubscribeProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ResubscribeProperties. + */ + public static ResubscribeProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResubscribeProperties deserializedResubscribeProperties = new ResubscribeProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("planId".equals(fieldName)) { + deserializedResubscribeProperties.planId = reader.getString(); + } else if ("termId".equals(fieldName)) { + deserializedResubscribeProperties.termId = reader.getString(); + } else if ("subscriptionId".equals(fieldName)) { + deserializedResubscribeProperties.subscriptionId = reader.getString(); + } else if ("resourceGroup".equals(fieldName)) { + deserializedResubscribeProperties.resourceGroup = reader.getString(); + } else if ("organizationId".equals(fieldName)) { + deserializedResubscribeProperties.organizationId = reader.getString(); + } else if ("publisherId".equals(fieldName)) { + deserializedResubscribeProperties.publisherId = reader.getString(); + } else if ("offerId".equals(fieldName)) { + deserializedResubscribeProperties.offerId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResubscribeProperties; + }); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaS.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaS.java new file mode 100644 index 000000000000..a09b67cba136 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaS.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of SaaS. + */ +public interface SaaS { + /** + * Resolve the token to get the SaaS resource ID and activate the SaaS resource. + * + * @param request The request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details along with {@link Response}. + */ + Response activateResourceWithResponse(ActivateSaaSParameterRequest request, + Context context); + + /** + * Resolve the token to get the SaaS resource ID and activate the SaaS resource. + * + * @param request The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details. + */ + SaaSResourceDetailsResponse activateResource(ActivateSaaSParameterRequest request); +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaSData.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaSData.java new file mode 100644 index 000000000000..39dd2aaa4af1 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaSData.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * SaaS details. + */ +@Fluent +public final class SaaSData implements JsonSerializable { + /* + * SaaS resource id + */ + private String saaSResourceId; + + /** + * Creates an instance of SaaSData class. + */ + public SaaSData() { + } + + /** + * Get the saaSResourceId property: SaaS resource id. + * + * @return the saaSResourceId value. + */ + public String saaSResourceId() { + return this.saaSResourceId; + } + + /** + * Set the saaSResourceId property: SaaS resource id. + * + * @param saaSResourceId the saaSResourceId value to set. + * @return the SaaSData object itself. + */ + public SaaSData withSaaSResourceId(String saaSResourceId) { + this.saaSResourceId = saaSResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("saaSResourceId", this.saaSResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SaaSData from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SaaSData if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the SaaSData. + */ + public static SaaSData fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SaaSData deserializedSaaSData = new SaaSData(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("saaSResourceId".equals(fieldName)) { + deserializedSaaSData.saaSResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSaaSData; + }); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaSResourceDetailsResponse.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaSResourceDetailsResponse.java new file mode 100644 index 000000000000..6084bb92f365 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SaaSResourceDetailsResponse.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.newrelicobservability.fluent.models.SaaSResourceDetailsResponseInner; + +/** + * An immutable client-side representation of SaaSResourceDetailsResponse. + */ +public interface SaaSResourceDetailsResponse { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the saasId property: Id of the Marketplace SaaS Resource. + * + * @return the saasId value. + */ + String saasId(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.newrelicobservability.fluent.models.SaaSResourceDetailsResponseInner + * object. + * + * @return the inner object. + */ + SaaSResourceDetailsResponseInner innerModel(); +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SwitchBillingRequest.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SwitchBillingRequest.java index 32c61191bba2..189db1af2f85 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SwitchBillingRequest.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/SwitchBillingRequest.java @@ -33,7 +33,7 @@ public final class SwitchBillingRequest implements JsonSerializable listByNewRelicMonitorResource(String resourceGroupName, String monitorName); /** - * List TagRule resources by NewRelicMonitorResource. + * Lists all tag rules associated with a specific New Relic monitor resource, helping you manage and audit the rules + * that control resource monitoring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -38,7 +40,8 @@ public interface TagRules { PagedIterable listByNewRelicMonitorResource(String resourceGroupName, String monitorName, Context context); /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -47,13 +50,14 @@ public interface TagRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a TagRule along with {@link Response}. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String monitorName, String ruleSetName, Context context); /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -61,12 +65,13 @@ Response getWithResponse(String resourceGroupName, String monitorName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a TagRule. + * @return a tag rule belonging to NewRelic account. */ TagRule get(String resourceGroupName, String monitorName, String ruleSetName); /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -78,7 +83,8 @@ Response getWithResponse(String resourceGroupName, String monitorName, void delete(String resourceGroupName, String monitorName, String ruleSetName); /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitors resource. @@ -91,30 +97,33 @@ Response getWithResponse(String resourceGroupName, String monitorName, void delete(String resourceGroupName, String monitorName, String ruleSetName, Context context); /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a TagRule along with {@link Response}. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ TagRule getById(String id); /** - * Get a TagRule. + * Retrieves the details of the tag rules for a specific New Relic monitor resource, providing insight into its + * setup and status. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a TagRule along with {@link Response}. + * @return a tag rule belonging to NewRelic account along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,7 +133,8 @@ Response getWithResponse(String resourceGroupName, String monitorName, void deleteById(String id); /** - * Delete a TagRule. + * Deletes a tag rule set for a given New Relic monitor resource, removing fine-grained control over observability + * based on resource tags. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/UserInfo.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/UserInfo.java index 606178ef5cbb..cf1c61cdc38e 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/UserInfo.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/java/com/azure/resourcemanager/newrelicobservability/models/UserInfo.java @@ -27,7 +27,7 @@ public final class UserInfo implements JsonSerializable { private String lastName; /* - * User Email + * Reusable representation of an email address */ private String emailAddress; @@ -88,7 +88,7 @@ public UserInfo withLastName(String lastName) { } /** - * Get the emailAddress property: User Email. + * Get the emailAddress property: Reusable representation of an email address. * * @return the emailAddress value. */ @@ -97,7 +97,7 @@ public String emailAddress() { } /** - * Set the emailAddress property: User Email. + * Set the emailAddress property: Reusable representation of an email address. * * @param emailAddress the emailAddress value to set. * @return the UserInfo object itself. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-newrelicobservability/proxy-config.json b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-newrelicobservability/proxy-config.json index a384731a470b..c481c718da74 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-newrelicobservability/proxy-config.json +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-newrelicobservability/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.newrelicobservability.implementation.AccountsClientImpl$AccountsService"],["com.azure.resourcemanager.newrelicobservability.implementation.BillingInfoesClientImpl$BillingInfoesService"],["com.azure.resourcemanager.newrelicobservability.implementation.ConnectedPartnerResourcesClientImpl$ConnectedPartnerResourcesService"],["com.azure.resourcemanager.newrelicobservability.implementation.MonitoredSubscriptionsClientImpl$MonitoredSubscriptionsService"],["com.azure.resourcemanager.newrelicobservability.implementation.MonitorsClientImpl$MonitorsService"],["com.azure.resourcemanager.newrelicobservability.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.newrelicobservability.implementation.OrganizationsClientImpl$OrganizationsService"],["com.azure.resourcemanager.newrelicobservability.implementation.PlansClientImpl$PlansService"],["com.azure.resourcemanager.newrelicobservability.implementation.TagRulesClientImpl$TagRulesService"]] \ No newline at end of file +[["com.azure.resourcemanager.newrelicobservability.implementation.AccountsClientImpl$AccountsService"],["com.azure.resourcemanager.newrelicobservability.implementation.BillingInfoesClientImpl$BillingInfoesService"],["com.azure.resourcemanager.newrelicobservability.implementation.ConnectedPartnerResourcesClientImpl$ConnectedPartnerResourcesService"],["com.azure.resourcemanager.newrelicobservability.implementation.MonitoredSubscriptionsClientImpl$MonitoredSubscriptionsService"],["com.azure.resourcemanager.newrelicobservability.implementation.MonitorsClientImpl$MonitorsService"],["com.azure.resourcemanager.newrelicobservability.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.newrelicobservability.implementation.OrganizationsClientImpl$OrganizationsService"],["com.azure.resourcemanager.newrelicobservability.implementation.PlansClientImpl$PlansService"],["com.azure.resourcemanager.newrelicobservability.implementation.SaaSClientImpl$SaaSService"],["com.azure.resourcemanager.newrelicobservability.implementation.TagRulesClientImpl$TagRulesService"]] \ No newline at end of file diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/resources/azure-resourcemanager-newrelicobservability.properties b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/resources/azure-resourcemanager-newrelicobservability.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/main/resources/azure-resourcemanager-newrelicobservability.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListSamples.java index 0fa7cfb503cf..dc2d89510ef7 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListSamples.java @@ -9,7 +9,8 @@ */ public final class AccountsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Accounts_List_MinimumSet_Gen.json */ /** @@ -23,7 +24,8 @@ public static void accountsListMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Accounts_List_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoGetSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoGetSamples.java index e9162f8cee18..6fd2f3117bbe 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoGetSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoGetSamples.java @@ -10,7 +10,8 @@ public final class BillingInfoGetSamples { /* * x-ms-original-file: - * specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/BillingInfo_Get.json + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * BillingInfo_Get.json */ /** * Sample code: BillingInfo_Get. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListSamples.java index aabca36166aa..65d3eca142a0 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListSamples.java @@ -9,7 +9,8 @@ */ public final class ConnectedPartnerResourcesListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * ConnectedPartnerResources_List.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateorUpdateSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateOrUpdateSamples.java similarity index 72% rename from sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateorUpdateSamples.java rename to sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateOrUpdateSamples.java index f22bd2447d04..123280a7d738 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateorUpdateSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateOrUpdateSamples.java @@ -7,12 +7,13 @@ import com.azure.resourcemanager.newrelicobservability.models.ConfigurationName; /** - * Samples for MonitoredSubscriptions CreateorUpdate. + * Samples for MonitoredSubscriptions CreateOrUpdate. */ -public final class MonitoredSubscriptionsCreateorUpdateSamples { +public final class MonitoredSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ - * MonitoredSubscriptions_CreateorUpdate.json + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * MonitoredSubscriptions_CreateOrUpdate.json */ /** * Sample code: Monitors_AddMonitoredSubscriptions. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsDeleteSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsDeleteSamples.java index dda1ebeffa06..eef4658ca554 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsDeleteSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsDeleteSamples.java @@ -11,7 +11,8 @@ */ public final class MonitoredSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * MonitoredSubscriptions_Delete.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsGetSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsGetSamples.java index d11b01e302af..b82dd96db6dc 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsGetSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsGetSamples.java @@ -11,7 +11,8 @@ */ public final class MonitoredSubscriptionsGetSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * MonitoredSubscriptions_Get.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsListSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsListSamples.java index b791d83fb4e8..860414389fa3 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsListSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsListSamples.java @@ -9,7 +9,8 @@ */ public final class MonitoredSubscriptionsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * MonitoredSubscriptions_List.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsUpdateSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsUpdateSamples.java index e7943bd2125c..4c43bb39849a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsUpdateSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsUpdateSamples.java @@ -12,7 +12,8 @@ */ public final class MonitoredSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * MonitoredSubscriptions_Update.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsCreateOrUpdateSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsCreateOrUpdateSamples.java index f963a84b8a06..376cfe6e101f 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsCreateOrUpdateSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsCreateOrUpdateSamples.java @@ -6,7 +6,6 @@ import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource; import com.azure.resourcemanager.newrelicobservability.models.AccountInfo; -import com.azure.resourcemanager.newrelicobservability.models.BillingCycle; import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentity; import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentityType; import com.azure.resourcemanager.newrelicobservability.models.NewRelicAccountProperties; @@ -15,6 +14,7 @@ import com.azure.resourcemanager.newrelicobservability.models.OrganizationInfo; import com.azure.resourcemanager.newrelicobservability.models.PlanData; import com.azure.resourcemanager.newrelicobservability.models.ProvisioningState; +import com.azure.resourcemanager.newrelicobservability.models.SaaSData; import com.azure.resourcemanager.newrelicobservability.models.SingleSignOnStates; import com.azure.resourcemanager.newrelicobservability.models.UsageType; import com.azure.resourcemanager.newrelicobservability.models.UserAssignedIdentity; @@ -28,7 +28,8 @@ */ public final class MonitorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_CreateOrUpdate_MaximumSet_Gen.json */ /** @@ -61,9 +62,11 @@ public static void monitorsCreateOrUpdateMaximumSetGen( .withPhoneNumber("krf") .withCountry("hslqnwdanrconqyekwbnttaetv")) .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.YEARLY) + .withBillingCycle("Yearly") .withPlanDetails("tbbiaga") .withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z"))) + .withSaaSData(new SaaSData().withSaaSResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/Microsoft.SaaS/resources/abcd")) .withOrgCreationSource(OrgCreationSource.LIFTR) .withAccountCreationSource(AccountCreationSource.LIFTR) .withSubscriptionState("Suspended") diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteSamples.java index e33d392f62b4..3d7577771f94 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class MonitorsDeleteSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_Delete_MinimumSet_Gen.json */ /** @@ -20,12 +21,13 @@ public final class MonitorsDeleteSamples { public static void monitorsDeleteMinimumSetGen( com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { manager.monitors() - .delete("rgopenapi", "ruxvg@xqkmdhrnoo.hlmbpm", "ipxmlcbonyxtolzejcjshkmlron", + .delete("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "ruxvg@xqkmdhrnoo.hlmbpm", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_Delete_MaximumSet_Gen.json */ /** @@ -36,7 +38,7 @@ public static void monitorsDeleteMinimumSetGen( public static void monitorsDeleteMaximumSetGen( com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { manager.monitors() - .delete("rgopenapi", "ruxvg@xqkmdhrnoo.hlmbpm", "ipxmlcbonyxtolzejcjshkmlron", + .delete("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "ruxvg@xqkmdhrnoo.hlmbpm", com.azure.core.util.Context.NONE); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetByResourceGroupSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetByResourceGroupSamples.java index caf1a6615ccb..2eb017ef2ad4 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetByResourceGroupSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetByResourceGroupSamples.java @@ -9,7 +9,8 @@ */ public final class MonitorsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_Get_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesSamples.java index 19ac552fbf44..2202db56a69d 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesSamples.java @@ -11,7 +11,8 @@ */ public final class MonitorsGetMetricRulesSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_GetMetricRules_MinimumSet_Gen.json */ /** @@ -27,7 +28,8 @@ public static void monitorsGetMetricRulesMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_GetMetricRules_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusSamples.java index 3115d777c5d7..f134ab241e25 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusSamples.java @@ -12,7 +12,8 @@ */ public final class MonitorsGetMetricStatusSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_GetMetricStatus_MinimumSet_Gen.json */ /** @@ -31,7 +32,8 @@ public static void monitorsGetMetricStatusMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_GetMetricStatus_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLatestLinkedSaaSSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLatestLinkedSaaSSamples.java new file mode 100644 index 000000000000..3a11f683e768 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLatestLinkedSaaSSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +/** + * Samples for Monitors LatestLinkedSaaS. + */ +public final class MonitorsLatestLinkedSaaSSamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_LatestLinkedSaaS_MinimumSet_Gen.json + */ + /** + * Sample code: Monitors_LatestLinkedSaaS_MinimumSet_Gen. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void monitorsLatestLinkedSaaSMinimumSetGen( + com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors() + .latestLinkedSaaSWithResponse("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_LatestLinkedSaaS_MaximumSet_Gen.json + */ + /** + * Sample code: Monitors_LatestLinkedSaaS_MaximumSet_Gen. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void monitorsLatestLinkedSaaSMaximumSetGen( + com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors() + .latestLinkedSaaSWithResponse("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLinkSaaSSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLinkSaaSSamples.java new file mode 100644 index 000000000000..6d69642c3326 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLinkSaaSSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.resourcemanager.newrelicobservability.models.SaaSData; + +/** + * Samples for Monitors LinkSaaS. + */ +public final class MonitorsLinkSaaSSamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_LinkSaaS.json + */ + /** + * Sample code: Monitors_LinkSaaS. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void + monitorsLinkSaaS(com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors() + .linkSaaS("myResourceGroup", "myMonitor", new SaaSData().withSaaSResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/Microsoft.SaaS/resources/abcd"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesSamples.java index c2268bddffca..c1c7988adc2e 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesSamples.java @@ -12,7 +12,8 @@ */ public final class MonitorsListAppServicesSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListAppServices_MaximumSet_Gen.json */ /** @@ -31,7 +32,8 @@ public static void monitorsListAppServicesMaximumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListAppServices_MinimumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListByResourceGroupSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListByResourceGroupSamples.java index f32f6675d047..e7c3e309061b 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListByResourceGroupSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListByResourceGroupSamples.java @@ -9,7 +9,8 @@ */ public final class MonitorsListByResourceGroupSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListByResourceGroup_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsSamples.java index ae8c0bc0836c..0d241647f615 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsSamples.java @@ -12,7 +12,8 @@ */ public final class MonitorsListHostsSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListHosts_MinimumSet_Gen.json */ /** @@ -30,7 +31,8 @@ public static void monitorsListHostsMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListHosts_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListLinkedResourcesSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListLinkedResourcesSamples.java index 7010b26e26bd..c476b3ef5c05 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListLinkedResourcesSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListLinkedResourcesSamples.java @@ -10,8 +10,8 @@ public final class MonitorsListLinkedResourcesSamples { /* * x-ms-original-file: - * specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/LinkedResources_List. - * json + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * LinkedResources_List.json */ /** * Sample code: Monitors_ListLinkedResources. diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesSamples.java index 85a54990ace6..85b87c5d1747 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesSamples.java @@ -9,7 +9,8 @@ */ public final class MonitorsListMonitoredResourcesSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListMonitoredResources_MinimumSet_Gen.json */ /** @@ -24,7 +25,8 @@ public static void monitorsListMonitoredResourcesMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListMonitoredResources_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListSamples.java index d4462aa2861c..127bfe544c8a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListSamples.java @@ -9,7 +9,8 @@ */ public final class MonitorsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_ListBySubscription_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsRefreshIngestionKeySamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsRefreshIngestionKeySamples.java new file mode 100644 index 000000000000..1da06ecbd8e8 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsRefreshIngestionKeySamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +/** + * Samples for Monitors RefreshIngestionKey. + */ +public final class MonitorsRefreshIngestionKeySamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_RefreshIngestionKey.json + */ + /** + * Sample code: Monitors_RefreshIngestionKey. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void monitorsRefreshIngestionKey( + com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors() + .refreshIngestionKeyWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsResubscribeSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsResubscribeSamples.java new file mode 100644 index 000000000000..34c43398165d --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsResubscribeSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +/** + * Samples for Monitors Resubscribe. + */ +public final class MonitorsResubscribeSamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ + * Monitors_Resubscribe.json + */ + /** + * Sample code: Monitors_Resubscribe. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void + monitorsResubscribe(com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.monitors().resubscribe("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsSwitchBillingSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsSwitchBillingSamples.java index 4090f02b2adf..90586d80f071 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsSwitchBillingSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsSwitchBillingSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.newrelicobservability.generated; -import com.azure.resourcemanager.newrelicobservability.models.BillingCycle; import com.azure.resourcemanager.newrelicobservability.models.PlanData; import com.azure.resourcemanager.newrelicobservability.models.SwitchBillingRequest; import com.azure.resourcemanager.newrelicobservability.models.UsageType; @@ -15,7 +14,8 @@ */ public final class MonitorsSwitchBillingSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_SwitchBilling_MinimumSet_Gen.json */ /** @@ -31,7 +31,8 @@ public static void monitorsSwitchBillingMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_SwitchBilling_MaximumSet_Gen.json */ /** @@ -47,7 +48,7 @@ public static void monitorsSwitchBillingMaximumSetGen( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz") .withOrganizationId("k") .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.YEARLY) + .withBillingCycle("Yearly") .withPlanDetails("tbbiaga") .withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z"))) .withUserEmail("ruxvg@xqkmdhrnoo.hlmbpm"), diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsUpdateSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsUpdateSamples.java index 172bbc349a46..2330066d1739 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsUpdateSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsUpdateSamples.java @@ -6,7 +6,6 @@ import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource; import com.azure.resourcemanager.newrelicobservability.models.AccountInfo; -import com.azure.resourcemanager.newrelicobservability.models.BillingCycle; import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentity; import com.azure.resourcemanager.newrelicobservability.models.ManagedServiceIdentityType; import com.azure.resourcemanager.newrelicobservability.models.NewRelicAccountProperties; @@ -29,7 +28,8 @@ */ public final class MonitorsUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_Update_MaximumSet_Gen.json */ /** @@ -62,7 +62,7 @@ public static void monitorsUpdateMaximumSetGen( .withPhoneNumber("krf") .withCountry("hslqnwdanrconqyekwbnttaetv")) .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.YEARLY) + .withBillingCycle("Yearly") .withPlanDetails("tbbiaga") .withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z"))) .withOrgCreationSource(OrgCreationSource.LIFTR) diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsVmHostPayloadSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsVmHostPayloadSamples.java index 0a8f98ffe524..4a582262607f 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsVmHostPayloadSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsVmHostPayloadSamples.java @@ -9,7 +9,8 @@ */ public final class MonitorsVmHostPayloadSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_VmHostPayload_MinimumSet_Gen.json */ /** @@ -24,7 +25,8 @@ public static void monitorsVmHostPayloadMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Monitors_VmHostPayload_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListSamples.java index 1f94f848d7c1..8d5654e7dcb0 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListSamples.java @@ -9,7 +9,8 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Operations_List_MinimumSet_Gen.json */ /** @@ -23,7 +24,8 @@ public static void operationsListMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Operations_List_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListSamples.java index 99ba2b9bf7f6..8345345266c2 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListSamples.java @@ -9,7 +9,8 @@ */ public final class OrganizationsListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Organizations_List_MinimumSet_Gen.json */ /** @@ -23,7 +24,8 @@ public static void organizationsListMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Organizations_List_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListSamples.java index 4d834629fc24..50f79c2e6cb0 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListSamples.java @@ -9,7 +9,8 @@ */ public final class PlansListSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Plans_List_MaximumSet_Gen.json */ /** @@ -23,7 +24,8 @@ public final class PlansListSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * Plans_List_MinimumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSActivateResourceSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSActivateResourceSamples.java new file mode 100644 index 000000000000..c68827d2fd73 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSActivateResourceSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.resourcemanager.newrelicobservability.models.ActivateSaaSParameterRequest; + +/** + * Samples for SaaS ActivateResource. + */ +public final class SaaSActivateResourceSamples { + /* + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ActivateSaaS. + * json + */ + /** + * Sample code: ActivateSaaS. + * + * @param manager Entry point to NewRelicObservabilityManager. + */ + public static void + activateSaaS(com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) { + manager.saaS() + .activateResourceWithResponse( + new ActivateSaaSParameterRequest().withSaasGuid("00000000-0000-0000-0000-000005430000") + .withPublisherId("publisherId"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateSamples.java index 1b92c64f14a7..de552b583f01 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateSamples.java @@ -18,7 +18,8 @@ */ public final class TagRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_CreateOrUpdate_MaximumSet_Gen.json */ /** @@ -46,7 +47,8 @@ public static void tagRulesCreateOrUpdateMaximumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_CreateOrUpdate_MinimumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteSamples.java index aad10088dbe7..de78b519240c 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class TagRulesDeleteSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Delete_MinimumSet_Gen.json */ /** @@ -25,7 +26,8 @@ public static void tagRulesDeleteMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Delete_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetSamples.java index 5017e02836c5..7d9a4d06c718 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetSamples.java @@ -9,7 +9,8 @@ */ public final class TagRulesGetSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Get_MinimumSet_Gen.json */ /** @@ -25,7 +26,8 @@ public final class TagRulesGetSamples { } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Get_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceSamples.java index 23dbdf45b781..9211189ca6b2 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceSamples.java @@ -9,7 +9,8 @@ */ public final class TagRulesListByNewRelicMonitorResourceSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_ListByNewRelicMonitorResource_MinimumSet_Gen.json */ /** @@ -25,7 +26,8 @@ public static void tagRulesListByNewRelicMonitorResourceMinimumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_ListByNewRelicMonitorResource_MaximumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesUpdateSamples.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesUpdateSamples.java index 9249ac8a0748..aec8af3d8ac8 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesUpdateSamples.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/samples/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesUpdateSamples.java @@ -19,7 +19,8 @@ */ public final class TagRulesUpdateSamples { /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Update_MaximumSet_Gen.json */ /** @@ -49,7 +50,8 @@ public static void tagRulesUpdateMaximumSetGen( } /* - * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ + * x-ms-original-file: + * specification/newrelic/resource-manager/NewRelic.Observability/preview/2025-05-01-preview/examples/ * TagRules_Update_MinimumSet_Gen.json */ /** diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListMockTests.java index ba1c02a87ee5..c8d594e5813a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AccountsListMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.AccountResource; @@ -22,21 +22,21 @@ public final class AccountsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"organizationId\":\"bnxknalaulppg\",\"accountId\":\"tpnapnyiropuhpig\",\"accountName\":\"gylgqgitxmedjvcs\",\"region\":\"n\"},\"id\":\"wncwzzhxgktrmg\",\"name\":\"cnapkteoell\",\"type\":\"pt\"}]}"; + = "{\"value\":[{\"properties\":{\"organizationId\":\"pigvpgylgqgitx\",\"accountId\":\"djvcsl\",\"accountName\":\"qwwncw\",\"region\":\"hxg\"},\"id\":\"rmgucnap\",\"name\":\"t\",\"type\":\"oellwp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.accounts().list("iidzyexzne", "ixhnrztf", com.azure.core.util.Context.NONE); + = manager.accounts().list("p", "gdtpnapnyiro", com.azure.core.util.Context.NONE); - Assertions.assertEquals("bnxknalaulppg", response.iterator().next().organizationId()); - Assertions.assertEquals("tpnapnyiropuhpig", response.iterator().next().accountId()); - Assertions.assertEquals("gylgqgitxmedjvcs", response.iterator().next().accountName()); - Assertions.assertEquals("n", response.iterator().next().region()); + Assertions.assertEquals("pigvpgylgqgitx", response.iterator().next().organizationId()); + Assertions.assertEquals("djvcsl", response.iterator().next().accountId()); + Assertions.assertEquals("qwwncw", response.iterator().next().accountName()); + Assertions.assertEquals("hxg", response.iterator().next().region()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ActivateSaaSParameterRequestTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ActivateSaaSParameterRequestTests.java new file mode 100644 index 000000000000..e1ad8e3da2ff --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ActivateSaaSParameterRequestTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.newrelicobservability.models.ActivateSaaSParameterRequest; +import org.junit.jupiter.api.Assertions; + +public final class ActivateSaaSParameterRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActivateSaaSParameterRequest model + = BinaryData.fromString("{\"saasGuid\":\"jozkrwfndiod\",\"publisherId\":\"pslwejdpvw\"}") + .toObject(ActivateSaaSParameterRequest.class); + Assertions.assertEquals("jozkrwfndiod", model.saasGuid()); + Assertions.assertEquals("pslwejdpvw", model.publisherId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ActivateSaaSParameterRequest model + = new ActivateSaaSParameterRequest().withSaasGuid("jozkrwfndiod").withPublisherId("pslwejdpvw"); + model = BinaryData.fromObject(model).toObject(ActivateSaaSParameterRequest.class); + Assertions.assertEquals("jozkrwfndiod", model.saasGuid()); + Assertions.assertEquals("pslwejdpvw", model.publisherId()); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServiceInfoInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServiceInfoInnerTests.java index 631e32632295..bb35fc53b5f9 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServiceInfoInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServiceInfoInnerTests.java @@ -11,22 +11,23 @@ public final class AppServiceInfoInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AppServiceInfoInner model = BinaryData.fromString( - "{\"azureResourceId\":\"zvddntwndeicbtwn\",\"agentVersion\":\"aoqvuh\",\"agentStatus\":\"cffcyddglmj\"}") + AppServiceInfoInner model = BinaryData + .fromString( + "{\"azureResourceId\":\"jbavorxzdm\",\"agentVersion\":\"ctbqvudwx\",\"agentStatus\":\"dnvowg\"}") .toObject(AppServiceInfoInner.class); - Assertions.assertEquals("zvddntwndeicbtwn", model.azureResourceId()); - Assertions.assertEquals("aoqvuh", model.agentVersion()); - Assertions.assertEquals("cffcyddglmj", model.agentStatus()); + Assertions.assertEquals("jbavorxzdm", model.azureResourceId()); + Assertions.assertEquals("ctbqvudwx", model.agentVersion()); + Assertions.assertEquals("dnvowg", model.agentStatus()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AppServiceInfoInner model = new AppServiceInfoInner().withAzureResourceId("zvddntwndeicbtwn") - .withAgentVersion("aoqvuh") - .withAgentStatus("cffcyddglmj"); + AppServiceInfoInner model = new AppServiceInfoInner().withAzureResourceId("jbavorxzdm") + .withAgentVersion("ctbqvudwx") + .withAgentStatus("dnvowg"); model = BinaryData.fromObject(model).toObject(AppServiceInfoInner.class); - Assertions.assertEquals("zvddntwndeicbtwn", model.azureResourceId()); - Assertions.assertEquals("aoqvuh", model.agentVersion()); - Assertions.assertEquals("cffcyddglmj", model.agentStatus()); + Assertions.assertEquals("jbavorxzdm", model.azureResourceId()); + Assertions.assertEquals("ctbqvudwx", model.agentVersion()); + Assertions.assertEquals("dnvowg", model.agentStatus()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesGetRequestTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesGetRequestTests.java index 7db997430b41..1392f1380a2f 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesGetRequestTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesGetRequestTests.java @@ -12,20 +12,20 @@ public final class AppServicesGetRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AppServicesGetRequest model - = BinaryData.fromString("{\"azureResourceIds\":[\"sglumma\",\"tjaodxobnb\"],\"userEmail\":\"xkqpxo\"}") - .toObject(AppServicesGetRequest.class); - Assertions.assertEquals("sglumma", model.azureResourceIds().get(0)); - Assertions.assertEquals("xkqpxo", model.userEmail()); + AppServicesGetRequest model = BinaryData + .fromString("{\"azureResourceIds\":[\"dlwtgrhpdj\",\"jumasx\",\"zj\",\"qyeg\"],\"userEmail\":\"alhbx\"}") + .toObject(AppServicesGetRequest.class); + Assertions.assertEquals("dlwtgrhpdj", model.azureResourceIds().get(0)); + Assertions.assertEquals("alhbx", model.userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AppServicesGetRequest model - = new AppServicesGetRequest().withAzureResourceIds(Arrays.asList("sglumma", "tjaodxobnb")) - .withUserEmail("xkqpxo"); + = new AppServicesGetRequest().withAzureResourceIds(Arrays.asList("dlwtgrhpdj", "jumasx", "zj", "qyeg")) + .withUserEmail("alhbx"); model = BinaryData.fromObject(model).toObject(AppServicesGetRequest.class); - Assertions.assertEquals("sglumma", model.azureResourceIds().get(0)); - Assertions.assertEquals("xkqpxo", model.userEmail()); + Assertions.assertEquals("dlwtgrhpdj", model.azureResourceIds().get(0)); + Assertions.assertEquals("alhbx", model.userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesListResponseTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesListResponseTests.java index 85fc634ed835..bcb6a17e7244 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesListResponseTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/AppServicesListResponseTests.java @@ -14,32 +14,26 @@ public final class AppServicesListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AppServicesListResponse model = BinaryData.fromString( - "{\"value\":[{\"azureResourceId\":\"ionpimexg\",\"agentVersion\":\"xgcp\",\"agentStatus\":\"gmaajrm\"},{\"azureResourceId\":\"jwzrl\",\"agentVersion\":\"mcl\",\"agentStatus\":\"ijcoejctb\"},{\"azureResourceId\":\"qsqsy\",\"agentVersion\":\"kbfkg\",\"agentStatus\":\"dkexxppofm\"},{\"azureResourceId\":\"x\",\"agentVersion\":\"jpgd\",\"agentStatus\":\"ocjjxhvpmouexh\"}],\"nextLink\":\"xibqeojnx\"}") + "{\"value\":[{\"azureResourceId\":\"jj\",\"agentVersion\":\"v\",\"agentStatus\":\"dgwdslfhot\"},{\"azureResourceId\":\"cynpwlbjnp\",\"agentVersion\":\"cftadeh\",\"agentStatus\":\"ltyfsop\"}],\"nextLink\":\"suesnzw\"}") .toObject(AppServicesListResponse.class); - Assertions.assertEquals("ionpimexg", model.value().get(0).azureResourceId()); - Assertions.assertEquals("xgcp", model.value().get(0).agentVersion()); - Assertions.assertEquals("gmaajrm", model.value().get(0).agentStatus()); - Assertions.assertEquals("xibqeojnx", model.nextLink()); + Assertions.assertEquals("jj", model.value().get(0).azureResourceId()); + Assertions.assertEquals("v", model.value().get(0).agentVersion()); + Assertions.assertEquals("dgwdslfhot", model.value().get(0).agentStatus()); + Assertions.assertEquals("suesnzw", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AppServicesListResponse model = new AppServicesListResponse().withValue(Arrays.asList( - new AppServiceInfoInner().withAzureResourceId("ionpimexg") - .withAgentVersion("xgcp") - .withAgentStatus("gmaajrm"), - new AppServiceInfoInner().withAzureResourceId("jwzrl").withAgentVersion("mcl").withAgentStatus("ijcoejctb"), - new AppServiceInfoInner().withAzureResourceId("qsqsy") - .withAgentVersion("kbfkg") - .withAgentStatus("dkexxppofm"), - new AppServiceInfoInner().withAzureResourceId("x") - .withAgentVersion("jpgd") - .withAgentStatus("ocjjxhvpmouexh"))) - .withNextLink("xibqeojnx"); + new AppServiceInfoInner().withAzureResourceId("jj").withAgentVersion("v").withAgentStatus("dgwdslfhot"), + new AppServiceInfoInner().withAzureResourceId("cynpwlbjnp") + .withAgentVersion("cftadeh") + .withAgentStatus("ltyfsop"))) + .withNextLink("suesnzw"); model = BinaryData.fromObject(model).toObject(AppServicesListResponse.class); - Assertions.assertEquals("ionpimexg", model.value().get(0).azureResourceId()); - Assertions.assertEquals("xgcp", model.value().get(0).agentVersion()); - Assertions.assertEquals("gmaajrm", model.value().get(0).agentStatus()); - Assertions.assertEquals("xibqeojnx", model.nextLink()); + Assertions.assertEquals("jj", model.value().get(0).azureResourceId()); + Assertions.assertEquals("v", model.value().get(0).agentVersion()); + Assertions.assertEquals("dgwdslfhot", model.value().get(0).agentStatus()); + Assertions.assertEquals("suesnzw", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoResponseInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoResponseInnerTests.java index 252ab1418bef..c5a99421fa62 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoResponseInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoResponseInnerTests.java @@ -14,34 +14,39 @@ public final class BillingInfoResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BillingInfoResponseInner model = BinaryData.fromString( - "{\"marketplaceSaasInfo\":{\"marketplaceSubscriptionId\":\"eo\",\"marketplaceSubscriptionName\":\"okeyyienj\",\"marketplaceResourceId\":\"lwtgrhpdj\",\"marketplaceStatus\":\"umasxazjpq\",\"billedAzureSubscriptionId\":\"gual\"},\"partnerBillingEntity\":{\"organizationId\":\"xhejjzzvdud\",\"organizationName\":\"dslfhotwmcy\"}}") + "{\"marketplaceSaasInfo\":{\"marketplaceSubscriptionId\":\"qsycbkbfkgu\",\"marketplaceSubscriptionName\":\"kexxppof\",\"marketplaceResourceId\":\"axcfjpgddtocjjx\",\"marketplaceStatus\":\"pmouexhdz\",\"billedAzureSubscriptionId\":\"bqe\",\"publisherId\":\"nxqbzvddn\",\"offerId\":\"ndei\"},\"partnerBillingEntity\":{\"organizationId\":\"w\",\"organizationName\":\"zao\"}}") .toObject(BillingInfoResponseInner.class); - Assertions.assertEquals("eo", model.marketplaceSaasInfo().marketplaceSubscriptionId()); - Assertions.assertEquals("okeyyienj", model.marketplaceSaasInfo().marketplaceSubscriptionName()); - Assertions.assertEquals("lwtgrhpdj", model.marketplaceSaasInfo().marketplaceResourceId()); - Assertions.assertEquals("umasxazjpq", model.marketplaceSaasInfo().marketplaceStatus()); - Assertions.assertEquals("gual", model.marketplaceSaasInfo().billedAzureSubscriptionId()); - Assertions.assertEquals("xhejjzzvdud", model.partnerBillingEntity().organizationId()); - Assertions.assertEquals("dslfhotwmcy", model.partnerBillingEntity().organizationName()); + Assertions.assertEquals("qsycbkbfkgu", model.marketplaceSaasInfo().marketplaceSubscriptionId()); + Assertions.assertEquals("kexxppof", model.marketplaceSaasInfo().marketplaceSubscriptionName()); + Assertions.assertEquals("axcfjpgddtocjjx", model.marketplaceSaasInfo().marketplaceResourceId()); + Assertions.assertEquals("pmouexhdz", model.marketplaceSaasInfo().marketplaceStatus()); + Assertions.assertEquals("bqe", model.marketplaceSaasInfo().billedAzureSubscriptionId()); + Assertions.assertEquals("nxqbzvddn", model.marketplaceSaasInfo().publisherId()); + Assertions.assertEquals("ndei", model.marketplaceSaasInfo().offerId()); + Assertions.assertEquals("w", model.partnerBillingEntity().organizationId()); + Assertions.assertEquals("zao", model.partnerBillingEntity().organizationName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BillingInfoResponseInner model = new BillingInfoResponseInner() - .withMarketplaceSaasInfo(new MarketplaceSaaSInfo().withMarketplaceSubscriptionId("eo") - .withMarketplaceSubscriptionName("okeyyienj") - .withMarketplaceResourceId("lwtgrhpdj") - .withMarketplaceStatus("umasxazjpq") - .withBilledAzureSubscriptionId("gual")) - .withPartnerBillingEntity( - new PartnerBillingEntity().withOrganizationId("xhejjzzvdud").withOrganizationName("dslfhotwmcy")); + .withMarketplaceSaasInfo(new MarketplaceSaaSInfo().withMarketplaceSubscriptionId("qsycbkbfkgu") + .withMarketplaceSubscriptionName("kexxppof") + .withMarketplaceResourceId("axcfjpgddtocjjx") + .withMarketplaceStatus("pmouexhdz") + .withBilledAzureSubscriptionId("bqe") + .withPublisherId("nxqbzvddn") + .withOfferId("ndei")) + .withPartnerBillingEntity(new PartnerBillingEntity().withOrganizationId("w").withOrganizationName("zao")); model = BinaryData.fromObject(model).toObject(BillingInfoResponseInner.class); - Assertions.assertEquals("eo", model.marketplaceSaasInfo().marketplaceSubscriptionId()); - Assertions.assertEquals("okeyyienj", model.marketplaceSaasInfo().marketplaceSubscriptionName()); - Assertions.assertEquals("lwtgrhpdj", model.marketplaceSaasInfo().marketplaceResourceId()); - Assertions.assertEquals("umasxazjpq", model.marketplaceSaasInfo().marketplaceStatus()); - Assertions.assertEquals("gual", model.marketplaceSaasInfo().billedAzureSubscriptionId()); - Assertions.assertEquals("xhejjzzvdud", model.partnerBillingEntity().organizationId()); - Assertions.assertEquals("dslfhotwmcy", model.partnerBillingEntity().organizationName()); + Assertions.assertEquals("qsycbkbfkgu", model.marketplaceSaasInfo().marketplaceSubscriptionId()); + Assertions.assertEquals("kexxppof", model.marketplaceSaasInfo().marketplaceSubscriptionName()); + Assertions.assertEquals("axcfjpgddtocjjx", model.marketplaceSaasInfo().marketplaceResourceId()); + Assertions.assertEquals("pmouexhdz", model.marketplaceSaasInfo().marketplaceStatus()); + Assertions.assertEquals("bqe", model.marketplaceSaasInfo().billedAzureSubscriptionId()); + Assertions.assertEquals("nxqbzvddn", model.marketplaceSaasInfo().publisherId()); + Assertions.assertEquals("ndei", model.marketplaceSaasInfo().offerId()); + Assertions.assertEquals("w", model.partnerBillingEntity().organizationId()); + Assertions.assertEquals("zao", model.partnerBillingEntity().organizationName()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoesGetWithResponseMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoesGetWithResponseMockTests.java index 3ebe4e42b308..059ac191b71b 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoesGetWithResponseMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/BillingInfoesGetWithResponseMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.BillingInfoResponse; @@ -21,25 +21,27 @@ public final class BillingInfoesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"marketplaceSaasInfo\":{\"marketplaceSubscriptionId\":\"mkcxozapvh\",\"marketplaceSubscriptionName\":\"xprglyatddc\",\"marketplaceResourceId\":\"bcuejrjxgci\",\"marketplaceStatus\":\"brh\",\"billedAzureSubscriptionId\":\"xsdqrhzoymibmrqy\"},\"partnerBillingEntity\":{\"organizationId\":\"hwflu\",\"organizationName\":\"dtmhrkwofyyvoqa\"}}"; + = "{\"marketplaceSaasInfo\":{\"marketplaceSubscriptionId\":\"kallatmel\",\"marketplaceSubscriptionName\":\"ipicc\",\"marketplaceResourceId\":\"kzivgvvcnayrh\",\"marketplaceStatus\":\"nxxmueedndrdv\",\"billedAzureSubscriptionId\":\"kwqqtchealmf\",\"publisherId\":\"d\",\"offerId\":\"ygdvwv\"},\"partnerBillingEntity\":{\"organizationId\":\"ohgwxrtfudxepxg\",\"organizationName\":\"agvrvmnpkuk\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BillingInfoResponse response = manager.billingInfoes() - .getWithResponse("gkopkwhojvpajqgx", "smocmbq", com.azure.core.util.Context.NONE) + .getWithResponse("oocrkvcikhnv", "amqgxqquezikyw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("mkcxozapvh", response.marketplaceSaasInfo().marketplaceSubscriptionId()); - Assertions.assertEquals("xprglyatddc", response.marketplaceSaasInfo().marketplaceSubscriptionName()); - Assertions.assertEquals("bcuejrjxgci", response.marketplaceSaasInfo().marketplaceResourceId()); - Assertions.assertEquals("brh", response.marketplaceSaasInfo().marketplaceStatus()); - Assertions.assertEquals("xsdqrhzoymibmrqy", response.marketplaceSaasInfo().billedAzureSubscriptionId()); - Assertions.assertEquals("hwflu", response.partnerBillingEntity().organizationId()); - Assertions.assertEquals("dtmhrkwofyyvoqa", response.partnerBillingEntity().organizationName()); + Assertions.assertEquals("kallatmel", response.marketplaceSaasInfo().marketplaceSubscriptionId()); + Assertions.assertEquals("ipicc", response.marketplaceSaasInfo().marketplaceSubscriptionName()); + Assertions.assertEquals("kzivgvvcnayrh", response.marketplaceSaasInfo().marketplaceResourceId()); + Assertions.assertEquals("nxxmueedndrdv", response.marketplaceSaasInfo().marketplaceStatus()); + Assertions.assertEquals("kwqqtchealmf", response.marketplaceSaasInfo().billedAzureSubscriptionId()); + Assertions.assertEquals("d", response.marketplaceSaasInfo().publisherId()); + Assertions.assertEquals("ygdvwv", response.marketplaceSaasInfo().offerId()); + Assertions.assertEquals("ohgwxrtfudxepxg", response.partnerBillingEntity().organizationId()); + Assertions.assertEquals("agvrvmnpkuk", response.partnerBillingEntity().organizationName()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcePropertiesTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcePropertiesTests.java index 78a5f626f134..2ec0c46766b0 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcePropertiesTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcePropertiesTests.java @@ -12,25 +12,24 @@ public final class ConnectedPartnerResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConnectedPartnerResourceProperties model = BinaryData.fromString( - "{\"accountName\":\"agfuaxbezyiu\",\"accountId\":\"ktwh\",\"azureResourceId\":\"xw\",\"location\":\"wqsmbsur\"}") + "{\"accountName\":\"czvyifq\",\"accountId\":\"kdvjsll\",\"azureResourceId\":\"vvdfwatkpnpul\",\"location\":\"xbczwtruwiqz\"}") .toObject(ConnectedPartnerResourceProperties.class); - Assertions.assertEquals("agfuaxbezyiu", model.accountName()); - Assertions.assertEquals("ktwh", model.accountId()); - Assertions.assertEquals("xw", model.azureResourceId()); - Assertions.assertEquals("wqsmbsur", model.location()); + Assertions.assertEquals("czvyifq", model.accountName()); + Assertions.assertEquals("kdvjsll", model.accountId()); + Assertions.assertEquals("vvdfwatkpnpul", model.azureResourceId()); + Assertions.assertEquals("xbczwtruwiqz", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConnectedPartnerResourceProperties model - = new ConnectedPartnerResourceProperties().withAccountName("agfuaxbezyiu") - .withAccountId("ktwh") - .withAzureResourceId("xw") - .withLocation("wqsmbsur"); + ConnectedPartnerResourceProperties model = new ConnectedPartnerResourceProperties().withAccountName("czvyifq") + .withAccountId("kdvjsll") + .withAzureResourceId("vvdfwatkpnpul") + .withLocation("xbczwtruwiqz"); model = BinaryData.fromObject(model).toObject(ConnectedPartnerResourceProperties.class); - Assertions.assertEquals("agfuaxbezyiu", model.accountName()); - Assertions.assertEquals("ktwh", model.accountId()); - Assertions.assertEquals("xw", model.azureResourceId()); - Assertions.assertEquals("wqsmbsur", model.location()); + Assertions.assertEquals("czvyifq", model.accountName()); + Assertions.assertEquals("kdvjsll", model.accountId()); + Assertions.assertEquals("vvdfwatkpnpul", model.azureResourceId()); + Assertions.assertEquals("xbczwtruwiqz", model.location()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListFormatInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListFormatInnerTests.java index 2098027dad22..01addb99f688 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListFormatInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListFormatInnerTests.java @@ -13,25 +13,25 @@ public final class ConnectedPartnerResourcesListFormatInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConnectedPartnerResourcesListFormatInner model = BinaryData.fromString( - "{\"properties\":{\"accountName\":\"eupfhyhltrpm\",\"accountId\":\"jmcmatuokthfu\",\"azureResourceId\":\"aodsfcpkv\",\"location\":\"dpuozmyz\"}}") + "{\"properties\":{\"accountName\":\"reximoryocfs\",\"accountId\":\"s\",\"azureResourceId\":\"ddystkiiuxhqy\",\"location\":\"xorrqnb\"}}") .toObject(ConnectedPartnerResourcesListFormatInner.class); - Assertions.assertEquals("eupfhyhltrpm", model.properties().accountName()); - Assertions.assertEquals("jmcmatuokthfu", model.properties().accountId()); - Assertions.assertEquals("aodsfcpkv", model.properties().azureResourceId()); - Assertions.assertEquals("dpuozmyz", model.properties().location()); + Assertions.assertEquals("reximoryocfs", model.properties().accountName()); + Assertions.assertEquals("s", model.properties().accountId()); + Assertions.assertEquals("ddystkiiuxhqy", model.properties().azureResourceId()); + Assertions.assertEquals("xorrqnb", model.properties().location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ConnectedPartnerResourcesListFormatInner model = new ConnectedPartnerResourcesListFormatInner() - .withProperties(new ConnectedPartnerResourceProperties().withAccountName("eupfhyhltrpm") - .withAccountId("jmcmatuokthfu") - .withAzureResourceId("aodsfcpkv") - .withLocation("dpuozmyz")); + .withProperties(new ConnectedPartnerResourceProperties().withAccountName("reximoryocfs") + .withAccountId("s") + .withAzureResourceId("ddystkiiuxhqy") + .withLocation("xorrqnb")); model = BinaryData.fromObject(model).toObject(ConnectedPartnerResourcesListFormatInner.class); - Assertions.assertEquals("eupfhyhltrpm", model.properties().accountName()); - Assertions.assertEquals("jmcmatuokthfu", model.properties().accountId()); - Assertions.assertEquals("aodsfcpkv", model.properties().azureResourceId()); - Assertions.assertEquals("dpuozmyz", model.properties().location()); + Assertions.assertEquals("reximoryocfs", model.properties().accountName()); + Assertions.assertEquals("s", model.properties().accountId()); + Assertions.assertEquals("ddystkiiuxhqy", model.properties().azureResourceId()); + Assertions.assertEquals("xorrqnb", model.properties().location()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListMockTests.java index 7a755063b322..b1b43e0a4fd2 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.ConnectedPartnerResourcesListFormat; @@ -22,21 +22,21 @@ public final class ConnectedPartnerResourcesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"accountName\":\"nqxwbp\",\"accountId\":\"ulpiuj\",\"azureResourceId\":\"asipqiio\",\"location\":\"uqerpqlpqwc\"}}]}"; + = "{\"value\":[{\"properties\":{\"accountName\":\"zk\",\"accountId\":\"oqreyfkzikfjawn\",\"azureResourceId\":\"ivx\",\"location\":\"zel\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.connectedPartnerResources() - .list("piexpbtgiw", "wo", "nwashrtd", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.connectedPartnerResources().list("himdbl", "gwimfn", "hfjx", com.azure.core.util.Context.NONE); - Assertions.assertEquals("nqxwbp", response.iterator().next().properties().accountName()); - Assertions.assertEquals("ulpiuj", response.iterator().next().properties().accountId()); - Assertions.assertEquals("asipqiio", response.iterator().next().properties().azureResourceId()); - Assertions.assertEquals("uqerpqlpqwc", response.iterator().next().properties().location()); + Assertions.assertEquals("zk", response.iterator().next().properties().accountName()); + Assertions.assertEquals("oqreyfkzikfjawn", response.iterator().next().properties().accountId()); + Assertions.assertEquals("ivx", response.iterator().next().properties().azureResourceId()); + Assertions.assertEquals("zel", response.iterator().next().properties().location()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListResponseTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListResponseTests.java index 0050e646ca84..8dd9495863c5 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListResponseTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ConnectedPartnerResourcesListResponseTests.java @@ -15,13 +15,13 @@ public final class ConnectedPartnerResourcesListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConnectedPartnerResourcesListResponse model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"accountName\":\"ggd\",\"accountId\":\"ixhbkuofqweykhm\",\"azureResourceId\":\"evfyexfwhybcib\",\"location\":\"vdcsitynn\"}},{\"properties\":{\"accountName\":\"dectehfiqsc\",\"accountId\":\"ypvhezrkg\",\"azureResourceId\":\"c\",\"location\":\"efovgmk\"}},{\"properties\":{\"accountName\":\"eyyvxyqjpkcat\",\"accountId\":\"ngj\",\"azureResourceId\":\"cczsq\",\"location\":\"hvmdajvnysounq\"}}],\"nextLink\":\"a\"}") + "{\"value\":[{\"properties\":{\"accountName\":\"gwdkcglhsl\",\"accountId\":\"jdyggdtji\",\"azureResourceId\":\"b\",\"location\":\"ofqweykhmenevfye\"}},{\"properties\":{\"accountName\":\"hybcibv\",\"accountId\":\"dcsi\",\"azureResourceId\":\"nnaamdectehfiqsc\",\"location\":\"ypvhezrkg\"}},{\"properties\":{\"accountName\":\"jrefovgmkqsle\",\"accountId\":\"vxyqjpkcattpngjc\",\"azureResourceId\":\"czsqpjhvm\",\"location\":\"jvnysounqe\"}},{\"properties\":{\"accountName\":\"oaeupfhyhltrpmo\",\"accountId\":\"mcmatuokthfuiu\",\"azureResourceId\":\"dsfcpkvxodpuoz\",\"location\":\"zydagfuaxbezyiuo\"}}],\"nextLink\":\"twhrdxwzywqsm\"}") .toObject(ConnectedPartnerResourcesListResponse.class); - Assertions.assertEquals("ggd", model.value().get(0).properties().accountName()); - Assertions.assertEquals("ixhbkuofqweykhm", model.value().get(0).properties().accountId()); - Assertions.assertEquals("evfyexfwhybcib", model.value().get(0).properties().azureResourceId()); - Assertions.assertEquals("vdcsitynn", model.value().get(0).properties().location()); - Assertions.assertEquals("a", model.nextLink()); + Assertions.assertEquals("gwdkcglhsl", model.value().get(0).properties().accountName()); + Assertions.assertEquals("jdyggdtji", model.value().get(0).properties().accountId()); + Assertions.assertEquals("b", model.value().get(0).properties().azureResourceId()); + Assertions.assertEquals("ofqweykhmenevfye", model.value().get(0).properties().location()); + Assertions.assertEquals("twhrdxwzywqsm", model.nextLink()); } @org.junit.jupiter.api.Test @@ -29,26 +29,31 @@ public void testSerialize() throws Exception { ConnectedPartnerResourcesListResponse model = new ConnectedPartnerResourcesListResponse().withValue(Arrays.asList( new ConnectedPartnerResourcesListFormatInner() - .withProperties(new ConnectedPartnerResourceProperties().withAccountName("ggd") - .withAccountId("ixhbkuofqweykhm") - .withAzureResourceId("evfyexfwhybcib") - .withLocation("vdcsitynn")), + .withProperties(new ConnectedPartnerResourceProperties().withAccountName("gwdkcglhsl") + .withAccountId("jdyggdtji") + .withAzureResourceId("b") + .withLocation("ofqweykhmenevfye")), new ConnectedPartnerResourcesListFormatInner() - .withProperties(new ConnectedPartnerResourceProperties().withAccountName("dectehfiqsc") - .withAccountId("ypvhezrkg") - .withAzureResourceId("c") - .withLocation("efovgmk")), + .withProperties(new ConnectedPartnerResourceProperties().withAccountName("hybcibv") + .withAccountId("dcsi") + .withAzureResourceId("nnaamdectehfiqsc") + .withLocation("ypvhezrkg")), new ConnectedPartnerResourcesListFormatInner() - .withProperties(new ConnectedPartnerResourceProperties().withAccountName("eyyvxyqjpkcat") - .withAccountId("ngj") - .withAzureResourceId("cczsq") - .withLocation("hvmdajvnysounq")))) - .withNextLink("a"); + .withProperties(new ConnectedPartnerResourceProperties().withAccountName("jrefovgmkqsle") + .withAccountId("vxyqjpkcattpngjc") + .withAzureResourceId("czsqpjhvm") + .withLocation("jvnysounqe")), + new ConnectedPartnerResourcesListFormatInner() + .withProperties(new ConnectedPartnerResourceProperties().withAccountName("oaeupfhyhltrpmo") + .withAccountId("mcmatuokthfuiu") + .withAzureResourceId("dsfcpkvxodpuoz") + .withLocation("zydagfuaxbezyiuo")))) + .withNextLink("twhrdxwzywqsm"); model = BinaryData.fromObject(model).toObject(ConnectedPartnerResourcesListResponse.class); - Assertions.assertEquals("ggd", model.value().get(0).properties().accountName()); - Assertions.assertEquals("ixhbkuofqweykhm", model.value().get(0).properties().accountId()); - Assertions.assertEquals("evfyexfwhybcib", model.value().get(0).properties().azureResourceId()); - Assertions.assertEquals("vdcsitynn", model.value().get(0).properties().location()); - Assertions.assertEquals("a", model.nextLink()); + Assertions.assertEquals("gwdkcglhsl", model.value().get(0).properties().accountName()); + Assertions.assertEquals("jdyggdtji", model.value().get(0).properties().accountId()); + Assertions.assertEquals("b", model.value().get(0).properties().azureResourceId()); + Assertions.assertEquals("ofqweykhmenevfye", model.value().get(0).properties().location()); + Assertions.assertEquals("twhrdxwzywqsm", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/FilteringTagTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/FilteringTagTests.java index fb4a30587bf4..915dd5652e3e 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/FilteringTagTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/FilteringTagTests.java @@ -12,19 +12,22 @@ public final class FilteringTagTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FilteringTag model = BinaryData.fromString("{\"name\":\"ajzyul\",\"value\":\"u\",\"action\":\"Exclude\"}") + FilteringTag model = BinaryData + .fromString("{\"name\":\"xlzevgbmqjqabcy\",\"value\":\"ivkwlzuvccfwnfnb\",\"action\":\"Include\"}") .toObject(FilteringTag.class); - Assertions.assertEquals("ajzyul", model.name()); - Assertions.assertEquals("u", model.value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.action()); + Assertions.assertEquals("xlzevgbmqjqabcy", model.name()); + Assertions.assertEquals("ivkwlzuvccfwnfnb", model.value()); + Assertions.assertEquals(TagAction.INCLUDE, model.action()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FilteringTag model = new FilteringTag().withName("ajzyul").withValue("u").withAction(TagAction.EXCLUDE); + FilteringTag model = new FilteringTag().withName("xlzevgbmqjqabcy") + .withValue("ivkwlzuvccfwnfnb") + .withAction(TagAction.INCLUDE); model = BinaryData.fromObject(model).toObject(FilteringTag.class); - Assertions.assertEquals("ajzyul", model.name()); - Assertions.assertEquals("u", model.value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.action()); + Assertions.assertEquals("xlzevgbmqjqabcy", model.name()); + Assertions.assertEquals("ivkwlzuvccfwnfnb", model.value()); + Assertions.assertEquals(TagAction.INCLUDE, model.action()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/HostsGetRequestTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/HostsGetRequestTests.java index 2dc98d1789da..21ab3b528813 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/HostsGetRequestTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/HostsGetRequestTests.java @@ -12,18 +12,17 @@ public final class HostsGetRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - HostsGetRequest model = BinaryData.fromString("{\"vmIds\":[\"uhrzayvvt\"],\"userEmail\":\"gvdfgiotkftutq\"}") + HostsGetRequest model = BinaryData.fromString("{\"vmIds\":[\"vsovmyokac\"],\"userEmail\":\"pkwlhz\"}") .toObject(HostsGetRequest.class); - Assertions.assertEquals("uhrzayvvt", model.vmIds().get(0)); - Assertions.assertEquals("gvdfgiotkftutq", model.userEmail()); + Assertions.assertEquals("vsovmyokac", model.vmIds().get(0)); + Assertions.assertEquals("pkwlhz", model.userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HostsGetRequest model - = new HostsGetRequest().withVmIds(Arrays.asList("uhrzayvvt")).withUserEmail("gvdfgiotkftutq"); + HostsGetRequest model = new HostsGetRequest().withVmIds(Arrays.asList("vsovmyokac")).withUserEmail("pkwlhz"); model = BinaryData.fromObject(model).toObject(HostsGetRequest.class); - Assertions.assertEquals("uhrzayvvt", model.vmIds().get(0)); - Assertions.assertEquals("gvdfgiotkftutq", model.userEmail()); + Assertions.assertEquals("vsovmyokac", model.vmIds().get(0)); + Assertions.assertEquals("pkwlhz", model.userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LatestLinkedSaaSResponseInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LatestLinkedSaaSResponseInnerTests.java new file mode 100644 index 000000000000..570f0927999f --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LatestLinkedSaaSResponseInnerTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.newrelicobservability.fluent.models.LatestLinkedSaaSResponseInner; +import org.junit.jupiter.api.Assertions; + +public final class LatestLinkedSaaSResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LatestLinkedSaaSResponseInner model + = BinaryData.fromString("{\"saaSResourceId\":\"lokeyy\",\"isHiddenSaaS\":false}") + .toObject(LatestLinkedSaaSResponseInner.class); + Assertions.assertEquals("lokeyy", model.saaSResourceId()); + Assertions.assertFalse(model.isHiddenSaaS()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LatestLinkedSaaSResponseInner model + = new LatestLinkedSaaSResponseInner().withSaaSResourceId("lokeyy").withIsHiddenSaaS(false); + model = BinaryData.fromObject(model).toObject(LatestLinkedSaaSResponseInner.class); + Assertions.assertEquals("lokeyy", model.saaSResourceId()); + Assertions.assertFalse(model.isHiddenSaaS()); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LinkedResourceInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LinkedResourceInnerTests.java index b66a3d9a7dfc..a6db944eaa3b 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LinkedResourceInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LinkedResourceInnerTests.java @@ -11,14 +11,14 @@ public final class LinkedResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LinkedResourceInner model = BinaryData.fromString("{\"id\":\"hkfpbs\"}").toObject(LinkedResourceInner.class); - Assertions.assertEquals("hkfpbs", model.id()); + LinkedResourceInner model = BinaryData.fromString("{\"id\":\"gygev\"}").toObject(LinkedResourceInner.class); + Assertions.assertEquals("gygev", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LinkedResourceInner model = new LinkedResourceInner().withId("hkfpbs"); + LinkedResourceInner model = new LinkedResourceInner().withId("gygev"); model = BinaryData.fromObject(model).toObject(LinkedResourceInner.class); - Assertions.assertEquals("hkfpbs", model.id()); + Assertions.assertEquals("gygev", model.id()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LinkedResourceListResponseTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LinkedResourceListResponseTests.java index 9f573a57da3f..6feb3e598b0e 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LinkedResourceListResponseTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LinkedResourceListResponseTests.java @@ -14,20 +14,20 @@ public final class LinkedResourceListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LinkedResourceListResponse model = BinaryData.fromString( - "{\"value\":[{\"id\":\"ovawjvzunlu\"},{\"id\":\"nnprn\"},{\"id\":\"peilpjzuaejxdu\"},{\"id\":\"skzbb\"}],\"nextLink\":\"zumveekgpwo\"}") + "{\"value\":[{\"id\":\"rvjx\"},{\"id\":\"nspydptkoenkoukn\"},{\"id\":\"dwtiukbldngkp\"}],\"nextLink\":\"ipazyxoegukgjnpi\"}") .toObject(LinkedResourceListResponse.class); - Assertions.assertEquals("ovawjvzunlu", model.value().get(0).id()); - Assertions.assertEquals("zumveekgpwo", model.nextLink()); + Assertions.assertEquals("rvjx", model.value().get(0).id()); + Assertions.assertEquals("ipazyxoegukgjnpi", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LinkedResourceListResponse model = new LinkedResourceListResponse().withValue( - Arrays.asList(new LinkedResourceInner().withId("ovawjvzunlu"), new LinkedResourceInner().withId("nnprn"), - new LinkedResourceInner().withId("peilpjzuaejxdu"), new LinkedResourceInner().withId("skzbb"))) - .withNextLink("zumveekgpwo"); + LinkedResourceListResponse model + = new LinkedResourceListResponse().withValue(Arrays.asList(new LinkedResourceInner().withId("rvjx"), + new LinkedResourceInner().withId("nspydptkoenkoukn"), + new LinkedResourceInner().withId("dwtiukbldngkp"))).withNextLink("ipazyxoegukgjnpi"); model = BinaryData.fromObject(model).toObject(LinkedResourceListResponse.class); - Assertions.assertEquals("ovawjvzunlu", model.value().get(0).id()); - Assertions.assertEquals("zumveekgpwo", model.nextLink()); + Assertions.assertEquals("rvjx", model.value().get(0).id()); + Assertions.assertEquals("ipazyxoegukgjnpi", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LogRulesTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LogRulesTests.java index aa0ce282df42..e5cea768f784 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LogRulesTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/LogRulesTests.java @@ -18,33 +18,29 @@ public final class LogRulesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LogRules model = BinaryData.fromString( - "{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"cohoq\",\"value\":\"wvl\",\"action\":\"Exclude\"},{\"name\":\"w\",\"value\":\"eun\",\"action\":\"Exclude\"},{\"name\":\"gyxzk\",\"value\":\"ocukoklyax\",\"action\":\"Include\"},{\"name\":\"uqszfk\",\"value\":\"ypewrmjmwvvjekt\",\"action\":\"Include\"}]}") + "{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"lpvlopw\",\"value\":\"ighxpk\",\"action\":\"Include\"}]}") .toObject(LogRules.class); Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.sendAadLogs()); Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.sendActivityLogs()); - Assertions.assertEquals("cohoq", model.filteringTags().get(0).name()); - Assertions.assertEquals("wvl", model.filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.filteringTags().get(0).action()); + Assertions.assertEquals("lpvlopw", model.filteringTags().get(0).name()); + Assertions.assertEquals("ighxpk", model.filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.filteringTags().get(0).action()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LogRules model - = new LogRules().withSendAadLogs(SendAadLogsStatus.DISABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) - .withSendActivityLogs(SendActivityLogsStatus.ENABLED) - .withFilteringTags(Arrays.asList( - new FilteringTag().withName("cohoq").withValue("wvl").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("w").withValue("eun").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("gyxzk").withValue("ocukoklyax").withAction(TagAction.INCLUDE), - new FilteringTag().withName("uqszfk").withValue("ypewrmjmwvvjekt").withAction(TagAction.INCLUDE))); + LogRules model = new LogRules().withSendAadLogs(SendAadLogsStatus.DISABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) + .withSendActivityLogs(SendActivityLogsStatus.ENABLED) + .withFilteringTags(Arrays + .asList(new FilteringTag().withName("lpvlopw").withValue("ighxpk").withAction(TagAction.INCLUDE))); model = BinaryData.fromObject(model).toObject(LogRules.class); Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.sendAadLogs()); Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.sendActivityLogs()); - Assertions.assertEquals("cohoq", model.filteringTags().get(0).name()); - Assertions.assertEquals("wvl", model.filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.filteringTags().get(0).action()); + Assertions.assertEquals("lpvlopw", model.filteringTags().get(0).name()); + Assertions.assertEquals("ighxpk", model.filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.filteringTags().get(0).action()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ManagedServiceIdentityTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ManagedServiceIdentityTests.java index 708b84daff54..15a8b4676018 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ManagedServiceIdentityTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ManagedServiceIdentityTests.java @@ -16,18 +16,20 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"75fdddf1-34ed-403d-a999-eec88656d385\",\"tenantId\":\"cb80e5fd-eeda-441a-9d44-7f1c05d10843\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ouskcqvkocrc\":{\"principalId\":\"836ffa5f-e375-4881-a6a8-acd28aed400d\",\"clientId\":\"22362e8c-fd72-46b4-a17a-7f7f0bee706b\"},\"wtnhxbnjbiksqr\":{\"principalId\":\"a007c039-a4df-48d8-b027-7bd359606dab\",\"clientId\":\"5556f777-4590-42f3-bab6-93752d3cb33a\"}}}") + "{\"principalId\":\"3859c678-22ca-4169-99be-588188ce673a\",\"tenantId\":\"c4207531-7bbd-4851-a4f7-b7dde05019f0\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"gphuticndvka\":{\"principalId\":\"f8db801d-7e2f-46ca-aad1-a772e171f766\",\"clientId\":\"d9a49088-f6b0-47c6-815d-c19a1d12c699\"},\"yiftyhxhuro\":{\"principalId\":\"45af7d1d-0093-40cd-a434-0642bfc87518\",\"clientId\":\"80a186a0-5d2b-4bde-ae09-25c2113a5165\"},\"yxolniwp\":{\"principalId\":\"3eb4b09a-5f2b-443a-b283-2c4ad2d3df33\",\"clientId\":\"d58e40ae-c8ae-46a3-adce-9f35a9f6ed21\"},\"kjfkg\":{\"principalId\":\"3c0635ef-ff91-491d-8a73-87ebee31d842\",\"clientId\":\"a0527428-cad5-4fc3-91b4-fa1cd5ed9bad\"}}}") .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("ouskcqvkocrc", new UserAssignedIdentity(), "wtnhxbnjbiksqr", new UserAssignedIdentity())); + ManagedServiceIdentity model + = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf("gphuticndvka", new UserAssignedIdentity(), "yiftyhxhuro", new UserAssignedIdentity(), + "yxolniwp", new UserAssignedIdentity(), "kjfkg", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } // Use "Map.of" if available diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MarketplaceSaaSInfoTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MarketplaceSaaSInfoTests.java index df3fd2aa3011..b6abe976dacd 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MarketplaceSaaSInfoTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MarketplaceSaaSInfoTests.java @@ -12,27 +12,33 @@ public final class MarketplaceSaaSInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MarketplaceSaaSInfo model = BinaryData.fromString( - "{\"marketplaceSubscriptionId\":\"wlbjnpgacftade\",\"marketplaceSubscriptionName\":\"nltyfsoppusuesnz\",\"marketplaceResourceId\":\"ej\",\"marketplaceStatus\":\"vorxzdmohct\",\"billedAzureSubscriptionId\":\"vudwx\"}") + "{\"marketplaceSubscriptionId\":\"uhrhcffcyddgl\",\"marketplaceSubscriptionName\":\"t\",\"marketplaceResourceId\":\"qkwpyeicxmqc\",\"marketplaceStatus\":\"q\",\"billedAzureSubscriptionId\":\"khixuigdtopbo\",\"publisherId\":\"og\",\"offerId\":\"e\"}") .toObject(MarketplaceSaaSInfo.class); - Assertions.assertEquals("wlbjnpgacftade", model.marketplaceSubscriptionId()); - Assertions.assertEquals("nltyfsoppusuesnz", model.marketplaceSubscriptionName()); - Assertions.assertEquals("ej", model.marketplaceResourceId()); - Assertions.assertEquals("vorxzdmohct", model.marketplaceStatus()); - Assertions.assertEquals("vudwx", model.billedAzureSubscriptionId()); + Assertions.assertEquals("uhrhcffcyddgl", model.marketplaceSubscriptionId()); + Assertions.assertEquals("t", model.marketplaceSubscriptionName()); + Assertions.assertEquals("qkwpyeicxmqc", model.marketplaceResourceId()); + Assertions.assertEquals("q", model.marketplaceStatus()); + Assertions.assertEquals("khixuigdtopbo", model.billedAzureSubscriptionId()); + Assertions.assertEquals("og", model.publisherId()); + Assertions.assertEquals("e", model.offerId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MarketplaceSaaSInfo model = new MarketplaceSaaSInfo().withMarketplaceSubscriptionId("wlbjnpgacftade") - .withMarketplaceSubscriptionName("nltyfsoppusuesnz") - .withMarketplaceResourceId("ej") - .withMarketplaceStatus("vorxzdmohct") - .withBilledAzureSubscriptionId("vudwx"); + MarketplaceSaaSInfo model = new MarketplaceSaaSInfo().withMarketplaceSubscriptionId("uhrhcffcyddgl") + .withMarketplaceSubscriptionName("t") + .withMarketplaceResourceId("qkwpyeicxmqc") + .withMarketplaceStatus("q") + .withBilledAzureSubscriptionId("khixuigdtopbo") + .withPublisherId("og") + .withOfferId("e"); model = BinaryData.fromObject(model).toObject(MarketplaceSaaSInfo.class); - Assertions.assertEquals("wlbjnpgacftade", model.marketplaceSubscriptionId()); - Assertions.assertEquals("nltyfsoppusuesnz", model.marketplaceSubscriptionName()); - Assertions.assertEquals("ej", model.marketplaceResourceId()); - Assertions.assertEquals("vorxzdmohct", model.marketplaceStatus()); - Assertions.assertEquals("vudwx", model.billedAzureSubscriptionId()); + Assertions.assertEquals("uhrhcffcyddgl", model.marketplaceSubscriptionId()); + Assertions.assertEquals("t", model.marketplaceSubscriptionName()); + Assertions.assertEquals("qkwpyeicxmqc", model.marketplaceResourceId()); + Assertions.assertEquals("q", model.marketplaceStatus()); + Assertions.assertEquals("khixuigdtopbo", model.billedAzureSubscriptionId()); + Assertions.assertEquals("og", model.publisherId()); + Assertions.assertEquals("e", model.offerId()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricRulesInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricRulesInnerTests.java index afcb03cd0f1e..931bcdc9c605 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricRulesInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricRulesInnerTests.java @@ -16,28 +16,30 @@ public final class MetricRulesInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MetricRulesInner model = BinaryData.fromString( - "{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"dsoifiyipj\",\"value\":\"qwpgrjbzn\",\"action\":\"Exclude\"},{\"name\":\"xv\",\"value\":\"byxqabn\",\"action\":\"Include\"},{\"name\":\"cyshurzafbljjgp\",\"value\":\"oq\",\"action\":\"Include\"}],\"userEmail\":\"ljavbqid\"}") + "{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"efgugnxk\",\"value\":\"dqmidtt\",\"action\":\"Include\"},{\"name\":\"qdrabhjybigehoqf\",\"value\":\"wska\",\"action\":\"Exclude\"},{\"name\":\"zlcuiywgqywgndrv\",\"value\":\"hzgpphrcgyncocpe\",\"action\":\"Include\"}],\"userEmail\":\"mcoo\"}") .toObject(MetricRulesInner.class); - Assertions.assertEquals(SendMetricsStatus.ENABLED, model.sendMetrics()); - Assertions.assertEquals("dsoifiyipj", model.filteringTags().get(0).name()); - Assertions.assertEquals("qwpgrjbzn", model.filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.filteringTags().get(0).action()); - Assertions.assertEquals("ljavbqid", model.userEmail()); + Assertions.assertEquals(SendMetricsStatus.DISABLED, model.sendMetrics()); + Assertions.assertEquals("efgugnxk", model.filteringTags().get(0).name()); + Assertions.assertEquals("dqmidtt", model.filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.filteringTags().get(0).action()); + Assertions.assertEquals("mcoo", model.userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MetricRulesInner model = new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) + MetricRulesInner model = new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) .withFilteringTags(Arrays.asList( - new FilteringTag().withName("dsoifiyipj").withValue("qwpgrjbzn").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("xv").withValue("byxqabn").withAction(TagAction.INCLUDE), - new FilteringTag().withName("cyshurzafbljjgp").withValue("oq").withAction(TagAction.INCLUDE))) - .withUserEmail("ljavbqid"); + new FilteringTag().withName("efgugnxk").withValue("dqmidtt").withAction(TagAction.INCLUDE), + new FilteringTag().withName("qdrabhjybigehoqf").withValue("wska").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("zlcuiywgqywgndrv") + .withValue("hzgpphrcgyncocpe") + .withAction(TagAction.INCLUDE))) + .withUserEmail("mcoo"); model = BinaryData.fromObject(model).toObject(MetricRulesInner.class); - Assertions.assertEquals(SendMetricsStatus.ENABLED, model.sendMetrics()); - Assertions.assertEquals("dsoifiyipj", model.filteringTags().get(0).name()); - Assertions.assertEquals("qwpgrjbzn", model.filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.filteringTags().get(0).action()); - Assertions.assertEquals("ljavbqid", model.userEmail()); + Assertions.assertEquals(SendMetricsStatus.DISABLED, model.sendMetrics()); + Assertions.assertEquals("efgugnxk", model.filteringTags().get(0).name()); + Assertions.assertEquals("dqmidtt", model.filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.filteringTags().get(0).action()); + Assertions.assertEquals("mcoo", model.userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsRequestTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsRequestTests.java index 01a90ad8d6ed..2a18f02d2da7 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsRequestTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsRequestTests.java @@ -12,14 +12,14 @@ public final class MetricsRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MetricsRequest model - = BinaryData.fromString("{\"userEmail\":\"rsoodqxhcrmnoh\"}").toObject(MetricsRequest.class); - Assertions.assertEquals("rsoodqxhcrmnoh", model.userEmail()); + = BinaryData.fromString("{\"userEmail\":\"gvdfgiotkftutq\"}").toObject(MetricsRequest.class); + Assertions.assertEquals("gvdfgiotkftutq", model.userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MetricsRequest model = new MetricsRequest().withUserEmail("rsoodqxhcrmnoh"); + MetricsRequest model = new MetricsRequest().withUserEmail("gvdfgiotkftutq"); model = BinaryData.fromObject(model).toObject(MetricsRequest.class); - Assertions.assertEquals("rsoodqxhcrmnoh", model.userEmail()); + Assertions.assertEquals("gvdfgiotkftutq", model.userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusRequestTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusRequestTests.java index 736ace07e176..5af6ebb19117 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusRequestTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusRequestTests.java @@ -12,19 +12,20 @@ public final class MetricsStatusRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MetricsStatusRequest model - = BinaryData.fromString("{\"azureResourceIds\":[\"khbzhfepgzg\",\"e\"],\"userEmail\":\"zloc\"}") - .toObject(MetricsStatusRequest.class); - Assertions.assertEquals("khbzhfepgzg", model.azureResourceIds().get(0)); - Assertions.assertEquals("zloc", model.userEmail()); + MetricsStatusRequest model = BinaryData.fromString( + "{\"azureResourceIds\":[\"nlebxetqgtzxd\",\"nqbqqwxr\",\"feallnwsu\",\"isnjampmngnz\"],\"userEmail\":\"c\"}") + .toObject(MetricsStatusRequest.class); + Assertions.assertEquals("nlebxetqgtzxd", model.azureResourceIds().get(0)); + Assertions.assertEquals("c", model.userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MetricsStatusRequest model - = new MetricsStatusRequest().withAzureResourceIds(Arrays.asList("khbzhfepgzg", "e")).withUserEmail("zloc"); + MetricsStatusRequest model = new MetricsStatusRequest() + .withAzureResourceIds(Arrays.asList("nlebxetqgtzxd", "nqbqqwxr", "feallnwsu", "isnjampmngnz")) + .withUserEmail("c"); model = BinaryData.fromObject(model).toObject(MetricsStatusRequest.class); - Assertions.assertEquals("khbzhfepgzg", model.azureResourceIds().get(0)); - Assertions.assertEquals("zloc", model.userEmail()); + Assertions.assertEquals("nlebxetqgtzxd", model.azureResourceIds().get(0)); + Assertions.assertEquals("c", model.userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusResponseInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusResponseInnerTests.java index a70fc21e72ec..b6ae20155a92 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusResponseInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MetricsStatusResponseInnerTests.java @@ -13,15 +13,16 @@ public final class MetricsStatusResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MetricsStatusResponseInner model - = BinaryData.fromString("{\"azureResourceIds\":[\"paierh\"]}").toObject(MetricsStatusResponseInner.class); - Assertions.assertEquals("paierh", model.azureResourceIds().get(0)); + = BinaryData.fromString("{\"azureResourceIds\":[\"wooc\",\"cbonqvpk\",\"lrxnjeaseiphe\"]}") + .toObject(MetricsStatusResponseInner.class); + Assertions.assertEquals("wooc", model.azureResourceIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MetricsStatusResponseInner model - = new MetricsStatusResponseInner().withAzureResourceIds(Arrays.asList("paierh")); + = new MetricsStatusResponseInner().withAzureResourceIds(Arrays.asList("wooc", "cbonqvpk", "lrxnjeaseiphe")); model = BinaryData.fromObject(model).toObject(MetricsStatusResponseInner.class); - Assertions.assertEquals("paierh", model.azureResourceIds().get(0)); + Assertions.assertEquals("wooc", model.azureResourceIds().get(0)); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceInnerTests.java index b674772c4048..8061b9dfa77d 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceInnerTests.java @@ -14,27 +14,27 @@ public final class MonitoredResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitoredResourceInner model = BinaryData.fromString( - "{\"id\":\"scxaq\",\"sendingMetrics\":\"Disabled\",\"reasonForMetricsStatus\":\"hcbonqvpkvlr\",\"sendingLogs\":\"Enabled\",\"reasonForLogsStatus\":\"ase\"}") + "{\"id\":\"mryw\",\"sendingMetrics\":\"Disabled\",\"reasonForMetricsStatus\":\"qftiy\",\"sendingLogs\":\"Disabled\",\"reasonForLogsStatus\":\"kcqvyxl\"}") .toObject(MonitoredResourceInner.class); - Assertions.assertEquals("scxaq", model.id()); + Assertions.assertEquals("mryw", model.id()); Assertions.assertEquals(SendingMetricsStatus.DISABLED, model.sendingMetrics()); - Assertions.assertEquals("hcbonqvpkvlr", model.reasonForMetricsStatus()); - Assertions.assertEquals(SendingLogsStatus.ENABLED, model.sendingLogs()); - Assertions.assertEquals("ase", model.reasonForLogsStatus()); + Assertions.assertEquals("qftiy", model.reasonForMetricsStatus()); + Assertions.assertEquals(SendingLogsStatus.DISABLED, model.sendingLogs()); + Assertions.assertEquals("kcqvyxl", model.reasonForLogsStatus()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MonitoredResourceInner model = new MonitoredResourceInner().withId("scxaq") + MonitoredResourceInner model = new MonitoredResourceInner().withId("mryw") .withSendingMetrics(SendingMetricsStatus.DISABLED) - .withReasonForMetricsStatus("hcbonqvpkvlr") - .withSendingLogs(SendingLogsStatus.ENABLED) - .withReasonForLogsStatus("ase"); + .withReasonForMetricsStatus("qftiy") + .withSendingLogs(SendingLogsStatus.DISABLED) + .withReasonForLogsStatus("kcqvyxl"); model = BinaryData.fromObject(model).toObject(MonitoredResourceInner.class); - Assertions.assertEquals("scxaq", model.id()); + Assertions.assertEquals("mryw", model.id()); Assertions.assertEquals(SendingMetricsStatus.DISABLED, model.sendingMetrics()); - Assertions.assertEquals("hcbonqvpkvlr", model.reasonForMetricsStatus()); - Assertions.assertEquals(SendingLogsStatus.ENABLED, model.sendingLogs()); - Assertions.assertEquals("ase", model.reasonForLogsStatus()); + Assertions.assertEquals("qftiy", model.reasonForMetricsStatus()); + Assertions.assertEquals(SendingLogsStatus.DISABLED, model.sendingLogs()); + Assertions.assertEquals("kcqvyxl", model.reasonForLogsStatus()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceListResponseTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceListResponseTests.java index 9624c2c18453..7da54f82515f 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceListResponseTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredResourceListResponseTests.java @@ -16,36 +16,36 @@ public final class MonitoredResourceListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitoredResourceListResponse model = BinaryData.fromString( - "{\"value\":[{\"id\":\"gyncocpecfvmmc\",\"sendingMetrics\":\"Disabled\",\"reasonForMetricsStatus\":\"xlzevgbmqjqabcy\",\"sendingLogs\":\"Disabled\",\"reasonForLogsStatus\":\"kwlzuvccfwnfn\"},{\"id\":\"cfionl\",\"sendingMetrics\":\"Enabled\",\"reasonForMetricsStatus\":\"tqgtzxdpnqbqq\",\"sendingLogs\":\"Disabled\",\"reasonForLogsStatus\":\"feallnwsu\"}],\"nextLink\":\"snjampmng\"}") + "{\"value\":[{\"id\":\"typmrbpizcdrqjsd\",\"sendingMetrics\":\"Disabled\",\"reasonForMetricsStatus\":\"fyhxde\",\"sendingLogs\":\"Disabled\",\"reasonForLogsStatus\":\"icwifsjtt\"},{\"id\":\"fbishcbkha\",\"sendingMetrics\":\"Enabled\",\"reasonForMetricsStatus\":\"eamdp\",\"sendingLogs\":\"Enabled\",\"reasonForLogsStatus\":\"lpbuxwgipwhonowk\"}],\"nextLink\":\"hwankixzbinjepu\"}") .toObject(MonitoredResourceListResponse.class); - Assertions.assertEquals("gyncocpecfvmmc", model.value().get(0).id()); + Assertions.assertEquals("typmrbpizcdrqjsd", model.value().get(0).id()); Assertions.assertEquals(SendingMetricsStatus.DISABLED, model.value().get(0).sendingMetrics()); - Assertions.assertEquals("xlzevgbmqjqabcy", model.value().get(0).reasonForMetricsStatus()); + Assertions.assertEquals("fyhxde", model.value().get(0).reasonForMetricsStatus()); Assertions.assertEquals(SendingLogsStatus.DISABLED, model.value().get(0).sendingLogs()); - Assertions.assertEquals("kwlzuvccfwnfn", model.value().get(0).reasonForLogsStatus()); - Assertions.assertEquals("snjampmng", model.nextLink()); + Assertions.assertEquals("icwifsjtt", model.value().get(0).reasonForLogsStatus()); + Assertions.assertEquals("hwankixzbinjepu", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MonitoredResourceListResponse model = new MonitoredResourceListResponse().withValue(Arrays.asList( - new MonitoredResourceInner().withId("gyncocpecfvmmc") + new MonitoredResourceInner().withId("typmrbpizcdrqjsd") .withSendingMetrics(SendingMetricsStatus.DISABLED) - .withReasonForMetricsStatus("xlzevgbmqjqabcy") + .withReasonForMetricsStatus("fyhxde") .withSendingLogs(SendingLogsStatus.DISABLED) - .withReasonForLogsStatus("kwlzuvccfwnfn"), - new MonitoredResourceInner().withId("cfionl") + .withReasonForLogsStatus("icwifsjtt"), + new MonitoredResourceInner().withId("fbishcbkha") .withSendingMetrics(SendingMetricsStatus.ENABLED) - .withReasonForMetricsStatus("tqgtzxdpnqbqq") - .withSendingLogs(SendingLogsStatus.DISABLED) - .withReasonForLogsStatus("feallnwsu"))) - .withNextLink("snjampmng"); + .withReasonForMetricsStatus("eamdp") + .withSendingLogs(SendingLogsStatus.ENABLED) + .withReasonForLogsStatus("lpbuxwgipwhonowk"))) + .withNextLink("hwankixzbinjepu"); model = BinaryData.fromObject(model).toObject(MonitoredResourceListResponse.class); - Assertions.assertEquals("gyncocpecfvmmc", model.value().get(0).id()); + Assertions.assertEquals("typmrbpizcdrqjsd", model.value().get(0).id()); Assertions.assertEquals(SendingMetricsStatus.DISABLED, model.value().get(0).sendingMetrics()); - Assertions.assertEquals("xlzevgbmqjqabcy", model.value().get(0).reasonForMetricsStatus()); + Assertions.assertEquals("fyhxde", model.value().get(0).reasonForMetricsStatus()); Assertions.assertEquals(SendingLogsStatus.DISABLED, model.value().get(0).sendingLogs()); - Assertions.assertEquals("kwlzuvccfwnfn", model.value().get(0).reasonForLogsStatus()); - Assertions.assertEquals("snjampmng", model.nextLink()); + Assertions.assertEquals("icwifsjtt", model.value().get(0).reasonForLogsStatus()); + Assertions.assertEquals("hwankixzbinjepu", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionInnerTests.java index 0418322d95f1..237d5895d12c 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionInnerTests.java @@ -23,67 +23,59 @@ public final class MonitoredSubscriptionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitoredSubscriptionInner model = BinaryData.fromString( - "{\"subscriptionId\":\"jawgqwg\",\"status\":\"InProgress\",\"error\":\"skxfbk\",\"tagRules\":{\"provisioningState\":\"Accepted\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"uwhvylwzbtdhxujz\",\"value\":\"mpowuwpr\",\"action\":\"Include\"},{\"name\":\"eualupjmkhf\",\"value\":\"bbcswsrtjri\",\"action\":\"Exclude\"},{\"name\":\"pbewtghfgblcgwx\",\"value\":\"lvqhjkbegibtnmx\",\"action\":\"Include\"},{\"name\":\"waloayqcgwr\",\"value\":\"j\",\"action\":\"Include\"}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"xongmtsavjcbpwxq\",\"value\":\"rknftguvriuhprwm\",\"action\":\"Exclude\"},{\"name\":\"qtayri\",\"value\":\"ro\",\"action\":\"Include\"},{\"name\":\"xrmcqibycnojvk\",\"value\":\"e\",\"action\":\"Exclude\"},{\"name\":\"zvahapjy\",\"value\":\"pvgqzcjrvxdjzlm\",\"action\":\"Exclude\"}],\"userEmail\":\"vu\"}}}") + "{\"subscriptionId\":\"buynhijggm\",\"status\":\"Failed\",\"error\":\"iarbutrcvpna\",\"tagRules\":{\"provisioningState\":\"Deleting\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"bh\",\"value\":\"nlankxmyskpb\",\"action\":\"Exclude\"},{\"name\":\"tkcxywnytnrsy\",\"value\":\"qidybyx\",\"action\":\"Exclude\"},{\"name\":\"lhaaxdbabp\",\"value\":\"wrqlfktsthsuco\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"bt\",\"value\":\"rq\",\"action\":\"Exclude\"}],\"userEmail\":\"ckzywbiexzfeyue\"}}}") .toObject(MonitoredSubscriptionInner.class); - Assertions.assertEquals("jawgqwg", model.subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.status()); - Assertions.assertEquals("skxfbk", model.error()); + Assertions.assertEquals("buynhijggm", model.subscriptionId()); + Assertions.assertEquals(Status.FAILED, model.status()); + Assertions.assertEquals("iarbutrcvpna", model.error()); Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.tagRules().logRules().sendAadLogs()); Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.tagRules().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.tagRules().logRules().sendActivityLogs()); - Assertions.assertEquals("uwhvylwzbtdhxujz", model.tagRules().logRules().filteringTags().get(0).name()); - Assertions.assertEquals("mpowuwpr", model.tagRules().logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.tagRules().logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.tagRules().logRules().sendActivityLogs()); + Assertions.assertEquals("bh", model.tagRules().logRules().filteringTags().get(0).name()); + Assertions.assertEquals("nlankxmyskpb", model.tagRules().logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, model.tagRules().logRules().filteringTags().get(0).action()); Assertions.assertEquals(SendMetricsStatus.ENABLED, model.tagRules().metricRules().sendMetrics()); - Assertions.assertEquals("xongmtsavjcbpwxq", model.tagRules().metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("rknftguvriuhprwm", model.tagRules().metricRules().filteringTags().get(0).value()); + Assertions.assertEquals("bt", model.tagRules().metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("rq", model.tagRules().metricRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.EXCLUDE, model.tagRules().metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("vu", model.tagRules().metricRules().userEmail()); + Assertions.assertEquals("ckzywbiexzfeyue", model.tagRules().metricRules().userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MonitoredSubscriptionInner model = new MonitoredSubscriptionInner().withSubscriptionId("jawgqwg") - .withStatus(Status.IN_PROGRESS) - .withError("skxfbk") - .withTagRules(new MonitoringTagRulesPropertiesInner().withLogRules(new LogRules() - .withSendAadLogs(SendAadLogsStatus.ENABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) - .withSendActivityLogs(SendActivityLogsStatus.DISABLED) - .withFilteringTags(Arrays.asList( - new FilteringTag().withName("uwhvylwzbtdhxujz").withValue("mpowuwpr").withAction(TagAction.INCLUDE), - new FilteringTag().withName("eualupjmkhf").withValue("bbcswsrtjri").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("pbewtghfgblcgwx") - .withValue("lvqhjkbegibtnmx") - .withAction(TagAction.INCLUDE), - new FilteringTag().withName("waloayqcgwr").withValue("j").withAction(TagAction.INCLUDE)))) - .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) + MonitoredSubscriptionInner model = new MonitoredSubscriptionInner().withSubscriptionId("buynhijggm") + .withStatus(Status.FAILED) + .withError("iarbutrcvpna") + .withTagRules(new MonitoringTagRulesPropertiesInner() + .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) + .withSendActivityLogs(SendActivityLogsStatus.ENABLED) .withFilteringTags(Arrays.asList( - new FilteringTag().withName("xongmtsavjcbpwxq") - .withValue("rknftguvriuhprwm") - .withAction(TagAction.EXCLUDE), - new FilteringTag().withName("qtayri").withValue("ro").withAction(TagAction.INCLUDE), - new FilteringTag().withName("xrmcqibycnojvk").withValue("e").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("zvahapjy") - .withValue("pvgqzcjrvxdjzlm") - .withAction(TagAction.EXCLUDE))) - .withUserEmail("vu"))); + new FilteringTag().withName("bh").withValue("nlankxmyskpb").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("tkcxywnytnrsy").withValue("qidybyx").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("lhaaxdbabp") + .withValue("wrqlfktsthsuco") + .withAction(TagAction.EXCLUDE)))) + .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) + .withFilteringTags( + Arrays.asList(new FilteringTag().withName("bt").withValue("rq").withAction(TagAction.EXCLUDE))) + .withUserEmail("ckzywbiexzfeyue"))); model = BinaryData.fromObject(model).toObject(MonitoredSubscriptionInner.class); - Assertions.assertEquals("jawgqwg", model.subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.status()); - Assertions.assertEquals("skxfbk", model.error()); + Assertions.assertEquals("buynhijggm", model.subscriptionId()); + Assertions.assertEquals(Status.FAILED, model.status()); + Assertions.assertEquals("iarbutrcvpna", model.error()); Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.tagRules().logRules().sendAadLogs()); Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.tagRules().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.tagRules().logRules().sendActivityLogs()); - Assertions.assertEquals("uwhvylwzbtdhxujz", model.tagRules().logRules().filteringTags().get(0).name()); - Assertions.assertEquals("mpowuwpr", model.tagRules().logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.tagRules().logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.tagRules().logRules().sendActivityLogs()); + Assertions.assertEquals("bh", model.tagRules().logRules().filteringTags().get(0).name()); + Assertions.assertEquals("nlankxmyskpb", model.tagRules().logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, model.tagRules().logRules().filteringTags().get(0).action()); Assertions.assertEquals(SendMetricsStatus.ENABLED, model.tagRules().metricRules().sendMetrics()); - Assertions.assertEquals("xongmtsavjcbpwxq", model.tagRules().metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("rknftguvriuhprwm", model.tagRules().metricRules().filteringTags().get(0).value()); + Assertions.assertEquals("bt", model.tagRules().metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("rq", model.tagRules().metricRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.EXCLUDE, model.tagRules().metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("vu", model.tagRules().metricRules().userEmail()); + Assertions.assertEquals("ckzywbiexzfeyue", model.tagRules().metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionPropertiesInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionPropertiesInnerTests.java index 8df93283648e..5f911d929ff2 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionPropertiesInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionPropertiesInnerTests.java @@ -25,69 +25,58 @@ public final class MonitoredSubscriptionPropertiesInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitoredSubscriptionPropertiesInner model = BinaryData.fromString( - "{\"properties\":{\"patchOperation\":\"AddComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"ywpmueefjzwfqkq\",\"status\":\"InProgress\",\"error\":\"suyonobglaocq\",\"tagRules\":{\"provisioningState\":\"Failed\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{},{}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{}],\"userEmail\":\"wfudwpzntxhdzhl\"}}},{\"subscriptionId\":\"jbhckfrlhr\",\"status\":\"Active\",\"error\":\"yvpycanuzbpzk\",\"tagRules\":{\"provisioningState\":\"Accepted\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{},{},{},{}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{},{},{}],\"userEmail\":\"jusrtslhspk\"}}}],\"provisioningState\":\"Updating\"},\"id\":\"maofmxagkv\",\"name\":\"melmqkrha\",\"type\":\"vljua\"}") + "{\"properties\":{\"patchOperation\":\"DeleteComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"etcktvfcivfsnk\",\"status\":\"Failed\",\"error\":\"tqhjfbebrjcx\",\"tagRules\":{\"provisioningState\":\"Succeeded\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{},{},{},{}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{},{},{}],\"userEmail\":\"xepcyvahfn\"}}}],\"provisioningState\":\"Deleted\"},\"id\":\"qxj\",\"name\":\"uujqgidokgjljyo\",\"type\":\"gvcl\"}") .toObject(MonitoredSubscriptionPropertiesInner.class); - Assertions.assertEquals(PatchOperation.ADD_COMPLETE, model.properties().patchOperation()); - Assertions.assertEquals("ywpmueefjzwfqkq", + Assertions.assertEquals(PatchOperation.DELETE_COMPLETE, model.properties().patchOperation()); + Assertions.assertEquals("etcktvfcivfsnk", model.properties().monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("suyonobglaocq", model.properties().monitoredSubscriptionList().get(0).error()); + Assertions.assertEquals(Status.FAILED, model.properties().monitoredSubscriptionList().get(0).status()); + Assertions.assertEquals("tqhjfbebrjcx", model.properties().monitoredSubscriptionList().get(0).error()); Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendActivityLogs()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.properties().monitoredSubscriptionList().get(0).tagRules().metricRules().sendMetrics()); - Assertions.assertEquals("wfudwpzntxhdzhl", + Assertions.assertEquals("xepcyvahfn", model.properties().monitoredSubscriptionList().get(0).tagRules().metricRules().userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MonitoredSubscriptionPropertiesInner model = new MonitoredSubscriptionPropertiesInner() - .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.ADD_COMPLETE) - .withMonitoredSubscriptionList(Arrays.asList( - new MonitoredSubscriptionInner().withSubscriptionId("ywpmueefjzwfqkq") - .withStatus(Status.IN_PROGRESS) - .withError("suyonobglaocq") + .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.DELETE_COMPLETE) + .withMonitoredSubscriptionList( + Arrays.asList(new MonitoredSubscriptionInner().withSubscriptionId("etcktvfcivfsnk") + .withStatus(Status.FAILED) + .withError("tqhjfbebrjcx") .withTagRules(new MonitoringTagRulesPropertiesInner() .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.DISABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) .withSendActivityLogs(SendActivityLogsStatus.DISABLED) - .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag()))) - .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) - .withFilteringTags(Arrays.asList(new FilteringTag())) - .withUserEmail("wfudwpzntxhdzhl"))), - new MonitoredSubscriptionInner().withSubscriptionId("jbhckfrlhr") - .withStatus(Status.ACTIVE) - .withError("yvpycanuzbpzk") - .withTagRules(new MonitoringTagRulesPropertiesInner() - .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) - .withSendActivityLogs(SendActivityLogsStatus.ENABLED) .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag(), new FilteringTag(), new FilteringTag()))) .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) .withFilteringTags( Arrays.asList(new FilteringTag(), new FilteringTag(), new FilteringTag())) - .withUserEmail("jusrtslhspk")))))); + .withUserEmail("xepcyvahfn")))))); model = BinaryData.fromObject(model).toObject(MonitoredSubscriptionPropertiesInner.class); - Assertions.assertEquals(PatchOperation.ADD_COMPLETE, model.properties().patchOperation()); - Assertions.assertEquals("ywpmueefjzwfqkq", + Assertions.assertEquals(PatchOperation.DELETE_COMPLETE, model.properties().patchOperation()); + Assertions.assertEquals("etcktvfcivfsnk", model.properties().monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("suyonobglaocq", model.properties().monitoredSubscriptionList().get(0).error()); + Assertions.assertEquals(Status.FAILED, model.properties().monitoredSubscriptionList().get(0).status()); + Assertions.assertEquals("tqhjfbebrjcx", model.properties().monitoredSubscriptionList().get(0).error()); Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendActivityLogs()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.properties().monitoredSubscriptionList().get(0).tagRules().metricRules().sendMetrics()); - Assertions.assertEquals("wfudwpzntxhdzhl", + Assertions.assertEquals("xepcyvahfn", model.properties().monitoredSubscriptionList().get(0).tagRules().metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionPropertiesListTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionPropertiesListTests.java index 2d2fdf000276..3c96c34ce28d 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionPropertiesListTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionPropertiesListTests.java @@ -19,88 +19,41 @@ public final class MonitoredSubscriptionPropertiesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitoredSubscriptionPropertiesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"patchOperation\":\"AddComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"kx\",\"status\":\"Deleting\",\"error\":\"pbh\",\"tagRules\":{}},{\"subscriptionId\":\"tkcxywnytnrsy\",\"status\":\"Active\",\"error\":\"dybyxczfclhaa\",\"tagRules\":{}},{\"subscriptionId\":\"abphlw\",\"status\":\"Active\",\"error\":\"ktsthsucocmny\",\"tagRules\":{}},{\"subscriptionId\":\"t\",\"status\":\"Active\",\"error\":\"wrqpue\",\"tagRules\":{}}],\"provisioningState\":\"Succeeded\"},\"id\":\"ywbiexzfeyueax\",\"name\":\"bxu\",\"type\":\"wbhqwal\"},{\"properties\":{\"patchOperation\":\"DeleteComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"epdkzja\",\"status\":\"InProgress\",\"error\":\"rhdwbavxbniw\",\"tagRules\":{}},{\"subscriptionId\":\"wz\",\"status\":\"Failed\",\"error\":\"pgn\",\"tagRules\":{}},{\"subscriptionId\":\"x\",\"status\":\"Failed\",\"error\":\"bzpfzab\",\"tagRules\":{}},{\"subscriptionId\":\"uhxwtctyqiklbbov\",\"status\":\"Failed\",\"error\":\"bhvgy\",\"tagRules\":{}}],\"provisioningState\":\"Succeeded\"},\"id\":\"svmkfssxquk\",\"name\":\"fpl\",\"type\":\"mg\"},{\"properties\":{\"patchOperation\":\"Active\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"deslp\",\"status\":\"InProgress\",\"error\":\"wiyighxpkdw\",\"tagRules\":{}}],\"provisioningState\":\"Updating\"},\"id\":\"uebbaumnyqup\",\"name\":\"deoj\",\"type\":\"a\"},{\"properties\":{\"patchOperation\":\"Active\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"xpsiebtfhvpes\",\"status\":\"Failed\",\"error\":\"rdqmhjjdhtldwkyz\",\"tagRules\":{}},{\"subscriptionId\":\"tkncwsc\",\"status\":\"Deleting\",\"error\":\"xotogtwrupqsxv\",\"tagRules\":{}},{\"subscriptionId\":\"cykvceo\",\"status\":\"Active\",\"error\":\"ovnotyfjfcnjbkcn\",\"tagRules\":{}}],\"provisioningState\":\"Creating\"},\"id\":\"ttkphywpnvjtoqne\",\"name\":\"mclfplphoxuscr\",\"type\":\"abgy\"}],\"nextLink\":\"sbj\"}") + "{\"value\":[{\"properties\":{\"patchOperation\":\"DeleteBegin\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"hoqqnwvlr\",\"status\":\"Deleting\",\"error\":\"hheunmmqhgyx\",\"tagRules\":{}},{\"subscriptionId\":\"noc\",\"status\":\"Failed\",\"error\":\"lyaxuc\",\"tagRules\":{}}],\"provisioningState\":\"Failed\"},\"id\":\"zf\",\"name\":\"beypewrmjmw\",\"type\":\"vjektcxsenh\"}],\"nextLink\":\"rsffrzpwvlqdqgbi\"}") .toObject(MonitoredSubscriptionPropertiesList.class); - Assertions.assertEquals(PatchOperation.ADD_COMPLETE, model.value().get(0).properties().patchOperation()); - Assertions.assertEquals("kx", + Assertions.assertEquals(PatchOperation.DELETE_BEGIN, model.value().get(0).properties().patchOperation()); + Assertions.assertEquals("hoqqnwvlr", model.value().get(0).properties().monitoredSubscriptionList().get(0).subscriptionId()); Assertions.assertEquals(Status.DELETING, model.value().get(0).properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("pbh", model.value().get(0).properties().monitoredSubscriptionList().get(0).error()); - Assertions.assertEquals("sbj", model.nextLink()); + Assertions.assertEquals("hheunmmqhgyx", + model.value().get(0).properties().monitoredSubscriptionList().get(0).error()); + Assertions.assertEquals("rsffrzpwvlqdqgbi", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MonitoredSubscriptionPropertiesList model = new MonitoredSubscriptionPropertiesList().withValue(Arrays.asList( - new MonitoredSubscriptionPropertiesInner() - .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.ADD_COMPLETE) + MonitoredSubscriptionPropertiesList model = new MonitoredSubscriptionPropertiesList() + .withValue(Arrays.asList(new MonitoredSubscriptionPropertiesInner() + .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.DELETE_BEGIN) .withMonitoredSubscriptionList(Arrays.asList( - new MonitoredSubscriptionInner().withSubscriptionId("kx") + new MonitoredSubscriptionInner().withSubscriptionId("hoqqnwvlr") .withStatus(Status.DELETING) - .withError("pbh") + .withError("hheunmmqhgyx") .withTagRules(new MonitoringTagRulesPropertiesInner()), - new MonitoredSubscriptionInner().withSubscriptionId("tkcxywnytnrsy") - .withStatus(Status.ACTIVE) - .withError("dybyxczfclhaa") - .withTagRules(new MonitoringTagRulesPropertiesInner()), - new MonitoredSubscriptionInner().withSubscriptionId("abphlw") - .withStatus(Status.ACTIVE) - .withError("ktsthsucocmny") - .withTagRules(new MonitoringTagRulesPropertiesInner()), - new MonitoredSubscriptionInner().withSubscriptionId("t") - .withStatus(Status.ACTIVE) - .withError("wrqpue") - .withTagRules(new MonitoringTagRulesPropertiesInner())))), - new MonitoredSubscriptionPropertiesInner() - .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.DELETE_COMPLETE) - .withMonitoredSubscriptionList(Arrays.asList( - new MonitoredSubscriptionInner().withSubscriptionId("epdkzja") - .withStatus(Status.IN_PROGRESS) - .withError("rhdwbavxbniw") - .withTagRules(new MonitoringTagRulesPropertiesInner()), - new MonitoredSubscriptionInner().withSubscriptionId("wz") + new MonitoredSubscriptionInner().withSubscriptionId("noc") .withStatus(Status.FAILED) - .withError("pgn") - .withTagRules(new MonitoringTagRulesPropertiesInner()), - new MonitoredSubscriptionInner().withSubscriptionId("x") - .withStatus(Status.FAILED) - .withError("bzpfzab") - .withTagRules(new MonitoringTagRulesPropertiesInner()), - new MonitoredSubscriptionInner().withSubscriptionId("uhxwtctyqiklbbov") - .withStatus(Status.FAILED) - .withError("bhvgy") - .withTagRules(new MonitoringTagRulesPropertiesInner())))), - new MonitoredSubscriptionPropertiesInner() - .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.ACTIVE) - .withMonitoredSubscriptionList( - Arrays.asList(new MonitoredSubscriptionInner().withSubscriptionId("deslp") - .withStatus(Status.IN_PROGRESS) - .withError("wiyighxpkdw") - .withTagRules(new MonitoringTagRulesPropertiesInner())))), - new MonitoredSubscriptionPropertiesInner() - .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.ACTIVE) - .withMonitoredSubscriptionList(Arrays.asList( - new MonitoredSubscriptionInner().withSubscriptionId("xpsiebtfhvpes") - .withStatus(Status.FAILED) - .withError("rdqmhjjdhtldwkyz") - .withTagRules(new MonitoringTagRulesPropertiesInner()), - new MonitoredSubscriptionInner().withSubscriptionId("tkncwsc") - .withStatus(Status.DELETING) - .withError("xotogtwrupqsxv") - .withTagRules(new MonitoringTagRulesPropertiesInner()), - new MonitoredSubscriptionInner().withSubscriptionId("cykvceo") - .withStatus(Status.ACTIVE) - .withError("ovnotyfjfcnjbkcn") + .withError("lyaxuc") .withTagRules(new MonitoringTagRulesPropertiesInner())))))) - .withNextLink("sbj"); + .withNextLink("rsffrzpwvlqdqgbi"); model = BinaryData.fromObject(model).toObject(MonitoredSubscriptionPropertiesList.class); - Assertions.assertEquals(PatchOperation.ADD_COMPLETE, model.value().get(0).properties().patchOperation()); - Assertions.assertEquals("kx", + Assertions.assertEquals(PatchOperation.DELETE_BEGIN, model.value().get(0).properties().patchOperation()); + Assertions.assertEquals("hoqqnwvlr", model.value().get(0).properties().monitoredSubscriptionList().get(0).subscriptionId()); Assertions.assertEquals(Status.DELETING, model.value().get(0).properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("pbh", model.value().get(0).properties().monitoredSubscriptionList().get(0).error()); - Assertions.assertEquals("sbj", model.nextLink()); + Assertions.assertEquals("hheunmmqhgyx", + model.value().get(0).properties().monitoredSubscriptionList().get(0).error()); + Assertions.assertEquals("rsffrzpwvlqdqgbi", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateorUpdateMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateOrUpdateMockTests.java similarity index 59% rename from sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateorUpdateMockTests.java rename to sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateOrUpdateMockTests.java index cae666317e6a..6fa2c81fbd87 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateorUpdateMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsCreateOrUpdateMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricRulesInner; @@ -26,49 +26,45 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class MonitoredSubscriptionsCreateorUpdateMockTests { +public final class MonitoredSubscriptionsCreateOrUpdateMockTests { @Test - public void testCreateorUpdate() throws Exception { + public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"patchOperation\":\"Active\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"zkoj\",\"status\":\"InProgress\",\"error\":\"zfoqouicybxar\",\"tagRules\":{\"provisioningState\":\"NotSpecified\",\"logRules\":{},\"metricRules\":{}}}],\"provisioningState\":\"Succeeded\"},\"id\":\"ciqopidoa\",\"name\":\"ciodhkhaz\",\"type\":\"khnzbonlw\"}"; + = "{\"properties\":{\"patchOperation\":\"DeleteComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"ujhemmsbvdkcrodt\",\"status\":\"Deleting\",\"error\":\"wj\",\"tagRules\":{\"provisioningState\":\"Failed\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"jvefkdlfoakggkfp\",\"status\":\"InProgress\",\"error\":\"wpu\",\"tagRules\":{\"provisioningState\":\"Failed\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"s\",\"status\":\"InProgress\",\"error\":\"jnsjervtiagxsd\",\"tagRules\":{\"provisioningState\":\"Updating\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"bzkfzbeyvpn\",\"status\":\"Deleting\",\"error\":\"invkjjxdxrbuu\",\"tagRules\":{\"provisioningState\":\"Updating\",\"logRules\":{},\"metricRules\":{}}}],\"provisioningState\":\"Succeeded\"},\"id\":\"lw\",\"name\":\"aztz\",\"type\":\"ofncckwyfzqwhxxb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); MonitoredSubscriptionProperties response = manager.monitoredSubscriptions() .define(ConfigurationName.DEFAULT) - .withExistingMonitor("pfuvglsbjjca", "vxb") - .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.DELETE_COMPLETE) + .withExistingMonitor("byxbaaabjy", "ayffim") + .withProperties(new SubscriptionList().withPatchOperation(PatchOperation.ADD_BEGIN) .withMonitoredSubscriptionList(Arrays.asList( - new MonitoredSubscriptionInner().withSubscriptionId("cormr") - .withStatus(Status.DELETING) - .withError("vcofudfl") - .withTagRules(new MonitoringTagRulesPropertiesInner().withLogRules(new LogRules()) - .withMetricRules(new MetricRulesInner())), - new MonitoredSubscriptionInner().withSubscriptionId("dknnqvsazn") + new MonitoredSubscriptionInner().withSubscriptionId("gsexne") .withStatus(Status.IN_PROGRESS) - .withError("rudsg") + .withError("wnwmewzs") .withTagRules(new MonitoringTagRulesPropertiesInner().withLogRules(new LogRules()) .withMetricRules(new MetricRulesInner())), - new MonitoredSubscriptionInner().withSubscriptionId("grauwjuetaebur") - .withStatus(Status.ACTIVE) - .withError("ovsm") + new MonitoredSubscriptionInner().withSubscriptionId("oibjudpfrxtrthz") + .withStatus(Status.IN_PROGRESS) + .withError("dwkqbrq") .withTagRules(new MonitoringTagRulesPropertiesInner().withLogRules(new LogRules()) .withMetricRules(new MetricRulesInner())), - new MonitoredSubscriptionInner().withSubscriptionId("q") - .withStatus(Status.ACTIVE) - .withError("ifrvtpu") + new MonitoredSubscriptionInner().withSubscriptionId("xiilivpdtiirqt") + .withStatus(Status.FAILED) + .withError("xoruzfgsquyfxrx") .withTagRules(new MonitoringTagRulesPropertiesInner().withLogRules(new LogRules()) .withMetricRules(new MetricRulesInner()))))) .create(); - Assertions.assertEquals(PatchOperation.ACTIVE, response.properties().patchOperation()); - Assertions.assertEquals("zkoj", response.properties().monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, response.properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("zfoqouicybxar", response.properties().monitoredSubscriptionList().get(0).error()); + Assertions.assertEquals(PatchOperation.DELETE_COMPLETE, response.properties().patchOperation()); + Assertions.assertEquals("ujhemmsbvdkcrodt", + response.properties().monitoredSubscriptionList().get(0).subscriptionId()); + Assertions.assertEquals(Status.DELETING, response.properties().monitoredSubscriptionList().get(0).status()); + Assertions.assertEquals("wj", response.properties().monitoredSubscriptionList().get(0).error()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsGetWithResponseMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsGetWithResponseMockTests.java index efdd10afc509..1b1c3d3d21e1 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsGetWithResponseMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsGetWithResponseMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.ConfigurationName; @@ -24,23 +24,23 @@ public final class MonitoredSubscriptionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"patchOperation\":\"AddComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"kfpagao\",\"status\":\"Deleting\",\"error\":\"pqblylsyxkqjnsj\",\"tagRules\":{\"provisioningState\":\"Updating\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"xsdszuempsb\",\"status\":\"InProgress\",\"error\":\"beyvpnqicvinvkjj\",\"tagRules\":{\"provisioningState\":\"Canceled\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"kzclewyh\",\"status\":\"InProgress\",\"error\":\"aztz\",\"tagRules\":{\"provisioningState\":\"Creating\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"wyfzqwhxxbuyqa\",\"status\":\"Failed\",\"error\":\"qztpp\",\"tagRules\":{\"provisioningState\":\"Updating\",\"logRules\":{},\"metricRules\":{}}}],\"provisioningState\":\"NotSpecified\"},\"id\":\"altol\",\"name\":\"ncwsob\",\"type\":\"wcsdbnwdcfhucq\"}"; + = "{\"properties\":{\"patchOperation\":\"DeleteComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"ygaeqidbqfatpxl\",\"status\":\"Deleting\",\"error\":\"yjmoadsu\",\"tagRules\":{\"provisioningState\":\"NotSpecified\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"mjsjqb\",\"status\":\"Deleting\",\"error\":\"x\",\"tagRules\":{\"provisioningState\":\"NotSpecified\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"duhpk\",\"status\":\"Active\",\"error\":\"mareqnajxqugj\",\"tagRules\":{\"provisioningState\":\"NotSpecified\",\"logRules\":{},\"metricRules\":{}}}],\"provisioningState\":\"Failed\"},\"id\":\"gssofwq\",\"name\":\"zqalkrmnjijpx\",\"type\":\"cqqudf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); MonitoredSubscriptionProperties response = manager.monitoredSubscriptions() - .getWithResponse("vdkcrodtj", "nfwjlfltkacjvefk", ConfigurationName.DEFAULT, - com.azure.core.util.Context.NONE) + .getWithResponse("zikhl", "fjhdg", ConfigurationName.DEFAULT, com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(PatchOperation.ADD_COMPLETE, response.properties().patchOperation()); - Assertions.assertEquals("kfpagao", response.properties().monitoredSubscriptionList().get(0).subscriptionId()); + Assertions.assertEquals(PatchOperation.DELETE_COMPLETE, response.properties().patchOperation()); + Assertions.assertEquals("ygaeqidbqfatpxl", + response.properties().monitoredSubscriptionList().get(0).subscriptionId()); Assertions.assertEquals(Status.DELETING, response.properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("pqblylsyxkqjnsj", response.properties().monitoredSubscriptionList().get(0).error()); + Assertions.assertEquals("yjmoadsu", response.properties().monitoredSubscriptionList().get(0).error()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsListMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsListMockTests.java index ef1dbc9f1644..7a357f4e2460 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsListMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoredSubscriptionsListMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.MonitoredSubscriptionProperties; @@ -24,24 +24,24 @@ public final class MonitoredSubscriptionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"patchOperation\":\"AddComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"q\",\"status\":\"Failed\",\"error\":\"axoruzfgsquy\",\"tagRules\":{\"provisioningState\":\"Updating\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"ptramxj\",\"status\":\"Failed\",\"error\":\"wnwxuqlcvyd\",\"tagRules\":{\"provisioningState\":\"Deleting\",\"logRules\":{},\"metricRules\":{}}}],\"provisioningState\":\"Deleted\"},\"id\":\"ojknio\",\"name\":\"kooebwnu\",\"type\":\"hemms\"}]}"; + = "{\"value\":[{\"properties\":{\"patchOperation\":\"AddBegin\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"nwabfatkldd\",\"status\":\"Failed\",\"error\":\"wuaanoz\",\"tagRules\":{\"provisioningState\":\"Updating\",\"logRules\":{},\"metricRules\":{}}},{\"subscriptionId\":\"ulpjr\",\"status\":\"InProgress\",\"error\":\"l\",\"tagRules\":{\"provisioningState\":\"Failed\",\"logRules\":{},\"metricRules\":{}}}],\"provisioningState\":\"Succeeded\"},\"id\":\"tx\",\"name\":\"tcs\",\"type\":\"fcktqumiekke\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.monitoredSubscriptions().list("ytdw", "qbrqubpaxhexiili", com.azure.core.util.Context.NONE); + = manager.monitoredSubscriptions().list("c", "r", com.azure.core.util.Context.NONE); - Assertions.assertEquals(PatchOperation.ADD_COMPLETE, response.iterator().next().properties().patchOperation()); - Assertions.assertEquals("q", + Assertions.assertEquals(PatchOperation.ADD_BEGIN, response.iterator().next().properties().patchOperation()); + Assertions.assertEquals("nwabfatkldd", response.iterator().next().properties().monitoredSubscriptionList().get(0).subscriptionId()); Assertions.assertEquals(Status.FAILED, response.iterator().next().properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("axoruzfgsquy", + Assertions.assertEquals("wuaanoz", response.iterator().next().properties().monitoredSubscriptionList().get(0).error()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoringTagRulesPropertiesInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoringTagRulesPropertiesInnerTests.java index 064a06377dca..ed6f967a5b1a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoringTagRulesPropertiesInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitoringTagRulesPropertiesInnerTests.java @@ -21,48 +21,47 @@ public final class MonitoringTagRulesPropertiesInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitoringTagRulesPropertiesInner model = BinaryData.fromString( - "{\"provisioningState\":\"Failed\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"kpoc\",\"value\":\"azyxoegukg\",\"action\":\"Include\"},{\"name\":\"ucgygevqz\",\"value\":\"yp\",\"action\":\"Exclude\"},{\"name\":\"izcdrqjsd\",\"value\":\"dnfyhxdeoejzicwi\",\"action\":\"Include\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"ishc\",\"value\":\"hajdeyeamdpha\",\"action\":\"Exclude\"},{\"name\":\"buxwgip\",\"value\":\"onowk\",\"action\":\"Exclude\"},{\"name\":\"ankixzbinjeput\",\"value\":\"rywn\",\"action\":\"Exclude\"}],\"userEmail\":\"ftiyqzrnkcq\"}}") + "{\"provisioningState\":\"NotSpecified\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"lmuzy\",\"value\":\"aepdkzjanc\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"xbniwdjs\",\"value\":\"tsdbpgn\",\"action\":\"Include\"},{\"name\":\"hpzxbzpfzab\",\"value\":\"cuh\",\"action\":\"Include\"},{\"name\":\"tyq\",\"value\":\"lbbovplw\",\"action\":\"Exclude\"},{\"name\":\"gy\",\"value\":\"uosvmkfssxqukk\",\"action\":\"Include\"}],\"userEmail\":\"mg\"}}") .toObject(MonitoringTagRulesPropertiesInner.class); - Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.logRules().sendActivityLogs()); - Assertions.assertEquals("kpoc", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("azyxoegukg", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.logRules().sendAadLogs()); + Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, model.logRules().sendSubscriptionLogs()); + Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.logRules().sendActivityLogs()); + Assertions.assertEquals("lmuzy", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("aepdkzjanc", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); Assertions.assertEquals(SendMetricsStatus.DISABLED, model.metricRules().sendMetrics()); - Assertions.assertEquals("ishc", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("hajdeyeamdpha", model.metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("ftiyqzrnkcq", model.metricRules().userEmail()); + Assertions.assertEquals("xbniwdjs", model.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("tsdbpgn", model.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); + Assertions.assertEquals("mg", model.metricRules().userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MonitoringTagRulesPropertiesInner model = new MonitoringTagRulesPropertiesInner().withLogRules(new LogRules() - .withSendAadLogs(SendAadLogsStatus.DISABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) - .withSendActivityLogs(SendActivityLogsStatus.DISABLED) - .withFilteringTags(Arrays.asList( - new FilteringTag().withName("kpoc").withValue("azyxoegukg").withAction(TagAction.INCLUDE), - new FilteringTag().withName("ucgygevqz").withValue("yp").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("izcdrqjsd").withValue("dnfyhxdeoejzicwi").withAction(TagAction.INCLUDE)))) + MonitoringTagRulesPropertiesInner model = new MonitoringTagRulesPropertiesInner() + .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) + .withSendActivityLogs(SendActivityLogsStatus.ENABLED) + .withFilteringTags(Arrays.asList( + new FilteringTag().withName("lmuzy").withValue("aepdkzjanc").withAction(TagAction.EXCLUDE)))) .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) .withFilteringTags(Arrays.asList( - new FilteringTag().withName("ishc").withValue("hajdeyeamdpha").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("buxwgip").withValue("onowk").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("ankixzbinjeput").withValue("rywn").withAction(TagAction.EXCLUDE))) - .withUserEmail("ftiyqzrnkcq")); + new FilteringTag().withName("xbniwdjs").withValue("tsdbpgn").withAction(TagAction.INCLUDE), + new FilteringTag().withName("hpzxbzpfzab").withValue("cuh").withAction(TagAction.INCLUDE), + new FilteringTag().withName("tyq").withValue("lbbovplw").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("gy").withValue("uosvmkfssxqukk").withAction(TagAction.INCLUDE))) + .withUserEmail("mg")); model = BinaryData.fromObject(model).toObject(MonitoringTagRulesPropertiesInner.class); - Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.logRules().sendActivityLogs()); - Assertions.assertEquals("kpoc", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("azyxoegukg", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.logRules().sendAadLogs()); + Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, model.logRules().sendSubscriptionLogs()); + Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.logRules().sendActivityLogs()); + Assertions.assertEquals("lmuzy", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("aepdkzjanc", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); Assertions.assertEquals(SendMetricsStatus.DISABLED, model.metricRules().sendMetrics()); - Assertions.assertEquals("ishc", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("hajdeyeamdpha", model.metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("ftiyqzrnkcq", model.metricRules().userEmail()); + Assertions.assertEquals("xbniwdjs", model.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("tsdbpgn", model.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); + Assertions.assertEquals("mg", model.metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteMockTests.java index 964e6e7d380f..cac56f83e233 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsDeleteMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.monitors().delete("lmpewwwfbkr", "rn", "vshqjohxcr", com.azure.core.util.Context.NONE); + manager.monitors().delete("nfqqnvwp", "qtaruoujmkcjhwq", "tjrybnwjewgdr", com.azure.core.util.Context.NONE); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesWithResponseMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesWithResponseMockTests.java index 7d345a39a31e..80a15444eed3 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesWithResponseMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricRulesWithResponseMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.MetricRules; @@ -24,24 +24,24 @@ public final class MonitorsGetMetricRulesWithResponseMockTests { @Test public void testGetMetricRulesWithResponse() throws Exception { String responseStr - = "{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"bsrfbj\",\"value\":\"twss\",\"action\":\"Exclude\"},{\"name\":\"pvjzbe\",\"value\":\"l\",\"action\":\"Include\"},{\"name\":\"qqnvwpmq\",\"value\":\"ruoujmk\",\"action\":\"Include\"}],\"userEmail\":\"qytjrybnwjewgd\"}"; + = "{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"qig\",\"value\":\"duhavhqlkt\",\"action\":\"Exclude\"},{\"name\":\"qolbgyc\",\"value\":\"iertgccymvaolp\",\"action\":\"Include\"},{\"name\":\"lfmmdnbbglzpswi\",\"value\":\"mcwyhzdxssadb\",\"action\":\"Exclude\"}],\"userEmail\":\"dfznudaodv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); MetricRules response = manager.monitors() - .getMetricRulesWithResponse("bfovasrruvwbhsq", "sub", new MetricsRequest().withUserEmail("gjb"), + .getMetricRulesWithResponse("ervnaenqpehi", "doy", new MetricsRequest().withUserEmail("mifthnzdnd"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(SendMetricsStatus.ENABLED, response.sendMetrics()); - Assertions.assertEquals("bsrfbj", response.filteringTags().get(0).name()); - Assertions.assertEquals("twss", response.filteringTags().get(0).value()); + Assertions.assertEquals(SendMetricsStatus.DISABLED, response.sendMetrics()); + Assertions.assertEquals("qig", response.filteringTags().get(0).name()); + Assertions.assertEquals("duhavhqlkt", response.filteringTags().get(0).value()); Assertions.assertEquals(TagAction.EXCLUDE, response.filteringTags().get(0).action()); - Assertions.assertEquals("qytjrybnwjewgd", response.userEmail()); + Assertions.assertEquals("dfznudaodv", response.userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusWithResponseMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusWithResponseMockTests.java index 8a97fd034cdb..9a7fac4b90ad 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusWithResponseMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsGetMetricStatusWithResponseMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.MetricsStatusRequest; @@ -22,23 +22,23 @@ public final class MonitorsGetMetricStatusWithResponseMockTests { @Test public void testGetMetricStatusWithResponse() throws Exception { - String responseStr = "{\"azureResourceIds\":[\"duhavhqlkt\",\"umaq\",\"lbg\",\"cdui\"]}"; + String responseStr = "{\"azureResourceIds\":[\"iwubmwmbesldnk\",\"wtppjflcxogaoko\"]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - MetricsStatusResponse response - = manager.monitors() - .getMetricStatusWithResponse("jervnaenqpehi", "doy", - new MetricsStatusRequest().withAzureResourceIds(Arrays.asList("fthnzdn", "sl")) - .withUserEmail("nayqi"), - com.azure.core.util.Context.NONE) - .getValue(); + MetricsStatusResponse response = manager.monitors() + .getMetricStatusWithResponse("zbn", "blylpstdbh", + new MetricsStatusRequest() + .withAzureResourceIds(Arrays.asList("rzdzucerscdnt", "evfiwjmygt", "sslswtmweriof", "pyqs")) + .withUserEmail("mwabnetshhszhedp"), + com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals("duhavhqlkt", response.azureResourceIds().get(0)); + Assertions.assertEquals("iwubmwmbesldnk", response.azureResourceIds().get(0)); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLatestLinkedSaaSWithResponseMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLatestLinkedSaaSWithResponseMockTests.java new file mode 100644 index 000000000000..8eca7d178e7a --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsLatestLinkedSaaSWithResponseMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; +import com.azure.resourcemanager.newrelicobservability.models.LatestLinkedSaaSResponse; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MonitorsLatestLinkedSaaSWithResponseMockTests { + @Test + public void testLatestLinkedSaaSWithResponse() throws Exception { + String responseStr = "{\"saaSResourceId\":\"zxmhhvhgu\",\"isHiddenSaaS\":false}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + LatestLinkedSaaSResponse response = manager.monitors() + .latestLinkedSaaSWithResponse("z", "nsikvmkqzeqqkdl", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("zxmhhvhgu", response.saaSResourceId()); + Assertions.assertFalse(response.isHiddenSaaS()); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesMockTests.java index 979849a70da4..924635411d51 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListAppServicesMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.AppServiceInfo; @@ -24,23 +24,24 @@ public final class MonitorsListAppServicesMockTests { @Test public void testListAppServices() throws Exception { String responseStr - = "{\"value\":[{\"azureResourceId\":\"dvxzbncblylpst\",\"agentVersion\":\"hh\",\"agentStatus\":\"rzdzucerscdnt\"}]}"; + = "{\"value\":[{\"azureResourceId\":\"vithh\",\"agentVersion\":\"o\",\"agentStatus\":\"sg\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.monitors() - .listAppServices("r", "gccymvaolpssl", - new AppServicesGetRequest().withAzureResourceIds(Arrays.asList("mmdnbbglzps", "iydmcwyhzdxs")) - .withUserEmail("adbzmnvdfznud"), + .listAppServices("pbttdum", "rp", + new AppServicesGetRequest() + .withAzureResourceIds(Arrays.asList("bmnzbtbhjpgl", "fgohdneuelfphs", "yhtozfikdowwqu", "v")) + .withUserEmail("zx"), com.azure.core.util.Context.NONE); - Assertions.assertEquals("dvxzbncblylpst", response.iterator().next().azureResourceId()); - Assertions.assertEquals("hh", response.iterator().next().agentVersion()); - Assertions.assertEquals("rzdzucerscdnt", response.iterator().next().agentStatus()); + Assertions.assertEquals("vithh", response.iterator().next().azureResourceId()); + Assertions.assertEquals("o", response.iterator().next().agentVersion()); + Assertions.assertEquals("sg", response.iterator().next().agentStatus()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsMockTests.java index 24794359d7d1..95d10e905d57 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListHostsMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.HostsGetRequest; @@ -24,24 +24,21 @@ public final class MonitorsListHostsMockTests { @Test public void testListHosts() throws Exception { String responseStr - = "{\"value\":[{\"vmId\":\"koievseo\",\"agentVersion\":\"q\",\"agentStatus\":\"ltmuwlauwzizx\"}]}"; + = "{\"value\":[{\"vmId\":\"fuflrwdmhdlx\",\"agentVersion\":\"rxsagafcnihgwqa\",\"agentStatus\":\"edgfbcvkcvq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.monitors() - .listHosts("ur", "odkwobd", - new HostsGetRequest() - .withVmIds(Arrays.asList("tibqdxbxwakb", "gqxndlkzgxhuripl", "podxunkb", "bxmubyynt")) - .withUserEmail("lrb"), - com.azure.core.util.Context.NONE); + .listHosts("b", "c", new HostsGetRequest().withVmIds(Arrays.asList("wdsjnkalju", "iiswacffgdkzze")) + .withUserEmail("kfvhqcrailvpn"), com.azure.core.util.Context.NONE); - Assertions.assertEquals("koievseo", response.iterator().next().vmId()); - Assertions.assertEquals("q", response.iterator().next().agentVersion()); - Assertions.assertEquals("ltmuwlauwzizx", response.iterator().next().agentStatus()); + Assertions.assertEquals("fuflrwdmhdlx", response.iterator().next().vmId()); + Assertions.assertEquals("rxsagafcnihgwqa", response.iterator().next().agentVersion()); + Assertions.assertEquals("edgfbcvkcvq", response.iterator().next().agentStatus()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListLinkedResourcesMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListLinkedResourcesMockTests.java index d25911a89f2c..177bc74df9e6 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListLinkedResourcesMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListLinkedResourcesMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.LinkedResource; @@ -21,18 +21,18 @@ public final class MonitorsListLinkedResourcesMockTests { @Test public void testListLinkedResources() throws Exception { - String responseStr = "{\"value\":[{\"id\":\"xzxcl\"}]}"; + String responseStr = "{\"value\":[{\"id\":\"opcjwvnhd\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.monitors().listLinkedResources("phsdyhto", "fikdowwqu", com.azure.core.util.Context.NONE); + = manager.monitors().listLinkedResources("pkeqdcvdrhvoo", "sotbob", com.azure.core.util.Context.NONE); - Assertions.assertEquals("xzxcl", response.iterator().next().id()); + Assertions.assertEquals("opcjwvnhd", response.iterator().next().id()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesMockTests.java index 66f20f28a294..d017e144e8b4 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsListMonitoredResourcesMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.MonitoredResource; @@ -24,22 +24,22 @@ public final class MonitorsListMonitoredResourcesMockTests { @Test public void testListMonitoredResources() throws Exception { String responseStr - = "{\"value\":[{\"id\":\"orppxebmnzbtb\",\"sendingMetrics\":\"Enabled\",\"reasonForMetricsStatus\":\"lkfg\",\"sendingLogs\":\"Enabled\",\"reasonForLogsStatus\":\"euel\"}]}"; + = "{\"value\":[{\"id\":\"wuoegrpk\",\"sendingMetrics\":\"Disabled\",\"reasonForMetricsStatus\":\"iyq\",\"sendingLogs\":\"Enabled\",\"reasonForLogsStatus\":\"cpdggkzzlvmbmp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.monitors().listMonitoredResources("mpgcjefuzmuvpbt", "d", com.azure.core.util.Context.NONE); + = manager.monitors().listMonitoredResources("d", "mgxcxrslpm", com.azure.core.util.Context.NONE); - Assertions.assertEquals("orppxebmnzbtb", response.iterator().next().id()); - Assertions.assertEquals(SendingMetricsStatus.ENABLED, response.iterator().next().sendingMetrics()); - Assertions.assertEquals("lkfg", response.iterator().next().reasonForMetricsStatus()); + Assertions.assertEquals("wuoegrpk", response.iterator().next().id()); + Assertions.assertEquals(SendingMetricsStatus.DISABLED, response.iterator().next().sendingMetrics()); + Assertions.assertEquals("iyq", response.iterator().next().reasonForMetricsStatus()); Assertions.assertEquals(SendingLogsStatus.ENABLED, response.iterator().next().sendingLogs()); - Assertions.assertEquals("euel", response.iterator().next().reasonForLogsStatus()); + Assertions.assertEquals("cpdggkzzlvmbmp", response.iterator().next().reasonForLogsStatus()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsRefreshIngestionKeyWithResponseMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsRefreshIngestionKeyWithResponseMockTests.java new file mode 100644 index 000000000000..0032a40b15d5 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/MonitorsRefreshIngestionKeyWithResponseMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MonitorsRefreshIngestionKeyWithResponseMockTests { + @Test + public void testRefreshIngestionKeyWithResponse() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 204, responseStr.getBytes(StandardCharsets.UTF_8))); + NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.monitors().refreshIngestionKeyWithResponse("xmodf", "uefywsbpfvmwy", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/NewRelicSingleSignOnPropertiesTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/NewRelicSingleSignOnPropertiesTests.java index 186893bcc448..198e0c067ad9 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/NewRelicSingleSignOnPropertiesTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/NewRelicSingleSignOnPropertiesTests.java @@ -14,25 +14,25 @@ public final class NewRelicSingleSignOnPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NewRelicSingleSignOnProperties model = BinaryData.fromString( - "{\"singleSignOnState\":\"Enable\",\"enterpriseAppId\":\"o\",\"singleSignOnUrl\":\"si\",\"provisioningState\":\"Deleting\"}") + "{\"singleSignOnState\":\"Initial\",\"enterpriseAppId\":\"cjdkwtnhxbnjbi\",\"singleSignOnUrl\":\"qrglssainqpjwn\",\"provisioningState\":\"Canceled\"}") .toObject(NewRelicSingleSignOnProperties.class); - Assertions.assertEquals(SingleSignOnStates.ENABLE, model.singleSignOnState()); - Assertions.assertEquals("o", model.enterpriseAppId()); - Assertions.assertEquals("si", model.singleSignOnUrl()); - Assertions.assertEquals(ProvisioningState.DELETING, model.provisioningState()); + Assertions.assertEquals(SingleSignOnStates.INITIAL, model.singleSignOnState()); + Assertions.assertEquals("cjdkwtnhxbnjbi", model.enterpriseAppId()); + Assertions.assertEquals("qrglssainqpjwn", model.singleSignOnUrl()); + Assertions.assertEquals(ProvisioningState.CANCELED, model.provisioningState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NewRelicSingleSignOnProperties model - = new NewRelicSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.ENABLE) - .withEnterpriseAppId("o") - .withSingleSignOnUrl("si") - .withProvisioningState(ProvisioningState.DELETING); + = new NewRelicSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.INITIAL) + .withEnterpriseAppId("cjdkwtnhxbnjbi") + .withSingleSignOnUrl("qrglssainqpjwn") + .withProvisioningState(ProvisioningState.CANCELED); model = BinaryData.fromObject(model).toObject(NewRelicSingleSignOnProperties.class); - Assertions.assertEquals(SingleSignOnStates.ENABLE, model.singleSignOnState()); - Assertions.assertEquals("o", model.enterpriseAppId()); - Assertions.assertEquals("si", model.singleSignOnUrl()); - Assertions.assertEquals(ProvisioningState.DELETING, model.provisioningState()); + Assertions.assertEquals(SingleSignOnStates.INITIAL, model.singleSignOnState()); + Assertions.assertEquals("cjdkwtnhxbnjbi", model.enterpriseAppId()); + Assertions.assertEquals("qrglssainqpjwn", model.singleSignOnUrl()); + Assertions.assertEquals(ProvisioningState.CANCELED, model.provisioningState()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListMockTests.java index f75d7a1206fc..95577f69a32a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OperationsListMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.Operation; @@ -21,14 +21,14 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"uusdttouwa\",\"isDataAction\":false,\"display\":{\"provider\":\"v\",\"resource\":\"lns\",\"operation\":\"bxwyjsflhhcaa\",\"description\":\"jixisxyawjoyaqcs\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"vbxwyjsflhh\",\"isDataAction\":false,\"display\":{\"provider\":\"jixisxyawjoyaqcs\",\"resource\":\"jpkiidzyexznelix\",\"operation\":\"rzt\",\"description\":\"lhbnxkna\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationInfoTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationInfoTests.java index 15c572cc37d1..1006704ac61f 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationInfoTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationInfoTests.java @@ -12,14 +12,14 @@ public final class OrganizationInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OrganizationInfo model - = BinaryData.fromString("{\"organizationId\":\"amiheognarxz\"}").toObject(OrganizationInfo.class); - Assertions.assertEquals("amiheognarxz", model.organizationId()); + = BinaryData.fromString("{\"organizationId\":\"rljdouskcqv\"}").toObject(OrganizationInfo.class); + Assertions.assertEquals("rljdouskcqv", model.organizationId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OrganizationInfo model = new OrganizationInfo().withOrganizationId("amiheognarxz"); + OrganizationInfo model = new OrganizationInfo().withOrganizationId("rljdouskcqv"); model = BinaryData.fromObject(model).toObject(OrganizationInfo.class); - Assertions.assertEquals("amiheognarxz", model.organizationId()); + Assertions.assertEquals("rljdouskcqv", model.organizationId()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationPropertiesTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationPropertiesTests.java index 078ad0d538f4..343e17ef5b0e 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationPropertiesTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationPropertiesTests.java @@ -12,22 +12,22 @@ public final class OrganizationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OrganizationProperties model = BinaryData.fromString( - "{\"organizationId\":\"utduqktapspwgcu\",\"organizationName\":\"tumkdosvqwhbm\",\"billingSource\":\"NEWRELIC\"}") + OrganizationProperties model = BinaryData + .fromString("{\"organizationId\":\"q\",\"organizationName\":\"ol\",\"billingSource\":\"NEWRELIC\"}") .toObject(OrganizationProperties.class); - Assertions.assertEquals("utduqktapspwgcu", model.organizationId()); - Assertions.assertEquals("tumkdosvqwhbm", model.organizationName()); + Assertions.assertEquals("q", model.organizationId()); + Assertions.assertEquals("ol", model.organizationName()); Assertions.assertEquals(BillingSource.NEWRELIC, model.billingSource()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OrganizationProperties model = new OrganizationProperties().withOrganizationId("utduqktapspwgcu") - .withOrganizationName("tumkdosvqwhbm") + OrganizationProperties model = new OrganizationProperties().withOrganizationId("q") + .withOrganizationName("ol") .withBillingSource(BillingSource.NEWRELIC); model = BinaryData.fromObject(model).toObject(OrganizationProperties.class); - Assertions.assertEquals("utduqktapspwgcu", model.organizationId()); - Assertions.assertEquals("tumkdosvqwhbm", model.organizationName()); + Assertions.assertEquals("q", model.organizationId()); + Assertions.assertEquals("ol", model.organizationName()); Assertions.assertEquals(BillingSource.NEWRELIC, model.billingSource()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationResourceInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationResourceInnerTests.java index 07d30c4b7482..984522485267 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationResourceInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationResourceInnerTests.java @@ -13,21 +13,21 @@ public final class OrganizationResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OrganizationResourceInner model = BinaryData.fromString( - "{\"properties\":{\"organizationId\":\"kgfg\",\"organizationName\":\"madgakeqsrxyb\",\"billingSource\":\"NEWRELIC\"},\"id\":\"dqytbciqfouflmm\",\"name\":\"kzsmodm\",\"type\":\"lougpbkw\"}") + "{\"properties\":{\"organizationId\":\"gcue\",\"organizationName\":\"umkdosvqwhbmd\",\"billingSource\":\"AZURE\"},\"id\":\"f\",\"name\":\"dgmb\",\"type\":\"bexppb\"}") .toObject(OrganizationResourceInner.class); - Assertions.assertEquals("kgfg", model.organizationId()); - Assertions.assertEquals("madgakeqsrxyb", model.organizationName()); - Assertions.assertEquals(BillingSource.NEWRELIC, model.billingSource()); + Assertions.assertEquals("gcue", model.organizationId()); + Assertions.assertEquals("umkdosvqwhbmd", model.organizationName()); + Assertions.assertEquals(BillingSource.AZURE, model.billingSource()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OrganizationResourceInner model = new OrganizationResourceInner().withOrganizationId("kgfg") - .withOrganizationName("madgakeqsrxyb") - .withBillingSource(BillingSource.NEWRELIC); + OrganizationResourceInner model = new OrganizationResourceInner().withOrganizationId("gcue") + .withOrganizationName("umkdosvqwhbmd") + .withBillingSource(BillingSource.AZURE); model = BinaryData.fromObject(model).toObject(OrganizationResourceInner.class); - Assertions.assertEquals("kgfg", model.organizationId()); - Assertions.assertEquals("madgakeqsrxyb", model.organizationName()); - Assertions.assertEquals(BillingSource.NEWRELIC, model.billingSource()); + Assertions.assertEquals("gcue", model.organizationId()); + Assertions.assertEquals("umkdosvqwhbmd", model.organizationName()); + Assertions.assertEquals(BillingSource.AZURE, model.billingSource()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListMockTests.java index bdd1bb744e71..c1167dc567d8 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.BillingSource; @@ -23,20 +23,20 @@ public final class OrganizationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"organizationId\":\"cjwvn\",\"organizationName\":\"ld\",\"billingSource\":\"AZURE\"},\"id\":\"cxrslpmutwuoe\",\"name\":\"rpkhjwn\",\"type\":\"yqsluic\"}]}"; + = "{\"value\":[{\"properties\":{\"organizationId\":\"orzihle\",\"organizationName\":\"jswsrmslyz\",\"billingSource\":\"NEWRELIC\"},\"id\":\"c\",\"name\":\"ckqqzqioxiysui\",\"type\":\"zynkedya\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.organizations().list("rhvoods", "tbobz", com.azure.core.util.Context.NONE); + = manager.organizations().list("saknynfsyn", "jphuopxodlqi", com.azure.core.util.Context.NONE); - Assertions.assertEquals("cjwvn", response.iterator().next().organizationId()); - Assertions.assertEquals("ld", response.iterator().next().organizationName()); - Assertions.assertEquals(BillingSource.AZURE, response.iterator().next().billingSource()); + Assertions.assertEquals("orzihle", response.iterator().next().organizationId()); + Assertions.assertEquals("jswsrmslyz", response.iterator().next().organizationName()); + Assertions.assertEquals(BillingSource.NEWRELIC, response.iterator().next().billingSource()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListResponseTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListResponseTests.java index 3f0dbb07152a..943312c0b8ad 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListResponseTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/OrganizationsListResponseTests.java @@ -15,31 +15,28 @@ public final class OrganizationsListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OrganizationsListResponse model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"organizationId\":\"nqpjwnzlljfmpp\",\"organizationName\":\"bvmgxsabkyqduuji\",\"billingSource\":\"NEWRELIC\"},\"id\":\"zdzevndh\",\"name\":\"rwpdappdsbdkvwrw\",\"type\":\"feusnhut\"},{\"properties\":{\"organizationId\":\"tmrldhugjzzdatq\",\"organizationName\":\"oc\",\"billingSource\":\"AZURE\"},\"id\":\"blgphuticn\",\"name\":\"vkaozwyiftyhxhur\",\"type\":\"k\"},{\"properties\":{\"organizationId\":\"xolniwpwcukjfk\",\"organizationName\":\"awxklr\",\"billingSource\":\"NEWRELIC\"},\"id\":\"ckbasyypndd\",\"name\":\"sgcbac\",\"type\":\"hejkotynqgou\"}],\"nextLink\":\"ndlik\"}") + "{\"value\":[{\"properties\":{\"organizationId\":\"ryplwckbasyypn\",\"organizationName\":\"hsgcbacphejkot\",\"billingSource\":\"AZURE\"},\"id\":\"oulzndlikwyq\",\"name\":\"gfgibm\",\"type\":\"dgak\"},{\"properties\":{\"organizationId\":\"rxybz\",\"organizationName\":\"e\",\"billingSource\":\"AZURE\"},\"id\":\"bciqfouflm\",\"name\":\"nkzsmodmglou\",\"type\":\"pbkwtmu\"}],\"nextLink\":\"uqktap\"}") .toObject(OrganizationsListResponse.class); - Assertions.assertEquals("nqpjwnzlljfmpp", model.value().get(0).organizationId()); - Assertions.assertEquals("bvmgxsabkyqduuji", model.value().get(0).organizationName()); - Assertions.assertEquals(BillingSource.NEWRELIC, model.value().get(0).billingSource()); - Assertions.assertEquals("ndlik", model.nextLink()); + Assertions.assertEquals("ryplwckbasyypn", model.value().get(0).organizationId()); + Assertions.assertEquals("hsgcbacphejkot", model.value().get(0).organizationName()); + Assertions.assertEquals(BillingSource.AZURE, model.value().get(0).billingSource()); + Assertions.assertEquals("uqktap", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { OrganizationsListResponse model = new OrganizationsListResponse().withValue(Arrays.asList( - new OrganizationResourceInner().withOrganizationId("nqpjwnzlljfmpp") - .withOrganizationName("bvmgxsabkyqduuji") - .withBillingSource(BillingSource.NEWRELIC), - new OrganizationResourceInner().withOrganizationId("tmrldhugjzzdatq") - .withOrganizationName("oc") + new OrganizationResourceInner().withOrganizationId("ryplwckbasyypn") + .withOrganizationName("hsgcbacphejkot") .withBillingSource(BillingSource.AZURE), - new OrganizationResourceInner().withOrganizationId("xolniwpwcukjfk") - .withOrganizationName("awxklr") - .withBillingSource(BillingSource.NEWRELIC))) - .withNextLink("ndlik"); + new OrganizationResourceInner().withOrganizationId("rxybz") + .withOrganizationName("e") + .withBillingSource(BillingSource.AZURE))) + .withNextLink("uqktap"); model = BinaryData.fromObject(model).toObject(OrganizationsListResponse.class); - Assertions.assertEquals("nqpjwnzlljfmpp", model.value().get(0).organizationId()); - Assertions.assertEquals("bvmgxsabkyqduuji", model.value().get(0).organizationName()); - Assertions.assertEquals(BillingSource.NEWRELIC, model.value().get(0).billingSource()); - Assertions.assertEquals("ndlik", model.nextLink()); + Assertions.assertEquals("ryplwckbasyypn", model.value().get(0).organizationId()); + Assertions.assertEquals("hsgcbacphejkot", model.value().get(0).organizationName()); + Assertions.assertEquals(BillingSource.AZURE, model.value().get(0).billingSource()); + Assertions.assertEquals("uqktap", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PartnerBillingEntityTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PartnerBillingEntityTests.java index ef9070a10cbc..ad6af2990bab 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PartnerBillingEntityTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PartnerBillingEntityTests.java @@ -12,18 +12,18 @@ public final class PartnerBillingEntityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartnerBillingEntity model - = BinaryData.fromString("{\"organizationId\":\"dnvowg\",\"organizationName\":\"jugwdkcglhsl\"}") + = BinaryData.fromString("{\"organizationId\":\"a\",\"organizationName\":\"uhrzayvvt\"}") .toObject(PartnerBillingEntity.class); - Assertions.assertEquals("dnvowg", model.organizationId()); - Assertions.assertEquals("jugwdkcglhsl", model.organizationName()); + Assertions.assertEquals("a", model.organizationId()); + Assertions.assertEquals("uhrzayvvt", model.organizationName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PartnerBillingEntity model - = new PartnerBillingEntity().withOrganizationId("dnvowg").withOrganizationName("jugwdkcglhsl"); + = new PartnerBillingEntity().withOrganizationId("a").withOrganizationName("uhrzayvvt"); model = BinaryData.fromObject(model).toObject(PartnerBillingEntity.class); - Assertions.assertEquals("dnvowg", model.organizationId()); - Assertions.assertEquals("jugwdkcglhsl", model.organizationName()); + Assertions.assertEquals("a", model.organizationId()); + Assertions.assertEquals("uhrzayvvt", model.organizationName()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataListResponseTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataListResponseTests.java index 87e038e497f3..d46f1c637198 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataListResponseTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataListResponseTests.java @@ -7,7 +7,6 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.newrelicobservability.fluent.models.PlanDataResourceInner; import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource; -import com.azure.resourcemanager.newrelicobservability.models.BillingCycle; import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource; import com.azure.resourcemanager.newrelicobservability.models.PlanData; import com.azure.resourcemanager.newrelicobservability.models.PlanDataListResponse; @@ -20,35 +19,53 @@ public final class PlanDataListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlanDataListResponse model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"planData\":{\"usageType\":\"PAYG\",\"billingCycle\":\"WEEKLY\",\"planDetails\":\"mbe\",\"effectiveDate\":\"2021-10-01T04:14:33Z\"},\"orgCreationSource\":\"NEWRELIC\",\"accountCreationSource\":\"LIFTR\"},\"id\":\"rolfpfp\",\"name\":\"algbquxigjyjg\",\"type\":\"jaoyfhrtx\"}],\"nextLink\":\"n\"}") + "{\"value\":[{\"properties\":{\"planData\":{\"usageType\":\"PAYG\",\"billingCycle\":\"qux\",\"planDetails\":\"jyj\",\"effectiveDate\":\"2021-06-25T17:47:27Z\"},\"orgCreationSource\":\"LIFTR\",\"accountCreationSource\":\"NEWRELIC\"},\"id\":\"rtxilner\",\"name\":\"ujysvle\",\"type\":\"uvfqawrlyxwj\"},{\"properties\":{\"planData\":{\"usageType\":\"COMMITTED\",\"billingCycle\":\"wbxgjvt\",\"planDetails\":\"p\",\"effectiveDate\":\"2021-04-27T05:48:18Z\"},\"orgCreationSource\":\"NEWRELIC\",\"accountCreationSource\":\"LIFTR\"},\"id\":\"jq\",\"name\":\"uhmuouqfprwzwbn\",\"type\":\"uitnwuiz\"},{\"properties\":{\"planData\":{\"usageType\":\"COMMITTED\",\"billingCycle\":\"izuckyfihrfidfvz\",\"planDetails\":\"zuhtymwisdkfthwx\",\"effectiveDate\":\"2021-12-09T20:21:41Z\"},\"orgCreationSource\":\"LIFTR\",\"accountCreationSource\":\"LIFTR\"},\"id\":\"pvkmijcmmxdcuf\",\"name\":\"fsrpymzidnse\",\"type\":\"cxtbzsg\"}],\"nextLink\":\"c\"}") .toObject(PlanDataListResponse.class); Assertions.assertEquals(UsageType.PAYG, model.value().get(0).planData().usageType()); - Assertions.assertEquals(BillingCycle.WEEKLY, model.value().get(0).planData().billingCycle()); - Assertions.assertEquals("mbe", model.value().get(0).planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-01T04:14:33Z"), + Assertions.assertEquals("qux", model.value().get(0).planData().billingCycle()); + Assertions.assertEquals("jyj", model.value().get(0).planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-25T17:47:27Z"), model.value().get(0).planData().effectiveDate()); - Assertions.assertEquals(OrgCreationSource.NEWRELIC, model.value().get(0).orgCreationSource()); - Assertions.assertEquals(AccountCreationSource.LIFTR, model.value().get(0).accountCreationSource()); - Assertions.assertEquals("n", model.nextLink()); + Assertions.assertEquals(OrgCreationSource.LIFTR, model.value().get(0).orgCreationSource()); + Assertions.assertEquals(AccountCreationSource.NEWRELIC, model.value().get(0).accountCreationSource()); + Assertions.assertEquals("c", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PlanDataListResponse model = new PlanDataListResponse().withValue(Arrays.asList(new PlanDataResourceInner() - .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.WEEKLY) - .withPlanDetails("mbe") - .withEffectiveDate(OffsetDateTime.parse("2021-10-01T04:14:33Z"))) - .withOrgCreationSource(OrgCreationSource.NEWRELIC) - .withAccountCreationSource(AccountCreationSource.LIFTR))).withNextLink("n"); + PlanDataListResponse model + = new PlanDataListResponse() + .withValue(Arrays.asList( + new PlanDataResourceInner() + .withPlanData(new PlanData().withUsageType(UsageType.PAYG) + .withBillingCycle("qux") + .withPlanDetails("jyj") + .withEffectiveDate(OffsetDateTime.parse("2021-06-25T17:47:27Z"))) + .withOrgCreationSource(OrgCreationSource.LIFTR) + .withAccountCreationSource(AccountCreationSource.NEWRELIC), + new PlanDataResourceInner() + .withPlanData(new PlanData().withUsageType(UsageType.COMMITTED) + .withBillingCycle("wbxgjvt") + .withPlanDetails("p") + .withEffectiveDate(OffsetDateTime.parse("2021-04-27T05:48:18Z"))) + .withOrgCreationSource(OrgCreationSource.NEWRELIC) + .withAccountCreationSource(AccountCreationSource.LIFTR), + new PlanDataResourceInner() + .withPlanData(new PlanData().withUsageType(UsageType.COMMITTED) + .withBillingCycle("izuckyfihrfidfvz") + .withPlanDetails("zuhtymwisdkfthwx") + .withEffectiveDate(OffsetDateTime.parse("2021-12-09T20:21:41Z"))) + .withOrgCreationSource(OrgCreationSource.LIFTR) + .withAccountCreationSource(AccountCreationSource.LIFTR))) + .withNextLink("c"); model = BinaryData.fromObject(model).toObject(PlanDataListResponse.class); Assertions.assertEquals(UsageType.PAYG, model.value().get(0).planData().usageType()); - Assertions.assertEquals(BillingCycle.WEEKLY, model.value().get(0).planData().billingCycle()); - Assertions.assertEquals("mbe", model.value().get(0).planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-01T04:14:33Z"), + Assertions.assertEquals("qux", model.value().get(0).planData().billingCycle()); + Assertions.assertEquals("jyj", model.value().get(0).planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-25T17:47:27Z"), model.value().get(0).planData().effectiveDate()); - Assertions.assertEquals(OrgCreationSource.NEWRELIC, model.value().get(0).orgCreationSource()); - Assertions.assertEquals(AccountCreationSource.LIFTR, model.value().get(0).accountCreationSource()); - Assertions.assertEquals("n", model.nextLink()); + Assertions.assertEquals(OrgCreationSource.LIFTR, model.value().get(0).orgCreationSource()); + Assertions.assertEquals(AccountCreationSource.NEWRELIC, model.value().get(0).accountCreationSource()); + Assertions.assertEquals("c", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataPropertiesTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataPropertiesTests.java index 1a24aa4aca48..1fe69866befd 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataPropertiesTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataPropertiesTests.java @@ -7,7 +7,6 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.newrelicobservability.fluent.models.PlanDataProperties; import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource; -import com.azure.resourcemanager.newrelicobservability.models.BillingCycle; import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource; import com.azure.resourcemanager.newrelicobservability.models.PlanData; import com.azure.resourcemanager.newrelicobservability.models.UsageType; @@ -18,31 +17,31 @@ public final class PlanDataPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlanDataProperties model = BinaryData.fromString( - "{\"planData\":{\"usageType\":\"PAYG\",\"billingCycle\":\"WEEKLY\",\"planDetails\":\"rwzwbng\",\"effectiveDate\":\"2021-01-28T09:21:30Z\"},\"orgCreationSource\":\"LIFTR\",\"accountCreationSource\":\"LIFTR\"}") + "{\"planData\":{\"usageType\":\"PAYG\",\"billingCycle\":\"jtckwhdso\",\"planDetails\":\"iy\",\"effectiveDate\":\"2021-01-18T03:53:41Z\"},\"orgCreationSource\":\"LIFTR\",\"accountCreationSource\":\"NEWRELIC\"}") .toObject(PlanDataProperties.class); Assertions.assertEquals(UsageType.PAYG, model.planData().usageType()); - Assertions.assertEquals(BillingCycle.WEEKLY, model.planData().billingCycle()); - Assertions.assertEquals("rwzwbng", model.planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-28T09:21:30Z"), model.planData().effectiveDate()); + Assertions.assertEquals("jtckwhdso", model.planData().billingCycle()); + Assertions.assertEquals("iy", model.planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T03:53:41Z"), model.planData().effectiveDate()); Assertions.assertEquals(OrgCreationSource.LIFTR, model.orgCreationSource()); - Assertions.assertEquals(AccountCreationSource.LIFTR, model.accountCreationSource()); + Assertions.assertEquals(AccountCreationSource.NEWRELIC, model.accountCreationSource()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlanDataProperties model = new PlanDataProperties() .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.WEEKLY) - .withPlanDetails("rwzwbng") - .withEffectiveDate(OffsetDateTime.parse("2021-01-28T09:21:30Z"))) + .withBillingCycle("jtckwhdso") + .withPlanDetails("iy") + .withEffectiveDate(OffsetDateTime.parse("2021-01-18T03:53:41Z"))) .withOrgCreationSource(OrgCreationSource.LIFTR) - .withAccountCreationSource(AccountCreationSource.LIFTR); + .withAccountCreationSource(AccountCreationSource.NEWRELIC); model = BinaryData.fromObject(model).toObject(PlanDataProperties.class); Assertions.assertEquals(UsageType.PAYG, model.planData().usageType()); - Assertions.assertEquals(BillingCycle.WEEKLY, model.planData().billingCycle()); - Assertions.assertEquals("rwzwbng", model.planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-28T09:21:30Z"), model.planData().effectiveDate()); + Assertions.assertEquals("jtckwhdso", model.planData().billingCycle()); + Assertions.assertEquals("iy", model.planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T03:53:41Z"), model.planData().effectiveDate()); Assertions.assertEquals(OrgCreationSource.LIFTR, model.orgCreationSource()); - Assertions.assertEquals(AccountCreationSource.LIFTR, model.accountCreationSource()); + Assertions.assertEquals(AccountCreationSource.NEWRELIC, model.accountCreationSource()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataResourceInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataResourceInnerTests.java index cc403280df95..0f28c7dd2efb 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataResourceInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataResourceInnerTests.java @@ -7,7 +7,6 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.newrelicobservability.fluent.models.PlanDataResourceInner; import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource; -import com.azure.resourcemanager.newrelicobservability.models.BillingCycle; import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource; import com.azure.resourcemanager.newrelicobservability.models.PlanData; import com.azure.resourcemanager.newrelicobservability.models.UsageType; @@ -18,31 +17,31 @@ public final class PlanDataResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlanDataResourceInner model = BinaryData.fromString( - "{\"properties\":{\"planData\":{\"usageType\":\"PAYG\",\"billingCycle\":\"MONTHLY\",\"planDetails\":\"l\",\"effectiveDate\":\"2020-12-23T01:20:43Z\"},\"orgCreationSource\":\"NEWRELIC\",\"accountCreationSource\":\"LIFTR\"},\"id\":\"rlyxwjkcprbnw\",\"name\":\"xgjvtbv\",\"type\":\"ysszdnrujqguh\"}") + "{\"properties\":{\"planData\":{\"usageType\":\"COMMITTED\",\"billingCycle\":\"dwzjeiach\",\"planDetails\":\"osfln\",\"effectiveDate\":\"2021-02-05T00:34:52Z\"},\"orgCreationSource\":\"LIFTR\",\"accountCreationSource\":\"LIFTR\"},\"id\":\"ehzzvypyqrim\",\"name\":\"inpvswjdkirsoodq\",\"type\":\"hc\"}") .toObject(PlanDataResourceInner.class); - Assertions.assertEquals(UsageType.PAYG, model.planData().usageType()); - Assertions.assertEquals(BillingCycle.MONTHLY, model.planData().billingCycle()); - Assertions.assertEquals("l", model.planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-23T01:20:43Z"), model.planData().effectiveDate()); - Assertions.assertEquals(OrgCreationSource.NEWRELIC, model.orgCreationSource()); + Assertions.assertEquals(UsageType.COMMITTED, model.planData().usageType()); + Assertions.assertEquals("dwzjeiach", model.planData().billingCycle()); + Assertions.assertEquals("osfln", model.planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-05T00:34:52Z"), model.planData().effectiveDate()); + Assertions.assertEquals(OrgCreationSource.LIFTR, model.orgCreationSource()); Assertions.assertEquals(AccountCreationSource.LIFTR, model.accountCreationSource()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlanDataResourceInner model = new PlanDataResourceInner() - .withPlanData(new PlanData().withUsageType(UsageType.PAYG) - .withBillingCycle(BillingCycle.MONTHLY) - .withPlanDetails("l") - .withEffectiveDate(OffsetDateTime.parse("2020-12-23T01:20:43Z"))) - .withOrgCreationSource(OrgCreationSource.NEWRELIC) + .withPlanData(new PlanData().withUsageType(UsageType.COMMITTED) + .withBillingCycle("dwzjeiach") + .withPlanDetails("osfln") + .withEffectiveDate(OffsetDateTime.parse("2021-02-05T00:34:52Z"))) + .withOrgCreationSource(OrgCreationSource.LIFTR) .withAccountCreationSource(AccountCreationSource.LIFTR); model = BinaryData.fromObject(model).toObject(PlanDataResourceInner.class); - Assertions.assertEquals(UsageType.PAYG, model.planData().usageType()); - Assertions.assertEquals(BillingCycle.MONTHLY, model.planData().billingCycle()); - Assertions.assertEquals("l", model.planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-23T01:20:43Z"), model.planData().effectiveDate()); - Assertions.assertEquals(OrgCreationSource.NEWRELIC, model.orgCreationSource()); + Assertions.assertEquals(UsageType.COMMITTED, model.planData().usageType()); + Assertions.assertEquals("dwzjeiach", model.planData().billingCycle()); + Assertions.assertEquals("osfln", model.planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-05T00:34:52Z"), model.planData().effectiveDate()); + Assertions.assertEquals(OrgCreationSource.LIFTR, model.orgCreationSource()); Assertions.assertEquals(AccountCreationSource.LIFTR, model.accountCreationSource()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataTests.java index f7427e96d244..e2c4ca9555eb 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlanDataTests.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.newrelicobservability.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.newrelicobservability.models.BillingCycle; import com.azure.resourcemanager.newrelicobservability.models.PlanData; import com.azure.resourcemanager.newrelicobservability.models.UsageType; import java.time.OffsetDateTime; @@ -15,24 +14,24 @@ public final class PlanDataTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlanData model = BinaryData.fromString( - "{\"usageType\":\"COMMITTED\",\"billingCycle\":\"WEEKLY\",\"planDetails\":\"gsntnbybkzgcwr\",\"effectiveDate\":\"2021-09-26T22:03:54Z\"}") + "{\"usageType\":\"COMMITTED\",\"billingCycle\":\"vwrwj\",\"planDetails\":\"usnhutje\",\"effectiveDate\":\"2021-05-06T12:31:07Z\"}") .toObject(PlanData.class); Assertions.assertEquals(UsageType.COMMITTED, model.usageType()); - Assertions.assertEquals(BillingCycle.WEEKLY, model.billingCycle()); - Assertions.assertEquals("gsntnbybkzgcwr", model.planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-26T22:03:54Z"), model.effectiveDate()); + Assertions.assertEquals("vwrwj", model.billingCycle()); + Assertions.assertEquals("usnhutje", model.planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T12:31:07Z"), model.effectiveDate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlanData model = new PlanData().withUsageType(UsageType.COMMITTED) - .withBillingCycle(BillingCycle.WEEKLY) - .withPlanDetails("gsntnbybkzgcwr") - .withEffectiveDate(OffsetDateTime.parse("2021-09-26T22:03:54Z")); + .withBillingCycle("vwrwj") + .withPlanDetails("usnhutje") + .withEffectiveDate(OffsetDateTime.parse("2021-05-06T12:31:07Z")); model = BinaryData.fromObject(model).toObject(PlanData.class); Assertions.assertEquals(UsageType.COMMITTED, model.usageType()); - Assertions.assertEquals(BillingCycle.WEEKLY, model.billingCycle()); - Assertions.assertEquals("gsntnbybkzgcwr", model.planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-26T22:03:54Z"), model.effectiveDate()); + Assertions.assertEquals("vwrwj", model.billingCycle()); + Assertions.assertEquals("usnhutje", model.planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T12:31:07Z"), model.effectiveDate()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListMockTests.java index a3a931ee7706..064d5a58e07d 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/PlansListMockTests.java @@ -7,12 +7,11 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource; -import com.azure.resourcemanager.newrelicobservability.models.BillingCycle; import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource; import com.azure.resourcemanager.newrelicobservability.models.PlanDataResource; import com.azure.resourcemanager.newrelicobservability.models.UsageType; @@ -26,24 +25,24 @@ public final class PlansListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"planData\":{\"usageType\":\"PAYG\",\"billingCycle\":\"MONTHLY\",\"planDetails\":\"ft\",\"effectiveDate\":\"2021-05-16T02:46:56Z\"},\"orgCreationSource\":\"NEWRELIC\",\"accountCreationSource\":\"NEWRELIC\"},\"id\":\"zvqtmnubexkp\",\"name\":\"ksmond\",\"type\":\"mquxvypo\"}]}"; + = "{\"value\":[{\"properties\":{\"planData\":{\"usageType\":\"PAYG\",\"billingCycle\":\"mnzgmwznmabi\",\"planDetails\":\"sorgj\",\"effectiveDate\":\"2021-10-23T19:23:01Z\"},\"orgCreationSource\":\"NEWRELIC\",\"accountCreationSource\":\"LIFTR\"},\"id\":\"wrlkdmtn\",\"name\":\"vokotllxdyh\",\"type\":\"syocogjltdtbnnha\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.plans().list("dggkzzlvmbmpa", "modfvuefywsbpfvm", com.azure.core.util.Context.NONE); + = manager.plans().list("rwyhqmibzyhwitsm", "pyy", com.azure.core.util.Context.NONE); Assertions.assertEquals(UsageType.PAYG, response.iterator().next().planData().usageType()); - Assertions.assertEquals(BillingCycle.MONTHLY, response.iterator().next().planData().billingCycle()); - Assertions.assertEquals("ft", response.iterator().next().planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-16T02:46:56Z"), + Assertions.assertEquals("mnzgmwznmabi", response.iterator().next().planData().billingCycle()); + Assertions.assertEquals("sorgj", response.iterator().next().planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-23T19:23:01Z"), response.iterator().next().planData().effectiveDate()); Assertions.assertEquals(OrgCreationSource.NEWRELIC, response.iterator().next().orgCreationSource()); - Assertions.assertEquals(AccountCreationSource.NEWRELIC, response.iterator().next().accountCreationSource()); + Assertions.assertEquals(AccountCreationSource.LIFTR, response.iterator().next().accountCreationSource()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ResubscribePropertiesTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ResubscribePropertiesTests.java new file mode 100644 index 000000000000..702815d3a7b0 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/ResubscribePropertiesTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.newrelicobservability.models.ResubscribeProperties; +import org.junit.jupiter.api.Assertions; + +public final class ResubscribePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ResubscribeProperties model = BinaryData.fromString( + "{\"planId\":\"aiuebbaumnyqu\",\"termId\":\"deoj\",\"subscriptionId\":\"bckhsmtxpsi\",\"resourceGroup\":\"tfhvpesapskrdqmh\",\"organizationId\":\"dhtldwkyz\",\"publisherId\":\"utknc\",\"offerId\":\"cwsvlxotog\"}") + .toObject(ResubscribeProperties.class); + Assertions.assertEquals("aiuebbaumnyqu", model.planId()); + Assertions.assertEquals("deoj", model.termId()); + Assertions.assertEquals("bckhsmtxpsi", model.subscriptionId()); + Assertions.assertEquals("tfhvpesapskrdqmh", model.resourceGroup()); + Assertions.assertEquals("dhtldwkyz", model.organizationId()); + Assertions.assertEquals("utknc", model.publisherId()); + Assertions.assertEquals("cwsvlxotog", model.offerId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ResubscribeProperties model = new ResubscribeProperties().withPlanId("aiuebbaumnyqu") + .withTermId("deoj") + .withSubscriptionId("bckhsmtxpsi") + .withResourceGroup("tfhvpesapskrdqmh") + .withOrganizationId("dhtldwkyz") + .withPublisherId("utknc") + .withOfferId("cwsvlxotog"); + model = BinaryData.fromObject(model).toObject(ResubscribeProperties.class); + Assertions.assertEquals("aiuebbaumnyqu", model.planId()); + Assertions.assertEquals("deoj", model.termId()); + Assertions.assertEquals("bckhsmtxpsi", model.subscriptionId()); + Assertions.assertEquals("tfhvpesapskrdqmh", model.resourceGroup()); + Assertions.assertEquals("dhtldwkyz", model.organizationId()); + Assertions.assertEquals("utknc", model.publisherId()); + Assertions.assertEquals("cwsvlxotog", model.offerId()); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSActivateResourceWithResponseMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSActivateResourceWithResponseMockTests.java new file mode 100644 index 000000000000..3599752bd48e --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSActivateResourceWithResponseMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; +import com.azure.resourcemanager.newrelicobservability.models.ActivateSaaSParameterRequest; +import com.azure.resourcemanager.newrelicobservability.models.SaaSResourceDetailsResponse; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SaaSActivateResourceWithResponseMockTests { + @Test + public void testActivateResourceWithResponse() throws Exception { + String responseStr + = "{\"saasId\":\"pppcqeqxo\",\"id\":\"dahzxctobg\",\"name\":\"kdmoi\",\"type\":\"postmgrcfbunrm\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + SaaSResourceDetailsResponse response = manager.saaS() + .activateResourceWithResponse( + new ActivateSaaSParameterRequest().withSaasGuid("fdygpfqbuaceopz").withPublisherId("qrhhu"), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("pppcqeqxo", response.saasId()); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSDataTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSDataTests.java new file mode 100644 index 000000000000..e9f9a9b0fecf --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSDataTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.newrelicobservability.models.SaaSData; +import org.junit.jupiter.api.Assertions; + +public final class SaaSDataTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SaaSData model = BinaryData.fromString("{\"saaSResourceId\":\"ldhugjzzdatqxh\"}").toObject(SaaSData.class); + Assertions.assertEquals("ldhugjzzdatqxh", model.saaSResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SaaSData model = new SaaSData().withSaaSResourceId("ldhugjzzdatqxh"); + model = BinaryData.fromObject(model).toObject(SaaSData.class); + Assertions.assertEquals("ldhugjzzdatqxh", model.saaSResourceId()); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSResourceDetailsResponseInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSResourceDetailsResponseInnerTests.java new file mode 100644 index 000000000000..89054e62fd63 --- /dev/null +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SaaSResourceDetailsResponseInnerTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.newrelicobservability.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.newrelicobservability.fluent.models.SaaSResourceDetailsResponseInner; +import org.junit.jupiter.api.Assertions; + +public final class SaaSResourceDetailsResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SaaSResourceDetailsResponseInner model + = BinaryData.fromString("{\"saasId\":\"oqpsoa\",\"id\":\"tazak\",\"name\":\"j\",\"type\":\"ahbc\"}") + .toObject(SaaSResourceDetailsResponseInner.class); + Assertions.assertEquals("oqpsoa", model.saasId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SaaSResourceDetailsResponseInner model = new SaaSResourceDetailsResponseInner().withSaasId("oqpsoa"); + model = BinaryData.fromObject(model).toObject(SaaSResourceDetailsResponseInner.class); + Assertions.assertEquals("oqpsoa", model.saasId()); + } +} diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SubscriptionListTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SubscriptionListTests.java index 2f3f8b7af179..7a1e3af4d58d 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SubscriptionListTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SubscriptionListTests.java @@ -24,81 +24,69 @@ public final class SubscriptionListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubscriptionList model = BinaryData.fromString( - "{\"patchOperation\":\"DeleteComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"dhmdua\",\"status\":\"InProgress\",\"error\":\"qpv\",\"tagRules\":{\"provisioningState\":\"Creating\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{},{},{},{}],\"userEmail\":\"fmisg\"}}},{\"subscriptionId\":\"nbbelda\",\"status\":\"Failed\",\"error\":\"ali\",\"tagRules\":{\"provisioningState\":\"Deleting\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{},{},{},{}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{}],\"userEmail\":\"owzxcu\"}}},{\"subscriptionId\":\"cjooxdjebwpucwwf\",\"status\":\"Active\",\"error\":\"vmeueci\",\"tagRules\":{\"provisioningState\":\"Deleted\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{},{}],\"userEmail\":\"wmcdytdxwi\"}}}],\"provisioningState\":\"Deleting\"}") + "{\"patchOperation\":\"AddComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"ghkjeszzhbi\",\"status\":\"Active\",\"error\":\"fvgxbfsmxneh\",\"tagRules\":{\"provisioningState\":\"Canceled\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{},{}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{},{}],\"userEmail\":\"ukgri\"}}},{\"subscriptionId\":\"lzlfbxzpuz\",\"status\":\"Deleting\",\"error\":\"pnq\",\"tagRules\":{\"provisioningState\":\"NotSpecified\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{},{},{}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{},{},{}],\"userEmail\":\"kpikadrgvt\"}}}],\"provisioningState\":\"Deleted\"}") .toObject(SubscriptionList.class); - Assertions.assertEquals(PatchOperation.DELETE_COMPLETE, model.patchOperation()); - Assertions.assertEquals("dhmdua", model.monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("qpv", model.monitoredSubscriptionList().get(0).error()); - Assertions.assertEquals(SendAadLogsStatus.ENABLED, + Assertions.assertEquals(PatchOperation.ADD_COMPLETE, model.patchOperation()); + Assertions.assertEquals("ghkjeszzhbi", model.monitoredSubscriptionList().get(0).subscriptionId()); + Assertions.assertEquals(Status.ACTIVE, model.monitoredSubscriptionList().get(0).status()); + Assertions.assertEquals("fvgxbfsmxneh", model.monitoredSubscriptionList().get(0).error()); + Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.monitoredSubscriptionList().get(0).tagRules().logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.monitoredSubscriptionList().get(0).tagRules().logRules().sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.monitoredSubscriptionList().get(0).tagRules().logRules().sendActivityLogs()); - Assertions.assertEquals(SendMetricsStatus.ENABLED, + Assertions.assertEquals(SendMetricsStatus.DISABLED, model.monitoredSubscriptionList().get(0).tagRules().metricRules().sendMetrics()); - Assertions.assertEquals("fmisg", model.monitoredSubscriptionList().get(0).tagRules().metricRules().userEmail()); + Assertions.assertEquals("ukgri", model.monitoredSubscriptionList().get(0).tagRules().metricRules().userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SubscriptionList model - = new SubscriptionList().withPatchOperation(PatchOperation.DELETE_COMPLETE) + = new SubscriptionList().withPatchOperation(PatchOperation.ADD_COMPLETE) .withMonitoredSubscriptionList( Arrays .asList( - new MonitoredSubscriptionInner().withSubscriptionId("dhmdua") - .withStatus(Status.IN_PROGRESS) - .withError("qpv") + new MonitoredSubscriptionInner().withSubscriptionId("ghkjeszzhbi") + .withStatus(Status.ACTIVE) + .withError("fvgxbfsmxneh") .withTagRules(new MonitoringTagRulesPropertiesInner() - .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) + .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.DISABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) .withSendActivityLogs(SendActivityLogsStatus.ENABLED) - .withFilteringTags(Arrays.asList(new FilteringTag()))) + .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag()))) .withMetricRules( - new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) - .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag(), - new FilteringTag(), new FilteringTag())) - .withUserEmail("fmisg"))), - new MonitoredSubscriptionInner().withSubscriptionId("nbbelda") - .withStatus(Status.FAILED) - .withError("ali") - .withTagRules( - new MonitoringTagRulesPropertiesInner() - .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.DISABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) - .withSendActivityLogs(SendActivityLogsStatus.DISABLED) - .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag(), - new FilteringTag(), new FilteringTag()))) - .withMetricRules( - new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) - .withFilteringTags(Arrays.asList(new FilteringTag())) - .withUserEmail("owzxcu"))), - new MonitoredSubscriptionInner().withSubscriptionId("cjooxdjebwpucwwf") - .withStatus(Status.ACTIVE) - .withError("vmeueci") + new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) + .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag())) + .withUserEmail("ukgri"))), + new MonitoredSubscriptionInner().withSubscriptionId("lzlfbxzpuz") + .withStatus(Status.DELETING) + .withError("pnq") .withTagRules(new MonitoringTagRulesPropertiesInner() - .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) - .withSendActivityLogs(SendActivityLogsStatus.DISABLED) - .withFilteringTags(Arrays.asList(new FilteringTag()))) + .withLogRules( + new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) + .withSendActivityLogs(SendActivityLogsStatus.ENABLED) + .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag(), + new FilteringTag()))) .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) - .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag())) - .withUserEmail("wmcdytdxwi"))))); + .withFilteringTags( + Arrays.asList(new FilteringTag(), new FilteringTag(), new FilteringTag())) + .withUserEmail("kpikadrgvt"))))); model = BinaryData.fromObject(model).toObject(SubscriptionList.class); - Assertions.assertEquals(PatchOperation.DELETE_COMPLETE, model.patchOperation()); - Assertions.assertEquals("dhmdua", model.monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("qpv", model.monitoredSubscriptionList().get(0).error()); - Assertions.assertEquals(SendAadLogsStatus.ENABLED, + Assertions.assertEquals(PatchOperation.ADD_COMPLETE, model.patchOperation()); + Assertions.assertEquals("ghkjeszzhbi", model.monitoredSubscriptionList().get(0).subscriptionId()); + Assertions.assertEquals(Status.ACTIVE, model.monitoredSubscriptionList().get(0).status()); + Assertions.assertEquals("fvgxbfsmxneh", model.monitoredSubscriptionList().get(0).error()); + Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.monitoredSubscriptionList().get(0).tagRules().logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.monitoredSubscriptionList().get(0).tagRules().logRules().sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.monitoredSubscriptionList().get(0).tagRules().logRules().sendActivityLogs()); - Assertions.assertEquals(SendMetricsStatus.ENABLED, + Assertions.assertEquals(SendMetricsStatus.DISABLED, model.monitoredSubscriptionList().get(0).tagRules().metricRules().sendMetrics()); - Assertions.assertEquals("fmisg", model.monitoredSubscriptionList().get(0).tagRules().metricRules().userEmail()); + Assertions.assertEquals("ukgri", model.monitoredSubscriptionList().get(0).tagRules().metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SwitchBillingRequestTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SwitchBillingRequestTests.java index d3319906b60f..e8b34ff3fd76 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SwitchBillingRequestTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/SwitchBillingRequestTests.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.newrelicobservability.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.newrelicobservability.models.BillingCycle; import com.azure.resourcemanager.newrelicobservability.models.PlanData; import com.azure.resourcemanager.newrelicobservability.models.SwitchBillingRequest; import com.azure.resourcemanager.newrelicobservability.models.UsageType; @@ -16,33 +15,33 @@ public final class SwitchBillingRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SwitchBillingRequest model = BinaryData.fromString( - "{\"azureResourceId\":\"jqkwpyeicx\",\"organizationId\":\"ciwqvhk\",\"planData\":{\"usageType\":\"COMMITTED\",\"billingCycle\":\"WEEKLY\",\"planDetails\":\"topbobjogh\",\"effectiveDate\":\"2021-04-17T11:58:30Z\"},\"userEmail\":\"u\"}") + "{\"azureResourceId\":\"rupqsxvnmicy\",\"organizationId\":\"ceoveilovno\",\"planData\":{\"usageType\":\"PAYG\",\"billingCycle\":\"cnjbkcnxdhbt\",\"planDetails\":\"phywpnvj\",\"effectiveDate\":\"2021-06-01T03:51:12Z\"},\"userEmail\":\"nermcl\"}") .toObject(SwitchBillingRequest.class); - Assertions.assertEquals("jqkwpyeicx", model.azureResourceId()); - Assertions.assertEquals("ciwqvhk", model.organizationId()); - Assertions.assertEquals(UsageType.COMMITTED, model.planData().usageType()); - Assertions.assertEquals(BillingCycle.WEEKLY, model.planData().billingCycle()); - Assertions.assertEquals("topbobjogh", model.planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-17T11:58:30Z"), model.planData().effectiveDate()); - Assertions.assertEquals("u", model.userEmail()); + Assertions.assertEquals("rupqsxvnmicy", model.azureResourceId()); + Assertions.assertEquals("ceoveilovno", model.organizationId()); + Assertions.assertEquals(UsageType.PAYG, model.planData().usageType()); + Assertions.assertEquals("cnjbkcnxdhbt", model.planData().billingCycle()); + Assertions.assertEquals("phywpnvj", model.planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-01T03:51:12Z"), model.planData().effectiveDate()); + Assertions.assertEquals("nermcl", model.userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SwitchBillingRequest model = new SwitchBillingRequest().withAzureResourceId("jqkwpyeicx") - .withOrganizationId("ciwqvhk") - .withPlanData(new PlanData().withUsageType(UsageType.COMMITTED) - .withBillingCycle(BillingCycle.WEEKLY) - .withPlanDetails("topbobjogh") - .withEffectiveDate(OffsetDateTime.parse("2021-04-17T11:58:30Z"))) - .withUserEmail("u"); + SwitchBillingRequest model = new SwitchBillingRequest().withAzureResourceId("rupqsxvnmicy") + .withOrganizationId("ceoveilovno") + .withPlanData(new PlanData().withUsageType(UsageType.PAYG) + .withBillingCycle("cnjbkcnxdhbt") + .withPlanDetails("phywpnvj") + .withEffectiveDate(OffsetDateTime.parse("2021-06-01T03:51:12Z"))) + .withUserEmail("nermcl"); model = BinaryData.fromObject(model).toObject(SwitchBillingRequest.class); - Assertions.assertEquals("jqkwpyeicx", model.azureResourceId()); - Assertions.assertEquals("ciwqvhk", model.organizationId()); - Assertions.assertEquals(UsageType.COMMITTED, model.planData().usageType()); - Assertions.assertEquals(BillingCycle.WEEKLY, model.planData().billingCycle()); - Assertions.assertEquals("topbobjogh", model.planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-17T11:58:30Z"), model.planData().effectiveDate()); - Assertions.assertEquals("u", model.userEmail()); + Assertions.assertEquals("rupqsxvnmicy", model.azureResourceId()); + Assertions.assertEquals("ceoveilovno", model.organizationId()); + Assertions.assertEquals(UsageType.PAYG, model.planData().usageType()); + Assertions.assertEquals("cnjbkcnxdhbt", model.planData().billingCycle()); + Assertions.assertEquals("phywpnvj", model.planData().planDetails()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-01T03:51:12Z"), model.planData().effectiveDate()); + Assertions.assertEquals("nermcl", model.userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleInnerTests.java index 407da58ba8e2..97b563c2d75d 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleInnerTests.java @@ -21,48 +21,49 @@ public final class TagRuleInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TagRuleInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Deleting\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"yokacspkw\",\"value\":\"zdobpxjmflbvvnch\",\"action\":\"Include\"},{\"name\":\"iwwzjuqk\",\"value\":\"sa\",\"action\":\"Exclude\"},{\"name\":\"uo\",\"value\":\"skghsauuimj\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"idyjrrfbyaosvexc\",\"value\":\"npc\",\"action\":\"Exclude\"},{\"name\":\"ohslkevlegg\",\"value\":\"buhfmvfaxkffeiit\",\"action\":\"Include\"}],\"userEmail\":\"ez\"}},\"id\":\"shxmzsbbzoggigrx\",\"name\":\"burvjxxjnspy\",\"type\":\"ptkoenkoukn\"}") + "{\"properties\":{\"provisioningState\":\"Creating\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"yvjusrtslhsp\",\"value\":\"eemaofmxagkvtme\",\"action\":\"Exclude\"},{\"name\":\"rhahvljuahaquhcd\",\"value\":\"duala\",\"action\":\"Include\"}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"ws\",\"value\":\"r\",\"action\":\"Include\"},{\"name\":\"vgomz\",\"value\":\"misgwbnb\",\"action\":\"Exclude\"},{\"name\":\"awkz\",\"value\":\"liourqhak\",\"action\":\"Exclude\"},{\"name\":\"shsfwxosowzxcu\",\"value\":\"cjooxdjebwpucwwf\",\"action\":\"Include\"}],\"userEmail\":\"vmeueci\"}},\"id\":\"hzceuojgjrwjue\",\"name\":\"otwmcdyt\",\"type\":\"x\"}") .toObject(TagRuleInner.class); Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.logRules().sendActivityLogs()); - Assertions.assertEquals("yokacspkw", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("zdobpxjmflbvvnch", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, model.metricRules().sendMetrics()); - Assertions.assertEquals("idyjrrfbyaosvexc", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("npc", model.metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("ez", model.metricRules().userEmail()); + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.logRules().sendSubscriptionLogs()); + Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.logRules().sendActivityLogs()); + Assertions.assertEquals("yvjusrtslhsp", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("eemaofmxagkvtme", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.metricRules().sendMetrics()); + Assertions.assertEquals("ws", model.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("r", model.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); + Assertions.assertEquals("vmeueci", model.metricRules().userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { TagRuleInner model = new TagRuleInner().withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) - .withSendActivityLogs(SendActivityLogsStatus.DISABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) + .withSendActivityLogs(SendActivityLogsStatus.ENABLED) .withFilteringTags(Arrays.asList( - new FilteringTag().withName("yokacspkw").withValue("zdobpxjmflbvvnch").withAction(TagAction.INCLUDE), - new FilteringTag().withName("iwwzjuqk").withValue("sa").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("uo").withValue("skghsauuimj").withAction(TagAction.EXCLUDE)))) - .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) - .withFilteringTags(Arrays.asList( - new FilteringTag().withName("idyjrrfbyaosvexc").withValue("npc").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("ohslkevlegg") - .withValue("buhfmvfaxkffeiit") - .withAction(TagAction.INCLUDE))) - .withUserEmail("ez")); + new FilteringTag().withName("yvjusrtslhsp").withValue("eemaofmxagkvtme").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("rhahvljuahaquhcd").withValue("duala").withAction(TagAction.INCLUDE)))) + .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) + .withFilteringTags( + Arrays.asList(new FilteringTag().withName("ws").withValue("r").withAction(TagAction.INCLUDE), + new FilteringTag().withName("vgomz").withValue("misgwbnb").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("awkz").withValue("liourqhak").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("shsfwxosowzxcu") + .withValue("cjooxdjebwpucwwf") + .withAction(TagAction.INCLUDE))) + .withUserEmail("vmeueci")); model = BinaryData.fromObject(model).toObject(TagRuleInner.class); Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.logRules().sendActivityLogs()); - Assertions.assertEquals("yokacspkw", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("zdobpxjmflbvvnch", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, model.metricRules().sendMetrics()); - Assertions.assertEquals("idyjrrfbyaosvexc", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("npc", model.metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("ez", model.metricRules().userEmail()); + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.logRules().sendSubscriptionLogs()); + Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.logRules().sendActivityLogs()); + Assertions.assertEquals("yvjusrtslhsp", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("eemaofmxagkvtme", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.metricRules().sendMetrics()); + Assertions.assertEquals("ws", model.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("r", model.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); + Assertions.assertEquals("vmeueci", model.metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleListResultTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleListResultTests.java index c17779ba63ad..4d403d67f861 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleListResultTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleListResultTests.java @@ -21,36 +21,45 @@ public final class TagRuleListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TagRuleListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"NotSpecified\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{},{}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{},{},{},{}],\"userEmail\":\"stkiiuxhqyud\"}},\"id\":\"rrqnbpoczvyifqrv\",\"name\":\"dvjsllrmvvdf\",\"type\":\"atkpnp\"}],\"nextLink\":\"exxbczwtr\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{},{}],\"userEmail\":\"bjtazqugxywpmu\"}},\"id\":\"fjz\",\"name\":\"fqkquj\",\"type\":\"dsuyonobgla\"},{\"properties\":{\"provisioningState\":\"Failed\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{},{},{},{}],\"userEmail\":\"yrxvwfudwpznt\"}},\"id\":\"dzhlrq\",\"name\":\"bh\",\"type\":\"kfrlhrxsbky\"}],\"nextLink\":\"ycanuzbpzkafku\"}") .toObject(TagRuleListResult.class); Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.value().get(0).logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.value().get(0).logRules().sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.value().get(0).logRules().sendActivityLogs()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, model.value().get(0).metricRules().sendMetrics()); - Assertions.assertEquals("stkiiuxhqyud", model.value().get(0).metricRules().userEmail()); - Assertions.assertEquals("exxbczwtr", model.nextLink()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.value().get(0).metricRules().sendMetrics()); + Assertions.assertEquals("bjtazqugxywpmu", model.value().get(0).metricRules().userEmail()); + Assertions.assertEquals("ycanuzbpzkafku", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TagRuleListResult model = new TagRuleListResult().withValue(Arrays.asList(new TagRuleInner() - .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) - .withSendActivityLogs(SendActivityLogsStatus.ENABLED) - .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag()))) - .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) - .withFilteringTags( - Arrays.asList(new FilteringTag(), new FilteringTag(), new FilteringTag(), new FilteringTag())) - .withUserEmail("stkiiuxhqyud")))) - .withNextLink("exxbczwtr"); + TagRuleListResult model = new TagRuleListResult().withValue(Arrays.asList( + new TagRuleInner() + .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) + .withSendActivityLogs(SendActivityLogsStatus.ENABLED) + .withFilteringTags(Arrays.asList(new FilteringTag()))) + .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) + .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag())) + .withUserEmail("bjtazqugxywpmu")), + new TagRuleInner() + .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) + .withSendActivityLogs(SendActivityLogsStatus.DISABLED) + .withFilteringTags(Arrays.asList(new FilteringTag()))) + .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) + .withFilteringTags( + Arrays.asList(new FilteringTag(), new FilteringTag(), new FilteringTag(), new FilteringTag())) + .withUserEmail("yrxvwfudwpznt")))) + .withNextLink("ycanuzbpzkafku"); model = BinaryData.fromObject(model).toObject(TagRuleListResult.class); Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.value().get(0).logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.value().get(0).logRules().sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.value().get(0).logRules().sendActivityLogs()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, model.value().get(0).metricRules().sendMetrics()); - Assertions.assertEquals("stkiiuxhqyud", model.value().get(0).metricRules().userEmail()); - Assertions.assertEquals("exxbczwtr", model.nextLink()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.value().get(0).metricRules().sendMetrics()); + Assertions.assertEquals("bjtazqugxywpmu", model.value().get(0).metricRules().userEmail()); + Assertions.assertEquals("ycanuzbpzkafku", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdateInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdateInnerTests.java index 27c37b9679eb..5d0ecd6dfd50 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdateInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdateInnerTests.java @@ -21,48 +21,51 @@ public final class TagRuleUpdateInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TagRuleUpdateInner model = BinaryData.fromString( - "{\"properties\":{\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"pwvlqdq\",\"value\":\"iqylihkaetck\",\"action\":\"Exclude\"},{\"name\":\"ivfsnk\",\"value\":\"uctqhjfbe\",\"action\":\"Exclude\"},{\"name\":\"xerf\",\"value\":\"utttxfvjrbirp\",\"action\":\"Exclude\"},{\"name\":\"c\",\"value\":\"ahfn\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"ujqgidok\",\"value\":\"ljyoxgvcltb\",\"action\":\"Include\"},{\"name\":\"ghkjeszzhbi\",\"value\":\"txfvgx\",\"action\":\"Include\"}],\"userEmail\":\"xnehmpvec\"}}}") + "{\"properties\":{\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"gxhnisk\",\"value\":\"bkpyc\",\"action\":\"Include\"},{\"name\":\"ndnhj\",\"value\":\"uwhvylwzbtdhxujz\",\"action\":\"Include\"},{\"name\":\"ow\",\"value\":\"przqlveu\",\"action\":\"Include\"}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"xobbcswsrt\",\"value\":\"iplrbpbewtghfgb\",\"action\":\"Include\"},{\"name\":\"xzvlvqhjkbegib\",\"value\":\"mxiebw\",\"action\":\"Include\"},{\"name\":\"ayqcgw\",\"value\":\"zjuzgwyz\",\"action\":\"Include\"},{\"name\":\"ongmtsa\",\"value\":\"cbpwxqpsrknft\",\"action\":\"Exclude\"}],\"userEmail\":\"iuhprwmdyvxqta\"}}}") .toObject(TagRuleUpdateInner.class); Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.logRules().sendActivityLogs()); - Assertions.assertEquals("pwvlqdq", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("iqylihkaetck", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, model.metricRules().sendMetrics()); - Assertions.assertEquals("ujqgidok", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("ljyoxgvcltb", model.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, model.logRules().sendSubscriptionLogs()); + Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.logRules().sendActivityLogs()); + Assertions.assertEquals("gxhnisk", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("bkpyc", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.metricRules().sendMetrics()); + Assertions.assertEquals("xobbcswsrt", model.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("iplrbpbewtghfgb", model.metricRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("xnehmpvec", model.metricRules().userEmail()); + Assertions.assertEquals("iuhprwmdyvxqta", model.metricRules().userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { TagRuleUpdateInner model = new TagRuleUpdateInner() .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.DISABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) - .withSendActivityLogs(SendActivityLogsStatus.DISABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) + .withSendActivityLogs(SendActivityLogsStatus.ENABLED) .withFilteringTags(Arrays.asList( - new FilteringTag().withName("pwvlqdq").withValue("iqylihkaetck").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("ivfsnk").withValue("uctqhjfbe").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("xerf").withValue("utttxfvjrbirp").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("c").withValue("ahfn").withAction(TagAction.EXCLUDE)))) - .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) + new FilteringTag().withName("gxhnisk").withValue("bkpyc").withAction(TagAction.INCLUDE), + new FilteringTag().withName("ndnhj").withValue("uwhvylwzbtdhxujz").withAction(TagAction.INCLUDE), + new FilteringTag().withName("ow").withValue("przqlveu").withAction(TagAction.INCLUDE)))) + .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) .withFilteringTags(Arrays.asList( - new FilteringTag().withName("ujqgidok").withValue("ljyoxgvcltb").withAction(TagAction.INCLUDE), - new FilteringTag().withName("ghkjeszzhbi").withValue("txfvgx").withAction(TagAction.INCLUDE))) - .withUserEmail("xnehmpvec")); + new FilteringTag().withName("xobbcswsrt") + .withValue("iplrbpbewtghfgb") + .withAction(TagAction.INCLUDE), + new FilteringTag().withName("xzvlvqhjkbegib").withValue("mxiebw").withAction(TagAction.INCLUDE), + new FilteringTag().withName("ayqcgw").withValue("zjuzgwyz").withAction(TagAction.INCLUDE), + new FilteringTag().withName("ongmtsa").withValue("cbpwxqpsrknft").withAction(TagAction.EXCLUDE))) + .withUserEmail("iuhprwmdyvxqta")); model = BinaryData.fromObject(model).toObject(TagRuleUpdateInner.class); Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.logRules().sendActivityLogs()); - Assertions.assertEquals("pwvlqdq", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("iqylihkaetck", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, model.metricRules().sendMetrics()); - Assertions.assertEquals("ujqgidok", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("ljyoxgvcltb", model.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, model.logRules().sendSubscriptionLogs()); + Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.logRules().sendActivityLogs()); + Assertions.assertEquals("gxhnisk", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("bkpyc", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.metricRules().sendMetrics()); + Assertions.assertEquals("xobbcswsrt", model.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("iplrbpbewtghfgb", model.metricRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("xnehmpvec", model.metricRules().userEmail()); + Assertions.assertEquals("iuhprwmdyvxqta", model.metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdatePropertiesInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdatePropertiesInnerTests.java index b1b26ba8c490..e316919534b7 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdatePropertiesInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRuleUpdatePropertiesInnerTests.java @@ -21,48 +21,48 @@ public final class TagRuleUpdatePropertiesInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TagRuleUpdatePropertiesInner model = BinaryData.fromString( - "{\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"bmpukgriwflz\",\"value\":\"bxzpuzycisp\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"rp\",\"value\":\"dhibnuq\",\"action\":\"Include\"},{\"name\":\"kadrgvt\",\"value\":\"gnbuy\",\"action\":\"Exclude\"},{\"name\":\"gg\",\"value\":\"bfs\",\"action\":\"Include\"},{\"name\":\"utrc\",\"value\":\"na\",\"action\":\"Exclude\"}],\"userEmail\":\"jrunmpxtt\"}}") + "{\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"xrmcqibycnojvk\",\"value\":\"e\",\"action\":\"Exclude\"},{\"name\":\"zvahapjy\",\"value\":\"pvgqzcjrvxdjzlm\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"zovawjvz\",\"value\":\"luthn\",\"action\":\"Include\"},{\"name\":\"xipeilpjzuaejx\",\"value\":\"ltskzbbtd\",\"action\":\"Include\"},{\"name\":\"e\",\"value\":\"gpw\",\"action\":\"Include\"},{\"name\":\"kfpbs\",\"value\":\"ofd\",\"action\":\"Exclude\"}],\"userEmail\":\"sd\"}}") .toObject(TagRuleUpdatePropertiesInner.class); - Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.logRules().sendAadLogs()); + Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.logRules().sendAadLogs()); Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.logRules().sendActivityLogs()); - Assertions.assertEquals("bmpukgriwflz", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("bxzpuzycisp", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.logRules().sendActivityLogs()); + Assertions.assertEquals("xrmcqibycnojvk", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("e", model.logRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, model.metricRules().sendMetrics()); - Assertions.assertEquals("rp", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("dhibnuq", model.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.metricRules().sendMetrics()); + Assertions.assertEquals("zovawjvz", model.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("luthn", model.metricRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("jrunmpxtt", model.metricRules().userEmail()); + Assertions.assertEquals("sd", model.metricRules().userEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TagRuleUpdatePropertiesInner model = new TagRuleUpdatePropertiesInner() - .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.DISABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) - .withSendActivityLogs(SendActivityLogsStatus.ENABLED) - .withFilteringTags(Arrays.asList(new FilteringTag().withName("bmpukgriwflz") - .withValue("bxzpuzycisp") - .withAction(TagAction.EXCLUDE)))) - .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) - .withFilteringTags( - Arrays.asList(new FilteringTag().withName("rp").withValue("dhibnuq").withAction(TagAction.INCLUDE), - new FilteringTag().withName("kadrgvt").withValue("gnbuy").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("gg").withValue("bfs").withAction(TagAction.INCLUDE), - new FilteringTag().withName("utrc").withValue("na").withAction(TagAction.EXCLUDE))) - .withUserEmail("jrunmpxtt")); + TagRuleUpdatePropertiesInner model = new TagRuleUpdatePropertiesInner().withLogRules(new LogRules() + .withSendAadLogs(SendAadLogsStatus.ENABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) + .withSendActivityLogs(SendActivityLogsStatus.DISABLED) + .withFilteringTags(Arrays.asList( + new FilteringTag().withName("xrmcqibycnojvk").withValue("e").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("zvahapjy").withValue("pvgqzcjrvxdjzlm").withAction(TagAction.EXCLUDE)))) + .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.ENABLED) + .withFilteringTags(Arrays.asList( + new FilteringTag().withName("zovawjvz").withValue("luthn").withAction(TagAction.INCLUDE), + new FilteringTag().withName("xipeilpjzuaejx").withValue("ltskzbbtd").withAction(TagAction.INCLUDE), + new FilteringTag().withName("e").withValue("gpw").withAction(TagAction.INCLUDE), + new FilteringTag().withName("kfpbs").withValue("ofd").withAction(TagAction.EXCLUDE))) + .withUserEmail("sd")); model = BinaryData.fromObject(model).toObject(TagRuleUpdatePropertiesInner.class); - Assertions.assertEquals(SendAadLogsStatus.DISABLED, model.logRules().sendAadLogs()); + Assertions.assertEquals(SendAadLogsStatus.ENABLED, model.logRules().sendAadLogs()); Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.ENABLED, model.logRules().sendActivityLogs()); - Assertions.assertEquals("bmpukgriwflz", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("bxzpuzycisp", model.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(SendActivityLogsStatus.DISABLED, model.logRules().sendActivityLogs()); + Assertions.assertEquals("xrmcqibycnojvk", model.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("e", model.logRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, model.metricRules().sendMetrics()); - Assertions.assertEquals("rp", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("dhibnuq", model.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, model.metricRules().sendMetrics()); + Assertions.assertEquals("zovawjvz", model.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("luthn", model.metricRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("jrunmpxtt", model.metricRules().userEmail()); + Assertions.assertEquals("sd", model.metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateMockTests.java index 2459b19c945c..e5eb4095ee6d 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesCreateOrUpdateMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.fluent.models.MetricRulesInner; @@ -30,44 +30,46 @@ public final class TagRulesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"jmoadsuv\",\"value\":\"m\",\"action\":\"Include\"},{\"name\":\"jsjqbjhhyx\",\"value\":\"wlycoduhpkxkg\",\"action\":\"Include\"},{\"name\":\"eqnajxqugjhkycu\",\"value\":\"ddg\",\"action\":\"Include\"},{\"name\":\"wqm\",\"value\":\"alkrmn\",\"action\":\"Include\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"udfnbyxba\",\"value\":\"bjyvay\",\"action\":\"Exclude\"}],\"userEmail\":\"rzrtuzqogsex\"}},\"id\":\"vfdnwnwmewzsyyce\",\"name\":\"zsoibjudpfrxtr\",\"type\":\"hzv\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"acstwityk\",\"value\":\"vxccedcp\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"xltjcvnhltiu\",\"value\":\"xnavvwxq\",\"action\":\"Include\"},{\"name\":\"unyowxwl\",\"value\":\"jrkvfgbvfvpdbo\",\"action\":\"Exclude\"}],\"userEmail\":\"zsjqlh\"}},\"id\":\"r\",\"name\":\"bdeibqipqk\",\"type\":\"hvxndzwmkrefajpj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); TagRule response = manager.tagRules() - .define("hfjx") - .withExistingMonitor("himdbl", "gwimfn") + .define("enuuzkopbm") + .withExistingMonitor("zr", "rdgrtw") .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.DISABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.DISABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) .withSendActivityLogs(SendActivityLogsStatus.ENABLED) .withFilteringTags(Arrays.asList( - new FilteringTag().withName("kzikfjawneaivxwc") - .withValue("lpcirelsf") - .withAction(TagAction.EXCLUDE), - new FilteringTag().withName("wabfatkl") - .withValue("xbjhwuaanozjosph") - .withAction(TagAction.INCLUDE)))) + new FilteringTag().withName("u").withValue("fozbhdmsmlmzqhof").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("equi").withValue("xicslfao").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("yylhalnswhccsp") + .withValue("aivwitqscywu") + .withAction(TagAction.EXCLUDE)))) .withMetricRules(new MetricRulesInner().withSendMetrics(SendMetricsStatus.DISABLED) - .withFilteringTags( - Arrays.asList(new FilteringTag().withName("ag").withValue("vimjwos").withAction(TagAction.INCLUDE))) - .withUserEmail("tcs")) + .withFilteringTags(Arrays.asList( + new FilteringTag().withName("bwemhairs").withValue("gzd").withAction(TagAction.INCLUDE), + new FilteringTag().withName("eypqwdxggicccn").withValue("huexmk").withAction(TagAction.EXCLUDE), + new FilteringTag().withName("tvlz").withValue("emhzrncsdtc").withAction(TagAction.INCLUDE), + new FilteringTag().withName("ypbsfgytguslfead").withValue("gq").withAction(TagAction.EXCLUDE))) + .withUserEmail("ejhzisxg")) .create(); - Assertions.assertEquals(SendAadLogsStatus.ENABLED, response.logRules().sendAadLogs()); + Assertions.assertEquals(SendAadLogsStatus.DISABLED, response.logRules().sendAadLogs()); Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, response.logRules().sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.DISABLED, response.logRules().sendActivityLogs()); - Assertions.assertEquals("jmoadsuv", response.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("m", response.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, response.logRules().filteringTags().get(0).action()); + Assertions.assertEquals("acstwityk", response.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("vxccedcp", response.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, response.logRules().filteringTags().get(0).action()); Assertions.assertEquals(SendMetricsStatus.DISABLED, response.metricRules().sendMetrics()); - Assertions.assertEquals("udfnbyxba", response.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("bjyvay", response.metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, response.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("rzrtuzqogsex", response.metricRules().userEmail()); + Assertions.assertEquals("xltjcvnhltiu", response.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("xnavvwxq", response.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, response.metricRules().filteringTags().get(0).action()); + Assertions.assertEquals("zsjqlh", response.metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteMockTests.java index 43af27ef8aec..3d201d0bafed 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesDeleteMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.tagRules().delete("g", "xrtfudxep", "gyqagvrvmnpkuk", com.azure.core.util.Context.NONE); + manager.tagRules().delete("ewpusdsttwvogvb", "ejdcngqqmoakuf", "m", com.azure.core.util.Context.NONE); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetWithResponseMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetWithResponseMockTests.java index 94300f4e0caf..dbe6cda2c213 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetWithResponseMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesGetWithResponseMockTests.java @@ -6,8 +6,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.SendAadLogsStatus; @@ -26,29 +26,29 @@ public final class TagRulesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"zqioxiysuii\",\"value\":\"nkedyatrwyhqmib\",\"action\":\"Include\"},{\"name\":\"itsmypyyn\",\"value\":\"dpumnzgmw\",\"action\":\"Exclude\"},{\"name\":\"biknsorgjhxbld\",\"value\":\"wwrlkdmtncv\",\"action\":\"Exclude\"},{\"name\":\"llxdyhgs\",\"value\":\"cogjltdtbn\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"vcikhnvpamqgx\",\"value\":\"u\",\"action\":\"Include\"},{\"name\":\"ywggx\",\"value\":\"lla\",\"action\":\"Include\"},{\"name\":\"wuipiccjzkzivg\",\"value\":\"c\",\"action\":\"Include\"}],\"userEmail\":\"hyrnxxmu\"}},\"id\":\"dndrdvstkwqqtche\",\"name\":\"lmfmtdaay\",\"type\":\"dvwvgpio\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"vexztvbtqgs\",\"value\":\"aoyzkoow\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"q\",\"value\":\"dsyuuximerqfob\",\"action\":\"Exclude\"}],\"userEmail\":\"kby\"}},\"id\":\"t\",\"name\":\"pfhpagmhrskdsnfd\",\"type\":\"doakgtdlmkkzevdl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); TagRule response = manager.tagRules() - .getWithResponse("synljphuopxodl", "iyntorzihle", "sjswsrms", com.azure.core.util.Context.NONE) + .getWithResponse("haz", "khnzbonlw", "toego", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(SendAadLogsStatus.DISABLED, response.logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, response.logRules().sendSubscriptionLogs()); + Assertions.assertEquals(SendAadLogsStatus.ENABLED, response.logRules().sendAadLogs()); + Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, response.logRules().sendSubscriptionLogs()); Assertions.assertEquals(SendActivityLogsStatus.DISABLED, response.logRules().sendActivityLogs()); - Assertions.assertEquals("zqioxiysuii", response.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("nkedyatrwyhqmib", response.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, response.logRules().filteringTags().get(0).action()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, response.metricRules().sendMetrics()); - Assertions.assertEquals("vcikhnvpamqgx", response.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("u", response.metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, response.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("hyrnxxmu", response.metricRules().userEmail()); + Assertions.assertEquals("vexztvbtqgs", response.logRules().filteringTags().get(0).name()); + Assertions.assertEquals("aoyzkoow", response.logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, response.logRules().filteringTags().get(0).action()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, response.metricRules().sendMetrics()); + Assertions.assertEquals("q", response.metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("dsyuuximerqfob", response.metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.EXCLUDE, response.metricRules().filteringTags().get(0).action()); + Assertions.assertEquals("kby", response.metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceMockTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceMockTests.java index 0c942c71e49f..ab71547b4755 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceMockTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/TagRulesListByNewRelicMonitorResourceMockTests.java @@ -7,8 +7,8 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager; import com.azure.resourcemanager.newrelicobservability.models.SendAadLogsStatus; @@ -27,33 +27,32 @@ public final class TagRulesListByNewRelicMonitorResourceMockTests { @Test public void testListByNewRelicMonitorResource() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"lpichk\",\"value\":\"mkcdyhbpkkpwdre\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"ljxywsu\",\"value\":\"yrs\",\"action\":\"Exclude\"},{\"name\":\"tgadgvraeaen\",\"value\":\"nzar\",\"action\":\"Exclude\"},{\"name\":\"uu\",\"value\":\"fqka\",\"action\":\"Include\"}],\"userEmail\":\"ipfpubji\"}},\"id\":\"wifto\",\"name\":\"qkvpuvksgplsakn\",\"type\":\"n\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"logRules\":{\"sendAadLogs\":\"Disabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"altol\",\"value\":\"cwsobqwcs\",\"action\":\"Include\"},{\"name\":\"dcfhucqdpf\",\"value\":\"glsbjjc\",\"action\":\"Include\"},{\"name\":\"bvtvudutncormr\",\"value\":\"qtvcofudflvkgj\",\"action\":\"Include\"}]},\"metricRules\":{\"sendMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"saznqntoruds\",\"value\":\"a\",\"action\":\"Exclude\"},{\"name\":\"c\",\"value\":\"auwjuetaebu\",\"action\":\"Exclude\"},{\"name\":\"movsmzlxwabmqoe\",\"value\":\"ifrvtpu\",\"action\":\"Include\"},{\"name\":\"qlgkfbtn\",\"value\":\"aongbj\",\"action\":\"Exclude\"}],\"userEmail\":\"jitcjedftwwaez\"}},\"id\":\"jvdcpzfoqouic\",\"name\":\"bxarzgszufoxci\",\"type\":\"opidoamciodh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); NewRelicObservabilityManager manager = NewRelicObservabilityManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.tagRules() - .listByNewRelicMonitorResource("iuqgbdbutauv", "btkuwhh", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.tagRules().listByNewRelicMonitorResource("yq", "xzfe", com.azure.core.util.Context.NONE); Assertions.assertEquals(SendAadLogsStatus.DISABLED, response.iterator().next().logRules().sendAadLogs()); - Assertions.assertEquals(SendSubscriptionLogsStatus.DISABLED, + Assertions.assertEquals(SendSubscriptionLogsStatus.ENABLED, response.iterator().next().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(SendActivityLogsStatus.ENABLED, + Assertions.assertEquals(SendActivityLogsStatus.DISABLED, response.iterator().next().logRules().sendActivityLogs()); - Assertions.assertEquals("lpichk", response.iterator().next().logRules().filteringTags().get(0).name()); - Assertions.assertEquals("mkcdyhbpkkpwdre", - response.iterator().next().logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, + Assertions.assertEquals("altol", response.iterator().next().logRules().filteringTags().get(0).name()); + Assertions.assertEquals("cwsobqwcs", response.iterator().next().logRules().filteringTags().get(0).value()); + Assertions.assertEquals(TagAction.INCLUDE, response.iterator().next().logRules().filteringTags().get(0).action()); - Assertions.assertEquals(SendMetricsStatus.DISABLED, response.iterator().next().metricRules().sendMetrics()); - Assertions.assertEquals("ljxywsu", response.iterator().next().metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("yrs", response.iterator().next().metricRules().filteringTags().get(0).value()); + Assertions.assertEquals(SendMetricsStatus.ENABLED, response.iterator().next().metricRules().sendMetrics()); + Assertions.assertEquals("saznqntoruds", response.iterator().next().metricRules().filteringTags().get(0).name()); + Assertions.assertEquals("a", response.iterator().next().metricRules().filteringTags().get(0).value()); Assertions.assertEquals(TagAction.EXCLUDE, response.iterator().next().metricRules().filteringTags().get(0).action()); - Assertions.assertEquals("ipfpubji", response.iterator().next().metricRules().userEmail()); + Assertions.assertEquals("jitcjedftwwaez", response.iterator().next().metricRules().userEmail()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserAssignedIdentityTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserAssignedIdentityTests.java index c341cdf7e5df..aa3d05ebe33a 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserAssignedIdentityTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserAssignedIdentityTests.java @@ -11,7 +11,7 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"2afaa392-448a-47a3-891b-b41604fbc1f0\",\"clientId\":\"594a5240-c392-4d0f-93ac-15a1f61c66fe\"}") + "{\"principalId\":\"857d57c8-aeaf-4787-b131-2d2c96d8d9d2\",\"clientId\":\"65e03782-4f29-45d0-ae85-b1c20468aa09\"}") .toObject(UserAssignedIdentity.class); } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserInfoTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserInfoTests.java index 0e4b3ba1775c..e02ddde6013f 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserInfoTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/UserInfoTests.java @@ -12,27 +12,27 @@ public final class UserInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UserInfo model = BinaryData.fromString( - "{\"firstName\":\"cciqihnhungbwjz\",\"lastName\":\"fygxgispemvtzfk\",\"emailAddress\":\"ubljofxqe\",\"phoneNumber\":\"jaeq\",\"country\":\"qjbasvms\"}") + "{\"firstName\":\"fmppe\",\"lastName\":\"vmgxsab\",\"emailAddress\":\"qduujitcjczdz\",\"phoneNumber\":\"ndhkrw\",\"country\":\"appd\"}") .toObject(UserInfo.class); - Assertions.assertEquals("cciqihnhungbwjz", model.firstName()); - Assertions.assertEquals("fygxgispemvtzfk", model.lastName()); - Assertions.assertEquals("ubljofxqe", model.emailAddress()); - Assertions.assertEquals("jaeq", model.phoneNumber()); - Assertions.assertEquals("qjbasvms", model.country()); + Assertions.assertEquals("fmppe", model.firstName()); + Assertions.assertEquals("vmgxsab", model.lastName()); + Assertions.assertEquals("qduujitcjczdz", model.emailAddress()); + Assertions.assertEquals("ndhkrw", model.phoneNumber()); + Assertions.assertEquals("appd", model.country()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UserInfo model = new UserInfo().withFirstName("cciqihnhungbwjz") - .withLastName("fygxgispemvtzfk") - .withEmailAddress("ubljofxqe") - .withPhoneNumber("jaeq") - .withCountry("qjbasvms"); + UserInfo model = new UserInfo().withFirstName("fmppe") + .withLastName("vmgxsab") + .withEmailAddress("qduujitcjczdz") + .withPhoneNumber("ndhkrw") + .withCountry("appd"); model = BinaryData.fromObject(model).toObject(UserInfo.class); - Assertions.assertEquals("cciqihnhungbwjz", model.firstName()); - Assertions.assertEquals("fygxgispemvtzfk", model.lastName()); - Assertions.assertEquals("ubljofxqe", model.emailAddress()); - Assertions.assertEquals("jaeq", model.phoneNumber()); - Assertions.assertEquals("qjbasvms", model.country()); + Assertions.assertEquals("fmppe", model.firstName()); + Assertions.assertEquals("vmgxsab", model.lastName()); + Assertions.assertEquals("qduujitcjczdz", model.emailAddress()); + Assertions.assertEquals("ndhkrw", model.phoneNumber()); + Assertions.assertEquals("appd", model.country()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMHostsListResponseTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMHostsListResponseTests.java index 03f5b171bd3e..2ea683f44fe8 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMHostsListResponseTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMHostsListResponseTests.java @@ -14,24 +14,28 @@ public final class VMHostsListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VMHostsListResponse model = BinaryData.fromString( - "{\"value\":[{\"vmId\":\"gxlefgugnxkrxd\",\"agentVersion\":\"i\",\"agentStatus\":\"thz\"}],\"nextLink\":\"qdrabhjybigehoqf\"}") + "{\"value\":[{\"vmId\":\"pxjmflbvvnchr\",\"agentVersion\":\"ciwwzjuqkhr\",\"agentStatus\":\"jiwkuofoskghsau\"},{\"vmId\":\"mjmvxieduugidyjr\",\"agentVersion\":\"byao\",\"agentStatus\":\"e\"},{\"vmId\":\"sonpclhocohs\",\"agentVersion\":\"ev\",\"agentStatus\":\"ggzfbu\"}],\"nextLink\":\"mvfaxkffeiith\"}") .toObject(VMHostsListResponse.class); - Assertions.assertEquals("gxlefgugnxkrxd", model.value().get(0).vmId()); - Assertions.assertEquals("i", model.value().get(0).agentVersion()); - Assertions.assertEquals("thz", model.value().get(0).agentStatus()); - Assertions.assertEquals("qdrabhjybigehoqf", model.nextLink()); + Assertions.assertEquals("pxjmflbvvnchr", model.value().get(0).vmId()); + Assertions.assertEquals("ciwwzjuqkhr", model.value().get(0).agentVersion()); + Assertions.assertEquals("jiwkuofoskghsau", model.value().get(0).agentStatus()); + Assertions.assertEquals("mvfaxkffeiith", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VMHostsListResponse model = new VMHostsListResponse() - .withValue(Arrays - .asList(new VMInfoInner().withVmId("gxlefgugnxkrxd").withAgentVersion("i").withAgentStatus("thz"))) - .withNextLink("qdrabhjybigehoqf"); + .withValue(Arrays.asList( + new VMInfoInner().withVmId("pxjmflbvvnchr") + .withAgentVersion("ciwwzjuqkhr") + .withAgentStatus("jiwkuofoskghsau"), + new VMInfoInner().withVmId("mjmvxieduugidyjr").withAgentVersion("byao").withAgentStatus("e"), + new VMInfoInner().withVmId("sonpclhocohs").withAgentVersion("ev").withAgentStatus("ggzfbu"))) + .withNextLink("mvfaxkffeiith"); model = BinaryData.fromObject(model).toObject(VMHostsListResponse.class); - Assertions.assertEquals("gxlefgugnxkrxd", model.value().get(0).vmId()); - Assertions.assertEquals("i", model.value().get(0).agentVersion()); - Assertions.assertEquals("thz", model.value().get(0).agentStatus()); - Assertions.assertEquals("qdrabhjybigehoqf", model.nextLink()); + Assertions.assertEquals("pxjmflbvvnchr", model.value().get(0).vmId()); + Assertions.assertEquals("ciwwzjuqkhr", model.value().get(0).agentVersion()); + Assertions.assertEquals("jiwkuofoskghsau", model.value().get(0).agentStatus()); + Assertions.assertEquals("mvfaxkffeiith", model.nextLink()); } } diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMInfoInnerTests.java b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMInfoInnerTests.java index 8fc9411a20b8..22ddbe58feaa 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMInfoInnerTests.java +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/src/test/java/com/azure/resourcemanager/newrelicobservability/generated/VMInfoInnerTests.java @@ -11,21 +11,20 @@ public final class VMInfoInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VMInfoInner model = BinaryData - .fromString("{\"vmId\":\"wska\",\"agentVersion\":\"ktzlcuiywg\",\"agentStatus\":\"wgndrvynhzgpp\"}") - .toObject(VMInfoInner.class); - Assertions.assertEquals("wska", model.vmId()); - Assertions.assertEquals("ktzlcuiywg", model.agentVersion()); - Assertions.assertEquals("wgndrvynhzgpp", model.agentStatus()); + VMInfoInner model + = BinaryData.fromString("{\"vmId\":\"m\",\"agentVersion\":\"yvshxmz\",\"agentStatus\":\"bzoggigrx\"}") + .toObject(VMInfoInner.class); + Assertions.assertEquals("m", model.vmId()); + Assertions.assertEquals("yvshxmz", model.agentVersion()); + Assertions.assertEquals("bzoggigrx", model.agentStatus()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VMInfoInner model - = new VMInfoInner().withVmId("wska").withAgentVersion("ktzlcuiywg").withAgentStatus("wgndrvynhzgpp"); + VMInfoInner model = new VMInfoInner().withVmId("m").withAgentVersion("yvshxmz").withAgentStatus("bzoggigrx"); model = BinaryData.fromObject(model).toObject(VMInfoInner.class); - Assertions.assertEquals("wska", model.vmId()); - Assertions.assertEquals("ktzlcuiywg", model.agentVersion()); - Assertions.assertEquals("wgndrvynhzgpp", model.agentStatus()); + Assertions.assertEquals("m", model.vmId()); + Assertions.assertEquals("yvshxmz", model.agentVersion()); + Assertions.assertEquals("bzoggigrx", model.agentStatus()); } } From 55ef86eadb3e8e36dfebab55dcf08229fa0acf83 Mon Sep 17 00:00:00 2001 From: Xiaofei Cao <92354331+XiaofeiCao@users.noreply.github.com> Date: Tue, 25 Nov 2025 00:04:05 +0800 Subject: [PATCH 14/26] update knowledgebase (#47362) --- .../azure-search-documents/swagger/Update-Codegeneration.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/search/azure-search-documents/swagger/Update-Codegeneration.ps1 b/sdk/search/azure-search-documents/swagger/Update-Codegeneration.ps1 index 6e74dd78c585..735787bcf7f8 100644 --- a/sdk/search/azure-search-documents/swagger/Update-Codegeneration.ps1 +++ b/sdk/search/azure-search-documents/swagger/Update-Codegeneration.ps1 @@ -1,3 +1,3 @@ & (Join-Path $PSScriptRoot ".." ".." ".." ".." eng scripts Invoke-Codegeneration.ps1) -Directory $PSScriptRoot -AutorestOptions '--tag=searchindex' & (Join-Path $PSScriptRoot ".." ".." ".." ".." eng scripts Invoke-Codegeneration.ps1) -Directory $PSScriptRoot -AutorestOptions '--tag=searchservice' -& (Join-Path $PSScriptRoot ".." ".." ".." ".." eng scripts Invoke-Codegeneration.ps1) -Directory $PSScriptRoot -AutorestOptions '--tag=knowledgeagent' +& (Join-Path $PSScriptRoot ".." ".." ".." ".." eng scripts Invoke-Codegeneration.ps1) -Directory $PSScriptRoot -AutorestOptions '--tag=knowledgebase' From 8ed4b90a4a8d75d018c4f1cf90ede50db2b4b6ce Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 24 Nov 2025 10:01:39 -0800 Subject: [PATCH 15/26] Sync eng/common directory with azure-sdk-tools for PR 13045 (#47365) * Enforce an array for single element * Enforced an array for where filter --------- Co-authored-by: ray chen --- eng/common/scripts/Create-APIReview.ps1 | 2 +- eng/common/scripts/Validate-All-Packages.ps1 | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/eng/common/scripts/Create-APIReview.ps1 b/eng/common/scripts/Create-APIReview.ps1 index ff98d4570485..ec76326d9992 100644 --- a/eng/common/scripts/Create-APIReview.ps1 +++ b/eng/common/scripts/Create-APIReview.ps1 @@ -374,7 +374,7 @@ elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0) { # Lowest Priority: Direct PackageInfoFiles (new method) Write-Host "Using PackageInfoFiles parameter with $($PackageInfoFiles.Count) files" # Filter out empty strings or whitespace-only entries - $ProcessedPackageInfoFiles = $PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } + $ProcessedPackageInfoFiles = @($PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) }) } else { Write-Error "No package information provided. Please provide either 'PackageName', 'ArtifactList', or 'PackageInfoFiles' parameters." diff --git a/eng/common/scripts/Validate-All-Packages.ps1 b/eng/common/scripts/Validate-All-Packages.ps1 index 24cfdc85468b..ab65e1d4bdbd 100644 --- a/eng/common/scripts/Validate-All-Packages.ps1 +++ b/eng/common/scripts/Validate-All-Packages.ps1 @@ -278,12 +278,11 @@ if ($ArtifactList -and $ArtifactList.Count -gt 0) } } } -elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0) -{ +elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0) { # Direct PackageInfoFiles (new method) Write-Host "Using PackageInfoFiles parameter with $($PackageInfoFiles.Count) files" # Filter out empty strings or whitespace-only entries - $ProcessedPackageInfoFiles = $PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } + $ProcessedPackageInfoFiles = @($PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) }) } # Validate that we have package info files to process From 680d47670f2dded3d2729b4761beec02026f5a41 Mon Sep 17 00:00:00 2001 From: Sameeksha Vaity Date: Mon, 24 Nov 2025 10:21:31 -0800 Subject: [PATCH 16/26] Deprecation and removal of Azure Media Services Track 1 code (#47354) --- eng/.docsettings.yml | 2 - eng/pipelines/aggregate-reports.yml | 4 +- eng/pipelines/pullrequest.yml | 2 - eng/versioning/external_dependencies.txt | 17 - eng/versioning/version_client.txt | 1 - sdk/mediaservices/ci.data.yml | 40 - .../microsoft-azure-media/pom.xml | 209 ----- .../services/blob/BlobConfiguration.java | 44 - .../services/blob/BlobContract.java | 563 ------------- .../services/blob/BlobService.java | 99 --- .../windowsazure/services/blob/Exports.java | 36 - .../BlobExceptionProcessor.java | 343 -------- .../BlobOperationRestProxy.java | 578 ------------- .../blob/implementation/BlobRestProxy.java | 119 --- .../ContainerACLDateAdapter.java | 37 - .../blob/implementation/HmacSHA256Sign.java | 42 - .../blob/implementation/MetadataAdapter.java | 67 -- .../blob/implementation/SharedKeyFilter.java | 241 ------ .../implementation/SharedKeyLiteFilter.java | 167 ---- .../blob/implementation/SharedKeyUtils.java | 135 --- .../services/blob/implementation/package.html | 5 - .../services/blob/models/AccessCondition.java | 446 ---------- .../blob/models/AcquireLeaseOptions.java | 76 -- .../blob/models/AcquireLeaseResult.java | 61 -- .../services/blob/models/BlobProperties.java | 321 ------- .../blob/models/BlobServiceOptions.java | 55 -- .../services/blob/models/BlockList.java | 166 ---- .../blob/models/BreakLeaseResult.java | 39 - .../blob/models/CommitBlobBlocksOptions.java | 324 -------- .../services/blob/models/Constants.java | 694 ---------------- .../services/blob/models/ContainerACL.java | 484 ----------- .../services/blob/models/CopyBlobOptions.java | 254 ------ .../services/blob/models/CopyBlobResult.java | 84 -- .../blob/models/CreateBlobBlockOptions.java | 103 --- .../blob/models/CreateBlobOptions.java | 497 ----------- .../blob/models/CreateBlobPagesOptions.java | 135 --- .../blob/models/CreateBlobPagesResult.java | 151 ---- .../blob/models/CreateBlobResult.java | 85 -- .../models/CreateBlobSnapshotOptions.java | 156 ---- .../blob/models/CreateBlobSnapshotResult.java | 130 --- .../blob/models/CreateContainerOptions.java | 154 ---- .../blob/models/DeleteBlobOptions.java | 180 ---- .../blob/models/DeleteContainerOptions.java | 83 -- .../blob/models/GetBlobMetadataOptions.java | 131 --- .../blob/models/GetBlobMetadataResult.java | 125 --- .../services/blob/models/GetBlobOptions.java | 236 ------ .../blob/models/GetBlobPropertiesOptions.java | 131 --- .../blob/models/GetBlobPropertiesResult.java | 87 -- .../services/blob/models/GetBlobResult.java | 112 --- .../blob/models/GetContainerACLResult.java | 60 -- .../models/GetContainerPropertiesResult.java | 122 --- .../models/GetServicePropertiesResult.java | 63 -- .../blob/models/ListBlobBlocksOptions.java | 162 ---- .../blob/models/ListBlobBlocksResult.java | 280 ------- .../blob/models/ListBlobRegionsOptions.java | 201 ----- .../blob/models/ListBlobRegionsResult.java | 151 ---- .../blob/models/ListBlobsOptions.java | 316 ------- .../services/blob/models/ListBlobsResult.java | 590 ------------- .../blob/models/ListContainersOptions.java | 191 ----- .../blob/models/ListContainersResult.java | 449 ---------- .../services/blob/models/PageRange.java | 152 ---- .../blob/models/ServiceProperties.java | 419 ---------- .../blob/models/SetBlobMetadataOptions.java | 105 --- .../blob/models/SetBlobMetadataResult.java | 93 --- .../blob/models/SetBlobPropertiesOptions.java | 388 --------- .../blob/models/SetBlobPropertiesResult.java | 123 --- .../models/SetContainerMetadataOptions.java | 83 -- .../services/blob/models/package.html | 5 - .../windowsazure/services/blob/package.html | 5 - .../services/media/EncryptionUtils.java | 85 -- .../windowsazure/services/media/Exports.java | 89 -- .../services/media/MediaConfiguration.java | 71 -- .../services/media/MediaContract.java | 38 - .../services/media/MediaService.java | 70 -- .../services/media/OperationUtils.java | 57 -- .../media/WritableBlobContainerContract.java | 124 --- .../authentication/AzureAdAccessToken.java | 48 -- .../AzureAdClientSymmetricKey.java | 44 - .../AzureAdClientUsernamePassword.java | 44 - .../AzureAdTokenCredentialType.java | 28 - .../AzureAdTokenCredentials.java | 160 ---- .../authentication/AzureAdTokenFactory.java | 20 - .../authentication/AzureAdTokenProvider.java | 104 --- .../authentication/AzureEnvironment.java | 83 -- .../AzureEnvironmentConstants.java | 74 -- .../authentication/AzureEnvironments.java | 44 - .../media/authentication/TokenProvider.java | 13 - .../media/authentication/package-info.java | 1 - .../DefaultActionOperation.java | 237 ------ .../DefaultDeleteOperation.java | 67 -- .../DefaultEntityActionOperation.java | 282 ------- .../DefaultEntityTypeActionOperation.java | 215 ----- .../entityoperations/DefaultGetOperation.java | 53 -- .../DefaultListOperation.java | 121 --- .../EntityActionBodyParameterMapper.java | 66 -- .../EntityActionOperation.java | 86 -- .../EntityBatchOperation.java | 83 -- .../entityoperations/EntityContract.java | 114 --- .../EntityCreateOperation.java | 39 - .../EntityDeleteOperation.java | 33 - .../entityoperations/EntityGetOperation.java | 23 - .../entityoperations/EntityLinkOperation.java | 158 ---- .../entityoperations/EntityListOperation.java | 42 - .../entityoperations/EntityOperation.java | 62 -- .../entityoperations/EntityOperationBase.java | 210 ----- .../EntityOperationSingleResult.java | 26 - .../EntityOperationSingleResultBase.java | 58 -- .../entityoperations/EntityProxyData.java | 32 - .../entityoperations/EntityRestProxy.java | 302 ------- .../EntityTypeActionOperation.java | 90 -- .../EntityUnlinkOperation.java | 74 -- .../EntityUpdateOperation.java | 29 - .../EntityWithOperationIdentifier.java | 11 - .../media/entityoperations/package.html | 5 - .../media/implementation/ActiveToken.java | 64 -- .../implementation/BatchMimeMultipart.java | 40 - .../BatchMimeMultipartBodyWritter.java | 37 - .../implementation/MediaBatchOperations.java | 578 ------------- .../MediaBlobContainerWriter.java | 248 ------ .../implementation/MediaBlobRestProxy.java | 147 ---- .../implementation/MediaContentProvider.java | 83 -- .../MediaExceptionProcessor.java | 280 ------- .../media/implementation/MediaRestProxy.java | 230 ------ .../media/implementation/OAuthFilter.java | 65 -- .../implementation/ODataAtomMarshaller.java | 166 ---- .../implementation/ODataAtomUnmarshaller.java | 256 ------ .../implementation/ODataDateAdapter.java | 63 -- .../media/implementation/ODataEntity.java | 183 ---- .../ODataEntityCollectionProvider.java | 100 --- .../implementation/ODataEntityProvider.java | 128 --- .../media/implementation/RedirectFilter.java | 71 -- .../ResourceLocationManager.java | 52 -- .../media/implementation/SASTokenFilter.java | 65 -- .../SetBoundaryMultipartDataSource.java | 63 -- .../media/implementation/StatusLine.java | 105 --- .../implementation/VersionHeadersFilter.java | 46 -- .../implementation/atom/CategoryType.java | 210 ----- .../implementation/atom/ContentType.java | 228 ----- .../implementation/atom/DateTimeType.java | 159 ---- .../media/implementation/atom/EntryType.java | 213 ----- .../media/implementation/atom/FeedType.java | 216 ----- .../implementation/atom/GeneratorType.java | 210 ----- .../media/implementation/atom/IconType.java | 162 ---- .../media/implementation/atom/IdType.java | 162 ---- .../media/implementation/atom/LinkType.java | 312 ------- .../media/implementation/atom/LogoType.java | 162 ---- .../implementation/atom/ObjectFactory.java | 670 --------------- .../media/implementation/atom/PersonType.java | 187 ----- .../media/implementation/atom/SourceType.java | 213 ----- .../media/implementation/atom/TextType.java | 212 ----- .../media/implementation/atom/UriType.java | 158 ---- .../implementation/atom/package-info.java | 25 - .../content/AccessPolicyType.java | 145 ---- .../content/AkamaiAccessControlType.java | 25 - ...kamaiSignatureHeaderAuthenticationKey.java | 44 - .../content/AssetDeliveryPolicyRestType.java | 197 ----- .../implementation/content/AssetFileType.java | 297 ------- .../implementation/content/AssetType.java | 199 ----- .../implementation/content/ChannelType.java | 282 ------- .../implementation/content/Constants.java | 70 -- ...ntentKeyAuthorizationPolicyOptionType.java | 74 -- ...KeyAuthorizationPolicyRestrictionType.java | 49 -- .../ContentKeyAuthorizationPolicyType.java | 47 -- .../content/ContentKeyRestType.java | 283 ------- .../content/CrossSiteAccessPoliciesType.java | 31 - .../content/EncodingReservedUnitRestType.java | 97 --- .../content/ErrorDetailType.java | 80 -- .../implementation/content/ErrorType.java | 83 -- .../content/IPAccessControlType.java | 24 - .../implementation/content/IPRangeType.java | 43 - .../JobNotificationSubscriptionType.java | 81 -- .../media/implementation/content/JobType.java | 315 ------- .../content/LocatorRestType.java | 256 ------ .../content/MediaProcessorType.java | 115 --- .../content/MediaServiceDTO.java | 28 - .../implementation/content/MediaUriType.java | 48 -- .../content/NotificationEndPointType.java | 158 ---- .../content/ODataActionType.java | 91 -- .../implementation/content/ObjectFactory.java | 236 ------ .../implementation/content/OperationType.java | 155 ---- .../implementation/content/ProgramType.java | 296 ------- .../content/ProtectionKeyIdType.java | 49 -- .../content/ProtectionKeyRestType.java | 48 -- .../content/RebindContentKeyType.java | 53 -- .../content/StorageAccountType.java | 81 -- .../StreamingEndpointAccessControlType.java | 31 - .../StreamingEndpointCacheControlType.java | 20 - .../content/StreamingEndpointType.java | 178 ---- .../content/TaskHistoricalEventType.java | 107 --- .../implementation/content/TaskType.java | 286 ------- .../implementation/content/package-info.java | 22 - .../media/implementation/package.html | 5 - .../fairplay/FairPlayConfiguration.java | 73 -- .../templates/fairplay/package-info.java | 1 - .../AgcAndColorStripeRestriction.java | 30 - .../ContentEncryptionKeyFromHeader.java | 11 - ...ContentEncryptionKeyFromKeyIdentifier.java | 45 - .../playreadylicense/ErrorMessages.java | 41 - .../ExplicitAnalogTelevisionRestriction.java | 51 -- ...ediaServicesLicenseTemplateSerializer.java | 177 ---- .../playreadylicense/PlayReadyContentKey.java | 10 - .../PlayReadyLicenseResponseTemplate.java | 80 -- .../PlayReadyLicenseTemplate.java | 214 ----- .../PlayReadyLicenseType.java | 48 -- .../playreadylicense/PlayReadyPlayRight.java | 277 ------- .../playreadylicense/ScmsRestriction.java | 36 - .../UnknownOutputPassingOption.java | 51 -- .../playreadylicense/package-info.java | 7 - .../AsymmetricTokenVerificationKey.java | 34 - .../tokenrestriction/ErrorMessages.java | 16 - .../OpenIdConnectDiscoveryDocument.java | 29 - .../SymmetricVerificationKey.java | 49 -- .../tokenrestriction/TokenClaim.java | 79 -- .../TokenRestrictionTemplate.java | 176 ---- .../TokenRestrictionTemplateSerializer.java | 239 ------ .../templates/tokenrestriction/TokenType.java | 51 -- .../TokenVerificationKey.java | 10 - .../X509CertTokenVerificationKey.java | 57 -- .../tokenrestriction/package-info.java | 7 - .../templates/widevine/AllowedTrackTypes.java | 5 - .../templates/widevine/ContentKeySpecs.java | 76 -- .../templates/widevine/Hdcp.java | 5 - .../widevine/RequiredOutputProtection.java | 21 - .../templates/widevine/WidevineMessage.java | 58 -- .../templates/widevine/package-info.java | 16 - .../services/media/models/AccessPolicy.java | 134 --- .../media/models/AccessPolicyInfo.java | 98 --- .../media/models/AccessPolicyPermission.java | 80 -- .../services/media/models/Asset.java | 391 --------- .../media/models/AssetDeliveryPolicy.java | 246 ------ .../AssetDeliveryPolicyConfigurationKey.java | 110 --- .../media/models/AssetDeliveryPolicyInfo.java | 108 --- .../media/models/AssetDeliveryPolicyType.java | 86 -- .../media/models/AssetDeliveryProtocol.java | 102 --- .../services/media/models/AssetFile.java | 364 -------- .../services/media/models/AssetFileInfo.java | 162 ---- .../services/media/models/AssetInfo.java | 167 ---- .../services/media/models/AssetOption.java | 73 -- .../services/media/models/AssetState.java | 73 -- .../services/media/models/ContentKey.java | 438 ---------- .../models/ContentKeyAuthorizationPolicy.java | 164 ---- .../ContentKeyAuthorizationPolicyInfo.java | 67 -- .../ContentKeyAuthorizationPolicyOption.java | 232 ------ ...ntentKeyAuthorizationPolicyOptionInfo.java | 103 --- ...tentKeyAuthorizationPolicyRestriction.java | 87 -- .../media/models/ContentKeyDeliveryType.java | 81 -- .../services/media/models/ContentKeyInfo.java | 135 --- .../services/media/models/ContentKeyType.java | 91 -- .../media/models/EncodingReservedUnit.java | 139 ---- .../models/EncodingReservedUnitInfo.java | 67 -- .../models/EncodingReservedUnitType.java | 73 -- .../services/media/models/EndPointType.java | 65 -- .../services/media/models/ErrorDetail.java | 59 -- .../services/media/models/Ipv4.java | 62 -- .../services/media/models/Job.java | 487 ----------- .../services/media/models/JobInfo.java | 189 ----- .../models/JobNotificationSubscription.java | 60 -- ...obNotificationSubscriptionListFactory.java | 47 -- .../services/media/models/JobState.java | 94 --- .../services/media/models/LinkInfo.java | 43 - .../services/media/models/ListResult.java | 152 ---- .../services/media/models/Locator.java | 303 ------- .../services/media/models/LocatorInfo.java | 139 ---- .../services/media/models/LocatorType.java | 73 -- .../services/media/models/MediaProcessor.java | 43 - .../media/models/MediaProcessorInfo.java | 93 --- .../media/models/NotificationEndPoint.java | 181 ---- .../models/NotificationEndPointInfo.java | 90 -- .../services/media/models/Operation.java | 48 -- .../services/media/models/OperationInfo.java | 57 -- .../services/media/models/OperationState.java | 71 -- .../services/media/models/ProtectionKey.java | 224 ----- .../media/models/ProtectionKeyType.java | 66 -- .../media/models/StorageAccountInfo.java | 66 -- .../media/models/StorageAccounts.java | 48 -- .../media/models/StreamingEndpoint.java | 441 ---------- .../media/models/StreamingEndpointInfo.java | 188 ----- .../media/models/StreamingEndpointState.java | 79 -- .../services/media/models/TargetJobState.java | 74 -- .../services/media/models/Task.java | 226 ----- .../media/models/TaskHistoricalEvent.java | 76 -- .../services/media/models/TaskInfo.java | 260 ------ .../services/media/models/TaskOption.java | 69 -- .../services/media/models/TaskState.java | 95 --- .../services/media/models/package.html | 5 - .../windowsazure/services/media/package.html | 5 - .../windowsazure/services/queue/Exports.java | 34 - .../services/queue/QueueConfiguration.java | 27 - .../services/queue/QueueContract.java | 516 ------------ .../services/queue/QueueService.java | 102 --- .../QueueExceptionProcessor.java | 415 ---------- .../queue/implementation/QueueMessage.java | 36 - .../queue/implementation/QueueRestProxy.java | 519 ------------ .../queue/implementation/SharedKeyFilter.java | 31 - .../implementation/SharedKeyLiteFilter.java | 32 - .../queue/implementation/package.html | 5 - .../queue/models/CreateMessageOptions.java | 118 --- .../queue/models/CreateQueueOptions.java | 96 --- .../queue/models/GetQueueMetadataResult.java | 79 -- .../models/GetServicePropertiesResult.java | 63 -- .../queue/models/ListMessagesOptions.java | 101 --- .../queue/models/ListMessagesResult.java | 262 ------ .../queue/models/ListQueuesOptions.java | 175 ---- .../queue/models/ListQueuesResult.java | 332 -------- .../queue/models/PeekMessagesOptions.java | 73 -- .../queue/models/PeekMessagesResult.java | 202 ----- .../queue/models/QueueServiceOptions.java | 56 -- .../queue/models/ServiceProperties.java | 480 ----------- .../queue/models/UpdateMessageResult.java | 86 -- .../services/queue/models/package.html | 5 - .../windowsazure/services/queue/package.html | 5 - ...icrosoft.windowsazure.core.Builder$Exports | 3 - .../AzureAdTokenProviderTest.java | 118 --- .../media/authentication/package-info.java | 1 - .../blob/BlobServiceIntegrationTest.java | 782 ------------------ .../services/blob/IntegrationTestBase.java | 48 -- .../media/AccessPolicyIntegrationTest.java | 240 ------ .../media/AssetFileIntegrationTest.java | 279 ------- .../services/media/AssetIntegrationTest.java | 563 ------------- .../media/ContentKeyIntegrationTest.java | 518 ------------ ...codingReservedUnitTypeIntegrationTest.java | 99 --- .../services/media/EncryptionHelper.java | 167 ---- .../media/EncryptionIntegrationTest.java | 376 --------- .../services/media/EntityProxyTest.java | 161 ---- .../services/media/ExportsTest.java | 50 -- .../services/media/IntegrationTestBase.java | 487 ----------- .../services/media/JobIntegrationTest.java | 525 ------------ .../media/LocatorIntegrationTests.java | 356 -------- .../media/MediaProcessorIntegrationTest.java | 101 --- .../NotificationEndPointIntegrationTest.java | 221 ----- .../media/ProtectionKeyIntegrationTest.java | 54 -- .../media/ServiceExceptionMatcher.java | 48 -- .../services/media/StorageAccountsTest.java | 41 - .../StreamingEndopointIntegrationTest.java | 310 ------- .../services/media/TaskIntegrationTest.java | 337 -------- .../media/UploadingIntegrationTest.java | 173 ---- ...ntentKeyAuthorizationPolicyEntityTest.java | 107 --- ...ContentKeyAuthorizationPolicyInfoTest.java | 53 -- ...eyAuthorizationPolicyOptionEntityTest.java | 109 --- ...tKeyAuthorizationPolicyOptionInfoTest.java | 110 --- ...KeyAuthorizationPolicyRestrictionTest.java | 44 - .../implementation/LinkRetrievalTest.java | 109 --- .../MediaBatchOperationsTest.java | 138 ---- .../implementation/ODataDateParsingTest.java | 146 ---- .../ODataSerializationFromJerseyTest.java | 105 --- .../ODataSerializationTest.java | 108 --- .../implementation/RedirectionFilterTest.java | 182 ---- .../ResourceLocationManagerTest.java | 63 -- .../implementation/SASTokenFilterTest.java | 135 --- .../media/implementation/StatusLineTest.java | 75 -- .../AgcAndColorStripeRestrictionTests.java | 43 - ...licitAnalogTelevisionRestrictionTests.java | 64 -- ...ervicesLicenseTemplateSerializerTests.java | 539 ------------ .../PlayReadyContentKeyTests.java | 71 -- .../PlayReadyLicenseTypeTests.java | 71 -- .../PlayReadyPlayRightTest.java | 31 - .../ScmsRestrictionTests.java | 43 - .../UnknownOutputPassingOptionTests.java | 86 -- .../SymmetricVerificationKeyTests.java | 52 -- .../tokenrestriction/TokenClaimTests.java | 72 -- ...kenRestrictionTemplateSerializerTests.java | 321 ------- .../tokenrestriction/TokenTypeTests.java | 84 -- .../X509CertTokenVerificationKeyTests.java | 102 --- .../WidevineMessageSerializerTests.java | 92 --- .../media/models/AccessPolicyEntityTest.java | 91 -- .../media/models/AccessPolicyInfoTest.java | 96 --- .../models/AccessPolicyPermissionTest.java | 104 --- .../models/AssetDeliveryPolicyEntityTest.java | 107 --- .../media/models/AssetEntityTest.java | 207 ----- .../media/models/AssetFileEntityTest.java | 156 ---- .../media/models/AssetFileInfoTest.java | 199 ----- .../services/media/models/AssetInfoTest.java | 129 --- .../media/models/ChannelEntityTest.java | 207 ----- .../media/models/ContentKeyEntityTest.java | 104 --- .../media/models/ContentKeyInfoTest.java | 178 ---- .../media/models/GenericListResultTest.java | 431 ---------- .../services/media/models/JobEntityTest.java | 86 -- .../services/media/models/JobInfoTest.java | 167 ---- .../media/models/LocatorEntityTest.java | 189 ----- .../media/models/LocatorInfoTest.java | 157 ---- .../models/MediaProcessorEntityTest.java | 46 -- .../media/models/MediaProcessorInfoTest.java | 112 --- .../NotificationEndPointEntityTest.java | 149 ---- .../models/NotificationEndPointInfoTest.java | 106 --- .../media/models/ProtectionKeyEntityTest.java | 54 -- .../services/media/models/TaskEntityTest.java | 195 ----- .../services/media/models/TaskInfoTest.java | 292 ------- .../services/queue/IntegrationTestBase.java | 48 -- .../queue/QueueServiceIntegrationTest.java | 600 -------------- .../scenarios/MediaServiceScenarioTest.java | 231 ------ .../scenarios/MediaServiceValidation.java | 298 ------- .../scenarios/MediaServiceWrapper.java | 549 ------------ .../services/scenarios/ScenarioTestBase.java | 152 ---- .../utils/ServiceExceptionFactoryTest.java | 107 --- .../com.microsoft.windowsazure.properties | 19 - .../src/test/resources/certificate/server.crt | 17 - .../src/test/resources/certificate/server.der | Bin 634 -> 0 bytes .../src/test/resources/media/MPEG4-H264.mp4 | Bin 8697 -> 0 bytes .../PlayReadyLicenseResponseTemplate.xsd | 220 ----- .../schemas/TokenRestrictionTemplate.xsd | 46 -- sdk/mediaservices/pom.xml | 1 - 401 files changed, 2 insertions(+), 56362 deletions(-) delete mode 100644 sdk/mediaservices/ci.data.yml delete mode 100644 sdk/mediaservices/microsoft-azure-media/pom.xml delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobConfiguration.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobContract.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobService.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/Exports.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobExceptionProcessor.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobOperationRestProxy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobRestProxy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/ContainerACLDateAdapter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/HmacSHA256Sign.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/MetadataAdapter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyFilter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyLiteFilter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyUtils.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AccessCondition.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobProperties.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobServiceOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlockList.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BreakLeaseResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CommitBlobBlocksOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/Constants.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ContainerACL.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobBlockOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateContainerOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteBlobOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteContainerOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerACLResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerPropertiesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetServicePropertiesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/PageRange.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ServiceProperties.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetContainerMetadataOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/EncryptionUtils.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/Exports.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaConfiguration.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaContract.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaService.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/OperationUtils.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/WritableBlobContainerContract.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdAccessToken.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdClientSymmetricKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdClientUsernamePassword.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenCredentialType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenCredentials.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenFactory.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenProvider.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironment.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironmentConstants.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironments.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/TokenProvider.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/package-info.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultActionOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultDeleteOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityActionOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityTypeActionOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultGetOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultListOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityActionBodyParameterMapper.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityActionOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityBatchOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityContract.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityCreateOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityDeleteOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityGetOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityLinkOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityListOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationBase.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationSingleResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationSingleResultBase.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityProxyData.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityRestProxy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityTypeActionOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityUnlinkOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityUpdateOperation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityWithOperationIdentifier.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ActiveToken.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/BatchMimeMultipart.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/BatchMimeMultipartBodyWritter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBlobContainerWriter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBlobRestProxy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaContentProvider.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaExceptionProcessor.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaRestProxy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/OAuthFilter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomMarshaller.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomUnmarshaller.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataDateAdapter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntity.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntityCollectionProvider.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntityProvider.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/RedirectFilter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ResourceLocationManager.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/SASTokenFilter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/SetBoundaryMultipartDataSource.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/StatusLine.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/VersionHeadersFilter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/CategoryType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ContentType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/DateTimeType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/EntryType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/FeedType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/GeneratorType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IconType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IdType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LinkType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LogoType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ObjectFactory.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/PersonType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/SourceType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/TextType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/UriType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/package-info.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AccessPolicyType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AkamaiAccessControlType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AkamaiSignatureHeaderAuthenticationKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetDeliveryPolicyRestType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetFileType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ChannelType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/Constants.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyOptionType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyRestrictionType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyRestType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/CrossSiteAccessPoliciesType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/EncodingReservedUnitRestType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ErrorDetailType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ErrorType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/IPAccessControlType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/IPRangeType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobNotificationSubscriptionType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/LocatorRestType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaProcessorType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaServiceDTO.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaUriType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/NotificationEndPointType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ODataActionType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ObjectFactory.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/OperationType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProgramType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProtectionKeyIdType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProtectionKeyRestType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/RebindContentKeyType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StorageAccountType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointAccessControlType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointCacheControlType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/TaskHistoricalEventType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/TaskType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/package-info.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/fairplay/FairPlayConfiguration.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/fairplay/package-info.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/AgcAndColorStripeRestriction.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ContentEncryptionKeyFromHeader.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ContentEncryptionKeyFromKeyIdentifier.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ErrorMessages.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ExplicitAnalogTelevisionRestriction.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/MediaServicesLicenseTemplateSerializer.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyContentKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseResponseTemplate.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseTemplate.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyPlayRight.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ScmsRestriction.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/UnknownOutputPassingOption.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/package-info.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/AsymmetricTokenVerificationKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/ErrorMessages.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/OpenIdConnectDiscoveryDocument.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/SymmetricVerificationKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenClaim.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplate.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplateSerializer.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenVerificationKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/X509CertTokenVerificationKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/package-info.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/AllowedTrackTypes.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/ContentKeySpecs.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/Hdcp.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/RequiredOutputProtection.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/WidevineMessage.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/package-info.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicyInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicyPermission.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Asset.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyConfigurationKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryProtocol.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFile.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFileInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetOption.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetState.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOption.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOptionInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyRestriction.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyDeliveryType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnit.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnitInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnitType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EndPointType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ErrorDetail.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Ipv4.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Job.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobNotificationSubscription.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobNotificationSubscriptionListFactory.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobState.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LinkInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ListResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Locator.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LocatorInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LocatorType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/MediaProcessor.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/MediaProcessorInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPoint.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Operation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/OperationInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/OperationState.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKey.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKeyType.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StorageAccountInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StorageAccounts.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpoint.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpointInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpointState.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TargetJobState.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Task.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskHistoricalEvent.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskInfo.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskOption.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskState.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/Exports.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueConfiguration.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueContract.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueService.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueExceptionProcessor.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueMessage.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueRestProxy.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/SharedKeyFilter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/SharedKeyLiteFilter.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/CreateMessageOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/CreateQueueOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/GetQueueMetadataResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/GetServicePropertiesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListMessagesOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListMessagesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListQueuesOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListQueuesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/PeekMessagesOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/PeekMessagesResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/QueueServiceOptions.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ServiceProperties.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/UpdateMessageResult.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/package.html delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/main/resources/META-INF/services/com.microsoft.windowsazure.core.Builder$Exports delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/media/authentication/AzureAdTokenProviderTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/media/authentication/package-info.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/blob/BlobServiceIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/blob/IntegrationTestBase.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AccessPolicyIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AssetFileIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AssetIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ContentKeyIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncodingReservedUnitTypeIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncryptionHelper.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncryptionIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EntityProxyTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ExportsTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/IntegrationTestBase.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/JobIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/LocatorIntegrationTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/MediaProcessorIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/NotificationEndPointIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ProtectionKeyIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ServiceExceptionMatcher.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/StorageAccountsTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/StreamingEndopointIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/TaskIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/UploadingIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyOptionEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyOptionInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyRestrictionTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/LinkRetrievalTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperationsTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataDateParsingTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataSerializationFromJerseyTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataSerializationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/RedirectionFilterTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ResourceLocationManagerTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/SASTokenFilterTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/StatusLineTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/AgcAndColorStripeRestrictionTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ExplicitAnalogTelevisionRestrictionTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/MediaServicesLicenseTemplateSerializerTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyContentKeyTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseTypeTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyPlayRightTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ScmsRestrictionTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/UnknownOutputPassingOptionTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/SymmetricVerificationKeyTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenClaimTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplateSerializerTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenTypeTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/X509CertTokenVerificationKeyTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/WidevineMessageSerializerTests.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyPermissionTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ChannelEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/GenericListResultTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/JobEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/JobInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/MediaProcessorEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/MediaProcessorInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ProtectionKeyEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/TaskEntityTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/TaskInfoTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/queue/IntegrationTestBase.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/queue/QueueServiceIntegrationTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceScenarioTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceValidation.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceWrapper.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/ScenarioTestBase.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/utils/ServiceExceptionFactoryTest.java delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/resources/META-INF/com.microsoft.windowsazure.properties delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/resources/certificate/server.crt delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/resources/certificate/server.der delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/resources/media/MPEG4-H264.mp4 delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/resources/schemas/PlayReadyLicenseResponseTemplate.xsd delete mode 100644 sdk/mediaservices/microsoft-azure-media/src/test/resources/schemas/TokenRestrictionTemplate.xsd diff --git a/eng/.docsettings.yml b/eng/.docsettings.yml index b93948f76346..e8bdd397627d 100644 --- a/eng/.docsettings.yml +++ b/eng/.docsettings.yml @@ -31,7 +31,6 @@ required_readme_sections: - ^Next steps$ - ^Contributing$ known_presence_issues: - - ['sdk/mediaservices/microsoft-azure-media', '#2847'] - ['sdk/servicebus/microsoft-azure-servicebus', '#2847'] # Changelog List - ['sdk/authorization/microsoft-azure-authentication-msi-token-provider/CHANGELOG.md', '#2847'] @@ -48,7 +47,6 @@ known_presence_issues: - ['sdk/keyvault/microsoft-azure-keyvault-extensions/CHANGELOG.md', '#2847'] - ['sdk/keyvault/microsoft-azure-keyvault-webkey/CHANGELOG.md', '#2847'] - ['sdk/keyvault/microsoft-azure-keyvault-test/CHANGELOG.md', '#2847'] - - ['sdk/mediaservices/microsoft-azure-media/CHANGELOG.md', '#2847'] - ['sdk/servicebus/microsoft-azure-servicebus/CHANGELOG.md', '#2847'] - ['sdk/keyvault/microsoft-azure-keyvault-complete/CHANGELOG.md', '#2847'] diff --git a/eng/pipelines/aggregate-reports.yml b/eng/pipelines/aggregate-reports.yml index 9c69a195b44c..b59dafd62459 100644 --- a/eng/pipelines/aggregate-reports.yml +++ b/eng/pipelines/aggregate-reports.yml @@ -48,7 +48,7 @@ extends: displayName: 'Build all libraries that support Java $(JavaBuildVersion)' inputs: mavenPomFile: pom.xml - options: '$(DefaultOptions) -T 2C -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcodesnippet.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Djacoco.skip=true -Drevapi.skip=true -Dshade.skip=true -Dspotless.skip=true -pl !com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12,!com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12,!com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12,!com.azure.cosmos.spark:azure-cosmos-spark-account-data-resolver-sample,!com.azure.cosmos.kafka:azure-cosmos-kafka-connect,!com.microsoft.azure:azure-batch,!com.microsoft.azure:azure-media' + options: '$(DefaultOptions) -T 2C -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcodesnippet.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Djacoco.skip=true -Drevapi.skip=true -Dshade.skip=true -Dspotless.skip=true -pl !com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12,!com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12,!com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12,!com.azure.cosmos.spark:azure-cosmos-spark-account-data-resolver-sample,!com.azure.cosmos.kafka:azure-cosmos-kafka-connect,!com.microsoft.azure:azure-batch' mavenOptions: '$(MemoryOptions) $(LoggingOptions)' javaHomeOption: 'JDKVersion' jdkVersionOption: $(JavaBuildVersion) @@ -60,7 +60,7 @@ extends: displayName: 'Build remaining libraries with Java $(FallbackJavaBuildVersion)' inputs: mavenPomFile: pom.xml - options: '$(DefaultOptions) -T 2C -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcodesnippet.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Djacoco.skip=true -Drevapi.skip=true -Dspotless.skip=true -pl com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12,com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12,com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12,com.azure.cosmos.spark:azure-cosmos-spark-account-data-resolver-sample,com.azure.cosmos.kafka:azure-cosmos-kafka-connect,com.microsoft.azure:azure-batch,com.microsoft.azure:azure-media' + options: '$(DefaultOptions) -T 2C -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcodesnippet.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Djacoco.skip=true -Drevapi.skip=true -Dspotless.skip=true -pl com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12,com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12,com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12,com.azure.cosmos.spark:azure-cosmos-spark-account-data-resolver-sample,com.azure.cosmos.kafka:azure-cosmos-kafka-connect,com.microsoft.azure:azure-batch' mavenOptions: '$(MemoryOptions) $(LoggingOptions)' javaHomeOption: 'JDKVersion' jdkVersionOption: $(FallbackJavaBuildVersion) diff --git a/eng/pipelines/pullrequest.yml b/eng/pipelines/pullrequest.yml index 5d5c68924276..8ce1923d8cce 100644 --- a/eng/pipelines/pullrequest.yml +++ b/eng/pipelines/pullrequest.yml @@ -29,7 +29,6 @@ pr: - sdk/e2e/ # no pipeline, nothing to build - sdk/eventhubs/microsoft-azure-eventhubs/ # track 1 - sdk/eventhubs/microsoft-azure-eventhubs-eph/ # track 1 - - sdk/mediaservices/microsoft-azure-media/ # track 1 - sdk/servicebus/microsoft-azure-servicebus/ # track 1 - sdk/spring/ @@ -77,6 +76,5 @@ extends: - sdk/e2e/ # no pipeline, nothing to build - sdk/eventhubs/microsoft-azure-eventhubs/ # track 1 - sdk/eventhubs/microsoft-azure-eventhubs-eph/ # track 1 - - sdk/mediaservices/microsoft-azure-media/ # track 1 - sdk/servicebus/microsoft-azure-servicebus/ # track 1 - sdk/spring/ diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index 30cd272f5fbb..20ffea53823b 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -30,7 +30,6 @@ com.h3xstream.findsecbugs:findsecbugs-plugin;1.9.0 com.knuddels:jtokkit;1.0.0 com.microsoft.azure:azure-client-authentication;1.7.14 com.microsoft.azure:azure-client-runtime;1.7.14 -com.microsoft.azure:azure-core;0.9.8 com.microsoft.azure:azure-keyvault-cryptography;1.2.2 com.microsoft.azure:qpid-proton-j-extensions;1.2.6 com.microsoft.sqlserver:mssql-jdbc;10.2.3.jre8 @@ -135,7 +134,6 @@ com.squareup.okio:okio-jvm;3.16.0 junit:junit;4.13.2 commons-cli:commons-cli;1.9.0 org.assertj:assertj-core;3.22.0 -org.bouncycastle:bcprov-jdk15to18;1.81 org.bouncycastle:bcprov-jdk18on;1.81 org.bouncycastle:bcpkix-lts8on;2.73.8 org.eclipse.jetty:jetty-alpn-conscrypt-server;9.4.58.v20250814 @@ -181,7 +179,6 @@ org.apache.maven.plugins:maven-clean-plugin;3.5.0 org.apache.maven.plugins:maven-compiler-plugin;3.14.0 org.apache.maven.plugins:maven-enforcer-plugin;3.6.1 org.apache.maven.plugins:maven-failsafe-plugin;3.5.3 -org.apache.maven.plugins:maven-help-plugin;3.5.1 org.apache.maven.plugins:maven-install-plugin;3.1.4 org.apache.maven.plugins:maven-jar-plugin;3.4.2 org.apache.maven.plugins:maven-javadoc-plugin;3.11.3 @@ -293,17 +290,6 @@ cosmos_io.confluent:kafka-avro-serializer;7.6.0 cosmos_org.apache.avro:avro;1.11.4 # Maven Tools for Cosmos Kafka connector only -# sdk\mediaservices\microsoft-azure-media\pom.xml which hasn't been released for 2 years -# all of these unique references below are listed here because they're old, some are over 10 years old -media_javax.xml.bind:jaxb-api;2.2.7 -media_javax.inject:javax.inject;1 -media_javax.mail:mail;1.4.5 -media_com.sun.jersey:jersey-client;1.19 -media_com.sun.jersey:jersey-json;1.19 -media_commons-logging:commons-logging;1.1.1 -media_io.jsonwebtoken:jjwt;0.5.1 -media_org.mockito:mockito-all;1.9.0 -media_com.microsoft.azure:adal4j;1.2.0 # sdk\resourcemanager\azure-resourcemanager\pom.xml # sdk\resourcemanager\azure-resourcemanager-compute\pom.xml resourcemanager_com.jcraft:jsch;0.1.55 @@ -417,8 +403,5 @@ springboot3_org.springframework.cloud:spring-cloud-dependencies;2025.0.0 # Jackson dropped support for Java 7 with the release of 2.14.0. # Add custom Jackson dependencies for Track 1 libraries using Jackson. -java7support_com.fasterxml.jackson.core:jackson-annotations;2.13.5 -java7support_com.fasterxml.jackson.core:jackson-core;2.13.5 -java7support_com.fasterxml.jackson.core:jackson-databind;2.13.5 org.mockito:mockito-junit-jupiter;4.11.0 com.github.tomakehurst:wiremock-jre8;2.35.2 diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 4cd240170f10..23ca49424c33 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -214,7 +214,6 @@ com.azure:identity-test-webapp;1.0.0-beta.1;1.0.0-beta.1 com.microsoft.azure:azure-batch;11.2.0;11.3.0-beta.1 com.microsoft.azure:azure-eventhubs;3.3.0;3.4.0-beta.1 com.microsoft.azure:azure-servicebus;3.6.7;3.7.0-beta.1 -com.microsoft.azure:azure-media;1.0.0-beta.1;1.0.0-beta.1 com.azure.spring:azure-monitor-spring-native-test;1.0.0-beta.1;1.0.0-beta.1 com.azure.spring:spring-cloud-azure-appconfiguration-config-web;6.0.0;6.1.0-beta.1 com.azure.spring:spring-cloud-azure-appconfiguration-config;6.0.0;6.1.0-beta.1 diff --git a/sdk/mediaservices/ci.data.yml b/sdk/mediaservices/ci.data.yml deleted file mode 100644 index 834d9076f3cc..000000000000 --- a/sdk/mediaservices/ci.data.yml +++ /dev/null @@ -1,40 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - -trigger: - branches: - include: - - main - - hotfix/* - - release/* - paths: - include: - - sdk/mediaservices/ci.data.yml - - sdk/mediaservices/microsoft-azure-media/ - exclude: - - sdk/mediaservices/pom.xml - - sdk/mediaservices/microsoft-azure-media/pom.xml - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/mediaservices/ci.data.yml - - sdk/mediaservices/microsoft-azure-media/ - exclude: - - sdk/mediaservices/pom.xml - - sdk/mediaservices/microsoft-azure-media/pom.xml - -extends: - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - SDKType: data - ServiceDirectory: mediaservices - Artifacts: - - name: azure-media - groupId: com.microsoft.azure - safeName: azuremedia \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/pom.xml b/sdk/mediaservices/microsoft-azure-media/pom.xml deleted file mode 100644 index 50545303be46..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/pom.xml +++ /dev/null @@ -1,209 +0,0 @@ - - - 4.0.0 - com.microsoft.azure - azure-media - 1.0.0-beta.1 - jar - Microsoft Azure SDK for Media Services - This package contains Microsoft Azure SDK for Media Services. - https://github.com/Azure/azure-sdk-for-java - - - com.azure - azure-data-sdk-parent - 1.3.0 - ../../parents/azure-data-sdk-parent - - - - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - UTF-8 - - true - true - - - - - microsoft - Microsoft - - - - - - com.microsoft.azure - azure-core - 0.9.8 - - - com.microsoft.azure - adal4j - 1.2.0 - - - org.apache.httpcomponents - httpclient - 4.5.14 - - - javax.xml.bind - jaxb-api - 2.2.7 - provided - - - javax.mail - mail - 1.4.5 - - - javax.inject - javax.inject - 1 - - - com.sun.jersey - jersey-client - 1.19 - - - com.sun.jersey - jersey-json - 1.19 - - - commons-logging - commons-logging - 1.1.1 - - - com.fasterxml.jackson.core - jackson-databind - 2.13.5 - - - com.fasterxml.jackson.core - jackson-annotations - 2.13.5 - - - com.fasterxml.jackson.core - jackson-core - 2.13.5 - - - io.jsonwebtoken - jjwt - 0.5.1 - - - - org.hamcrest - hamcrest-all - 1.3 - test - - - org.mockito - mockito-all - 1.9.0 - test - - - junit - junit - 4.13.2 - test - - - org.bouncycastle - bcprov-jdk15to18 - 1.81 - test - - - - - - - org.apache.maven.plugins - maven-help-plugin - 3.5.1 - - - validate - - evaluate - - - legal - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.14.0 - - 1.7 - 1.7 - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.11.3 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.storage - /** -
* Copyright Microsoft Corporation -
* -
* Licensed under the Apache License, Version 2.0 (the "License"); -
* you may not use this file except in compliance with the License. -
* You may obtain a copy of the License at -
* http://www.apache.org/licenses/LICENSE-2.0 -
* -
* Unless required by applicable law or agreed to in writing, software -
* distributed under the License is distributed on an "AS IS" BASIS, -
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -
* See the License for the specific language governing permissions and -
* limitations under the License. -
*/]]>
-
-
- -
-
-
diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobConfiguration.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobConfiguration.java deleted file mode 100644 index 59e9653e5bd0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobConfiguration.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob; - -/** - * This class contains static strings used to identify parts of a service - * configuration instance associated with the Windows Azure Blob service. - *

- * These values must not be altered. - */ -public abstract class BlobConfiguration { - /** - * The Blob configuration account name constant. This String - * value is used as a key in the configuration file, to identify the value - * for the DNS prefix name for the storage account. - */ - public static final String ACCOUNT_NAME = "blob.accountName"; - - /** - * The Blob configuration account key constant. This String - * value is used as a key in the configuration file, to identify the value - * for the storage service account key. - */ - public static final String ACCOUNT_KEY = "blob.accountKey"; - - /** - * The Blob configuration URI constant. This String value is - * used as a key in the configuration file, to identify the URI value for - * the Blob storage service REST API address for the storage account. - */ - public static final String URI = "blob.uri"; -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobContract.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobContract.java deleted file mode 100644 index 2c71143accc5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobContract.java +++ /dev/null @@ -1,563 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob; - -import java.io.InputStream; - -import com.microsoft.windowsazure.core.pipeline.jersey.JerseyFilterableService; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.blob.models.BlockList; -import com.microsoft.windowsazure.services.blob.models.CommitBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobBlockOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobResult; -import com.microsoft.windowsazure.services.blob.models.CreateContainerOptions; -import com.microsoft.windowsazure.services.blob.models.DeleteBlobOptions; -import com.microsoft.windowsazure.services.blob.models.DeleteContainerOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesResult; -import com.microsoft.windowsazure.services.blob.models.GetBlobResult; -import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksResult; -import com.microsoft.windowsazure.services.blob.models.ListContainersOptions; -import com.microsoft.windowsazure.services.blob.models.ListContainersResult; - -/** - * Defines the methods available on the Windows Azure blob storage service. - * Construct an object instance implementing BlobContract with one - * of the static create methods on {@link BlobService}. These methods - * associate a Configuration with the implementation, so the - * methods on the instance of BlobContract all work with a - * particular storage account. - */ -public interface BlobContract extends JerseyFilterableService { - - /** - * Marks a blob for deletion. - *

- * This method marks the properties, metadata, and content of the blob - * specified by the blob and container parameters for - * deletion. - *

- * When a blob is successfully deleted, it is immediately removed from the - * storage account's index and is no longer accessible to clients. The - * blob's data is later removed from the service during garbage collection. - *

- * Note that in order to delete a blob, you must delete all of its - * snapshots. You can delete an individual snapshot, only the snapshots, or - * both the blob and its snapshots with the - * {@link #deleteBlob(String, String, DeleteBlobOptions)} method. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the blob to delete. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void deleteBlob(String container, String blob) throws ServiceException; - - /** - * Marks a blob or snapshot for deletion, using the specified options. - *

- * This method marks the properties, metadata, and content of the blob or - * snapshot specified by the blob and container parameters - * for deletion. Use the {@link DeleteBlobOptions options} parameter to set - * an optional server timeout for the operation, a snapshot timestamp to - * specify an individual snapshot to delete, a blob lease ID to delete a - * blob with an active lease, a flag indicating whether to delete all - * snapshots but not the blob, or both the blob and all snapshots, and any - * access conditions to satisfy. - *

- * When a blob is successfully deleted, it is immediately removed from the - * storage account's index and is no longer accessible to clients. The - * blob's data is later removed from the service during garbage collection. - *

- * If the blob has an active lease, the client must specify a valid lease ID - * in the options parameter in order to delete it. - *

- * If a blob has a large number of snapshots, it's possible that the delete - * blob operation will time out. If this happens, the client should retry - * the request. - * - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the blob to delete. - * @param options - * A {@link DeleteBlobOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void deleteBlob(String container, String blob, DeleteBlobOptions options) - throws ServiceException; - - /** - * Gets a list of the containers in the blob storage account. - * - * @return A {@link ListContainersResult} reference to the result of the - * list containers operation. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - ListContainersResult listContainers() throws ServiceException; - - /** - * Gets a list of the containers in the blob storage account using the - * specified options. - *

- * Use the {@link ListContainersOptions options} parameter to specify - * options, including a server response timeout for the request, a container - * name prefix filter, a marker for continuing requests, the maximum number - * of results to return in a request, and whether to include container - * metadata in the results. - * - * @param options - * A {@link ListContainersOptions} instance containing options - * for the request. - * @return A {@link ListContainersResult} reference to the result of the - * list containers operation. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - ListContainersResult listContainers(ListContainersOptions options) - throws ServiceException; - - /** - * Creates a container with the specified name. - *

- * Container names must be unique within a storage account, and must follow - * the naming rules specified in Naming and Referencing Containers, Blobs, and Metadata. - * - * @param container - * A {@link String} containing the name of the container to - * create. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void createContainer(String container) throws ServiceException; - - /** - * Creates a container with the specified name, using the specified options. - *

- * Use the {@link CreateContainerOptions options} parameter to specify - * options, including a server response timeout for the request, metadata to - * set on the container, and the public access level for container and blob - * data. Container names must be unique within a storage account, and must - * follow the naming rules specified in Naming and Referencing Containers, Blobs, and Metadata. - * - * @param container - * A {@link String} containing the name of the container to - * create. - * @param options - * A {@link CreateContainerOptions} instance containing options - * for the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void createContainer(String container, CreateContainerOptions options) - throws ServiceException; - - /** - * Marks a container for deletion. The container and any blobs contained - * within it are later deleted during garbage collection. - *

- * When a container is deleted, a container with the same name cannot be - * created for at least 30 seconds; the container may not be available for - * more than 30 seconds if the service is still processing the request. - * - * @param container - * A {@link String} containing the name of the container to - * delete. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void deleteContainer(String container) throws ServiceException; - - /** - * Marks a container for deletion, using the specified options. The - * container and any blobs contained within it are later deleted during - * garbage collection. - *

- * Use the {@link DeleteContainerOptions options} parameter to specify the - * server response timeout and any access conditions for the container - * deletion operation. Access conditions can be used to make the operation - * conditional on the value of the Etag or last modified time of the - * container. - *

- * When a container is deleted, a container with the same name cannot be - * created for at least 30 seconds; the container may not be available for - * more than 30 seconds if the service is still processing the request. - * - * @param container - * A {@link String} containing the name of the container to - * delete. - * @param options - * A {@link DeleteContainerOptions} instance containing options - * for the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void deleteContainer(String container, DeleteContainerOptions options) - throws ServiceException; - - /** - * Creates a block blob from a content stream. - * - * @param container - * A {@link String} containing the name of the container to - * create the blob in. - * @param blob - * A {@link String} containing the name of the blob to create. A - * blob name can contain any combination of characters, but - * reserved URL characters must be properly escaped. A blob name - * must be at least one character long and cannot be more than - * 1,024 characters long, and must be unique within the - * container. - * @param contentStream - * An {@link InputStream} reference to the content stream to - * upload to the new blob. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - CreateBlobResult createBlockBlob(String container, String blob, - InputStream contentStream) throws ServiceException; - - /** - * Creates a block blob from a content stream, using the specified options. - *

- * Use the {@link CreateBlobOptions options} parameter to optionally specify - * the server timeout for the operation, the MIME content type and content - * encoding for the blob, the content language, the MD5 hash, a cache - * control value, and blob metadata. - * - * @param container - * A {@link String} containing the name of the container to - * create the blob in. - * @param blob - * A {@link String} containing the name of the blob to create. A - * blob name can contain any combination of characters, but - * reserved URL characters must be properly escaped. A blob name - * must be at least one character long and cannot be more than - * 1,024 characters long, and must be unique within the - * container. - * @param contentStream - * An {@link InputStream} reference to the content to upload to - * the new blob. - * @param options - * A {@link CreateBlobOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - CreateBlobResult createBlockBlob(String container, String blob, - InputStream contentStream, CreateBlobOptions options) - throws ServiceException; - - /** - * Creates a new uncommited block from a content stream. - *

- * This method creates an uncommitted block for a block blob specified by - * the blob and container parameters. The blockId - * parameter is a client-specified ID for the block, which must be less than - * or equal to 64 bytes in size. For a given blob, the length of the value - * specified for the blockId parameter must be the same size for - * each block. The contentStream parameter specifies the content to - * be copied to the block. The content for the block must be less than or - * equal to 4 MB in size. - *

- * To create or update a block blob, the blocks that have been successfully - * written to the server with this method must be committed using a call to - * {@link com.microsoft.windowsazure.services.blob.BlobContract#commitBlobBlocks(String, String, BlockList)} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#commitBlobBlocks(String, String, BlockList, CommitBlobBlocksOptions)}. - * - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the blob to create the - * block for. - * @param blockId - * A {@link String} containing a client-specified ID for the - * block. - * @param contentStream - * An {@link InputStream} reference to the content to copy to the - * block. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void createBlobBlock(String container, String blob, String blockId, - InputStream contentStream) throws ServiceException; - - /** - * Creates a new uncommitted block from a content stream, using the - * specified options. - *

- * This method creates an uncommitted block for a block blob specified by - * the blob and container parameters. The blockId - * parameter is a client-specified ID for the block, which must be less than - * or equal to 64 bytes in size. For a given blob, the length of the value - * specified for the blockId parameter must be the same size for - * each block. The contentStream parameter specifies the content to - * be copied to the block. The content for the block must be less than or - * equal to 4 MB in size. Use the {@link CreateBlobBlockOptions options} - * parameter to optionally specify the server timeout for the operation, the - * lease ID if the blob has an active lease, and the MD5 hash value for the - * block content. - *

- * To create or update a block blob, the blocks that have been successfully - * written to the server with this method must be committed using a call to - * {@link com.microsoft.windowsazure.services.blob.BlobContract#commitBlobBlocks(String, String, BlockList)} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#commitBlobBlocks(String, String, BlockList, CommitBlobBlocksOptions)}. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the blob to create the - * block for. - * @param blockId - * A {@link String} containing a client-specified ID for the - * block. - * @param contentStream - * An {@link InputStream} reference to the content to copy to the - * block. - * @param options - * A {@link CreateBlobBlockOptions} instance containing options - * for the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void createBlobBlock(String container, String blob, String blockId, - InputStream contentStream, CreateBlobBlockOptions options) - throws ServiceException; - - /** - * Commits a list of blocks to a block blob. - *

- * This method creates or updates the block blob specified by the - * blob and container parameters. You can call this method - * to update a blob by uploading only those blocks that have changed, then - * committing the new and existing blocks together. You can do this with the - * blockList parameter by specifying whether to commit a block from - * the committed block list or from the uncommitted block list, or to commit - * the most recently uploaded version of the block, whichever list it may - * belong to. - *

- * In order to be written as part of a blob, each block in the list must - * have been successfully written to the server with a call to - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobBlock(String, String, String, InputStream)} - * or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobBlock(String, String, String, InputStream, CreateBlobBlockOptions)}. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the block blob to - * create or update. - * @param blockList - * A {@link BlockList} containing the list of blocks to commit to - * the block blob. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void commitBlobBlocks(String container, String blob, BlockList blockList) - throws ServiceException; - - /** - * Commits a block list to a block blob, using the specified options. - *

- * This method creates or updates the block blob specified by the - * blob and container parameters. You can call this method - * to update a blob by uploading only those blocks that have changed, then - * committing the new and existing blocks together. You can do this with the - * blockList parameter by specifying whether to commit a block from - * the committed block list or from the uncommitted block list, or to commit - * the most recently uploaded version of the block, whichever list it may - * belong to. Use the {@link CommitBlobBlocksOptions options} parameter to - * optionally specify the server timeout for the operation, the MIME content - * type and content encoding for the blob, the content language, the MD5 - * hash, a cache control value, blob metadata, the lease ID if the blob has - * an active lease, and any access conditions for the operation. - *

- * In order to be written as part of a blob, each block in the list must - * have been successfully written to the server with a call to - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobBlock(String, String, String, InputStream)} - * or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobBlock(String, String, String, InputStream, CreateBlobBlockOptions)}. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the block blob to - * create or update. - * @param blockList - * A {@link BlockList} containing the list of blocks to commit to - * the block blob. - * @param options - * A {@link CommitBlobBlocksOptions} instance containing options - * for the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void commitBlobBlocks(String container, String blob, BlockList blockList, - CommitBlobBlocksOptions options) throws ServiceException; - - /** - * Lists the blocks of a blob. - *

- * This method lists the committed blocks of the block blob specified by the - * blob and container parameters. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the block blob to - * list. - * @return A {@link ListBlobBlocksResult} instance containing the list of - * blocks returned for the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - ListBlobBlocksResult listBlobBlocks(String container, String blob) - throws ServiceException; - - /** - * Lists the blocks of a blob, using the specified options. - *

- * This method lists the committed blocks, uncommitted blocks, or both, of - * the block blob specified by the blob and container - * parameters. Use the {@link ListBlobBlocksOptions options} parameter to - * specify an optional server timeout for the operation, the lease ID if the - * blob has an active lease, the snapshot timestamp to get the committed - * blocks of a snapshot, whether to return the committed block list, and - * whether to return the uncommitted block list. By default, only the - * committed blocks of the blob are returned. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the block blob to - * list. - * @param options - * A {@link ListBlobBlocksOptions} instance containing options - * for the request. - * @return A {@link ListBlobBlocksResult} instance containing the list of - * blocks returned for the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - ListBlobBlocksResult listBlobBlocks(String container, String blob, - ListBlobBlocksOptions options) throws ServiceException; - - /** - * Gets the properties of a blob. - *

- * This method lists the properties of the blob specified by the - * blob and container parameters. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the blob to get - * properties for. - * @return A {@link GetBlobPropertiesResult} instance containing the blob - * properties returned for the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - GetBlobPropertiesResult getBlobProperties(String container, String blob) - throws ServiceException; - - /** - * Gets the properties of a blob, using the specified options. - *

- * This method lists the properties of the blob specified by the - * blob and container parameters. Use the - * {@link GetBlobPropertiesOptions options} parameter to set an optional - * server timeout for the operation, the lease ID if the blob has an active - * lease, the snapshot timestamp to get the properties of a snapshot, and - * any access conditions for the request. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the blob to get - * properties for. - * @param options - * A {@link GetBlobPropertiesOptions} instance containing options - * for the request. - * @return A {@link GetBlobPropertiesResult} instance containing the blob - * properties returned for the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - GetBlobPropertiesResult getBlobProperties(String container, String blob, - GetBlobPropertiesOptions options) throws ServiceException; - - /** - * Gets the properties, metadata, and content of a blob. - *

- * This method gets the properties, metadata, and content of the blob - * specified by the blob and container parameters. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the blob to get. - * @return A {@link GetBlobResult} instance containing the properties, - * metadata, and content of the blob from the server response to the - * request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - GetBlobResult getBlob(String container, String blob) - throws ServiceException; - - /** - * Gets the properties, metadata, and content of a blob or blob snapshot, - * using the specified options. - *

- * This method gets the properties, metadata, and content of the blob - * specified by the blob and container parameters. Use the - * {@link GetBlobOptions options} parameter to set an optional server - * timeout for the operation, a snapshot timestamp to specify a snapshot, a - * blob lease ID to get a blob with an active lease, an optional start and - * end range for blob content to return, and any access conditions to - * satisfy. - * - * @param container - * A {@link String} containing the name of the blob's container. - * @param blob - * A {@link String} containing the name of the blob to get. - * @param options - * A {@link GetBlobOptions} instance containing options for the - * request. - * @return A {@link GetBlobResult} instance containing the properties, - * metadata, and content of the blob from the server response to the - * request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - GetBlobResult getBlob(String container, String blob, GetBlobOptions options) - throws ServiceException; - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobService.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobService.java deleted file mode 100644 index 2d0ccf5c5bd9..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/BlobService.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob; - -import com.microsoft.windowsazure.Configuration; - -/** - * A class for static factory methods that return instances implementing - * {@link com.microsoft.windowsazure.services.blob.BlobContract}. - */ -public final class BlobService { - private BlobService() { - } - - /** - * A static factory method that returns an instance implementing - * {@link com.microsoft.windowsazure.services.blob.BlobContract} using default values for initializing a - * {@link Configuration} instance. Note that the returned interface will not - * work unless storage account credentials have been added to the - * "META-INF/com.microsoft.windowsazure.properties" resource file. - * - * @return An instance implementing {@link com.microsoft.windowsazure.services.blob.BlobContract} for interacting - * with the blob service. - */ - public static BlobContract create() { - return create(null, Configuration.getInstance()); - } - - /** - * A static factory method that returns an instance implementing - * {@link com.microsoft.windowsazure.services.blob.BlobContract} using the specified {@link Configuration} instance. - * The {@link Configuration} instance must have storage account information - * and credentials set before this method is called for the returned - * interface to work. - * - * @param config - * A {@link Configuration} instance configured with storage - * account information and credentials. - * - * @return An instance implementing {@link com.microsoft.windowsazure.services.blob.BlobContract} for interacting - * with the blob service. - */ - public static BlobContract create(Configuration config) { - return create(null, config); - } - - /** - * A static factory method that returns an instance implementing - * {@link com.microsoft.windowsazure.services.blob.BlobContract} using default values for initializing a - * {@link Configuration} instance, and using the specified profile prefix - * for service settings. Note that the returned interface will not work - * unless storage account settings and credentials have been added to the - * "META-INF/com.microsoft.windowsazure.properties" resource file with the - * specified profile prefix. - * - * @param profile - * A string prefix for the account name and credentials settings - * in the {@link Configuration} instance. - * @return An instance implementing {@link com.microsoft.windowsazure.services.blob.BlobContract} for interacting - * with the blob service. - */ - public static BlobContract create(String profile) { - return create(profile, Configuration.getInstance()); - } - - /** - * A static factory method that returns an instance implementing - * {@link com.microsoft.windowsazure.services.blob.BlobContract} using the specified {@link Configuration} instance - * and profile prefix for service settings. The {@link Configuration} - * instance must have storage account information and credentials set with - * the specified profile prefix before this method is called for the - * returned interface to work. - * - * @param profile - * A string prefix for the account name and credentials settings - * in the {@link Configuration} instance. - * @param config - * A {@link Configuration} instance configured with storage - * account information and credentials. - * - * @return An instance implementing {@link com.microsoft.windowsazure.services.blob.BlobContract} for interacting - * with the blob service. - */ - public static BlobContract create(String profile, Configuration config) { - return config.create(profile, BlobContract.class); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/Exports.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/Exports.java deleted file mode 100644 index 7b43f1b3b108..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/Exports.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob; - -import com.microsoft.windowsazure.core.Builder; -import com.microsoft.windowsazure.core.ISO8601DateConverter; -import com.microsoft.windowsazure.core.UserAgentFilter; -import com.microsoft.windowsazure.services.blob.implementation.BlobExceptionProcessor; -import com.microsoft.windowsazure.services.blob.implementation.BlobRestProxy; -import com.microsoft.windowsazure.services.blob.implementation.SharedKeyFilter; -import com.microsoft.windowsazure.services.blob.implementation.SharedKeyLiteFilter; - -public class Exports implements Builder.Exports { - @Override - public void register(Builder.Registry registry) { - registry.add(BlobContract.class, BlobExceptionProcessor.class); - registry.add(BlobExceptionProcessor.class); - registry.add(BlobRestProxy.class); - registry.add(SharedKeyLiteFilter.class); - registry.add(SharedKeyFilter.class); - registry.add(ISO8601DateConverter.class); - registry.add(UserAgentFilter.class); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobExceptionProcessor.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobExceptionProcessor.java deleted file mode 100644 index 66a82fbc9fce..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobExceptionProcessor.java +++ /dev/null @@ -1,343 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.implementation; - -import java.io.InputStream; - -import javax.inject.Inject; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.exception.ServiceExceptionFactory; -import com.microsoft.windowsazure.services.blob.BlobContract; -import com.microsoft.windowsazure.services.blob.models.BlockList; -import com.microsoft.windowsazure.services.blob.models.CommitBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobBlockOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobResult; -import com.microsoft.windowsazure.services.blob.models.CreateContainerOptions; -import com.microsoft.windowsazure.services.blob.models.DeleteBlobOptions; -import com.microsoft.windowsazure.services.blob.models.DeleteContainerOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesResult; -import com.microsoft.windowsazure.services.blob.models.GetBlobResult; -import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksResult; -import com.microsoft.windowsazure.services.blob.models.ListContainersOptions; -import com.microsoft.windowsazure.services.blob.models.ListContainersResult; -import com.sun.jersey.api.client.ClientHandlerException; -import com.sun.jersey.api.client.UniformInterfaceException; - -public class BlobExceptionProcessor implements BlobContract { - private static Log log = LogFactory.getLog(BlobExceptionProcessor.class); - private final BlobContract service; - - @Inject - public BlobExceptionProcessor(BlobRestProxy service) { - this.service = service; - } - - public BlobExceptionProcessor(BlobContract service) { - this.service = service; - } - - @Override - public BlobContract withFilter(ServiceFilter filter) { - return new BlobExceptionProcessor(service.withFilter(filter)); - } - - @Override - public BlobContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter) { - return new BlobExceptionProcessor( - service.withRequestFilterFirst(serviceRequestFilter)); - } - - @Override - public BlobContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter) { - return new BlobExceptionProcessor( - service.withRequestFilterLast(serviceRequestFilter)); - } - - @Override - public BlobContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter) { - return new BlobExceptionProcessor( - service.withResponseFilterFirst(serviceResponseFilter)); - } - - @Override - public BlobContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter) { - return new BlobExceptionProcessor( - service.withResponseFilterLast(serviceResponseFilter)); - } - - private ServiceException processCatch(ServiceException e) { - log.warn(e.getMessage(), e.getCause()); - return ServiceExceptionFactory.process("blob", e); - } - - @Override - public CreateBlobResult createBlockBlob(String container, String blob, - InputStream contentStream) throws ServiceException { - try { - return service.createBlockBlob(container, blob, contentStream); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public CreateBlobResult createBlockBlob(String container, String blob, - InputStream contentStream, CreateBlobOptions options) - throws ServiceException { - try { - return service.createBlockBlob(container, blob, contentStream, - options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void createBlobBlock(String container, String blob, String blockId, - InputStream contentStream) throws ServiceException { - try { - service.createBlobBlock(container, blob, blockId, contentStream); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void createBlobBlock(String container, String blob, String blockId, - InputStream contentStream, CreateBlobBlockOptions options) - throws ServiceException { - try { - service.createBlobBlock(container, blob, blockId, contentStream, - options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void commitBlobBlocks(String container, String blob, - BlockList blockList) throws ServiceException { - try { - service.commitBlobBlocks(container, blob, blockList); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void commitBlobBlocks(String container, String blob, - BlockList blockList, CommitBlobBlocksOptions options) - throws ServiceException { - try { - service.commitBlobBlocks(container, blob, blockList, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void deleteBlob(String container, String blob) - throws ServiceException { - try { - service.deleteBlob(container, blob); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void deleteBlob(String container, String blob, - DeleteBlobOptions options) throws ServiceException { - try { - service.deleteBlob(container, blob, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public ListContainersResult listContainers() throws ServiceException { - try { - return service.listContainers(); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public ListContainersResult listContainers(ListContainersOptions options) - throws ServiceException { - try { - return service.listContainers(options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void createContainer(String container) throws ServiceException { - try { - service.createContainer(container); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void createContainer(String container, CreateContainerOptions options) - throws ServiceException { - try { - service.createContainer(container, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void deleteContainer(String container) throws ServiceException { - try { - service.deleteContainer(container); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public void deleteContainer(String container, DeleteContainerOptions options) - throws ServiceException { - try { - service.deleteContainer(container, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public ListBlobBlocksResult listBlobBlocks(String container, String blob) - throws ServiceException { - try { - return service.listBlobBlocks(container, blob); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public ListBlobBlocksResult listBlobBlocks(String container, String blob, - ListBlobBlocksOptions options) throws ServiceException { - try { - return service.listBlobBlocks(container, blob, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public GetBlobPropertiesResult getBlobProperties(String container, - String blob) throws ServiceException { - try { - return service.getBlobProperties(container, blob); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public GetBlobPropertiesResult getBlobProperties(String container, - String blob, GetBlobPropertiesOptions options) - throws ServiceException { - try { - return service.getBlobProperties(container, blob, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public GetBlobResult getBlob(String container, String blob) - throws ServiceException { - try { - return service.getBlob(container, blob); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - @Override - public GetBlobResult getBlob(String container, String blob, - GetBlobOptions options) throws ServiceException { - try { - return service.getBlob(container, blob, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobOperationRestProxy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobOperationRestProxy.java deleted file mode 100644 index 5d99dfd59b91..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobOperationRestProxy.java +++ /dev/null @@ -1,578 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.blob.implementation; - -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.util.HashMap; -import java.util.Map; - -import com.microsoft.windowsazure.core.RFC1123DateConverter; -import com.microsoft.windowsazure.core.pipeline.PipelineHelpers; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; -import com.microsoft.windowsazure.core.utils.CollectionStringBuilder; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.blob.BlobContract; -import com.microsoft.windowsazure.services.blob.models.BlobProperties; -import com.microsoft.windowsazure.services.blob.models.BlobServiceOptions; -import com.microsoft.windowsazure.services.blob.models.BlockList; -import com.microsoft.windowsazure.services.blob.models.CommitBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobBlockOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobResult; -import com.microsoft.windowsazure.services.blob.models.CreateContainerOptions; -import com.microsoft.windowsazure.services.blob.models.DeleteBlobOptions; -import com.microsoft.windowsazure.services.blob.models.DeleteContainerOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesResult; -import com.microsoft.windowsazure.services.blob.models.GetBlobResult; -import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksResult; -import com.microsoft.windowsazure.services.blob.models.ListContainersOptions; -import com.microsoft.windowsazure.services.blob.models.ListContainersResult; -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.WebResource; -import com.sun.jersey.api.client.WebResource.Builder; -import com.sun.jersey.api.client.filter.ClientFilter; -import com.sun.jersey.core.util.Base64; - -public abstract class BlobOperationRestProxy implements BlobContract { - - private static final String API_VERSION = "2011-08-18"; - private final Client channel; - private final String accountName; - private final String url; - private final RFC1123DateConverter dateMapper; - private final ClientFilter[] filters; - - protected BlobOperationRestProxy(Client channel, String accountName, - String url) { - this(channel, new ClientFilter[0], accountName, url, - new RFC1123DateConverter()); - } - - protected BlobOperationRestProxy(Client channel, ClientFilter[] filters, - String accountName, String url, RFC1123DateConverter dateMapper) { - this.channel = channel; - this.accountName = accountName; - this.url = url; - this.filters = filters; - this.dateMapper = dateMapper; - } - - @Override - public abstract BlobContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter); - - @Override - public abstract BlobContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter); - - @Override - public abstract BlobContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter); - - @Override - public abstract BlobContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter); - - protected Client getChannel() { - return channel; - } - - protected String getAccountName() { - return accountName; - } - - protected String getUrl() { - return url; - } - - protected RFC1123DateConverter getDateMapper() { - return dateMapper; - } - - protected ClientFilter[] getFilters() { - return filters; - } - - private void throwIfError(ClientResponse r) { - PipelineHelpers.throwIfError(r); - } - - private void throwIfNotSuccess(ClientResponse clientResponse) { - PipelineHelpers.throwIfNotSuccess(clientResponse); - } - - private WebResource addOptionalQueryParam(WebResource webResource, - String key, Object value) { - return PipelineHelpers.addOptionalQueryParam(webResource, key, value); - } - - private Builder addOptionalRangeHeader(Builder builder, Long rangeStart, - Long rangeEnd) { - return PipelineHelpers.addOptionalRangeHeader(builder, rangeStart, - rangeEnd); - } - - private WebResource addOptionalQueryParam(WebResource webResource, - String key, int value, int defaultValue) { - return PipelineHelpers.addOptionalQueryParam(webResource, key, value, - defaultValue); - } - - private WebResource addOptionalContainerIncludeQueryParam( - ListContainersOptions options, WebResource webResource) { - CollectionStringBuilder sb = new CollectionStringBuilder(); - sb.addValue(options.isIncludeMetadata(), "metadata"); - webResource = addOptionalQueryParam(webResource, "include", - sb.toString()); - return webResource; - } - - private Builder addOptionalHeader(Builder builder, String name, Object value) { - return PipelineHelpers.addOptionalHeader(builder, name, value); - } - - private Builder addOptionalMetadataHeader(Builder builder, - Map metadata) { - return PipelineHelpers.addOptionalMetadataHeader(builder, metadata); - } - - private Builder addOptionalAccessConditionHeader(Builder builder, - AccessConditionHeader accessCondition) { - return PipelineHelpers.addOptionalAccessConditionHeader(builder, - accessCondition); - } - - private Builder addPutBlobHeaders(CreateBlobOptions options, Builder builder) { - builder = addOptionalHeader(builder, "Content-Type", - options.getContentType()); - if (options.getContentType() == null) { - // Note: Add content type here to enable proper HMAC signing - builder = builder.type("application/octet-stream"); - } - builder = addOptionalHeader(builder, "Content-Encoding", - options.getContentEncoding()); - builder = addOptionalHeader(builder, "Content-Language", - options.getContentLanguage()); - builder = addOptionalHeader(builder, "Content-MD5", - options.getContentMD5()); - builder = addOptionalHeader(builder, "Cache-Control", - options.getCacheControl()); - builder = addOptionalHeader(builder, "x-ms-blob-content-type", - options.getBlobContentType()); - builder = addOptionalHeader(builder, "x-ms-blob-content-encoding", - options.getBlobContentEncoding()); - builder = addOptionalHeader(builder, "x-ms-blob-content-language", - options.getBlobContentLanguage()); - builder = addOptionalHeader(builder, "x-ms-blob-content-md5", - options.getBlobContentMD5()); - builder = addOptionalHeader(builder, "x-ms-blob-cache-control", - options.getBlobCacheControl()); - builder = addOptionalHeader(builder, "x-ms-lease-id", - options.getLeaseId()); - builder = addOptionalMetadataHeader(builder, options.getMetadata()); - builder = addOptionalAccessConditionHeader(builder, - options.getAccessCondition()); - - return builder; - } - - private WebResource getResource(BlobServiceOptions options) { - WebResource webResource = channel.resource(url).path("/"); - webResource = addOptionalQueryParam(webResource, "timeout", - options.getTimeout()); - for (ClientFilter filter : filters) { - webResource.addFilter(filter); - } - - return webResource; - } - - @Override - public void createContainer(String container) throws ServiceException { - createContainer(container, new CreateContainerOptions()); - } - - @Override - public void createContainer(String container, CreateContainerOptions options) - throws ServiceException { - if (container == null || container.isEmpty()) { - throw new IllegalArgumentException( - "The container cannot be null or empty."); - } - WebResource webResource = getResource(options).path(container) - .queryParam("resType", "container"); - - WebResource.Builder builder = webResource.header("x-ms-version", - API_VERSION); - builder = addOptionalMetadataHeader(builder, options.getMetadata()); - builder = addOptionalHeader(builder, "x-ms-blob-public-access", - options.getPublicAccess()); - - builder.put(); - } - - @Override - public void deleteContainer(String container) throws ServiceException { - deleteContainer(container, new DeleteContainerOptions()); - } - - @Override - public void deleteContainer(String container, DeleteContainerOptions options) - throws ServiceException { - if ((container == null) || (container.isEmpty())) { - throw new IllegalArgumentException( - "The root container has already been created."); - } - WebResource webResource = getResource(options).path(container) - .queryParam("resType", "container"); - - WebResource.Builder builder = webResource.header("x-ms-version", - API_VERSION); - builder = addOptionalAccessConditionHeader(builder, - options.getAccessCondition()); - - builder.delete(); - } - - @Override - public void deleteBlob(String container, String blob) - throws ServiceException { - deleteBlob(container, blob, new DeleteBlobOptions()); - } - - @Override - public void deleteBlob(String container, String blob, - DeleteBlobOptions options) throws ServiceException { - String path = createPathFromContainer(container); - WebResource webResource = getResource(options).path(path).path(blob); - webResource = addOptionalQueryParam(webResource, "snapshot", - options.getSnapshot()); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - builder = addOptionalHeader(builder, "x-ms-lease-id", - options.getLeaseId()); - if (options.getDeleteSnaphotsOnly() != null) { - builder = addOptionalHeader(builder, "x-ms-delete-snapshots", - options.getDeleteSnaphotsOnly() ? "only" : "include"); - } - builder = addOptionalAccessConditionHeader(builder, - options.getAccessCondition()); - - builder.delete(); - } - - @Override - public ListContainersResult listContainers() throws ServiceException { - return listContainers(new ListContainersOptions()); - } - - @Override - public ListContainersResult listContainers(ListContainersOptions options) - throws ServiceException { - WebResource webResource = getResource(options).path("/").queryParam( - "comp", "list"); - webResource = addOptionalQueryParam(webResource, "prefix", - options.getPrefix()); - webResource = addOptionalQueryParam(webResource, "marker", - options.getMarker()); - webResource = addOptionalQueryParam(webResource, "maxresults", - options.getMaxResults(), 0); - webResource = addOptionalContainerIncludeQueryParam(options, - webResource); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - return builder.get(ListContainersResult.class); - } - - @Override - public CreateBlobResult createBlockBlob(String container, String blob, - InputStream contentStream) throws ServiceException { - return createBlockBlob(container, blob, contentStream, - new CreateBlobOptions()); - } - - @Override - public CreateBlobResult createBlockBlob(String container, String blob, - InputStream contentStream, CreateBlobOptions options) - throws ServiceException { - String path = createPathFromContainer(container); - WebResource webResource = getResource(options).path(path).path(blob); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - builder = builder.header("x-ms-blob-type", "BlockBlob"); - builder = addPutBlobHeaders(options, builder); - - Object contentObject = (contentStream == null ? new byte[0] - : contentStream); - ClientResponse clientResponse = builder.put(ClientResponse.class, - contentObject); - throwIfError(clientResponse); - - CreateBlobResult createBlobResult = new CreateBlobResult(); - createBlobResult.setEtag(clientResponse.getHeaders().getFirst("ETag")); - createBlobResult.setLastModified(dateMapper.parse(clientResponse - .getHeaders().getFirst("Last-Modified"))); - - return createBlobResult; - } - - @Override - public void createBlobBlock(String container, String blob, String blockId, - InputStream contentStream) throws ServiceException { - createBlobBlock(container, blob, blockId, contentStream, - new CreateBlobBlockOptions()); - } - - @Override - public void createBlobBlock(String container, String blob, String blockId, - InputStream contentStream, CreateBlobBlockOptions options) - throws ServiceException { - String path = createPathFromContainer(container); - WebResource webResource = getResource(options).path(path).path(blob) - .queryParam("comp", "block"); - try { - webResource = addOptionalQueryParam(webResource, "blockid", - new String(Base64.encode(blockId), "UTF-8")); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } - - Builder builder = webResource.header("x-ms-version", API_VERSION); - builder = addOptionalHeader(builder, "x-ms-lease-id", - options.getLeaseId()); - builder = addOptionalHeader(builder, "Content-MD5", - options.getContentMD5()); - - builder.put(contentStream); - } - - @Override - public void commitBlobBlocks(String container, String blob, - BlockList blockList) throws ServiceException { - commitBlobBlocks(container, blob, blockList, - new CommitBlobBlocksOptions()); - } - - @Override - public void commitBlobBlocks(String container, String blob, - BlockList blockList, CommitBlobBlocksOptions options) - throws ServiceException { - String path = createPathFromContainer(container); - WebResource webResource = getResource(options).path(path).path(blob) - .queryParam("comp", "blocklist"); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - builder = addOptionalHeader(builder, "x-ms-lease-id", - options.getLeaseId()); - builder = addOptionalHeader(builder, "x-ms-blob-cache-control", - options.getBlobCacheControl()); - builder = addOptionalHeader(builder, "x-ms-blob-content-type", - options.getBlobContentType()); - builder = addOptionalHeader(builder, "x-ms-blob-content-encoding", - options.getBlobContentEncoding()); - builder = addOptionalHeader(builder, "x-ms-blob-content-language", - options.getBlobContentLanguage()); - builder = addOptionalHeader(builder, "x-ms-blob-content-md5", - options.getBlobContentMD5()); - builder = addOptionalMetadataHeader(builder, options.getMetadata()); - builder = addOptionalAccessConditionHeader(builder, - options.getAccessCondition()); - - builder.put(blockList); - } - - @Override - public GetBlobPropertiesResult getBlobProperties(String container, - String blob) throws ServiceException { - return getBlobProperties(container, blob, - new GetBlobPropertiesOptions()); - } - - @Override - public GetBlobPropertiesResult getBlobProperties(String container, - String blob, GetBlobPropertiesOptions options) - throws ServiceException { - String path = createPathFromContainer(container); - WebResource webResource = getResource(options).path(path).path(blob); - webResource = addOptionalQueryParam(webResource, "snapshot", - options.getSnapshot()); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - builder = addOptionalHeader(builder, "x-ms-lease-id", - options.getLeaseId()); - builder = addOptionalAccessConditionHeader(builder, - options.getAccessCondition()); - - ClientResponse response = builder.method("HEAD", ClientResponse.class); - throwIfNotSuccess(response); - - return getBlobPropertiesResultFromResponse(response); - } - - @Override - public GetBlobResult getBlob(String container, String blob) - throws ServiceException { - return getBlob(container, blob, new GetBlobOptions()); - } - - @Override - public GetBlobResult getBlob(String container, String blob, - GetBlobOptions options) throws ServiceException { - String path = createPathFromContainer(container); - WebResource webResource = getResource(options).path(path).path(blob); - webResource = addOptionalQueryParam(webResource, "snapshot", - options.getSnapshot()); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - builder = addOptionalHeader(builder, "x-ms-lease-id", - options.getLeaseId()); - builder = addOptionalRangeHeader(builder, options.getRangeStart(), - options.getRangeEnd()); - builder = addOptionalAccessConditionHeader(builder, - options.getAccessCondition()); - if (options.isComputeRangeMD5()) { - builder = addOptionalHeader(builder, "x-ms-range-get-content-md5", - "true"); - } - - ClientResponse response = builder.get(ClientResponse.class); - throwIfNotSuccess(response); - - GetBlobPropertiesResult properties = getBlobPropertiesResultFromResponse(response); - GetBlobResult blobResult = new GetBlobResult(); - blobResult.setProperties(properties.getProperties()); - blobResult.setMetadata(properties.getMetadata()); - blobResult.setContentStream(response.getEntityInputStream()); - return blobResult; - } - - private GetBlobPropertiesResult getBlobPropertiesResultFromResponse( - ClientResponse response) { - // Properties - BlobProperties properties = new BlobProperties(); - properties.setLastModified(dateMapper.parse(response.getHeaders() - .getFirst("Last-Modified"))); - properties - .setBlobType(response.getHeaders().getFirst("x-ms-blob-type")); - properties.setLeaseStatus(response.getHeaders().getFirst( - "x-ms-lease-status")); - - properties.setContentLength(Long.parseLong(response.getHeaders() - .getFirst("Content-Length"))); - properties.setContentType(response.getHeaders() - .getFirst("Content-Type")); - properties.setContentMD5(response.getHeaders().getFirst("Content-MD5")); - properties.setContentEncoding(response.getHeaders().getFirst( - "Content-Encoding")); - properties.setContentLanguage(response.getHeaders().getFirst( - "Content-Language")); - properties.setCacheControl(response.getHeaders().getFirst( - "Cache-Control")); - - properties.setEtag(response.getHeaders().getFirst("Etag")); - if (response.getHeaders().containsKey("x-ms-blob-sequence-number")) { - properties.setSequenceNumber(Long.parseLong(response.getHeaders() - .getFirst("x-ms-blob-sequence-number"))); - } - - // Metadata - HashMap metadata = getMetadataFromHeaders(response); - - // Result - GetBlobPropertiesResult result = new GetBlobPropertiesResult(); - result.setMetadata(metadata); - result.setProperties(properties); - return result; - } - - @Override - public ListBlobBlocksResult listBlobBlocks(String container, String blob) - throws ServiceException { - return listBlobBlocks(container, blob, new ListBlobBlocksOptions()); - } - - @Override - public ListBlobBlocksResult listBlobBlocks(String container, String blob, - ListBlobBlocksOptions options) throws ServiceException { - String path = createPathFromContainer(container); - WebResource webResource = getResource(options).path(path).path(blob) - .queryParam("comp", "blocklist"); - webResource = addOptionalQueryParam(webResource, "snapshot", - options.getSnapshot()); - if (options.isCommittedList() && options.isUncommittedList()) { - webResource = addOptionalQueryParam(webResource, "blocklisttype", - "all"); - } else if (options.isCommittedList()) { - webResource = addOptionalQueryParam(webResource, "blocklisttype", - "committed"); - } else if (options.isUncommittedList()) { - webResource = addOptionalQueryParam(webResource, "blocklisttype", - "uncommitted"); - } - - Builder builder = webResource.header("x-ms-version", API_VERSION); - builder = addOptionalHeader(builder, "x-ms-lease-id", - options.getLeaseId()); - - ClientResponse response = builder.get(ClientResponse.class); - throwIfError(response); - - ListBlobBlocksResult result = response - .getEntity(ListBlobBlocksResult.class); - result.setEtag(response.getHeaders().getFirst("ETag")); - result.setContentType(response.getHeaders().getFirst("Content-Type")); - - String blobContentLength = response.getHeaders().getFirst( - "x-ms-blob-content-length"); - if (blobContentLength != null) { - result.setContentLength(Long.parseLong(blobContentLength)); - } else { - result.setContentLength(0); - } - - String lastModified = response.getHeaders().getFirst("Last-Modified"); - if (lastModified != null) { - result.setLastModified(dateMapper.parse(lastModified)); - } - - return result; - } - - private HashMap getMetadataFromHeaders( - ClientResponse response) { - return PipelineHelpers.getMetadataFromHeaders(response); - } - - private String createPathFromContainer(String containerName) { - String path; - if (containerName == null || containerName.isEmpty()) { - path = "$root"; - } else { - path = containerName; - } - return path; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobRestProxy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobRestProxy.java deleted file mode 100644 index f2d95c1bc608..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/BlobRestProxy.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.implementation; - -import java.util.Arrays; - -import javax.inject.Inject; -import javax.inject.Named; - -import com.microsoft.windowsazure.core.RFC1123DateConverter; -import com.microsoft.windowsazure.core.UserAgentFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterRequestAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterResponseAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.HttpURLConnectionClient; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.services.blob.BlobConfiguration; -import com.microsoft.windowsazure.services.blob.BlobContract; -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.filter.ClientFilter; - -public class BlobRestProxy extends BlobOperationRestProxy implements - BlobContract { - private final SharedKeyFilter sharedKeyFilter; - - @Inject - public BlobRestProxy(HttpURLConnectionClient channel, - @Named(BlobConfiguration.ACCOUNT_NAME) String accountName, - @Named(BlobConfiguration.URI) String url, - SharedKeyFilter sharedKeyFilter, UserAgentFilter userAgentFilter) { - super(channel, accountName, url); - - this.sharedKeyFilter = sharedKeyFilter; - - channel.addFilter(sharedKeyFilter); - channel.addFilter(new ClientFilterRequestAdapter(userAgentFilter)); - } - - public BlobRestProxy(Client client, ClientFilter[] filters, - String accountName, String url, SharedKeyFilter sharedKeyFilter, - RFC1123DateConverter dateMapper) { - super(client, filters, accountName, url, dateMapper); - - this.sharedKeyFilter = sharedKeyFilter; - } - - @Override - public BlobContract withFilter(ServiceFilter filter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterAdapter(filter); - return new BlobRestProxy(getChannel(), newFilters, getAccountName(), - getUrl(), this.sharedKeyFilter, getDateMapper()); - } - - @Override - public BlobContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = new ClientFilter[currentFilters.length + 1]; - System.arraycopy(currentFilters, 0, newFilters, 1, - currentFilters.length); - newFilters[0] = new ClientFilterRequestAdapter(serviceRequestFilter); - return new BlobRestProxy(getChannel(), newFilters, getAccountName(), - getUrl(), this.sharedKeyFilter, getDateMapper()); - } - - @Override - public BlobContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterRequestAdapter( - serviceRequestFilter); - return new BlobRestProxy(getChannel(), newFilters, getAccountName(), - getUrl(), this.sharedKeyFilter, getDateMapper()); - } - - @Override - public BlobContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = new ClientFilter[currentFilters.length + 1]; - System.arraycopy(currentFilters, 0, newFilters, 1, - currentFilters.length); - newFilters[0] = new ClientFilterResponseAdapter(serviceResponseFilter); - return new BlobRestProxy(getChannel(), newFilters, getAccountName(), - getUrl(), this.sharedKeyFilter, getDateMapper()); - } - - @Override - public BlobContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterResponseAdapter( - serviceResponseFilter); - return new BlobRestProxy(getChannel(), newFilters, getAccountName(), - getUrl(), this.sharedKeyFilter, getDateMapper()); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/ContainerACLDateAdapter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/ContainerACLDateAdapter.java deleted file mode 100644 index afd028fae911..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/ContainerACLDateAdapter.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.implementation; - -import java.util.Date; - -import javax.xml.bind.annotation.adapters.XmlAdapter; - -import com.microsoft.windowsazure.core.ISO8601DateConverter; - -/* - * JAXB adapter for a "not quite" ISO 8601 date time element - */ -public class ContainerACLDateAdapter extends XmlAdapter { - - @Override - public Date unmarshal(String arg0) throws Exception { - return new ISO8601DateConverter().parse(arg0); - } - - @Override - public String marshal(Date arg0) throws Exception { - return new ISO8601DateConverter().shortFormat(arg0); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/HmacSHA256Sign.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/HmacSHA256Sign.java deleted file mode 100644 index 6e66eec8117b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/HmacSHA256Sign.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.implementation; - -import javax.crypto.Mac; -import javax.crypto.spec.SecretKeySpec; - -import com.sun.jersey.core.util.Base64; - -public class HmacSHA256Sign { - private final String accessKey; - - public HmacSHA256Sign(String accessKey) { - this.accessKey = accessKey; - } - - public String sign(String stringToSign) { - try { - // Encoding the Signature - // Signature=Base64(HMAC-SHA256(UTF8(StringToSign))) - - Mac hmac = Mac.getInstance("hmacSHA256"); - hmac.init(new SecretKeySpec(Base64.decode(accessKey), "hmacSHA256")); - byte[] digest = hmac.doFinal(stringToSign.getBytes("UTF-8")); - return new String(Base64.encode(digest), "UTF-8"); - } catch (Exception e) { - throw new IllegalArgumentException("accessKey", e); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/MetadataAdapter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/MetadataAdapter.java deleted file mode 100644 index 790a2535a0e2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/MetadataAdapter.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * - * Copyright (c) Microsoft and contributors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.microsoft.windowsazure.services.blob.implementation; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import javax.naming.OperationNotSupportedException; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.adapters.XmlAdapter; - -import org.w3c.dom.Element; - -/* - * JAXB adapter for element - */ -public class MetadataAdapter - extends - XmlAdapter> { - - @Override - public HashMap unmarshal(MetadataHashMapType arg0) - throws Exception { - HashMap result = new HashMap(); - for (Element entry : arg0.getEntries()) { - result.put(entry.getLocalName(), entry.getFirstChild() - .getNodeValue()); - } - return result; - } - - @Override - public MetadataHashMapType marshal(HashMap arg0) - throws Exception { - // We don't need marshaling for blob/container metadata - throw new OperationNotSupportedException(); - } - - public static class MetadataHashMapType { - private List entries = new ArrayList(); - - @XmlAnyElement - public List getEntries() { - return entries; - } - - public void setEntries(List entries) { - this.entries = entries; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyFilter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyFilter.java deleted file mode 100644 index 7d8f73607876..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyFilter.java +++ /dev/null @@ -1,241 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.implementation; - -import java.util.Collections; -import java.util.Date; -import java.util.List; -import java.util.Locale; - -import javax.inject.Named; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import com.microsoft.windowsazure.core.RFC1123DateConverter; -import com.microsoft.windowsazure.core.pipeline.jersey.EntityStreamingListener; -import com.microsoft.windowsazure.services.blob.BlobConfiguration; -import com.microsoft.windowsazure.services.blob.implementation.SharedKeyUtils.QueryParam; -import com.sun.jersey.api.client.ClientRequest; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.filter.ClientFilter; - -public class SharedKeyFilter extends ClientFilter implements - EntityStreamingListener { - private static Log log = LogFactory.getLog(SharedKeyFilter.class); - - private final String accountName; - private final HmacSHA256Sign signer; - - public SharedKeyFilter( - @Named(BlobConfiguration.ACCOUNT_NAME) String accountName, - @Named(BlobConfiguration.ACCOUNT_KEY) String accountKey) { - this.accountName = accountName; - this.signer = new HmacSHA256Sign(accountKey); - } - - protected String getHeader(ClientRequest cr, String headerKey) { - return SharedKeyUtils.getHeader(cr, headerKey); - } - - protected HmacSHA256Sign getSigner() { - return signer; - } - - protected String getAccountName() { - return accountName; - } - - @Override - public ClientResponse handle(ClientRequest cr) { - // Only sign if no other filter is handling authorization - if (cr.getProperties().get(SharedKeyUtils.AUTHORIZATION_FILTER_MARKER) == null) { - cr.getProperties().put(SharedKeyUtils.AUTHORIZATION_FILTER_MARKER, - null); - - // Register ourselves as listener so we are called back when the - // entity is - // written to the output stream by the next filter in line. - if (cr.getProperties().get(EntityStreamingListener.class.getName()) == null) { - cr.getProperties().put(EntityStreamingListener.class.getName(), - this); - } - - } - return this.getNext().handle(cr); - } - - @Override - public void onBeforeStreamingEntity(ClientRequest clientRequest) { - // All headers should be known at this point, time to sign! - sign(clientRequest); - } - - /* - * StringToSign = VERB + "\n" + Content-Encoding + "\n" Content-Language + - * "\n" Content-Length + "\n" Content-MD5 + "\n" + Content-Type + "\n" + - * Date + "\n" + If-Modified-Since + "\n" If-Match + "\n" If-None-Match + - * "\n" If-Unmodified-Since + "\n" Range + "\n" CanonicalizedHeaders + - * CanonicalizedResource; - */ - public void sign(ClientRequest cr) { - // gather signed material - addOptionalDateHeader(cr); - - // build signed string - String stringToSign = cr.getMethod() + "\n" - + getHeader(cr, "Content-Encoding") + "\n" - + getHeader(cr, "Content-Language") + "\n" - + getHeader(cr, "Content-Length") + "\n" - + getHeader(cr, "Content-MD5") + "\n" - + getHeader(cr, "Content-Type") + "\n" + getHeader(cr, "Date") - + "\n" + getHeader(cr, "If-Modified-Since") + "\n" - + getHeader(cr, "If-Match") + "\n" - + getHeader(cr, "If-None-Match") + "\n" - + getHeader(cr, "If-Unmodified-Since") + "\n" - + getHeader(cr, "Range") + "\n"; - - stringToSign += getCanonicalizedHeaders(cr); - stringToSign += getCanonicalizedResource(cr); - - if (log.isDebugEnabled()) { - log.debug(String.format("String to sign: \"%s\"", stringToSign)); - } - // System.out.println(String.format("String to sign: \"%s\"", - // stringToSign)); - - String signature = this.signer.sign(stringToSign); - cr.getHeaders().putSingle("Authorization", - "SharedKey " + this.accountName + ":" + signature); - } - - protected void addOptionalDateHeader(ClientRequest cr) { - String date = getHeader(cr, "Date"); - if (date == "") { - date = new RFC1123DateConverter().format(new Date()); - cr.getHeaders().putSingle("Date", date); - } - } - - /** - * Constructing the Canonicalized Headers String - * - * To construct the CanonicalizedHeaders portion of the signature string, - * follow these steps: - * - * 1. Retrieve all headers for the resource that begin with x-ms-, including - * the x-ms-date header. - * - * 2. Convert each HTTP header name to lowercase. - * - * 3. Sort the headers lexicographically by header name, in ascending order. - * Note that each header may appear only once in the string. - * - * 4. Unfold the string by replacing any breaking white space with a single - * space. - * - * 5. Trim any white space around the colon in the header. - * - * 6. Finally, append a new line character to each canonicalized header in - * the resulting list. Construct the CanonicalizedHeaders string by - * concatenating all headers in this list into a single string. - */ - private String getCanonicalizedHeaders(ClientRequest cr) { - return SharedKeyUtils.getCanonicalizedHeaders(cr); - } - - /** - * This format supports Shared Key authentication for the 2009-09-19 version - * of the Blob and Queue services. Construct the CanonicalizedResource - * string in this format as follows: - * - * 1. Beginning with an empty string (""), append a forward slash (/), - * followed by the name of the account that owns the resource being - * accessed. - * - * 2. Append the resource's encoded URI path, without any query parameters. - * - * 3. Retrieve all query parameters on the resource URI, including the comp - * parameter if it exists. - * - * 4. Convert all parameter names to lowercase. - * - * 5. Sort the query parameters lexicographically by parameter name, in - * ascending order. - * - * 6. URL-decode each query parameter name and value. - * - * 7. Append each query parameter name and value to the string in the - * following format, making sure to include the colon (:) between the name - * and the value: - * - * parameter-name:parameter-value - * - * 8. If a query parameter has more than one value, sort all values - * lexicographically, then include them in a comma-separated list: - * - * parameter-name:parameter-value-1,parameter-value-2,parameter-value-n - * - * 9. Append a new line character (\n) after each name-value pair. - */ - private String getCanonicalizedResource(ClientRequest cr) { - // 1. Beginning with an empty string (""), append a forward slash (/), - // followed by the name of the account that owns - // the resource being accessed. - String result = "/" + this.accountName; - - // 2. Append the resource's encoded URI path, without any query - // parameters. - result += cr.getURI().getPath(); - - // 3. Retrieve all query parameters on the resource URI, including the - // comp parameter if it exists. - // 6. URL-decode each query parameter name and value. - List queryParams = SharedKeyUtils.getQueryParams(cr - .getURI().getQuery()); - - // 4. Convert all parameter names to lowercase. - for (QueryParam param : queryParams) { - param.setName(param.getName().toLowerCase(Locale.US)); - } - - // 5. Sort the query parameters lexicographically by parameter name, in - // ascending order. - Collections.sort(queryParams); - - // 7. Append each query parameter name and value to the string - // 8. If a query parameter has more than one value, sort all values - // lexicographically, then include them in a comma-separated list - for (int i = 0; i < queryParams.size(); i++) { - QueryParam param = queryParams.get(i); - - List values = param.getValues(); - // Collections.sort(values); - - // 9. Append a new line character (\n) after each name-value pair. - result += "\n"; - result += param.getName(); - result += ":"; - for (int j = 0; j < values.size(); j++) { - if (j > 0) { - result += ","; - } - result += values.get(j); - } - } - - return result; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyLiteFilter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyLiteFilter.java deleted file mode 100644 index 45fe7b3d0e00..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyLiteFilter.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.implementation; - -import java.util.Date; -import java.util.List; - -import javax.inject.Named; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import com.microsoft.windowsazure.core.RFC1123DateConverter; -import com.microsoft.windowsazure.core.pipeline.jersey.EntityStreamingListener; -import com.microsoft.windowsazure.services.blob.BlobConfiguration; -import com.microsoft.windowsazure.services.blob.implementation.SharedKeyUtils.QueryParam; -import com.sun.jersey.api.client.ClientRequest; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.filter.ClientFilter; - -public class SharedKeyLiteFilter extends ClientFilter implements - EntityStreamingListener { - private static Log log = LogFactory.getLog(SharedKeyLiteFilter.class); - - private final String accountName; - private final HmacSHA256Sign signer; - - public SharedKeyLiteFilter( - @Named(BlobConfiguration.ACCOUNT_NAME) String accountName, - @Named(BlobConfiguration.ACCOUNT_KEY) String accountKey) { - - this.accountName = accountName; - this.signer = new HmacSHA256Sign(accountKey); - } - - @Override - public ClientResponse handle(ClientRequest cr) { - // Only sign if no other filter is handling authorization - if (cr.getProperties().get(SharedKeyUtils.AUTHORIZATION_FILTER_MARKER) == null) { - cr.getProperties().put(SharedKeyUtils.AUTHORIZATION_FILTER_MARKER, - null); - - // Register ourselves as listener so we are called back when the - // entity is - // written to the output stream by the next filter in line. - if (cr.getProperties().get(EntityStreamingListener.class.getName()) == null) { - cr.getProperties().put(EntityStreamingListener.class.getName(), - this); - } - } - - return this.getNext().handle(cr); - } - - @Override - public void onBeforeStreamingEntity(ClientRequest clientRequest) { - // All headers should be known at this point, time to sign! - sign(clientRequest); - } - - /* - * StringToSign = VERB + "\n" + Content-MD5 + "\n" + Content-Type + "\n" + - * Date + "\n" + CanonicalizedHeaders + CanonicalizedResource; - */ - public void sign(ClientRequest cr) { - // gather signed material - String requestMethod = cr.getMethod(); - String contentMD5 = getHeader(cr, "Content-MD5"); - String contentType = getHeader(cr, "Content-Type"); - String date = getHeader(cr, "Date"); - - if (date == "") { - date = new RFC1123DateConverter().format(new Date()); - cr.getHeaders().add("Date", date); - } - - // build signed string - String stringToSign = requestMethod + "\n" + contentMD5 + "\n" - + contentType + "\n" + date + "\n"; - - stringToSign += addCanonicalizedHeaders(cr); - stringToSign += addCanonicalizedResource(cr); - - if (log.isDebugEnabled()) { - log.debug(String.format("String to sign: \"%s\"", stringToSign)); - } - - String signature = this.signer.sign(stringToSign); - cr.getHeaders().putSingle("Authorization", - "SharedKeyLite " + this.accountName + ":" + signature); - } - - /** - * Constructing the Canonicalized Headers String - * - * To construct the CanonicalizedHeaders portion of the signature string, - * follow these steps: - * - * 1. Retrieve all headers for the resource that begin with x-ms-, including - * the x-ms-date header. - * - * 2. Convert each HTTP header name to lowercase. - * - * 3. Sort the headers lexicographically by header name in ascending order. - * Note that each header may appear only once in the string. - * - * 4. Unfold the string by replacing any breaking white space with a single - * space. - * - * 5. Trim any white space around the colon in the header. - * - * 6. Finally, append a new line character to each canonicalized header in - * the resulting list. Construct the CanonicalizedHeaders string by - * concatenating all headers in this list into a single string. - */ - private String addCanonicalizedHeaders(ClientRequest cr) { - return SharedKeyUtils.getCanonicalizedHeaders(cr); - } - - /** - * This format supports Shared Key and Shared Key Lite for all versions of - * the Table service, and Shared Key Lite for the 2009-09-19 version of the - * Blob and Queue services. This format is identical to that used with - * previous versions of the storage services. Construct the - * CanonicalizedResource string in this format as follows: - * - * 1. Beginning with an empty string (""), append a forward slash (/), - * followed by the name of the account that owns the resource being - * accessed. - * - * 2. Append the resource's encoded URI path. If the request URI addresses a - * component of the resource, append the appropriate query string. The query - * string should include the question mark and the comp parameter (for - * example, ?comp=metadata). No other parameters should be included on the - * query string. - */ - private String addCanonicalizedResource(ClientRequest cr) { - String result = "/" + this.accountName; - - result += cr.getURI().getPath(); - - List queryParams = SharedKeyUtils.getQueryParams(cr - .getURI().getQuery()); - for (QueryParam p : queryParams) { - if ("comp".equals(p.getName())) { - result += "?" + p.getName() + "=" + p.getValues().get(0); - } - } - return result; - } - - private String getHeader(ClientRequest cr, String headerKey) { - return SharedKeyUtils.getHeader(cr, headerKey); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyUtils.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyUtils.java deleted file mode 100644 index 431594d51d64..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/SharedKeyUtils.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * - * Copyright (c) Microsoft and contributors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.microsoft.windowsazure.services.blob.implementation; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Locale; - -import com.sun.jersey.api.client.ClientRequest; - -public abstract class SharedKeyUtils { - public static final String AUTHORIZATION_FILTER_MARKER = SharedKeyUtils.class - .getName(); - - /* - * Constructing the Canonicalized Headers String - * - * To construct the CanonicalizedHeaders portion of the signature string, - * follow these steps: 1. Retrieve all headers for the resource that begin - * with x-ms-, including the x-ms-date header. 2. Convert each HTTP header - * name to lowercase. 3. Sort the headers lexicographically by header name, - * in ascending order. Note that each header may appear only once in the - * string. 4. Unfold the string by replacing any breaking white space with a - * single space. 5. Trim any white space around the colon in the header. 6. - * Finally, append a new line character to each canonicalized header in the - * resulting list. Construct the CanonicalizedHeaders string by - * concatenating all headers in this list into a single string. - */ - public static String getCanonicalizedHeaders(ClientRequest cr) { - ArrayList msHeaders = new ArrayList(); - for (String key : cr.getHeaders().keySet()) { - if (key.toLowerCase(Locale.US).startsWith("x-ms-")) { - msHeaders.add(key.toLowerCase(Locale.US)); - } - } - Collections.sort(msHeaders); - - String result = ""; - for (String msHeader : msHeaders) { - result += msHeader + ":" + cr.getHeaders().getFirst(msHeader) - + "\n"; - } - return result; - } - - public static String getHeader(ClientRequest cr, String headerKey) { - List values = cr.getHeaders().get(headerKey); - if (values == null || values.size() != 1) { - return nullEmpty(null); - } - - return nullEmpty(values.get(0).toString()); - } - - private static String nullEmpty(String value) { - return value != null ? value : ""; - } - - public static List getQueryParams(String queryString) { - ArrayList result = new ArrayList(); - - if (queryString != null) { - String[] params = queryString.split("&"); - for (String param : params) { - result.add(getQueryParam(param)); - } - } - - return result; - } - - private static QueryParam getQueryParam(String param) { - QueryParam result = new QueryParam(); - - int index = param.indexOf("="); - if (index < 0) { - result.setName(param); - } else { - result.setName(param.substring(0, index)); - - String value = param.substring(index + 1); - int commaIndex = value.indexOf(','); - if (commaIndex < 0) { - result.addValue(value); - } else { - for (String v : value.split(",")) { - result.addValue(v); - } - } - } - - return result; - } - - public static class QueryParam implements Comparable { - private String name; - private final List values = new ArrayList(); - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public List getValues() { - return values; - } - - public void addValue(String value) { - values.add(value); - } - - public int compareTo(QueryParam o) { - return this.name.compareTo(o.name); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/package.html deleted file mode 100644 index d44ec4f38bce..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/implementation/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the implementation of the blob service classes and utilities. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AccessCondition.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AccessCondition.java deleted file mode 100644 index 3594c82eaf68..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AccessCondition.java +++ /dev/null @@ -1,446 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.net.HttpURLConnection; -import java.util.Date; - -import com.microsoft.windowsazure.core.utils.Utility; - -/** - * Represents a set of access conditions to be used for operations against the - * storage services. - */ -public final class AccessCondition { - /** - * Generates a new empty AccessCondition. - *

- * For more information, see Specifying - * Conditional Headers for Blob Service Operations. - * - * @return An AccessCondition object that has no conditions - * set. - */ - public static AccessCondition generateEmptyCondition() { - return new AccessCondition(); - } - - /** - * Returns an access condition such that an operation will be performed only - * if the resource's ETag value matches the specified ETag value. - *

- * Setting this access condition modifies the request to include the HTTP - * If-Match conditional header. If this access condition is set, the - * operation is performed only if the ETag of the resource matches the - * specified ETag. - *

- * For more information, see Specifying - * Conditional Headers for Blob Service Operations. - * - * @param etag - * A String that represents the ETag value to check. - * - * @return An AccessCondition object that represents the - * If-Match condition. - */ - public static AccessCondition generateIfMatchCondition(final String etag) { - AccessCondition retCondition = new AccessCondition(); - retCondition.setIfMatch(etag); - return retCondition; - } - - /** - * Returns an access condition such that an operation will be performed only - * if the resource has been modified since the specified time. - *

- * Setting this access condition modifies the request to include the HTTP - * If-Modified-Since conditional header. If this access condition is - * set, the operation is performed only if the resource has been modified - * since the specified time. - *

- * For more information, see Specifying - * Conditional Headers for Blob Service Operations. - * - * @param lastMotified - * A java.util.Date object that represents the - * last-modified time to check for the resource. - * - * @return An AccessCondition object that represents the - * If-Modified-Since condition. - */ - public static AccessCondition generateIfModifiedSinceCondition( - final Date lastMotified) { - AccessCondition retCondition = new AccessCondition(); - retCondition.ifModifiedSinceDate = lastMotified; - return retCondition; - } - - /** - * Returns an access condition such that an operation will be performed only - * if the resource's ETag value does not match the specified ETag value. - *

- * Setting this access condition modifies the request to include the HTTP - * If-None-Match conditional header. If this access condition is set, - * the operation is performed only if the ETag of the resource does not - * match the specified ETag. - *

- * For more information, see Specifying - * Conditional Headers for Blob Service Operations. - * - * @param etag - * A String that represents the ETag value to check. - * - * @return An AccessCondition object that represents the - * If-None-Match condition. - */ - public static AccessCondition generateIfNoneMatchCondition(final String etag) { - AccessCondition retCondition = new AccessCondition(); - retCondition.setIfNoneMatch(etag); - return retCondition; - } - - /** - * Returns an access condition such that an operation will be performed only - * if the resource has not been modified since the specified time. - *

- * Setting this access condition modifies the request to include the HTTP - * If-Unmodified-Since conditional header. If this access condition - * is set, the operation is performed only if the resource has not been - * modified since the specified time. - *

- * For more information, see Specifying - * Conditional Headers for Blob Service Operations. - * - * @param lastMotified - * A java.util.Date object that represents the - * last-modified time to check for the resource. - * - * @return An AccessCondition object that represents the - * If-Unmodified-Since condition. - */ - public static AccessCondition generateIfNotModifiedSinceCondition( - final Date lastMotified) { - AccessCondition retCondition = new AccessCondition(); - retCondition.ifUnmodifiedSinceDate = lastMotified; - return retCondition; - } - - /** - * Returns an access condition such that an operation will be performed only - * if the resource is accessible under the specified lease id. - *

- * Setting this access condition modifies the request to include the HTTP - * If-Unmodified-Since conditional header. If this access condition - * is set, the operation is performed only if the resource has not been - * modified since the specified time. - *

- * For more information, see Specifying - * Conditional Headers for Blob Service Operations. - * - * @param leaseID - * The lease id to specify. - * - */ - public static AccessCondition generateLeaseCondition(final String leaseID) { - AccessCondition retCondition = new AccessCondition(); - retCondition.leaseID = leaseID; - return retCondition; - } - - private String leaseID = null; - - /** - * Represents the etag of the resource for if [none] match conditions - */ - private String etag = null; - - /** - * Represents the date for IfModifiedSince conditions. - */ - private Date ifModifiedSinceDate = null; - - /** - * Represents the date for IfUn,odifiedSince conditions. - */ - private Date ifUnmodifiedSinceDate = null; - - /** - * Represents the ifMatchHeaderType type. - */ - private String ifMatchHeaderType = null; - - /** - * Creates an instance of the AccessCondition class. - */ - public AccessCondition() { - // Empty Default Ctor - } - - /** - * RESERVED FOR INTERNAL USE. Applies the access condition to the request. - * - * @param request - * A java.net.HttpURLConnection object that - * represents the request to which the condition is being - * applied. - * - * @throws StorageException - * If there is an error parsing the date value of the access - * condition. - */ - public void applyConditionToRequest(final HttpURLConnection request) { - applyConditionToRequest(request, false); - } - - /** - * RESERVED FOR INTERNAL USE. Applies the access condition to the request. - * - * @param request - * A java.net.HttpURLConnection object that - * represents the request to which the condition is being - * applied. - * @param useSourceAccessHeaders - * If true will use the Source_ headers for the conditions, - * otherwise standard headers are used. - * @throws StorageException - * If there is an error parsing the date value of the access - * condition. - */ - public void applyConditionToRequest(final HttpURLConnection request, - boolean useSourceAccessHeaders) { - // When used as a source access condition - if (useSourceAccessHeaders) { - if (!Utility.isNullOrEmpty(this.leaseID)) { - request.setRequestProperty( - Constants.HeaderConstants.SOURCE_LEASE_ID_HEADER, - this.leaseID); - } - - if (this.ifModifiedSinceDate != null) { - request.setRequestProperty( - Constants.HeaderConstants.SOURCE_IF_MODIFIED_SINCE_HEADER, - Utility.getGMTTime(this.ifModifiedSinceDate)); - } - - if (this.ifUnmodifiedSinceDate != null) { - request.setRequestProperty( - Constants.HeaderConstants.SOURCE_IF_UNMODIFIED_SINCE_HEADER, - Utility.getGMTTime(this.ifUnmodifiedSinceDate)); - } - - if (!Utility.isNullOrEmpty(this.etag)) { - if (this.ifMatchHeaderType - .equals(Constants.HeaderConstants.IF_MATCH)) { - request.setRequestProperty( - Constants.HeaderConstants.SOURCE_IF_MATCH_HEADER, - this.etag); - } else if (this.ifMatchHeaderType - .equals(Constants.HeaderConstants.IF_NONE_MATCH)) { - request.setRequestProperty( - Constants.HeaderConstants.SOURCE_IF_NONE_MATCH_HEADER, - this.etag); - } - } - } else { - if (!Utility.isNullOrEmpty(this.leaseID)) { - addOptionalHeader(request, "x-ms-lease-id", this.leaseID); - - } - - if (this.ifModifiedSinceDate != null) { - // The IfModifiedSince has a special helper in - // HttpURLConnection, use it instead of manually setting the - // header. - request.setIfModifiedSince(this.ifModifiedSinceDate.getTime()); - } - - if (this.ifUnmodifiedSinceDate != null) { - request.setRequestProperty( - Constants.HeaderConstants.IF_UNMODIFIED_SINCE, - Utility.getGMTTime(this.ifUnmodifiedSinceDate)); - } - - if (!Utility.isNullOrEmpty(this.etag)) { - request.setRequestProperty(this.ifMatchHeaderType, this.etag); - } - } - } - - /** - * @return the etag when the If-Match condition is set. - */ - public String getIfMatch() { - return this.ifMatchHeaderType - .equals(Constants.HeaderConstants.IF_MATCH) ? this.etag : null; - } - - /** - * @return the ifModifiedSinceDate - */ - public Date getIfModifiedSinceDate() { - return this.ifModifiedSinceDate; - } - - /** - * @return the etag when the If-None-Match condition is set. - */ - public String getIfNoneMatch() { - return this.ifMatchHeaderType - .equals(Constants.HeaderConstants.IF_NONE_MATCH) ? this.etag - : null; - } - - /** - * @return the ifUnmodifiedSinceDate - */ - public Date getIfUnmodifiedSinceDate() { - return this.ifUnmodifiedSinceDate; - } - - /** - * @return the leaseID - */ - public String getLeaseID() { - return this.leaseID; - } - - /** - * @param etag - * the etag to set - */ - public void setIfMatch(String etag) { - this.etag = normalizeEtag(etag); - this.ifMatchHeaderType = Constants.HeaderConstants.IF_MATCH; - } - - /** - * @param ifModifiedSinceDate - * the ifModifiedSinceDate to set - */ - public void setIfModifiedSinceDate(Date ifModifiedSinceDate) { - this.ifModifiedSinceDate = ifModifiedSinceDate; - } - - /** - * @param etag - * the etag to set - */ - public void setIfNoneMatch(String etag) { - this.etag = normalizeEtag(etag); - this.ifMatchHeaderType = Constants.HeaderConstants.IF_NONE_MATCH; - } - - /** - * @param ifUnmodifiedSinceDate - * the ifUnmodifiedSinceDate to set - */ - public void setIfUnmodifiedSinceDate(Date ifUnmodifiedSinceDate) { - this.ifUnmodifiedSinceDate = ifUnmodifiedSinceDate; - } - - /** - * @param leaseID - * the leaseID to set - */ - public void setLeaseID(String leaseID) { - this.leaseID = leaseID; - } - - /** - * Reserved for internal use. Verifies the condition is satisfied. - * - * @param etag - * A String that represents the ETag to check. - * @param lastModified - * A java.util.Date object that represents the last - * modified date/time. - * - * @return true if the condition is satisfied; otherwise, - * false. - * - */ - public boolean verifyConditional(final String etag, final Date lastModified) { - if (this.ifModifiedSinceDate != null) { - // The IfModifiedSince has a special helper in HttpURLConnection, - // use it instead of manually setting the - // header. - if (!lastModified.after(this.ifModifiedSinceDate)) { - return false; - } - } - - if (this.ifUnmodifiedSinceDate != null) { - if (lastModified.after(this.ifUnmodifiedSinceDate)) { - return false; - } - } - - if (!Utility.isNullOrEmpty(this.etag)) { - if (this.ifMatchHeaderType - .equals(Constants.HeaderConstants.IF_MATCH)) { - if (!this.etag.equals(etag) && !this.etag.equals("*")) { - return false; - } - } else if (this.ifMatchHeaderType - .equals(Constants.HeaderConstants.IF_NONE_MATCH)) { - if (this.etag.equals(etag)) { - return false; - } - } - } - - return true; - } - - /** - * Normalizes an Etag to be quoted, unless it is * - * - * @param inTag - * the etag to normalize - * @return the quoted etag - */ - private static String normalizeEtag(String inTag) { - if (Utility.isNullOrEmpty(inTag) || inTag.equals("*")) { - return inTag; - } else if (inTag.startsWith("\"") && inTag.endsWith("\"")) { - return inTag; - } else { - return String.format("\"%s\"", inTag); - } - } - - /** - * Adds the optional header. - * - * @param request - * a HttpURLConnection for the operation. - * @param name - * the metadata name. - * @param value - * the metadata value. - */ - public static void addOptionalHeader(final HttpURLConnection request, - final String name, final String value) { - if (value != null && !value.equals(Constants.EMPTY_STRING)) { - request.setRequestProperty(name, value); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseOptions.java deleted file mode 100644 index 84f327368347..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseOptions.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - - -/** - * Represents the options that may be set on an - * {@link com.microsoft.windowsazure.services.blob.BlobContract#acquireLease(String, String, AcquireLeaseOptions) - * acquireLease} request. These options include an optional server timeout for - * the operation and any access conditions for the operation. - */ -public class AcquireLeaseOptions extends BlobServiceOptions { - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link AcquireLeaseOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link AcquireLeaseOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link AcquireLeaseOptions} instance. - */ - @Override - public AcquireLeaseOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the access conditions set in this {@link AcquireLeaseOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions for acquiring a lease on a blob. By default, - * the operation will acquire the lease unconditionally. Use this method to - * specify conditions on the ETag or last modified time value for performing - * the operation. - *

- * The accessCondition value only affects calls made on methods - * where this {@link AcquireLeaseOptions} instance is passed as a parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link AcquireLeaseOptions} instance. - */ - public AcquireLeaseOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseResult.java deleted file mode 100644 index dea8a5c853b1..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/AcquireLeaseResult.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - - -/** - * A wrapper class for the response returned from a Blob Service REST API Lease - * Blob operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#acquireLease(String, String)}, - * {@link com.microsoft.windowsazure.services.blob.BlobContract#acquireLease(String, String, AcquireLeaseOptions)}, - * {@link com.microsoft.windowsazure.services.blob.BlobContract#renewLease(String, String, String, BlobServiceOptions)}, - * and {@link com.microsoft.windowsazure.services.blob.BlobContract#renewLease(String, String, String)}. - *

- * See the Lease Blob documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class AcquireLeaseResult { - private String leaseId; - - /** - * Gets the lease ID of the blob. - *

- * This value is used when updating or deleting a blob with an active lease, - * and when renewing or releasing the lease. - * - * @return A {@link String} containing the server-assigned lease ID for the - * blob. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Reserved for internal use. Sets the lease ID of the blob from the - * x-ms-lease-id header of the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param leaseId - * A {@link String} containing the server-assigned lease ID for - * the blob. - */ - public void setLeaseId(String leaseId) { - this.leaseId = leaseId; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobProperties.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobProperties.java deleted file mode 100644 index 751eaea619b1..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobProperties.java +++ /dev/null @@ -1,321 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.core.RFC1123DateAdapter; - -/** - * Represents the HTML properties and system properties that may be set on a - * blob. - */ -public class BlobProperties { - private Date lastModified; - private String etag; - private String contentType; - private long contentLength; - private String contentEncoding; - private String contentLanguage; - private String contentMD5; - private String cacheControl; - private String blobType; - private String leaseStatus; - private long sequenceNumber; - - /** - * Gets the last modified time of the blob. For block blobs, this value is - * returned only if the blob has committed blocks. - *

- * Any operation that modifies the blob, including updates to the blob's - * metadata or properties, changes the last modified time of the blob. This - * value can be used in an access condition when updating or deleting a blob - * to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link java.util.Date} containing the last modified time of the - * blob. - */ - @XmlElement(name = "Last-Modified") - @XmlJavaTypeAdapter(RFC1123DateAdapter.class) - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the blob from - * the Last-Modified header value returned in a server - * response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the blob. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - /** - * Gets the ETag of the blob. For block blobs, this value is returned only - * if the blob has committed blocks. - *

- * This value can be used in an access condition when updating or deleting a - * blob to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link String} containing the server-assigned ETag value for - * the blob. - */ - @XmlElement(name = "Etag") - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag value of the blob from the - * ETag header value returned in a server response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the MIME content type of the blob. - * - * @return A {@link String} containing the MIME content type value for the - * blob. - */ - @XmlElement(name = "Content-Type") - public String getContentType() { - return contentType; - } - - /** - * Reserved for internal use. Sets the MIME content type value for the blob - * from the Content-Type header value returned in the server - * response. - * - * @param contentType - * A {@link String} containing the MIME content type value for - * the blob. - */ - public void setContentType(String contentType) { - this.contentType = contentType; - } - - /** - * Gets the size of the blob in bytes. - * - * @return The size of the blob in bytes. - */ - @XmlElement(name = "Content-Length") - public long getContentLength() { - return contentLength; - } - - /** - * Reserved for internal use. Sets the content length value for the blob - * from the Content-Length header value returned in the server - * response. - * - * @param contentLength - * The size of the blob in bytes. - */ - public void setContentLength(long contentLength) { - this.contentLength = contentLength; - } - - /** - * Gets the HTTP content encoding value of the blob. - * - * @return A {@link String} containing the HTTP content encoding value set, - * if any. - */ - @XmlElement(name = "Content-Encoding") - public String getContentEncoding() { - return contentEncoding; - } - - /** - * Reserved for internal use. Sets the HTTP content encoding value for the - * blob from the Content-Encoding header value returned in the - * server response. - * - * @param contentEncoding - * A {@link String} containing the HTTP content encoding value to - * set. - */ - public void setContentEncoding(String contentEncoding) { - this.contentEncoding = contentEncoding; - } - - /** - * Gets the HTTP content language value of the blob. - * - * @return A {@link String} containing the HTTP content language value set, - * if any. - */ - @XmlElement(name = "Content-Language") - public String getContentLanguage() { - return contentLanguage; - } - - /** - * Reserved for internal use. Sets the HTTP content language value for the - * blob from the Content-Language header value returned in the - * server response. - * - * @param contentLanguage - * A {@link String} containing the HTTP content language value to - * set. - */ - public void setContentLanguage(String contentLanguage) { - this.contentLanguage = contentLanguage; - } - - /** - * Gets the MD5 hash value of the blob content. - * - * @return A {@link String} containing the MD5 hash value of the blob - * content. - */ - @XmlElement(name = "Content-MD5") - public String getContentMD5() { - return contentMD5; - } - - /** - * Reserved for internal use. Sets the MD5 hash value of the blob content - * from the Content-MD5 header value returned in the server - * response. - * - * @param contentMD5 - * A {@link String} containing the MD5 hash value of the blob - * content. - */ - public void setContentMD5(String contentMD5) { - this.contentMD5 = contentMD5; - } - - /** - * Gets the HTTP cache control value of the blob. - * - * @return A {@link String} containing the HTTP cache control value of the - * blob. - */ - @XmlElement(name = "Cache-Control") - public String getCacheControl() { - return cacheControl; - } - - /** - * Reserved for internal use. Sets the HTTP cache control value of the blob - * from the Cache-Control header value returned in the server - * response. - * - * @param cacheControl - * A {@link String} containing the HTTP cache control value of - * the blob. - */ - public void setCacheControl(String cacheControl) { - this.cacheControl = cacheControl; - } - - /** - * Gets a string representing the type of the blob, with a value of - * "BlockBlob" for block blobs, and "PageBlob" for page blobs. - * - * @return A {@link String} containing "BlockBlob" for block blobs, or - * "PageBlob" for page blobs. - */ - @XmlElement(name = "BlobType") - public String getBlobType() { - return blobType; - } - - /** - * Reserved for internal use. Sets the blob type from the - * x-ms-blob-type header value returned in the server response. - * - * @param blobType - * A {@link String} containing "BlockBlob" for block blobs, or - * "PageBlob" for page blobs. - */ - public void setBlobType(String blobType) { - this.blobType = blobType; - } - - /** - * Gets a string representing the lease status of the blob, with a value of - * "locked" for blobs with an active lease, and "unlocked" for blobs without - * an active lease. - * - * @return A {@link String} containing "locked" for blobs with an active - * lease, and "unlocked" for blobs without an active lease. - */ - @XmlElement(name = "LeaseStatus") - public String getLeaseStatus() { - return leaseStatus; - } - - /** - * Reserved for internal use. Sets the blob lease status from the - * x-ms-lease-status header value returned in the server - * response. - * - * @param leaseStatus - * A {@link String} containing "locked" for blobs with an active - * lease, and "unlocked" for blobs without an active lease. - */ - public void setLeaseStatus(String leaseStatus) { - this.leaseStatus = leaseStatus; - } - - /** - * Gets the current sequence number for a page blob. This value is not set - * for block blobs. - * - * @return The current sequence number of the page blob. - */ - @XmlElement(name = "x-ms-blob-sequence-number") - public long getSequenceNumber() { - return sequenceNumber; - } - - /** - * Reserved for internal use. Sets the page blob sequence number from the - * x-ms-blob-sequence-number header value returned in the - * server response. - * - * @param sequenceNumber - * The current sequence number of the page blob. - */ - public void setSequenceNumber(long sequenceNumber) { - this.sequenceNumber = sequenceNumber; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobServiceOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobServiceOptions.java deleted file mode 100644 index b6813f598a51..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlobServiceOptions.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - - -/** - * Represents the base class for options that may be set on Blob Service REST - * API operations invoked through the {@link com.microsoft.windowsazure.services.blob.BlobContract} interface. This class - * defines a server request timeout, which can be applied to all operations. - */ -public class BlobServiceOptions { - // Nullable because it is optional - private Integer timeout; - - /** - * Gets the server request timeout value associated with this - * {@link BlobServiceOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link BlobServiceOptions} instance is passed as a parameter. - * - * @return The server request timeout value in milliseconds. - */ - public Integer getTimeout() { - return timeout; - } - - /** - * Sets the server request timeout value associated with this - * {@link BlobServiceOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link BlobServiceOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link BlobServiceOptions} instance. - */ - public BlobServiceOptions setTimeout(Integer timeout) { - this.timeout = timeout; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlockList.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlockList.java deleted file mode 100644 index a8e4d003e31b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BlockList.java +++ /dev/null @@ -1,166 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.core.pipeline.Base64StringAdapter; - -/** - * Represents a list of blocks that may be committed to a block blob. - */ -@XmlRootElement(name = "BlockList") -public class BlockList { - private List entries = new ArrayList(); - - /** - * Adds the committed block specified by the block ID to the block list. - * - * @param blockId - * A {@link String} containing the client-specified block ID for - * a committed block. - * @return A reference to this {@link BlockList} instance. - */ - public BlockList addCommittedEntry(String blockId) { - CommittedEntry entry = new CommittedEntry(); - entry.setBlockId(blockId); - getEntries().add(entry); - return this; - } - - /** - * Adds the uncommitted block specified by the block ID to the block list. - * - * @param blockId - * A {@link String} containing the client-specified block ID for - * an uncommitted block. - * @return A reference to this {@link BlockList} instance. - */ - public BlockList addUncommittedEntry(String blockId) { - UncommittedEntry entry = new UncommittedEntry(); - entry.setBlockId(blockId); - getEntries().add(entry); - return this; - } - - /** - * Adds the latest block specified by the block ID to the block list. An - * entry of this type will cause the server commit the most recent - * uncommitted block with the specified block ID, or the committed block - * with the specified block ID if no uncommitted block is found. - * - * @param blockId - * A {@link String} containing the client-specified block ID for - * the latest matching block. - * @return A reference to this {@link BlockList} instance. - */ - public BlockList addLatestEntry(String blockId) { - LatestEntry entry = new LatestEntry(); - entry.setBlockId(blockId); - getEntries().add(entry); - return this; - } - - /** - * Gets the collection of entries for the block list. - * - * @return A {@link List} of {@link Entry} instances specifying the blocks - * to commit. - */ - @XmlElementRefs({ - @XmlElementRef(name = "Committed", type = CommittedEntry.class), - @XmlElementRef(name = "Uncommitted", type = UncommittedEntry.class), - @XmlElementRef(name = "Latest", type = LatestEntry.class) }) - @XmlMixed - public List getEntries() { - return entries; - } - - /** - * Sets the block list to the specified collection of entries. - * - * @param entries - * A {@link List} of {@link Entry} instances specifying the - * blocks to commit. - * @return A reference to this {@link BlockList} instance. - */ - public BlockList setEntries(List entries) { - this.entries = entries; - return this; - } - - /** - * The abstract base class for an entry in a {@link BlockList}, representing - * a committed or uncommitted block. - */ - public abstract static class Entry { - private String blockId; - - /** - * Gets the client-specified block ID for a {@link BlockList} entry. - * - * @return A {@link String} containing the client-specified block ID for - * a block. - */ - @XmlJavaTypeAdapter(Base64StringAdapter.class) - @XmlValue - public String getBlockId() { - return blockId; - } - - /** - * Sets the client-specified block ID for a {@link BlockList} entry. - * - * @param blockId - * A {@link String} containing the client-specified block ID - * for the block. - */ - public void setBlockId(String blockId) { - this.blockId = blockId; - } - } - - /** - * Represents an entry in a {@link BlockList} for a previously committed - * block. - */ - @XmlRootElement(name = "Committed") - public static class CommittedEntry extends Entry { - } - - /** - * Represents an entry in a {@link BlockList} for an uncommitted block. - */ - @XmlRootElement(name = "Uncommitted") - public static class UncommittedEntry extends Entry { - } - - /** - * Represents an entry in a {@link BlockList} for the most recent - * uncommitted block with the specified block ID, or the committed block - * with the specified block ID if no uncommitted block is found. - */ - @XmlRootElement(name = "Latest") - public static class LatestEntry extends Entry { - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BreakLeaseResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BreakLeaseResult.java deleted file mode 100644 index 948c5b4c7afc..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/BreakLeaseResult.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.blob.models; - -/** - * A wrapper class for the response returned from a Blob Service REST API Break - * Lease Blob operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#breakLease(String, String, BlobServiceOptions)} - * , - *

- * See the Lease Blob documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class BreakLeaseResult { - private int remainingLeaseTimeInSeconds; - - public int getRemainingLeaseTimeInSeconds() { - return remainingLeaseTimeInSeconds; - } - - public void setRemainingLeaseTimeInSeconds(int remainingLeaseTimeInSeconds) { - this.remainingLeaseTimeInSeconds = remainingLeaseTimeInSeconds; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CommitBlobBlocksOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CommitBlobBlocksOptions.java deleted file mode 100644 index 7b664103c1fa..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CommitBlobBlocksOptions.java +++ /dev/null @@ -1,324 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.HashMap; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#commitBlobBlocks(String, String, BlockList, CommitBlobBlocksOptions) - * commitBlobBlocks} request. These options include an optional server timeout - * for the operation, the MIME content type and content encoding for the blob, - * the content language, the MD5 hash, a cache control value, blob metadata, a - * blob lease ID, and any access conditions for the operation. - */ -public class CommitBlobBlocksOptions extends BlobServiceOptions { - private String blobContentType; - private String blobContentEncoding; - private String blobContentLanguage; - private String blobContentMD5; - private String blobCacheControl; - private HashMap metadata = new HashMap(); - private String leaseId; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link CommitBlobBlocksOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CommitBlobBlocksOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - @Override - public CommitBlobBlocksOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the MIME content type value set in this - * {@link CommitBlobBlocksOptions} instance. - * - * @return A {@link String} containing the MIME content type value set, if - * any. - */ - public String getBlobContentType() { - return blobContentType; - } - - /** - * Sets the optional MIME content type for the blob content. This value will - * be returned to clients in the Content-Type header of the - * response when the blob data or blob properties are requested. If no - * content type is specified, the default content type is - * application/octet-stream. - *

- * Note that this value only affects calls made on methods where this - * {@link CommitBlobBlocksOptions} instance is passed as a parameter. - * - * @param blobContentType - * A {@link String} containing the MIME content type value to - * set. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions setBlobContentType(String blobContentType) { - this.blobContentType = blobContentType; - return this; - } - - /** - * Gets the HTTP content encoding value set in this - * {@link CommitBlobBlocksOptions} instance. - * - * @return A {@link String} containing the HTTP content encoding value set, - * if any. - */ - public String getBlobContentEncoding() { - return blobContentEncoding; - } - - /** - * Sets the optional HTTP content encoding value for the blob content. Use - * this value to specify any HTTP content encodings applied to the blob, - * passed as a x-ms-blob-content-encoding header value to the - * server. This value will be returned to clients in the headers of the - * response when the blob data or blob properties are requested. Pass an - * empty value to update a blob to the default value, which will cause no - * content encoding header to be returned with the blob. - *

- * Note that this value only affects calls made on methods where this - * {@link CommitBlobBlocksOptions} instance is passed as a parameter. - * - * @param blobContentEncoding - * A {@link String} containing the - * x-ms-blob-content-encoding header value to set. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions setBlobContentEncoding( - String blobContentEncoding) { - this.blobContentEncoding = blobContentEncoding; - return this; - } - - /** - * Gets the HTTP content language header value set in this - * {@link CommitBlobBlocksOptions} instance. - * - * @return A {@link String} containing the HTTP content language header - * value set, if any. - */ - public String getBlobContentLanguage() { - return blobContentLanguage; - } - - /** - * Sets the optional HTTP content language header value for the blob - * content. Use this value to specify the content language of the blob. This - * value will be returned to clients in the - * x-ms-blob-content-language header of the response when the - * blob data or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CommitBlobBlocksOptions} instance is passed as a parameter. - * - * @param blobContentLanguage - * A {@link String} containing the - * x-ms-blob-content-language header value to set. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions setBlobContentLanguage( - String blobContentLanguage) { - this.blobContentLanguage = blobContentLanguage; - return this; - } - - /** - * Gets the MD5 hash value for the blob content set in this - * {@link CommitBlobBlocksOptions} instance. - * - * @return A {@link String} containing the MD5 hash value for the blob - * content set, if any. - */ - public String getBlobContentMD5() { - return blobContentMD5; - } - - /** - * Sets the optional MD5 hash value for the blob content. This value will be - * returned to clients in the x-ms-blob-content-md5 header - * value of the response when the blob data or blob properties are - * requested. This hash is used to verify the integrity of the blob during - * transport. When this header is specified, the storage service checks the - * hash of the content that has arrived with the one that was sent. If the - * two hashes do not match, the operation will fail with error code 400 (Bad - * Request), which will cause a ServiceException to be thrown. - *

- * Note that this value only affects calls made on methods where this - * {@link CommitBlobBlocksOptions} instance is passed as a parameter. - * - * @param blobContentMD5 - * A {@link String} containing the MD5 hash value for the blob - * content to set. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions setBlobContentMD5(String blobContentMD5) { - this.blobContentMD5 = blobContentMD5; - return this; - } - - /** - * Gets the HTTP cache control value set in this - * {@link CommitBlobBlocksOptions} instance. - * - * @return A {@link String} containing the HTTP cache control value set, if - * any. - */ - public String getBlobCacheControl() { - return blobCacheControl; - } - - /** - * Sets the optional HTTP cache control value for the blob content. The Blob - * service stores this value but does not use or modify it. This value will - * be returned to clients in the headers of the response when the blob data - * or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CommitBlobBlocksOptions} instance is passed as a parameter. - * - * @param blobCacheControl - * A {@link String} containing the HTTP cache control value to - * set. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions setBlobCacheControl(String blobCacheControl) { - this.blobCacheControl = blobCacheControl; - return this; - } - - /** - * Gets the blob metadata collection set in this - * {@link CommitBlobBlocksOptions} instance. - * - * @return A {@link HashMap} of name-value pairs of {@link String} - * containing the blob metadata set, if any. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Sets the blob metadata collection to associate with the created blob. - * Metadata is a collection of name-value {@link String} pairs for client - * use and is opaque to the server. Metadata names must adhere to the naming - * rules for C# - * identifiers. - *

- * The metadata value only affects calls made on methods where this - * {@link CommitBlobBlocksOptions} instance is passed as a parameter. - * - * @param metadata - * A {@link HashMap} of name-value pairs of {@link String} - * containing the blob metadata to set. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions setMetadata(HashMap metadata) { - this.metadata = metadata; - return this; - } - - /** - * Adds a name-value pair to the blob metadata collection associated with - * this {@link CommitBlobBlocksOptions} instance. - * - * @param key - * A {@link String} containing the name portion of the name-value - * pair to add to the metadata collection. - * @param value - * A {@link String} containing the value portion of the - * name-value pair to add to the metadata collection. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions addMetadata(String key, String value) { - this.getMetadata().put(key, value); - return this; - } - - /** - * Gets the lease ID for the blob set in this - * {@link CommitBlobBlocksOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets a lease ID value to match when updating the blob. If the blob has a - * lease, this parameter must be set with the matching leaseId value for the - * commit block blobs operation to succeed. - *

- * The leaseId value only affects calls made on methods where this - * {@link CommitBlobBlocksOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the access conditions set in this {@link CommitBlobBlocksOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions for updating a blob. By default, the commit - * block blobs operation will set the container metadata unconditionally. - * Use this method to specify conditions on the ETag or last modified time - * value for performing the commit block blobs operation. - *

- * The accessCondition value only affects calls made on methods - * where this {@link CommitBlobBlocksOptions} instance is passed as a - * parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link CommitBlobBlocksOptions} instance. - */ - public CommitBlobBlocksOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/Constants.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/Constants.java deleted file mode 100644 index 54c99e0ef946..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/Constants.java +++ /dev/null @@ -1,694 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -/** - * Defines constants for use with blob operations, HTTP headers, and query - * strings. - */ -public final class Constants { - /** - * Defines constants for use Analytics requests. - */ - public static class AnalyticsConstants { - /** - * The XML element for the Analytics RetentionPolicy Days. - */ - public static final String DAYS_ELEMENT = "Days"; - - /** - * The XML element for the Default Service Version. - */ - public static final String DEFAULT_SERVICE_VERSION = "DefaultServiceVersion"; - - /** - * The XML element for the Analytics Logging Delete type. - */ - public static final String DELETE_ELEMENT = "Delete"; - - /** - * The XML element for the Analytics RetentionPolicy Enabled. - */ - public static final String ENABLED_ELEMENT = "Enabled"; - - /** - * The XML element for the Analytics Metrics IncludeAPIs. - */ - public static final String INCLUDE_APIS_ELEMENT = "IncludeAPIs"; - - /** - * The XML element for the Analytics Logging - */ - public static final String LOGGING_ELEMENT = "Logging"; - - /** - * The XML element for the Analytics Metrics - */ - public static final String METRICS_ELEMENT = "Metrics"; - - /** - * The XML element for the Analytics Logging Read type. - */ - public static final String READ_ELEMENT = "Read"; - - /** - * The XML element for the Analytics RetentionPolicy. - */ - public static final String RETENTION_POLICY_ELEMENT = "RetentionPolicy"; - - /** - * The XML element for the StorageServiceProperties - */ - public static final String STORAGE_SERVICE_PROPERTIES_ELEMENT = "StorageServiceProperties"; - - /** - * The XML element for the Analytics Version - */ - public static final String VERSION_ELEMENT = "Version"; - - /** - * The XML element for the Analytics Logging Write type. - */ - public static final String WRITE_ELEMENT = "Write"; - } - - /** - * Defines constants for use with HTTP headers. - */ - public static class HeaderConstants { - /** - * The Accept header. - */ - public static final String ACCEPT = "Accept"; - - /** - * The Accept header. - */ - public static final String ACCEPT_CHARSET = "Accept-Charset"; - - /** - * The Authorization header. - */ - public static final String AUTHORIZATION = "Authorization"; - - /** - * The CacheControl header. - */ - public static final String CACHE_CONTROL = "Cache-Control"; - - /** - * The header that specifies blob caching control. - */ - public static final String CACHE_CONTROL_HEADER = PREFIX_FOR_STORAGE_HEADER - + "blob-cache-control"; - - /** - * The Comp value. - */ - public static final String COMP = "comp"; - - /** - * The ContentEncoding header. - */ - public static final String CONTENT_ENCODING = "Content-Encoding"; - - /** - * The ContentLangauge header. - */ - public static final String CONTENT_LANGUAGE = "Content-Language"; - - /** - * The ContentLength header. - */ - public static final String CONTENT_LENGTH = "Content-Length"; - - /** - * The ContentMD5 header. - */ - public static final String CONTENT_MD5 = "Content-MD5"; - - /** - * The ContentRange header. - */ - public static final String CONTENT_RANGE = "Cache-Range"; - - /** - * The ContentType header. - */ - public static final String CONTENT_TYPE = "Content-Type"; - - /** - * The header for copy source. - */ - public static final String COPY_SOURCE_HEADER = PREFIX_FOR_STORAGE_HEADER - + "copy-source"; - - /** - * The header that specifies the date. - */ - public static final String DATE = PREFIX_FOR_STORAGE_HEADER + "date"; - - /** - * The header to delete snapshots. - */ - public static final String DELETE_SNAPSHOT_HEADER = PREFIX_FOR_STORAGE_HEADER - + "delete-snapshots"; - - /** - * The ETag header. - */ - public static final String ETAG = "ETag"; - - /** - * Buffer width used to copy data to output streams. - */ - public static final int HTTP_UNUSED_306 = 306; - - /** - * The IfMatch header. - */ - public static final String IF_MATCH = "If-Match"; - - /** - * The IfModifiedSince header. - */ - public static final String IF_MODIFIED_SINCE = "If-Modified-Since"; - - /** - * The IfNoneMatch header. - */ - public static final String IF_NONE_MATCH = "If-None-Match"; - - /** - * The IfUnmodifiedSince header. - */ - public static final String IF_UNMODIFIED_SINCE = "If-Unmodified-Since"; - - /** - * The header that specifies lease ID. - */ - public static final String LEASE_ID_HEADER = PREFIX_FOR_STORAGE_HEADER - + "lease-id"; - - /** - * The header that specifies lease status. - */ - public static final String LEASE_STATUS = PREFIX_FOR_STORAGE_HEADER - + "lease-status"; - - /** - * The header that specifies lease state. - */ - public static final String LEASE_STATE = PREFIX_FOR_STORAGE_HEADER - + "lease-state"; - - /** - * The header that specifies lease duration. - */ - public static final String LEASE_DURATION = PREFIX_FOR_STORAGE_HEADER - + "lease-duration"; - - /** - * The header that specifies copy status. - */ - public static final String COPY_STATUS = PREFIX_FOR_STORAGE_HEADER - + "copy-status"; - - /** - * The header that specifies copy progress. - */ - public static final String COPY_PROGRESS = PREFIX_FOR_STORAGE_HEADER - + "copy-progress"; - - /** - * The header that specifies copy status description. - */ - public static final String COPY_STATUS_DESCRIPTION = PREFIX_FOR_STORAGE_HEADER - + "copy-status-description"; - - /** - * The header that specifies copy id. - */ - public static final String COPY_ID = PREFIX_FOR_STORAGE_HEADER - + "copy-id"; - - /** - * The header that specifies copy source. - */ - public static final String COPY_SOURCE = PREFIX_FOR_STORAGE_HEADER - + "copy-source"; - - /** - * The header that specifies copy completion time. - */ - public static final String COPY_COMPLETION_TIME = PREFIX_FOR_STORAGE_HEADER - + "copy-completion-time"; - - /** - * The header prefix for metadata. - */ - public static final String PREFIX_FOR_STORAGE_METADATA = "x-ms-meta-"; - - /** - * The header prefix for properties. - */ - public static final String PREFIX_FOR_STORAGE_PROPERTIES = "x-ms-prop-"; - - /** - * The Range header. - */ - public static final String RANGE = "Range"; - - /** - * The header that specifies if the request will populate the ContentMD5 - * header for range gets. - */ - public static final String RANGE_GET_CONTENT_MD5 = PREFIX_FOR_STORAGE_HEADER - + "range-get-content-md5"; - - /** - * The format string for specifying ranges. - */ - public static final String RANGE_HEADER_FORMAT = "bytes=%d-%d"; - - /** - * The header that indicates the request ID. - */ - public static final String REQUEST_ID_HEADER = PREFIX_FOR_STORAGE_HEADER - + "request-id"; - - /** - * The header that indicates the client request ID. - */ - public static final String CLIENT_REQUEST_ID_HEADER = PREFIX_FOR_STORAGE_HEADER - + "client-request-id"; - - /** - * The header for the If-Match condition. - */ - public static final String SOURCE_IF_MATCH_HEADER = PREFIX_FOR_STORAGE_HEADER - + "source-if-match"; - - /** - * The header for the If-Modified-Since condition. - */ - public static final String SOURCE_IF_MODIFIED_SINCE_HEADER = PREFIX_FOR_STORAGE_HEADER - + "source-if-modified-since"; - - /** - * The header for the If-None-Match condition. - */ - public static final String SOURCE_IF_NONE_MATCH_HEADER = PREFIX_FOR_STORAGE_HEADER - + "source-if-none-match"; - - /** - * The header for the If-Unmodified-Since condition. - */ - public static final String SOURCE_IF_UNMODIFIED_SINCE_HEADER = PREFIX_FOR_STORAGE_HEADER - + "source-if-unmodified-since"; - - /** - * The header for the source lease id. - */ - public static final String SOURCE_LEASE_ID_HEADER = PREFIX_FOR_STORAGE_HEADER - + "source-lease-id"; - - /** - * The header for data ranges. - */ - public static final String STORAGE_RANGE_HEADER = PREFIX_FOR_STORAGE_HEADER - + "range"; - - /** - * The header for storage version. - */ - public static final String STORAGE_VERSION_HEADER = PREFIX_FOR_STORAGE_HEADER - + "version"; - - /** - * The current storage version header value. - */ - public static final String TARGET_STORAGE_VERSION = "2012-02-12"; - - /** - * The UserAgent header. - */ - public static final String USER_AGENT = "User-Agent"; - - /** - * Specifies the value to use for UserAgent header. - */ - public static final String USER_AGENT_PREFIX = "WA-Storage"; - - /** - * Specifies the value to use for UserAgent header. - */ - public static final String USER_AGENT_VERSION = "Client v0.1.3.2"; - } - - /** - * Defines constants for use with query strings. - */ - public static class QueryConstants { - /** - * The query component for the SAS signature. - */ - public static final String SIGNATURE = "sig"; - - /** - * The query component for the signed SAS expiry time. - */ - public static final String SIGNED_EXPIRY = "se"; - - /** - * The query component for the signed SAS identifier. - */ - public static final String SIGNED_IDENTIFIER = "si"; - - /** - * The query component for the signed SAS permissions. - */ - public static final String SIGNED_PERMISSIONS = "sp"; - - /** - * The query component for the signed SAS resource. - */ - public static final String SIGNED_RESOURCE = "sr"; - - /** - * The query component for the signed SAS start time. - */ - public static final String SIGNED_START = "st"; - - /** - * The query component for the SAS start partition key. - */ - public static final String START_PARTITION_KEY = "spk"; - - /** - * The query component for the SAS start row key. - */ - public static final String START_ROW_KEY = "srk"; - - /** - * The query component for the SAS end partition key. - */ - public static final String END_PARTITION_KEY = "epk"; - - /** - * The query component for the SAS end row key. - */ - public static final String END_ROW_KEY = "erk"; - - /** - * The query component for the SAS table name. - */ - public static final String SAS_TABLE_NAME = "tn"; - - /** - * The query component for the signing SAS key. - */ - public static final String SIGNED_KEY = "sk"; - - /** - * The query component for the signed SAS version. - */ - public static final String SIGNED_VERSION = "sv"; - - /** - * The query component for snapshot time. - */ - public static final String SNAPSHOT = "snapshot"; - } - - /** - * The master Windows Azure Storage header prefix. - */ - public static final String PREFIX_FOR_STORAGE_HEADER = "x-ms-"; - - /** - * Constant representing a kilobyte (Non-SI version). - */ - public static final int KB = 1024; - - /** - * Constant representing a megabyte (Non-SI version). - */ - public static final int MB = 1024 * KB; - - /** - * Constant representing a gigabyte (Non-SI version). - */ - public static final int GB = 1024 * MB; - - /** - * Buffer width used to copy data to output streams. - */ - public static final int BUFFER_COPY_LENGTH = 8 * KB; - - /** - * Default client side timeout, in milliseconds, for all service clients. - */ - public static final int DEFAULT_TIMEOUT_IN_MS = 90 * 1000; - - /** - * XML element for delimiters. - */ - public static final String DELIMITER_ELEMENT = "Delimiter"; - - /** - * An empty String to use for comparison. - */ - public static final String EMPTY_STRING = ""; - - /** - * XML element for page range end elements. - */ - public static final String END_ELEMENT = "End"; - - /** - * XML element for error codes. - */ - public static final String ERROR_CODE = "Code"; - - /** - * XML element for exception details. - */ - public static final String ERROR_EXCEPTION = "ExceptionDetails"; - - /** - * XML element for exception messages. - */ - public static final String ERROR_EXCEPTION_MESSAGE = "ExceptionMessage"; - - /** - * XML element for stack traces. - */ - public static final String ERROR_EXCEPTION_STACK_TRACE = "StackTrace"; - - /** - * XML element for error messages. - */ - public static final String ERROR_MESSAGE = "Message"; - - /** - * XML root element for errors. - */ - public static final String ERROR_ROOT_ELEMENT = "Error"; - - /** - * XML element for the ETag. - */ - public static final String ETAG_ELEMENT = "Etag"; - - /** - * Constant for False. - */ - public static final String FALSE = "false"; - - /** - * Specifies HTTP. - */ - public static final String HTTP = "http"; - - /** - * Specifies HTTPS. - */ - public static final String HTTPS = "https"; - - /** - * XML attribute for IDs. - */ - public static final String ID = "Id"; - - /** - * XML element for an invalid metadata name. - */ - public static final String INVALID_METADATA_NAME = "x-ms-invalid-name"; - - /** - * XML element for the last modified date. - */ - public static final String LAST_MODIFIED_ELEMENT = "Last-Modified"; - - /** - * XML element for the lease status. - */ - public static final String LEASE_STATUS_ELEMENT = "LeaseStatus"; - - /** - * XML element for the lease state. - */ - public static final String LEASE_STATE_ELEMENT = "LeaseState"; - - /** - * XML element for the lease duration. - */ - public static final String LEASE_DURATION_ELEMENT = "LeaseDuration"; - - /** - * XML element for the copy id. - */ - public static final String COPY_ID_ELEMENT = "CopyId"; - - /** - * XML element for the copy status. - */ - public static final String COPY_STATUS_ELEMENT = "CopyStatus"; - - /** - * XML element for the copy source . - */ - public static final String COPY_SOURCE_ELEMENT = "CopySource"; - - /** - * XML element for the copy progress. - */ - public static final String COPY_PROGRESS_ELEMENT = "CopyProgress"; - - /** - * XML element for the copy completion time. - */ - public static final String COPY_COMPLETION_TIME_ELEMENT = "CopyCompletionTime"; - - /** - * XML element for the copy status description. - */ - public static final String COPY_STATUS_DESCRIPTION_ELEMENT = "CopyStatusDescription"; - - /** - * Constant signaling the resource is locked. - */ - public static final String LOCKED_VALUE = "Locked"; - - /** - * XML element for a marker. - */ - public static final String MARKER_ELEMENT = "Marker"; - - /** - * XML element for maximum results. - */ - public static final String MAX_RESULTS_ELEMENT = "MaxResults"; - - /** - * Number of default concurrent requests for parallel operation. - */ - public static final int MAXIMUM_SEGMENTED_RESULTS = 5000; - - /** - * The maximum size, in bytes, of a given stream mark operation. - */ - // Note if BlobConstants.MAX_SINGLE_UPLOAD_BLOB_SIZE_IN_BYTES is updated - // then this needs to be as well. - public static final int MAX_MARK_LENGTH = 64 * MB; - - /** - * XML element for the metadata. - */ - public static final String METADATA_ELEMENT = "Metadata"; - - /** - * XML element for names. - */ - public static final String NAME_ELEMENT = "Name"; - - /** - * XML element for the next marker. - */ - public static final String NEXT_MARKER_ELEMENT = "NextMarker"; - - /** - * XML element for a prefix. - */ - public static final String PREFIX_ELEMENT = "Prefix"; - - /** - * Constant for True. - */ - public static final String TRUE = "true"; - - /** - * Constant signaling the resource is unlocked. - */ - public static final String UNLOCKED_VALUE = "Unlocked"; - - /** - * XML element for the URL. - */ - public static final String URL_ELEMENT = "Url"; - - /** - * XML element for a signed identifier. - */ - public static final String SIGNED_IDENTIFIER_ELEMENT = "SignedIdentifier"; - - /** - * XML element for signed identifiers. - */ - public static final String SIGNED_IDENTIFIERS_ELEMENT = "SignedIdentifiers"; - - /** - * XML element for an access policy. - */ - public static final String ACCESS_POLICY = "AccessPolicy"; - - /** - * Maximum number of shared access policy identifiers supported by server. - */ - public static final int MAX_SHARED_ACCESS_POLICY_IDENTIFIERS = 5; - - /** - * XML element for the start time of an access policy. - */ - public static final String START = "Start"; - - /** - * XML element for the end time of an access policy. - */ - public static final String EXPIRY = "Expiry"; - - /** - * XML element for the permission of an access policy. - */ - public static final String PERMISSION = "Permission"; - - /** - * Private Default Ctor - */ - private Constants() { - // No op - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ContainerACL.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ContainerACL.java deleted file mode 100644 index 5ea90a0abff7..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ContainerACL.java +++ /dev/null @@ -1,484 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.services.blob.implementation.ContainerACLDateAdapter; - -/** - * Represents the public access properties and the container-level access - * policies of a container in the Blob storage service. This is returned by - * calls to implementations of {@link com.microsoft.windowsazure.services.blob.BlobContract#getContainerACL(String)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getContainerACL(String, BlobServiceOptions)}, and passed - * as a parameter to calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)} - * . - *

- * See the Get - * Container ACL and the Set - * Container ACL documentation on MSDN for details of the underlying Blob - * Service REST API operations. - */ -public class ContainerACL { - private String etag; - private Date lastModified; - private PublicAccessType publicAccess; - private List signedIdentifiers = new ArrayList(); - - /** - * Gets the Etag value associated with this - * {@link ContainerACL} instance. This is the value returned for a container - * by a Blob service REST API Get Container ACL operation, or the value to - * set on a container with a Set Container ACL operation. - * - * @return A {@link String} containing the Etag value - * associated with this {@link ContainerACL} instance. - */ - public String getEtag() { - return etag; - } - - /** - * Sets the Etag value to associate with this - * {@link ContainerACL} instance. - *

- * This value is only set on a container when this {@link ContainerACL} - * instance is passed as a parameter to a call to an implementation of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL)} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)}. - * - * @param etag - * A {@link String} containing the Etag value to - * associate with this {@link ContainerACL} instance. - * - * @return A reference to this {@link ContainerACL} instance. - */ - public ContainerACL setEtag(String etag) { - this.etag = etag; - return this; - } - - /** - * Gets the last modified time associated with this {@link ContainerACL} - * instance. This is the value returned for a container by a Blob service - * REST API Get Container ACL operation, or the value to set on a container - * with a Set Container ACL operation. - * - * @return A {@link Date} containing the last modified time associated with - * this {@link ContainerACL} instance. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Sets the last modified time to associate with this {@link ContainerACL} - * instance. - *

- * This value is only set on a container when this {@link ContainerACL} - * instance is passed as a parameter to a call to an implementation of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL)} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)}. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time to - * associate with this {@link ContainerACL} instance. - * @return A reference to this {@link ContainerACL} instance. - */ - public ContainerACL setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * Gets the public access level associated with this {@link ContainerACL} - * instance. This is the value returned for a container by a Blob service - * REST API Get Container ACL operation, or the value to set on a container - * with a Set Container ACL operation. - * - * @return A {@link PublicAccessType} value representing the public access - * level associated with this {@link ContainerACL} instance. - */ - public PublicAccessType getPublicAccess() { - return publicAccess; - } - - /** - * Sets the public access level to associate with this {@link ContainerACL} - * instance. - *

- * This value is only set on a container when this {@link ContainerACL} - * instance is passed as a parameter to a call to an implementation of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL)} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)}. - * - * @param publicAccess - * A {@link PublicAccessType} value representing the public - * access level to associate with this {@link ContainerACL} - * instance. - * @return A reference to this {@link ContainerACL} instance. - */ - public ContainerACL setPublicAccess(PublicAccessType publicAccess) { - this.publicAccess = publicAccess; - return this; - } - - /** - * Gets the list of container-level access policies associated with this - * {@link ContainerACL} instance. This is the value returned for a container - * by a Blob service REST API Get Container ACL operation, or the value to - * set on a container with a Set Container ACL operation. - * - * @return A {@link List} of {@link SignedIdentifier} instances containing - * up to five container-level access policies associated with this - * {@link ContainerACL} instance. - */ - public List getSignedIdentifiers() { - return signedIdentifiers; - } - - /** - * Sets the list of container-level access policies to associate with this - * {@link ContainerACL} instance. - *

- * This value is only set on a container when this {@link ContainerACL} - * instance is passed as a parameter to a call to an implementation of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL)} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)}. - * - * @param signedIdentifiers - * A {@link List} of {@link SignedIdentifier} instances - * containing up to five container-level access policies to - * associate with this {@link ContainerACL} instance. - * @return A reference to this {@link ContainerACL} instance. - */ - public ContainerACL setSignedIdentifiers( - List signedIdentifiers) { - this.signedIdentifiers = signedIdentifiers; - return this; - } - - /** - * Adds a container-level access policy to the list associated with this - * {@link ContainerACL} instance. A container may have up to five - * container-level access policies. - *

- * Use the id parameter to specify a name for the access policy. - * The name may be up to 64 characters in length and must be unique within - * the container. - *

- * Use the start parameter to specify the start time for valid - * access to a resource using the access policy. If this value is - * null, the start time for any resource request using the - * access policy is assumed to be the time when the Blob service receives - * the request. - *

- * Use the expiry parameter to specify the expiration time for - * valid access to a resource using the access policy. If this value is - * null, the expiry time must be included in the Shared Access - * Signature for any resource request using the access policy. - *

- * Use the permission parameter to specify the operations that can - * be performed on a blob that is accessed with the access policy. Supported - * permissions include read (r), write (w), delete (d), and list (l). - * Permissions may be grouped so as to allow multiple operations to be - * performed with the access policy. For example, to grant all permissions - * to a resource, specify "rwdl" for the parameter. To grant only read/write - * permissions, specify "rw" for the parameter. - *

- * This value is only set on a container when this {@link ContainerACL} - * instance is passed as a parameter to a call to an implementation of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL)} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerACL(String, ContainerACL, BlobServiceOptions)}. - * - * @param id - * A {@link String} containing the name for the access policy. - * @param start - * A {@link Date} representing the start time for the access - * policy. If this value is null, any Shared Access - * Signature that refers to this policy may specify the start - * time. - * @param expiry - * A {@link Date} representing the expiration time for the access - * policy. If this value is null, any Shared Access - * Signature that refers to this policy must specify the expiry - * value. Resource access using a Shared Access Signature that - * refers to this policy after this time is not valid. - * @param permission - * A {@link String} containing the permissions specified for the - * access policy. - */ - public void addSignedIdentifier(String id, Date start, Date expiry, - String permission) { - AccessPolicy accessPolicy = new AccessPolicy(); - accessPolicy.setStart(start); - accessPolicy.setExpiry(expiry); - accessPolicy.setPermission(permission); - - SignedIdentifier signedIdentifier = new SignedIdentifier(); - signedIdentifier.setId(id); - signedIdentifier.setAccessPolicy(accessPolicy); - - this.getSignedIdentifiers().add(signedIdentifier); - } - - /** - * A static inner class representing a collection of container-level access - * policies. A container may have up to five container-level access - * policies, which may be associated with any number of Shared Access - * Signatures. - */ - @XmlRootElement(name = "SignedIdentifiers") - public static class SignedIdentifiers { - private List signedIdentifiers = new ArrayList(); - - /** - * Gets the list of container-level access policies associated with this - * {@link SignedIdentifiers} instance. - * - * @return A {@link List} of {@link SignedIdentifier} instances - * containing container-level access policies. - */ - @XmlElement(name = "SignedIdentifier") - public List getSignedIdentifiers() { - return signedIdentifiers; - } - - /** - * Sets the list of container-level access policies associated with this - * {@link SignedIdentifiers} instance. - * - * @param signedIdentifiers - * A {@link List} of {@link SignedIdentifier} instances - * containing container-level access policies. - */ - public void setSignedIdentifiers( - List signedIdentifiers) { - this.signedIdentifiers = signedIdentifiers; - } - } - - /** - * A static inner class representing a container-level access policy with a - * unique name. - */ - public static class SignedIdentifier { - private String id; - private AccessPolicy accessPolicy; - - /** - * Gets the name of the container-level access policy. The name may be - * up to 64 characters in length and must be unique within the - * container. - * - * @return A {@link String} containing the name for the access policy. - */ - @XmlElement(name = "Id") - public String getId() { - return id; - } - - /** - * Sets the name of the container-level access policy. The name may be - * up to 64 characters in length and must be unique within the - * container. - * - * @param id - * A {@link String} containing the name for the access - * policy. - * @return A reference to this {@link SignedIdentifier} instance. - */ - public SignedIdentifier setId(String id) { - this.id = id; - return this; - } - - /** - * Gets an {@link AccessPolicy} reference containing the start time, - * expiration time, and permissions associated with the container-level - * access policy. - * - * @return An {@link AccessPolicy} reference containing the start time, - * expiration time, and permissions associated with the access - * policy. - */ - @XmlElement(name = "AccessPolicy") - public AccessPolicy getAccessPolicy() { - return accessPolicy; - } - - /** - * Sets an {@link AccessPolicy} reference containing the start time, - * expiration time, and permissions to associate with the - * container-level access policy. - * - * @param accessPolicy - * An {@link AccessPolicy} reference containing the start - * time, expiration time, and permissions to associate with - * the access policy. - * @return A reference to this {@link SignedIdentifier} instance. - */ - public SignedIdentifier setAccessPolicy(AccessPolicy accessPolicy) { - this.accessPolicy = accessPolicy; - return this; - } - } - - /** - * An inner class representing the start time, expiration time, and - * permissions associated with an access policy. - */ - public static class AccessPolicy { - private Date start; - private Date expiry; - private String permission; - - /** - * Gets the start time for valid access to a resource using the access - * policy. If this value is null, the start time for any - * resource request using the access policy is assumed to be the time - * when the Blob service receives the request. - * - * @return A {@link Date} representing the start time for the access - * policy, or null if none is specified. - */ - @XmlElement(name = "Start") - @XmlJavaTypeAdapter(ContainerACLDateAdapter.class) - public Date getStart() { - return start; - } - - /** - * Sets the start time for valid access to a resource using the access - * policy. If this value is null, the start time for any - * resource request using the access policy is assumed to be the time - * when the Blob service receives the request. - * - * @param start - * A {@link Date} representing the start time for the access - * policy, or null to leave the time - * unspecified. - * @return A reference to this {@link AccessPolicy} instance. - */ - public AccessPolicy setStart(Date start) { - this.start = start; - return this; - } - - /** - * Gets the expiration time for valid access to a resource using the - * access policy. If this value is null, any Shared Access - * Signature that refers to this access policy must specify the expiry - * value. - * - * @return A {@link Date} representing the expiration time for the - * access policy, or null if none is specified. - */ - @XmlElement(name = "Expiry") - @XmlJavaTypeAdapter(ContainerACLDateAdapter.class) - public Date getExpiry() { - return expiry; - } - - /** - * Sets the expiration time for valid access to a resource using the - * access policy. If this value is null, any Shared Access - * Signature that refers to this access policy must specify the expiry - * value. - * - * @param expiry - * A {@link Date} representing the expiration time for the - * access policy, or null to leave the time - * unspecified. - * @return A reference to this {@link AccessPolicy} instance. - */ - public AccessPolicy setExpiry(Date expiry) { - this.expiry = expiry; - return this; - } - - /** - * Gets the permissions for operations on resources specified by the - * access policy. Supported permissions include read (r), write (w), - * delete (d), and list (l). Permissions may be grouped so as to allow - * multiple operations to be performed with the access policy. For - * example, if all permissions to a resource are granted, the method - * returns "rwdl" as the result. If only read/write permissions are - * granted, the method returns "rw" as the result. - * - * @return A {@link String} containing the permissions specified for the - * access policy. - */ - @XmlElement(name = "Permission") - public String getPermission() { - return permission; - } - - /** - * Sets the permissions for operations on resources specified by the - * access policy. Supported permissions include read (r), write (w), - * delete (d), and list (l). Permissions may be grouped so as to allow - * multiple operations to be performed with the access policy. For - * example, to grant all permissions to a resource, specify "rwdl" for - * the parameter. To grant only read/write permissions, specify "rw" for - * the parameter. - * - * @param permission - * A {@link String} containing the permissions specified for - * the access policy. - * @return A reference to this {@link AccessPolicy} instance. - */ - public AccessPolicy setPermission(String permission) { - this.permission = permission; - return this; - } - } - - /** - * An enumeration type for the public access levels that can be set on a - * blob container. - */ - public static enum PublicAccessType { - /** - * Access to this container and its blobs is restricted to calls made - * with the storage account private key. - */ - NONE, - /** - * Anonymous public read-only access is allowed for individual blobs - * within the container, but it is not possible to enumerate the blobs - * within the container or to enumerate the containers in the storage - * account. - */ - BLOBS_ONLY, - /** - * Anonymous public read-only access is allowed for individual blobs - * within the container, and the blobs within the container can be - * enumerated, but it is not possible to enumerate the containers in the - * storage account. - */ - CONTAINER_AND_BLOBS, - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobOptions.java deleted file mode 100644 index 5c99629c9303..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobOptions.java +++ /dev/null @@ -1,254 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.HashMap; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#copyBlob(String, String, String, String, CopyBlobOptions) - * copyBlob} request. These options include an optional server timeout for the - * operation, an optional source snapshot timestamp value to copy from a - * particular snapshot of the source blob, blob metadata to set on the - * destination blob, a blob lease ID to overwrite a blob with an active lease, a - * source lease ID to copy from a source blob with an active lease, any access - * conditions to satisfy on the destination, and any access conditions to - * satisfy on the source. - */ -public class CopyBlobOptions extends BlobServiceOptions { - private String leaseId; - private AccessConditionHeader accessCondition; - private String sourceLeaseId; - private String sourceSnapshot; - private HashMap metadata = new HashMap(); - private AccessConditionHeader sourceAccessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link CopyBlobOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CopyBlobOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CopyBlobOptions} instance. - */ - @Override - public CopyBlobOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the source snapshot timestamp value set in this - * {@link CopyBlobOptions} instance. - * - * @return A {@link String} containing the snapshot timestamp value of the - * source blob snapshot to list. - */ - public String getSourceSnapshot() { - return sourceSnapshot; - } - - /** - * Sets the snapshot timestamp value used to identify the particular - * snapshot of the source blob to copy. The snapshot timestamp value is an - * opaque value returned by the server to identify a snapshot. When this - * option is set, the properties, metadata, and content of the snapshot are - * copied to the destination. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobBlocksOptions} instance is passed as a parameter. - * - * @param sourceSnapshot - * A {@link String} containing the snapshot timestamp value of - * the source blob snapshot to list. - * @return A reference to this {@link ListBlobBlocksOptions} instance. - */ - public CopyBlobOptions setSourceSnapshot(String sourceSnapshot) { - this.sourceSnapshot = sourceSnapshot; - return this; - } - - /** - * Gets the blob metadata collection set in this {@link CopyBlobOptions} - * instance. - * - * @return A {@link HashMap} of name-value pairs of {@link String} - * containing the blob metadata set, if any. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Sets the blob metadata collection to associate with the destination blob. - * Metadata is a collection of name-value {@link String} pairs for client - * use and is opaque to the server. Metadata names must adhere to the naming - * rules for C# - * identifiers. - *

- * Note that if any metadata is set with this option, no source blob - * metadata will be copied to the destination blob. - *

- * The metadata value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param metadata - * A {@link HashMap} of name-value pairs of {@link String} - * containing the blob metadata to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CopyBlobOptions setMetadata(HashMap metadata) { - this.metadata = metadata; - return this; - } - - /** - * Adds a name-value pair to the blob metadata collection associated with - * this {@link CopyBlobOptions} instance. - *

- * Note that if any metadata is set with this option, no source blob - * metadata will be copied to the destination blob. - * - * @param key - * A {@link String} containing the name portion of the name-value - * pair to add to the metadata collection. - * @param value - * A {@link String} containing the value portion of the - * name-value pair to add to the metadata collection. - * @return A reference to this {@link CopyBlobOptions} instance. - */ - public CopyBlobOptions addMetadata(String key, String value) { - this.getMetadata().put(key, value); - return this; - } - - /** - * Gets the lease ID to match for the destination blob set in this - * {@link CopyBlobOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets a lease ID value to match on the destination blob. If set, there - * must be an active lease with a matching lease ID set on the destination - * blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link CopyBlobOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link CopyBlobOptions} instance. - */ - public CopyBlobOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the lease ID to match for the source blob set in this - * {@link CopyBlobOptions} instance. - * - * @return A {@link String} containing the source blob lease ID set, if any. - */ - public String getSourceLeaseId() { - return sourceLeaseId; - } - - /** - * Sets a lease ID value to match on the source blob. If set, there must be - * an active lease with a matching lease ID set on the source blob for the - * operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link CopyBlobOptions} instance is passed as a parameter. - * - * @param sourceLeaseId - * A {@link String} containing the source blob lease ID to set. - * @return A reference to this {@link CopyBlobOptions} instance. - */ - public CopyBlobOptions setSourceLeaseId(String sourceLeaseId) { - this.sourceLeaseId = sourceLeaseId; - return this; - } - - /** - * Gets the access conditions on the destination blob set in this - * {@link CopyBlobOptions} instance. - * - * @return An {@link AccessCondition} containing the destination blob access - * conditions set, if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets optional access conditions for the destination blob. The operation - * will return an error if the access conditions are not met. - *

- * Note that this value only affects calls made on methods where this - * {@link CopyBlobOptions} instance is passed as a parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the destination blob - * access conditions to set. - * @return A reference to this {@link CopyBlobOptions} instance. - */ - public CopyBlobOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } - - /** - * Gets the access conditions on the source blob set in this - * {@link CopyBlobOptions} instance. - * - * @return An {@link AccessCondition} containing the source blob access - * conditions set, if any. - */ - public AccessConditionHeader getSourceAccessCondition() { - return sourceAccessCondition; - } - - /** - * Sets optional access conditions for the source blob. The operation will - * return an error if the access conditions are not met. - *

- * Note that this value only affects calls made on methods where this - * {@link CopyBlobOptions} instance is passed as a parameter. - * - * @param sourceAccessCondition - * An {@link AccessCondition} containing the source blob access - * conditions to set. - * @return A reference to this {@link CopyBlobOptions} instance. - */ - public CopyBlobOptions setSourceAccessCondition( - AccessConditionHeader sourceAccessCondition) { - this.sourceAccessCondition = sourceAccessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobResult.java deleted file mode 100644 index edf0bb952033..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CopyBlobResult.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; - -/** - * A wrapper class for the response returned from a Blob Service REST API Copy - * Blob operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#copyBlob(String, String, String, String, CopyBlobOptions)} - * . - *

- * See the Copy Blob documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class CopyBlobResult { - private String etag; - private Date lastModified; - - /** - * Gets the ETag of the blob. - * - * @return A {@link String} containing the server-assigned ETag value for - * the copy blob. - */ - public String getEtag() { - return etag; - } - - /** - * Sets the ETag of the blob from the ETag header returned in - * the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the last modified time of the blob. - *

- * - * @return A {@link java.util.Date} containing the last modified time of the - * blob. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Sets the last modified time of the blob from the - * Last-Modified header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the blob. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobBlockOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobBlockOptions.java deleted file mode 100644 index 64f93bab2f3e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobBlockOptions.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobBlock(String, String, String, java.io.InputStream, CreateBlobBlockOptions) - * createBlobBlock} request. These options include an optional server timeout - * for the operation, the lease ID if the blob has an active lease, and the MD5 - * hash value for the block content. - */ -public class CreateBlobBlockOptions extends BlobServiceOptions { - private String leaseId; - private String contentMD5; - - /** - * Sets the optional server request timeout value associated with this - * {@link CreateBlobBlockOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CreateBlobBlockOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CreateBlobBlockOptions} instance. - */ - @Override - public CreateBlobBlockOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link CreateBlobBlockOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets a lease ID value to match when updating the blob. This value must - * match the lease ID set on a leased blob for an update to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobBlockOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link CreateBlobBlockOptions} instance. - */ - public CreateBlobBlockOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the MD5 hash value for the block content set in this - * {@link CreateBlobBlockOptions} instance. - * - * @return A {@link String} containing the MD5 hash value for the block - * content set, if any. - */ - public String getContentMD5() { - return contentMD5; - } - - /** - * Sets the optional MD5 hash value for the block content. This hash is used - * to verify the integrity of the blob during transport. When this value is - * specified, the storage service checks the hash of the content that has - * arrived with the one that was sent. If the two hashes do not match, the - * operation will fail with error code 400 (Bad Request), which will cause a - * ServiceException to be thrown. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobBlockOptions} instance is passed as a parameter. - * - * @param contentMD5 - * A {@link String} containing the MD5 hash value for the block - * content to set. - * @return A reference to this {@link CreateBlobBlockOptions} instance. - */ - public CreateBlobBlockOptions setContentMD5(String contentMD5) { - this.contentMD5 = contentMD5; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobOptions.java deleted file mode 100644 index c5e0c0ca8ebb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobOptions.java +++ /dev/null @@ -1,497 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.HashMap; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createPageBlob(String, String, long, CreateBlobOptions) - * createPageBlob} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlockBlob(String, String, java.io.InputStream, CreateBlobOptions) - * createBlockBlob} request. These options include an optional server timeout - * for the operation, the MIME content type and content encoding for the blob, - * the content language, the MD5 hash, a cache control value, blob metadata, a - * blob lease ID, a sequence number, and access conditions. - */ -public class CreateBlobOptions extends BlobServiceOptions { - private String contentType; - private String contentEncoding; - private String contentLanguage; - private String contentMD5; - private String cacheControl; - private String blobContentType; - private String blobContentEncoding; - private String blobContentLanguage; - private String blobContentMD5; - private String blobCacheControl; - private HashMap metadata = new HashMap(); - private String leaseId; - private Long sequenceNumber; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link CreateBlobOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - @Override - public CreateBlobOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the Content-Type header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the Content-Type header - * value set, if any. - */ - public String getContentType() { - return contentType; - } - - /** - * Sets the optional Content-Type header value for the blob - * content. This value will be returned to clients in the headers of the - * response when the blob data or blob properties are requested. If no - * content type is specified, the default content type is - * application/octet-stream. - * - * @param contentType - * A {@link String} containing the Content-Type - * header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setContentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Gets the Content-Encoding header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the Content-Encoding - * header value set, if any. - */ - public String getContentEncoding() { - return contentEncoding; - } - - /** - * Sets the optional Content-Encoding header value for the blob - * content. Use this value to specify the content encodings applied to the - * blob. This value will be returned to clients in the headers of the - * response when the blob data or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param contentEncoding - * A {@link String} containing the Content-Encoding - * header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setContentEncoding(String contentEncoding) { - this.contentEncoding = contentEncoding; - return this; - } - - /** - * Gets the Content-Language header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the Content-Language - * header value set, if any. - */ - public String getContentLanguage() { - return contentLanguage; - } - - /** - * Sets the optional Content-Language header value for the blob - * content. Use this value to specify the content language of the blob. This - * value will be returned to clients in the headers of the response when the - * blob data or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param contentLanguage - * A {@link String} containing the Content-Language - * header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setContentLanguage(String contentLanguage) { - this.contentLanguage = contentLanguage; - return this; - } - - /** - * Gets the Content-MD5 header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the Content-MD5 header - * value set, if any. - */ - public String getContentMD5() { - return contentMD5; - } - - /** - * Sets the optional Content-MD5 header value for the blob - * content. Use this value to specify an MD5 hash of the blob content. This - * hash is used to verify the integrity of the blob during transport. When - * this header is specified, the storage service checks the hash that has - * arrived with the one that was sent. If the two hashes do not match, the - * operation will fail with error code 400 (Bad Request). This value will be - * returned to clients in the headers of the response when the blob data or - * blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param contentMD5 - * A {@link String} containing the Content-MD5 - * header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setContentMD5(String contentMD5) { - this.contentMD5 = contentMD5; - return this; - } - - /** - * Gets the Cache-Control header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the Cache-Control header - * value set, if any. - */ - public String getCacheControl() { - return cacheControl; - } - - /** - * Sets the optional Cache-Control header value for the blob - * content. The Blob service stores this value but does not use or modify - * it. This value will be returned to clients in the headers of the response - * when the blob data or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param cacheControl - * A {@link String} containing the Cache-Control - * header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setCacheControl(String cacheControl) { - this.cacheControl = cacheControl; - return this; - } - - /** - * Gets the x-ms-blob-content-type header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the - * x-ms-blob-content-type header value set, if any. - */ - public String getBlobContentType() { - return blobContentType; - } - - /** - * Sets the optional x-ms-blob-content-type header value for - * the blob content. This value will be returned to clients in the headers - * of the response when the blob data or blob properties are requested. If - * no content type is specified, the default content type is - * application/octet-stream. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param blobContentType - * A {@link String} containing the - * x-ms-blob-content-type header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setBlobContentType(String blobContentType) { - this.blobContentType = blobContentType; - return this; - } - - /** - * Gets the x-ms-blob-content-encoding header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the - * x-ms-blob-content-encoding header value set, if any. - */ - public String getBlobContentEncoding() { - return blobContentEncoding; - } - - /** - * Sets the optional x-ms-blob-content-encoding header value - * for the blob content. Use this value to specify the content encodings - * applied to the blob. This value will be returned to clients in the - * headers of the response when the blob data or blob properties are - * requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param blobContentEncoding - * A {@link String} containing the - * x-ms-blob-content-encoding header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setBlobContentEncoding(String blobContentEncoding) { - this.blobContentEncoding = blobContentEncoding; - return this; - } - - /** - * Gets the x-ms-blob-content-language header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the - * x-ms-blob-content-language header value set, if any. - */ - public String getBlobContentLanguage() { - return blobContentLanguage; - } - - /** - * Sets the optional x-ms-blob-content-language header value - * for the blob content. Use this value to specify the content language of - * the blob. This value will be returned to clients in the headers of the - * response when the blob data or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param blobContentLanguage - * A {@link String} containing the - * x-ms-blob-content-language header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setBlobContentLanguage(String blobContentLanguage) { - this.blobContentLanguage = blobContentLanguage; - return this; - } - - /** - * Gets the x-ms-blob-content-md5 header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the - * x-ms-blob-content-md5 header value set, if any. - */ - public String getBlobContentMD5() { - return blobContentMD5; - } - - /** - * Sets the optional MD5 hash value for the blob content. This value will be - * returned to clients in the x-ms-blob-content-md5 header - * value of the response when the blob data or blob properties are - * requested. This hash is used to verify the integrity of the blob during - * transport. When this header is specified, the storage service checks the - * hash of the content that has arrived with the one that was sent. If the - * two hashes do not match, the operation will fail with error code 400 (Bad - * Request), which will cause a ServiceException to be thrown. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param blobContentMD5 - * A {@link String} containing the - * x-ms-blob-content-md5 header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setBlobContentMD5(String blobContentMD5) { - this.blobContentMD5 = blobContentMD5; - return this; - } - - /** - * Gets the x-ms-blob-cache-control header value set in this - * {@link CreateBlobOptions} instance. - * - * @return A {@link String} containing the - * x-ms-blob-cache-control header value set, if any. - */ - public String getBlobCacheControl() { - return blobCacheControl; - } - - /** - * Sets the optional x-ms-blob-cache-control header value for - * the blob content. The Blob service stores this value but does not use or - * modify it. This value will be returned to clients in the headers of the - * response when the blob data or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param blobCacheControl - * A {@link String} containing the - * x-ms-blob-cache-control header value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setBlobCacheControl(String blobCacheControl) { - this.blobCacheControl = blobCacheControl; - return this; - } - - /** - * Gets the blob metadata collection set in this {@link CreateBlobOptions} - * instance. - * - * @return A {@link HashMap} of name-value pairs of {@link String} - * containing the blob metadata set, if any. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Sets the blob metadata collection to associate with the created blob. - * Metadata is a collection of name-value {@link String} pairs for client - * use and is opaque to the server. Metadata names must adhere to the naming - * rules for C# - * identifiers. - *

- * The metadata value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param metadata - * A {@link HashMap} of name-value pairs of {@link String} - * containing the blob metadata to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setMetadata(HashMap metadata) { - this.metadata = metadata; - return this; - } - - /** - * Adds a name-value pair to the blob metadata collection associated with - * this {@link CreateBlobOptions} instance. - * - * @param key - * A {@link String} containing the name portion of the name-value - * pair to add to the metadata collection. - * @param value - * A {@link String} containing the value portion of the - * name-value pair to add to the metadata collection. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions addMetadata(String key, String value) { - this.getMetadata().put(key, value); - return this; - } - - /** - * Gets the lease ID for the blob set in this {@link CreateBlobOptions} - * instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets a lease ID value to match when updating the blob. This value is not - * used when creating a blob. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the sequence number set in this {@link CreateBlobOptions} instance. - * - * @return The page blob sequence number value set. - */ - public Long getSequenceNumber() { - return sequenceNumber; - } - - /** - * Sets the optional sequence number for a page blob in this - * {@link CreateBlobOptions} instance. This value is not used for block - * blobs. The sequence number is a user-controlled value that you can use to - * track requests. The value of the sequence number must be between 0 and - * 2^63 - 1. The default value is 0. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobOptions} instance is passed as a parameter. - * - * @param sequenceNumber - * The page blob sequence number value to set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setSequenceNumber(Long sequenceNumber) { - this.sequenceNumber = sequenceNumber; - return this; - } - - /** - * Gets the access conditions set in this {@link CreateBlobOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions for updating a blob. This value is not used - * when creating a blob. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link CreateBlobOptions} instance. - */ - public CreateBlobOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesOptions.java deleted file mode 100644 index 49a601b6b8ab..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesOptions.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobPages(String, String, PageRange, long, java.io.InputStream, CreateBlobPagesOptions)} - * request. These options include an optional server timeout for the operation, - * a blob lease ID to create pages in a blob with an active lease, an optional - * MD5 hash for the content, and any access conditions to satisfy. - */ -public class CreateBlobPagesOptions extends BlobServiceOptions { - private String leaseId; - private String contentMD5; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link CreateBlobPagesOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CreateBlobPagesOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CreateBlobPagesOptions} instance. - */ - @Override - public CreateBlobPagesOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link CreateBlobPagesOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets an optional lease ID value to match when getting the blob. If set, - * the lease must be active and the value must match the lease ID set on the - * leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobPagesOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link CreateBlobPagesOptions} instance. - */ - public CreateBlobPagesOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the MD5 hash value for the page content set in this - * {@link CreateBlobPagesOptions} instance. - * - * @return A {@link String} containing the MD5 hash value for the block - * content set, if any. - */ - public String getContentMD5() { - return contentMD5; - } - - /** - * Sets the optional MD5 hash value for the page content. This hash is used - * to verify the integrity of the blob during transport. When this value is - * specified, the storage service checks the hash of the content that has - * arrived with the one that was sent. If the two hashes do not match, the - * operation will fail with error code 400 (Bad Request), which will cause a - * ServiceException to be thrown. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobPagesOptions} instance is passed as a parameter. - * - * @param contentMD5 - * A {@link String} containing the MD5 hash value for the block - * content to set. - * @return A reference to this {@link CreateBlobPagesOptions} instance. - */ - public CreateBlobPagesOptions setContentMD5(String contentMD5) { - this.contentMD5 = contentMD5; - return this; - } - - /** - * Gets the access conditions set in this {@link CreateBlobPagesOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets optional access conditions for getting the blob. The operation will - * return an error if the access conditions are not met. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobPagesOptions} instance is passed as a parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link CreateBlobPagesOptions} instance. - */ - public CreateBlobPagesOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesResult.java deleted file mode 100644 index 2b24f46acb48..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobPagesResult.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; - -/** - * A wrapper class for the response returned from a Blob Service REST API Put - * Page operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#clearBlobPages(String, String, PageRange)}, - * {@link com.microsoft.windowsazure.services.blob.BlobContract#clearBlobPages(String, String, PageRange, CreateBlobPagesOptions)} - * , - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobPages(String, String, PageRange, long, java.io.InputStream)} - * and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobPages(String, String, PageRange, long, java.io.InputStream, CreateBlobPagesOptions)} - * . - *

- * See the Put - * Page documentation on MSDN for details of the underlying Blob Service - * REST API operation. - */ -public class CreateBlobPagesResult { - private String etag; - private Date lastModified; - private String contentMD5; - private long sequenceNumber; - - /** - * Gets the ETag of the blob. - *

- * This value can be used in an access condition when updating or deleting a - * blob to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag of the blob from the - * ETag element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the last modified time of the blob. - *

- * Any operation that modifies the blob, including updates to the blob's - * metadata or properties, changes the last modified time of the blob. This - * value can be used in an access condition when updating or deleting a blob - * to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link java.util.Date} containing the last modified time of the - * page blob. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the blob from - * the Last-Modified element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the blob. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - /** - * Gets the MD5 hash value of the page blob. This value can be used to - * determine if the blob content has been corrupted in transmission. - * - * @return A {@link String} containing the MD5 hash value of the page blob. - */ - public String getContentMD5() { - return contentMD5; - } - - /** - * Reserved for internal use. Sets the MD5 hash value of the page blob from - * the Content-MD5 element returned in the response. - * - * @param contentMD5 - * A {@link String} containing the MD5 hash value of the page - * blob. - */ - public void setContentMD5(String contentMD5) { - this.contentMD5 = contentMD5; - } - - /** - * Gets the sequence number of the page blob. This value can be used when - * updating or deleting a page blob using an optimistic concurrency model to - * prevent the client from modifying data that has been changed by another - * client. - * - * @return A {@link String} containing the client-assigned sequence number - * value for the page blob. - */ - public long getSequenceNumber() { - return sequenceNumber; - } - - /** - * Reserved for internal use. Sets the sequence number of the page blob from - * the x-ms-blob-sequence-number element returned in the - * response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param sequenceNumber - * A {@link String} containing the client-assigned sequence - * number value for the page blob. - */ - public void setSequenceNumber(long sequenceNumber) { - this.sequenceNumber = sequenceNumber; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobResult.java deleted file mode 100644 index a4db1f50702b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobResult.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; - -/** - * A wrapper class for the response returned from a Blob Service REST API Create - * Blob operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createPageBlob(String, String, long, CreateBlobOptions)} - * and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlockBlob(String, String, java.io.InputStream, CreateBlobOptions)} - * . - *

- * See the Put - * Blob documentation on MSDN for details of the underlying Blob Service - * REST API operation. - */ -public class CreateBlobResult { - private String etag; - private Date lastModified; - - /** - * Gets the ETag of the blob. - * - * @return A {@link String} containing the server-assigned ETag value for - * the snapshot. - */ - public String getEtag() { - return etag; - } - - /** - * Sets the ETag of the snapshot from the ETag header returned - * in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the last modified time of the snapshot. - * - * @return A {@link java.util.Date} containing the last modified time of the - * blob. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the snapshot - * from the Last-Modified header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the snapshot. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotOptions.java deleted file mode 100644 index 9086a0cc6e08..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotOptions.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.HashMap; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobSnapshot(String, String, CreateBlobSnapshotOptions) - * createBlobSnapshot} request. These options include an optional server timeout - * for the operation, blob metadata to set on the snapshot, a blob lease ID to - * get a blob with an active lease, an optional start and end range for blob - * content to return, and any access conditions to satisfy. - */ -public class CreateBlobSnapshotOptions extends BlobServiceOptions { - private HashMap metadata = new HashMap(); - private String leaseId; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link CreateBlobSnapshotOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CreateBlobSnapshotOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CreateBlobSnapshotOptions} instance. - */ - @Override - public CreateBlobSnapshotOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the metadata collection set in this - * {@link CreateBlobSnapshotOptions} instance. - * - * @return A {@link HashMap} of name-value pairs of {@link String} - * containing the blob metadata set, if any. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Sets the metadata collection to associate with a snapshot. Metadata is a - * collection of name-value {@link String} pairs for client use and is - * opaque to the server. Metadata names must adhere to the naming rules for - * C# - * identifiers. - *

- * The metadata value only affects calls made on methods where this - * {@link CreateBlobSnapshotOptions} instance is passed as a parameter. - * - * @param metadata - * A {@link java.util.HashMap} of name-value pairs of - * {@link String} containing the names and values of the metadata - * to set. - * @return A reference to this {@link CreateBlobSnapshotOptions} instance. - */ - public CreateBlobSnapshotOptions setMetadata( - HashMap metadata) { - this.metadata = metadata; - return this; - } - - /** - * Adds a name-value pair to the metadata collection associated with this - * {@link CreateBlobSnapshotOptions} instance. - * - * @param key - * A {@link String} containing the name portion of the name-value - * pair to add to the metadata collection. - * @param value - * A {@link String} containing the value portion of the - * name-value pair to add to the metadata collection. - * @return A reference to this {@link CreateBlobSnapshotOptions} instance. - */ - public CreateBlobSnapshotOptions addMetadata(String key, String value) { - this.getMetadata().put(key, value); - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link CreateBlobSnapshotOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets an optional lease ID value to match when creating a snapshot of the - * blob. If set, the lease must be active and the value must match the lease - * ID set on the leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobSnapshotOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link CreateBlobSnapshotOptions} instance. - */ - public CreateBlobSnapshotOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the access conditions set in this {@link CreateBlobSnapshotOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets optional access conditions for creating a snapshot of the blob. The - * operation will return an error if the access conditions are not met. - *

- * Note that this value only affects calls made on methods where this - * {@link CreateBlobSnapshotOptions} instance is passed as a parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link CreateBlobSnapshotOptions} instance. - */ - public CreateBlobSnapshotOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotResult.java deleted file mode 100644 index e70741c58ff6..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateBlobSnapshotResult.java +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; - -/** - * A wrapper class for the response returned from a Blob Service REST API - * Snapshot Blob operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobSnapshot(String, String)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createBlobSnapshot(String, String, CreateBlobSnapshotOptions)} - * . - *

- * See the Snapshot Blob documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class CreateBlobSnapshotResult { - private String snapshot; - private String etag; - private Date lastModified; - - /** - * Gets the snapshot timestamp value returned by the server to uniquely - * identify the newly created snapshot. - *

- * The snapshot timestamp value is an opaque value returned by the server to - * uniquely identify a snapshot version, and may be used in subsequent - * requests to access the snapshot. - *

- * - * @return A {@link String} containing the snapshot timestamp value of the - * newly created snapshot. - */ - public String getSnapshot() { - return snapshot; - } - - /** - * Reserved for internal use. Sets the snapshot timestamp value from the - * x-ms-snapshot header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param snapshot - * A {@link String} containing the snapshot timestamp value of - * the newly created snapshot. - */ - public void setSnapshot(String snapshot) { - this.snapshot = snapshot; - } - - /** - * Gets the ETag of the snapshot. - *

- * Note that a snapshot cannot be written to, so the ETag of a given - * snapshot will never change. However, the ETag of the snapshot will differ - * from that of the base blob if new metadata was supplied with the create - * blob snapshot request. If no metadata was specified with the request, the - * ETag of the snapshot will be identical to that of the base blob at the - * time the snapshot was taken. - * - * @return A {@link String} containing the server-assigned ETag value for - * the snapshot. - */ - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag of the snapshot from the - * ETag header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the last modified time of the snapshot. - *

- * Note that a snapshot cannot be written to, so the last modified time of a - * given snapshot will never change. However, the last modified time of the - * snapshot will differ from that of the base blob if new metadata was - * supplied with the create blob snapshot request. If no metadata was - * specified with the request, the last modified time of the snapshot will - * be identical to that of the base blob at the time the snapshot was taken. - * - * @return A {@link java.util.Date} containing the last modified time of the - * snapshot. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the snapshot - * from the Last-Modified header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the snapshot. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateContainerOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateContainerOptions.java deleted file mode 100644 index ba74a2c16d30..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/CreateContainerOptions.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.HashMap; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#createContainer(String, CreateContainerOptions) - * createContainer} request. These options include a server response timeout for - * the request, metadata to set on the container, and the public access level - * for container and blob data. Options that are not set will not be passed to - * the server with a request. - */ -public class CreateContainerOptions extends BlobServiceOptions { - private String publicAccess; - private HashMap metadata = new HashMap(); - - /** - * Sets the server request timeout value associated with this - * {@link CreateContainerOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CreateContainerOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CreateContainerOptions} instance. - */ - @Override - public CreateContainerOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the metadata collection associated with this - * {@link CreateContainerOptions} instance. - * - * @return A {@link java.util.HashMap} of name-value pairs of {@link String} - * containing the names and values of the container metadata to set. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Sets the metadata collection associated with this - * {@link CreateContainerOptions} instance. Metadata is a collection of - * name-value {@link String} pairs for client use and is opaque to the - * server. Metadata names must adhere to the naming rules for C# - * identifiers. - *

- * The metadata value only affects calls made on methods where this - * {@link CreateContainerOptions} instance is passed as a parameter. - * - * @param metadata - * A {@link java.util.HashMap} of name-value pairs of - * {@link String} containing the names and values of the - * container metadata to set. - * @return A reference to this {@link CreateContainerOptions} instance. - */ - public CreateContainerOptions setMetadata(HashMap metadata) { - this.metadata = metadata; - return this; - } - - /** - * Adds a metadata name-value pair to the metadata collection associated - * with this {@link CreateContainerOptions} instance. - * - * @param key - * A {@link String} containing the name portion of the name-value - * pair to add to the metadata collection. - * @param value - * A {@link String} containing the value portion of the - * name-value pair to add to the metadata collection. - * @return A reference to this {@link CreateContainerOptions} instance. - */ - public CreateContainerOptions addMetadata(String key, String value) { - this.getMetadata().put(key, value); - return this; - } - - /** - * Gets the public access level value associated with this - * {@link CreateContainerOptions} instance. The public access level - * specifies whether data in the container may be accessed publicly and the - * level of access. Possible values include: - *

    - *
  • container  Specifies full public read access for - * container and blob data. Clients can enumerate blobs within the container - * via anonymous request, but cannot enumerate containers within the storage - * account.
  • - *
  • blob  Specifies public read access for blobs. Blob - * data within this container can be read via anonymous request, but - * container data is not available. Clients cannot enumerate blobs within - * the container via anonymous request.
  • - *
- * The default value of null sets the container data private to - * the storage account owner. - * - * @return A {@link String} containing the public access level value to set, - * or null. - */ - public String getPublicAccess() { - return publicAccess; - } - - /** - * Sets the public access level value associated with this - * {@link CreateContainerOptions} instance. The public access level - * specifies whether data in the container may be accessed publicly and the - * level of access. Possible values include: - *
    - *
  • container  Specifies full public read access for - * container and blob data. Clients can enumerate blobs within the container - * via anonymous request, but cannot enumerate containers within the storage - * account.
  • - *
  • blob  Specifies public read access for blobs. Blob - * data within this container can be read via anonymous request, but - * container data is not available. Clients cannot enumerate blobs within - * the container via anonymous request.
  • - *
- * The default value of null sets the container data private to - * the storage account owner. - *

- * The publicAccess value only affects calls made on methods where - * this {@link CreateContainerOptions} instance is passed as a parameter. - * - * @param publicAccess - * A {@link String} containing the public access level value to - * set, or null to set the container data private to - * the storage account owner. - * @return A reference to this {@link CreateContainerOptions} instance. - */ - public CreateContainerOptions setPublicAccess(String publicAccess) { - this.publicAccess = publicAccess; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteBlobOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteBlobOptions.java deleted file mode 100644 index 066093601c5f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteBlobOptions.java +++ /dev/null @@ -1,180 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#deleteBlob(String, String, DeleteBlobOptions) deleteBlob} - * request. These options include an optional server timeout for the operation, - * a snapshot timestamp to specify an individual snapshot to delete, a blob - * lease ID to delete a blob with an active lease, a flag indicating whether to - * delete all snapshots but not the blob, or both the blob and all snapshots, - * and any access conditions to satisfy. - */ -public class DeleteBlobOptions extends BlobServiceOptions { - private String snapshot; - private String leaseId; - private Boolean deleteSnaphotsOnly; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link DeleteBlobOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link DeleteBlobOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link DeleteBlobOptions} instance. - */ - @Override - public DeleteBlobOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the snapshot timestamp value set in this {@link DeleteBlobOptions} - * instance. - * - * @return A {@link String} containing the snapshot timestamp value of the - * blob snapshot to get. - */ - public String getSnapshot() { - return snapshot; - } - - /** - * Reserved for future use. Sets an optional snapshot timestamp value used - * to identify the particular snapshot of the blob to delete. - *

- * The snapshot timestamp value is an opaque value returned by the server to - * identify a snapshot. This option cannot be set if the delete snapshots - * only option is set to true or false. - *

- * Note that this value only affects calls made on methods where this - * {@link DeleteBlobOptions} instance is passed as a parameter. - * - * @param snapshot - * A {@link String} containing the snapshot timestamp value of - * the blob snapshot to get. - * @return A reference to this {@link DeleteBlobOptions} instance. - */ - public DeleteBlobOptions setSnapshot(String snapshot) { - this.snapshot = snapshot; - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link DeleteBlobOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets an optional lease ID value to match when deleting the blob. If set, - * the lease must be active and the value must match the lease ID set on the - * leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link DeleteBlobOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link DeleteBlobOptions} instance. - */ - public DeleteBlobOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the flag indicating whether to delete only snapshots of the blob, or - * both the blob and all its snapshots set in this {@link DeleteBlobOptions} - * instance. - * - * @return A value of true to delete only the snapshots, or - * false to delete both snapshots and the blob. When - * the value null is set, x-ms-delete-snapshots in the - * header will not be set. - */ - public Boolean getDeleteSnaphotsOnly() { - return deleteSnaphotsOnly; - } - - /** - * Sets a flag indicating whether to delete only snapshots of the blob, or - * both the blob and all its snapshots. - *

- * If the deleteSnaphotsOnly parameter is set to true, - * only the snapshots of the blob are deleted by the operation. If the - * parameter is set to false, both the blob and all its - * snapshots are deleted by the operation. If this option is not set on a - * request, and the blob has associated snapshots, the Blob service returns - * a 409 (Conflict) status code and a {@link com.microsoft.windowsazure.exception.ServiceException} is thrown. - *

- * This option is not compatible with the snapshot option; if both are set - * the Blob service returns status code 400 (Bad Request) and a - * {@link StorageException} is thrown. - *

- * Note that this value only affects calls made on methods where this - * {@link DeleteBlobOptions} instance is passed as a parameter. - * - * @param deleteSnaphotsOnly - * Set to true to delete only the snapshots, or - * false to delete both snapshots and the blob. - * @return A reference to this {@link DeleteBlobOptions} instance. - */ - public DeleteBlobOptions setDeleteSnaphotsOnly(boolean deleteSnaphotsOnly) { - this.deleteSnaphotsOnly = deleteSnaphotsOnly; - return this; - } - - /** - * Gets the access conditions set in this {@link DeleteBlobOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets optional access conditions for getting the blob. The operation will - * return an error if the access conditions are not met. - *

- * Note that this value only affects calls made on methods where this - * {@link DeleteBlobOptions} instance is passed as a parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link DeleteBlobOptions} instance. - */ - public DeleteBlobOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteContainerOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteContainerOptions.java deleted file mode 100644 index f4768f294395..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/DeleteContainerOptions.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#deleteContainer(String, DeleteContainerOptions) - * deleteContainer} request. These options include a server response timeout for - * the request and access conditions that specify whether to perform the - * operation or not depending on the values of the Etag or last modified time of - * the container. Options that are not set will not be passed to the server with - * a request. - */ -public class DeleteContainerOptions extends BlobServiceOptions { - private AccessConditionHeader accessCondition; - - /** - * Sets the server request timeout value associated with this - * {@link DeleteContainerOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link DeleteContainerOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link DeleteContainerOptions} instance. - */ - @Override - public DeleteContainerOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the access conditions associated with this - * {@link DeleteContainerOptions} instance. - * - * @return An {@link AccessCondition} reference containing the Etag and last - * modified time conditions for performing the delete container - * operation, or null if not set. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions associated with this - * {@link DeleteContainerOptions} instance. By default, the delete container - * operation will delete the container unconditionally. Use this method to - * specify conditions on the Etag or last modified time value for performing - * the delete container operation. - *

- * The accessCondition value only affects calls made on methods - * where this {@link DeleteContainerOptions} instance is passed as a - * parameter. - * - * @param accessCondition - * An {@link AccessCondition} reference containing the Etag and - * last modified time conditions for performing the delete - * container operation. Specify null to make the - * operation unconditional. - * @return A reference to this {@link DeleteContainerOptions} instance. - */ - public DeleteContainerOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataOptions.java deleted file mode 100644 index e12b21152335..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataOptions.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getBlobMetadata(String, String, GetBlobMetadataOptions) - * getBlobMetadata} request. These options include an optional server timeout - * for the operation, the lease ID if the blob has an active lease, the snapshot - * timestamp to get the properties of a snapshot, and any access conditions for - * the request. - */ -public class GetBlobMetadataOptions extends BlobServiceOptions { - private String snapshot; - private String leaseId; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link GetBlobMetadataOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link GetBlobMetadataOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link GetBlobMetadataOptions} instance. - */ - @Override - public GetBlobMetadataOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the snapshot timestamp value set in this - * {@link GetBlobMetadataOptions} instance. - * - * @return A {@link String} containing the snapshot timestamp value of the - * blob snapshot to get metadata for. - */ - public String getSnapshot() { - return snapshot; - } - - /** - * Sets the snapshot timestamp value used to identify the particular - * snapshot of the blob to get metadata for. The snapshot timestamp value is - * an opaque value returned by the server to identify a snapshot. When this - * option is set, only the metadata of the snapshot is returned. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobMetadataOptions} instance is passed as a parameter. - * - * @param snapshot - * A {@link String} containing the snapshot timestamp value of - * the blob snapshot to get metadata for. - * @return A reference to this {@link GetBlobMetadataOptions} instance. - */ - public GetBlobMetadataOptions setSnapshot(String snapshot) { - this.snapshot = snapshot; - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link GetBlobMetadataOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets a lease ID value to match when getting the metadata of the blob. If - * set, the lease must be active and the value must match the lease ID set - * on the leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobMetadataOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link GetBlobMetadataOptions} instance. - */ - public GetBlobMetadataOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the access conditions set in this {@link GetBlobMetadataOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions for getting the metadata of the blob. The - * operation will return an error if the access conditions are not met. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link GetBlobMetadataOptions} instance. - */ - public GetBlobMetadataOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataResult.java deleted file mode 100644 index c1fb178df988..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobMetadataResult.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; -import java.util.HashMap; - -/** - * A wrapper class for the response returned from a Blob Service REST API Get - * Blob Metadata operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getBlobMetadata(String, String)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getBlobMetadata(String, String, GetBlobMetadataOptions)}. - *

- * See the Get - * Blob Metadata documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class GetBlobMetadataResult { - private String etag; - private Date lastModified; - private HashMap metadata; - - /** - * Gets the ETag of the blob. For block blobs, this value is returned only - * if the blob has committed blocks. - *

- * This value can be used in an access condition when updating or deleting a - * blob to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag of the blob from the - * ETag header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the last modified time of the block blob. For block blobs, this - * value is returned only if the blob has committed blocks. - *

- * Any operation that modifies the blob, including updates to the blob's - * metadata or properties, changes the last modified time of the blob. This - * value can be used in an access condition when updating or deleting a blob - * to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link java.util.Date} containing the last modified time of the - * blob. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the blob from - * the Last-Modified header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the blob. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - /** - * Gets the user-defined blob metadata as a map of name and value pairs. The - * metadata is for client use and is opaque to the server. - * - * @return A {@link java.util.HashMap} of name-value pairs of {@link String} - * containing the names and values of the blob metadata. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Reserved for internal use. Sets the blob metadata from the - * x-ms-meta-name:value headers returned in the - * response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param metadata - * A {@link java.util.HashMap} of name-value pairs of - * {@link String} containing the names and values of the blob - * metadata. - */ - public void setMetadata(HashMap metadata) { - this.metadata = metadata; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobOptions.java deleted file mode 100644 index c56df960828f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobOptions.java +++ /dev/null @@ -1,236 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getBlob(String, String, GetBlobOptions) getBlob} request. - * These options include an optional server timeout for the operation, a - * snapshot timestamp to specify a snapshot, a blob lease ID to get a blob with - * an active lease, an optional start and end range for blob content to return, - * and any access conditions to satisfy. - */ -public class GetBlobOptions extends BlobServiceOptions { - private String snapshot; - private String leaseId; - private boolean computeRangeMD5; - private Long rangeStart; - private Long rangeEnd; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link GetBlobOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link GetBlobOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link GetBlobOptions} instance. - */ - @Override - public GetBlobOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the snapshot timestamp value set in this {@link GetBlobOptions} - * instance. - * - * @return A {@link String} containing the snapshot timestamp value of the - * blob snapshot to get. - */ - public String getSnapshot() { - return snapshot; - } - - /** - * Sets an optional snapshot timestamp value used to identify the particular - * snapshot of the blob to get properties, metadata, and content for. The - * snapshot timestamp value is an opaque value returned by the server to - * identify a snapshot. When this option is set, only the properties, - * metadata, and content of the snapshot are returned. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobOptions} instance is passed as a parameter. - * - * @param snapshot - * A {@link String} containing the snapshot timestamp value of - * the blob snapshot to get. - * @return A reference to this {@link GetBlobOptions} instance. - */ - public GetBlobOptions setSnapshot(String snapshot) { - this.snapshot = snapshot; - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link GetBlobOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets an optional lease ID value to match when getting the blob. If set, - * the lease must be active and the value must match the lease ID set on the - * leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link GetBlobOptions} instance. - */ - public GetBlobOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Reserved for future use. Gets a flag indicating whether to return an MD5 - * hash for the specified range of blob content set in this - * {@link GetBlobOptions} instance. - * - * @return A flag value of true to get the MD5 hash value for - * the specified range, otherwise false. - */ - public boolean isComputeRangeMD5() { - return computeRangeMD5; - } - - /** - * Reserved for future use. Sets a flag indicating whether to return an MD5 - * hash for the specified range of blob content. - *

- * When the computeRangeMD5 parameter is set to true - * and specified together with a range less than or equal to 4 MB in size, - * the get blob operation response includes the MD5 hash for the range. If - * the computeRangeMD5 parameter is set to true and no - * range is specified or the range exceeds 4 MB in size, a - * {@link com.microsoft.windowsazure.exception.ServiceException} is thrown. - * - * @param computeRangeMD5 - * Reserved for future use. Set a flag value of true - * to get the MD5 hash value for the specified range, otherwise - * false. - * @return A reference to this {@link GetBlobOptions} instance. - */ - public GetBlobOptions setComputeRangeMD5(boolean computeRangeMD5) { - this.computeRangeMD5 = computeRangeMD5; - return this; - } - - /** - * Gets the beginning byte offset value of the blob content range to return - * set in this {@link GetBlobOptions} instance. - * - * @return The beginning offset value in bytes for the blob content range to - * return. - */ - public Long getRangeStart() { - return rangeStart; - } - - /** - * Sets an optional beginning byte offset value of the blob content range to - * return for the request, inclusive. - *

- * When this value is set, the blob content beginning at the byte offset - * specified by the rangeStart value and ending at the range end - * value, inclusive, is returned in the server response to the get blob - * operation. If the range end is not set, the response includes blob - * content from the rangeStart value to the end of the blob. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobOptions} instance is passed as a parameter. - * - * @param rangeStart - * The beginning offset value in bytes for the blob content range - * to return, inclusive. - * @return A reference to this {@link GetBlobOptions} instance. - */ - public GetBlobOptions setRangeStart(Long rangeStart) { - this.rangeStart = rangeStart; - return this; - } - - /** - * Gets the ending byte offset value for the blob content range to return - * set in this {@link GetBlobOptions} instance. - * - * @return The ending offset value in bytes for the blob content range to - * return. - */ - public Long getRangeEnd() { - return rangeEnd; - } - - /** - * Sets an optional ending byte offset value of the blob content range to - * return for the request, inclusive. - *

- * If the range start is not set, this value is ignored and the response - * includes content from the entire blob. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobOptions} instance is passed as a parameter. - * - * @param rangeEnd - * The ending offset value in bytes for the blob content range to - * return, inclusive. - * @return A reference to this {@link GetBlobOptions} instance. - */ - public GetBlobOptions setRangeEnd(Long rangeEnd) { - this.rangeEnd = rangeEnd; - return this; - } - - /** - * Gets the access conditions set in this {@link GetBlobOptions} instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets optional access conditions for getting the blob. The operation will - * return an error if the access conditions are not met. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobOptions} instance is passed as a parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link GetBlobOptions} instance. - */ - public GetBlobOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesOptions.java deleted file mode 100644 index f2aa5a0c673a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesOptions.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getBlobProperties(String, String, GetBlobPropertiesOptions) - * getBlobProperties} request. These options include an optional server timeout - * for the operation, the lease ID if the blob has an active lease, the snapshot - * timestamp to get the properties of a snapshot, and any access conditions for - * the request. - */ -public class GetBlobPropertiesOptions extends BlobServiceOptions { - private String snapshot; - private String leaseId; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link GetBlobPropertiesOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link GetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link GetBlobPropertiesOptions} instance. - */ - @Override - public GetBlobPropertiesOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the snapshot timestamp value set in this - * {@link GetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the snapshot timestamp value of the - * blob snapshot to get properties for. - */ - public String getSnapshot() { - return snapshot; - } - - /** - * Sets the snapshot timestamp value used to identify the particular - * snapshot of the blob to get properties for. The snapshot timestamp value - * is an opaque value returned by the server to identify a snapshot. When - * this option is set, only the properties of the snapshot are returned. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param snapshot - * A {@link String} containing the snapshot timestamp value of - * the blob snapshot to get properties for. - * @return A reference to this {@link GetBlobPropertiesOptions} instance. - */ - public GetBlobPropertiesOptions setSnapshot(String snapshot) { - this.snapshot = snapshot; - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link GetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets a lease ID value to match when getting the properties of the blob. - * If set, the lease must be active and the value must match the lease ID - * set on the leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link GetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link GetBlobPropertiesOptions} instance. - */ - public GetBlobPropertiesOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the access conditions set in this {@link GetBlobPropertiesOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions for getting the properties of the blob. The - * operation will return an error if the access conditions are not met. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link GetBlobPropertiesOptions} instance. - */ - public GetBlobPropertiesOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesResult.java deleted file mode 100644 index c0ec8117c678..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobPropertiesResult.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.HashMap; - -/** - * A wrapper class for the response returned from a Blob Service REST API Get - * Blob Properties operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getBlobProperties(String, String)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getBlobProperties(String, String, GetBlobPropertiesOptions)} - * . - *

- * See the Get - * Blob Properties documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class GetBlobPropertiesResult { - private BlobProperties properties; - private HashMap metadata = new HashMap(); - - /** - * Gets the standard HTTP properties and system properties of the blob. - * - * @return A {@link BlobProperties} instance containing the properties of - * the blob. - */ - public BlobProperties getProperties() { - return properties; - } - - /** - * Reserved for internal use. Sets the blob properties from the headers - * returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param properties - * A {@link BlobProperties} instance containing the properties of - * the blob. - */ - public void setProperties(BlobProperties properties) { - this.properties = properties; - } - - /** - * Gets the user-defined blob metadata as a map of name and value pairs. The - * metadata is for client use and is opaque to the server. - * - * @return A {@link java.util.HashMap} of key-value pairs of {@link String} - * containing the names and values of the blob metadata. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Reserved for internal use. Sets the blob metadata from the - * x-ms-meta-name:value headers returned in the - * response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param metadata - * A {@link java.util.HashMap} of key-value pairs of - * {@link String} containing the names and values of the blob - * metadata. - */ - public void setMetadata(HashMap metadata) { - this.metadata = metadata; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobResult.java deleted file mode 100644 index 6650d0ac8079..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetBlobResult.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.io.InputStream; -import java.util.HashMap; - -/** - * A wrapper class for the response returned from a Blob Service REST API Get - * Blob operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getBlob(String, String, GetBlobOptions)}. - *

- * See the Get - * Blob documentation on MSDN for details of the underlying Blob Service - * REST API operation. - */ -public class GetBlobResult { - private InputStream contentStream; - private BlobProperties properties; - private HashMap metadata; - - /** - * Gets the content of the blob. - * - * @return An {@link InputStream} instance containing the content of the - * blob. - */ - public InputStream getContentStream() { - return contentStream; - } - - /** - * Reserved for internal use. Sets the blob content from the body returned - * in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param contentStream - * An {@link InputStream} instance containing the content of the - * blob. - */ - public void setContentStream(InputStream contentStream) { - this.contentStream = contentStream; - } - - /** - * Gets the standard HTTP properties and system properties of the blob. - * - * @return A {@link BlobProperties} instance containing the properties of - * the blob. - */ - public BlobProperties getProperties() { - return properties; - } - - /** - * Reserved for internal use. Sets the blob properties from the headers - * returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param properties - * A {@link BlobProperties} instance containing the properties of - * the blob. - */ - public void setProperties(BlobProperties properties) { - this.properties = properties; - } - - /** - * Gets the user-defined blob metadata as a map of name and value pairs. The - * metadata is for client use and is opaque to the server. - * - * @return A {@link java.util.HashMap} of key-value pairs of {@link String} - * containing the names and values of the blob metadata. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Reserved for internal use. Sets the blob metadata from the - * x-ms-meta-name:value headers returned in the - * response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param metadata - * A {@link java.util.HashMap} of key-value pairs of - * {@link String} containing the names and values of the blob - * metadata. - */ - public void setMetadata(HashMap metadata) { - this.metadata = metadata; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerACLResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerACLResult.java deleted file mode 100644 index 2098b14faa2b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerACLResult.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - - -/** - * A wrapper class for the response returned from a Blob Service REST API Get - * Container ACL operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getContainerACL(String)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getContainerACL(String, BlobServiceOptions)}. - *

- * See the Get - * Container ACL documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class GetContainerACLResult { - private ContainerACL containerACL; - - /** - * Gets the container's public access level and container-level access - * policies from the headers and body returned in the response. - * - * @return A {@link ContainerACL} instance representing the public access - * level and container-level access policies returned by the - * request. - */ - public ContainerACL getContainerACL() { - return containerACL; - } - - /** - * Reserved for internal use. Sets the container's public access level and - * container-level access policies from the headers and body returned in the - * response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param containerACL - * A {@link ContainerACL} instance representing the public access - * level and container-level access policies returned by the - * request. - */ - public void setValue(ContainerACL containerACL) { - this.containerACL = containerACL; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerPropertiesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerPropertiesResult.java deleted file mode 100644 index 1bc06b7e5ba7..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetContainerPropertiesResult.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; -import java.util.HashMap; - -/** - * A wrapper class for the response returned from a Blob Service REST API Get - * Container Properties and Get Container Metadata operations. This is returned - * by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getContainerProperties(String)}, - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getContainerProperties(String, BlobServiceOptions)}, - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getContainerMetadata(String)}, and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getContainerMetadata(String, BlobServiceOptions)}. - *

- * See the Get - * Container Properties and Get - * Container Metadata documentation on MSDN for details of the underlying - * Blob Service REST API operations. - */ -public class GetContainerPropertiesResult { - private String etag; - private Date lastModified; - private HashMap metadata; - - /** - * Gets the Etag of the container. This value can be used when updating or - * deleting a container using an optimistic concurrency model to prevent the - * client from modifying data that has been changed by another client. - * - * @return A {@link String} containing the server-assigned Etag value for - * the container. - */ - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the Etag of the container from the - * ETag header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned Etag value for - * the container. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the last modifed time of the container. This value can be used when - * updating or deleting a container using an optimistic concurrency model to - * prevent the client from modifying data that has been changed by another - * client. - * - * @return A {@link java.util.Date} containing the last modified time of the - * container. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the container - * from the Last-Modified header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the container. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - /** - * Gets the container metadata as a map of name and value pairs. The - * container metadata is for client use and is opaque to the server. - * - * @return A {@link java.util.HashMap} of key-value pairs of {@link String} - * containing the names and values of the container metadata. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Reserved for internal use. Sets the container metadata from the - * x-ms-meta-name headers returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param metadata - * A {@link java.util.HashMap} of key-value pairs of - * {@link String} containing the names and values of the - * container metadata. - */ - public void setMetadata(HashMap metadata) { - this.metadata = metadata; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetServicePropertiesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetServicePropertiesResult.java deleted file mode 100644 index d4441781c484..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/GetServicePropertiesResult.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - - -/** - * A wrapper class for the service properties returned in response to Blob - * Service REST API operations. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getServiceProperties()} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getServiceProperties(BlobServiceOptions)}. - *

- * See the Get - * Blob Service Properties documentation on MSDN for details of the - * underlying Blob Service REST API operation. - */ -public class GetServicePropertiesResult { - private ServiceProperties value; - - /** - * Gets a {@link ServiceProperties} instance containing the service property - * values associated with the storage account. - *

- * Modifying the values in the {@link ServiceProperties} instance returned - * does not affect the values associated with the storage account. To change - * the values in the storage account, call the - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setServiceProperties} method and pass the modified - * {@link ServiceProperties} instance as a parameter. - * - * @return A {@link ServiceProperties} instance containing the property - * values associated with the storage account. - */ - public ServiceProperties getValue() { - return value; - } - - /** - * Reserved for internal use. Sets the value of the - * {@link ServiceProperties} instance associated with a storage service call - * result. This method is invoked by the API to store service properties - * returned by a call to a REST operation and is not intended for public - * use. - * - * @param value - * A {@link ServiceProperties} instance containing the property - * values associated with the storage account. - */ - public void setValue(ServiceProperties value) { - this.value = value; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksOptions.java deleted file mode 100644 index 4833d2cfd0af..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksOptions.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobBlocks(String, String, ListBlobBlocksOptions) - * listBlobBlocks} request. These options include an optional server timeout for - * the operation, the lease ID if the blob has an active lease, the snapshot - * timestamp to get the committed blocks of a snapshot, whether to return the - * committed block list, and whether to return the uncommitted block list. - */ -public class ListBlobBlocksOptions extends BlobServiceOptions { - private String leaseId; - private String snapshot; - private boolean committedList; - private boolean uncommittedList; - - /** - * Sets the optional server request timeout value associated with this - * {@link ListBlobBlocksOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link ListBlobBlocksOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link ListBlobBlocksOptions} instance. - */ - @Override - public ListBlobBlocksOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link ListBlobBlocksOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets a lease ID value to match when listing the blocks of the blob. If - * set, the lease must be active and the value must match the lease ID set - * on the leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobBlocksOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link ListBlobBlocksOptions} instance. - */ - public ListBlobBlocksOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the snapshot timestamp value set in this - * {@link ListBlobBlocksOptions} instance. - * - * @return A {@link String} containing the snapshot timestamp value of the - * blob snapshot to list. - */ - public String getSnapshot() { - return snapshot; - } - - /** - * Sets the snapshot timestamp value used to identify the particular - * snapshot of the blob to list blocks for. The snapshot timestamp value is - * an opaque value returned by the server to identify a snapshot. When this - * option is set, only the list of committed blocks of the snapshot is - * returned. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobBlocksOptions} instance is passed as a parameter. - * - * @param snapshot - * A {@link String} containing the snapshot timestamp value of - * the blob snapshot to list. - * @return A reference to this {@link ListBlobBlocksOptions} instance. - */ - public ListBlobBlocksOptions setSnapshot(String snapshot) { - this.snapshot = snapshot; - return this; - } - - /** - * Gets the flag value indicating whether to return the committed blocks of - * the blob set in this {@link ListBlobBlocksOptions} instance. - * - * @return A boolean flag value indicating whether to return - * the committed blocks of the blob. - */ - public boolean isCommittedList() { - return committedList; - } - - /** - * Sets a flag indicating whether to return the committed blocks of the blob - * in the response to the list blob blocks request. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobBlocksOptions} instance is passed as a parameter. - * - * @param committedList - * Set to true to return the committed blocks of the - * blob; otherwise, false. - * @return A reference to this {@link ListBlobBlocksOptions} instance. - */ - public ListBlobBlocksOptions setCommittedList(boolean committedList) { - this.committedList = committedList; - return this; - } - - /** - * Gets the flag value indicating whether to return the uncommitted blocks - * of the blob set in this {@link ListBlobBlocksOptions} instance. - * - * @return A boolean flag value indicating whether to return - * the uncommitted blocks of the blob. - */ - public boolean isUncommittedList() { - return uncommittedList; - } - - /** - * Sets a flag indicating whether to return the uncommitted blocks of the - * blob in the response to the list blob blocks request. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobBlocksOptions} instance is passed as a parameter. - * - * @param uncommittedList - * Set to true to return the uncommitted blocks of - * the blob; otherwise, false. - * @return A reference to this {@link ListBlobBlocksOptions} instance. - */ - public ListBlobBlocksOptions setUncommittedList(boolean uncommittedList) { - this.uncommittedList = uncommittedList; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksResult.java deleted file mode 100644 index 2c025b6cd2f2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobBlocksResult.java +++ /dev/null @@ -1,280 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.core.pipeline.Base64StringAdapter; - -/** - * A wrapper class for the response returned from a Blob Service REST API Get - * Block List operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobBlocks(String, String)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobBlocks(String, String, ListBlobBlocksOptions)}. - *

- * See the Get - * Block List documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -@XmlRootElement(name = "BlockList") -public class ListBlobBlocksResult { - private Date lastModified; - private String etag; - private String contentType; - private long contentLength; - private List committedBlocks = new ArrayList(); - private List uncommittedBlocks = new ArrayList(); - - /** - * Gets the last modified time of the block blob. This value is returned - * only if the blob has committed blocks. - *

- * Any operation that modifies the blob, including updates to the blob's - * metadata or properties, changes the last modified time of the blob. This - * value can be used in an access condition when updating or deleting a blob - * to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link java.util.Date} containing the last modified time of the - * blob. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the blob from - * the Last-Modified header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the blob. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - /** - * Gets the ETag of the blob. This value is returned only if the blob has - * committed blocks. - *

- * This value can be used in an access condition when updating or deleting a - * blob to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag of the blob from the - * ETag header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the MIME content type of the blob. This value defaults to - * application/xml. - * - * @return A {@link String} containing the MIME content type value for the - * blob. - */ - public String getContentType() { - return contentType; - } - - /** - * Reserved for internal use. Sets the MIME content type of the blob from - * the Content-Type header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param contentType - * A {@link String} containing the MIME content type value for - * the blob. - */ - public void setContentType(String contentType) { - this.contentType = contentType; - } - - /** - * Gets the size of the blob in bytes. For blobs with no committed blocks, - * this value is 0. - * - * @return The size of the blob in bytes. - */ - public long getContentLength() { - return contentLength; - } - - /** - * Reserved for internal use. Sets the content length of the blob from the - * x-ms-blob-content-length header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param contentLength - * The size of the blob in bytes. - */ - public void setContentLength(long contentLength) { - this.contentLength = contentLength; - } - - /** - * Gets a list of the committed blocks of the blob. This list may be empty - * if no blocks have been committed or if committed blocks were not - * specified in the request. - * - * @return A {@link List} of {@link Entry} instances representing the - * committed blocks of the blob. - */ - @XmlElementWrapper(name = "CommittedBlocks") - @XmlElement(name = "Block") - public List getCommittedBlocks() { - return committedBlocks; - } - - /** - * Reserved for internal use. Sets the list of the committed blocks of the - * blob from the Block elements in the - * CommittedBlocks element of the - * BlockList element in the response body returned by the - * server. - * - * @param committedBlocks - * A {@link List} of {@link Entry} instances representing the - * committed blocks of the blob. - */ - public void setCommittedBlocks(List committedBlocks) { - this.committedBlocks = committedBlocks; - } - - /** - * Gets a list of the uncommitted blocks of the blob. This list may be empty - * if no uncommitted blocks are associated with the blob, or if uncommitted - * blocks were not specified in the {@link ListBlobBlocksOptions options} - * parameter of the request. - * - * @return A {@link List} of {@link Entry} instances representing the - * uncommitted blocks of the blob. - */ - @XmlElementWrapper(name = "UncommittedBlocks") - @XmlElement(name = "Block") - public List getUncommittedBlocks() { - return uncommittedBlocks; - } - - /** - * Reserved for internal use. Sets the list of the uncommitted blocks of the - * blob from the Block elements in the - * UncommittedBlocks element of the - * BlockList element in the response body returned by the - * server. - * - * @param uncommittedBlocks - * A {@link List} of {@link Entry} instances representing the - * uncommitted blocks of the blob. - */ - public void setUncommittedBlocks(List uncommittedBlocks) { - this.uncommittedBlocks = uncommittedBlocks; - } - - /** - * The class for an entry in a list of blocks, representing a committed or - * uncommitted block. - */ - public static class Entry { - private String blockId; - private long blockLength; - - /** - * Gets the client-specified block ID for a block list entry. - * - * @return A {@link String} containing the client-specified block ID for - * a block. - */ - @XmlElement(name = "Name") - @XmlJavaTypeAdapter(Base64StringAdapter.class) - public String getBlockId() { - return blockId; - } - - /** - * Reserved for internal use. Sets the client-specified block ID for a - * block list entry from the Name element in the - * Block element in the list in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param blockId - * A {@link String} containing the client-specified block ID - * for the block. - */ - public void setBlockId(String blockId) { - this.blockId = blockId; - } - - /** - * Gets the length in bytes of a block list entry. - * - * @return The length of the block in bytes. - */ - @XmlElement(name = "Size") - public long getBlockLength() { - return blockLength; - } - - /** - * Reserved for internal use. Sets the length in bytes of a block list - * entry from the Size element in the - * Block element in the list in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param blockLength - * The length of the block in bytes. - */ - public void setBlockLength(long blockLength) { - this.blockLength = blockLength; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsOptions.java deleted file mode 100644 index b928d33abfd0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsOptions.java +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobRegions(String, String, ListBlobRegionsOptions) - * listBlobRegions} request. These options include an optional server timeout - * for the operation, the lease ID if the blob has an active lease, the snapshot - * timestamp to get the valid page ranges of a snapshot, the start offset and/or - * end offset to use to narrow the returned valid page range results, and any - * access conditions for the request. - */ -public class ListBlobRegionsOptions extends BlobServiceOptions { - private String leaseId; - private String snapshot; - private Long rangeStart; - private Long rangeEnd; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link ListBlobRegionsOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link ListBlobRegionsOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link ListBlobRegionsOptions} instance. - */ - @Override - public ListBlobRegionsOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link ListBlobRegionsOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets an optional lease ID value to match when getting the valid page - * ranges of the blob. If set, the lease must be active and the value must - * match the lease ID set on the leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobRegionsOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link ListBlobRegionsOptions} instance. - */ - public ListBlobRegionsOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the snapshot timestamp value set in this - * {@link ListBlobRegionsOptions} instance. - * - * @return A {@link String} containing the snapshot timestamp value of the - * blob snapshot to get valid page ranges for. - */ - public String getSnapshot() { - return snapshot; - } - - /** - * Sets an optional snapshot timestamp value used to identify the particular - * snapshot of the blob to get valid page ranges for. The snapshot timestamp - * value is an opaque value returned by the server to identify a snapshot. - * When this option is set, only the valid page ranges of the snapshot are - * returned. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobRegionsOptions} instance is passed as a parameter. - * - * @param snapshot - * A {@link String} containing the snapshot timestamp value of - * the blob snapshot to get valid page ranges for. - * @return A reference to this {@link ListBlobRegionsOptions} instance. - */ - public ListBlobRegionsOptions setSnapshot(String snapshot) { - this.snapshot = snapshot; - return this; - } - - /** - * Gets the beginning byte offset value of the valid page ranges to return - * set in this {@link ListBlobRegionsOptions} instance. - * - * @return The beginning offset value in bytes for the valid page ranges to - * return. - */ - public Long getRangeStart() { - return rangeStart; - } - - /** - * Sets an optional beginning byte offset value of the valid page ranges to - * return for the request, inclusive. - *

- * If the range end is not set, the response includes valid page ranges from - * the rangeStart value to the end of the blob. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobRegionsOptions} instance is passed as a parameter. - * - * @param rangeStart - * The beginning offset value in bytes for the valid page ranges - * to return, inclusive. - * @return A reference to this {@link ListBlobRegionsOptions} instance. - */ - public ListBlobRegionsOptions setRangeStart(Long rangeStart) { - this.rangeStart = rangeStart; - return this; - } - - /** - * Gets the ending byte offset value for the valid page ranges to return set - * in this {@link ListBlobRegionsOptions} instance. - * - * @return The ending offset value in bytes for the valid page ranges to - * return. - */ - public Long getRangeEnd() { - return rangeEnd; - } - - /** - * Sets an optional ending byte offset value of the valid page ranges to - * return for the request, inclusive. - *

- * If the range start is not set, this value is ignored and the response - * includes valid page ranges from the entire blob. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobRegionsOptions} instance is passed as a parameter. - * - * @param rangeEnd - * The ending offset value in bytes for the valid page ranges to - * return, inclusive. - * @return A reference to this {@link ListBlobRegionsOptions} instance. - */ - public ListBlobRegionsOptions setRangeEnd(Long rangeEnd) { - this.rangeEnd = rangeEnd; - return this; - } - - /** - * Gets the access conditions set in this {@link ListBlobRegionsOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets optional access conditions for getting the valid page ranges of the - * blob. The operation will return an error if the access conditions are not - * met. - *

- * Note that this value only affects calls made on methods where this - * {@link ListBlobRegionsOptions} instance is passed as a parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link ListBlobRegionsOptions} instance. - */ - public ListBlobRegionsOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsResult.java deleted file mode 100644 index 8cd8a58cd860..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobRegionsResult.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; -import java.util.List; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * A wrapper class for the response returned from a Blob Service REST API Get - * Page Ranges operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobRegions(String, String, ListBlobRegionsOptions)}. - *

- * See the Get - * Page Ranges documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -@XmlRootElement(name = "PageList") -public class ListBlobRegionsResult { - private Date lastModified; - private String etag; - private long contentLength; - private List pageRanges; - - /** - * Gets the last modified time of the blob. - *

- * Any operation that modifies the blob, including updates to the blob's - * metadata or properties, changes the last modified time of the blob. This - * value can be used in an access condition when updating or deleting a blob - * to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link java.util.Date} containing the last modified time of the - * blob. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the blob from - * the Last-Modified header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the blob. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - /** - * Gets the ETag of the blob. - *

- * This value can be used in an access condition when updating or deleting a - * blob to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag of the blob from the - * ETag header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the size of the blob in bytes. - * - * @return The size of the blob in bytes. - */ - public long getContentLength() { - return contentLength; - } - - /** - * Reserved for internal use. Sets the content length of the blob from the - * x-ms-blob-content-length header returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param contentLength - * The size of the blob in bytes. - */ - public void setContentLength(long contentLength) { - this.contentLength = contentLength; - } - - /** - * Gets the list of non-overlapping valid page ranges in the blob that match - * the parameters of the request, sorted by increasing address page range. - * - * @return A {@link List} of {@link PageRange} instances containing the - * valid page ranges for the blob. - */ - @XmlElement(name = "PageRange") - public List getPageRanges() { - return pageRanges; - } - - /** - * Reserved for internal use. Sets the list of valid page ranges in the blob - * that match the parameters of the request from the - * PageRange elements of the PageList - * element returned by the server in the response body. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param pageRanges - * A {@link List} of {@link PageRange} instances containing the - * valid page ranges for the blob. - */ - public void setPageRanges(List pageRanges) { - this.pageRanges = pageRanges; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsOptions.java deleted file mode 100644 index 19cfc8e1a0f0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsOptions.java +++ /dev/null @@ -1,316 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobs(String, ListBlobsOptions)} request. These - * options include a server response timeout for the request, a prefix for blobs - * to match, a marker to continue a list operation, a maximum number of results - * to return with one list operation, a delimiter for structuring virtual blob - * hierarchies, and whether to include blob metadata, blob snapshots, and - * uncommitted blobs in the results. - */ -public class ListBlobsOptions extends BlobServiceOptions { - private String prefix; - private String marker; - private int maxResults; - private String delimiter; - private boolean includeMetadata; - private boolean includeSnapshots; - private boolean includeUncommittedBlobs; - - /** - * Sets the optional server request timeout value associated with this - * {@link ListBlobsOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link ListBlobsOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link ListBlobsOptions} instance. - */ - @Override - public ListBlobsOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the prefix filter associated with this {@link ListBlobsOptions} - * instance. This value is used to return only blobs beginning with the - * prefix from the container in methods where this {@link ListBlobsOptions} - * instance is passed as a parameter. - * - * @return A {@link String} containing the prefix used to filter the blob - * names returned, if any. - */ - public String getPrefix() { - return prefix; - } - - /** - * Sets the optional blob name prefix filter value to use in a request. If - * this value is set, the server will return only blob names that match the - * prefix value in the response. - *

- * The prefix value only affects calls made on methods where this - * {@link ListBlobsOptions} instance is passed as a parameter. - * - * @param prefix - * A {@link String} containing a prefix to use to filter the blob - * names returned. - */ - public ListBlobsOptions setPrefix(String prefix) { - this.prefix = prefix; - return this; - } - - /** - * Gets the marker value set in this {@link ListBlobsOptions} instance. If - * this value is set, the server will return blob names beginning at the - * specified marker in the response. - * - * @return A {@link String} containing the marker value to use to specify - * the beginning of the request results, if any. - */ - public String getMarker() { - return marker; - } - - /** - * Sets the optional marker value to use in a request. If this value is set, - * the server will return blob names beginning at the specified marker in - * the response. Leave this value unset for an initial request. - *

- * The List Blobs operation returns a marker value in a - * NextMarker element if the blob list returned is not - * complete. The marker value may then be used in a subsequent call to - * request the next set of blob list items. The marker value is opaque to - * the client. - *

- * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method on a - * {@link ListBlobsResult} instance to get the marker value to set on a - * {@link ListBlobsOptions} instance using a call to this method. Pass the - * {@link ListBlobsOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobs(String, ListBlobsOptions)} call to get the - * next portion of the blob list. - *

- * The marker value only affects calls made on methods where this - * {@link ListBlobsOptions} instance is passed as a parameter. - * - * @param marker - * A {@link String} containing the marker value to use to specify - * the beginning of the request results. - * @return A reference to this {@link ListBlobsOptions} instance. - */ - public ListBlobsOptions setMarker(String marker) { - this.marker = marker; - return this; - } - - /** - * Gets the value of the maximum number of results to return set in this - * {@link ListBlobsOptions} instance. - * - * @return The maximum number of results to return. If the value is zero, - * the server will return up to 5,000 items. - */ - public int getMaxResults() { - return maxResults; - } - - /** - * Sets the optional maximum number of results to return for a request. If - * this value is set, the server will return up to this number of blob and - * blob prefix results in the response. If a value is not specified, or a - * value greater than 5,000 is specified, the server will return up to 5,000 - * items. - *

- * If there are more blobs and blob prefixes that can be returned than this - * maximum, the server returns a marker value in a - * NextMarker element in the response. The marker value may - * then be used in a subsequent call to request the next set of blob list - * items. The marker value is opaque to the client. - *

- * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method on a - * {@link ListBlobsResult} instance to get the marker value to set on a - * {@link ListBlobsOptions} instance using a call to - * {@link ListBlobsOptions#setMarker(String)}. Pass the - * {@link ListBlobsOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobs(String, ListBlobsOptions)} call to get the - * next portion of the blob list. - *

- * The maxResults value only affects calls made on methods where - * this {@link ListBlobsOptions} instance is passed as a parameter. - * - * @param maxResults - * The maximum number of results to return. - * @return A reference to this {@link ListBlobsOptions} instance. - */ - public ListBlobsOptions setMaxResults(int maxResults) { - this.maxResults = maxResults; - return this; - } - - /** - * Gets the value of the delimiter to use for grouping virtual blob - * hierarchy set in this {@link ListBlobsOptions} instance. - * - * @return A {@link String} containing the delimiter value, if any. - */ - public String getDelimiter() { - return delimiter; - } - - /** - * Sets the value of the optional delimiter to use for grouping in a virtual - * blob hierarchy. - *

- * When the request includes this optional parameter, the operation returns - * a blob prefix in a BlobPrefix element in the response - * that acts as a placeholder for all blobs whose names begin with the same - * substring up to the appearance of the delimiter character. The delimiter - * may be a single character or a string. - *

- * The delimiter parameter enables the caller to traverse the blob - * namespace by using a user-configured delimiter. In this way, you can - * traverse a virtual hierarchy of blobs as though it were a file system. - * The delimiter is a string that may be one or more characters long. When - * the request includes this parameter, the operation response includes one - * BlobPrefix element for each set of blobs whose names - * begin with a common substring up to the first appearance of the delimiter - * string that comes after any prefix specified for the request. The value - * of the BlobPrefix element is - * substring+delimiter, where substring is the - * common substring that begins one or more blob names, and - * delimiter is the value of the delimiter parameter. - *

- * The BlobPrefix elements in the response are accessed - * with the {@link ListBlobsResult#getBlobPrefixes()} method. You can use - * each value in the list returned to make a list blobs request for the - * blobs that begin with that blob prefix value, by specifying the value as - * the prefix option with a call to the - * {@link ListBlobsOptions#setPrefix(String) setPrefix} method on a - * {@link ListBlobsOptions} instance passed as a parameter to the request. - *

- * Note that each blob prefix returned in the response counts toward the - * maximum number of blob results, just as each blob does. - *

- * Note that if a delimiter is set, you cannot include snapshots. A request - * that includes both returns an InvalidQueryParameter error (HTTP status - * code 400 - Bad Request), which causes a {@link com.microsoft.windowsazure.exception.ServiceException} to be - * thrown. - *

- * The delimiter value only affects calls made on methods where - * this {@link ListBlobsOptions} instance is passed as a parameter. - * - * @param delimiter - * A {@link String} containing the delimiter value to use for - * grouping virtual blob hierarchy. - * @return A reference to this {@link ListBlobsOptions} instance. - */ - public ListBlobsOptions setDelimiter(String delimiter) { - this.delimiter = delimiter; - return this; - } - - /** - * Gets the value of a flag indicating whether to include blob metadata with - * a response set in this {@link ListBlobsOptions} instance. - * - * @return A value of true to include blob metadata with a - * response, otherwise, false. - */ - public boolean isIncludeMetadata() { - return includeMetadata; - } - - /** - * Sets the value of an optional flag indicating whether to include blob - * metadata with a response. - * - * @param includeMetadata - * Set a value of true to include blob metadata with - * a response, otherwise, false. - * @return A reference to this {@link ListBlobsOptions} instance. - */ - public ListBlobsOptions setIncludeMetadata(boolean includeMetadata) { - this.includeMetadata = includeMetadata; - return this; - } - - /** - * Gets the value of a flag indicating whether to include blob snapshots - * with a response set in this {@link ListBlobsOptions} instance. - * - * @return A value of true to include blob metadata with a - * response, otherwise, false. - */ - public boolean isIncludeSnapshots() { - return includeSnapshots; - } - - /** - * Sets the value of an optional flag indicating whether to include blob - * snapshots with a response. - *

- * Note that if this flag is set, you cannot set a delimiter. A request that - * includes both returns an InvalidQueryParameter error (HTTP status code - * 400 - Bad Request), which causes a {@link com.microsoft.windowsazure.exception.ServiceException} to be thrown. - * - * @param includeSnapshots - * Set a value of true to include blob metadata with - * a response, otherwise, false. - * @return A reference to this {@link ListBlobsOptions} instance. - */ - public ListBlobsOptions setIncludeSnapshots(boolean includeSnapshots) { - this.includeSnapshots = includeSnapshots; - return this; - } - - /** - * Gets the value of a flag indicating whether to include uncommitted blobs - * with a response set in this {@link ListBlobsOptions} instance. - * - * @return A value of true to include uncommitted blobs with a - * response, otherwise, false. - */ - public boolean isIncludeUncommittedBlobs() { - return includeUncommittedBlobs; - } - - /** - * Sets the value of an optional flag indicating whether to include - * uncommitted blobs with a response. Uncommitted blobs are blobs for which - * blocks have been uploaded, but which have not been committed with a - * request to - * {@link com.microsoft.windowsazure.services.blob.BlobContract#commitBlobBlocks(String, String, BlockList)} or - * {@link com.microsoft.windowsazure.services.blob.BlobContract#commitBlobBlocks(String, String, BlockList, CommitBlobBlocksOptions)} - * . - * - * @param includeUncommittedBlobs - * Set a value of true to include uncommitted blobs - * with a response, otherwise, false. - * @return A reference to this {@link ListBlobsOptions} instance. - */ - public ListBlobsOptions setIncludeUncommittedBlobs( - boolean includeUncommittedBlobs) { - this.includeUncommittedBlobs = includeUncommittedBlobs; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsResult.java deleted file mode 100644 index 0a967a92b342..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListBlobsResult.java +++ /dev/null @@ -1,590 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.services.blob.implementation.MetadataAdapter; - -/** - * A wrapper class for the response returned from a Blob Service REST API List - * Blobs operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobs(String)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobs(String, ListBlobsOptions)}. - *

- * See the List Blobs documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -@XmlRootElement(name = "EnumerationResults") -public class ListBlobsResult { - private List blobPrefixes = new ArrayList(); - private List blobs = new ArrayList(); - private String containerName; - private String prefix; - private String marker; - private String nextMarker; - private String delimiter; - private int maxResults; - - /** - * Gets the list of ListBlobsEntry entries generated from the - * server response to the list blobs request. - * - * @return The {@link List} of {@link ListBlobsEntry} entries generated from - * the server response to the list blobs request. - */ - @XmlElementWrapper(name = "Blobs") - @XmlElementRefs({ - @XmlElementRef(name = "BlobPrefix", type = BlobPrefixEntry.class), - @XmlElementRef(name = "Blob", type = BlobEntry.class) }) - public List getEntries() { - ArrayList result = new ArrayList(); - result.addAll(this.blobPrefixes); - result.addAll(this.blobs); - return result; - } - - /** - * Sets the lists of blob entries and blob prefix entries from a common list - * of ListBlobsEntry entries generated from the server response - * to the list blobs request. - * - * @param entries - * The {@link List} of {@link ListBlobsEntry} entries to set the - * lists of blob entries and blob prefix entries from. - */ - public void setEntries(List entries) { - // Split collection into "blobs" and "blobPrefixes" collections - this.blobPrefixes = new ArrayList(); - this.blobs = new ArrayList(); - - for (ListBlobsEntry entry : entries) { - if (entry instanceof BlobPrefixEntry) { - this.blobPrefixes.add((BlobPrefixEntry) entry); - } else if (entry instanceof BlobEntry) { - this.blobs.add((BlobEntry) entry); - } - } - } - - /** - * Gets the list of blob prefix entries that satisfied the request. Each - * BlobPrefixEntry represents one or more blobs that have a - * common substring up to the delimiter specified in the request options. - *

- * This list may contain only a portion of the blob prefix entries that - * satisfy the request, limited by a server timeout or a maximum results - * parameter. If there are more blob entries and blob prefix entries that - * could satisfy the result, the server returns a - * NextMarker element with the response. - *

- * The delimiter option enables the caller to traverse the blob namespace by - * using a user-configured delimiter. In this way, you can traverse a - * virtual hierarchy of blobs as though it were a file system. The delimiter - * may be a single character or a string. When the request includes the - * delimiter option, the response includes a BlobPrefixEntry in - * place of all blobs whose names begin with the same substring up to the - * appearance of the delimiter string. The value of - * {@link BlobPrefixEntry#getName()} is substring+ - * delimiter , where substring is the common substring - * that begins one or more blob names, and delimiter is the value - * of the delimiter option. - *

- * To move down a level in the virtual hierarchy, you can use the - * {@link BlobPrefixEntry#getName()} method to get the prefix value to use - * to make a subsequent call to list blobs that begin with this prefix. - *

- * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method to - * get this value and pass it as a marker option to a subsequent list blobs - * request to get the next set of blob results. - *

- * Blobs are listed in alphabetical order in the response body, with - * upper-case letters listed first. - * - * @return A {@link List} of {@link BlobEntry} instances for the blobs that - * satisfied the request. - */ - public List getBlobPrefixes() { - return this.blobPrefixes; - } - - /** - * Gets the list of blobs that satisfied the request from the response. This - * list may contain only a portion of the blobs that satisfy the request, - * limited by a server timeout or a maximum results parameter. If there are - * more blobs or blob prefixes that could satisfy the result, the server - * returns a NextMarker element with the response. - *

- * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method to - * get this value and pass it as a marker option to a subsequent list blobs - * request to get the next set of blob results. - *

- * Blobs are listed in alphabetical order in the response body, with - * upper-case letters listed first. - * - * @return A {@link List} of {@link BlobEntry} instances for the blobs that - * satisfied the request. - */ - public List getBlobs() { - return this.blobs; - } - - /** - * Gets the value of the filter used to return only blobs beginning with the - * prefix. This value is not set if a prefix was not specified in the list - * blobs request. - * - * @return A {@link String} containing the prefix used to filter the blob - * names returned, if any. - */ - @XmlElement(name = "Prefix") - public String getPrefix() { - return prefix; - } - - /** - * Reserved for internal use. Sets the filter used to return only blobs - * beginning with the prefix from the Prefix element - * returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param prefix - * A {@link String} containing the prefix used to filter the blob - * names returned, if any. - */ - public void setPrefix(String prefix) { - this.prefix = prefix; - } - - /** - * Gets the value of the marker that was used to specify the beginning of - * the container list to return with the request. This value is not set if a - * marker was not specified in the request. - *

- * The list blobs operation returns a marker value in a - * NextMarker element if the blob list returned is not - * complete. The marker value may then be used in a subsequent call to - * request the next set of blob list items. The marker value is opaque to - * the client. - *

- * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method to - * get the marker value to set on a {@link ListBlobsOptions} instance using - * a call to {@link ListBlobsOptions#setMarker(String)}. Pass the - * {@link ListBlobsOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobs(String, ListBlobsOptions) listBlobs} call - * to get the next portion of the blob list. - * - * @return A {@link String} containing the marker used to specify the - * beginning of the blob list returned, if any. - */ - @XmlElement(name = "Marker") - public String getMarker() { - return marker; - } - - /** - * Reserved for internal use. Sets the marker used to specify the beginning - * of the blob list to return from the Marker element - * returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param marker - * A {@link String} containing the marker used to specify the - * beginning of the blob list returned. - */ - public void setMarker(String marker) { - this.marker = marker; - } - - /** - * Gets the next marker value needed to specify the beginning of the next - * portion of the blob list to return, if any was set in the response from - * the server. - *

- * The list blobs operation returns a marker value in a - * NextMarker element if the blob list returned is not - * complete. The marker value may then be used in a subsequent call to - * request the next set of blob list items. The marker value is opaque to - * the client. - *

- * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method to - * get the marker value to set on a {@link ListBlobsOptions} instance using - * a call to {@link ListBlobsOptions#setMarker(String)}. Pass the - * {@link ListBlobsOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobs(String, ListBlobsOptions) listBlobs} call - * to get the next portion of the blob list. - * - * @return A {@link String} containing the next marker value needed to - * specify the beginning of the next portion of the blob list to - * return, if any was set in the response from the server. - */ - @XmlElement(name = "NextMarker") - public String getNextMarker() { - return nextMarker; - } - - /** - * Reserved for internal use. Sets the next marker value needed to specify - * the beginning of the next portion of the blob list to return from the - * NextMarker element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param nextMarker - * A {@link String} containing the next marker value needed to - * specify the beginning of the next portion of the blob list to - * return. - */ - public void setNextMarker(String nextMarker) { - this.nextMarker = nextMarker; - } - - /** - * Gets the maximum results to return used to generate the response, if - * present. The number of entries returned in the response will not exceed - * this number, including all BlobPrefix elements. This - * value is not set if a maximum number was not specified in the request. If - * the request does not specify this parameter or specifies a value greater - * than 5,000, the server will return up to 5,000 items. If there are more - * blobs or blob prefixes that satisfy the request than this maximum value, - * the server will include a next marker value in the response, which can be - * used to get the remaining blobs with a subsequent request. - *

- * Use the {@link ListBlobsResult#getNextMarker() getNextMarker} method to - * get the marker value to set on a {@link ListBlobsOptions} instance using - * a call to {@link ListBlobsOptions#setMarker(String)}. Pass the - * {@link ListBlobsOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listBlobs(String, ListBlobsOptions) listBlobs} call - * to get the next portion of the blob list. - * - * @return The maximum results to return value in the response, if any. - */ - @XmlElement(name = "MaxResults") - public int getMaxResults() { - return maxResults; - } - - /** - * Reserved for internal use. Sets the maximum results to return value from - * the MaxResults element of the - * EnumerationResults element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param maxResults - * The maximum results to return value in the response, if any. - */ - public void setMaxResults(int maxResults) { - this.maxResults = maxResults; - } - - /** - * Gets the delimiter value used to generate the response, if present. When - * the request includes this parameter, the operation returns - * BlobPrefix elements in the response body that act as a - * placeholder for all blobs whose names begin with the same substring up to - * the appearance of the delimiter character. - * - * @return A {@link String} containing the delimiter value used as a request - * parameter. - */ - @XmlElement(name = "Delimiter") - public String getDelimiter() { - return delimiter; - } - - /** - * Reserved for internal use. Sets the delimiter value from the - * Delimiter element of the - * EnumerationResults element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param delimiter - * A {@link String} containing the delimiter value in the - * response, if any. - */ - public void setDelimiter(String delimiter) { - this.delimiter = delimiter; - } - - /** - * Gets the container URI. This value is returned in the - * ContainerName attribute of the - * EnumerationResults element returned in the response. - * - * @return A {@link String} containing the container URI. - */ - @XmlAttribute(name = "ContainerName") - public String getContainerName() { - return containerName; - } - - /** - * Reserved for internal use. Sets the container URI value from the - * ContainerName attribute of the - * EnumerationResults element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param containerName - * A {@link String} containing the container URI. - */ - public void setContainerName(String containerName) { - this.containerName = containerName; - } - - /** - * The abstract base class for Blob and BlobPrefix - * entries in the list of results returned in the response. - */ - public abstract static class ListBlobsEntry { - - } - - /** - * Represents a BlobPrefix element returned in the - * response. When the request includes a delimiter parameter, a single - * BlobPrefix element is returned in place of all blobs - * whose names begin with the same substring up to the appearance of the - * delimiter character. - */ - @XmlRootElement(name = "BlobPrefix") - public static class BlobPrefixEntry extends ListBlobsEntry { - private String name; - - /** - * Gets the value of the Name element within a - * BlobPrefix element returned in the response. The - * value of the element is substring+delimiter, where - * substring is the common substring that begins one or more - * blob names, and delimiter is the value of the delimiter - * parameter. - * - * @return A {@link String} containing the common substring that begins - * one or more blob names up to and including the delimiter - * specified in the request. - */ - @XmlElement(name = "Name") - public String getName() { - return name; - } - - /** - * Reserved for internal use. Sets the blob prefix name from the - * Name element in the BlobPrefix - * element in the Blobs list in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param name - * A {@link String} containing the value of the - * Name element within a - * BlobPrefix element. - */ - public void setName(String name) { - this.name = name; - } - } - - /** - * Represents a Blob element returned in the response. A - * BlobEntry includes committed blobs, and can optionally - * include blob metadata, blob snapshots, and uncommitted blobs, depending - * on the request options set. - */ - @XmlRootElement(name = "Blob") - public static class BlobEntry extends ListBlobsEntry { - private String name; - private String url; - private String snapshot; - private HashMap metadata = new HashMap(); - private BlobProperties properties; - - /** - * Gets the value of the Name element within a - * Blob element returned in the response. The value of - * the element is the complete name of the blob, including any virtual - * hierarchy. - * - * @return A {@link String} containing the complete blob name. - */ - @XmlElement(name = "Name") - public String getName() { - return name; - } - - /** - * Reserved for internal use. Sets the blob name from the - * Name element in the Blob element in - * the Blobs list in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param name - * A {@link String} containing the value of the - * Name element within a - * Blob element. - */ - public void setName(String name) { - this.name = name; - } - - /** - * Gets the value of the Url element within a - * Blob element returned in the response. The value of - * the element is the complete URI address of the blob, including any - * virtual hierarchy. - * - * @return A {@link String} containing the complete URI address of the - * blob. - */ - @XmlElement(name = "Url") - public String getUrl() { - return url; - } - - /** - * Reserved for internal use. Sets the blob URI address from the - * Uri element in the Blob element in - * the Blobs list in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param url - * A {@link String} containing the complete URI address of - * the blob. - */ - public void setUrl(String url) { - this.url = url; - } - - /** - * Gets a {@link BlobProperties} instance with the blob properties - * returned in the response. - * - * @return A {@link BlobProperties} instance with the blob properties - * returned in the response. - */ - @XmlElement(name = "Properties") - public BlobProperties getProperties() { - return properties; - } - - /** - * Reserved for internal use. Sets the blob properties from the - * Uri element in the Blob element in - * the Blobs list in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param properties - * A {@link BlobProperties} instance with the blob properties - * returned in the response. - */ - public void setProperties(BlobProperties properties) { - this.properties = properties; - } - - /** - * Gets the snapshot timestamp value for a blob snapshot returned in the - * response. The value is set from the Snapshot element - * in the Blob element in the Blobs - * list in the response. Snapshots are included in the enumeration only - * if specified in the request options. Snapshots are listed from oldest - * to newest in the response. - * - * @return A {@link String} containing the snapshot timestamp of the - * blob snapshot. - */ - @XmlElement(name = "Snapshot") - public String getSnapshot() { - return snapshot; - } - - /** - * Reserved for internal use. Sets the blob snapshot timestamp from the - * Snapshot element in the Blob - * element in the Blobs list in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param snapshot - * A {@link String} containing the snapshot timestamp of the - * blob snapshot. - */ - public void setSnapshot(String snapshot) { - this.snapshot = snapshot; - } - - /** - * Gets the blob's metadata collection set in the - * Metadata element in the Blob - * element in the Blobs list in the response. Metadata - * is included in the enumeration only if specified in the request - * options. - * - * @return A {@link HashMap} of name-value pairs of {@link String} - * containing the blob metadata set, if any. - */ - @XmlElement(name = "Metadata") - @XmlJavaTypeAdapter(MetadataAdapter.class) - public HashMap getMetadata() { - return metadata; - } - - /** - * Reserved for internal use. Sets the blob metadata from the - * Metadata element in the Blob - * element in the Blobs list in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param metadata - * A {@link java.util.HashMap} of name-value pairs of - * {@link String} containing the names and values of the blob - * metadata, if present. - */ - public void setMetadata(HashMap metadata) { - this.metadata = metadata; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersOptions.java deleted file mode 100644 index 624ed9882883..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersOptions.java +++ /dev/null @@ -1,191 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listContainers(ListContainersOptions) listContainers} - * request. These options include a server response timeout for the request, a - * container name prefix filter, a marker for continuing requests, the maximum - * number of results to return in a request, and whether to include container - * metadata in the results. Options that are not set will not be passed to the - * server with a request. - */ -public class ListContainersOptions extends BlobServiceOptions { - private String prefix; - private String marker; - private int maxResults; - private boolean includeMetadata; - - /** - * Sets the optional server request timeout value associated with this - * {@link ListContainersOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link ListContainersOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link ListContainersOptions} instance. - */ - @Override - public ListContainersOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the container name prefix filter value set in this - * {@link ListContainersOptions} instance. - * - * @return A {@link String} containing the container name prefix value, if - * any. - */ - public String getPrefix() { - return prefix; - } - - /** - * Sets the optional container name prefix filter value to use in a request. - * If this value is set, the server will return only container names that - * match the prefix value in the response. - *

- * The prefix value only affects calls made on methods where this - * {@link ListContainersOptions} instance is passed as a parameter. - * - * @param prefix - * A {@link String} containing the container name prefix value to - * use to filter the request results. - * @return A reference to this {@link ListContainersOptions} instance. - */ - public ListContainersOptions setPrefix(String prefix) { - this.prefix = prefix; - return this; - } - - /** - * Gets the marker value set in this {@link ListContainersOptions} instance. - * - * @return A {@link String} containing the marker value to use to specify - * the beginning of the request results. - */ - public String getMarker() { - return marker; - } - - /** - * Sets the optional marker value to use in a request. If this value is set, - * the server will return container names beginning at the specified marker - * in the response. - *

- * The List Containers operation returns a marker value in a - * NextMarker element if the container list returned is not - * complete. The marker value may then be used in a subsequent call to - * request the next set of container list items. The marker value is opaque - * to the client. - *

- * Use the {@link ListContainersResult#getNextMarker() getNextMarker} method - * on a {@link ListContainersResult} instance to get the marker value to set - * on a {@link ListContainersOptions} instance using a call to this method. - * Pass the {@link ListContainersOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listContainers(ListContainersOptions)} call to get - * the next portion of the container list. - *

- * The marker value only affects calls made on methods where this - * {@link ListContainersOptions} instance is passed as a parameter. - * - * @param marker - * A {@link String} containing the marker value to use to specify - * the beginning of the request results. - * @return A reference to this {@link ListContainersOptions} instance. - */ - public ListContainersOptions setMarker(String marker) { - this.marker = marker; - return this; - } - - /** - * Gets the value of the maximum number of results to return set in this - * {@link ListContainersOptions} instance. - * - * @return The maximum number of results to return. - */ - public int getMaxResults() { - return maxResults; - } - - /** - * Sets the optional maximum number of results to return for a request. If - * this value is set, the server will return up to this number of results in - * the response. If a value is not specified, or a value greater than 5,000 - * is specified, the server will return up to 5,000 items. - *

- * If there are more containers than this value that can be returned, the - * server returns a marker value in a NextMarker element in - * the response. The marker value may then be used in a subsequent call to - * request the next set of container list items. The marker value is opaque - * to the client. - *

- * Use the {@link ListContainersResult#getNextMarker() getNextMarker} method - * on a {@link ListContainersResult} instance to get the marker value to set - * on a {@link ListContainersOptions} instance using a call to - * {@link ListContainersOptions#setMarker(String)}. Pass the - * {@link ListContainersOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listContainers(ListContainersOptions)} call to get - * the next portion of the container list. - *

- * The maxResults value only affects calls made on methods where - * this {@link ListContainersOptions} instance is passed as a parameter. - * - * @param maxResults - * The maximum number of results to return. - * @return A reference to this {@link ListContainersOptions} instance. - */ - public ListContainersOptions setMaxResults(int maxResults) { - this.maxResults = maxResults; - return this; - } - - /** - * Gets the value of a flag set in this {@link ListContainersOptions} - * instance indicating whether to include container metadata in the response - * to the request. - * - * @return true to include container metadata in the response - * to the request. - */ - public boolean isIncludeMetadata() { - return includeMetadata; - } - - /** - * Sets the value of an optional flag indicating whether to include - * container metadata with the response to the request. - *

- * The includeMetadata value only affects calls made on methods - * where this {@link ListContainersOptions} instance is passed as a - * parameter. - * - * @param includeMetadata - * Set to true to include container metadata in the - * response to the request. - * @return A reference to this {@link ListContainersOptions} instance. - */ - public ListContainersOptions setIncludeMetadata(boolean includeMetadata) { - this.includeMetadata = includeMetadata; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersResult.java deleted file mode 100644 index 17421846bb3e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ListContainersResult.java +++ /dev/null @@ -1,449 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; -import java.util.HashMap; -import java.util.List; - -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.core.RFC1123DateAdapter; -import com.microsoft.windowsazure.services.blob.implementation.MetadataAdapter; - -/** - * A wrapper class for the response returned from a Blob Service REST API List - * Containers operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listContainers} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listContainers(ListContainersOptions)}. - *

- * See the List Containers documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -@XmlRootElement(name = "EnumerationResults") -public class ListContainersResult { - private List containers; - private String accountName; - private String prefix; - private String marker; - private String nextMarker; - private int maxResults; - - /** - * Gets the container list returned in the response. - * - * @return A {@link List} of {@link Container} instances representing the - * blob containers returned by the request. - */ - @XmlElementWrapper(name = "Containers") - @XmlElement(name = "Container") - public List getContainers() { - return containers; - } - - /** - * Reserved for internal use. Sets the container list from the - * Containers element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param value - * A {@link List} of {@link Container} instances representing the - * blob containers returned by the request. - */ - public void setContainers(List value) { - this.containers = value; - } - - /** - * Gets the base URI for invoking Blob Service REST API operations on the - * storage account. - * - * @return A {@link String} containing the base URI for Blob Service REST - * API operations on the storage account. - */ - @XmlAttribute(name = "AccountName") - public String getAccountName() { - return accountName; - } - - /** - * Reserved for internal use. Sets the base URI for invoking Blob Service - * REST API operations on the storage account from the value of the - * AccountName attribute of the - * EnumerationResults element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param accountName - * A {@link String} containing the base URI for Blob Service REST - * API operations on the storage account. - */ - public void setAccountName(String accountName) { - this.accountName = accountName; - } - - /** - * Gets the value of the filter used to return only containers beginning - * with the prefix. This value is not set if a prefix was not specified in - * the list containers request. - * - * @return A {@link String} containing the prefix used to filter the - * container names returned, if any. - */ - @XmlElement(name = "Prefix") - public String getPrefix() { - return prefix; - } - - /** - * Reserved for internal use. Sets the filter used to return only containers - * beginning with the prefix from the Prefix element - * returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param prefix - * A {@link String} containing the prefix used to filter the - * container names returned, if any. - */ - public void setPrefix(String prefix) { - this.prefix = prefix; - } - - /** - * Gets the value of the marker that was used to specify the beginning of - * the container list to return with the request. This value is not set if a - * marker was not specified in the request. - *

- * The List Containers operation returns a marker value in a - * NextMarker element if the container list returned is not - * complete. The marker value may then be used in a subsequent call to - * request the next set of container list items. The marker value is opaque - * to the client. - *

- * Use the {@link ListContainersResult#getNextMarker() getNextMarker} method - * to get the marker value to set on a {@link ListContainersOptions} - * instance using a call to {@link ListContainersOptions#setMarker(String)}. - * Pass the {@link ListContainersOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listContainers(ListContainersOptions)} call to get - * the next portion of the container list. - * - * @return A {@link String} containing the marker used to specify the - * beginning of the container list returned, if any. - */ - @XmlElement(name = "Marker") - public String getMarker() { - return marker; - } - - /** - * Reserved for internal use. Sets the marker used to specify the beginning - * of the container list to return from the Marker element - * returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param marker - * A {@link String} containing the marker used to specify the - * beginning of the container list returned. - */ - public void setMarker(String marker) { - this.marker = marker; - } - - /** - * Gets the next marker value needed to specify the beginning of the next - * portion of the container list to return, if any was set in the response - * from the server. - *

- * The List Containers operation returns a marker value in a - * NextMarker element if the container list returned is not - * complete. The marker value may then be used in a subsequent call to - * request the next set of container list items. The marker value is opaque - * to the client. - *

- * Use the {@link ListContainersResult#getNextMarker() getNextMarker} method - * to get the marker value to set on a {@link ListContainersOptions} - * instance using a call to {@link ListContainersOptions#setMarker(String)}. - * Pass the {@link ListContainersOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listContainers(ListContainersOptions)} call to get - * the next portion of the container list. - * - * @return A {@link String} containing the next marker value needed to - * specify the beginning of the next portion of the container list - * to return, if any was set in the response from the server. - */ - @XmlElement(name = "NextMarker") - public String getNextMarker() { - return nextMarker; - } - - /** - * Reserved for internal use. Sets the next marker value needed to specify - * the beginning of the next portion of the container list to return from - * the NextMarker element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param nextMarker - * A {@link String} containing the next marker value needed to - * specify the beginning of the next portion of the container - * list to return. - */ - public void setNextMarker(String nextMarker) { - this.nextMarker = nextMarker; - } - - /** - * Gets the maximum number of container list items to return that was - * specified in the request. The number of containers returned in a single - * response will not exceed this value. This value is not set if a maximum - * number was not specified in the request. If there are more containers - * that satisfy the request than this maximum value, the server will include - * a next marker value in the response, which can be used to get the - * remaining containers with a subsequent request. - *

- * Use the {@link ListContainersResult#getNextMarker() getNextMarker} method - * to get the marker value to set on a {@link ListContainersOptions} - * instance using a call to {@link ListContainersOptions#setMarker(String)}. - * Pass the {@link ListContainersOptions} instance as a parameter to a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#listContainers(ListContainersOptions)} call to get - * the next portion of the container list. - * - * @return The maximum number of container list items to return that was - * specified in the request, if any. - */ - @XmlElement(name = "MaxResults") - public int getMaxResults() { - return maxResults; - } - - /** - * Reserved for internal use. Sets the maximum number of container list - * items to return that was specified in the request from the - * MaxResults element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param maxResults - * The maximum number of container list items to return that was - * specified in the request, if any. - */ - public void setMaxResults(int maxResults) { - this.maxResults = maxResults; - } - - /** - * Represents a container for blob storage returned by the server. A - * {@link Container} instance contains a copy of the container properties - * and metadata in the storage service as of the time the container list was - * requested. - */ - public static class Container { - private String name; - private String url; - private HashMap metadata = new HashMap(); - private ContainerProperties properties; - - /** - * Gets the name of the container. - * - * @return A {@link String} containing the name of the container. - */ - @XmlElement(name = "Name") - public String getName() { - return name; - } - - /** - * Reserved for internal use. Sets the name of the container from the - * Name element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param name - * A {@link String} containing the name of the container. - */ - public void setName(String name) { - this.name = name; - } - - /** - * Gets the URI of the container. - * - * @return A {@link String} containing the URI of the container. - */ - @XmlElement(name = "Url") - public String getUrl() { - return url; - } - - /** - * Reserved for internal use. Sets the URI of the container from the - * Url element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param url - * A {@link String} containing the URI of the container. - */ - public void setUrl(String url) { - this.url = url; - } - - /** - * Gets the container properties. The container properties include the - * last modified time and an ETag value. - * - * @return A {@link ContainerProperties} instance containing the - * properties associated with the container. - */ - @XmlElement(name = "Properties") - public ContainerProperties getProperties() { - return properties; - } - - /** - * Reserved for internal use. Sets the container properties from the - * Properties element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param properties - * A {@link ContainerProperties} instance containing the - * properties associated with the container. - */ - public void setProperties(ContainerProperties properties) { - this.properties = properties; - } - - /** - * Gets the container metadata as a map of name and value pairs. The - * container metadata is for client use and is opaque to the server. - * - * @return A {@link java.util.HashMap} of key-value pairs of - * {@link String} containing the names and values of the - * container metadata. - */ - @XmlElement(name = "Metadata") - @XmlJavaTypeAdapter(MetadataAdapter.class) - public HashMap getMetadata() { - return metadata; - } - - /** - * Reserved for internal use. Sets the container metadata from the - * Metadata element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param metadata - * A {@link java.util.HashMap} of key-value pairs of - * {@link String} containing the names and values of the - * container metadata. - */ - public void setMetadata(HashMap metadata) { - this.metadata = metadata; - } - } - - /** - * Represents the properties of a container for blob storage returned by the - * server. A {@link ContainerProperties} instance contains a copy of the - * container properties in the storage service as of the time the container - * list was requested. - */ - public static class ContainerProperties { - private Date lastModified; - private String etag; - - /** - * Gets the last modifed time of the container. This value can be used - * when updating or deleting a container using an optimistic concurrency - * model to prevent the client from modifying data that has been changed - * by another client. - * - * @return A {@link java.util.Date} containing the last modified time of - * the container. - */ - @XmlElement(name = "Last-Modified") - @XmlJavaTypeAdapter(RFC1123DateAdapter.class) - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the - * container from the Last-Modified element returned in - * the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time - * of the container. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - /** - * Gets the ETag of the container. This value can be used when updating - * or deleting a container using an optimistic concurrency model to - * prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link String} containing the server-assigned ETag value - * for the container. - */ - @XmlElement(name = "Etag") - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag of the container from the - * ETag element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob - * Service REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value - * for the container. - */ - public void setEtag(String etag) { - this.etag = etag; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/PageRange.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/PageRange.java deleted file mode 100644 index 044b44cffb29..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/PageRange.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import javax.xml.bind.annotation.XmlElement; - -/** - * Represents the range of bytes in a single page within a page blob. - *

- * For a page update operation, the page range can be up to 4 MB in size. For a - * page clear operation, the page range can be up to the value of the blob's - * full size. - *

- * Pages are aligned with 512-byte boundaries. When specifying a page range, the - * start offset must be a modulus of 512 and the end offset must be a modulus of - * 512 - 1. Examples of valid byte ranges are 0-511, 512-1023, etc. - */ -public class PageRange { - private long start; - private long end; - - /** - * Default constructor. The start and end values must be set for this - * {@link PageRange} instance to be valid. - */ - public PageRange() { - } - - /** - * Creates a page range from the specified start and end byte offsets, - * inclusive. - *

- * Pages are aligned with 512-byte boundaries. When specifying a page range, - * the start offset must be a modulus of 512 and the end offset must be a - * modulus of 512 - 1. Examples of valid byte ranges are 0-511, 512-1023, - * etc. - * - * @param start - * The beginning offset value in bytes for the page range, - * inclusive. - * @param end - * The ending offset value in bytes for the page range, - * inclusive. - */ - public PageRange(long start, long end) { - this.start = start; - this.end = end; - } - - /** - * Gets the byte offset of the start of the page range within the blob, - * inclusive. - * - * @return The beginning offset value in bytes for the page range, - * inclusive. - */ - @XmlElement(name = "Start") - public long getStart() { - return start; - } - - /** - * Sets the byte offset of the start of the page range within the blob, - * inclusive. - *

- * Pages are aligned with 512-byte boundaries. When specifying a page range, - * the start offset must be a modulus of 512 and the end offset must be a - * modulus of 512 - 1. Examples of valid byte ranges are 0-511, 512-1023, - * etc. - * - * @param start - * The beginning offset value in bytes for the page range, - * inclusive. - * @return A reference to this {@link PageRange} instance. - */ - public PageRange setStart(long start) { - this.start = start; - return this; - } - - /** - * Gets the byte offset of the end of the page range within the blob, - * inclusive. - * - * @return The ending offset value in bytes for the page range, inclusive. - */ - @XmlElement(name = "End") - public long getEnd() { - return end; - } - - /** - * Sets the byte offset of the end of the page range within the blob, - * inclusive. - *

- * Pages are aligned with 512-byte boundaries. When specifying a page range, - * the start offset must be a modulus of 512 and the end offset must be a - * modulus of 512 - 1. Examples of valid byte ranges are 0-511, 512-1023, - * etc. - * - * @param end - * The ending offset value in bytes for the page range, - * inclusive. - * @return A reference to this {@link PageRange} instance. - */ - public PageRange setEnd(long end) { - this.end = end; - return this; - } - - /** - * Gets the size of the page range in bytes. - * - * @return The size of the page range in bytes. - */ - public long getLength() { - return end - start + 1; - } - - /** - * Sets the length of the page range in bytes. This updates the byte offset - * of the end of the page range to the start value plus the length specified - * by the value parameter. The length must be a positive multiple - * of 512 bytes. - *

- * Pages are aligned with 512-byte boundaries. When specifying a page range, - * the start offset must be a modulus of 512 and the end offset must be a - * modulus of 512 - 1. Examples of valid byte ranges are 0-511, 512-1023, - * etc. - * - * @param value - * The ending offset value in bytes for the page range, - * inclusive. - * @return A reference to this {@link PageRange} instance. - */ - public PageRange setLength(long value) { - this.end = this.start + value - 1; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ServiceProperties.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ServiceProperties.java deleted file mode 100644 index 778e5051ae6f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/ServiceProperties.java +++ /dev/null @@ -1,419 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * Represents the Blob service properties that can be set on a storage account, - * including Windows Azure Storage Analytics. This class is used by the - * {@link com.microsoft.windowsazure.services.blob.BlobContract#getServiceProperties()} method to return the service - * property values set on the storage account, and by the - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setServiceProperties(ServiceProperties)} and - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setServiceProperties(ServiceProperties, BlobServiceOptions)} - * methods to set the values of the service properties. - */ -@XmlRootElement(name = "StorageServiceProperties") -public class ServiceProperties { - private Logging logging = new Logging(); - private Metrics metrics = new Metrics(); - private String defaultServiceVersion; - - /** - * Gets the value of the logging options on the storage account. - * - * @return A {@link Logging} instance containing the logging options. - */ - @XmlElement(name = "Logging") - public Logging getLogging() { - return logging; - } - - /** - * Sets the value of the logging options on the storage account. - * - * @param logging - * A {@link Logging} instance containing the logging options. - * @return A reference to this {@link ServiceProperties} instance. - */ - public ServiceProperties setLogging(Logging logging) { - this.logging = logging; - return this; - } - - /** - * Gets the value of the metrics options on the storage account. - * - * @return A {@link Metrics} instance containing the metrics options. - */ - @XmlElement(name = "Metrics") - public Metrics getMetrics() { - return metrics; - } - - /** - * Sets the value of the metrics options on the storage account. - * - * @param metrics - * A {@link Metrics} instance containing the metrics options. - * @return A reference to this {@link ServiceProperties} instance. - */ - public ServiceProperties setMetrics(Metrics metrics) { - this.metrics = metrics; - return this; - } - - /** - * Gets the default service version string used for operations on the - * storage account. - * - * @return A {@link String} containing the default service version string - * used for operations on the storage account. - */ - @XmlElement(name = "DefaultServiceVersion") - public String getDefaultServiceVersion() { - return defaultServiceVersion; - } - - /** - * Sets the default service version string used for operations on the - * storage account. This value is optional for a set service properties - * request. Allowed values include version 2009-09-19 and more recent - * versions. - *

- * See Storage Services Versioning on MSDN for more information on - * applicable versions. - * - * @param defaultServiceVersion - * A {@link String} containing the default service version string - * used for operations on the storage account. - * @return A reference to this {@link ServiceProperties} instance. - */ - public ServiceProperties setDefaultServiceVersion( - String defaultServiceVersion) { - this.defaultServiceVersion = defaultServiceVersion; - return this; - } - - /** - * Represents the logging options that can be set on a storage account. - */ - public static class Logging { - private String version; - private Boolean delete; - private Boolean read; - private Boolean write; - private RetentionPolicy retentionPolicy; - - /** - * Gets the retention policy for logging data set on the storage - * account. - * - * @return The {@link RetentionPolicy} set on the storage account. - */ - @XmlElement(name = "RetentionPolicy") - public RetentionPolicy getRetentionPolicy() { - return retentionPolicy; - } - - /** - * Sets the retention policy to use for logging data on the storage - * account. - * - * @param retentionPolicy - * The {@link RetentionPolicy} to set on the storage account. - * @return A reference to this {@link Logging} instance. - */ - public Logging setRetentionPolicy(RetentionPolicy retentionPolicy) { - this.retentionPolicy = retentionPolicy; - return this; - } - - /** - * Gets a flag indicating whether all write requests are logged. - * - * @return A flag value of true if all write operations are - * logged; otherwise, false. - */ - @XmlElement(name = "Write") - public boolean isWrite() { - return write; - } - - /** - * Sets a flag indicating whether all write requests should be logged. - * - * @param write - * Set a flag value of true to log all write - * operations; otherwise, false. - * @return A reference to this {@link Logging} instance. - */ - public Logging setWrite(boolean write) { - this.write = write; - return this; - } - - /** - * Gets a flag indicating whether all read requests are logged. - * - * @return A flag value of true if all read operations are - * logged; otherwise, false. - */ - @XmlElement(name = "Read") - public boolean isRead() { - return read; - } - - /** - * Sets a flag indicating whether all read requests should be logged. - * - * @param read - * Set a flag value of true to log all read - * operations; otherwise, false. - * @return A reference to this {@link Logging} instance. - */ - public Logging setRead(boolean read) { - this.read = read; - return this; - } - - /** - * Gets a flag indicating whether all delete requests are logged. - * - * @return A flag value of true if all delete operations - * are logged; otherwise, false. - */ - @XmlElement(name = "Delete") - public boolean isDelete() { - return delete; - } - - /** - * Sets a flag indicating whether all delete requests should be logged. - * - * @param delete - * Set a flag value of true to log all delete - * operations; otherwise, false. - * @return A reference to this {@link Logging} instance. - */ - public Logging setDelete(boolean delete) { - this.delete = delete; - return this; - } - - /** - * Gets the version of logging configured on the storage account. - * - * @return A {@link String} containing the version of logging configured - * on the storage account. - */ - @XmlElement(name = "Version") - public String getVersion() { - return version; - } - - /** - * Sets the version of logging configured on the storage account. - * - * @param version - * A {@link String} containing the version of logging - * configured on the storage account. - * @return A reference to this {@link Logging} instance. - */ - public Logging setVersion(String version) { - this.version = version; - return this; - } - } - - /** - * Represents the metrics options that can be set on a storage account. - */ - public static class Metrics { - private String version; - private boolean enabled; - private Boolean includeAPIs; - private RetentionPolicy retentionPolicy; - - /** - * Gets the retention policy for metrics data set on the storage - * account. - * - * @return The {@link RetentionPolicy} set on the storage account. - */ - @XmlElement(name = "RetentionPolicy") - public RetentionPolicy getRetentionPolicy() { - return retentionPolicy; - } - - /** - * Sets the retention policy to use for metrics data on the storage - * account. - * - * @param retentionPolicy - * The {@link RetentionPolicy} to set on the storage account. - * @return A reference to this {@link Metrics} instance. - */ - public Metrics setRetentionPolicy(RetentionPolicy retentionPolicy) { - this.retentionPolicy = retentionPolicy; - return this; - } - - /** - * Gets a flag indicating whether metrics generates summary statistics - * for called API operations. - * - * @return A flag value of true if metrics generates - * summary statistics for called API operations; otherwise, - * false. - */ - @XmlElement(name = "IncludeAPIs") - public Boolean isIncludeAPIs() { - return includeAPIs; - } - - /** - * Sets a flag indicating whether metrics should generate summary - * statistics for called API operations. This flag is optional if - * metrics is not enabled. - * - * @param includeAPIs - * Set a flag value of true to generate summary - * statistics for called API operations; otherwise, - * false. - * @return A reference to this {@link Metrics} instance. - */ - public Metrics setIncludeAPIs(Boolean includeAPIs) { - this.includeAPIs = includeAPIs; - return this; - } - - /** - * Gets a flag indicating whether metrics is enabled for the storage - * account. - * - * @return A flag value of true if metrics is enabled for - * the storage account; otherwise, false. - */ - @XmlElement(name = "Enabled") - public boolean isEnabled() { - return enabled; - } - - /** - * Sets a flag indicating whether to enable metrics for the storage - * account. - * - * @param enabled - * Set a flag value of true to enable metrics - * for the storage account; otherwise, false. - * @return A reference to this {@link Metrics} instance. - */ - public Metrics setEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Gets the version of Storage Analytics configured on the storage - * account. - * - * @return A {@link String} containing the version of Storage Analytics - * configured on the storage account. - */ - @XmlElement(name = "Version") - public String getVersion() { - return version; - } - - /** - * Sets the version of Storage Analytics configured on the storage - * account. - * - * @param version - * A {@link String} containing the version of Storage - * Analytics configured on the storage account. - * @return A reference to this {@link Metrics} instance. - */ - public Metrics setVersion(String version) { - this.version = version; - return this; - } - } - - /** - * Represents the optional retention policy that can be applied to logging - * or metrics on the storage account. - */ - public static class RetentionPolicy { - private boolean enabled; - private Integer days; // nullable, because optional if "enabled" is - // false - - /** - * Gets the number of days that metrics or logging data should be - * retained, if logging is enabled. - * - * @return The number of days to retain logging or metrics data if - * logging is enabled, or null. - */ - @XmlElement(name = "Days") - public Integer getDays() { - return days; - } - - /** - * Sets the number of days that metrics or logging data should be - * retained. The minimum value you can specify is 1; the largest value - * is 365 (one year). This value must be specified even if the enabled - * flag is set to false. - * - * @param days - * The number of days to retain logging or metrics data. - * @return A reference to this {@link RetentionPolicy} instance. - */ - public RetentionPolicy setDays(Integer days) { - this.days = days; - return this; - } - - /** - * Gets a flag indicating whether a retention policy is enabled. - * - * @return A flag value of true if a retention policy is - * enabled; otherwise, false. - */ - @XmlElement(name = "Enabled") - public boolean isEnabled() { - return enabled; - } - - /** - * Sets a flag indicating whether to enable a retention policy. - * - * @param enabled - * Set a flag value of true to enable a - * retention policy; otherwise, false. - * @return A reference to this {@link RetentionPolicy} instance. - */ - public RetentionPolicy setEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataOptions.java deleted file mode 100644 index 0d7f5f24b2ec..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataOptions.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setBlobMetadata(String, String, java.util.HashMap, SetBlobMetadataOptions) - * setBlobMetadata} request. These options include an optional server timeout - * for the operation, a blob lease ID, and any access conditions for the - * operation. - */ -public class SetBlobMetadataOptions extends BlobServiceOptions { - private String leaseId; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link SetBlobMetadataOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link SetBlobMetadataOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link SetBlobMetadataOptions} instance. - */ - @Override - public SetBlobMetadataOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link SetBlobMetadataOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets an optional lease ID value to match when setting metadata of the - * blob. If set, the lease must be active and the value must match the lease - * ID set on the leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobMetadataOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link SetBlobMetadataOptions} instance. - */ - public SetBlobMetadataOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the access conditions set in this {@link SetBlobMetadataOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions for setting the metadata of a blob. By - * default, the set blob metadata operation will set the metadata - * unconditionally. Use this method to specify conditions on the ETag or - * last modified time value for performing the operation. - *

- * The accessCondition value only affects calls made on methods - * where this {@link SetBlobMetadataOptions} instance is passed as a - * parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link SetBlobMetadataOptions} instance. - */ - public SetBlobMetadataOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataResult.java deleted file mode 100644 index a75d488f8ab4..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobMetadataResult.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; - -/** - * A wrapper class for the response returned from a Blob Service REST API Set - * Blob Metadata operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setBlobMetadata(String, String, java.util.HashMap, SetBlobMetadataOptions)} - * . - *

- * See the Set - * Blob Metadata documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class SetBlobMetadataResult { - private String etag; - private Date lastModified; - - /** - * Gets the ETag of the blob. - *

- * This value can be used in an access condition when updating or deleting a - * blob to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag of the blob from the - * ETag element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the last modified time of the blob. - *

- * Any operation that modifies the blob, including updates to the blob's - * metadata or properties, changes the last modified time of the blob. This - * value can be used in an access condition when updating or deleting a blob - * to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link java.util.Date} containing the last modified time of the - * page blob. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the blob from - * the Last-Modified element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the blob. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesOptions.java deleted file mode 100644 index 12efe7b7055c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesOptions.java +++ /dev/null @@ -1,388 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setBlobProperties(String, String, SetBlobPropertiesOptions) - * setBlobProperties} request. These options include an optional server timeout - * for the operation, the MIME content type and content encoding for the blob, - * the content length, the content language, the MD5 hash, a cache control - * value, a blob lease ID, a sequence number and sequence number action value, - * and any access conditions for the operation. - */ -public class SetBlobPropertiesOptions extends BlobServiceOptions { - private String leaseId; - private String contentType; - private Long contentLength; - private String contentEncoding; - private String contentLanguage; - private String contentMD5; - private String cacheControl; - private String sequenceNumberAction; - private Long sequenceNumber; - private AccessConditionHeader accessCondition; - - /** - * Sets the optional server request timeout value associated with this - * {@link SetBlobPropertiesOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - @Override - public SetBlobPropertiesOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the MIME content type value set in this - * {@link SetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the MIME content type value set, if - * any. - */ - public String getContentType() { - return contentType; - } - - /** - * Sets the optional MIME content type for the blob content. This value will - * be returned to clients in the Content-Type header of the - * response when the blob data or blob properties are requested. If no - * content type is specified, the default content type is - * application/octet-stream. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param contentType - * A {@link String} containing the MIME content type value to - * set. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setContentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Gets the new page blob size set in this {@link SetBlobPropertiesOptions} - * instance. - * - * @return The new size to set for a page blob. - */ - public Long getContentLength() { - return contentLength; - } - - /** - * Sets the size of a page blob to the specified size. If the specified - * contentLength value is less than the current size of the blob, - * then all pages above the specified value are cleared. - *

- * This property cannot be used to change the size of a block blob. Setting - * this property for a block blob causes a {@link com.microsoft.windowsazure.exception.ServiceException} to be - * thrown. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param contentLength - * The new size to set for a page blob. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setContentLength(Long contentLength) { - this.contentLength = contentLength; - return this; - } - - /** - * Gets the HTTP content encoding value set in this - * {@link SetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the HTTP content encoding value set, - * if any. - */ - public String getContentEncoding() { - return contentEncoding; - } - - /** - * Sets the optional HTML content encoding value for the blob content. Use - * this value to specify any HTTP content encodings applied to the blob, - * passed as a x-ms-blob-content-encoding header value to the - * server. This value will be returned to clients in the headers of the - * response when the blob data or blob properties are requested. Pass an - * empty value to update a blob to the default value, which will cause no - * content encoding header to be returned with the blob. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param contentEncoding - * A {@link String} containing the - * x-ms-blob-content-encoding header value to set. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setContentEncoding(String contentEncoding) { - this.contentEncoding = contentEncoding; - return this; - } - - /** - * Gets the HTTP content language header value set in this - * {@link SetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the HTTP content language header - * value set, if any. - */ - public String getContentLanguage() { - return contentLanguage; - } - - /** - * Sets the optional HTTP content language header value for the blob - * content. Use this value to specify the content language of the blob. This - * value will be returned to clients in the - * x-ms-blob-content-language header of the response when the - * blob data or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param contentLanguage - * A {@link String} containing the - * x-ms-blob-content-language header value to set. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setContentLanguage(String contentLanguage) { - this.contentLanguage = contentLanguage; - return this; - } - - /** - * Gets the MD5 hash value for the blob content set in this - * {@link SetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the MD5 hash value for the blob - * content set, if any. - */ - public String getContentMD5() { - return contentMD5; - } - - /** - * Sets the optional MD5 hash value for the blob content. This value will be - * returned to clients in the x-ms-blob-content-md5 header - * value of the response when the blob data or blob properties are - * requested. This hash is used to verify the integrity of the blob during - * transport. When this header is specified, the storage service checks the - * hash of the content that has arrived with the one that was sent. If the - * two hashes do not match, the operation will fail with error code 400 (Bad - * Request), which will cause a ServiceException to be thrown. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param contentMD5 - * A {@link String} containing the MD5 hash value for the blob - * content to set. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setContentMD5(String contentMD5) { - this.contentMD5 = contentMD5; - return this; - } - - /** - * Gets the HTTP cache control value set in this - * {@link SetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the HTTP cache control value set, if - * any. - */ - public String getCacheControl() { - return cacheControl; - } - - /** - * Sets the optional HTTP cache control value for the blob content. The Blob - * service stores this value but does not use or modify it. This value will - * be returned to clients in the headers of the response when the blob data - * or blob properties are requested. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param cacheControl - * A {@link String} containing the HTTP cache control value to - * set. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setCacheControl(String cacheControl) { - this.cacheControl = cacheControl; - return this; - } - - /** - * Gets the sequence number value set in this - * {@link SetBlobPropertiesOptions} instance. - * - * @return The sequence number to set, if any. - */ - public Long getSequenceNumber() { - return sequenceNumber; - } - - /** - * Sets the page blob sequence number. The sequence number is a - * user-controlled property that you can use to track requests and manage - * concurrency issues. This value is optional, but is required if the - * sequence number action value is set to max or - * update. - *

- * Use the sequenceNumber parameter together with the sequence - * number action to update the blob's sequence number, either to the - * specified value or to the higher of the values specified with the request - * or currently stored with the blob. This header should not be specified if - * the sequence number action is set to increment; in this case - * the service automatically increments the sequence number by one. - *

- * To set the sequence number to a value of your choosing, this property - * must be specified on the request together with a sequence number action - * value of update. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param sequenceNumber - * The sequence number to set. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setSequenceNumber(Long sequenceNumber) { - this.sequenceNumber = sequenceNumber; - return this; - } - - /** - * Gets the lease ID to match for the blob set in this - * {@link SetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the lease ID set, if any. - */ - public String getLeaseId() { - return leaseId; - } - - /** - * Sets an optional lease ID value to match when setting properties of the - * blob. If set, the lease must be active and the value must match the lease - * ID set on the leased blob for the operation to succeed. - *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param leaseId - * A {@link String} containing the lease ID to set. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setLeaseId(String leaseId) { - this.leaseId = leaseId; - return this; - } - - /** - * Gets the sequence number action set in this - * {@link SetBlobPropertiesOptions} instance. - * - * @return A {@link String} containing the sequence number action set, if - * any. - */ - public String getSequenceNumberAction() { - return sequenceNumberAction; - } - - /** - * Sets an optional sequence number action for a page blob. This value is - * required if a sequence number is set for the request. - *

- * The sequenceNumberAction parameter indicates how the service - * should modify the page blob's sequence number. Specify one of the - * following strings for this parameter: - *

    - *
  • max - Sets the sequence number to be the higher of the - * value included with the request and the value currently stored for the - * blob.
  • - *
  • update - Sets the sequence number to the value included - * with the request.
  • - *
  • increment - Increments the value of the sequence number - * by 1. If specifying this option, do not set the sequence number value; - * doing so will cause a {@link com.microsoft.windowsazure.exception.ServiceException} to be thrown.
  • - *
- *

- * Note that this value only affects calls made on methods where this - * {@link SetBlobPropertiesOptions} instance is passed as a parameter. - * - * @param sequenceNumberAction - * A {@link String} containing the sequence number action to set - * on the page blob. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setSequenceNumberAction( - String sequenceNumberAction) { - this.sequenceNumberAction = sequenceNumberAction; - return this; - } - - /** - * Gets the access conditions set in this {@link SetBlobPropertiesOptions} - * instance. - * - * @return An {@link AccessCondition} containing the access conditions set, - * if any. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions for setting the properties of a blob. By - * default, the set blob properties operation will set the properties - * unconditionally. Use this method to specify conditions on the ETag or - * last modified time value for performing the operation. - *

- * The accessCondition value only affects calls made on methods - * where this {@link SetBlobPropertiesOptions} instance is passed as a - * parameter. - * - * @param accessCondition - * An {@link AccessCondition} containing the access conditions to - * set. - * @return A reference to this {@link SetBlobPropertiesOptions} instance. - */ - public SetBlobPropertiesOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesResult.java deleted file mode 100644 index 3a98e2ffcf22..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetBlobPropertiesResult.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import java.util.Date; - -/** - * A wrapper class for the response returned from a Blob Service REST API Set - * Blob Properties operation. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setBlobProperties(String, String, SetBlobPropertiesOptions)} - * . - *

- * See the Set - * Blob Properties documentation on MSDN for details of the underlying Blob - * Service REST API operation. - */ -public class SetBlobPropertiesResult { - private String etag; - private Date lastModified; - private Long sequenceNumber; - - /** - * Gets the ETag of the blob. - *

- * This value can be used in an access condition when updating or deleting a - * blob to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public String getEtag() { - return etag; - } - - /** - * Reserved for internal use. Sets the ETag of the blob from the - * ETag element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param etag - * A {@link String} containing the server-assigned ETag value for - * the blob. - */ - public void setEtag(String etag) { - this.etag = etag; - } - - /** - * Gets the last modified time of the blob. - *

- * Any operation that modifies the blob, including updates to the blob's - * metadata or properties, changes the last modified time of the blob. This - * value can be used in an access condition when updating or deleting a blob - * to prevent the client from modifying data that has been changed by - * another client. - * - * @return A {@link java.util.Date} containing the last modified time of the - * page blob. - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Reserved for internal use. Sets the last modified time of the blob from - * the Last-Modified element returned in the response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param lastModified - * A {@link java.util.Date} containing the last modified time of - * the blob. - */ - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - /** - * Gets the sequence number of the page blob. This value can be used when - * updating or deleting a page blob using an optimistic concurrency model to - * prevent the client from modifying data that has been changed by another - * client. - * - * @return A {@link String} containing the client-assigned sequence number - * value for the page blob. - */ - public Long getSequenceNumber() { - return sequenceNumber; - } - - /** - * Reserved for internal use. Sets the sequence number of the page blob from - * the x-ms-blob-sequence-number element returned in the - * response. - *

- * This method is invoked by the API to set the value from the Blob Service - * REST API operation response returned by the server. - * - * @param sequenceNumber - * A {@link String} containing the client-assigned sequence - * number value for the page blob. - */ - public void setSequenceNumber(Long sequenceNumber) { - this.sequenceNumber = sequenceNumber; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetContainerMetadataOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetContainerMetadataOptions.java deleted file mode 100644 index 66ed029c84dc..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/SetContainerMetadataOptions.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob.models; - -import com.microsoft.windowsazure.core.utils.AccessConditionHeader; - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.blob.BlobContract#setContainerMetadata(String, java.util.HashMap, SetContainerMetadataOptions)} - * request. These options include a server response timeout for the request and - * access conditions that specify whether to perform the operation or not - * depending on the values of the Etag or last modified time of the container. - * Options that are not set will not be passed to the server with a request. - */ -public class SetContainerMetadataOptions extends BlobServiceOptions { - private AccessConditionHeader accessCondition; - - /** - * Sets the server request timeout value associated with this - * {@link SetContainerMetadataOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link SetContainerMetadataOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link SetContainerMetadataOptions} instance. - */ - @Override - public SetContainerMetadataOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the access conditions associated with this - * {@link SetContainerMetadataOptions} instance. - * - * @return An {@link AccessCondition} reference containing the Etag and last - * modified time conditions for performing the set container - * metadata operation, or null if not set. - */ - public AccessConditionHeader getAccessCondition() { - return accessCondition; - } - - /** - * Sets the access conditions associated with this - * {@link SetContainerMetadataOptions} instance. By default, the set - * container metadata operation will set the container metadata - * unconditionally. Use this method to specify conditions on the Etag or - * last modified time value for performing the set container metadata - * operation. - *

- * The accessCondition value only affects calls made on methods - * where this {@link SetContainerMetadataOptions} instance is passed as a - * parameter. - * - * @param accessCondition - * An {@link AccessCondition} reference containing the Etag and - * last modified time conditions for performing the set container - * metadata operation. Specify null to make the - * operation unconditional. - * @return A reference to this {@link SetContainerMetadataOptions} instance. - */ - public SetContainerMetadataOptions setAccessCondition( - AccessConditionHeader accessCondition) { - this.accessCondition = accessCondition; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/package.html deleted file mode 100644 index 161010acd848..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/models/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the blob data transfer object classes. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/package.html deleted file mode 100644 index 7795f32cd9e5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/blob/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the blob service class, interface, and associated configuration and utility classes. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/EncryptionUtils.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/EncryptionUtils.java deleted file mode 100644 index c22a8927aabb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/EncryptionUtils.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.microsoft.windowsazure.services.media; - -import java.security.Key; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; -import java.security.cert.CertificateEncodingException; -import java.security.cert.X509Certificate; -import java.util.UUID; - -import javax.crypto.Cipher; -import javax.crypto.spec.SecretKeySpec; - -import com.microsoft.windowsazure.core.utils.Base64; - -public final class EncryptionUtils { - - // Enforce noninstantiability with a private constructor - private EncryptionUtils() { - // not called - } - - public static byte[] encryptSymmetricKeyData(X509Certificate certificate, byte[] contentKey) { - try { - Cipher cipher = Cipher.getInstance("RSA/ECB/OAEPWithSHA-1AndMGF1Padding"); - Key publicKey = certificate.getPublicKey(); - cipher.init(Cipher.ENCRYPT_MODE, publicKey, new SecureRandom()); - return cipher.doFinal(contentKey); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - public static String calculateChecksum(byte[] contentKey, UUID contentKeyIdUuid) { - try { - Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); - SecretKeySpec secretKeySpec = new SecretKeySpec(contentKey, "AES"); - cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec); - byte[] encryptionResult = cipher.doFinal(contentKeyIdUuid.toString().getBytes("UTF8")); - byte[] checksumByteArray = new byte[8]; - System.arraycopy(encryptionResult, 0, checksumByteArray, 0, 8); - return Base64.encode(checksumByteArray); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - /** - * Overwrites the supplied byte array with RNG generated data which destroys - * the original contents. - * - * @param keyToErase - * The content key to erase. - */ - public static void eraseKey(byte[] keyToErase) { - if (keyToErase != null) { - SecureRandom random; - try { - random = SecureRandom.getInstance("SHA1PRNG"); - random.nextBytes(keyToErase); - } catch (NoSuchAlgorithmException e) { - // never reached - } - } - } - - public static String getThumbPrint(X509Certificate cert) - throws NoSuchAlgorithmException, CertificateEncodingException { - MessageDigest md = MessageDigest.getInstance("SHA-1"); - byte[] der = cert.getEncoded(); - md.update(der); - byte[] digest = md.digest(); - return hexify(digest); - } - - public static String hexify(byte[] bytes) { - char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; - StringBuffer buf = new StringBuffer(bytes.length * 2); - for (int i = 0; i < bytes.length; ++i) { - buf.append(hexDigits[(bytes[i] & 0xf0) >> 4]); - buf.append(hexDigits[bytes[i] & 0x0f]); - } - return buf.toString(); - } -} \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/Exports.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/Exports.java deleted file mode 100644 index 38c00dfbb8a4..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/Exports.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media; - -import java.util.Map; - -import javax.xml.bind.JAXBException; -import javax.xml.parsers.ParserConfigurationException; - -import com.microsoft.windowsazure.core.Builder; -import com.microsoft.windowsazure.core.UserAgentFilter; -import com.microsoft.windowsazure.services.media.authentication.AzureAdTokenFactory; -import com.microsoft.windowsazure.services.media.implementation.BatchMimeMultipartBodyWritter; -import com.microsoft.windowsazure.services.media.implementation.MediaContentProvider; -import com.microsoft.windowsazure.services.media.implementation.MediaExceptionProcessor; -import com.microsoft.windowsazure.services.media.implementation.MediaRestProxy; -import com.microsoft.windowsazure.services.media.implementation.OAuthFilter; -import com.microsoft.windowsazure.services.media.implementation.ODataEntityCollectionProvider; -import com.microsoft.windowsazure.services.media.implementation.ODataEntityProvider; -import com.microsoft.windowsazure.services.media.implementation.RedirectFilter; -import com.microsoft.windowsazure.services.media.implementation.ResourceLocationManager; -import com.microsoft.windowsazure.services.media.implementation.VersionHeadersFilter; -import com.sun.jersey.api.client.config.ClientConfig; -import com.sun.jersey.api.json.JSONConfiguration; - -public class Exports implements Builder.Exports { - - /** - * register the Media services. - */ - @Override - public void register(Builder.Registry registry) { - registry.add(new AzureAdTokenFactory()); - registry.add(MediaContract.class, MediaExceptionProcessor.class); - registry.add(MediaRestProxy.class); - registry.add(OAuthFilter.class); - registry.add(ResourceLocationManager.class); - registry.add(RedirectFilter.class); - registry.add(VersionHeadersFilter.class); - registry.add(UserAgentFilter.class); - - registry.alter(MediaContract.class, ClientConfig.class, - new Builder.Alteration() { - @SuppressWarnings("rawtypes") - @Override - public ClientConfig alter(String profile, - ClientConfig instance, Builder builder, - Map properties) { - - instance.getProperties().put( - JSONConfiguration.FEATURE_POJO_MAPPING, true); - - // Turn off auto-follow redirects, because Media - // Services rest calls break if it's on - instance.getProperties().put( - ClientConfig.PROPERTY_FOLLOW_REDIRECTS, false); - - try { - instance.getSingletons().add( - new ODataEntityProvider()); - instance.getSingletons().add( - new ODataEntityCollectionProvider()); - instance.getSingletons().add( - new MediaContentProvider()); - instance.getSingletons().add( - new BatchMimeMultipartBodyWritter()); - } catch (JAXBException e) { - throw new RuntimeException(e); - } catch (ParserConfigurationException e) { - throw new RuntimeException(e); - } - - return instance; - } - }); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaConfiguration.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaConfiguration.java deleted file mode 100644 index c58423062c79..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaConfiguration.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media; - -import java.net.URI; - -import com.microsoft.windowsazure.Configuration; -import com.microsoft.windowsazure.services.media.authentication.TokenProvider; - -/** - * Provides functionality to create a media services configuration. - * - */ -public final class MediaConfiguration { - - private MediaConfiguration() { - } - - /** - * The token provider object - */ - public static final String AZURE_AD_TOKEN_PROVIDER = "media.azuread.tokenprovider"; - - /** - * The azure media services account uri - */ - public static final String AZURE_AD_API_SERVER = "media.azuread.account_api_uri"; - - /** - * Returns the default Configuration provisioned for the specified AMS account and token provider. - * @param apiServer the AMS account uri - * @param azureAdTokenProvider the token provider - * @return a Configuration - */ - public static Configuration configureWithAzureAdTokenProvider( - URI apiServer, - TokenProvider azureAdTokenProvider) { - - return configureWithAzureAdTokenProvider(Configuration.getInstance(), apiServer, azureAdTokenProvider); - } - - /** - * Setup a Configuration with specified Configuration, AMS account and token provider - * @param configuration The target configuration - * @param apiServer the AMS account uri - * @param azureAdTokenProvider the token provider - * @return the target Configuration - */ - public static Configuration configureWithAzureAdTokenProvider( - Configuration configuration, - URI apiServer, - TokenProvider azureAdTokenProvider) { - - configuration.setProperty(AZURE_AD_API_SERVER, apiServer.toString()); - configuration.setProperty(AZURE_AD_TOKEN_PROVIDER, azureAdTokenProvider); - - return configuration; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaContract.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaContract.java deleted file mode 100644 index eebebf03c13a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaContract.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import com.microsoft.windowsazure.core.pipeline.jersey.JerseyFilterableService; -import com.microsoft.windowsazure.services.media.entityoperations.EntityContract; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; - -/** - * Contract for interacting with the back end of Media Services - * - */ -public interface MediaContract extends JerseyFilterableService, - EntityContract { - /** - * Creates an instance of the WritableBlobContainerContract API - * that will write to the blob container given by the provided locator. - * - * @param locator - * locator specifying where to upload to - * @return the implementation of WritableBlobContainerContract - */ - WritableBlobContainerContract createBlobWriter(LocatorInfo locator); - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaService.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaService.java deleted file mode 100644 index c7a8e9c77e2e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/MediaService.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media; - -import com.microsoft.windowsazure.Configuration; - -/** - * - * Access media services functionality. This class cannot be instantiated. - * - */ -public final class MediaService { - - private MediaService() { - } - - /** - * Creates an instance of the MediaServicesContract API. - * - */ - public static MediaContract create() { - return Configuration.getInstance().create(MediaContract.class); - } - - /** - * Creates an instance of the MediaServicesContract API using - * the specified configuration. - * - * @param config - * A Configuration object that represents the - * configuration for the media service account. - * - */ - public static MediaContract create(Configuration config) { - return config.create(MediaContract.class); - } - - /** - * Creates an instance of the MediaServicesContract API. - * - */ - public static MediaContract create(String profile) { - return Configuration.getInstance().create(profile, MediaContract.class); - } - - /** - * Creates an instance of the MediaServicesContract API using - * the specified configuration. - * - * @param config - * A Configuration object that represents the - * configuration for the media service account. - * - */ - public static MediaContract create(String profile, Configuration config) { - return config.create(profile, MediaContract.class); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/OperationUtils.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/OperationUtils.java deleted file mode 100644 index d64001e67087..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/OperationUtils.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.microsoft.windowsazure.services.media; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.EntityWithOperationIdentifier; -import com.microsoft.windowsazure.services.media.models.Operation; -import com.microsoft.windowsazure.services.media.models.OperationInfo; -import com.microsoft.windowsazure.services.media.models.OperationState; - -public final class OperationUtils { - - private OperationUtils() { - // do nothing - } - - /** - * Awaits for an operation to be completed. - * - * @param service - * the media contract - * @param operationId - * the operation id to wait for. - * @return the final state of the operation. If operationId is null, returns OperationState.Succeeded. - * @throws ServiceException - */ - public static OperationState await(MediaContract service, String operationId) throws ServiceException { - if (operationId == null) { - return OperationState.Succeeded; - } - OperationInfo opinfo; - do { - opinfo = service.get(Operation.get(operationId)); - try { - Thread.sleep(2000); - } catch (InterruptedException e) { - // intentionally do nothing - } - } while (opinfo.getState().equals(OperationState.InProgress)); - return opinfo.getState(); - } - - /** - * Awaits for an operation to be completed. - * - * @param service - * the media contract - * @param operation - * the operation id to wait for. - * @return the final state of the operation. If the entity has not operationId, returns OperationState.Succeeded. - * @throws ServiceException - */ - public static OperationState await(MediaContract service, EntityWithOperationIdentifier entity) throws ServiceException { - if (entity.hasOperationIdentifier()) { - return await(service, entity.getOperationId()); - } - return OperationState.Succeeded; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/WritableBlobContainerContract.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/WritableBlobContainerContract.java deleted file mode 100644 index 64a99599bf1b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/WritableBlobContainerContract.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import java.io.InputStream; - -import com.microsoft.windowsazure.core.pipeline.jersey.JerseyFilterableService; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.blob.models.BlockList; -import com.microsoft.windowsazure.services.blob.models.CommitBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobBlockOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobResult; - -/** - * The Interface WritableBlobContainerContract. - */ -public interface WritableBlobContainerContract extends - JerseyFilterableService { - - /** - * Creates the block blob. - * - * @param blob - * the blob - * @param contentStream - * the content stream - * @return the creates the blob result - * @throws ServiceException - * the service exception - */ - CreateBlobResult createBlockBlob(String blob, InputStream contentStream) - throws ServiceException; - - /** - * Creates the block blob. - * - * @param blob - * the blob - * @param contentStream - * the content stream - * @param options - * the options - * @return the creates the blob result - * @throws ServiceException - * the service exception - */ - CreateBlobResult createBlockBlob(String blob, InputStream contentStream, - CreateBlobOptions options) throws ServiceException; - - /** - * Creates the blob block. - * - * @param blob - * the blob - * @param blockId - * the block id - * @param contentStream - * the content stream - * @throws ServiceException - * the service exception - */ - void createBlobBlock(String blob, String blockId, InputStream contentStream) - throws ServiceException; - - /** - * Creates the blob block. - * - * @param blob - * the blob - * @param blockId - * the block id - * @param contentStream - * the content stream - * @param options - * the options - * @throws ServiceException - * the service exception - */ - void createBlobBlock(String blob, String blockId, - InputStream contentStream, CreateBlobBlockOptions options) - throws ServiceException; - - /** - * Commit blob blocks. - * - * @param blob - * the blob - * @param blockList - * the block list - * @throws ServiceException - * the service exception - */ - void commitBlobBlocks(String blob, BlockList blockList) - throws ServiceException; - - /** - * Commit blob blocks. - * - * @param blob - * the blob - * @param blockList - * the block list - * @param options - * the options - * @throws ServiceException - * the service exception - */ - void commitBlobBlocks(String blob, BlockList blockList, - CommitBlobBlocksOptions options) throws ServiceException; -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdAccessToken.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdAccessToken.java deleted file mode 100644 index b13d3daecf72..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdAccessToken.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -import java.util.Date; - -/** - * Represents an access token - */ -public class AzureAdAccessToken { - - private final String accessToken; - - private final Date expiresOn; - - /** - * Gets the access token - * @return the access token - */ - public String getAccessToken() { - return this.accessToken; - } - - /** - * Gets the expiration date - * @return the expiration date - */ - public Date getExpiresOnDate() { - return this.expiresOn; - } - - /** - * Instantiate a representation of an access token - * @param accessToken the access token - * @param expiresOn the expiration date - */ - public AzureAdAccessToken(String accessToken, Date expiresOn) { - - if (accessToken == null || accessToken.trim().isEmpty()) { - throw new IllegalArgumentException("accessToken"); - } - - if (expiresOn == null) { - throw new NullPointerException("expiresOn"); - } - - this.accessToken = accessToken; - this.expiresOn = expiresOn; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdClientSymmetricKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdClientSymmetricKey.java deleted file mode 100644 index ad0e0aa143d2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdClientSymmetricKey.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -/** - * Represents a symmetric key pair of ClientId & ClientKey - */ -public class AzureAdClientSymmetricKey { - - private final String clientId; - private final String clientKey; - - /** - * Gets the client ID. - * @return the client ID. - */ - public String getClientId() { - return this.clientId; - } - - /** - * Gets the client key. - * @return the client key. - */ - public String getClientKey() { - return this.clientKey; - } - - /** - * Initializes a new instance of the AzureAdClientSymmetricKey class. - * @param clientId The client ID. - * @param clientKey The client key. - */ - public AzureAdClientSymmetricKey(String clientId, String clientKey) { - if (clientId == null || clientId.trim().isEmpty()) { - throw new IllegalArgumentException("clientId"); - } - - if (clientKey == null || clientKey.trim().isEmpty()) { - throw new IllegalArgumentException("clientKey"); - } - - this.clientId = clientId; - this.clientKey = clientKey; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdClientUsernamePassword.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdClientUsernamePassword.java deleted file mode 100644 index c9d51cbce115..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdClientUsernamePassword.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -/** - * Represents a pair of username & password credentials - */ -public class AzureAdClientUsernamePassword { - - private final String username; - private final String password; - - /** - * Gets the username. - * @return the username. - */ - public String getUsername() { - return this.username; - } - - /** - * Gets the password. - * @return the password. - */ - public String getPassword() { - return this.password; - } - - /** - * Initializes a new instance of the AzureAdClientSymmetricKey class. - * @param clientId The client ID. - * @param clientKey The client key. - */ - public AzureAdClientUsernamePassword(String username, String password) { - if (username == null || username.trim().isEmpty()) { - throw new IllegalArgumentException("username"); - } - - if (password == null || password.trim().isEmpty()) { - throw new IllegalArgumentException("password"); - } - - this.username = username; - this.password = password; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenCredentialType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenCredentialType.java deleted file mode 100644 index b83277a64981..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenCredentialType.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -/** - * Enumerates the different types of credentials available - * - */ -public enum AzureAdTokenCredentialType { - - /** - * User Credential by prompting user for user name and password. - */ - UserCredential, - - /** - * User Secret Credential by providing user name and password via configuration. - */ - UserSecretCredential, - - /** - * Service Principal with the symmetric key credential. - */ - ServicePrincipalWithClientSymmetricKey, - - /** - * Service Principal with the certificate credential. - */ - ServicePrincipalWithClientCertificate -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenCredentials.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenCredentials.java deleted file mode 100644 index e64ffc4465ae..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenCredentials.java +++ /dev/null @@ -1,160 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -import com.microsoft.aad.adal4j.AsymmetricKeyCredential; -import com.microsoft.aad.adal4j.ClientCredential; - -/** - * Represents an Azure AD Credential for a specific resource - */ -public class AzureAdTokenCredentials { - - private String tenant; - - private ClientCredential clientKey; - - private AsymmetricKeyCredential asymmetricKeyCredential; - - private AzureAdClientUsernamePassword azureAdClientUsernamePassword; - - private AzureAdTokenCredentialType credentialType; - - private AzureEnvironment azureEnvironment; - - /** - * Gets the tenant. - * @return the tenant. - */ - public String getTenant() { - return this.tenant; - } - - /** - * Gets the client username password - * @return the client symmetric key. - */ - public AzureAdClientUsernamePassword getAzureAdClientUsernamePassword() { - return this.azureAdClientUsernamePassword; - } - - /** - * Gets the client symmetric key credential. - * @return the ClientCredential - */ - public ClientCredential getClientKey() { - return this.clientKey; - } - - /** - * Gets the AsymmetricKeyCredential - * @return the AsymmetricKeyCredential - */ - public AsymmetricKeyCredential getAsymmetricKeyCredential() { - return this.asymmetricKeyCredential; - } - - /** - * Gets the credential type. - * @return the credential type. - */ - public AzureAdTokenCredentialType getCredentialType() { - return this.credentialType; - } - - /** - * Gets the environment. - * @return the environment. - */ - public AzureEnvironment getAzureEnvironment() { - return this.azureEnvironment; - } - - /** - * Initializes a new instance of the AzureAdTokenCredentials class. - * @param tenant The tenant - * @param azureAdClientUsernamePassword the user credentials - * @param azureEnvironment The environment - */ - public AzureAdTokenCredentials(String tenant, AzureAdClientUsernamePassword azureAdClientUsernamePassword, AzureEnvironment azureEnvironment) { - if (tenant == null || tenant.trim().isEmpty()) { - throw new IllegalArgumentException("tenant"); - } - - if (azureAdClientUsernamePassword == null) { - throw new NullPointerException("azureAdClientUsernamePassword"); - } - - if (azureEnvironment == null) { - throw new NullPointerException("azureEnvironment"); - } - - this.tenant = tenant; - this.azureAdClientUsernamePassword = azureAdClientUsernamePassword; - this.azureEnvironment = azureEnvironment; - this.credentialType = AzureAdTokenCredentialType.UserSecretCredential; - } - - /** - * Initializes a new instance of the AzureAdTokenCredentials class. - * @param tenant The tenant - * @param azureEnvironment The environment - */ - public AzureAdTokenCredentials(String tenant, AzureEnvironment azureEnvironment) { - if (tenant == null || tenant.trim().isEmpty()) { - throw new IllegalArgumentException("tenant"); - } - - if (azureEnvironment == null) { - throw new NullPointerException("azureEnvironment"); - } - - this.tenant = tenant; - this.azureEnvironment = azureEnvironment; - this.credentialType = AzureAdTokenCredentialType.UserSecretCredential; - } - - /** - * Initializes a new instance of the AzureAdTokenCredentials class. - * @param tenant The tenant - * @param azureAdClientSymmetricKey an instance of AzureAdClientSymmetricKey - * @param azureEnvironment The environment - */ - public AzureAdTokenCredentials(String tenant, AzureAdClientSymmetricKey azureAdClientSymmetricKey, AzureEnvironment azureEnvironment) { - if (tenant == null || tenant.trim().isEmpty()) { - throw new IllegalArgumentException("tenant"); - } - - if (azureAdClientSymmetricKey == null) { - throw new NullPointerException("azureAdClientSymmetricKey"); - } - - if (azureEnvironment == null) { - throw new NullPointerException("azureEnvironment"); - } - - this.tenant = tenant; - this.azureEnvironment = azureEnvironment; - this.clientKey = new ClientCredential(azureAdClientSymmetricKey.getClientId(), azureAdClientSymmetricKey.getClientKey()); - this.credentialType = AzureAdTokenCredentialType.ServicePrincipalWithClientSymmetricKey; - } - - - public AzureAdTokenCredentials(String tenant, AsymmetricKeyCredential asymmetricKeyCredential, AzureEnvironment azureEnvironment) { - if (tenant == null || tenant.trim().isEmpty()) { - throw new IllegalArgumentException("tenant"); - } - - if (asymmetricKeyCredential == null) { - throw new NullPointerException("asymmetricKeyCredential"); - } - - if (azureEnvironment == null) { - throw new NullPointerException("azureEnvironment"); - } - - this.tenant = tenant; - this.azureEnvironment = azureEnvironment; - this.asymmetricKeyCredential = asymmetricKeyCredential; - - this.credentialType = AzureAdTokenCredentialType.ServicePrincipalWithClientCertificate; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenFactory.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenFactory.java deleted file mode 100644 index f4ce7d19597a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenFactory.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -import java.util.Map; - -import com.microsoft.windowsazure.core.Builder; - -/** - * AzureAdTokenProvider's Factory - * - * Internal use. - */ -public class AzureAdTokenFactory implements Builder.Factory { - - @Override - public TokenProvider create(String profile, Class service, Builder builder, - Map properties) { - return (TokenProvider) properties.get(profile); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenProvider.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenProvider.java deleted file mode 100644 index 63e87e1e2125..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureAdTokenProvider.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -import java.net.MalformedURLException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Future; - -import org.apache.commons.lang.NotImplementedException; - -import com.microsoft.aad.adal4j.AuthenticationContext; -import com.microsoft.aad.adal4j.AuthenticationResult; - -/** - * Azure Active Directory Access Token Provider for - * the Azure Media Services JDK. - */ -public class AzureAdTokenProvider implements TokenProvider { - private final AuthenticationContext authenticationContext; - private final AzureAdTokenCredentials tokenCredentials; - private final ExecutorService executorService; - - /** - * Creates an instance of the AzureAdTokenProvider - * @param tokenCredentials The credentials - * @param executorService An ExecutorService - * @throws MalformedURLException - */ - public AzureAdTokenProvider(AzureAdTokenCredentials tokenCredentials, ExecutorService executorService) throws MalformedURLException { - if (tokenCredentials == null) { - throw new NullPointerException("tokenCredentials"); - } - - if (executorService == null) { - throw new NullPointerException("executorService"); - } - - this.tokenCredentials = tokenCredentials; - - StringBuilder authority = new StringBuilder(); - - authority.append(canonicalizeUri(this.tokenCredentials.getAzureEnvironment().getActiveDirectoryEndpoint().toString())); - authority.append(tokenCredentials.getTenant()); - - this.executorService = executorService; - this.authenticationContext = new AuthenticationContext(authority.toString(), false, this.executorService); - } - - /** - * Acquires an access token - * @see com.microsoft.windowsazure.services.media.authentication.TokenProvider#acquireAccessToken() - */ - @Override - public AzureAdAccessToken acquireAccessToken() throws Exception { - AuthenticationResult authResult = getToken().get(); - return new AzureAdAccessToken(authResult.getAccessToken(), authResult.getExpiresOnDate()); - } - - private Future getToken() { - String mediaServicesResource = this.tokenCredentials.getAzureEnvironment().getMediaServicesResource(); - - switch (this.tokenCredentials.getCredentialType()) { - case UserSecretCredential: - return this.authenticationContext.acquireToken( - mediaServicesResource, - this.tokenCredentials.getAzureEnvironment().getMediaServicesSdkClientId(), - this.tokenCredentials.getAzureAdClientUsernamePassword().getUsername(), - this.tokenCredentials.getAzureAdClientUsernamePassword().getPassword(), - null); - - case ServicePrincipalWithClientSymmetricKey: - return this.authenticationContext.acquireToken( - mediaServicesResource, - this.tokenCredentials.getClientKey(), - null); - - case ServicePrincipalWithClientCertificate: - return this.authenticationContext.acquireToken( - mediaServicesResource, - this.tokenCredentials.getAsymmetricKeyCredential(), - null); - - case UserCredential: - throw new NotImplementedException( - String.format( - "Interactive user credential is currently not supported by the java sdk", - this.tokenCredentials.getCredentialType())); - default: - throw new NotImplementedException( - String.format( - "Token Credential type %s is not supported.", - this.tokenCredentials.getCredentialType())); - } - } - - private String canonicalizeUri(String authority) { - if (authority != null - && !authority.trim().isEmpty() - && !authority.endsWith("/")) { - - authority += "/"; - } - - return authority; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironment.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironment.java deleted file mode 100644 index c3998578619e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironment.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -import java.net.URI; - -/** - * Represents an Azure Environment - */ -public class AzureEnvironment { - - private URI activeDirectoryEndpoint; - - private String mediaServicesResource; - - private String mediaServicesSdkClientId; - - private URI mediaServicesSdkRedirectUri; - - /** - * Gets the Active Directory endpoint. - * @return Active Directory endpoint. - */ - public URI getActiveDirectoryEndpoint() { - return this.activeDirectoryEndpoint; - } - - /** - * Gets the Media Services resource. - * @return Media Services resource - */ - public String getMediaServicesResource() { - return this.mediaServicesResource; - } - - /** - * Gets the Media Services SDK client ID. - * @return Media Services SDK client ID - */ - public String getMediaServicesSdkClientId() { - return this.mediaServicesSdkClientId; - } - - /** - * Gets Media Services SDK application redirect URI. - * @return Media Services SDK application redirect URI. - */ - public URI getMediaServicesSdkRedirectUri() { - return this.mediaServicesSdkRedirectUri; - } - - /** - * Initializes a new instance of the AzureEnvironment class. - * @param activeDirectoryEndpoint The Active Directory endpoint. - * @param mediaServicesResource The Media Services resource. - * @param mediaServicesSdkClientId The Media Services SDK client ID. - * @param mediaServicesSdkRedirectUri The Media Services SDK redirect URI. - */ - public AzureEnvironment( - URI activeDirectoryEndpoint, - String mediaServicesResource, - String mediaServicesSdkClientId, - URI mediaServicesSdkRedirectUri) { - if (activeDirectoryEndpoint == null) { - throw new NullPointerException("activeDirectoryEndpoint"); - } - - if (mediaServicesResource == null || mediaServicesResource.trim().isEmpty()) { - throw new IllegalArgumentException("mediaServicesResource"); - } - - if (mediaServicesSdkClientId == null || mediaServicesSdkClientId.trim().isEmpty()) { - throw new IllegalArgumentException("mediaServicesSdkClientId"); - } - - if (mediaServicesSdkRedirectUri == null) { - throw new NullPointerException("mediaServicesSdkRedirectUri"); - } - - this.activeDirectoryEndpoint = activeDirectoryEndpoint; - this.mediaServicesResource = mediaServicesResource; - this.mediaServicesSdkClientId = mediaServicesSdkClientId; - this.mediaServicesSdkRedirectUri = mediaServicesSdkRedirectUri; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironmentConstants.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironmentConstants.java deleted file mode 100644 index ddbd4b5119df..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironmentConstants.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -import java.net.URI; -import java.net.URISyntaxException; - -public final class AzureEnvironmentConstants { - - // Utility classes should not have a public or default constructor. - private AzureEnvironmentConstants() { - } - - /** - * The Active Directory endpoint for Azure Cloud environment. - */ - public static final URI AZURE_CLOUD_ACTIVE_DIRECTORY_ENDPOINT = makeURI("https://login.microsoftonline.com/"); - - /** - * The Media Services resource for Azure Cloud environment. - */ - public static final String AZURE_CLOUD_MEDIA_SERVICES_RESOURCE = "https://rest.media.azure.net"; - - /** - * The Active Directory endpoint for Azure China Cloud environment. - */ - public static final URI AZURE_CHINA_CLOUD_ACTIVE_DIRECTORY_ENDPOINT = makeURI("https://login.chinacloudapi.cn/"); - - /** - * The Media Services resource for Azure China Cloud environment. - */ - public static final String AZURE_CHINA_CLOUD_MEDIA_SERVICES_RESOURCE = "https://rest.media.chinacloudapi.cn"; - - /** - * The Active Directory endpoint for Azure US Government environment. - */ - public static final URI AZURE_US_GOVERNMENT_ACTIVE_DIRECTORY_ENDPOINT = makeURI("https://login-us.microsoftonline.com/"); - - /** - * The Media Services resource for Azure US Government environment. - */ - public static final String AZURE_US_GOVERNMENT_MEDIA_SERVICES_RESOURCE = "https://rest.media.usgovcloudapi.net"; - - /** - * The native SDK AAD application ID for Azure US Government environment. - */ - public static final String AZURE_US_GOVERNMENT_SDK_AAD_APPLIATION_ID = "68dac91e-cab5-461b-ab4a-ec7dcff0bd67"; - - /** - * The Active Directory endpoint for Azure German cloud environment. - */ - public static final URI AZURE_GERMAN_CLOUD_ACTIVE_DIRECTORY_ENDPOINT = makeURI("https://login.microsoftonline.de/"); - - /** - * The Media Services resource for Azure German Cloud environment. - */ - public static final String AZURE_GERMAN_CLOUD_MEDIA_SERVICES_RESOURCE = "https://rest.media.cloudapi.de"; - - /** - * The native SDK AAD application ID for Azure Cloud, Azure China Cloud and Azure German Cloud environment. - */ - public static final String SDK_AAD_APPLICATION_ID = "d476653d-842c-4f52-862d-397463ada5e7"; - - /** - * The native SDK AAD application's redirect URL for all environments. - */ - public static final URI SDK_AAD_APPLICATION_REDIRECT_URI = makeURI("https://AzureMediaServicesNativeSDK"); - - private static URI makeURI(String urlString) { - try { - return new URI(urlString); - } catch (URISyntaxException e) { - return null; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironments.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironments.java deleted file mode 100644 index f2ad26a38a1b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/AzureEnvironments.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -public final class AzureEnvironments { - - // Utility classes should not have a public or default constructor. - private AzureEnvironments() { - } - - /** - * Azure Cloud environment. - */ - public static final AzureEnvironment AZURE_CLOUD_ENVIRONMENT = new AzureEnvironment( - AzureEnvironmentConstants.AZURE_CLOUD_ACTIVE_DIRECTORY_ENDPOINT, - AzureEnvironmentConstants.AZURE_CLOUD_MEDIA_SERVICES_RESOURCE, - AzureEnvironmentConstants.SDK_AAD_APPLICATION_ID, - AzureEnvironmentConstants.SDK_AAD_APPLICATION_REDIRECT_URI); - - /** - * Azure China Cloud environment. - */ - public static final AzureEnvironment AZURE_CHINA_CLOUD_ENVIRONMENT = new AzureEnvironment( - AzureEnvironmentConstants.AZURE_CHINA_CLOUD_ACTIVE_DIRECTORY_ENDPOINT, - AzureEnvironmentConstants.AZURE_CHINA_CLOUD_MEDIA_SERVICES_RESOURCE, - AzureEnvironmentConstants.SDK_AAD_APPLICATION_ID, - AzureEnvironmentConstants.SDK_AAD_APPLICATION_REDIRECT_URI); - - /** - * Azure US Government environment. - */ - public static final AzureEnvironment AZURE_US_GOVERNMENT_ENVIRONMENT = new AzureEnvironment( - AzureEnvironmentConstants.AZURE_US_GOVERNMENT_ACTIVE_DIRECTORY_ENDPOINT, - AzureEnvironmentConstants.AZURE_US_GOVERNMENT_MEDIA_SERVICES_RESOURCE, - AzureEnvironmentConstants.AZURE_US_GOVERNMENT_SDK_AAD_APPLIATION_ID, - AzureEnvironmentConstants.SDK_AAD_APPLICATION_REDIRECT_URI); - - /** - * Azure German Cloud environment. - */ - public static final AzureEnvironment AZURE_GERMAN_CLOUD_ENVIRONMENT = new AzureEnvironment( - AzureEnvironmentConstants.AZURE_GERMAN_CLOUD_ACTIVE_DIRECTORY_ENDPOINT, - AzureEnvironmentConstants.AZURE_GERMAN_CLOUD_MEDIA_SERVICES_RESOURCE, - AzureEnvironmentConstants.SDK_AAD_APPLICATION_ID, - AzureEnvironmentConstants.SDK_AAD_APPLICATION_REDIRECT_URI); -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/TokenProvider.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/TokenProvider.java deleted file mode 100644 index ca4e9b62156f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/TokenProvider.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; - -public interface TokenProvider { - - /** - * Acquire an access token - * - * @return a valid access token - * @throws Exception - */ - AzureAdAccessToken acquireAccessToken() throws Exception; - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/package-info.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/package-info.java deleted file mode 100644 index bd769aaa63ca..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/authentication/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.microsoft.windowsazure.services.media.authentication; \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultActionOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultActionOperation.java deleted file mode 100644 index a50ad8ff9dc0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultActionOperation.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.util.HashMap; -import java.util.Map; - -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; - -import com.microsoft.windowsazure.core.pipeline.PipelineHelpers; -import com.microsoft.windowsazure.exception.ServiceException; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.core.util.MultivaluedMapImpl; - -/** - * Generic implementation of Delete operation usable by most entities. - */ -public class DefaultActionOperation implements EntityActionOperation { - - /** The proxy data. */ - private EntityProxyData proxyData; - - /** The name. */ - private String name; - - /** The content type. */ - private MediaType contentType = MediaType.APPLICATION_XML_TYPE; - - /** The accept type. */ - private MediaType acceptType = MediaType.APPLICATION_ATOM_XML_TYPE; - - /** The query parameters. */ - private MultivaluedMap queryParameters; - - /** The body parameters. */ - private Map bodyParameters; - - /** - * The default action operation. - * - * @param name - * the name - */ - public DefaultActionOperation(String name) { - this(); - this.name = name; - } - - /** - * Instantiates a new default action operation. - */ - public DefaultActionOperation() { - this.queryParameters = new MultivaluedMapImpl(); - this.bodyParameters = new HashMap(); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media.entityoperations. - * EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - this.proxyData = proxyData; - } - - /** - * Get the current proxy data. - * - * @return the proxy data - */ - protected EntityProxyData getProxyData() { - return proxyData; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getUri() - */ - @Override - public String getUri() { - return name; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#getQueryParameters() - */ - @Override - public MultivaluedMap getQueryParameters() { - return this.queryParameters; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#addQueryParameter(java.lang.String, - * java.lang.String) - */ - @Override - public DefaultActionOperation addQueryParameter(String key, String value) { - this.queryParameters.add(key, value); - return this; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getContentType() - */ - @Override - public MediaType getContentType() { - return this.contentType; - } - - /** - * Sets the content type. - * - * @param contentType - * the content type - * @return the default action operation - */ - @Override - public DefaultActionOperation setContentType(MediaType contentType) { - this.contentType = contentType; - return this; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getAcceptType() - */ - @Override - public MediaType getAcceptType() { - return this.acceptType; - } - - /** - * Sets the accept type. - * - * @param acceptType - * the accept type - * @return the default action operation - */ - public DefaultActionOperation setAcceptType(MediaType acceptType) { - this.acceptType = acceptType; - return this; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#getVerb() - */ - @Override - public String getVerb() { - return "GET"; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - return null; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #processResponse(java.lang.Object) - */ - @Override - public Object processResponse(Object rawResponse) throws ServiceException { - PipelineHelpers.throwIfNotSuccess((ClientResponse) rawResponse); - return rawResponse; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#getBodyParameters() - */ - @Override - public Map getBodyParameters() { - return this.bodyParameters; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#addBodyParameter(java.lang.String, - * java.lang.Object) - */ - @Override - public EntityActionOperation addBodyParameter(String key, Object value) { - this.bodyParameters.put(key, value); - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultDeleteOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultDeleteOperation.java deleted file mode 100644 index 7b65fa565c01..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultDeleteOperation.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -/** - * Generic implementation of Delete operation usable by most entities - * - */ -public class DefaultDeleteOperation implements EntityDeleteOperation { - private final EntityOperationBase.EntityUriBuilder uriBuilder; - private EntityProxyData proxyData; - - /** - * - */ - public DefaultDeleteOperation(String entityUri, String entityId) { - uriBuilder = new EntityOperationBase.EntityIdUriBuilder(entityUri, - entityId); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityDeleteOperation - * #setProxyData(com.microsoft.windowsazure.services.media - * .entityoperations.EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - this.proxyData = proxyData; - } - - /** - * Get currently set proxy data - * - * @return the proxyData - */ - protected EntityProxyData getProxyData() { - return proxyData; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entities.EntityDeleteOperation - * #getUri() - */ - @Override - public String getUri() { - return uriBuilder.getUri(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityActionOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityActionOperation.java deleted file mode 100644 index ea8099eec143..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityActionOperation.java +++ /dev/null @@ -1,282 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.util.HashMap; -import java.util.Map; - -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; - -import com.microsoft.windowsazure.core.pipeline.PipelineHelpers; -import com.microsoft.windowsazure.exception.ServiceException; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.core.util.MultivaluedMapImpl; - -/** - * Generic implementation of Delete operation usable by most entities. - */ -public class DefaultEntityActionOperation implements EntityActionOperation { - - /** The proxy data. */ - private EntityProxyData proxyData; - - /** The uri builder. */ - private final EntityOperationBase.EntityUriBuilder uriBuilder; - - /** The content type. */ - private MediaType contentType = MediaType.APPLICATION_JSON_TYPE; - - /** The accept type. */ - private MediaType acceptType = MediaType.APPLICATION_ATOM_XML_TYPE; - - /** The query parameters. */ - private MultivaluedMap queryParameters; - - /** The entity name. */ - private final String entityName; - - /** The entity id. */ - private final String entityId; - - /** The action name. */ - private final String actionName; - - /** The body parameters. */ - private Map bodyParameters; - - /** - * The default action operation. - * - * @param entityName - * the entity name - * @param entityId - * the entity id - * @param actionName - * the action name - */ - public DefaultEntityActionOperation(String entityName, String entityId, - String actionName) { - this.queryParameters = new MultivaluedMapImpl(); - this.bodyParameters = new HashMap(); - this.entityName = entityName; - this.entityId = entityId; - this.actionName = actionName; - this.uriBuilder = new EntityOperationBase.EntityIdUriBuilder( - entityName, entityId).setActionName(actionName); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media.entityoperations. - * EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - this.proxyData = proxyData; - } - - /** - * Get the current proxy data. - * - * @return the proxy data - */ - protected EntityProxyData getProxyData() { - return proxyData; - } - - /** - * Gets the entity name. - * - * @return the entity name - */ - public String getEntityName() { - return this.entityName; - } - - /** - * Gets the entity id. - * - * @return the entity id - */ - public String getEntityId() { - return this.entityId; - } - - /** - * Gets the action name. - * - * @return the action name - */ - public String getActionName() { - return this.actionName; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getUri() - */ - @Override - public String getUri() { - return uriBuilder.getUri(); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#getQueryParameters() - */ - @Override - public MultivaluedMap getQueryParameters() { - return this.queryParameters; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#addQueryParameter(java.lang.String, - * java.lang.String) - */ - @Override - public DefaultEntityActionOperation addQueryParameter(String key, - String value) { - this.queryParameters.add(key, value); - return this; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#getBodyParameters() - */ - @Override - public Map getBodyParameters() { - return this.bodyParameters; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getContentType() - */ - @Override - public MediaType getContentType() { - return this.contentType; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#setContentType(javax.ws.rs.core.MediaType) - */ - @Override - public DefaultEntityActionOperation setContentType(MediaType contentType) { - this.contentType = contentType; - return this; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getAcceptType() - */ - @Override - public MediaType getAcceptType() { - return this.acceptType; - } - - /** - * Sets the accept type. - * - * @param acceptType - * the accept type - * @return the default action operation - */ - public DefaultEntityActionOperation setAcceptType(MediaType acceptType) { - this.acceptType = acceptType; - return this; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#getVerb() - */ - @Override - public String getVerb() { - return "POST"; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - if (this.bodyParameters.size() == 0) { - return "{}"; - } else { - String jsonString = ""; - EntityActionBodyParameterMapper mapper = new EntityActionBodyParameterMapper(); - jsonString = mapper.toString(this.bodyParameters); - return jsonString; - } - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #processResponse(java.lang.Object) - */ - @Override - public Object processResponse(Object rawResponse) throws ServiceException { - PipelineHelpers.throwIfNotSuccess((ClientResponse) rawResponse); - return rawResponse; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation#addBodyParameter(java.lang.String, - * java.lang.Object) - */ - @Override - public EntityActionOperation addBodyParameter(String key, Object value) { - this.bodyParameters.put(key, value); - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityTypeActionOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityTypeActionOperation.java deleted file mode 100644 index 115adeef1427..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityTypeActionOperation.java +++ /dev/null @@ -1,215 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.core.util.MultivaluedMapImpl; - -/** - * The Class DefaultTypeActionOperation. - * - * @param - * the generic type - */ -public class DefaultEntityTypeActionOperation implements - EntityTypeActionOperation { - - /** The name. */ - private String name; - - /** The content type. */ - private MediaType contentType = MediaType.APPLICATION_XML_TYPE; - - /** The accept type. */ - private MediaType acceptType = MediaType.APPLICATION_ATOM_XML_TYPE; - - /** The query parameters. */ - private final MultivaluedMap queryParameters; - - /** The proxy data. */ - private EntityProxyData proxyData; - - /** - * Instantiates a new default type action operation. - * - * @param name - * the name - */ - public DefaultEntityTypeActionOperation(String name) { - this(); - this.name = name; - } - - /** - * Instantiates a new default type action operation. - */ - public DefaultEntityTypeActionOperation() { - this.queryParameters = new MultivaluedMapImpl(); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityTypeActionOperation - * #processTypeResponse(com.sun.jersey.api.client.ClientResponse) - */ - @Override - public T processTypeResponse(ClientResponse clientResponse) { - return null; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityTypeActionOperation#getQueryParameters() - */ - @Override - public MultivaluedMap getQueryParameters() { - return this.queryParameters; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityTypeActionOperation#getVerb() - */ - @Override - public String getVerb() { - return "GET"; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityTypeActionOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - return null; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media.entityoperations. - * EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - this.proxyData = proxyData; - } - - public EntityProxyData getProxyData() { - return this.proxyData; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getUri() - */ - @Override - public String getUri() { - return this.name; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getContentType() - */ - @Override - public MediaType getContentType() { - return this.contentType; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #getAcceptType() - */ - @Override - public MediaType getAcceptType() { - return this.acceptType; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #processResponse(java.lang.Object) - */ - @Override - public Object processResponse(Object rawResponse) throws ServiceException { - return null; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityTypeActionOperation#addQueryParameter(java.lang.String, - * java.lang.String) - */ - @Override - public DefaultEntityTypeActionOperation addQueryParameter(String key, - String value) { - this.queryParameters.add(key, value); - return this; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityTypeActionOperation#setContentType(javax.ws.rs.core.MediaType) - */ - @Override - public EntityTypeActionOperation setContentType(MediaType contentType) { - this.contentType = contentType; - return this; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityTypeActionOperation#setAcceptType(javax.ws.rs.core.MediaType) - */ - @Override - public EntityTypeActionOperation setAcceptType(MediaType acceptType) { - this.acceptType = acceptType; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultGetOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultGetOperation.java deleted file mode 100644 index 34311506cedb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultGetOperation.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -/** - * Generic implementation of the get operation usable for most entities - * - */ -public class DefaultGetOperation extends EntityOperationSingleResultBase - implements EntityGetOperation { - - /** - * Construct a new DefaultGetOperation to return the given entity id - * - * @param entityTypeUri - * Entity set URI - * @param entityId - * id of entity - * @param responseClass - * class to return from the get operation - */ - public DefaultGetOperation(String entityTypeUri, String entityId, - Class responseClass) { - super(new EntityOperationBase.EntityIdUriBuilder(entityTypeUri, - entityId), responseClass); - } - - /** - * Construct a new DefaultGetOperation to return the entity from the given - * uri - * - * @param uri - * Uri for entity - * @param responseClass - * class to return from the get operation - */ - public DefaultGetOperation(String uri, Class responseClass) { - super(uri, responseClass); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultListOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultListOperation.java deleted file mode 100644 index 49ae17daf9ac..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultListOperation.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import javax.ws.rs.core.MultivaluedMap; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.sun.jersey.api.client.GenericType; -import com.sun.jersey.core.util.MultivaluedMapImpl; - -/** - * Generic implementation of the list operation, usable by most entities - * - */ -public class DefaultListOperation extends EntityOperationBase implements - EntityListOperation { - private final MultivaluedMap queryParameters; - private final GenericType> responseType; - - public DefaultListOperation(String entityUri, - GenericType> responseType) { - super(entityUri); - queryParameters = new MultivaluedMapImpl(); - this.responseType = responseType; - } - - public DefaultListOperation(String entityUri, - GenericType> responseType, - MultivaluedMap queryParameters) { - this(entityUri, responseType); - this.queryParameters.putAll(queryParameters); - } - - /** - * Add a "$top" query parameter to set the number of values to return - * - * @param topValue - * number of values to return - * @return this - */ - public DefaultListOperation setTop(int topValue) { - queryParameters.add("$top", Integer.toString(topValue)); - return this; - } - - /** - * Add a "$skip" query parameter to set the number of values to skip - * - * @param skipValue - * the number of values to skip - * @return this - */ - public DefaultListOperation setSkip(int skipValue) { - queryParameters.add("$skip", Integer.toString(skipValue)); - return this; - } - - /** - * Add an arbitrary query parameter - * - * @param parameterName - * name of query parameter - * @param parameterValue - * value for query parameter - * @return this - */ - public DefaultListOperation set(String parameterName, - String parameterValue) { - queryParameters.add(parameterName, parameterValue); - return this; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entities.EntityListOperation - * #getQueryParameters() - */ - @Override - public MultivaluedMap getQueryParameters() { - return queryParameters; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entities.EntityListOperation - * #getResponseGenericType() - */ - @Override - public GenericType> getResponseGenericType() { - return responseType; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperationBase#processResponse(java.lang.Object) - */ - @Override - public Object processResponse(Object rawResponse) throws ServiceException { - return rawResponse; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityActionBodyParameterMapper.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityActionBodyParameterMapper.java deleted file mode 100644 index 105fc2cb909c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityActionBodyParameterMapper.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.io.IOException; -import java.io.StringWriter; -import java.io.Writer; -import java.util.Map; - -import org.codehaus.jackson.JsonGenerationException; -import org.codehaus.jackson.map.JsonMappingException; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.SerializationConfig; - -/** - * The Class entity action body parameter mapper. - */ -public class EntityActionBodyParameterMapper { - - /** The mapper. */ - private ObjectMapper mapper; - - /** - * Instantiates a new entity action body parameter mapper. - */ - public EntityActionBodyParameterMapper() { - mapper = new ObjectMapper(); - mapper.configure(SerializationConfig.Feature.WRITE_DATES_AS_TIMESTAMPS, - false); - } - - /** - * To string. - * - * @param value - * the value - * @return the string - */ - public String toString(Map value) { - Writer writer = new StringWriter(); - try { - mapper.writeValue(writer, value); - } catch (JsonGenerationException e) { - throw new RuntimeException(e); - } catch (JsonMappingException e) { - throw new RuntimeException(e); - } catch (IOException e) { - throw new RuntimeException(e); - } - return writer.toString(); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityActionOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityActionOperation.java deleted file mode 100644 index 642d06e73fa2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityActionOperation.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.util.Map; - -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; - -/** - * Action operation for Entities. - */ -public interface EntityActionOperation extends EntityOperation { - - /** - * Gets the query parameters. - * - * @return the query parameters - */ - MultivaluedMap getQueryParameters(); - - /** - * Adds the query parameter. - * - * @param key - * the key - * @param value - * the value - * @return the entity action operation - */ - EntityActionOperation addQueryParameter(String key, String value); - - /** - * Gets the verb. - * - * @return the verb - */ - String getVerb(); - - /** - * Gets the request contents. - * - * @return the request contents - */ - Object getRequestContents(); - - /** - * Sets the content type. - * - * @param contentType - * the content type - * @return the default action operation - */ - EntityActionOperation setContentType(MediaType contentType); - - /** - * Gets the body parameters. - * - * @return the body parameters - */ - Map getBodyParameters(); - - /** - * Adds the body parameter. - * - * @param key - * the key - * @param value - * the value - * @return the entity action operation - */ - EntityActionOperation addBodyParameter(String key, Object value); -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityBatchOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityBatchOperation.java deleted file mode 100644 index 6cdad409fc91..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityBatchOperation.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import javax.xml.bind.JAXBElement; -import javax.xml.namespace.QName; - -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.atom.LinkType; -import com.microsoft.windowsazure.services.media.implementation.content.Constants; - -public class EntityBatchOperation { - - private String verb; - private EntryType entryType; - - public EntityBatchOperation() { - this.entryType = new EntryType(); - } - - public EntryType getEntryType() { - return entryType; - } - - public EntityBatchOperation setEntityType(EntryType entryType) { - this.entryType = entryType; - return this; - } - - protected EntityBatchOperation setVerb(String verb) { - this.verb = verb; - return this; - } - - public String getVerb() { - return this.verb; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - public EntityBatchOperation addContentObject(Object contentObject) { - ContentType atomContent = new ContentType(); - atomContent.setType("application/xml"); - atomContent - .getContent() - .add(new JAXBElement(new QName(Constants.ODATA_METADATA_NS, - "properties"), contentObject.getClass(), contentObject)); - - this.entryType.getEntryChildren().add( - new JAXBElement(new QName(Constants.ATOM_NS, "content"), - ContentType.class, atomContent)); - return this; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - protected EntityBatchOperation addLink(String title, String href, - String type, String rel) { - LinkType linkType = new LinkType(); - linkType.setTitle(title); - linkType.setHref(href); - linkType.setType(type); - linkType.setRel(rel); - this.entryType.getEntryChildren().add( - new JAXBElement(new QName(Constants.ATOM_NS, "link"), - LinkType.class, linkType)); - return this; - - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityContract.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityContract.java deleted file mode 100644 index 36ada552644d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityContract.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.ListResult; - -/** - * Contract for interacting with the back end service providing various odata - * entities. - * - */ -public interface EntityContract { - - /** - * Create a new instance of an entity. - * - * @param - * the generic type - * @param creator - * Object providing the details of the entity to be created - * @return the t - * @throws ServiceException - * the service exception The created entity - */ - T create(EntityCreateOperation creator) throws ServiceException; - - /** - * Retrieve an existing entity by id. - * - * @param - * the generic type - * @param getter - * object providing the details of the entity to be retrieved - * @return The retrieved entity - * @throws ServiceException - * the service exception - */ - T get(EntityGetOperation getter) throws ServiceException; - - /** - * Retrieve a list of entities. - * - * @param - * the generic type - * @param lister - * object providing details of entities to list - * @return The resulting list - * @throws ServiceException - * the service exception - */ - ListResult list(EntityListOperation lister) - throws ServiceException; - - /** - * Update an existing entity. - * - * @param updater - * Object providing details of the update - * @throws ServiceException - * the service exception - */ - String update(EntityUpdateOperation updater) throws ServiceException; - - /** - * Delete an entity. - * - * @param deleter - * Object providing details of the delete - * @return - * @throws ServiceException - * the service exception - */ - String delete(EntityDeleteOperation deleter) throws ServiceException; - - /** - * Perform an action on an entity. - * - * @param action - * Object providing details of the action - * @return - * @throws ServiceException - * the service exception - */ - String action(EntityActionOperation action) throws ServiceException; - - /** - * Action. - * - * @param - * the generic type - * @param entityActionOperation - * the entity action operation - * @return the t - * @throws ServiceException - * the service exception - */ - T action(EntityTypeActionOperation entityActionOperation) - throws ServiceException; - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityCreateOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityCreateOperation.java deleted file mode 100644 index bcb6dec2d74a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityCreateOperation.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import com.microsoft.windowsazure.exception.ServiceException; - -/** - * The Interface EntityCreateOperation. - * - * @param - * the generic type - */ -public interface EntityCreateOperation extends - EntityOperationSingleResult { - - /** - * Get the object to be sent to the server containing the request data for - * entity creation. - * - * @return The payload to be marshalled and sent to the server. - * @throws ServiceException - * the service exception - */ - Object getRequestContents() throws ServiceException; - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityDeleteOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityDeleteOperation.java deleted file mode 100644 index c0203287e094..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityDeleteOperation.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -public interface EntityDeleteOperation { - - /** - * Supplies the current proxy information to the action. - * - * @param proxyData - */ - void setProxyData(EntityProxyData proxyData); - - /** - * Get the URI to use to delete an entity - * - * @return The uri - */ - String getUri(); -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityGetOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityGetOperation.java deleted file mode 100644 index f9a34fce9990..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityGetOperation.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -/** - * Get operation for Entities - * - */ -public interface EntityGetOperation extends EntityOperationSingleResult { -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityLinkOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityLinkOperation.java deleted file mode 100644 index d0ea4e7ffcc2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityLinkOperation.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.io.UnsupportedEncodingException; -import java.net.URI; -import java.net.URLEncoder; -import java.security.InvalidParameterException; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.namespace.QName; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; - -import com.microsoft.windowsazure.services.media.implementation.content.Constants; -import com.microsoft.windowsazure.services.media.implementation.content.MediaUriType; - -/** - * Generic implementation of $link operation of two entities. - */ -public class EntityLinkOperation extends DefaultActionOperation { - - /** The primary entity set. */ - private final String primaryEntitySet; - - /** The primary entity id. */ - private final String primaryEntityId; - - /** The secondary entity set. */ - private final String secondaryEntitySet; - - /** The secondary entity uri. */ - private final URI secondaryEntityUri; - - /** The jaxb context. */ - private final JAXBContext jaxbContext; - - /** The marshaller. */ - private final Marshaller marshaller; - - /** The document builder. */ - private final DocumentBuilder documentBuilder; - - /** The document builder factory. */ - private final DocumentBuilderFactory documentBuilderFactory; - - /** - * Instantiates a new entity link operation. - * - * @param primaryEntitySet - * the primary entity set - * @param primaryEntityId - * the primary entity id - * @param secondaryEntitySet - * the secondary entity set - * @param secondaryEntityUri - * the secondary entity uri - */ - public EntityLinkOperation(String primaryEntitySet, String primaryEntityId, - String secondaryEntitySet, URI secondaryEntityUri) { - super(); - this.primaryEntitySet = primaryEntitySet; - this.primaryEntityId = primaryEntityId; - this.secondaryEntitySet = secondaryEntitySet; - this.secondaryEntityUri = secondaryEntityUri; - try { - jaxbContext = JAXBContext.newInstance(MediaUriType.class); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - try { - marshaller = jaxbContext.createMarshaller(); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - documentBuilderFactory = DocumentBuilderFactory.newInstance(); - try { - documentBuilder = documentBuilderFactory.newDocumentBuilder(); - } catch (ParserConfigurationException e) { - throw new RuntimeException(e); - } - - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entities.EntityDeleteOperation - * #getUri() - */ - @Override - public String getUri() { - String escapedEntityId; - try { - escapedEntityId = URLEncoder.encode(primaryEntityId, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new InvalidParameterException( - "UTF-8 encoding is not supported."); - } - return String.format("%s('%s')/$links/%s", primaryEntitySet, - escapedEntityId, secondaryEntitySet); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * DefaultActionOperation#getVerb() - */ - @Override - public String getVerb() { - return "POST"; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * DefaultActionOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - MediaUriType mediaUriType = new MediaUriType(); - mediaUriType.setUri(getProxyData().getServiceUri().toString() - + this.secondaryEntityUri.toString()); - JAXBElement mediaUriTypeElement = new JAXBElement( - new QName(Constants.ODATA_DATA_NS, "uri"), MediaUriType.class, - mediaUriType); - Document document = documentBuilder.newDocument(); - document.setXmlStandalone(true); - try { - marshaller.marshal(mediaUriTypeElement, document); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - return document; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityListOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityListOperation.java deleted file mode 100644 index 80d0d146a89b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityListOperation.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import javax.ws.rs.core.MultivaluedMap; - -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.sun.jersey.api.client.GenericType; - -/** - * Operation class to retrieve a list of entities - * - */ -public interface EntityListOperation extends EntityOperation { - - /** - * Get query parameters to add to the uri - * - * @return The query parameters collection - */ - MultivaluedMap getQueryParameters(); - - /** - * Get a GenericType object representing the result list type - * - * @return the type of the operation's result - */ - GenericType> getResponseGenericType(); -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperation.java deleted file mode 100644 index 7c824905301e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperation.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import javax.ws.rs.core.MediaType; - -import com.microsoft.windowsazure.exception.ServiceException; - -public interface EntityOperation { - - /** - * Supplies the current proxy information to the action. - * - * @param proxyData - */ - void setProxyData(EntityProxyData proxyData); - - /** - * Get the URI the creation request should be sent to. - * - * @return The uri - */ - String getUri(); - - /** - * Get the MIME type for the content that's being sent to the server. - * - * @return The MIME type - * @throws ServiceException - */ - MediaType getContentType(); - - /** - * Get the MIME type that we're expecting the server to send back. - */ - MediaType getAcceptType(); - - /** - * Process response process. - * - * @param rawResponse - * the raw response - * @return the object - * @throws ServiceException - * the service exception - */ - Object processResponse(Object rawResponse) throws ServiceException; - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationBase.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationBase.java deleted file mode 100644 index da30c9d99621..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationBase.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.security.InvalidParameterException; - -import javax.ws.rs.core.MediaType; - -import com.microsoft.windowsazure.exception.ServiceException; - -/** - * Default implementation of EntityOperation to provide default values for - * common methods. - * - */ -public abstract class EntityOperationBase implements EntityOperation { - - /** The uri builder. */ - private final EntityUriBuilder uriBuilder; - - /** The proxy data. */ - private EntityProxyData proxyData; - - /** - * Instantiates a new entity operation base. - * - * @param uri - * the uri - */ - protected EntityOperationBase(final String uri) { - this.uriBuilder = new EntityUriBuilder() { - @Override - public String getUri() { - return uri; - } - }; - } - - /** - * Instantiates a new entity operation base. - * - * @param uriBuilder - * the uri builder - */ - protected EntityOperationBase(EntityUriBuilder uriBuilder) { - this.uriBuilder = uriBuilder; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media.entityoperations. - * EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - this.proxyData = proxyData; - } - - /** - * Get the currently set proxy data. - * - * @return the proxy data - */ - protected EntityProxyData getProxyData() { - return proxyData; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entities.EntityOperation#getUri - * () - */ - @Override - public String getUri() { - return uriBuilder.getUri(); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entities.EntityOperation# - * getContentType() - */ - @Override - public MediaType getContentType() { - return MediaType.APPLICATION_ATOM_XML_TYPE; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entities.EntityOperation# - * getAcceptType() - */ - @Override - public MediaType getAcceptType() { - return MediaType.APPLICATION_ATOM_XML_TYPE; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityOperation - * #processResponse(java.lang.Object) - */ - @Override - public Object processResponse(Object rawResponse) throws ServiceException { - return rawResponse; - } - - /** - * The Interface EntityUriBuilder. - */ - public interface EntityUriBuilder { - - /** - * Gets the uri. - * - * @return the uri - */ - String getUri(); - } - - /** - * The Class EntityIdUriBuilder. - */ - public static class EntityIdUriBuilder implements EntityUriBuilder { - - /** The entity type. */ - private final String entityType; - - /** The entity id. */ - private final String entityId; - - /** The action name. */ - private String actionName; - - /** - * Instantiates a new entity id uri builder. - * - * @param entityName - * the entity name - * @param entityId - * the entity id - */ - public EntityIdUriBuilder(String entityName, String entityId) { - super(); - this.entityType = entityName; - this.entityId = entityId; - } - - /** - * Sets the action name. - * - * @param actionName - * the action name - * @return the entity id uri builder - */ - public EntityIdUriBuilder setActionName(String actionName) { - this.actionName = actionName; - return this; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entities.EntityOperationBase - * .EntityUriBuilder#getUri() - */ - @Override - public String getUri() { - String escapedEntityId; - try { - escapedEntityId = URLEncoder.encode(entityId, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new InvalidParameterException(entityId); - } - String result = null; - if ((this.actionName == null) || this.actionName.isEmpty()) { - result = String.format("%s('%s')", entityType, escapedEntityId); - } else { - result = String.format("%s('%s')/%s", entityType, - escapedEntityId, this.actionName); - } - return result; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationSingleResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationSingleResult.java deleted file mode 100644 index a98090a14e89..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationSingleResult.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -public interface EntityOperationSingleResult extends EntityOperation { - /** - * Get the Java class object for the type that the response should be - * unmarshalled into. - * - * @return Class object for response. - */ - Class getResponseClass(); -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationSingleResultBase.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationSingleResultBase.java deleted file mode 100644 index 19a68c1dbaae..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityOperationSingleResultBase.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import com.microsoft.windowsazure.exception.ServiceException; - -/** - * - * - */ -public class EntityOperationSingleResultBase extends EntityOperationBase - implements EntityOperationSingleResult { - private final Class responseClass; - - /** - * - */ - public EntityOperationSingleResultBase(String uri, Class responseClass) { - super(uri); - this.responseClass = responseClass; - } - - public EntityOperationSingleResultBase( - EntityOperationBase.EntityUriBuilder uriBuilder, - Class responseClass) { - super(uriBuilder); - this.responseClass = responseClass; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entities. - * EntityOperationSingleResult#getResponseClass() - */ - @Override - public Class getResponseClass() { - return responseClass; - } - - @Override - public Object processResponse(Object rawResponse) throws ServiceException { - return rawResponse; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityProxyData.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityProxyData.java deleted file mode 100644 index ec5a3c688b03..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityProxyData.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.net.URI; - -/** - * Interface used to communicate details about the proxy to the operations, if - * they need it. - * - */ -public interface EntityProxyData { - /** - * Gets the absolute URI currently being used by proxy. - * - * @return The URI - */ - URI getServiceUri(); -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityRestProxy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityRestProxy.java deleted file mode 100644 index 193603463a25..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityRestProxy.java +++ /dev/null @@ -1,302 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.util.List; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -import javax.ws.rs.core.MediaType; - -import com.microsoft.windowsazure.core.pipeline.PipelineHelpers; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.WebResource; -import com.sun.jersey.api.client.WebResource.Builder; -import com.sun.jersey.api.client.filter.ClientFilter; - -/** - * The Class EntityRestProxy. - */ -public abstract class EntityRestProxy implements EntityContract { - - /** The executor service. */ - private final ExecutorService executorService; - /** The channel. */ - private final Client channel; - /** The filters. */ - private final ClientFilter[] filters; - - /** - * Instantiates a new entity rest proxy. - * - * @param channel - * the channel - * @param filters - * the filters - */ - public EntityRestProxy(Client channel, ClientFilter[] filters) { - this.channel = channel; - this.filters = filters; - this.executorService = Executors.newCachedThreadPool(); - } - - /** - * Gets the channel. - * - * @return the channel - */ - protected Client getChannel() { - return channel; - } - - /** - * Gets the executor service. - * - * @return the executor service - */ - protected ExecutorService getExecutorService() { - return executorService; - } - - /** - * Gets the filters. - * - * @return the filters - */ - protected ClientFilter[] getFilters() { - return filters; - } - - /** - * Get the proxy data to pass to operations. - * - * @return The proxy data. - */ - protected abstract EntityProxyData createProxyData(); - - /** - * Gets the resource. - * - * @param entityName - * the entity name - * @return the resource - */ - private WebResource getResource(String entityName) { - WebResource resource = channel.resource(entityName); - for (ClientFilter filter : filters) { - resource.addFilter(filter); - } - return resource; - } - - /** - * Gets the resource. - * - * @param operation - * the operation - * @return the resource - * @throws ServiceException - * the service exception - */ - private Builder getResource(EntityOperation operation) - throws ServiceException { - return getResource(operation.getUri()).type(operation.getContentType()) - .accept(operation.getAcceptType()); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #create(com.microsoft.windowsazure.services.media.entityoperations. - * EntityCreateOperation) - */ - @SuppressWarnings("unchecked") - @Override - public T create(EntityCreateOperation creator) - throws ServiceException { - creator.setProxyData(createProxyData()); - Object rawResponse = getResource(creator).post( - creator.getResponseClass(), creator.getRequestContents()); - Object processedResponse = creator.processResponse(rawResponse); - return (T) processedResponse; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #get(com.microsoft.windowsazure.services.media.entityoperations. - * EntityGetOperation) - */ - @SuppressWarnings("unchecked") - @Override - public T get(EntityGetOperation getter) throws ServiceException { - getter.setProxyData(createProxyData()); - Object rawResponse = getResource(getter).get(getter.getResponseClass()); - Object processedResponse = getter.processResponse(rawResponse); - return (T) processedResponse; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #list(com.microsoft.windowsazure.services.media.entityoperations. - * EntityListOperation) - */ - @SuppressWarnings("unchecked") - @Override - public ListResult list(EntityListOperation lister) - throws ServiceException { - lister.setProxyData(createProxyData()); - Object rawResponse = getResource(lister.getUri()) - .queryParams(lister.getQueryParameters()) - .type(lister.getContentType()).accept(lister.getAcceptType()) - .get(lister.getResponseGenericType()); - Object processedResponse = lister.processResponse(rawResponse); - return (ListResult) processedResponse; - - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #update(com.microsoft.windowsazure.services.media.entityoperations. - * EntityUpdateOperation) - */ - @Override - public String update(EntityUpdateOperation updater) throws ServiceException { - updater.setProxyData(createProxyData()); - ClientResponse clientResponse = getResource(updater).header("X-HTTP-METHOD", - "MERGE").post(ClientResponse.class, - updater.getRequestContents()); - PipelineHelpers.throwIfNotSuccess(clientResponse); - updater.processResponse(clientResponse); - if (clientResponse.getHeaders().containsKey("operation-id")) { - List operationIds = clientResponse.getHeaders().get("operation-id"); - if (operationIds.size() >= 0) { - return operationIds.get(0); - } - } - return null; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #delete(com.microsoft.windowsazure.services.media.entityoperations. - * EntityDeleteOperation) - * @return operation-id if any otherwise null. - */ - @Override - public String delete(EntityDeleteOperation deleter) throws ServiceException { - deleter.setProxyData(createProxyData()); - ClientResponse clientResponse = getResource(deleter.getUri()).delete(ClientResponse.class); - PipelineHelpers.throwIfNotSuccess(clientResponse); - if (clientResponse.getHeaders().containsKey("operation-id")) { - List operationIds = clientResponse.getHeaders().get("operation-id"); - if (operationIds.size() >= 0) { - return operationIds.get(0); - } - } - return null; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #action(com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation) - */ - @Override - public T action(EntityTypeActionOperation entityTypeActionOperation) - throws ServiceException { - entityTypeActionOperation.setProxyData(createProxyData()); - Builder webResource = getResource(entityTypeActionOperation.getUri()) - .queryParams(entityTypeActionOperation.getQueryParameters()) - .accept(entityTypeActionOperation.getAcceptType()) - .accept(MediaType.APPLICATION_XML_TYPE) - .entity(entityTypeActionOperation.getRequestContents(), - MediaType.APPLICATION_XML_TYPE) - .type(MediaType.APPLICATION_XML); - - ClientResponse clientResponse = webResource.method( - entityTypeActionOperation.getVerb(), ClientResponse.class); - return entityTypeActionOperation.processTypeResponse(clientResponse); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #action(com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation) - */ - @Override - public String action(EntityActionOperation entityActionOperation) - throws ServiceException { - ClientResponse clientResponse = getActionClientResponse(entityActionOperation); - entityActionOperation.processResponse(clientResponse); - - //PipelineHelpers.throwIfNotSuccess(clientResponse); - - if (clientResponse.getHeaders().containsKey("operation-id")) { - List operationIds = clientResponse.getHeaders().get("operation-id"); - if (operationIds.size() >= 0) { - return operationIds.get(0); - } - } - return null; - } - - /** - * Gets the action client response. - * - * @param entityActionOperation - * the entity action operation - * @return the action client response - */ - private ClientResponse getActionClientResponse( - EntityActionOperation entityActionOperation) { - entityActionOperation.setProxyData(createProxyData()); - Builder webResource = getResource(entityActionOperation.getUri()) - .queryParams(entityActionOperation.getQueryParameters()) - .accept(entityActionOperation.getAcceptType()) - .accept(MediaType.APPLICATION_XML_TYPE) - .type(MediaType.APPLICATION_XML_TYPE); - if (entityActionOperation.getRequestContents() != null) { - webResource = webResource.entity( - entityActionOperation.getRequestContents(), - entityActionOperation.getContentType()); - } - return webResource.method(entityActionOperation.getVerb(), - ClientResponse.class); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityTypeActionOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityTypeActionOperation.java deleted file mode 100644 index d089aaff24c3..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityTypeActionOperation.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; - -import com.sun.jersey.api.client.ClientResponse; - -/** - * The Interface EntityTypeActionOperation. - * - * @param - * the generic type - */ -public interface EntityTypeActionOperation extends EntityOperation { - - /** - * Process type response. - * - * @param clientResponse - * the client response - * @return the t - */ - T processTypeResponse(ClientResponse clientResponse); - - /** - * Gets the query parameters. - * - * @return the query parameters - */ - MultivaluedMap getQueryParameters(); - - /** - * Adds the query parameter. - * - * @param key - * the key - * @param value - * the value - * @return the entity action operation - */ - EntityTypeActionOperation addQueryParameter(String key, String value); - - /** - * Gets the verb. - * - * @return the verb - */ - String getVerb(); - - /** - * Gets the request contents. - * - * @return the request contents - */ - Object getRequestContents(); - - /** - * Sets the content type. - * - * @param contentType - * the content type - * @return the entity type action operation - */ - EntityTypeActionOperation setContentType(MediaType contentType); - - /** - * Sets the accept type. - * - * @param acceptType - * the accept type - * @return the entity type action operation - */ - EntityTypeActionOperation setAcceptType(MediaType acceptType); - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityUnlinkOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityUnlinkOperation.java deleted file mode 100644 index 5ed5695613d7..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityUnlinkOperation.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.security.InvalidParameterException; - -/** - * Generic implementation of $link operation of two entities. - */ -public class EntityUnlinkOperation extends DefaultDeleteOperation { - - /** The primary entity set. */ - private final String primaryEntitySet; - - /** The primary entity id. */ - private final String primaryEntityId; - - /** The secondary entity set. */ - private final String secondaryEntitySet; - - /** The secondary entity id. */ - private final String secondaryEntityId; - - /** - * Instantiates a new entity unlink operation. - * - * @param primaryEntitySet - * the primary entity set - * @param primaryEntityId - * the primary entity id - * @param secondaryEntitySet - * the secondary entity set - * @param secondaryEntityUri - * the secondary entity id - */ - public EntityUnlinkOperation(String primaryEntitySet, String primaryEntityId, - String secondaryEntitySet, String secondaryEntityId) { - super(primaryEntitySet, primaryEntityId); - this.primaryEntitySet = primaryEntitySet; - this.primaryEntityId = primaryEntityId; - this.secondaryEntitySet = secondaryEntitySet; - this.secondaryEntityId = secondaryEntityId; - } - - @Override - public String getUri() { - String escapedPrimaryEntityId; - String escapedSecondaryEntityId; - try { - escapedPrimaryEntityId = URLEncoder.encode(primaryEntityId, "UTF-8"); - escapedSecondaryEntityId = URLEncoder.encode(secondaryEntityId, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new InvalidParameterException( - "UTF-8 encoding is not supported."); - } - return String.format("%s('%s')/$links/%s('%s')", primaryEntitySet, - escapedPrimaryEntityId, secondaryEntitySet, escapedSecondaryEntityId); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityUpdateOperation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityUpdateOperation.java deleted file mode 100644 index 7917c91a24dd..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityUpdateOperation.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.entityoperations; - -/** - * - * - */ -public interface EntityUpdateOperation extends EntityOperation { - /** - * Get the contents of the merge request that will be sent to the server. - * - * @return The payload object - */ - Object getRequestContents(); -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityWithOperationIdentifier.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityWithOperationIdentifier.java deleted file mode 100644 index 145b34edef60..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/EntityWithOperationIdentifier.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.microsoft.windowsazure.services.media.entityoperations; - -public interface EntityWithOperationIdentifier { - - String getOperationId(); - - void setOperationId(String string); - - boolean hasOperationIdentifier(); - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/package.html deleted file mode 100644 index e7819f147963..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the media service OData operation class, interface, and utility classes. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ActiveToken.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ActiveToken.java deleted file mode 100644 index 062fa73b09c3..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ActiveToken.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.util.Date; - -/** - * A class representing active token. - * - */ -public class ActiveToken { - - private Date expiresUtc; - private String accessToken; - - /** - * Gets the expiration time in UTC. - * - * @return The token expiration time in UTC. - */ - public Date getExpiresUtc() { - return expiresUtc; - } - - /** - * Sets the token expiration time in UTC. - * - * @param expiresUtc - */ - public void setExpiresUtc(Date expiresUtc) { - this.expiresUtc = expiresUtc; - } - - /** - * Gets access token. - * - * @return String - */ - public String getAccessToken() { - return this.accessToken; - } - - /** - * Sets the access token. - * - * @param accessToken - */ - public void setAccessToken(String accessToken) { - this.accessToken = accessToken; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/BatchMimeMultipart.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/BatchMimeMultipart.java deleted file mode 100644 index 03369112c670..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/BatchMimeMultipart.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.OutputStream; - -import javax.mail.BodyPart; -import javax.mail.MessagingException; -import javax.mail.internet.MimeMultipart; - -public class BatchMimeMultipart extends MimeMultipart { - - public BatchMimeMultipart(SetBoundaryMultipartDataSource setBoundaryMultipartDataSource) throws MessagingException { - super(setBoundaryMultipartDataSource); - } - - @Override - public synchronized void writeTo(OutputStream os) - throws IOException, MessagingException { - - resetInputStreams(); - super.writeTo(os); - } - - // reset all input streams to allow redirect filter to write the output twice - private void resetInputStreams() throws IOException, MessagingException { - for (int ix = 0; ix < this.getCount(); ix++) { - BodyPart part = this.getBodyPart(ix); - if (part.getContent() instanceof MimeMultipart) { - MimeMultipart subContent = (MimeMultipart) part.getContent(); - for (int jx = 0; jx < subContent.getCount(); jx++) { - BodyPart subPart = subContent.getBodyPart(jx); - if (subPart.getContent() instanceof ByteArrayInputStream) { - ((ByteArrayInputStream) subPart.getContent()).reset(); - } - } - } - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/BatchMimeMultipartBodyWritter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/BatchMimeMultipartBodyWritter.java deleted file mode 100644 index 1c3e1ae87ade..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/BatchMimeMultipartBodyWritter.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.IOException; -import java.io.OutputStream; -import java.lang.annotation.Annotation; -import java.lang.reflect.Type; - -import javax.mail.MessagingException; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.MessageBodyWriter; - -@Produces("multipart/mixed") -public class BatchMimeMultipartBodyWritter implements MessageBodyWriter { - - @Override - public long getSize(BatchMimeMultipart bmm, Class arg1, Type arg2, Annotation[] arg3, MediaType arg4) { - return -1; - } - - @Override - public boolean isWriteable(Class type, Type arg1, Annotation[] arg2, MediaType arg3) { - return type == BatchMimeMultipart.class; - } - - @Override - public void writeTo(BatchMimeMultipart t, Class arg1, Type arg2, Annotation[] arg3, MediaType arg4, - MultivaluedMap arg5, OutputStream entityStream) throws IOException, WebApplicationException { - try { - t.writeTo(entityStream); - } catch (MessagingException ex) { - throw new WebApplicationException(ex); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java deleted file mode 100644 index 5fa40cd64206..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java +++ /dev/null @@ -1,578 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.UnsupportedEncodingException; -import java.net.URI; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import javax.activation.DataHandler; -import javax.activation.DataSource; -import javax.mail.BodyPart; -import javax.mail.Header; -import javax.mail.MessagingException; -import javax.mail.internet.InternetHeaders; -import javax.mail.internet.MimeBodyPart; -import javax.mail.internet.MimeMultipart; -import javax.mail.internet.MimePartDataSource; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriBuilder; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.ParserConfigurationException; - -import com.microsoft.windowsazure.core.utils.InputStreamDataSource; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.EntityBatchOperation; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.models.Job; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.Task; -import com.microsoft.windowsazure.services.media.models.TaskInfo; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.UniformInterfaceException; -import com.sun.jersey.core.header.InBoundHeaders; -import com.sun.jersey.core.util.ReaderWriter; - -/** - * The Class MediaBatchOperations. - */ -public class MediaBatchOperations { - - private static final int BUFFER_SIZE = 1024; - - private static final int HTTP_ERROR = 400; - - /** The operations. */ - private final List entityBatchOperations; - - /** The service uri. */ - private final URI serviceURI; - - /** The Odata atom marshaller. */ - private final ODataAtomMarshaller oDataAtomMarshaller; - - /** The o data atom unmarshaller. */ - private final ODataAtomUnmarshaller oDataAtomUnmarshaller; - - private final String batchId; - - /** - * Instantiates a new media batch operations. - * - * @param serviceURI - * the service uri - * @throws ParserConfigurationException - * @throws JAXBException - */ - public MediaBatchOperations(URI serviceURI) throws JAXBException, - ParserConfigurationException { - if (serviceURI == null) { - throw new IllegalArgumentException( - "The service URI cannot be null."); - } - this.serviceURI = serviceURI; - this.oDataAtomMarshaller = new ODataAtomMarshaller(); - this.oDataAtomUnmarshaller = new ODataAtomUnmarshaller(); - this.entityBatchOperations = new ArrayList(); - batchId = String.format("batch_%s", UUID.randomUUID().toString()); - } - - /** - * Gets the mime multipart. - * - * @return the mime multipart - * @throws MessagingException - * the messaging exception - * @throws IOException - * Signals that an I/O exception has occurred. - * @throws JAXBException - * the jAXB exception - */ - public MimeMultipart getMimeMultipart() throws MessagingException, - IOException, JAXBException { - List bodyPartContents = createRequestBody(); - return toMimeMultipart(bodyPartContents); - - } - - private List createRequestBody() throws JAXBException { - List bodyPartContents = new ArrayList(); - int contentId = 1; - - URI jobURI = UriBuilder.fromUri(serviceURI).path("Jobs").build(); - int jobContentId = addJobPart(bodyPartContents, jobURI, contentId); - contentId++; - - URI taskURI = UriBuilder.fromUri(serviceURI) - .path(String.format("$%d", jobContentId)).path("Tasks").build(); - addTaskPart(bodyPartContents, taskURI, contentId); - return bodyPartContents; - - } - - /** - * Adds the job part. - * - * @param bodyPartContents - * the body part contents - * @param contentId - * the content id - * @return the int - * @throws JAXBException - * the jAXB exception - */ - private int addJobPart(List bodyPartContents, URI jobURI, - int contentId) throws JAXBException { - int jobContentId = contentId; - validateJobOperation(); - - for (EntityBatchOperation entityBatchOperation : entityBatchOperations) { - DataSource bodyPartContent = null; - if (entityBatchOperation instanceof Job.CreateBatchOperation) { - Job.CreateBatchOperation jobCreateBatchOperation = (Job.CreateBatchOperation) entityBatchOperation; - jobContentId = contentId; - bodyPartContent = createBatchCreateEntityPart( - jobCreateBatchOperation.getVerb(), "Jobs", - jobCreateBatchOperation.getEntryType(), jobURI, - contentId); - contentId++; - if (bodyPartContent != null) { - bodyPartContents.add(bodyPartContent); - break; - } - } - } - return jobContentId; - } - - private void validateJobOperation() { - int jobCount = 0; - for (EntityBatchOperation entityBatchOperation : entityBatchOperations) { - if (entityBatchOperation instanceof Job.CreateBatchOperation) { - jobCount++; - } - } - - if (jobCount != 1) { - throw new IllegalArgumentException( - String.format( - "The Job operation is invalid, expect 1 but get %s job(s). ", - jobCount)); - } - } - - /** - * Adds the task part. - * - * @param bodyPartContents - * the body part contents - * @param taskURI - * the task uri - * @param contentId - * the content id - * @throws JAXBException - * the jAXB exception - */ - private void addTaskPart(List bodyPartContents, URI taskURI, - int contentId) throws JAXBException { - for (EntityBatchOperation entityBatchOperation : entityBatchOperations) { - DataSource bodyPartContent = null; - if (entityBatchOperation instanceof Task.CreateBatchOperation) { - Task.CreateBatchOperation createTaskOperation = (Task.CreateBatchOperation) entityBatchOperation; - bodyPartContent = createBatchCreateEntityPart( - createTaskOperation.getVerb(), "Tasks", - createTaskOperation.getEntryType(), taskURI, contentId); - contentId++; - } - - if (bodyPartContent != null) { - bodyPartContents.add(bodyPartContent); - } - } - } - - /** - * To mime multipart. - * - * @param bodyPartContents - * the body part contents - * @return the mime multipart - * @throws MessagingException - * the messaging exception - * @throws IOException - * Signals that an I/O exception has occurred. - */ - private MimeMultipart toMimeMultipart(List bodyPartContents) - throws MessagingException, IOException { - String changeSetId = String.format("changeset_%s", UUID.randomUUID() - .toString()); - MimeMultipart changeSets = createChangeSets(bodyPartContents, - changeSetId); - MimeBodyPart mimeBodyPart = createMimeBodyPart(changeSets, changeSetId); - - MimeMultipart mimeMultipart = new BatchMimeMultipart( - new SetBoundaryMultipartDataSource(batchId)); - mimeMultipart.addBodyPart(mimeBodyPart); - return mimeMultipart; - - } - - private MimeBodyPart createMimeBodyPart(MimeMultipart changeSets, - String changeSetId) throws MessagingException { - MimeBodyPart mimeBodyPart = new MimeBodyPart(); - mimeBodyPart.setContent(changeSets); - String contentType = String.format("multipart/mixed; boundary=%s", - changeSetId); - mimeBodyPart.setHeader("Content-Type", contentType); - return mimeBodyPart; - } - - private MimeMultipart createChangeSets(List bodyPartContents, - String changeSetId) throws MessagingException { - - MimeMultipart changeSets = new MimeMultipart( - new SetBoundaryMultipartDataSource(changeSetId)); - - for (DataSource bodyPart : bodyPartContents) { - MimeBodyPart mimeBodyPart = new MimeBodyPart(); - - mimeBodyPart.setDataHandler(new DataHandler(bodyPart)); - mimeBodyPart.setHeader("Content-Type", bodyPart.getContentType()); - mimeBodyPart.setHeader("Content-Transfer-Encoding", "binary"); - - changeSets.addBodyPart(mimeBodyPart); - } - - return changeSets; - } - - /** - * Creates the batch create entity part. - * - * @param entityName - * the entity name - * @param entity - * the entity - * @param uri - * the uri - * @param contentId - * the content id - * @return the data source - * @throws JAXBException - * the jAXB exception - */ - private DataSource createBatchCreateEntityPart(String verb, - String entityName, EntryType entryType, URI uri, int contentId) - throws JAXBException { - ByteArrayOutputStream stream = new ByteArrayOutputStream(); - this.oDataAtomMarshaller.marshalEntryType(entryType, stream); - byte[] bytes = stream.toByteArray(); - - // adds header - InternetHeaders headers = new InternetHeaders(); - headers.addHeader("Content-ID", Integer.toString(contentId)); - headers.addHeader("Content-Type", "application/atom+xml;type=entry"); - headers.addHeader("Content-Length", Integer.toString(bytes.length)); - headers.addHeader("DataServiceVersion", "3.0;NetFx"); - headers.addHeader("MaxDataServiceVersion", "3.0;NetFx"); - - // adds body - ByteArrayOutputStream httpRequest = new ByteArrayOutputStream(); - addHttpMethod(httpRequest, verb, uri); - appendHeaders(httpRequest, headers); - appendEntity(httpRequest, new ByteArrayInputStream(bytes)); - - DataSource bodyPartContent = new InputStreamDataSource( - new ByteArrayInputStream(httpRequest.toByteArray()), - "application/http"); - return bodyPartContent; - } - - /** - * Parses the batch result. - * - * @param response - * the response - * @param mediaBatchOperations - * the media batch operations - * @throws IOException - * Signals that an I/O exception has occurred. - * @throws ServiceException - * the service exception - */ - public void parseBatchResult(ClientResponse response) throws IOException, - ServiceException { - ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - InputStream inputStream = response.getEntityInputStream(); - ReaderWriter.writeTo(inputStream, byteArrayOutputStream); - response.setEntityInputStream(new ByteArrayInputStream( - byteArrayOutputStream.toByteArray())); - JobInfo jobInfo; - - List parts = parseParts(response.getEntityInputStream(), - response.getHeaders().getFirst("Content-Type")); - - if (parts.size() == 0 || parts.size() > entityBatchOperations.size()) { - throw new UniformInterfaceException(String.format( - "Batch response from server does not contain the correct amount " - + "of parts (expecting %d, received %d instead)", - parts.size(), entityBatchOperations.size()), response); - } - - for (int i = 0; i < parts.size(); i++) { - DataSource ds = parts.get(i); - EntityBatchOperation entityBatchOperation = entityBatchOperations - .get(i); - - StatusLine status = StatusLine.create(ds); - InternetHeaders headers = parseHeaders(ds); - InputStream content = parseEntity(ds); - - if (status.getStatus() >= HTTP_ERROR) { - - InBoundHeaders inBoundHeaders = new InBoundHeaders(); - @SuppressWarnings("unchecked") - Enumeration

e = headers.getAllHeaders(); - while (e.hasMoreElements()) { - Header header = e.nextElement(); - inBoundHeaders.putSingle(header.getName(), - header.getValue()); - } - - ClientResponse clientResponse = new ClientResponse( - status.getStatus(), inBoundHeaders, content, null); - - UniformInterfaceException uniformInterfaceException = new UniformInterfaceException( - clientResponse); - throw uniformInterfaceException; - } else if (entityBatchOperation instanceof Job.CreateBatchOperation) { - - try { - jobInfo = oDataAtomUnmarshaller.unmarshalEntry(content, - JobInfo.class); - Job.CreateBatchOperation jobCreateBatchOperation = (Job.CreateBatchOperation) entityBatchOperation; - jobCreateBatchOperation.setJobInfo(jobInfo); - } catch (JAXBException e) { - throw new ServiceException(e); - } - } else if (entityBatchOperation instanceof Task.CreateBatchOperation) { - try { - oDataAtomUnmarshaller.unmarshalEntry(content, - TaskInfo.class); - } catch (JAXBException e) { - throw new ServiceException(e); - } - } - } - } - - /** - * Parses the headers. - * - * @param ds - * the ds - * @return the internet headers - */ - private InternetHeaders parseHeaders(DataSource ds) { - try { - return new InternetHeaders(ds.getInputStream()); - } catch (MessagingException e) { - throw new RuntimeException(e); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - /** - * Parses the entity. - * - * @param ds - * the ds - * @return the input stream - */ - private InputStream parseEntity(DataSource ds) { - try { - return ds.getInputStream(); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - /** - * Parses the parts. - * - * @param entityInputStream - * the entity input stream - * @param contentType - * the content type - * @return the list - */ - private List parseParts(final InputStream entityInputStream, - final String contentType) { - try { - return parsePartsCore(entityInputStream, contentType); - } catch (IOException e) { - throw new RuntimeException(e); - } catch (MessagingException e) { - throw new RuntimeException(e); - } - } - - /** - * Parses the parts core. - * - * @param entityInputStream - * the entity input stream - * @param contentType - * the content type - * @return the list - * @throws MessagingException - * the messaging exception - * @throws IOException - * Signals that an I/O exception has occurred. - */ - private List parsePartsCore(InputStream entityInputStream, - String contentType) throws MessagingException, IOException { - DataSource dataSource = new InputStreamDataSource(entityInputStream, - contentType); - MimeMultipart batch = new MimeMultipart(dataSource); - MimeBodyPart batchBody = (MimeBodyPart) batch.getBodyPart(0); - - MimeMultipart changeSets = new MimeMultipart(new MimePartDataSource( - batchBody)); - - List result = new ArrayList(); - for (int i = 0; i < changeSets.getCount(); i++) { - BodyPart part = changeSets.getBodyPart(i); - - result.add(new InputStreamDataSource(part.getInputStream(), part - .getContentType())); - } - return result; - } - - /** - * Adds the operation. - * - * @param entityBatchOperation - * the operation - */ - public void addOperation(EntityBatchOperation entityBatchOperation) { - this.entityBatchOperations.add(entityBatchOperation); - } - - /** - * Adds the http method. - * - * @param outputStream - * the output stream - * @param verb - * the verb - * @param uri - * the uri - */ - private void addHttpMethod(ByteArrayOutputStream outputStream, String verb, - URI uri) { - try { - String method = String.format("%s %s HTTP/1.1\r\n", verb, uri); - outputStream.write(method.getBytes("UTF-8")); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - /** - * Append headers. - * - * @param outputStream - * the output stream - * @param internetHeaders - * the internet headers - */ - private void appendHeaders(OutputStream outputStream, - InternetHeaders internetHeaders) { - try { - // Headers - @SuppressWarnings("unchecked") - Enumeration
headers = internetHeaders.getAllHeaders(); - while (headers.hasMoreElements()) { - Header header = headers.nextElement(); - String headerLine = String.format("%s: %s\r\n", - header.getName(), header.getValue()); - outputStream.write(headerLine.getBytes("UTF-8")); - } - - // Empty line - outputStream.write("\r\n".getBytes("UTF-8")); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - /** - * Append entity. - * - * @param outputStream - * the output stream - * @param byteArrayInputStream - * the byte array input stream - */ - private void appendEntity(OutputStream outputStream, - ByteArrayInputStream byteArrayInputStream) { - try { - byte[] buffer = new byte[BUFFER_SIZE]; - while (true) { - int bytesRead = byteArrayInputStream.read(buffer); - if (bytesRead <= 0) { - break; - } - outputStream.write(buffer, 0, bytesRead); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - public List getOperations() { - return entityBatchOperations; - } - - public String getBatchId() { - return this.batchId; - } - - public MediaType getContentType() { - Map parameters = new Hashtable(); - parameters.put("boundary", this.batchId); - MediaType contentType = new MediaType("multipart", "mixed", parameters); - return contentType; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBlobContainerWriter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBlobContainerWriter.java deleted file mode 100644 index 7adaed6ad3ed..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBlobContainerWriter.java +++ /dev/null @@ -1,248 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.InputStream; - -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.blob.BlobContract; -import com.microsoft.windowsazure.services.blob.implementation.BlobExceptionProcessor; -import com.microsoft.windowsazure.services.blob.models.BlockList; -import com.microsoft.windowsazure.services.blob.models.CommitBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobBlockOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobResult; -import com.microsoft.windowsazure.services.media.WritableBlobContainerContract; -import com.sun.jersey.api.client.Client; - -/** - * Implementation of WritableBlobContainerContract, used to upload blobs to the - * Media Services storage. - * - */ -public class MediaBlobContainerWriter implements WritableBlobContainerContract { - - private final BlobContract blobService; - private BlobContract restProxy; - - public BlobContract getBlobContract() { - return this.restProxy; - } - - public void setBlobContract(BlobContract blobContract) { - this.restProxy = blobContract; - } - - private final String containerName; - - public MediaBlobContainerWriter(Client client, String accountName, - String blobServiceUri, String containerName, String sasToken) { - this.containerName = containerName; - this.restProxy = new MediaBlobRestProxy(client, accountName, - blobServiceUri, new SASTokenFilter(sasToken)); - this.blobService = new BlobExceptionProcessor(this.restProxy); - } - - private MediaBlobContainerWriter(MediaBlobContainerWriter baseWriter, - ServiceFilter filter) { - this.containerName = baseWriter.containerName; - this.restProxy = baseWriter.restProxy.withFilter(filter); - this.blobService = new BlobExceptionProcessor(this.restProxy); - } - - private MediaBlobContainerWriter(MediaBlobContainerWriter baseWriter) { - this.containerName = baseWriter.containerName; - this.restProxy = baseWriter.restProxy; - this.blobService = new BlobExceptionProcessor(this.restProxy); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.core.JerseyFilterableService#withFilter - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public WritableBlobContainerContract withFilter(ServiceFilter filter) { - MediaBlobContainerWriter mediaBlobContainerWriter = new MediaBlobContainerWriter( - this, filter); - return mediaBlobContainerWriter; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.core.FilterableService# - * withRequestFilterFirst - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public WritableBlobContainerContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter) { - MediaBlobContainerWriter mediaBlobContainerWriter = new MediaBlobContainerWriter( - this); - mediaBlobContainerWriter - .setBlobContract(mediaBlobContainerWriter.getBlobContract() - .withRequestFilterFirst(serviceRequestFilter)); - return mediaBlobContainerWriter; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.core.FilterableService# - * withRequestFilterLast - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public WritableBlobContainerContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter) { - MediaBlobContainerWriter mediaBlobContainerWriter = new MediaBlobContainerWriter( - this); - mediaBlobContainerWriter.setBlobContract(mediaBlobContainerWriter - .getBlobContract().withRequestFilterLast(serviceRequestFilter)); - return mediaBlobContainerWriter; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.core.FilterableService# - * withResponseFilterFirst - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public WritableBlobContainerContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter) { - MediaBlobContainerWriter mediaBlobContainerWriter = new MediaBlobContainerWriter( - this); - mediaBlobContainerWriter.setBlobContract(mediaBlobContainerWriter - .getBlobContract().withResponseFilterFirst( - serviceResponseFilter)); - return mediaBlobContainerWriter; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.core.FilterableService# - * withResponseFilterLast - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public WritableBlobContainerContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter) { - MediaBlobContainerWriter mediaBlobContainerWriter = new MediaBlobContainerWriter( - this); - mediaBlobContainerWriter.setBlobContract(mediaBlobContainerWriter - .getBlobContract() - .withResponseFilterLast(serviceResponseFilter)); - return mediaBlobContainerWriter; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.WritableBlobContainerContract - * #createBlockBlob(java.lang.String, java.io.InputStream) - */ - @Override - public CreateBlobResult createBlockBlob(String blob, - InputStream contentStream) throws ServiceException { - return blobService.createBlockBlob(containerName, blob, contentStream); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.WritableBlobContainerContract - * #createBlockBlob(java.lang.String, java.io.InputStream, - * com.microsoft.windowsazure.services.blob.models.CreateBlobOptions) - */ - @Override - public CreateBlobResult createBlockBlob(String blob, - InputStream contentStream, CreateBlobOptions options) - throws ServiceException { - return blobService.createBlockBlob(containerName, blob, contentStream, - options); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.WritableBlobContainerContract - * #createBlobBlock(java.lang.String, java.lang.String, java.io.InputStream) - */ - @Override - public void createBlobBlock(String blob, String blockId, - InputStream contentStream) throws ServiceException { - blobService - .createBlobBlock(containerName, blob, blockId, contentStream); - - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.WritableBlobContainerContract - * #createBlobBlock(java.lang.String, java.lang.String, java.io.InputStream, - * com.microsoft.windowsazure.services.blob.models.CreateBlobBlockOptions) - */ - @Override - public void createBlobBlock(String blob, String blockId, - InputStream contentStream, CreateBlobBlockOptions options) - throws ServiceException { - blobService.createBlobBlock(containerName, blob, blockId, - contentStream, options); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.WritableBlobContainerContract - * #commitBlobBlocks(java.lang.String, - * com.microsoft.windowsazure.services.blob.models.BlockList) - */ - @Override - public void commitBlobBlocks(String blob, BlockList blockList) - throws ServiceException { - blobService.commitBlobBlocks(containerName, blob, blockList); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.WritableBlobContainerContract - * #commitBlobBlocks(java.lang.String, - * com.microsoft.windowsazure.services.blob.models.BlockList, - * com.microsoft.windowsazure.services.blob.models.CommitBlobBlocksOptions) - */ - @Override - public void commitBlobBlocks(String blob, BlockList blockList, - CommitBlobBlocksOptions options) throws ServiceException { - blobService.commitBlobBlocks(containerName, blob, blockList, options); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBlobRestProxy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBlobRestProxy.java deleted file mode 100644 index d6ddadfae219..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBlobRestProxy.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.util.Arrays; - -import com.microsoft.windowsazure.core.RFC1123DateConverter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterRequestAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterResponseAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.services.blob.BlobContract; -import com.microsoft.windowsazure.services.blob.implementation.BlobOperationRestProxy; -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.filter.ClientFilter; - -/** - * Rest proxy for blob operations that's specialized for working with the blobs - * created by and for Media Services storage. - * - */ -class MediaBlobRestProxy extends BlobOperationRestProxy { - private final SASTokenFilter tokenFilter; - - /** - * Construct instance of MediaBlobRestProxy with given parameters. - * - * @param channel - * Jersey Client object used to communicate with blob service - * @param accountName - * Account name for blob storage - * @param url - * URL for blob storage - * @param tokenFilter - * filter used to add SAS tokens to requests. - */ - public MediaBlobRestProxy(Client channel, String accountName, String url, - SASTokenFilter tokenFilter) { - super(channel, accountName, url); - - this.tokenFilter = tokenFilter; - channel.addFilter(tokenFilter); - } - - /** - * Construct instance of MediaBlobRestProxy with given parameters. - * - * @param channel - * Jersey Client object used to communicate with blob service - * @param filters - * Additional ServiceFilters to manipulate requests and responses - * @param accountName - * Account name for blob storage - * @param url - * URL for blob storage - * @param dateMapper - * date conversion helper object - */ - public MediaBlobRestProxy(Client channel, ClientFilter[] filters, - String accountName, String url, SASTokenFilter tokenFilter, - RFC1123DateConverter dateMapper) { - super(channel, filters, accountName, url, dateMapper); - - this.tokenFilter = tokenFilter; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.blob.implementation. - * BlobOperationRestProxy - * #withFilter(com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public BlobContract withFilter(ServiceFilter filter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterAdapter(filter); - return new MediaBlobRestProxy(getChannel(), newFilters, - getAccountName(), getUrl(), this.tokenFilter, getDateMapper()); - } - - @Override - public BlobContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = new ClientFilter[currentFilters.length + 1]; - System.arraycopy(currentFilters, 0, newFilters, 1, - currentFilters.length); - newFilters[0] = new ClientFilterRequestAdapter(serviceRequestFilter); - return new MediaBlobRestProxy(getChannel(), newFilters, - getAccountName(), getUrl(), this.tokenFilter, getDateMapper()); - } - - @Override - public BlobContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterRequestAdapter( - serviceRequestFilter); - return new MediaBlobRestProxy(getChannel(), newFilters, - getAccountName(), getUrl(), this.tokenFilter, getDateMapper()); - } - - @Override - public BlobContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = new ClientFilter[currentFilters.length + 1]; - System.arraycopy(currentFilters, 0, newFilters, 1, - currentFilters.length); - newFilters[0] = new ClientFilterResponseAdapter(serviceResponseFilter); - return new MediaBlobRestProxy(getChannel(), newFilters, - getAccountName(), getUrl(), this.tokenFilter, getDateMapper()); - } - - @Override - public BlobContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterResponseAdapter( - serviceResponseFilter); - return new MediaBlobRestProxy(getChannel(), newFilters, - getAccountName(), getUrl(), this.tokenFilter, getDateMapper()); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaContentProvider.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaContentProvider.java deleted file mode 100644 index e9601e2efa90..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaContentProvider.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.lang.annotation.Annotation; -import java.lang.reflect.Type; - -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.ParserConfigurationException; - -import com.microsoft.windowsazure.services.media.implementation.content.MediaServiceDTO; -import com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider; - -/** - * Class to plug into Jersey to properly serialize raw Media Services DTO types. - * - */ -public class MediaContentProvider extends - AbstractMessageReaderWriterProvider { - private final ODataAtomMarshaller marshaller; - - /** - * Creates the instance - * - * @throws JAXBException - * @throws ParserConfigurationException - */ - public MediaContentProvider() throws JAXBException, - ParserConfigurationException { - marshaller = new ODataAtomMarshaller(); - } - - @Override - public boolean isReadable(Class type, Type genericType, - Annotation[] annotations, MediaType mediaType) { - // This class only does marshalling, not unmarshalling. - return false; - } - - @Override - public T readFrom(Class type, Type genericType, - Annotation[] annotations, MediaType mediaType, - MultivaluedMap httpHeaders, InputStream entityStream) - throws IOException { - throw new UnsupportedOperationException(); - } - - @Override - public boolean isWriteable(Class type, Type genericType, - Annotation[] annotations, MediaType mediaType) { - return MediaServiceDTO.class.isAssignableFrom(type); - } - - @Override - public void writeTo(T t, Class type, Type genericType, - Annotation[] annotations, MediaType mediaType, - MultivaluedMap httpHeaders, - OutputStream entityStream) throws IOException { - try { - marshaller.marshalEntry(t, entityStream); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaExceptionProcessor.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaExceptionProcessor.java deleted file mode 100644 index 9dec8145f62c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaExceptionProcessor.java +++ /dev/null @@ -1,280 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import javax.inject.Inject; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.exception.ServiceExceptionFactory; -import com.microsoft.windowsazure.services.media.MediaContract; -import com.microsoft.windowsazure.services.media.WritableBlobContainerContract; -import com.microsoft.windowsazure.services.media.entityoperations.EntityActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityTypeActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; -import com.sun.jersey.api.client.ClientHandlerException; -import com.sun.jersey.api.client.UniformInterfaceException; - -/** - * /** Wrapper implementation of MediaEntityContract that - * translates exceptions into ServiceExceptions. - * - */ -public class MediaExceptionProcessor implements MediaContract { - - /** The service. */ - private final MediaContract service; - - /** The log. */ - private static Log log = LogFactory.getLog(MediaContract.class); - - /** - * Instantiates a new media exception processor. - * - * @param service - * the service - */ - public MediaExceptionProcessor(MediaContract service) { - this.service = service; - } - - /** - * Instantiates a new media exception processor. - * - * @param service - * the service - */ - @Inject - public MediaExceptionProcessor(MediaRestProxy service) { - this.service = service; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.core.FilterableService#withFilter - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public MediaContract withFilter(ServiceFilter filter) { - return new MediaExceptionProcessor(service.withFilter(filter)); - } - - @Override - public MediaContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter) { - return new MediaExceptionProcessor( - service.withRequestFilterFirst(serviceRequestFilter)); - } - - @Override - public MediaContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter) { - return new MediaExceptionProcessor( - service.withRequestFilterLast(serviceRequestFilter)); - } - - @Override - public MediaContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter) { - return new MediaExceptionProcessor( - service.withResponseFilterFirst(serviceResponseFilter)); - } - - @Override - public MediaContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter) { - return new MediaExceptionProcessor( - service.withResponseFilterLast(serviceResponseFilter)); - } - - /** - * Process a catch. - * - * @param e - * the e - * @return the service exception - */ - private ServiceException processCatch(ServiceException e) { - log.warn(e.getMessage(), e.getCause()); - return ServiceExceptionFactory.process("MediaServices", e); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #create(com.microsoft.windowsazure.services.media.entityoperations. - * EntityCreateOperation) - */ - @Override - public T create(EntityCreateOperation creator) - throws ServiceException { - try { - return service.create(creator); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #get(com.microsoft.windowsazure.services.media.entityoperations. - * EntityGetOperation) - */ - @Override - public T get(EntityGetOperation getter) throws ServiceException { - try { - return service.get(getter); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #list(com.microsoft.windowsazure.services.media.entityoperations. - * EntityListOperation) - */ - @Override - public ListResult list(EntityListOperation lister) - throws ServiceException { - try { - return service.list(lister); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #update(com.microsoft.windowsazure.services.media.entityoperations. - * EntityUpdateOperation) - */ - @Override - public String update(EntityUpdateOperation updater) throws ServiceException { - try { - return service.update(updater); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #delete(com.microsoft.windowsazure.services.media.entityoperations. - * EntityDeleteOperation) - * - * @return operation-id if any otherwise null. - */ - @Override - public String delete(EntityDeleteOperation deleter) throws ServiceException { - try { - return service.delete(deleter); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #action(com.microsoft.windowsazure.services.media.entityoperations. - * EntityActionOperation) - */ - @Override - public String action(EntityActionOperation entityActionOperation) - throws ServiceException { - try { - return service.action(entityActionOperation); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityContract - * #action(com.microsoft.windowsazure.services.media.entityoperations. - * EntityTypeActionOperation) - */ - @Override - public T action(EntityTypeActionOperation entityTypeActionOperation) - throws ServiceException { - try { - return service.action(entityTypeActionOperation); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.MediaContract#createBlobWriter - * (com.microsoft.windowsazure.services.media.models.LocatorInfo) - */ - @Override - public WritableBlobContainerContract createBlobWriter(LocatorInfo locator) { - return service.createBlobWriter(locator); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaRestProxy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaRestProxy.java deleted file mode 100644 index ca6bce4fe599..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaRestProxy.java +++ /dev/null @@ -1,230 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.net.URI; -import java.util.Arrays; - -import javax.inject.Inject; - -import com.microsoft.windowsazure.core.UserAgentFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientConfigSettings; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterRequestAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterResponseAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.services.media.MediaContract; -import com.microsoft.windowsazure.services.media.WritableBlobContainerContract; -import com.microsoft.windowsazure.services.media.entityoperations.EntityProxyData; -import com.microsoft.windowsazure.services.media.entityoperations.EntityRestProxy; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; -import com.microsoft.windowsazure.services.media.models.LocatorType; -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.config.ClientConfig; -import com.sun.jersey.api.client.config.DefaultClientConfig; -import com.sun.jersey.api.client.filter.ClientFilter; - -/** - * The Class MediaRestProxy. - */ -public class MediaRestProxy extends EntityRestProxy implements MediaContract { - /** The redirect filter. */ - private RedirectFilter redirectFilter; - - private final ClientConfigSettings clientConfigSettings; - - /** - * Instantiates a new media rest proxy. - * - * @param channel - * the channel - * @param authFilter - * the auth filter - * @param redirectFilter - * the redirect filter - * @param versionHeadersFilter - * the version headers filter - * @param userAgentFilter - * the user agent filter - * @param clientConfigSettings - * Currently configured HTTP client settings - * - */ - @Inject - public MediaRestProxy(Client channel, OAuthFilter authFilter, - RedirectFilter redirectFilter, - VersionHeadersFilter versionHeadersFilter, - UserAgentFilter userAgentFilter, - ClientConfigSettings clientConfigSettings) { - super(channel, new ClientFilter[0]); - - this.clientConfigSettings = clientConfigSettings; - this.redirectFilter = redirectFilter; - channel.addFilter(redirectFilter); - channel.addFilter(authFilter); - channel.addFilter(versionHeadersFilter); - channel.addFilter(new ClientFilterRequestAdapter(userAgentFilter)); - } - - /** - * Instantiates a new media rest proxy. - * - * @param channel - * the channel - * @param filters - * the filters - * @param clientConfigSettings - * currently configured HTTP client settings - */ - private MediaRestProxy(Client channel, ClientFilter[] filters, - ClientConfigSettings clientConfigSettings) { - super(channel, filters); - this.clientConfigSettings = clientConfigSettings; - } - - @Override - public MediaContract withFilter(ServiceFilter filter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterAdapter(filter); - return new MediaRestProxy(getChannel(), newFilters, - clientConfigSettings); - } - - @Override - public MediaContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = new ClientFilter[currentFilters.length + 1]; - System.arraycopy(currentFilters, 0, newFilters, 1, - currentFilters.length); - newFilters[0] = new ClientFilterRequestAdapter(serviceRequestFilter); - return new MediaRestProxy(getChannel(), newFilters, - clientConfigSettings); - } - - @Override - public MediaContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterRequestAdapter( - serviceRequestFilter); - return new MediaRestProxy(getChannel(), newFilters, - clientConfigSettings); - } - - @Override - public MediaContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = new ClientFilter[currentFilters.length + 1]; - System.arraycopy(currentFilters, 0, newFilters, 1, - currentFilters.length); - newFilters[0] = new ClientFilterResponseAdapter(serviceResponseFilter); - return new MediaRestProxy(getChannel(), newFilters, - clientConfigSettings); - } - - @Override - public MediaContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter) { - ClientFilter[] currentFilters = getFilters(); - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterResponseAdapter( - serviceResponseFilter); - return new MediaRestProxy(getChannel(), newFilters, - clientConfigSettings); - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.entityoperations.EntityRestProxy - * #createProxyData() - */ - @Override - protected EntityProxyData createProxyData() { - return new EntityProxyData() { - @Override - public URI getServiceUri() { - return redirectFilter.getBaseURI(); - } - }; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.media.MediaContract#createBlobWriter - * (com.microsoft.windowsazure.services.media.models.LocatorInfo) - */ - @Override - public WritableBlobContainerContract createBlobWriter(LocatorInfo locator) { - if (locator.getLocatorType() != LocatorType.SAS) { - throw new IllegalArgumentException("Can only write to SAS locators"); - } - - LocatorParser p = new LocatorParser(locator); - - return new MediaBlobContainerWriter(createUploaderClient(), - p.getAccountName(), p.getStorageUri(), p.getContainer(), - p.getSASToken()); - } - - /** - * Helper class to encapsulate pulling information out of the locator. - */ - private static class LocatorParser { - private URI locatorPath; - - public LocatorParser(LocatorInfo locator) { - locatorPath = URI.create(locator.getPath()); - } - - public String getAccountName() { - return locatorPath.getHost().split("\\.")[0]; - } - - public String getStorageUri() { - return locatorPath.getScheme() + "://" + locatorPath.getAuthority(); - } - - public String getContainer() { - return locatorPath.getPath().substring(1); - } - - public String getSASToken() { - return locatorPath.getRawQuery(); - } - } - - private Client createUploaderClient() { - ClientConfig clientConfig = new DefaultClientConfig(); - clientConfigSettings.applyConfig(clientConfig); - Client client = Client.create(clientConfig); - clientConfigSettings.applyConfig(client); - return client; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/OAuthFilter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/OAuthFilter.java deleted file mode 100644 index 23f1122ed770..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/OAuthFilter.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.implementation; - -import javax.inject.Named; - -import com.microsoft.windowsazure.core.pipeline.jersey.IdempotentClientFilter; -import com.microsoft.windowsazure.services.media.MediaConfiguration; -import com.microsoft.windowsazure.services.media.authentication.AzureAdAccessToken; -import com.microsoft.windowsazure.services.media.authentication.TokenProvider; -import com.sun.jersey.api.client.ClientHandlerException; -import com.sun.jersey.api.client.ClientRequest; -import com.sun.jersey.api.client.ClientResponse; - -/** - * The Jersey filter for OAuth. - * - */ -public class OAuthFilter extends IdempotentClientFilter { - private final TokenProvider azureAdTokenProvider; - - /** - * Creates an OAuthFilter object with specified - * TokenProvider instance. - * - * @param azureAdTokenProvider - */ - public OAuthFilter(@Named(MediaConfiguration.AZURE_AD_TOKEN_PROVIDER) TokenProvider azureAdTokenProvider) { - this.azureAdTokenProvider = azureAdTokenProvider; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.core.IdempotentClientFilter#doHandle - * (com.sun.jersey.api.client.ClientRequest) - */ - @Override - public ClientResponse doHandle(ClientRequest clientRequest) { - AzureAdAccessToken accessToken; - - try { - accessToken = azureAdTokenProvider.acquireAccessToken(); - } catch (Exception e) { - throw new ClientHandlerException("Failed to acquire access token", e); - } - - clientRequest.getHeaders().add("Authorization", "Bearer " + accessToken.getAccessToken()); - - return this.getNext().handle(clientRequest); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomMarshaller.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomMarshaller.java deleted file mode 100644 index 11d6c8a81afe..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomMarshaller.java +++ /dev/null @@ -1,166 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.OutputStream; -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.namespace.QName; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; - -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.atom.FeedType; -import com.microsoft.windowsazure.services.media.implementation.content.AccessPolicyType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetDeliveryPolicyRestType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetFileType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; -import com.microsoft.windowsazure.services.media.implementation.content.ChannelType; -import com.microsoft.windowsazure.services.media.implementation.content.Constants; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyOptionType; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyType; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyRestType; -import com.microsoft.windowsazure.services.media.implementation.content.EncodingReservedUnitRestType; -import com.microsoft.windowsazure.services.media.implementation.content.JobNotificationSubscriptionType; -import com.microsoft.windowsazure.services.media.implementation.content.JobType; -import com.microsoft.windowsazure.services.media.implementation.content.LocatorRestType; -import com.microsoft.windowsazure.services.media.implementation.content.NotificationEndPointType; -import com.microsoft.windowsazure.services.media.implementation.content.OperationType; -import com.microsoft.windowsazure.services.media.implementation.content.ProgramType; -import com.microsoft.windowsazure.services.media.implementation.content.StorageAccountType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointType; -import com.microsoft.windowsazure.services.media.implementation.content.TaskType; - -/** - * A class to manage marshalling of request parameters into ATOM entry elements - * for sending to the Media Services REST endpoints. - * - */ -public class ODataAtomMarshaller { - private final Marshaller marshaller; - private final DocumentBuilder documentBuilder; - - public ODataAtomMarshaller() throws JAXBException, - ParserConfigurationException { - JAXBContext context = JAXBContext.newInstance(getMarshalledClasses(), - null); - marshaller = context.createMarshaller(); - - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - dbf.setNamespaceAware(true); - documentBuilder = dbf.newDocumentBuilder(); - } - - /** - * Convert the given content object into an ATOM entry (represented as a DOM - * document) suitable for sending up to the Media Services service. - * - * @param content - * The content object to send - * @return The generated DOM - * @throws JAXBException - * if content is malformed/not marshallable - */ - public Document marshalEntry(Object content) throws JAXBException { - JAXBElement entryElement = createEntry(content); - - Document doc = documentBuilder.newDocument(); - doc.setXmlStandalone(true); - - marshaller.marshal(entryElement, doc); - - return doc; - - } - - /** - * Convert the given content into an ATOM entry and write it to the given - * stream. - * - * @param content - * Content object to send - * @param stream - * Stream to write to - * @throws JAXBException - * if content is malformed/not marshallable - */ - public void marshalEntry(Object content, OutputStream stream) - throws JAXBException { - marshaller.marshal(createEntry(content), stream); - } - - public void marshalEntryType(EntryType entryType, OutputStream stream) - throws JAXBException { - marshaller.marshal(new JAXBElement(new QName( - Constants.ATOM_NS, "entry"), EntryType.class, entryType), - stream); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - private JAXBElement createEntry(Object content) { - ContentType atomContent = new ContentType(); - EntryType atomEntry = new EntryType(); - - atomContent.setType("application/xml"); - atomContent.getContent().add( - new JAXBElement(new QName(Constants.ODATA_METADATA_NS, - "properties"), content.getClass(), content)); - - atomEntry.getEntryChildren().add( - new JAXBElement(new QName(Constants.ATOM_NS, "content"), - ContentType.class, atomContent)); - - JAXBElement entryElement = new JAXBElement( - new QName(Constants.ATOM_NS, "entry"), EntryType.class, - atomEntry); - - return entryElement; - } - - private static Class[] getMarshalledClasses() { - List> classes = new ArrayList>(); - classes.add(AccessPolicyType.class); - classes.add(AssetDeliveryPolicyRestType.class); - classes.add(AssetType.class); - classes.add(AssetFileType.class); - classes.add(ChannelType.class); - classes.add(ContentKeyAuthorizationPolicyType.class); - classes.add(ContentKeyAuthorizationPolicyOptionType.class); - classes.add(ContentKeyRestType.class); - classes.add(EncodingReservedUnitRestType.class); - classes.add(EntryType.class); - classes.add(FeedType.class); - classes.add(JobNotificationSubscriptionType.class); - classes.add(JobType.class); - classes.add(LocatorRestType.class); - classes.add(NotificationEndPointType.class); - classes.add(OperationType.class); - classes.add(ProgramType.class); - classes.add(StorageAccountType.class); - classes.add(StreamingEndpointType.class); - classes.add(TaskType.class); - return classes.toArray(new Class[0]); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomUnmarshaller.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomUnmarshaller.java deleted file mode 100644 index 7d223b465104..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomUnmarshaller.java +++ /dev/null @@ -1,256 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.InputStream; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.ParameterizedType; -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import javax.xml.namespace.QName; -import javax.xml.transform.stream.StreamSource; - -import org.w3c.dom.Element; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.atom.FeedType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; -import com.microsoft.windowsazure.services.media.implementation.content.Constants; -import com.microsoft.windowsazure.services.media.implementation.content.ODataActionType; -import com.microsoft.windowsazure.services.media.models.ListResult; - -/** - * This class implements unmarshalling from OData over Atom into Java classes. - * - */ -public class ODataAtomUnmarshaller { - private final JAXBContext atomContext; - private final JAXBContext mediaContentContext; - private final Unmarshaller atomUnmarshaller; - private final Unmarshaller mediaContentUnmarshaller; - - /** - * @throws JAXBException - */ - public ODataAtomUnmarshaller() throws JAXBException { - atomContext = JAXBContext.newInstance(FeedType.class.getPackage() - .getName()); - atomUnmarshaller = atomContext.createUnmarshaller(); - mediaContentContext = JAXBContext.newInstance(AssetType.class - .getPackage().getName()); - mediaContentUnmarshaller = mediaContentContext.createUnmarshaller(); - } - - /** - * Given a stream that contains XML with an atom Feed element at the root, - * unmarshal it into Java objects with the given content type in the - * entries. - * - * @param - * - * @param stream - * - stream containing the XML data - * @param contentType - * - Java type to unmarshal the entry contents into - * @return an instance of contentType that contains the unmarshalled data. - * @throws JAXBException - * @throws ServiceException - */ - @SuppressWarnings("rawtypes") - public ListResult unmarshalFeed( - InputStream stream, Class contentType) throws JAXBException, - ServiceException { - validateNotNull(stream, "stream"); - validateNotNull(contentType, "contentType"); - - List entries = new ArrayList(); - FeedType feed = unmarshalFeed(stream); - Class marshallingContentType = getMarshallingContentType(contentType); - - for (Object feedChild : feed.getFeedChildren()) { - EntryType entry = asEntry(feedChild); - if (entry != null) { - entries.add(contentFromEntry(contentType, - marshallingContentType, entry)); - } - } - return new ListResult(entries); - } - - /** - * Given a stream containing XML with an Atom entry element at the root, - * unmarshal it into an instance of contentType - * - * @param stream - * - stream containing XML data - * @param contentType - * - type of object to return - * @return An instance of contentType - * @throws JAXBException - * @throws ServiceException - */ - @SuppressWarnings("rawtypes") - public T unmarshalEntry(InputStream stream, - Class contentType) throws JAXBException, ServiceException { - validateNotNull(stream, "stream"); - validateNotNull(contentType, "contentType"); - - Class marshallingContentType = getMarshallingContentType(contentType); - - EntryType entry = unmarshalEntry(stream); - return contentFromEntry(contentType, marshallingContentType, entry); - } - - @SuppressWarnings("rawtypes") - private T contentFromEntry(Class contentType, - Class marshallingContentType, EntryType entry) - throws JAXBException, ServiceException { - unmarshalODataContent(entry, contentType); - ContentType contentElement = getFirstOfType(ContentType.class, - entry.getEntryChildren()); - Object contentObject = getFirstOfType(marshallingContentType, - contentElement.getContent()); - return constructResultObject(contentType, entry, contentObject); - } - - private EntryType asEntry(Object o) { - if (o instanceof JAXBElement) { - @SuppressWarnings("rawtypes") - JAXBElement e = (JAXBElement) o; - if (e.getDeclaredType() == EntryType.class) { - return (EntryType) e.getValue(); - } - } - return null; - } - - private void unmarshalODataContent(EntryType entry, Class contentType) - throws JAXBException { - unmarshalEntryActions(entry); - unmarshalEntryContent(entry, contentType); - } - - private void unmarshalEntryActions(EntryType entry) throws JAXBException { - List children = entry.getEntryChildren(); - for (int i = 0; i < children.size(); ++i) { - Object child = children.get(i); - if (child instanceof Element) { - Element e = (Element) child; - if (qnameFromElement(e).equals( - Constants.ODATA_ACTION_ELEMENT_NAME)) { - JAXBElement actionElement = mediaContentUnmarshaller - .unmarshal(e, ODataActionType.class); - children.set(i, actionElement); - } - } - } - } - - @SuppressWarnings("rawtypes") - private void unmarshalEntryContent(EntryType entry, Class contentType) - throws JAXBException { - Class marshallingContentType = getMarshallingContentType(contentType); - ContentType contentElement = getFirstOfType(ContentType.class, - entry.getEntryChildren()); - List contentChildren = contentElement.getContent(); - for (int i = 0; i < contentChildren.size(); ++i) { - Object child = contentChildren.get(i); - if (child instanceof Element) { - Element e = (Element) child; - if (qnameFromElement(e).equals( - Constants.ODATA_PROPERTIES_ELEMENT_NAME)) { - JAXBElement actualContentElement = mediaContentUnmarshaller - .unmarshal(e, marshallingContentType); - contentChildren.set(i, actualContentElement); - } - } - } - } - - @SuppressWarnings("unchecked") - private T getFirstOfType(Class targetType, List collection) { - for (Object c : collection) { - if (c instanceof JAXBElement) { - @SuppressWarnings("rawtypes") - JAXBElement e = (JAXBElement) c; - if (e.getDeclaredType() == targetType) { - return (T) e.getValue(); - } - } - } - return null; - } - - @SuppressWarnings("rawtypes") - private T constructResultObject( - Class contentType, EntryType entry, Object contentObject) - throws ServiceException { - Class marshallingType = getMarshallingContentType(contentType); - try { - Constructor resultCtor = contentType.getConstructor( - EntryType.class, marshallingType); - return resultCtor.newInstance(entry, contentObject); - } catch (IllegalArgumentException e) { - throw new ServiceException(e); - } catch (SecurityException e) { - throw new ServiceException(e); - } catch (InstantiationException e) { - throw new ServiceException(e); - } catch (IllegalAccessException e) { - throw new ServiceException(e); - } catch (InvocationTargetException e) { - throw new ServiceException(e); - } catch (NoSuchMethodException e) { - throw new ServiceException(e); - } - } - - public EntryType unmarshalEntry(InputStream stream) throws JAXBException { - JAXBElement entryElement = atomUnmarshaller.unmarshal( - new StreamSource(stream), EntryType.class); - return entryElement.getValue(); - } - - private FeedType unmarshalFeed(InputStream stream) throws JAXBException { - JAXBElement feedElement = atomUnmarshaller.unmarshal( - new StreamSource(stream), FeedType.class); - return feedElement.getValue(); - } - - private static QName qnameFromElement(Element e) { - return new QName(e.getLocalName(), e.getNamespaceURI()); - } - - private static Class getMarshallingContentType(Class contentType) { - ParameterizedType pt = (ParameterizedType) contentType - .getGenericSuperclass(); - return (Class) pt.getActualTypeArguments()[0]; - } - - private static void validateNotNull(Object param, String paramName) { - if (param == null) { - throw new IllegalArgumentException(paramName); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataDateAdapter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataDateAdapter.java deleted file mode 100644 index 1ed0518fc596..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataDateAdapter.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.util.Calendar; -import java.util.Date; -import java.util.TimeZone; -import java.util.regex.Pattern; - -import javax.xml.bind.DatatypeConverter; -import javax.xml.bind.annotation.adapters.XmlAdapter; - -/** - * Adapter to convert OData time zone conventions into Java Dates and back. - * - */ -public class ODataDateAdapter extends XmlAdapter { - - private static final Pattern HAS_TIMEZONE_REGEX; - private static final TimeZone UTC; - - static { - HAS_TIMEZONE_REGEX = Pattern.compile("^.*(\\+|-)\\d\\d:\\d\\d$"); - - UTC = TimeZone.getDefault(); - UTC.setRawOffset(0); - } - - @Override - public Date unmarshal(String dateString) throws Exception { - if (!hasTimezone(dateString)) { - dateString += "Z"; - } - Calendar parsedDate = DatatypeConverter.parseDateTime(dateString); - return parsedDate.getTime(); - } - - @Override - public String marshal(Date date) throws Exception { - Calendar dateToMarshal = Calendar.getInstance(); - dateToMarshal.setTime(date); - dateToMarshal.setTimeZone(UTC); - return DatatypeConverter.printDateTime(dateToMarshal); - } - - private boolean hasTimezone(String dateString) { - return dateString.endsWith("Z") - || HAS_TIMEZONE_REGEX.matcher(dateString).matches(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntity.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntity.java deleted file mode 100644 index 883282a5359e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntity.java +++ /dev/null @@ -1,183 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.lang.reflect.ParameterizedType; -import java.lang.reflect.Type; - -import javax.xml.bind.JAXBElement; - -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.atom.LinkType; -import com.microsoft.windowsazure.services.media.implementation.content.Constants; -import com.microsoft.windowsazure.services.media.models.LinkInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; - -/** - * Class wrapping deserialized OData entities. Allows easy access to entry and - * content types. - * - */ -public abstract class ODataEntity { - - private final EntryType entry; - private final T content; - - protected ODataEntity(EntryType entry, T content) { - this.entry = entry; - this.content = content; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - protected ODataEntity(T content) { - this.content = content; - - ContentType contentElement = new ContentType(); - contentElement.getContent().add( - new JAXBElement(Constants.ODATA_PROPERTIES_ELEMENT_NAME, - content.getClass(), content)); - entry = new EntryType(); - entry.getEntryChildren().add( - new JAXBElement(Constants.ATOM_CONTENT_ELEMENT_NAME, - ContentType.class, contentElement)); - } - - /** - * @return the entry - */ - protected EntryType getEntry() { - return entry; - } - - /** - * @return the content - */ - protected T getContent() { - return content; - } - - /** - * Test if the entity contains a link with the given rel attribute. - * - * @param rel - * Rel of link to check for - * @return True if link is found, false if not. - */ - public boolean hasLink(String rel) { - return getLink(rel) != null; - } - - /** - * Get the link with the given rel attribute - * - * @param rel - * rel of link to retrieve - * @return The link if found, null if not. - */ - public > LinkInfo getLink(String rel) { - for (Object child : entry.getEntryChildren()) { - - LinkType link = linkFromChild(child); - if (link != null && link.getRel().equals(rel)) { - return new LinkInfo(link); - } - } - return null; - } - - /** - * Get the link to navigate an OData relationship - * - * @param relationName - * name of the OData relationship - * @return the link if found, null if not. - */ - public > LinkInfo getRelationLink( - String relationName) { - return this. getLink(Constants.ODATA_DATA_NS + "/related/" - + relationName); - } - - @SuppressWarnings("rawtypes") - private static LinkType linkFromChild(Object child) { - if (child instanceof JAXBElement) { - return linkFromElement((JAXBElement) child); - } - return null; - } - - private static LinkType linkFromElement( - @SuppressWarnings("rawtypes") JAXBElement element) { - if (element.getDeclaredType() == LinkType.class) { - return (LinkType) element.getValue(); - } - return null; - } - - /** - * Is the given type inherited from ODataEntity - * - * @param type - * Type to check - * @return true if derived from ODataEntity - */ - public static boolean isODataEntityType(Class type) { - return ODataEntity.class.isAssignableFrom(type); - } - - /** - * Is the given type a collection of ODataEntity - * - * @param type - * Base type - * @param genericType - * Generic type - * @return true if it's List<OEntity> or derive from. - */ - public static boolean isODataEntityCollectionType(Class type, - Type genericType) { - if (ListResult.class != type) { - return false; - } - - ParameterizedType pt = (ParameterizedType) genericType; - - if (pt.getActualTypeArguments().length != 1) { - return false; - } - - Class typeClass = getCollectedType(genericType); - - return isODataEntityType(typeClass); - } - - /** - * Reflection helper to pull out the type parameter for a List, where T - * is a ODataEntity derived type. - * - * @param genericType - * type object for collection - * @return The class object for the type parameter. - */ - public static Class getCollectedType(Type genericType) { - ParameterizedType pt = (ParameterizedType) genericType; - if (pt.getActualTypeArguments().length != 1) { - throw new IllegalArgumentException("genericType"); - } - return (Class) pt.getActualTypeArguments()[0]; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntityCollectionProvider.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntityCollectionProvider.java deleted file mode 100644 index 1c4e36f509be..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntityCollectionProvider.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.lang.annotation.Annotation; -import java.lang.reflect.Type; - -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.xml.bind.JAXBException; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider; - -/** - * Jersey provider to unmarshal lists of entities from Media Services. - * - */ -public class ODataEntityCollectionProvider extends - AbstractMessageReaderWriterProvider>> { - private final ODataAtomUnmarshaller unmarshaller; - - public ODataEntityCollectionProvider() throws JAXBException { - unmarshaller = new ODataAtomUnmarshaller(); - } - - @Override - public boolean isReadable(Class type, Type genericType, - Annotation[] annotations, MediaType mediaType) { - return ODataEntity.isODataEntityCollectionType(type, genericType); - } - - @SuppressWarnings("unchecked") - @Override - public ListResult> readFrom( - Class>> type, Type genericType, - Annotation[] annotations, MediaType mediaType, - MultivaluedMap httpHeaders, InputStream entityStream) - throws IOException { - - String responseType = mediaType.getParameters().get("type"); - try { - if (responseType == null || responseType.equals("feed")) { - return unmarshaller.unmarshalFeed(entityStream, - (Class>) ODataEntity - .getCollectedType(genericType)); - } else { - throw new RuntimeException(); - } - } catch (JAXBException e) { - throw new RuntimeException(e); - } catch (ServiceException e) { - throw new RuntimeException(e); - } - } - - /** - * Can this type be written by this provider? - * - * @return false - we don't support writing - */ - @Override - public boolean isWriteable(Class type, Type genericType, - Annotation[] annotations, MediaType mediaType) { - return false; - } - - /** - * Write the given object to the stream. This method implementation throws, - * we don't support writing. - * - * @throws UnsupportedOperationException - */ - @Override - public void writeTo(ListResult> t, Class type, - Type genericType, Annotation[] annotations, MediaType mediaType, - MultivaluedMap httpHeaders, - OutputStream entityStream) throws IOException { - - throw new UnsupportedOperationException(); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntityProvider.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntityProvider.java deleted file mode 100644 index 574e192ee312..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntityProvider.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.lang.annotation.Annotation; -import java.lang.reflect.Type; -import java.util.List; - -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.ParserConfigurationException; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider; - -/** - * An implementation of {@link AbstractMessageReaderWriterProvider } that is used - * to marshal and unmarshal instances of the ODataEntity type. - * - */ -public class ODataEntityProvider extends - AbstractMessageReaderWriterProvider> { - private final ODataAtomUnmarshaller unmarshaller; - - public ODataEntityProvider() throws JAXBException, - ParserConfigurationException { - unmarshaller = new ODataAtomUnmarshaller(); - } - - /* - * (non-Javadoc) - * - * @see javax.ws.rs.ext.MessageBodyReader#isReadable(java.lang.Class, - * java.lang.reflect.Type, java.lang.annotation.Annotation[], - * javax.ws.rs.core.MediaType) - */ - @Override - public boolean isReadable(Class type, Type genericType, - Annotation[] annotations, MediaType mediaType) { - return ODataEntity.isODataEntityType(type); - } - - /* - * (non-Javadoc) - * - * @see javax.ws.rs.ext.MessageBodyReader#readFrom(java.lang.Class, - * java.lang.reflect.Type, java.lang.annotation.Annotation[], - * javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap, - * java.io.InputStream) - */ - @Override - public ODataEntity readFrom(Class> type, - Type genericType, Annotation[] annotations, MediaType mediaType, - MultivaluedMap httpHeaders, InputStream entityStream) - throws IOException { - - ODataEntity result = null; - String responseType = mediaType.getParameters().get("type"); - try { - if (responseType == null || responseType.equals("feed")) { - List> feedContents = null; - synchronized (unmarshaller) { - feedContents = unmarshaller.unmarshalFeed(entityStream, - type); - } - return feedContents.get(0); - } else if (responseType.equals("entry")) { - synchronized (unmarshaller) { - result = unmarshaller.unmarshalEntry(entityStream, type); - } - } else { - throw new RuntimeException(); - } - } catch (JAXBException e) { - throw new RuntimeException(e); - } catch (ServiceException e) { - throw new RuntimeException(e); - } - - return result; - } - - /* - * (non-Javadoc) - * - * @see javax.ws.rs.ext.MessageBodyWriter#isWriteable(java.lang.Class, - * java.lang.reflect.Type, java.lang.annotation.Annotation[], - * javax.ws.rs.core.MediaType) - */ - @Override - public boolean isWriteable(Class type, Type genericType, - Annotation[] annotations, MediaType mediaType) { - return false; - } - - /* - * (non-Javadoc) - * - * @see javax.ws.rs.ext.MessageBodyWriter#writeTo(java.lang.Object, - * java.lang.Class, java.lang.reflect.Type, - * java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, - * javax.ws.rs.core.MultivaluedMap, java.io.OutputStream) - */ - @Override - public void writeTo(ODataEntity t, Class type, Type genericType, - Annotation[] annotations, MediaType mediaType, - MultivaluedMap httpHeaders, - OutputStream entityStream) throws IOException { - throw new UnsupportedOperationException(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/RedirectFilter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/RedirectFilter.java deleted file mode 100644 index 76ef360a0b91..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/RedirectFilter.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.net.URI; -import java.net.URISyntaxException; - -import com.microsoft.windowsazure.core.pipeline.jersey.IdempotentClientFilter; -import com.sun.jersey.api.client.ClientHandlerException; -import com.sun.jersey.api.client.ClientRequest; -import com.sun.jersey.api.client.ClientResponse; - -public class RedirectFilter extends IdempotentClientFilter { - private final ResourceLocationManager locationManager; - - public RedirectFilter(ResourceLocationManager locationManager) { - this.locationManager = locationManager; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.core.IdempotentClientFilter#doHandle - * (com.sun.jersey.api.client.ClientRequest) - */ - @Override - public ClientResponse doHandle(ClientRequest request) { - if (request == null) { - throw new IllegalArgumentException("Request should not be null"); - } - - URI originalURI = request.getURI(); - request.setURI(locationManager.getRedirectedURI(originalURI)); - - ClientResponse response = getNext().handle(request); - while (response.getClientResponseStatus() == ClientResponse.Status.MOVED_PERMANENTLY) { - try { - locationManager.setRedirectedURI(response.getHeaders() - .getFirst("Location")); - } catch (NullPointerException e) { - throw new ClientHandlerException( - "HTTP Redirect did not include Location header"); - } catch (URISyntaxException e) { - throw new ClientHandlerException( - "HTTP Redirect location is not a valid URI"); - } - - request.setURI(locationManager.getRedirectedURI(originalURI)); - response = getNext().handle(request); - } - return response; - } - - public URI getBaseURI() { - return this.locationManager.getBaseURI(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ResourceLocationManager.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ResourceLocationManager.java deleted file mode 100644 index 19300b5ba264..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/ResourceLocationManager.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.net.URI; -import java.net.URISyntaxException; - -import javax.inject.Named; -import javax.ws.rs.core.UriBuilder; - -import com.microsoft.windowsazure.services.media.MediaConfiguration; - -public class ResourceLocationManager { - private URI baseURI; - - public ResourceLocationManager(@Named(MediaConfiguration.AZURE_AD_API_SERVER) String baseUri) - throws URISyntaxException { - this.baseURI = new URI(baseUri); - } - - public URI getBaseURI() { - return baseURI; - } - - public URI getRedirectedURI(URI originalURI) { - UriBuilder uriBuilder = UriBuilder.fromUri(baseURI).path( - originalURI.getPath()); - String queryString = originalURI.getRawQuery(); - - if (queryString != null && !queryString.isEmpty()) { - uriBuilder.replaceQuery(queryString); - } - return uriBuilder.build(); - } - - public void setRedirectedURI(String newURI) throws URISyntaxException { - baseURI = new URI(newURI); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/SASTokenFilter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/SASTokenFilter.java deleted file mode 100644 index 7f631b8ff4b0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/SASTokenFilter.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import javax.ws.rs.core.UriBuilder; - -import com.microsoft.windowsazure.core.pipeline.jersey.IdempotentClientFilter; -import com.sun.jersey.api.client.ClientRequest; -import com.sun.jersey.api.client.ClientResponse; - -/** - * Filter responsible for adding SAS tokens to outgoing requests. - * - */ -public class SASTokenFilter extends IdempotentClientFilter { - private final String sasToken; - - /** - * Construct a SASTokenFilter that will insert the tokens given in the - * provided sasUrl. - * - * @param sasUrl - * URL containing authentication information - */ - public SASTokenFilter(String sasToken) { - this.sasToken = sasToken; - } - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.core.IdempotentClientFilter#doHandle - * (com.sun.jersey.api.client.ClientRequest) - */ - @Override - public ClientResponse doHandle(ClientRequest cr) { - UriBuilder newUri = UriBuilder.fromUri(cr.getURI()); - String currentQuery = cr.getURI().getRawQuery(); - if (currentQuery == null) { - currentQuery = ""; - } else if (currentQuery.length() > 0) { - currentQuery += "&"; - } - currentQuery += "api-version=2016-05-31&" + sasToken; - - newUri.replaceQuery(currentQuery); - cr.setURI(newUri.build()); - - return getNext().handle(cr); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/SetBoundaryMultipartDataSource.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/SetBoundaryMultipartDataSource.java deleted file mode 100644 index 98af8d57b125..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/SetBoundaryMultipartDataSource.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - -import javax.mail.BodyPart; -import javax.mail.MessagingException; -import javax.mail.MultipartDataSource; - -public class SetBoundaryMultipartDataSource implements MultipartDataSource { - - private final String boundary; - - public SetBoundaryMultipartDataSource(String boundary) { - this.boundary = boundary; - } - - @Override - public String getContentType() { - return "multipart/mixed; boundary=" + boundary; - } - - @Override - public InputStream getInputStream() throws IOException { - return null; - } - - @Override - public String getName() { - return null; - } - - @Override - public OutputStream getOutputStream() throws IOException { - return null; - } - - @Override - public int getCount() { - return 0; - } - - @Override - public BodyPart getBodyPart(int index) throws MessagingException { - return null; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/StatusLine.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/StatusLine.java deleted file mode 100644 index f4a889706b50..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/StatusLine.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.IOException; -import java.io.Reader; -import java.io.StringReader; - -import javax.activation.DataSource; - -import com.sun.mail.util.LineInputStream; - -public class StatusLine { - private static final int DELIMITER = -1; - private int status; - private String reason; - - public static StatusLine create(DataSource dataSource) { - try { - LineInputStream stream = new LineInputStream( - dataSource.getInputStream()); - try { - String line = stream.readLine(); - StringReader lineReader = new StringReader(line); - - expect(lineReader, "HTTP/1.1"); - expect(lineReader, " "); - String statusString = extractInput(lineReader, ' '); - String reason = extractInput(lineReader, DELIMITER); - - return new StatusLine().setStatus( - Integer.parseInt(statusString)).setReason(reason); - } finally { - stream.close(); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - private static void expect(Reader reader, String string) { - try { - byte[] byteArray = string.getBytes("UTF-8"); - int ch; - for (int i = 0; i < string.length(); i++) { - ch = reader.read(); - if (ch != byteArray[i]) { - throw new RuntimeException(String.format( - "Expected '%s', found '%s' instead", string, - string.substring(0, i) + (char) ch)); - } - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - private static String extractInput(Reader reader, int delimiter) { - try { - StringBuilder sb = new StringBuilder(); - while (true) { - int ch = reader.read(); - if (ch == DELIMITER || ch == delimiter) { - break; - } - - sb.append((char) ch); - } - return sb.toString(); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - public int getStatus() { - return status; - } - - public StatusLine setStatus(int status) { - this.status = status; - return this; - } - - public String getReason() { - return reason; - } - - public StatusLine setReason(String reason) { - this.reason = reason; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/VersionHeadersFilter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/VersionHeadersFilter.java deleted file mode 100644 index bba0269d4752..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/VersionHeadersFilter.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import javax.ws.rs.core.MultivaluedMap; - -import com.microsoft.windowsazure.core.pipeline.jersey.IdempotentClientFilter; -import com.sun.jersey.api.client.ClientRequest; -import com.sun.jersey.api.client.ClientResponse; - -/** - * A small filter that adds the required Media services/OData 3 version headers - * to the request as it goes through. - * - */ -public class VersionHeadersFilter extends IdempotentClientFilter { - - /* - * (non-Javadoc) - * - * @see - * com.microsoft.windowsazure.services.core.IdempotentClientFilter#doHandle - * (com.sun.jersey.api.client.ClientRequest) - */ - @Override - public ClientResponse doHandle(ClientRequest cr) { - MultivaluedMap headers = cr.getHeaders(); - headers.add("DataServiceVersion", "3.0"); - headers.add("MaxDataServiceVersion", "3.0"); - headers.add("x-ms-version", "2.17"); - return getNext().handle(cr); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/CategoryType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/CategoryType.java deleted file mode 100644 index 064df1b35ddd..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/CategoryType.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom cagegory construct is defined in section 4.2.2 of the format spec. - * - * - *

- * Java class for categoryType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="categoryType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <attribute name="term" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <attribute name="scheme" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *       <attribute name="label" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <anyAttribute namespace='##other'/>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "categoryType") -public class CategoryType { - - @XmlAttribute(required = true) - private String term; - @XmlAttribute - @XmlSchemaType(name = "anyURI") - private String scheme; - @XmlAttribute - private String label; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the term property. - * - * @return possible object is {@link String } - * - */ - public String getTerm() { - return term; - } - - /** - * Sets the value of the term property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setTerm(String value) { - this.term = value; - } - - /** - * Gets the value of the scheme property. - * - * @return possible object is {@link String } - * - */ - public String getScheme() { - return scheme; - } - - /** - * Sets the value of the scheme property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setScheme(String value) { - this.scheme = value; - } - - /** - * Gets the value of the label property. - * - * @return possible object is {@link String } - * - */ - public String getLabel() { - return label; - } - - /** - * Sets the value of the label property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLabel(String value) { - this.label = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ContentType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ContentType.java deleted file mode 100644 index 3d57ebeaaee5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ContentType.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom content construct is defined in section 4.1.3 of the format spec. - * - * - *

- * Java class for contentType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="contentType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <any namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
- *       </sequence>
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <attribute name="src" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *       <anyAttribute namespace='##other'/>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "contentType", propOrder = { "content" }) -public class ContentType { - - @XmlMixed - @XmlAnyElement(lax = true) - private List content; - @XmlAttribute - private String type; - @XmlAttribute - @XmlSchemaType(name = "anyURI") - private String src; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * - * The Atom content construct is defined in section 4.1.3 of the format - * spec. Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, not a - * snapshot. Therefore any modification you make to the returned list will - * be present inside the JAXB object. This is why there is not a - * set method for the content property. - * - *

- * For example, to add a new item, do as follows: - * - *

-     * getContent().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link Object } - * {@link String } - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - /** - * Gets the value of the type property. - * - * @return possible object is {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - - /** - * Gets the value of the src property. - * - * @return possible object is {@link String } - * - */ - public String getSrc() { - return src; - } - - /** - * Sets the value of the src property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setSrc(String value) { - this.src = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/DateTimeType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/DateTimeType.java deleted file mode 100644 index 9825fc58b66c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/DateTimeType.java +++ /dev/null @@ -1,159 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.datatype.XMLGregorianCalendar; -import javax.xml.namespace.QName; - -/** - *

- * Java class for dateTimeType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="dateTimeType">
- *   <simpleContent>
- *     <extension base="<http://www.w3.org/2001/XMLSchema>dateTime">
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </extension>
- *   </simpleContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "dateTimeType", propOrder = { "value" }) -public class DateTimeType { - - @XmlValue - @XmlSchemaType(name = "dateTime") - private XMLGregorianCalendar value; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the value property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setValue(XMLGregorianCalendar value) { - this.value = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/EntryType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/EntryType.java deleted file mode 100644 index 76aef53799a5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/EntryType.java +++ /dev/null @@ -1,213 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom entry construct is defined in section 4.1.2 of the format spec. - * - * - *

- * Java class for entryType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="entryType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice maxOccurs="unbounded">
- *         <element name="author" type="{http://www.w3.org/2005/Atom}personType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="category" type="{http://www.w3.org/2005/Atom}categoryType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="content" type="{http://www.w3.org/2005/Atom}contentType" minOccurs="0"/>
- *         <element name="contributor" type="{http://www.w3.org/2005/Atom}personType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="id" type="{http://www.w3.org/2005/Atom}idType"/>
- *         <element name="link" type="{http://www.w3.org/2005/Atom}linkType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="published" type="{http://www.w3.org/2005/Atom}dateTimeType" minOccurs="0"/>
- *         <element name="rights" type="{http://www.w3.org/2005/Atom}textType" minOccurs="0"/>
- *         <element name="source" type="{http://www.w3.org/2005/Atom}textType" minOccurs="0"/>
- *         <element name="summary" type="{http://www.w3.org/2005/Atom}textType" minOccurs="0"/>
- *         <element name="title" type="{http://www.w3.org/2005/Atom}textType"/>
- *         <element name="updated" type="{http://www.w3.org/2005/Atom}dateTimeType"/>
- *         <any namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
- *       </choice>
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "entryType", propOrder = { "entryChildren" }) -public class EntryType { - - @XmlElementRefs({ - @XmlElementRef(name = "category", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "rights", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "published", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "author", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "link", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "title", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "summary", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "id", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "source", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "content", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "updated", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "contributor", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class) }) - @XmlAnyElement(lax = true) - private List entryChildren; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the entryChildren property. - * - *

- * This accessor method returns a reference to the live list, not a - * snapshot. Therefore any modification you make to the returned list will - * be present inside the JAXB object. This is why there is not a - * set method for the entryChildren property. - * - *

- * For example, to add a new item, do as follows: - * - *

-     * getEntryChildren().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link CategoryType }{@code >} - * {@link JAXBElement }{@code <}{@link TextType }{@code >} {@link JAXBElement } - * {@code <}{@link DateTimeType }{@code >} {@link JAXBElement }{@code <} - * {@link PersonType }{@code >} {@link JAXBElement }{@code <}{@link LinkType } - * {@code >} {@link JAXBElement }{@code <}{@link TextType }{@code >} - * {@link JAXBElement }{@code <}{@link DateTimeType }{@code >} - * {@link JAXBElement }{@code <}{@link PersonType }{@code >} - * {@link JAXBElement }{@code <}{@link TextType }{@code >} {@link JAXBElement } - * {@code <}{@link TextType }{@code >} {@link JAXBElement }{@code <} - * {@link IdType }{@code >} {@link JAXBElement }{@code <}{@link ContentType } - * {@code >} {@link Object } - * - * - */ - public List getEntryChildren() { - if (entryChildren == null) { - entryChildren = new ArrayList(); - } - return this.entryChildren; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/FeedType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/FeedType.java deleted file mode 100644 index 319c1cfd2323..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/FeedType.java +++ /dev/null @@ -1,216 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.18 at 11:05:53 AM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom feed construct is defined in section 4.1.1 of the format spec. - * - * - *

- * Java class for feedType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="feedType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice maxOccurs="unbounded" minOccurs="3">
- *         <element name="author" type="{http://www.w3.org/2005/Atom}personType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="category" type="{http://www.w3.org/2005/Atom}categoryType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="contributor" type="{http://www.w3.org/2005/Atom}personType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="generator" type="{http://www.w3.org/2005/Atom}generatorType" minOccurs="0"/>
- *         <element name="icon" type="{http://www.w3.org/2005/Atom}iconType" minOccurs="0"/>
- *         <element name="id" type="{http://www.w3.org/2005/Atom}idType"/>
- *         <element name="link" type="{http://www.w3.org/2005/Atom}linkType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="logo" type="{http://www.w3.org/2005/Atom}logoType" minOccurs="0"/>
- *         <element name="rights" type="{http://www.w3.org/2005/Atom}textType" minOccurs="0"/>
- *         <element name="subtitle" type="{http://www.w3.org/2005/Atom}textType" minOccurs="0"/>
- *         <element name="title" type="{http://www.w3.org/2005/Atom}textType"/>
- *         <element name="updated" type="{http://www.w3.org/2005/Atom}dateTimeType"/>
- *         <element name="entry" type="{http://www.w3.org/2005/Atom}entryType" maxOccurs="unbounded" minOccurs="0"/>
- *         <any namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
- *       </choice>
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "feedType", propOrder = { "feedChildren" }) -public class FeedType { - - @XmlElementRefs({ - @XmlElementRef(name = "updated", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "generator", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "rights", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "id", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "link", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "subtitle", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "contributor", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "entry", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "logo", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "icon", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "author", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "category", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "title", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class) }) - @XmlAnyElement(lax = true) - private List feedChildren; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the feedChildren property. - * - *

- * This accessor method returns a reference to the live list, not a - * snapshot. Therefore any modification you make to the returned list will - * be present inside the JAXB object. This is why there is not a - * set method for the feedChildren property. - * - *

- * For example, to add a new item, do as follows: - * - *

-     * getFeedChildren().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link DateTimeType }{@code >} - * {@link JAXBElement }{@code <}{@link GeneratorType }{@code >} - * {@link JAXBElement }{@code <}{@link TextType }{@code >} {@link JAXBElement } - * {@code <}{@link IdType }{@code >} {@link JAXBElement }{@code <} - * {@link LinkType }{@code >} {@link JAXBElement }{@code <}{@link TextType } - * {@code >} {@link JAXBElement }{@code <}{@link PersonType }{@code >} - * {@link Object } {@link JAXBElement }{@code <}{@link EntryType }{@code >} - * {@link JAXBElement }{@code <}{@link LogoType }{@code >} {@link JAXBElement } - * {@code <}{@link IconType }{@code >} {@link JAXBElement }{@code <} - * {@link PersonType }{@code >} {@link JAXBElement }{@code <} - * {@link CategoryType }{@code >} {@link JAXBElement }{@code <} - * {@link TextType }{@code >} - * - * - */ - public List getFeedChildren() { - if (feedChildren == null) { - feedChildren = new ArrayList(); - } - return this.feedChildren; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/GeneratorType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/GeneratorType.java deleted file mode 100644 index 841656d31285..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/GeneratorType.java +++ /dev/null @@ -1,210 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom generator element is defined in section 4.2.4 of the format spec. - * - * - *

- * Java class for generatorType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="generatorType">
- *   <simpleContent>
- *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <attribute name="uri" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *       <attribute name="version" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <anyAttribute namespace='##other'/>
- *     </extension>
- *   </simpleContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "generatorType", propOrder = { "value" }) -public class GeneratorType { - - @XmlValue - private String value; - @XmlAttribute - @XmlSchemaType(name = "anyURI") - private String uri; - @XmlAttribute - private String version; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the uri property. - * - * @return possible object is {@link String } - * - */ - public String getUri() { - return uri; - } - - /** - * Sets the value of the uri property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setUri(String value) { - this.uri = value; - } - - /** - * Gets the value of the version property. - * - * @return possible object is {@link String } - * - */ - public String getVersion() { - return version; - } - - /** - * Sets the value of the version property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setVersion(String value) { - this.version = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IconType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IconType.java deleted file mode 100644 index e98d74d6ae07..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IconType.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom icon construct is defined in section 4.2.5 of the format spec. - * - * - *

- * Java class for iconType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="iconType">
- *   <simpleContent>
- *     <extension base="<http://www.w3.org/2001/XMLSchema>anyURI">
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </extension>
- *   </simpleContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "iconType", propOrder = { "value" }) -public class IconType { - - @XmlValue - @XmlSchemaType(name = "anyURI") - private String value; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IdType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IdType.java deleted file mode 100644 index b3b4a215d51d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/IdType.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom id construct is defined in section 4.2.6 of the format spec. - * - * - *

- * Java class for idType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="idType">
- *   <simpleContent>
- *     <extension base="<http://www.w3.org/2001/XMLSchema>anyURI">
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </extension>
- *   </simpleContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "idType", propOrder = { "value" }) -public class IdType { - - @XmlValue - @XmlSchemaType(name = "anyURI") - private String value; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LinkType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LinkType.java deleted file mode 100644 index 109c22639ac3..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LinkType.java +++ /dev/null @@ -1,312 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.math.BigInteger; -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom link construct is defined in section 3.4 of the format spec. - * - * - *

- * Java class for linkType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="linkType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <attribute name="href" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *       <attribute name="rel" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <attribute name="hreflang" type="{http://www.w3.org/2001/XMLSchema}NMTOKEN" />
- *       <attribute name="title" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <attribute name="length" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
- *       <anyAttribute namespace='##other'/>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "linkType", propOrder = { "content" }) -public class LinkType { - - @XmlValue - private String content; - @XmlAttribute(required = true) - @XmlSchemaType(name = "anyURI") - private String href; - @XmlAttribute - private String rel; - @XmlAttribute - private String type; - @XmlAttribute - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "NMTOKEN") - private String hreflang; - @XmlAttribute - private String title; - @XmlAttribute - @XmlSchemaType(name = "positiveInteger") - private BigInteger length; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * - * The Atom link construct is defined in section 3.4 of the format spec. - * - * - * @return possible object is {@link String } - * - */ - public String getContent() { - return content; - } - - /** - * Sets the value of the content property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setContent(String value) { - this.content = value; - } - - /** - * Gets the value of the href property. - * - * @return possible object is {@link String } - * - */ - public String getHref() { - return href; - } - - /** - * Sets the value of the href property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setHref(String value) { - this.href = value; - } - - /** - * Gets the value of the rel property. - * - * @return possible object is {@link String } - * - */ - public String getRel() { - return rel; - } - - /** - * Sets the value of the rel property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setRel(String value) { - this.rel = value; - } - - /** - * Gets the value of the type property. - * - * @return possible object is {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - - /** - * Gets the value of the hreflang property. - * - * @return possible object is {@link String } - * - */ - public String getHreflang() { - return hreflang; - } - - /** - * Sets the value of the hreflang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setHreflang(String value) { - this.hreflang = value; - } - - /** - * Gets the value of the title property. - * - * @return possible object is {@link String } - * - */ - public String getTitle() { - return title; - } - - /** - * Sets the value of the title property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setTitle(String value) { - this.title = value; - } - - /** - * Gets the value of the length property. - * - * @return possible object is {@link BigInteger } - * - */ - public BigInteger getLength() { - return length; - } - - /** - * Sets the value of the length property. - * - * @param value - * allowed object is {@link BigInteger } - * - */ - public void setLength(BigInteger value) { - this.length = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LogoType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LogoType.java deleted file mode 100644 index fa0c6be3491f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/LogoType.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom logo construct is defined in section 4.2.8 of the format spec. - * - * - *

- * Java class for logoType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="logoType">
- *   <simpleContent>
- *     <extension base="<http://www.w3.org/2001/XMLSchema>anyURI">
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </extension>
- *   </simpleContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "logoType", propOrder = { "value" }) -public class LogoType { - - @XmlValue - @XmlSchemaType(name = "anyURI") - private String value; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ObjectFactory.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ObjectFactory.java deleted file mode 100644 index c664661da68b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/ObjectFactory.java +++ /dev/null @@ -1,670 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlElementDecl; -import javax.xml.bind.annotation.XmlRegistry; -import javax.xml.bind.annotation.adapters.NormalizedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * This object contains factory methods for each Java content interface and Java - * element interface generated in the - * com.microsoft.windowsazure.services.media.implementation.atom package. - *

- * An ObjectFactory allows you to programatically construct new instances of the - * Java representation for XML content. The Java representation of XML content - * can consist of schema derived interfaces and classes representing the binding - * of schema type definitions, element declarations and model groups. Factory - * methods for each of these are provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - private static final QName ENTRY_QNAME = new QName( - "http://www.w3.org/2005/Atom", "entry"); - private static final QName FEED_QNAME = new QName( - "http://www.w3.org/2005/Atom", "feed"); - private static final QName PERSON_TYPE_NAME_QNAME = new QName( - "http://www.w3.org/2005/Atom", "name"); - private static final QName PERSON_TYPE_EMAIL_QNAME = new QName( - "http://www.w3.org/2005/Atom", "email"); - private static final QName PERSON_TYPE_URI_QNAME = new QName( - "http://www.w3.org/2005/Atom", "uri"); - private static final QName ENTRY_TYPE_TITLE_QNAME = new QName( - "http://www.w3.org/2005/Atom", "title"); - private static final QName ENTRY_TYPE_CATEGORY_QNAME = new QName( - "http://www.w3.org/2005/Atom", "category"); - private static final QName ENTRY_TYPE_AUTHOR_QNAME = new QName( - "http://www.w3.org/2005/Atom", "author"); - private static final QName ENTRY_TYPE_SUMMARY_QNAME = new QName( - "http://www.w3.org/2005/Atom", "summary"); - private static final QName ENTRY_TYPE_ID_QNAME = new QName( - "http://www.w3.org/2005/Atom", "id"); - private static final QName ENTRY_TYPE_CONTENT_QNAME = new QName( - "http://www.w3.org/2005/Atom", "content"); - private static final QName ENTRY_TYPE_LINK_QNAME = new QName( - "http://www.w3.org/2005/Atom", "link"); - private static final QName ENTRY_TYPE_CONTRIBUTOR_QNAME = new QName( - "http://www.w3.org/2005/Atom", "contributor"); - private static final QName ENTRY_TYPE_UPDATED_QNAME = new QName( - "http://www.w3.org/2005/Atom", "updated"); - private static final QName ENTRY_TYPE_SOURCE_QNAME = new QName( - "http://www.w3.org/2005/Atom", "source"); - private static final QName ENTRY_TYPE_RIGHTS_QNAME = new QName( - "http://www.w3.org/2005/Atom", "rights"); - private static final QName ENTRY_TYPE_PUBLISHED_QNAME = new QName( - "http://www.w3.org/2005/Atom", "published"); - private static final QName FEED_TYPE_GENERATOR_QNAME = new QName( - "http://www.w3.org/2005/Atom", "generator"); - private static final QName FEED_TYPE_SUBTITLE_QNAME = new QName( - "http://www.w3.org/2005/Atom", "subtitle"); - private static final QName FEED_TYPE_LOGO_QNAME = new QName( - "http://www.w3.org/2005/Atom", "logo"); - private static final QName FEED_TYPE_ICON_QNAME = new QName( - "http://www.w3.org/2005/Atom", "icon"); - - /** - * Create a new ObjectFactory that can be used to create new instances of - * schema derived classes for package: - * com.microsoft.windowsazure.services.media.implementation.atom - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link PersonType } - * - */ - public PersonType createPersonType() { - return new PersonType(); - } - - /** - * Create an instance of {@link EntryType } - * - */ - public EntryType createEntryType() { - return new EntryType(); - } - - /** - * Create an instance of {@link IconType } - * - */ - public IconType createIconType() { - return new IconType(); - } - - /** - * Create an instance of {@link UriType } - * - */ - public UriType createUriType() { - return new UriType(); - } - - /** - * Create an instance of {@link TextType } - * - */ - public TextType createTextType() { - return new TextType(); - } - - /** - * Create an instance of {@link FeedType } - * - */ - public FeedType createFeedType() { - return new FeedType(); - } - - /** - * Create an instance of {@link DateTimeType } - * - */ - public DateTimeType createDateTimeType() { - return new DateTimeType(); - } - - /** - * Create an instance of {@link IdType } - * - */ - public IdType createIdType() { - return new IdType(); - } - - /** - * Create an instance of {@link SourceType } - * - */ - public SourceType createSourceType() { - return new SourceType(); - } - - /** - * Create an instance of {@link LinkType } - * - */ - public LinkType createLinkType() { - return new LinkType(); - } - - /** - * Create an instance of {@link LogoType } - * - */ - public LogoType createLogoType() { - return new LogoType(); - } - - /** - * Create an instance of {@link GeneratorType } - * - */ - public GeneratorType createGeneratorType() { - return new GeneratorType(); - } - - /** - * Create an instance of {@link ContentType } - * - */ - public ContentType createContentType() { - return new ContentType(); - } - - /** - * Create an instance of {@link CategoryType } - * - */ - public CategoryType createCategoryType() { - return new CategoryType(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link EntryType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "entry") - public JAXBElement createEntry(EntryType value) { - return new JAXBElement(ENTRY_QNAME, EntryType.class, null, - value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link FeedType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "feed") - public JAXBElement createFeed(FeedType value) { - return new JAXBElement(FEED_QNAME, FeedType.class, null, - value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "name", scope = PersonType.class) - public JAXBElement createPersonTypeName(String value) { - return new JAXBElement(PERSON_TYPE_NAME_QNAME, String.class, - PersonType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "email", scope = PersonType.class) - @XmlJavaTypeAdapter(NormalizedStringAdapter.class) - public JAXBElement createPersonTypeEmail(String value) { - return new JAXBElement(PERSON_TYPE_EMAIL_QNAME, String.class, - PersonType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link UriType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "uri", scope = PersonType.class) - public JAXBElement createPersonTypeUri(UriType value) { - return new JAXBElement(PERSON_TYPE_URI_QNAME, UriType.class, - PersonType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "title", scope = EntryType.class) - public JAXBElement createEntryTypeTitle(TextType value) { - return new JAXBElement(ENTRY_TYPE_TITLE_QNAME, TextType.class, - EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link CategoryType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "category", scope = EntryType.class) - public JAXBElement createEntryTypeCategory(CategoryType value) { - return new JAXBElement(ENTRY_TYPE_CATEGORY_QNAME, - CategoryType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link PersonType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "author", scope = EntryType.class) - public JAXBElement createEntryTypeAuthor(PersonType value) { - return new JAXBElement(ENTRY_TYPE_AUTHOR_QNAME, - PersonType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "summary", scope = EntryType.class) - public JAXBElement createEntryTypeSummary(TextType value) { - return new JAXBElement(ENTRY_TYPE_SUMMARY_QNAME, - TextType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link IdType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "id", scope = EntryType.class) - public JAXBElement createEntryTypeId(IdType value) { - return new JAXBElement(ENTRY_TYPE_ID_QNAME, IdType.class, - EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link ContentType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "content", scope = EntryType.class) - public JAXBElement createEntryTypeContent(ContentType value) { - return new JAXBElement(ENTRY_TYPE_CONTENT_QNAME, - ContentType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link LinkType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "link", scope = EntryType.class) - public JAXBElement createEntryTypeLink(LinkType value) { - return new JAXBElement(ENTRY_TYPE_LINK_QNAME, LinkType.class, - EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link PersonType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "contributor", scope = EntryType.class) - public JAXBElement createEntryTypeContributor(PersonType value) { - return new JAXBElement(ENTRY_TYPE_CONTRIBUTOR_QNAME, - PersonType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link DateTimeType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "updated", scope = EntryType.class) - public JAXBElement createEntryTypeUpdated(DateTimeType value) { - return new JAXBElement(ENTRY_TYPE_UPDATED_QNAME, - DateTimeType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "source", scope = EntryType.class) - public JAXBElement createEntryTypeSource(TextType value) { - return new JAXBElement(ENTRY_TYPE_SOURCE_QNAME, - TextType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "rights", scope = EntryType.class) - public JAXBElement createEntryTypeRights(TextType value) { - return new JAXBElement(ENTRY_TYPE_RIGHTS_QNAME, - TextType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link DateTimeType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "published", scope = EntryType.class) - public JAXBElement createEntryTypePublished(DateTimeType value) { - return new JAXBElement(ENTRY_TYPE_PUBLISHED_QNAME, - DateTimeType.class, EntryType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link CategoryType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "category", scope = FeedType.class) - public JAXBElement createFeedTypeCategory(CategoryType value) { - return new JAXBElement(ENTRY_TYPE_CATEGORY_QNAME, - CategoryType.class, FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "title", scope = FeedType.class) - public JAXBElement createFeedTypeTitle(TextType value) { - return new JAXBElement(ENTRY_TYPE_TITLE_QNAME, TextType.class, - FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link PersonType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "author", scope = FeedType.class) - public JAXBElement createFeedTypeAuthor(PersonType value) { - return new JAXBElement(ENTRY_TYPE_AUTHOR_QNAME, - PersonType.class, FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link IdType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "id", scope = FeedType.class) - public JAXBElement createFeedTypeId(IdType value) { - return new JAXBElement(ENTRY_TYPE_ID_QNAME, IdType.class, - FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link EntryType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "entry", scope = FeedType.class) - public JAXBElement createFeedTypeEntry(EntryType value) { - return new JAXBElement(ENTRY_QNAME, EntryType.class, - FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link PersonType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "contributor", scope = FeedType.class) - public JAXBElement createFeedTypeContributor(PersonType value) { - return new JAXBElement(ENTRY_TYPE_CONTRIBUTOR_QNAME, - PersonType.class, FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link DateTimeType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "updated", scope = FeedType.class) - public JAXBElement createFeedTypeUpdated(DateTimeType value) { - return new JAXBElement(ENTRY_TYPE_UPDATED_QNAME, - DateTimeType.class, FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link GeneratorType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "generator", scope = FeedType.class) - public JAXBElement createFeedTypeGenerator( - GeneratorType value) { - return new JAXBElement(FEED_TYPE_GENERATOR_QNAME, - GeneratorType.class, FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "subtitle", scope = FeedType.class) - public JAXBElement createFeedTypeSubtitle(TextType value) { - return new JAXBElement(FEED_TYPE_SUBTITLE_QNAME, - TextType.class, FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link LogoType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "logo", scope = FeedType.class) - public JAXBElement createFeedTypeLogo(LogoType value) { - return new JAXBElement(FEED_TYPE_LOGO_QNAME, LogoType.class, - FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link IconType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "icon", scope = FeedType.class) - public JAXBElement createFeedTypeIcon(IconType value) { - return new JAXBElement(FEED_TYPE_ICON_QNAME, IconType.class, - FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link LinkType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "link", scope = FeedType.class) - public JAXBElement createFeedTypeLink(LinkType value) { - return new JAXBElement(ENTRY_TYPE_LINK_QNAME, LinkType.class, - FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "rights", scope = FeedType.class) - public JAXBElement createFeedTypeRights(TextType value) { - return new JAXBElement(ENTRY_TYPE_RIGHTS_QNAME, - TextType.class, FeedType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "title", scope = SourceType.class) - public JAXBElement createSourceTypeTitle(TextType value) { - return new JAXBElement(ENTRY_TYPE_TITLE_QNAME, TextType.class, - SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link CategoryType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "category", scope = SourceType.class) - public JAXBElement createSourceTypeCategory(CategoryType value) { - return new JAXBElement(ENTRY_TYPE_CATEGORY_QNAME, - CategoryType.class, SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link IconType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "icon", scope = SourceType.class) - public JAXBElement createSourceTypeIcon(IconType value) { - return new JAXBElement(FEED_TYPE_ICON_QNAME, IconType.class, - SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link PersonType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "author", scope = SourceType.class) - public JAXBElement createSourceTypeAuthor(PersonType value) { - return new JAXBElement(ENTRY_TYPE_AUTHOR_QNAME, - PersonType.class, SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link LogoType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "logo", scope = SourceType.class) - public JAXBElement createSourceTypeLogo(LogoType value) { - return new JAXBElement(FEED_TYPE_LOGO_QNAME, LogoType.class, - SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link IdType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "id", scope = SourceType.class) - public JAXBElement createSourceTypeId(IdType value) { - return new JAXBElement(ENTRY_TYPE_ID_QNAME, IdType.class, - SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link LinkType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "link", scope = SourceType.class) - public JAXBElement createSourceTypeLink(LinkType value) { - return new JAXBElement(ENTRY_TYPE_LINK_QNAME, LinkType.class, - SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link PersonType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "contributor", scope = SourceType.class) - public JAXBElement createSourceTypeContributor(PersonType value) { - return new JAXBElement(ENTRY_TYPE_CONTRIBUTOR_QNAME, - PersonType.class, SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link DateTimeType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "updated", scope = SourceType.class) - public JAXBElement createSourceTypeUpdated(DateTimeType value) { - return new JAXBElement(ENTRY_TYPE_UPDATED_QNAME, - DateTimeType.class, SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link GeneratorType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "generator", scope = SourceType.class) - public JAXBElement createSourceTypeGenerator( - GeneratorType value) { - return new JAXBElement(FEED_TYPE_GENERATOR_QNAME, - GeneratorType.class, SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "rights", scope = SourceType.class) - public JAXBElement createSourceTypeRights(TextType value) { - return new JAXBElement(ENTRY_TYPE_RIGHTS_QNAME, - TextType.class, SourceType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TextType } - * {@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "subtitle", scope = SourceType.class) - public JAXBElement createSourceTypeSubtitle(TextType value) { - return new JAXBElement(FEED_TYPE_SUBTITLE_QNAME, - TextType.class, SourceType.class, value); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/PersonType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/PersonType.java deleted file mode 100644 index 11f46bcdc0d0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/PersonType.java +++ /dev/null @@ -1,187 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom person construct is defined in section 3.2 of the format spec. - * - * - *

- * Java class for personType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="personType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice maxOccurs="unbounded">
- *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="uri" type="{http://www.w3.org/2005/Atom}uriType" minOccurs="0"/>
- *         <element name="email" type="{http://www.w3.org/2005/Atom}emailType" minOccurs="0"/>
- *         <any namespace='##other'/>
- *       </choice>
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "personType", propOrder = { "nameOrUriOrEmail" }) -public class PersonType { - - @XmlElementRefs({ - @XmlElementRef(name = "email", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "uri", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "name", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class) }) - @XmlAnyElement(lax = true) - private List nameOrUriOrEmail; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the nameOrUriOrEmail property. - * - *

- * This accessor method returns a reference to the live list, not a - * snapshot. Therefore any modification you make to the returned list will - * be present inside the JAXB object. This is why there is not a - * set method for the nameOrUriOrEmail property. - * - *

- * For example, to add a new item, do as follows: - * - *

-     * getNameOrUriOrEmail().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link String }{@code >} {@link Object } - * {@link JAXBElement }{@code <}{@link String }{@code >} {@link JAXBElement } - * {@code <}{@link UriType }{@code >} - * - * - */ - public List getNameOrUriOrEmail() { - if (nameOrUriOrEmail == null) { - nameOrUriOrEmail = new ArrayList(); - } - return this.nameOrUriOrEmail; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/SourceType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/SourceType.java deleted file mode 100644 index a11d845fec13..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/SourceType.java +++ /dev/null @@ -1,213 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom source construct is defined in section 4.2.11 of the format spec. - * - * - *

- * Java class for sourceType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="sourceType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice maxOccurs="unbounded">
- *         <element name="author" type="{http://www.w3.org/2005/Atom}personType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="category" type="{http://www.w3.org/2005/Atom}categoryType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="contributor" type="{http://www.w3.org/2005/Atom}personType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="generator" type="{http://www.w3.org/2005/Atom}generatorType" minOccurs="0"/>
- *         <element name="icon" type="{http://www.w3.org/2005/Atom}iconType" minOccurs="0"/>
- *         <element name="id" type="{http://www.w3.org/2005/Atom}idType" minOccurs="0"/>
- *         <element name="link" type="{http://www.w3.org/2005/Atom}linkType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="logo" type="{http://www.w3.org/2005/Atom}logoType" minOccurs="0"/>
- *         <element name="rights" type="{http://www.w3.org/2005/Atom}textType" minOccurs="0"/>
- *         <element name="subtitle" type="{http://www.w3.org/2005/Atom}textType" minOccurs="0"/>
- *         <element name="title" type="{http://www.w3.org/2005/Atom}textType" minOccurs="0"/>
- *         <element name="updated" type="{http://www.w3.org/2005/Atom}dateTimeType" minOccurs="0"/>
- *         <any namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
- *       </choice>
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "sourceType", propOrder = { "authorOrCategoryOrContributor" }) -public class SourceType { - - @XmlElementRefs({ - @XmlElementRef(name = "contributor", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "title", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "author", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "category", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "generator", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "logo", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "id", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "icon", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "link", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "rights", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "subtitle", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class), - @XmlElementRef(name = "updated", namespace = "http://www.w3.org/2005/Atom", type = JAXBElement.class) }) - @XmlAnyElement(lax = true) - private List authorOrCategoryOrContributor; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the authorOrCategoryOrContributor property. - * - *

- * This accessor method returns a reference to the live list, not a - * snapshot. Therefore any modification you make to the returned list will - * be present inside the JAXB object. This is why there is not a - * set method for the authorOrCategoryOrContributor property. - * - *

- * For example, to add a new item, do as follows: - * - *

-     * getAuthorOrCategoryOrContributor().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link PersonType }{@code >} - * {@link JAXBElement }{@code <}{@link TextType }{@code >} {@link JAXBElement } - * {@code <}{@link PersonType }{@code >} {@link JAXBElement }{@code <} - * {@link GeneratorType }{@code >} {@link JAXBElement }{@code <} - * {@link LogoType }{@code >} {@link JAXBElement }{@code <}{@link IdType } - * {@code >} {@link JAXBElement }{@code <}{@link TextType }{@code >} - * {@link JAXBElement }{@code <}{@link DateTimeType }{@code >} - * {@link JAXBElement }{@code <}{@link CategoryType }{@code >} {@link Object } - * {@link JAXBElement }{@code <}{@link IconType }{@code >} {@link JAXBElement } - * {@code <}{@link LinkType }{@code >} {@link JAXBElement }{@code <} - * {@link TextType }{@code >} - * - * - */ - public List getAuthorOrCategoryOrContributor() { - if (authorOrCategoryOrContributor == null) { - authorOrCategoryOrContributor = new ArrayList(); - } - return this.authorOrCategoryOrContributor; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/TextType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/TextType.java deleted file mode 100644 index c18bd847bd81..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/TextType.java +++ /dev/null @@ -1,212 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * - * The Atom text construct is defined in section 3.1 of the format spec. - * - * - *

- * Java class for textType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="textType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <any namespace='http://www.w3.org/1999/xhtml' minOccurs="0"/>
- *       </sequence>
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <attribute name="type">
- *         <simpleType>
- *           <restriction base="{http://www.w3.org/2001/XMLSchema}token">
- *             <enumeration value="text"/>
- *             <enumeration value="html"/>
- *             <enumeration value="xhtml"/>
- *           </restriction>
- *         </simpleType>
- *       </attribute>
- *       <anyAttribute namespace='##other'/>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "textType", propOrder = { "content" }) -public class TextType { - - @XmlMixed - @XmlAnyElement(lax = true) - private List content; - @XmlAttribute - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - private String type; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * - * The Atom text construct is defined in section 3.1 of the format spec. - * Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, not a - * snapshot. Therefore any modification you make to the returned list will - * be present inside the JAXB object. This is why there is not a - * set method for the content property. - * - *

- * For example, to add a new item, do as follows: - * - *

-     * getContent().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link Object } - * {@link String } - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - /** - * Gets the value of the type property. - * - * @return possible object is {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/UriType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/UriType.java deleted file mode 100644 index 057e580264bc..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/UriType.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -package com.microsoft.windowsazure.services.media.implementation.atom; - -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - *

- * Java class for uriType complex type. - * - *

- * The following schema fragment specifies the expected content contained within - * this class. - * - *

- * <complexType name="uriType">
- *   <simpleContent>
- *     <extension base="<http://www.w3.org/2001/XMLSchema>anyURI">
- *       <attGroup ref="{http://www.w3.org/2005/Atom}commonAttributes"/>
- *       <anyAttribute namespace='##other'/>
- *     </extension>
- *   </simpleContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "uriType", propOrder = { "value" }) -public class UriType { - - @XmlValue - @XmlSchemaType(name = "anyURI") - private String value; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlSchemaType(name = "anyURI") - private String base; - @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlSchemaType(name = "language") - private String lang; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the base property. - * - * @return possible object is {@link String } - * - */ - public String getBase() { - return base; - } - - /** - * Sets the value of the base property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBase(String value) { - this.base = value; - } - - /** - * Gets the value of the lang property. - * - * @return possible object is {@link String } - * - */ - public String getLang() { - return lang; - } - - /** - * Sets the value of the lang property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLang(String value) { - this.lang = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed - * property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string - * value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by - * updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/package-info.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/package-info.java deleted file mode 100644 index 23a179781afe..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/atom/package-info.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.09.17 at 02:31:28 PM PDT -// - -@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.w3.org/2005/Atom", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) -package com.microsoft.windowsazure.services.media.implementation.atom; - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AccessPolicyType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AccessPolicyType.java deleted file mode 100644 index 4bb71e8b9b3c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AccessPolicyType.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * Wrapper DTO for Media Services access policies. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class AccessPolicyType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "DurationInMinutes", namespace = Constants.ODATA_DATA_NS) - private Double durationInMinutes; - - @XmlElement(name = "Permissions", namespace = Constants.ODATA_DATA_NS) - private Integer permissions; - - /** - * @return the id - */ - public String getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public AccessPolicyType setId(String id) { - this.id = id; - return this; - } - - /** - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * @param created - * the created to set - */ - public AccessPolicyType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * @return the lastModified - */ - public Date getLastModified() { - return lastModified; - } - - /** - * @param lastModified - * the lastModified to set - */ - public AccessPolicyType setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name - * the name to set - */ - public AccessPolicyType setName(String name) { - this.name = name; - return this; - } - - /** - * @return the durationInMinutes - */ - public Double getDurationInMinutes() { - return durationInMinutes; - } - - /** - * @param durationInMinutes - * the durationInMinutes to set - */ - public AccessPolicyType setDurationInMinutes(double durationInMinutes) { - this.durationInMinutes = durationInMinutes; - return this; - } - - /** - * @return the permissions - */ - public Integer getPermissions() { - return permissions; - } - - /** - * @param permissions - * the permissions to set - */ - public AccessPolicyType setPermissions(Integer permissions) { - this.permissions = permissions; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AkamaiAccessControlType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AkamaiAccessControlType.java deleted file mode 100644 index d1415036a3c1..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AkamaiAccessControlType.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; - -@XmlAccessorType(XmlAccessType.FIELD) -public class AkamaiAccessControlType { - - @XmlElementWrapper(name = "AkamaiSignatureHeaderAuthenticationKeyList", namespace = Constants.ODATA_DATA_NS) - @XmlElement(name = "element", namespace = Constants.ODATA_DATA_NS) - private List akamaiSignatureHeaderAuthenticationKeyList; - - public List getAkamaiSignatureHeaderAuthenticationKeyList() { - return akamaiSignatureHeaderAuthenticationKeyList; - } - - public void setAkamaiSignatureHeaderAuthenticationKeyList(List akamaiSignatureHeaderAuthenticationKeyList) { - this.akamaiSignatureHeaderAuthenticationKeyList = akamaiSignatureHeaderAuthenticationKeyList; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AkamaiSignatureHeaderAuthenticationKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AkamaiSignatureHeaderAuthenticationKey.java deleted file mode 100644 index 198ac88e52dd..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AkamaiSignatureHeaderAuthenticationKey.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -@XmlAccessorType(XmlAccessType.FIELD) -public class AkamaiSignatureHeaderAuthenticationKey { - - @XmlElement(name = "Identifier", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Expiration", namespace = Constants.ODATA_DATA_NS) - private Date expiration; - - @XmlElement(name = "Base64Key", namespace = Constants.ODATA_DATA_NS) - private String base64Key; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public Date getExpiration() { - return expiration; - } - - public void setExpiration(Date expiration) { - this.expiration = expiration; - } - - public String getBase64Key() { - return base64Key; - } - - public void setBase64Key(String base64Key) { - this.base64Key = base64Key; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetDeliveryPolicyRestType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetDeliveryPolicyRestType.java deleted file mode 100644 index 263a4b4a628f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetDeliveryPolicyRestType.java +++ /dev/null @@ -1,197 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -import org.codehaus.jettison.json.JSONArray; -import org.codehaus.jettison.json.JSONObject; - -import com.microsoft.windowsazure.services.media.models.AssetDeliveryPolicyConfigurationKey; - -/** - * This type maps the XML returned in the odata ATOM serialization for Asset - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class AssetDeliveryPolicyRestType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "AssetDeliveryProtocol", namespace = Constants.ODATA_DATA_NS) - private Integer assetDeliveryProtocol; - - @XmlElement(name = "AssetDeliveryPolicyType", namespace = Constants.ODATA_DATA_NS) - private Integer assetDeliveryPolicyType; - - @XmlElement(name = "AssetDeliveryConfiguration", namespace = Constants.ODATA_DATA_NS) - private String assetDeliveryConfiguration; - - /** - * @return the id - */ - public String getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public AssetDeliveryPolicyRestType setId(String id) { - this.id = id; - return this; - } - - /** - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * @param created - * the created to set - */ - public AssetDeliveryPolicyRestType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * @return the lastModified - */ - public Date getLastModified() { - return lastModified; - } - - /** - * @param lastModified - * the lastModified to set - */ - public AssetDeliveryPolicyRestType setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * @return the alternateId - */ - public Integer getAssetDeliveryProtocol() { - return assetDeliveryProtocol; - } - - /** - * @param alternateId - * the alternateId to set - */ - public AssetDeliveryPolicyRestType setAssetDeliveryProtocol(Integer assetDeliveryProtocol) { - this.assetDeliveryProtocol = assetDeliveryProtocol; - return this; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name - * the name to set - */ - public AssetDeliveryPolicyRestType setName(String name) { - this.name = name; - return this; - } - - /** - * @return the asset delivery policy type - */ - public Integer getAssetDeliveryPolicyType() { - return assetDeliveryPolicyType; - } - - /** - * @param assetDeliveryPolicyType - * the asset delivery policy type - */ - public AssetDeliveryPolicyRestType setAssetDeliveryPolicyType(Integer assetDeliveryPolicyType) { - this.assetDeliveryPolicyType = assetDeliveryPolicyType; - return this; - } - - /** - * @return the asset delivery configuration - */ - public Map getAssetDeliveryConfiguration() { - try { - Map results - = new HashMap(); - JSONArray source = new JSONArray(assetDeliveryConfiguration); - for (int i = 0; i < source.length(); i++) { - JSONObject row = source.getJSONObject(i); - results.put(AssetDeliveryPolicyConfigurationKey.fromCode(row.getInt("Key")), - row.getString("Value")); - } - return results; - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - /** - * @param assetDeliveryConfiguration - * the asset delivery configuration - * @return - */ - public AssetDeliveryPolicyRestType setAssetDeliveryConfiguration(Map assetDeliveryConfiguration) { - try { - JSONArray result = new JSONArray(); - if (assetDeliveryConfiguration != null) { - for (Map.Entry item : assetDeliveryConfiguration.entrySet()) { - JSONObject obj = new JSONObject(); - obj.put("Key", item.getKey().getCode()); - obj.put("Value", item.getValue()); - result.put(obj); - } - this.assetDeliveryConfiguration = result.toString(); - } - } catch (Exception e) { - throw new RuntimeException(e); - } - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetFileType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetFileType.java deleted file mode 100644 index 259659d5755d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetFileType.java +++ /dev/null @@ -1,297 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * Serialization for the AssetFile entity - * - */ - -@XmlAccessorType(XmlAccessType.FIELD) -public class AssetFileType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "ContentFileSize", namespace = Constants.ODATA_DATA_NS) - private Long contentFileSize; - - @XmlElement(name = "ParentAssetId", namespace = Constants.ODATA_DATA_NS) - private String parentAssetId; - - @XmlElement(name = "EncryptionVersion", namespace = Constants.ODATA_DATA_NS) - private String encryptionVersion; - - @XmlElement(name = "EncryptionScheme", namespace = Constants.ODATA_DATA_NS) - private String encryptionScheme; - - @XmlElement(name = "IsEncrypted", namespace = Constants.ODATA_DATA_NS) - private Boolean isEncrypted; - - @XmlElement(name = "EncryptionKeyId", namespace = Constants.ODATA_DATA_NS) - private String encryptionKeyId; - - @XmlElement(name = "InitializationVector", namespace = Constants.ODATA_DATA_NS) - private String initializationVector; - - @XmlElement(name = "IsPrimary", namespace = Constants.ODATA_DATA_NS) - private Boolean isPrimary; - - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - @XmlElement(name = "MimeType", namespace = Constants.ODATA_DATA_NS) - private String mimeType; - - @XmlElement(name = "ContentChecksum", namespace = Constants.ODATA_DATA_NS) - private String contentChecksum; - - /** - * @return the id - */ - public String getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public AssetFileType setId(String id) { - this.id = id; - return this; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name - * the name to set - */ - public AssetFileType setName(String name) { - this.name = name; - return this; - } - - /** - * @return the contentFileSize - */ - public Long getContentFileSize() { - return contentFileSize; - } - - /** - * @param contentFileSize - * the contentFileSize to set - */ - public AssetFileType setContentFileSize(Long contentFileSize) { - this.contentFileSize = contentFileSize; - return this; - } - - /** - * @return the parentAssetId - */ - public String getParentAssetId() { - return parentAssetId; - } - - /** - * @param parentAssetId - * the parentAssetId to set - */ - public AssetFileType setParentAssetId(String parentAssetId) { - this.parentAssetId = parentAssetId; - return this; - } - - /** - * @return the encryptionVersion - */ - public String getEncryptionVersion() { - return encryptionVersion; - } - - /** - * @param encryptionVersion - * the encryptionVersion to set - */ - public AssetFileType setEncryptionVersion(String encryptionVersion) { - this.encryptionVersion = encryptionVersion; - return this; - } - - /** - * @return the encryptionScheme - */ - public String getEncryptionScheme() { - return encryptionScheme; - } - - /** - * @param encryptionScheme - * the encryptionScheme to set - */ - public AssetFileType setEncryptionScheme(String encryptionScheme) { - this.encryptionScheme = encryptionScheme; - return this; - } - - /** - * @return the isEncrypted - */ - public Boolean getIsEncrypted() { - return isEncrypted; - } - - /** - * @param isEncrypted - * the isEncrypted to set - */ - public AssetFileType setIsEncrypted(Boolean isEncrypted) { - this.isEncrypted = isEncrypted; - return this; - } - - /** - * @return the encryptionKeyId - */ - public String getEncryptionKeyId() { - return encryptionKeyId; - } - - /** - * @param encryptionKeyId - * the encryptionKeyId to set - */ - public AssetFileType setEncryptionKeyId(String encryptionKeyId) { - this.encryptionKeyId = encryptionKeyId; - return this; - } - - /** - * @return the initializationVector - */ - public String getInitializationVector() { - return initializationVector; - } - - /** - * @param initializationVector - * the initializationVector to set - */ - public AssetFileType setInitializationVector(String initializationVector) { - this.initializationVector = initializationVector; - return this; - } - - /** - * @return the isPrimary - */ - public Boolean getIsPrimary() { - return isPrimary; - } - - /** - * @param isPrimary - * the isPrimary to set - */ - public AssetFileType setIsPrimary(Boolean isPrimary) { - this.isPrimary = isPrimary; - return this; - } - - /** - * @return the lastModified - */ - public Date getLastModified() { - return lastModified; - } - - /** - * @param lastModified - * the lastModified to set - */ - public AssetFileType setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * @param created - * the created to set - */ - public AssetFileType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * @return the mimeType - */ - public String getMimeType() { - return mimeType; - } - - /** - * @param mimeType - * the mimeType to set - */ - public AssetFileType setMimeType(String mimeType) { - this.mimeType = mimeType; - return this; - } - - /** - * @return the contentChecksum - */ - public String getContentChecksum() { - return contentChecksum; - } - - /** - * @param contentChecksum - * the contentChecksum to set - */ - public AssetFileType setContentChecksum(String contentChecksum) { - this.contentChecksum = contentChecksum; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetType.java deleted file mode 100644 index 68ba2fb637f2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/AssetType.java +++ /dev/null @@ -1,199 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for Asset - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class AssetType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "State", namespace = Constants.ODATA_DATA_NS) - private Integer state; - - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - @XmlElement(name = "AlternateId", namespace = Constants.ODATA_DATA_NS) - private String alternateId; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "Options", namespace = Constants.ODATA_DATA_NS) - private Integer options; - - @XmlElement(name = "Uri", namespace = Constants.ODATA_DATA_NS) - private String uri; - - @XmlElement(name = "StorageAccountName", namespace = Constants.ODATA_DATA_NS) - private String storageAccountName; - - /** - * @return the id - */ - public String getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public AssetType setId(String id) { - this.id = id; - return this; - } - - /** - * @return the state - */ - public Integer getState() { - return state; - } - - /** - * @param state - * the state to set - */ - public AssetType setState(Integer state) { - this.state = state; - return this; - } - - /** - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * @param created - * the created to set - */ - public AssetType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * @return the lastModified - */ - public Date getLastModified() { - return lastModified; - } - - /** - * @param lastModified - * the lastModified to set - */ - public AssetType setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * @return the alternateId - */ - public String getAlternateId() { - return alternateId; - } - - /** - * @param alternateId - * the alternateId to set - */ - public AssetType setAlternateId(String alternateId) { - this.alternateId = alternateId; - return this; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name - * the name to set - */ - public AssetType setName(String name) { - this.name = name; - return this; - } - - /** - * @return the options - */ - public Integer getOptions() { - return options; - } - - /** - * @param options - * the options to set - */ - public AssetType setOptions(Integer options) { - this.options = options; - return this; - } - - /** - * @return The Name of the storage account that contains the asset’s blob container. - */ - public String getStorageAccountName() { - return storageAccountName; - } - - /** - * @param storageAccountName - * Name of the storage account that contains the asset’s blob container. - */ - public void setStorageAccountName(String storageAccountName) { - this.storageAccountName = storageAccountName; - } - - /** - * @return The URI of the blob storage container of the specified Asset - */ - public String getUri() { - return uri; - } - - /** - * @param The URI of the blob storage container of the specified Asset - */ - public void setUri(String uri) { - this.uri = uri; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ChannelType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ChannelType.java deleted file mode 100644 index 705bd40bd637..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ChannelType.java +++ /dev/null @@ -1,282 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.net.URI; -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for Asset - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class ChannelType implements MediaServiceDTO { - - /** The id. */ - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - /** The name. */ - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - /** The description. */ - @XmlElement(name = "Description", namespace = Constants.ODATA_DATA_NS) - private String description; - - /** The created. */ - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - /** The last modified. */ - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - /** The preview uri. */ - @XmlElement(name = "PreviewUri", namespace = Constants.ODATA_DATA_NS) - private URI previewUri; - - /** The ingest uri. */ - @XmlElement(name = "IngestUri", namespace = Constants.ODATA_DATA_NS) - private URI ingestUri; - - /** The state. */ - @XmlElement(name = "State", namespace = Constants.ODATA_DATA_NS) - private String state; - - /** The size. */ - @XmlElement(name = "Size", namespace = Constants.ODATA_DATA_NS) - private String size; - - /** The settings. */ - @XmlElement(name = "Settings", namespace = Constants.ODATA_DATA_NS) - private String settings; - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return this.id; - } - - /** - * Sets the id. - * - * @param id - * the id - * @return the channel type - */ - public ChannelType setId(String id) { - this.id = id; - return this; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Sets the name. - * - * @param name - * the name to set - * @return the channel type - */ - public ChannelType setName(String name) { - this.name = name; - return this; - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Sets the description. - * - * @param description - * the description - * @return the channel type - */ - public ChannelType setDescription(String description) { - this.description = description; - return this; - } - - /** - * Gets the created. - * - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * Sets the created. - * - * @param created - * the created - * @return the channel type - */ - public ChannelType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * Gets the last modified. - * - * @return the lastModified - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Sets the last modified. - * - * @param lastModified - * the last modified - * @return the channel type - */ - public ChannelType setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * Sets the preview uri. - * - * @param previewUri - * the preview uri - * @return the channel type - */ - public ChannelType setPreviewUri(URI previewUri) { - this.previewUri = previewUri; - return this; - } - - /** - * Gets the preview uri. - * - * @return the preview - */ - public URI getPreviewUri() { - return previewUri; - } - - /** - * Sets the ingest uri. - * - * @param ingestUri - * the ingest uri - * @return the channel type - */ - public ChannelType setIngestUri(URI ingestUri) { - this.ingestUri = ingestUri; - return this; - } - - /** - * Gets the ingest uri. - * - * @return the ingest uri - */ - public URI getIngestUri() { - return ingestUri; - } - - /** - * Sets the state. - * - * @param state - * the state - * @return the channel type - */ - public ChannelType setState(String state) { - this.state = state; - return this; - } - - /** - * Gets the state. - * - * @return the state - */ - public String getState() { - return this.state; - } - - /** - * Gets the size. - * - * @return the name - */ - public String getSize() { - return this.size; - } - - /** - * Sets the size. - * - * @param size - * the size - * @return the channel type - */ - public ChannelType setSize(String size) { - this.size = size; - return this; - } - - /** - * Gets the settings. - * - * @return the settings - */ - public String getSettings() { - return this.settings; - } - - /** - * Sets the settings. - * - * @param settings - * the settings - * @return the channel type - */ - public ChannelType setSettings(String settings) { - this.settings = settings; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/Constants.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/Constants.java deleted file mode 100644 index 747a8e0e4813..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/Constants.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.namespace.QName; - -/** - * This class provides a set of constants for element names and namespaces used - * throughout the serialization of media services entities. - */ - -public final class Constants { - - private Constants() { - } - - /** - * XML Namespace for Atom syndication format, as defined by IETF RFC 4287 - */ - public static final String ATOM_NS = "http://www.w3.org/2005/Atom"; - - /** - * XML Namespace for OData data as serialized inside Atom syndication - * format. - */ - public static final String ODATA_DATA_NS = "http://schemas.microsoft.com/ado/2007/08/dataservices"; - - /** - * XML Namespace for OData metadata as serialized inside Atom syndication - * format. - */ - public static final String ODATA_METADATA_NS = "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"; - - /** - * EDM namespace for Azure Media Services entities, as defined in Media - * Services EDMX file. - */ - public static final String MEDIA_SERVICES_EDM_NAMESPACE = "Microsoft.Cloud.Media.Vod.Rest.Data.Models"; - - /** - * Element name for Atom content element, including namespace - */ - public static final QName ATOM_CONTENT_ELEMENT_NAME = new QName("content", - ATOM_NS); - - /** - * Element name for OData action elements, including namespace - */ - public static final QName ODATA_ACTION_ELEMENT_NAME = new QName("action", - ODATA_METADATA_NS); - - /** - * Element name for the metadata properties element, including namespace. - */ - public static final QName ODATA_PROPERTIES_ELEMENT_NAME = new QName( - "properties", ODATA_METADATA_NS); -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyOptionType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyOptionType.java deleted file mode 100644 index 4d0eb6f54e83..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyOptionType.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; - -@XmlAccessorType(XmlAccessType.FIELD) -public class ContentKeyAuthorizationPolicyOptionType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "KeyDeliveryType", namespace = Constants.ODATA_DATA_NS) - private int keyDeliveryType; - - @XmlElement(name = "KeyDeliveryConfiguration", namespace = Constants.ODATA_DATA_NS) - private String keyDeliveryConfiguration; - - @XmlElementWrapper(name = "Restrictions", namespace = Constants.ODATA_DATA_NS) - @XmlElement(name = "element", namespace = Constants.ODATA_DATA_NS) - private List restrictions; - - public String getId() { - return id; - } - - public ContentKeyAuthorizationPolicyOptionType setId(String id) { - this.id = id; - return this; - } - - public String getName() { - return name; - } - - public ContentKeyAuthorizationPolicyOptionType setName(String name) { - this.name = name; - return this; - } - - public int getKeyDeliveryType() { - return keyDeliveryType; - } - - public ContentKeyAuthorizationPolicyOptionType setKeyDeliveryType(int keyDeliveryType) { - this.keyDeliveryType = keyDeliveryType; - return this; - } - - public String getKeyDeliveryConfiguration() { - return keyDeliveryConfiguration; - } - - public ContentKeyAuthorizationPolicyOptionType setKeyDeliveryConfiguration(String keyDeliveryConfiguration) { - this.keyDeliveryConfiguration = keyDeliveryConfiguration; - return this; - } - - public List getRestrictions() { - return restrictions; - } - - public ContentKeyAuthorizationPolicyOptionType setRestrictions( - List restrictions) { - this.restrictions = restrictions; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyRestrictionType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyRestrictionType.java deleted file mode 100644 index 89d592c22429..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyRestrictionType.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -@XmlAccessorType(XmlAccessType.FIELD) -public class ContentKeyAuthorizationPolicyRestrictionType implements MediaServiceDTO { - - /** The name. */ - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - /** The KeyRestrictionType. */ - @XmlElement(name = "KeyRestrictionType", namespace = Constants.ODATA_DATA_NS) - private int keyRestrictionType; - - /** The KeyRestrictionType. */ - @XmlElement(name = "Requirements", namespace = Constants.ODATA_DATA_NS) - private String requirements; - - public String getName() { - return name; - } - - public ContentKeyAuthorizationPolicyRestrictionType setName(String name) { - this.name = name; - return this; - } - - public int getKeyRestrictionType() { - return keyRestrictionType; - } - - public ContentKeyAuthorizationPolicyRestrictionType setKeyRestrictionType(int keyRestrictionType) { - this.keyRestrictionType = keyRestrictionType; - return this; - } - - public String getRequirements() { - return requirements; - } - - public ContentKeyAuthorizationPolicyRestrictionType setRequirements(String requirements) { - this.requirements = requirements; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyType.java deleted file mode 100644 index 8bc56b024c0d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyAuthorizationPolicyType.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -@XmlAccessorType(XmlAccessType.FIELD) -public class ContentKeyAuthorizationPolicyType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - /** - * @return the id - */ - public String getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public ContentKeyAuthorizationPolicyType setId(String id) { - this.id = id; - return this; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name - * the name to set - */ - public ContentKeyAuthorizationPolicyType setName(String name) { - this.name = name; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyRestType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyRestType.java deleted file mode 100644 index 79dc66e11e41..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ContentKeyRestType.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for Asset - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class ContentKeyRestType implements MediaServiceDTO { - - /** The id. */ - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - /** The created. */ - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - /** The last modified. */ - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - /** The content key type. */ - @XmlElement(name = "ContentKeyType", namespace = Constants.ODATA_DATA_NS) - private Integer contentKeyType; - - /** The encrypted content key. */ - @XmlElement(name = "EncryptedContentKey", namespace = Constants.ODATA_DATA_NS) - private String encryptedContentKey; - - /** The name. */ - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - /** The protection key id. */ - @XmlElement(name = "ProtectionKeyId", namespace = Constants.ODATA_DATA_NS) - private String protectionKeyId; - - /** The protection key type. */ - @XmlElement(name = "ProtectionKeyType", namespace = Constants.ODATA_DATA_NS) - private Integer protectionKeyType; - - /** The checksum. */ - @XmlElement(name = "Checksum", namespace = Constants.ODATA_DATA_NS) - private String checksum; - - /** The authorization policy id . */ - @XmlElement(name = "AuthorizationPolicyId", namespace = Constants.ODATA_DATA_NS) - private String authorizationPolicyId; - - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return id; - } - - /** - * Sets the id. - * - * @param id - * the id to set - * @return the content key rest type - */ - public ContentKeyRestType setId(String id) { - this.id = id; - return this; - } - - /** - * Gets the created. - * - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * Sets the created. - * - * @param created - * the created to set - * @return the content key rest type - */ - public ContentKeyRestType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * Gets the last modified. - * - * @return the lastModified - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Sets the last modified. - * - * @param lastModified - * the lastModified to set - * @return the content key rest type - */ - public ContentKeyRestType setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * Gets the content key type. - * - * @return the content key type - */ - public Integer getContentKeyType() { - return contentKeyType; - } - - /** - * Sets the content key type. - * - * @param contentKeyType - * the new content key type - * @return the content key rest type - */ - public ContentKeyRestType setContentKeyType(Integer contentKeyType) { - this.contentKeyType = contentKeyType; - return this; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Sets the name. - * - * @param name - * the name to set - * @return the content key rest type - */ - public ContentKeyRestType setName(String name) { - this.name = name; - return this; - } - - /** - * Sets the checksum. - * - * @param checksum - * the new checksum - * @return the content key rest type - */ - public ContentKeyRestType setChecksum(String checksum) { - this.checksum = checksum; - return this; - } - - /** - * Gets the checksum. - * - * @return the checksum - */ - public String getChecksum() { - return this.checksum; - } - - /** - * Sets the protection key type. - * - * @param protectionKeyType - * the new protection key type - * @return the content key rest type - */ - public ContentKeyRestType setProtectionKeyType(Integer protectionKeyType) { - this.protectionKeyType = protectionKeyType; - return this; - } - - /** - * Gets the protection key type. - * - * @return the protection key type - */ - public Integer getProtectionKeyType() { - return this.protectionKeyType; - } - - /** - * Sets the protection key id. - * - * @param protectionKeyId - * the new protection key id - * @return the content key rest type - */ - public ContentKeyRestType setProtectionKeyId(String protectionKeyId) { - this.protectionKeyId = protectionKeyId; - return this; - } - - /** - * Gets the protection key id. - * - * @return the protection key id - */ - public String getProtectionKeyId() { - return this.protectionKeyId; - } - - /** - * Sets the encrypted content key. - * - * @param encryptedContentKey - * the encrypted content key - * @return the content key rest type - */ - public ContentKeyRestType setEncryptedContentKey(String encryptedContentKey) { - this.encryptedContentKey = encryptedContentKey; - return this; - } - - /** - * Gets the encrypted content key. - * - * @return the encrypted content key - */ - public String getEncryptedContentKey() { - return this.encryptedContentKey; - } - - - /** - * Sets the authorization policy id. - * - * @param authorizationPolicyId - * the authorization policy id - * @return the content key rest type - */ - public ContentKeyRestType setAuthorizationPolicyId(String authorizationPolicyId) { - this.authorizationPolicyId = authorizationPolicyId; - return this; - } - - /** - * Gets the the authorization policy id. - * - * @return the authorization policy id - */ - public String getAuthorizationPolicyId() { - return authorizationPolicyId; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/CrossSiteAccessPoliciesType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/CrossSiteAccessPoliciesType.java deleted file mode 100644 index 3e4165a6694b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/CrossSiteAccessPoliciesType.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -@XmlAccessorType(XmlAccessType.FIELD) -public class CrossSiteAccessPoliciesType { - - @XmlElement(name = "ClientAccessPolicy", namespace = Constants.ODATA_DATA_NS) - private String clientAccessPolicy; - - @XmlElement(name = "CrossDomainPolicy", namespace = Constants.ODATA_DATA_NS) - private String crossDomainPolicy; - - public String getClientAccessPolicy() { - return clientAccessPolicy; - } - - public void setClientAccessPolicy(String clientAccessPolicy) { - this.clientAccessPolicy = clientAccessPolicy; - } - - public String getCrossDomainPolicy() { - return crossDomainPolicy; - } - - public void setCrossDomainPolicy(String crossDomainPolicy) { - this.crossDomainPolicy = crossDomainPolicy; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/EncodingReservedUnitRestType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/EncodingReservedUnitRestType.java deleted file mode 100644 index bab01b35b10c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/EncodingReservedUnitRestType.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * Wrapper DTO for Media Services access policies. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class EncodingReservedUnitRestType implements MediaServiceDTO { - - @XmlElement(name = "AccountId", namespace = Constants.ODATA_DATA_NS) - private String accountId; - - @XmlElement(name = "ReservedUnitType", namespace = Constants.ODATA_DATA_NS) - private int reservedUnitType; - - @XmlElement(name = "MaxReservableUnits", namespace = Constants.ODATA_DATA_NS) - private Integer maxReservableUnits; - - @XmlElement(name = "CurrentReservedUnits", namespace = Constants.ODATA_DATA_NS) - private int currentReservedUnits; - - /** - * @return the accountId - */ - public String getAccountId() { - return accountId; - } - - /** - * @param accountId the accountId to set - */ - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - /** - * @return the reservedUnitType - */ - public int getReservedUnitType() { - return reservedUnitType; - } - - /** - * @param reservedUnitType the reservedUnitType to set - */ - public void setReservedUnitType(int reservedUnitType) { - this.reservedUnitType = reservedUnitType; - } - - /** - * @return the maxReservableUnits - */ - public int getMaxReservableUnits() { - return maxReservableUnits; - } - - /** - * @param maxReservableUnits the maxReservableUnits to set - */ - public void setMaxReservableUnits(int maxReservableUnits) { - this.maxReservableUnits = maxReservableUnits; - } - - /** - * @return the currentReservedUnits - */ - public int getCurrentReservedUnits() { - return currentReservedUnits; - } - - /** - * @param currentReservedUnits the currentReservedUnits to set - */ - public void setCurrentReservedUnits(int currentReservedUnits) { - this.currentReservedUnits = currentReservedUnits; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ErrorDetailType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ErrorDetailType.java deleted file mode 100644 index cbb6a32bb6cb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ErrorDetailType.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for - * ErrorDetail entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class ErrorDetailType implements MediaServiceDTO { - - /** The code. */ - @XmlElement(name = "Code", namespace = Constants.ODATA_DATA_NS) - private String code; - - /** The message. */ - @XmlElement(name = "Message", namespace = Constants.ODATA_DATA_NS) - private String message; - - /** - * Gets the code. - * - * @return the code - */ - public String getCode() { - return code; - } - - /** - * Sets the code. - * - * @param code - * the id to set - * @return the error detail type - */ - public ErrorDetailType setCode(String code) { - this.code = code; - return this; - } - - /** - * Gets the message. - * - * @return the message - */ - public String getMessage() { - return message; - } - - /** - * Sets the message. - * - * @param message - * the message to set - * @return the error detail type - */ - public ErrorDetailType setMessage(String message) { - this.message = message; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ErrorType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ErrorType.java deleted file mode 100644 index f736fabe3605..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ErrorType.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for - * ErrorDetail entities. - * - */ - -@XmlRootElement(name = "error", namespace = Constants.ODATA_METADATA_NS) -@XmlAccessorType(XmlAccessType.FIELD) -public class ErrorType { - - /** The code. */ - @XmlElement(name = "code", namespace = Constants.ODATA_METADATA_NS) - private String code; - - /** The message. */ - @XmlElement(name = "message", namespace = Constants.ODATA_METADATA_NS) - private String message; - - /** - * Gets the code. - * - * @return the code - */ - public String getCode() { - return code; - } - - /** - * Sets the code. - * - * @param code - * the id to set - * @return the error type - */ - public ErrorType setCode(String code) { - this.code = code; - return this; - } - - /** - * Gets the message. - * - * @return the message - */ - public String getMessage() { - return message; - } - - /** - * Sets the message. - * - * @param message - * the message to set - * @return the error type - */ - public ErrorType setMessage(String message) { - this.message = message; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/IPAccessControlType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/IPAccessControlType.java deleted file mode 100644 index 3c288be62aed..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/IPAccessControlType.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; - -@XmlAccessorType(XmlAccessType.FIELD) -public class IPAccessControlType { - - @XmlElementWrapper(name = "Allow", namespace = Constants.ODATA_DATA_NS) - @XmlElement(name = "element", namespace = Constants.ODATA_DATA_NS) - private List ipRange; - - public List getIpRange() { - return ipRange; - } - - public void setIpRange(List ipRange) { - this.ipRange = ipRange; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/IPRangeType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/IPRangeType.java deleted file mode 100644 index 0ff87d89d4f5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/IPRangeType.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -@XmlAccessorType(XmlAccessType.FIELD) -public class IPRangeType { - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "Address", namespace = Constants.ODATA_DATA_NS) - private String address; - - @XmlElement(name = "SubnetPrefixLength", namespace = Constants.ODATA_DATA_NS) - private int subnetPrefixLength; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - public int getSubnetPrefixLength() { - return subnetPrefixLength; - } - - public void setSubnetPrefixLength(int subnetPrefixLength) { - this.subnetPrefixLength = subnetPrefixLength; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobNotificationSubscriptionType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobNotificationSubscriptionType.java deleted file mode 100644 index f2df8847e70e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobNotificationSubscriptionType.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for job - * notification subscription. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class JobNotificationSubscriptionType implements MediaServiceDTO { - - /** The ID of the notification end point. */ - @XmlElement(name = "NotificationEndPointId", namespace = Constants.ODATA_DATA_NS) - private String notificationEndPointId; - - /** The target state of the job. */ - @XmlElement(name = "TargetJobState", namespace = Constants.ODATA_DATA_NS) - private int targetJobState; - - /** - * Gets the ID of the notification end point. - * - * @return the ID of the notification end point. - */ - public String getNotificationEndPointId() { - return this.notificationEndPointId; - } - - /** - * Sets the ID of the notification end point. - * - * @param notificationEndPointId - * the ID of the notification end point to set - * @return the job notification subscription type - */ - public JobNotificationSubscriptionType setNotificationEndPointId( - String notificationEndPointId) { - this.notificationEndPointId = notificationEndPointId; - return this; - } - - /** - * Gets the target job state. - * - * @return an integer representing the target job state. - */ - public int getTargetJobState() { - return targetJobState; - } - - /** - * Sets the target job state. - * - * @param targetJobState - * the target job state - * @return the target job state - */ - public JobNotificationSubscriptionType setTargetJobState(int targetJobState) { - this.targetJobState = targetJobState; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobType.java deleted file mode 100644 index c3661b7b9ae6..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobType.java +++ /dev/null @@ -1,315 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; - -/** - * This type maps the XML returned in the odata ATOM serialization for Job - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class JobType implements MediaServiceDTO { - - /** The id. */ - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - /** The job notification subscriptions. */ - @XmlElementWrapper(name = "JobNotificationSubscriptions", namespace = Constants.ODATA_DATA_NS) - @XmlElement(name = "element", namespace = Constants.ODATA_DATA_NS) - private List jobNotificationSubscriptionTypes; - - /** The name. */ - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - /** The created. */ - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - /** The last modified. */ - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - /** The end time. */ - @XmlElement(name = "EndTime", namespace = Constants.ODATA_DATA_NS) - private Date endTime; - - /** The priority. */ - @XmlElement(name = "Priority", namespace = Constants.ODATA_DATA_NS) - private Integer priority; - - /** The running duration. */ - @XmlElement(name = "RunningDuration", namespace = Constants.ODATA_DATA_NS) - private Double runningDuration; - - /** The start time. */ - @XmlElement(name = "StartTime", namespace = Constants.ODATA_DATA_NS) - private Date startTime; - - /** The state. */ - @XmlElement(name = "State", namespace = Constants.ODATA_DATA_NS) - private Integer state; - - /** The template id. */ - @XmlElement(name = "TemplateId", namespace = Constants.ODATA_DATA_NS) - private String templateId; - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return id; - } - - /** - * Sets the id. - * - * @param id - * the new id - * @return the job type - */ - public JobType setId(String id) { - this.id = id; - return this; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Sets the name. - * - * @param name - * the new name - * @return the job type - */ - public JobType setName(String name) { - this.name = name; - return this; - } - - /** - * Gets the created. - * - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * Sets the created. - * - * @param created - * the new created - * @return the job type - */ - public JobType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * Gets the last modified. - * - * @return the last modified - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Sets the last modified. - * - * @param lastModified - * the new last modified - * @return the job type - */ - public JobType setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * Gets the end time. - * - * @return the end time - */ - public Date getEndTime() { - return endTime; - } - - /** - * Sets the end time. - * - * @param endTime - * the new end time - * @return the job type - */ - public JobType setEndTime(Date endTime) { - this.endTime = endTime; - return this; - } - - /** - * Gets the priority. - * - * @return the priority - */ - public Integer getPriority() { - return priority; - } - - /** - * Sets the priority. - * - * @param priority - * the new priority - * @return the job type - */ - public JobType setPriority(Integer priority) { - this.priority = priority; - return this; - } - - /** - * Gets the running duration. - * - * @return the running duration - */ - public Double getRunningDuration() { - return runningDuration; - } - - /** - * Sets the running duration. - * - * @param runningDuration - * the new running duration - * @return the job type - */ - public JobType setRunningDuration(Double runningDuration) { - this.runningDuration = runningDuration; - return this; - } - - /** - * Gets the start time. - * - * @return the start time - */ - public Date getStartTime() { - return startTime; - } - - /** - * Sets the start time. - * - * @param startTime - * the new start time - * @return the job type - */ - public JobType setStartTime(Date startTime) { - this.startTime = startTime; - return this; - } - - /** - * Gets the state. - * - * @return the state - */ - public Integer getState() { - return state; - } - - /** - * Sets the state. - * - * @param state - * the new state - * @return the job type - */ - public JobType setState(Integer state) { - this.state = state; - return this; - } - - /** - * Gets the template id. - * - * @return the template id - */ - public String getTemplateId() { - return templateId; - } - - /** - * Sets the template id. - * - * @param templateId - * the new template id - * @return the job type - */ - public JobType setTemplateId(String templateId) { - this.templateId = templateId; - return this; - } - - /** - * Gets the job notification subscriptions. - * - * @return the job notification subscriptions - */ - public List getJobNotificationSubscriptionTypes() { - return this.jobNotificationSubscriptionTypes; - } - - /** - * Adds the job notification subscription type. - * - * @param jobNotificationSubscription - * the job notification subscription - * @return the job type - */ - public JobType addJobNotificationSubscriptionType( - JobNotificationSubscriptionType jobNotificationSubscription) { - if (this.jobNotificationSubscriptionTypes == null) { - this.jobNotificationSubscriptionTypes = new ArrayList(); - } - this.jobNotificationSubscriptionTypes.add(jobNotificationSubscription); - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/LocatorRestType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/LocatorRestType.java deleted file mode 100644 index f010311c73bb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/LocatorRestType.java +++ /dev/null @@ -1,256 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * Wrapper DTO for Media Services Locator. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class LocatorRestType implements MediaServiceDTO { - - /** The id. */ - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - /** The expiration date time. */ - @XmlElement(name = "ExpirationDateTime", namespace = Constants.ODATA_DATA_NS) - private Date expirationDateTime; - - /** The type. */ - @XmlElement(name = "Type", namespace = Constants.ODATA_DATA_NS) - private Integer type; - - /** The path. */ - @XmlElement(name = "Path", namespace = Constants.ODATA_DATA_NS) - private String path; - - /** The access policy id. */ - @XmlElement(name = "AccessPolicyId", namespace = Constants.ODATA_DATA_NS) - private String accessPolicyId; - - /** The asset id. */ - @XmlElement(name = "AssetId", namespace = Constants.ODATA_DATA_NS) - private String assetId; - - /** The start time. */ - @XmlElement(name = "StartTime", namespace = Constants.ODATA_DATA_NS) - private Date startTime; - - /** The base uri. */ - @XmlElement(name = "BaseUri", namespace = Constants.ODATA_DATA_NS) - private String baseUri; - - /** The content access component. */ - @XmlElement(name = "ContentAccessComponent", namespace = Constants.ODATA_DATA_NS) - private String contentAccessComponent; - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return id; - } - - /** - * Sets the id. - * - * @param id - * the id to set - * @return the locator rest type - */ - public LocatorRestType setId(String id) { - this.id = id; - return this; - } - - /** - * Gets the expiration date time. - * - * @return the expiration date time - */ - public Date getExpirationDateTime() { - return expirationDateTime; - } - - /** - * Sets the expiration date time. - * - * @param expirationDateTime - * the expiration date time - * @return the locator rest type - */ - public LocatorRestType setExpirationDateTime(Date expirationDateTime) { - this.expirationDateTime = expirationDateTime; - return this; - } - - /** - * Gets the type. - * - * @return the type - */ - public Integer getType() { - return this.type; - } - - /** - * Sets the type. - * - * @param type - * the type - * @return the locator rest type - */ - public LocatorRestType setType(Integer type) { - this.type = type; - return this; - } - - /** - * Gets the access policy id. - * - * @return the access policy id - */ - public String getAccessPolicyId() { - return this.accessPolicyId; - } - - /** - * Sets the access policy id. - * - * @param accessPolicyId - * the access policy id - * @return the locator rest type - */ - public LocatorRestType setAccessPolicyId(String accessPolicyId) { - this.accessPolicyId = accessPolicyId; - return this; - } - - /** - * Gets the asset id. - * - * @return the asset id - */ - public String getAssetId() { - return this.assetId; - } - - /** - * Sets the asset id. - * - * @param assetId - * the asset id - * @return the locator rest type - */ - public LocatorRestType setAssetId(String assetId) { - this.assetId = assetId; - return this; - } - - /** - * Gets the start time. - * - * @return the start time - */ - public Date getStartTime() { - return this.startTime; - } - - /** - * Sets the start time. - * - * @param startTime - * the start time - * @return the locator rest type - */ - public LocatorRestType setStartTime(Date startTime) { - this.startTime = startTime; - return this; - } - - /** - * Gets the path. - * - * @return the path - */ - public String getPath() { - return this.path; - } - - /** - * Sets the path. - * - * @param path - * the path - * @return the locator rest type - */ - public LocatorRestType setPath(String path) { - this.path = path; - return this; - } - - /** - * Gets the base uri. - * - * @return the base uri - */ - public String getBaseUri() { - return this.baseUri; - } - - /** - * Sets the base uri. - * - * @param baseUri - * the base uri - * @return the locator rest type - */ - public LocatorRestType setBaseUri(String baseUri) { - this.baseUri = baseUri; - return this; - } - - /** - * Gets the content access component. - * - * @return the content access component - */ - public String getContentAccessComponent() { - return this.contentAccessComponent; - } - - /** - * Sets the content access component. - * - * @param contentAccessComponent - * the content access component - * @return the locator rest type - */ - public LocatorRestType setContentAccessComponent( - String contentAccessComponent) { - this.contentAccessComponent = contentAccessComponent; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaProcessorType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaProcessorType.java deleted file mode 100644 index 809707af4117..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaProcessorType.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for Asset - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class MediaProcessorType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "Description", namespace = Constants.ODATA_DATA_NS) - private String description; - - @XmlElement(name = "Sku", namespace = Constants.ODATA_DATA_NS) - private String sku; - - @XmlElement(name = "Vendor", namespace = Constants.ODATA_DATA_NS) - private String vendor; - - @XmlElement(name = "Version", namespace = Constants.ODATA_DATA_NS) - private String version; - - /** - * @return the id - */ - public String getId() { - return id; - } - - /** - * @param id - * the id to set - */ - public MediaProcessorType setId(String id) { - this.id = id; - return this; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name - * the name to set - */ - public MediaProcessorType setName(String name) { - this.name = name; - return this; - } - - public String getDescription() { - return this.description; - } - - public MediaProcessorType setDescription(String description) { - this.description = description; - return this; - } - - public String getSku() { - return this.sku; - } - - public MediaProcessorType setSku(String sku) { - this.sku = sku; - return this; - } - - public String getVendor() { - return vendor; - } - - public MediaProcessorType setVendor(String vendor) { - this.vendor = vendor; - return this; - } - - public String getVersion() { - return this.version; - } - - public MediaProcessorType setVersion(String version) { - this.version = version; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaServiceDTO.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaServiceDTO.java deleted file mode 100644 index 588e613ec096..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaServiceDTO.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -/** - * Marker interface to mark types as a data transfer object to or from Media - * Services. - * - * This is a marker interface rather than an annotation so that it can be used - * as a generic type parameter or restriction. - * - */ -public interface MediaServiceDTO { - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaUriType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaUriType.java deleted file mode 100644 index 682cbddbec10..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/MediaUriType.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlValue; - -/** - * This type maps the URI. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "uri", namespace = Constants.ODATA_DATA_NS) -public class MediaUriType implements MediaServiceDTO { - @XmlValue - private String uri; - - /** - * @return the uri. - */ - public String getUri() { - return uri; - } - - /** - * @param uri - * uri the uri to set - */ - public void setUri(String uri) { - this.uri = uri; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/NotificationEndPointType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/NotificationEndPointType.java deleted file mode 100644 index 99a129354dbd..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/NotificationEndPointType.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * The type of notification end point. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "NotificationEndPointType", namespace = Constants.ODATA_DATA_NS) -public class NotificationEndPointType implements MediaServiceDTO { - - /** The id. */ - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - /** The name. */ - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - /** The created. */ - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - /** The end point type. */ - @XmlElement(name = "EndPointType", namespace = Constants.ODATA_DATA_NS) - private int endPointType; - - /** The end point address. */ - @XmlElement(name = "EndPointAddress", namespace = Constants.ODATA_DATA_NS) - private String endPointAddress; - - /** - * Gets the id. - * - * @return the id. - */ - public String getId() { - return id; - } - - /** - * Sets the id. - * - * @param id - * id the id to set - * @return the notification end point type - */ - public NotificationEndPointType setId(String id) { - this.id = id; - return this; - } - - /** - * Gets the name. - * - * @return the name. - */ - public String getName() { - return name; - } - - /** - * Sets the name. - * - * @param name - * name the name to set - * @return the notification end point type - */ - public NotificationEndPointType setName(String name) { - this.name = name; - return this; - } - - /** - * Gets the created. - * - * @return the created - */ - public Date getCreated() { - return this.created; - } - - /** - * Sets the created. - * - * @param created - * the created - * @return the notification end point type - */ - public NotificationEndPointType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * Gets the end point type. - * - * @return the end point type - */ - public int getEndPointType() { - return this.endPointType; - } - - /** - * Sets the end point type. - * - * @param endpointType - * the endpoint type - * @return the notification end point type - */ - public NotificationEndPointType setEndPointType(int endpointType) { - this.endPointType = endpointType; - return this; - } - - /** - * Gets the end point address. - * - * @return the end point address - */ - public String getEndPointAddress() { - return this.endPointAddress; - } - - /** - * Sets the end point address. - * - * @param endpointAddress - * the endpoint address - * @return the notification end point type - */ - public NotificationEndPointType setEndPointAddress(String endpointAddress) { - this.endPointAddress = endpointAddress; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ODataActionType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ODataActionType.java deleted file mode 100644 index f8f81e75da8e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ODataActionType.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; - -/** - * XML Serialization class for odata m:action elements - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class ODataActionType { - - @XmlAttribute(required = true) - private String metadata; - - @XmlAttribute(required = true) - private String target; - - @XmlAttribute(required = true) - private String title; - - /** - * Get metadata - * - * @return the metadata - */ - public String getMetadata() { - return metadata; - } - - /** - * Set metadata - * - * @param metadata - */ - public void setMetadata(String metadata) { - this.metadata = metadata; - } - - /** - * Get target - * - * @return the target - */ - public String getTarget() { - return target; - } - - /** - * set target - * - * @param target - */ - public void setTarget(String target) { - this.target = target; - } - - /** - * Get title - * - * @return the title - */ - public String getTitle() { - return title; - } - - /** - * set title - * - * @param title - */ - public void setTitle(String title) { - this.title = title; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ObjectFactory.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ObjectFactory.java deleted file mode 100644 index e085840222ff..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ObjectFactory.java +++ /dev/null @@ -1,236 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlRegistry; - -/** - * Class used by JAXB to instantiate the types in this package. - * - */ -@XmlRegistry -public class ObjectFactory { - - /** - * Create a new ObjectFactory that can be used to create new instances of - * schema derived classes for package: - * com.microsoft.windowsazure.services.media.implementation.atom - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link AssetType }. - * - * @return a new AssetType instance. - */ - public AssetType createAssetType() { - return new AssetType(); - } - - /** - * Create an instance of {@link ODataActionType }. - * - * @return a new ODataActionType instance. - */ - public ODataActionType createODataActionType() { - return new ODataActionType(); - } - - /** - * Create an instance of {@link AccessPolicyType }. - * - * @return a new AccessPolicyType instance. - */ - public AccessPolicyType createAccessPolicyType() { - return new AccessPolicyType(); - } - - /** - * Create an instance of {@link LocatorRestType }. - * - * @return a new LocatorRestType instance. - */ - public LocatorRestType createLocatorRestType() { - return new LocatorRestType(); - } - - /** - * Create an instance of {@link MediaProcessorType }. - * - * @return a new MediaProcessorType instance. - */ - public MediaProcessorType createMediaProcessorType() { - return new MediaProcessorType(); - } - - /** - * Create an instance of {@link JobType}. - * - * @return a new JobType instance. - */ - public JobType createJobType() { - return new JobType(); - } - - /** - * Create an instance of {@link TaskType}. - * - * @return a new TaskType instance. - */ - public TaskType createTaskType() { - return new TaskType(); - } - - /** - * Creates a new Object object. - * - * @return the content key rest type - */ - public ContentKeyRestType createContentKeyRestType() { - return new ContentKeyRestType(); - } - - /** - * Create an instance of {@link AssetFileType}. - * - * @return a new AssetFileType instance. - */ - public AssetFileType createAssetFileType() { - return new AssetFileType(); - } - - /** - * Creates an instance of (@link RebindContentKeyType). - * - * @return the rebind content key type instance. - */ - public RebindContentKeyType createRebindContentKeyType() { - return new RebindContentKeyType(); - } - - /** - * Creates an instance of (@link ChannelType). - * - * @return the channel type. - */ - public ChannelType createChannelType() { - return new ChannelType(); - } - - /** - * Creates an instance of (@link JobNotificationSubscriptionType). - * - * @return the job notification subscription type. - */ - public JobNotificationSubscriptionType createJobNotificationSubscriptionType() { - return new JobNotificationSubscriptionType(); - } - - /** - * Creates an instance of (@link NotificationEndPointType). - * - * @return the notification end point type. - */ - public NotificationEndPointType createNotificationEndPointType() { - return new NotificationEndPointType(); - } - - /** - * Creates an instance of (@link OperationType). - * - * @return the operation type - */ - public OperationType createOperationType() { - return new OperationType(); - } - - /** - * Creates a instance of (@link @ProgramType). - * - * @return the program type - */ - public ProgramType createProgramType() { - return new ProgramType(); - } - - /** - * Creates a instance of (@link ContentKeyAuthorizationPolicyOptionType). - * - * @return the content key authorization policy option type - */ - public ContentKeyAuthorizationPolicyOptionType createContentKeyAuthorizationPolicyOptionType() { - return new ContentKeyAuthorizationPolicyOptionType(); - } - - /** - * Creates a instance of (@link ContentKeyAuthorizationPolicyRestrictionType). - * - * @return the content key authorization policy restriction type - */ - public ContentKeyAuthorizationPolicyRestrictionType createContentKeyAuthorizationPolicyRestrictionType() { - return new ContentKeyAuthorizationPolicyRestrictionType(); - } - - /** - * Creates a instance of (@link ContentKeyAuthorizationPolicyType). - * - * @return the content key authorization policy type - */ - public ContentKeyAuthorizationPolicyType createContentKeyAuthorizationPolicyType() { - return new ContentKeyAuthorizationPolicyType(); - } - - /** - * Creates a instance of (@link AssetDeliveryPolicyType). - * - * @return the asset delivery policy type - */ - public AssetDeliveryPolicyRestType createAssetDeliveryPolicyType() { - return new AssetDeliveryPolicyRestType(); - } - - - /** - * Creates a instance of (@link StreamingEndpointType). - * - * @return the streaming endpoint type - */ - public StreamingEndpointType createStreamingEndpointType() { - return new StreamingEndpointType(); - } - - /** - * Creates a instance of (@link EncodingReservedUnitType). - * - * @return the encoding reserved unit type - */ - public EncodingReservedUnitRestType createEncodingReservedUnitType() { - return new EncodingReservedUnitRestType(); - } - - /** - * Creates a instance of (@link StorageAccountType). - * - * @return the storage account type - */ - public StorageAccountType createStorageAccountType() { - return new StorageAccountType(); - } - - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/OperationType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/OperationType.java deleted file mode 100644 index 3ace5b3903cb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/OperationType.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for operation - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class OperationType implements MediaServiceDTO { - - /** The id. */ - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - /** The target entity id. */ - @XmlElement(name = "TargetEntityId", namespace = Constants.ODATA_DATA_NS) - private String targetEntityId; - - /** The state. */ - @XmlElement(name = "State", namespace = Constants.ODATA_DATA_NS) - private String state; - - /** The error code. */ - @XmlElement(name = "ErrorCode", namespace = Constants.ODATA_DATA_NS) - private String errorCode; - - /** The error message. */ - @XmlElement(name = "ErrorMessage", namespace = Constants.ODATA_DATA_NS) - private String errorMessage; - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return id; - } - - /** - * Sets the id. - * - * @param id - * the id to set - * @return the operation type - */ - public OperationType setId(String id) { - this.id = id; - return this; - } - - /** - * Gets the target entity id. - * - * @return the target entity id - */ - public String getTargetEntityId() { - return targetEntityId; - } - - /** - * Sets the target entity id. - * - * @param targetEntityId - * the target entity id - * @return the operation type - */ - public OperationType setTargetEntityId(String targetEntityId) { - this.targetEntityId = targetEntityId; - return this; - } - - /** - * Gets the state. - * - * @return the state - */ - public String getState() { - return state; - } - - /** - * Sets the state. - * - * @param state - * the state to set - * @return the operation type - */ - public OperationType setState(String state) { - this.state = state; - return this; - } - - /** - * Gets the error code. - * - * @return the error code - */ - public String getErrorCode() { - return this.errorCode; - } - - /** - * Sets the error code. - * - * @param errorCode - * the error code - * @return the operation type - */ - public OperationType setErrorCode(String errorCode) { - this.errorCode = errorCode; - return this; - } - - /** - * Gets the error message. - * - * @return the error message - */ - public String getErrorMessage() { - return this.errorMessage; - } - - /** - * Sets the error message. - * - * @param errorMessage - * the error message - * @return the operation type - */ - public OperationType setErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProgramType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProgramType.java deleted file mode 100644 index 12bb3aa37b91..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProgramType.java +++ /dev/null @@ -1,296 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for Asset - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class ProgramType implements MediaServiceDTO { - - /** The id. */ - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - /** The name. */ - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - /** The description. */ - @XmlElement(name = "Description", namespace = Constants.ODATA_DATA_NS) - private String description; - - /** The created. */ - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - /** The last modified. */ - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - /** The channel id. */ - @XmlElement(name = "ChannelId", namespace = Constants.ODATA_DATA_NS) - private String channelId; - - /** The asset id. */ - @XmlElement(name = "AssetId", namespace = Constants.ODATA_DATA_NS) - private String assetId; - - /** The dvr window length seconds. */ - @XmlElement(name = "DvrWindowLengthSeconds", namespace = Constants.ODATA_DATA_NS) - private int dvrWindowLengthSeconds; - - /** The estimated duration seconds. */ - @XmlElement(name = "EstimatedDurationSeconds", namespace = Constants.ODATA_DATA_NS) - private int estimatedDurationSeconds; - - /** The enable archive. */ - @XmlElement(name = "EnableArchive", namespace = Constants.ODATA_DATA_NS) - private boolean enableArchive; - - /** The state. */ - @XmlElement(name = "State", namespace = Constants.ODATA_DATA_NS) - private String state; - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return this.id; - } - - /** - * Sets the id. - * - * @param id - * the id - * @return the channel type - */ - public ProgramType setId(String id) { - this.id = id; - return this; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Sets the name. - * - * @param name - * the name to set - * @return the channel type - */ - public ProgramType setName(String name) { - this.name = name; - return this; - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Sets the description. - * - * @param description - * the description - * @return the channel type - */ - public ProgramType setDescription(String description) { - this.description = description; - return this; - } - - /** - * Gets the created. - * - * @return the created - */ - public Date getCreated() { - return created; - } - - /** - * Sets the created. - * - * @param created - * the created - * @return the channel type - */ - public ProgramType setCreated(Date created) { - this.created = created; - return this; - } - - /** - * Gets the last modified. - * - * @return the lastModified - */ - public Date getLastModified() { - return lastModified; - } - - /** - * Sets the last modified. - * - * @param lastModified - * the last modified - * @return the channel type - */ - public ProgramType setLastModified(Date lastModified) { - this.lastModified = lastModified; - return this; - } - - /** - * Sets the state. - * - * @param state - * the state - * @return the channel type - */ - public ProgramType setState(String state) { - this.state = state; - return this; - } - - /** - * Gets the state. - * - * @return the state - */ - public String getState() { - return this.state; - } - - /** - * Gets the channel id. - * - * @return the channel id - */ - public String getChannelId() { - return this.channelId; - } - - /** - * Gets the asset id. - * - * @return the asset id - */ - public String getAssetId() { - return this.assetId; - } - - /** - * Gets the dvr window length seconds. - * - * @return the dvr window length seconds - */ - public int getDvrWindowLengthSeconds() { - return this.dvrWindowLengthSeconds; - } - - /** - * Gets the estimated duration seconds. - * - * @return the estimated duration seconds - */ - public int getEstimatedDurationSeconds() { - return this.estimatedDurationSeconds; - } - - /** - * Checks if is enable archive. - * - * @return true, if is enable archive - */ - public boolean isEnableArchive() { - return this.enableArchive; - } - - /** - * Sets the enable archive. - * - * @param enableArchive - * the new enable archive - */ - public void setEnableArchive(boolean enableArchive) { - this.enableArchive = enableArchive; - } - - /** - * Sets the asset id. - * - * @param assetId - * the new asset id - */ - public void setAssetId(String assetId) { - this.assetId = assetId; - } - - /** - * Sets the channel id. - * - * @param channelId - * the new channel id - */ - public void setChannelId(String channelId) { - this.channelId = channelId; - } - - /** - * Sets the estimated duration seconds. - * - * @param estimatedDurationSeconds - * the new estimated duration seconds - */ - public void setEstimatedDurationSeconds(int estimatedDurationSeconds) { - this.estimatedDurationSeconds = estimatedDurationSeconds; - } - - /** - * Sets the dvr window length seconds. - * - * @param dvrWindowLengthSeconds - * the new dvr window length seconds - */ - public void setDvrWindowLengthSeconds(int dvrWindowLengthSeconds) { - this.dvrWindowLengthSeconds = dvrWindowLengthSeconds; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProtectionKeyIdType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProtectionKeyIdType.java deleted file mode 100644 index c2cd0e429c9c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProtectionKeyIdType.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlValue; - -/** - * This type maps the XML returned in the odata ATOM serialization for Asset - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "GetProtectionKeyId", namespace = Constants.ODATA_DATA_NS) -public class ProtectionKeyIdType implements MediaServiceDTO { - @XmlValue - private String protectionKeyId; - - /** - * @return the protection key id - */ - public String getProtectionKeyId() { - return protectionKeyId; - } - - /** - * @param protection - * key id the protection key id to set - */ - public void setProtectionKeyId(String protectionKeyId) { - this.protectionKeyId = protectionKeyId; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProtectionKeyRestType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProtectionKeyRestType.java deleted file mode 100644 index 855fa9d74bf6..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/ProtectionKeyRestType.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlValue; - -/** - * This type maps the XML returned in protection key. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "GetProtectionKey", namespace = Constants.ODATA_DATA_NS) -public class ProtectionKeyRestType implements MediaServiceDTO { - @XmlValue - private String protectionKey; - - /** - * @return the protection key - */ - public String getProtectionKey() { - return protectionKey; - } - - /** - * @param protection - * key id the protection key id to set - */ - public void setProtectionKey(String protectionKey) { - this.protectionKey = protectionKey; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/RebindContentKeyType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/RebindContentKeyType.java deleted file mode 100644 index 8cdf5c52014d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/RebindContentKeyType.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlValue; - -/** - * The Class RebindContentKeyType. - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "RebindContentKey", namespace = Constants.ODATA_DATA_NS) -public class RebindContentKeyType implements MediaServiceDTO { - - /** The rebind content key. */ - @XmlValue - private String rebindContentKey; - - /** - * Gets the content key. - * - * @return the content key - */ - public String getContentKey() { - return rebindContentKey; - } - - /** - * Sets the content key. - * - * @param rebindContentKey - * the new content key - */ - public void setContentKey(String rebindContentKey) { - this.rebindContentKey = rebindContentKey; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StorageAccountType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StorageAccountType.java deleted file mode 100644 index 34e5426a538d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StorageAccountType.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for StorageAccountType - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class StorageAccountType implements MediaServiceDTO { - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "IsDefault", namespace = Constants.ODATA_DATA_NS) - private boolean isdefault; - - @XmlElement(name = "BytesUsed", namespace = Constants.ODATA_DATA_NS) - private long bytesUsed; - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name the name to set - */ - public void setName(String name) { - this.name = name; - } - - /** - * @return the isdefault - */ - public boolean isDefault() { - return isdefault; - } - - /** - * @param isdefault the isdefault to set - */ - public void setAsDefault(boolean isdefault) { - this.isdefault = isdefault; - } - - /** - * @return the bytesUsed - */ - public long getBytesUsed() { - return bytesUsed; - } - - /** - * @param bytesUsed the bytesUsed to set - */ - public void setBytesUsed(long bytesUsed) { - this.bytesUsed = bytesUsed; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointAccessControlType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointAccessControlType.java deleted file mode 100644 index c27cf3520169..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointAccessControlType.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -@XmlAccessorType(XmlAccessType.FIELD) -public class StreamingEndpointAccessControlType { - - @XmlElement(name = "Akamai", namespace = Constants.ODATA_DATA_NS) - private AkamaiAccessControlType akamai; - - @XmlElement(name = "IP", namespace = Constants.ODATA_DATA_NS) - private IPAccessControlType iP; - - public AkamaiAccessControlType getAkamai() { - return akamai; - } - - public void setAkamai(AkamaiAccessControlType akamai) { - this.akamai = akamai; - } - - public IPAccessControlType getIP() { - return iP; - } - - public void setIP(IPAccessControlType iP) { - this.iP = iP; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointCacheControlType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointCacheControlType.java deleted file mode 100644 index 3d20cb6c5394..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointCacheControlType.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -@XmlAccessorType(XmlAccessType.FIELD) -public class StreamingEndpointCacheControlType { - - @XmlElement(name = "MaxAge", namespace = Constants.ODATA_DATA_NS) - private Integer maxAge; - - public int getMaxAge() { - return maxAge == null ? 0 : maxAge.intValue(); - } - - public void setMaxAge(int maxRange) { - this.maxAge = maxRange; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointType.java deleted file mode 100644 index 4d8e2aa2687a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/StreamingEndpointType.java +++ /dev/null @@ -1,178 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; - - -/** - * This type maps the XML returned in the odata ATOM serialization for Asset - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class StreamingEndpointType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "Description", namespace = Constants.ODATA_DATA_NS) - private String description; - - @XmlElement(name = "Created", namespace = Constants.ODATA_DATA_NS) - private Date created; - - @XmlElement(name = "LastModified", namespace = Constants.ODATA_DATA_NS) - private Date lastModified; - - @XmlElement(name = "State", namespace = Constants.ODATA_DATA_NS) - private String state; - - @XmlElement(name = "HostName", namespace = Constants.ODATA_DATA_NS) - private String hostName; - - @XmlElement(name = "ScaleUnits", namespace = Constants.ODATA_DATA_NS) - private Integer scaleUnits; - - @XmlElement(name = "CdnEnabled", namespace = Constants.ODATA_DATA_NS) - private boolean cdnEnabled; - - @XmlElementWrapper(name = "CustomHostNames", namespace = Constants.ODATA_DATA_NS) - @XmlElement(name = "CustomHostName", namespace = Constants.ODATA_DATA_NS) - private List customHostName; - - @XmlElement(name = "AccessControl", namespace = Constants.ODATA_DATA_NS) - private StreamingEndpointAccessControlType streamingEndpointAccessControl; - - @XmlElement(name = "CacheControl", namespace = Constants.ODATA_DATA_NS) - private StreamingEndpointCacheControlType streamingEndpointCacheControl; - - @XmlElement(name = "CrossSiteAccessPolicies", namespace = Constants.ODATA_DATA_NS) - private CrossSiteAccessPoliciesType crossSiteAccessPolicies; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Date getCreated() { - return created; - } - - public void setCreated(Date created) { - this.created = created; - } - - public Date getLastModified() { - return lastModified; - } - - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public String getHostName() { - return hostName; - } - - public void setHostName(String hostName) { - this.hostName = hostName; - } - - public int getScaleUnits() { - return scaleUnits; - } - - public void setScaleUnits(int scaleUnits) { - this.scaleUnits = scaleUnits; - } - - public List getCustomHostName() { - return customHostName; - } - - public void setCustomHostName(List customHostName) { - this.customHostName = customHostName; - } - - public boolean isCdnEnabled() { - return cdnEnabled; - } - - public void setCdnEnabled(boolean cdnEnabled) { - this.cdnEnabled = cdnEnabled; - } - - public StreamingEndpointAccessControlType getAccessControl() { - return streamingEndpointAccessControl; - } - - public void setAccessControl(StreamingEndpointAccessControlType streamingEndpointAccessControl) { - this.streamingEndpointAccessControl = streamingEndpointAccessControl; - } - - public StreamingEndpointCacheControlType getCacheControl() { - return streamingEndpointCacheControl; - } - - public void setCacheControl(StreamingEndpointCacheControlType streamingEndpointCacheControl) { - this.streamingEndpointCacheControl = streamingEndpointCacheControl; - } - - public CrossSiteAccessPoliciesType getCrossSiteAccessPolicies() { - return crossSiteAccessPolicies; - } - - public void setCrossSiteAccessPolicies(CrossSiteAccessPoliciesType crossSiteAccessPolicies) { - this.crossSiteAccessPolicies = crossSiteAccessPolicies; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/TaskHistoricalEventType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/TaskHistoricalEventType.java deleted file mode 100644 index 90aca8bdfe1e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/TaskHistoricalEventType.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * This type maps the XML returned in the odata ATOM serialization for - * ErrorDetail entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class TaskHistoricalEventType implements MediaServiceDTO { - - /** The code. */ - @XmlElement(name = "Code", namespace = Constants.ODATA_DATA_NS) - private String code; - - /** The message. */ - @XmlElement(name = "Message", namespace = Constants.ODATA_DATA_NS) - private String message; - - /** The time stamp. */ - @XmlElement(name = "TimeStamp", namespace = Constants.ODATA_DATA_NS) - private Date timeStamp; - - /** - * Gets the code. - * - * @return the code - */ - public String getCode() { - return code; - } - - /** - * Sets the code. - * - * @param code - * the id to set - * @return the error detail type - */ - public TaskHistoricalEventType setCode(String code) { - this.code = code; - return this; - } - - /** - * Gets the message. - * - * @return the message - */ - public String getMessage() { - return message; - } - - /** - * Sets the message. - * - * @param message - * the message to set - * @return the error detail type - */ - public TaskHistoricalEventType setMessage(String message) { - this.message = message; - return this; - } - - /** - * Gets the time stamp. - * - * @return the time stamp - */ - public Date getTimeStamp() { - return timeStamp; - } - - /** - * Sets the time stamp. - * - * @param timeStamp - * the time stamp - * @return the task historical event type - */ - public TaskHistoricalEventType setTimeStamp(Date timeStamp) { - this.timeStamp = timeStamp; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/TaskType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/TaskType.java deleted file mode 100644 index 0f53679eb084..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/TaskType.java +++ /dev/null @@ -1,286 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.content; - -import java.util.Date; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; - -/** - * This type maps the XML returned in the odata ATOM serialization for Task - * entities. - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -public class TaskType implements MediaServiceDTO { - - @XmlElement(name = "Id", namespace = Constants.ODATA_DATA_NS) - private String id; - - @XmlElement(name = "Configuration", namespace = Constants.ODATA_DATA_NS) - private String configuration; - - @XmlElement(name = "EndTime", namespace = Constants.ODATA_DATA_NS) - private Date endTime; - - @XmlElementWrapper(name = "ErrorDetails", namespace = Constants.ODATA_DATA_NS) - @XmlElement(name = "element", namespace = Constants.ODATA_DATA_NS) - private List errorDetails; - - @XmlElementWrapper(name = "HistoricalEvents", namespace = Constants.ODATA_DATA_NS) - @XmlElement(name = "element", namespace = Constants.ODATA_DATA_NS) - private List historicalEventTypes; - - @XmlElement(name = "MediaProcessorId", namespace = Constants.ODATA_DATA_NS) - private String mediaProcessorId; - - @XmlElement(name = "Name", namespace = Constants.ODATA_DATA_NS) - private String name; - - @XmlElement(name = "PerfMessage", namespace = Constants.ODATA_DATA_NS) - private String perfMessage; - - @XmlElement(name = "Priority", namespace = Constants.ODATA_DATA_NS) - private Integer priority; - - @XmlElement(name = "Progress", namespace = Constants.ODATA_DATA_NS) - private Double progress; - - @XmlElement(name = "RunningDuration", namespace = Constants.ODATA_DATA_NS) - private Double runningDuration; - - @XmlElement(name = "StartTime", namespace = Constants.ODATA_DATA_NS) - private Date startTime; - - @XmlElement(name = "State", namespace = Constants.ODATA_DATA_NS) - private Integer state; - - @XmlElement(name = "TaskBody", namespace = Constants.ODATA_DATA_NS) - private String taskBody; - - @XmlElement(name = "Options", namespace = Constants.ODATA_DATA_NS) - private Integer options; - - @XmlElement(name = "EncryptionKeyId", namespace = Constants.ODATA_DATA_NS) - private String encryptionKeyId; - - @XmlElement(name = "EncryptionScheme", namespace = Constants.ODATA_DATA_NS) - private String encryptionScheme; - - @XmlElement(name = "EncryptionVersion", namespace = Constants.ODATA_DATA_NS) - private String encryptionVersion; - - @XmlElement(name = "InitializationVector", namespace = Constants.ODATA_DATA_NS) - private String initializationVector; - - private List outputMediaAssets; - - private List inputMediaAssets; - - public String getId() { - return id; - } - - public TaskType setId(String id) { - this.id = id; - return this; - } - - public String getConfiguration() { - return configuration; - } - - public TaskType setConfiguration(String configuration) { - this.configuration = configuration; - return this; - } - - public Date getEndTime() { - return endTime; - } - - public TaskType setEndTime(Date endTime) { - this.endTime = endTime; - return this; - } - - public List getErrorDetails() { - return errorDetails; - } - - public TaskType setErrorDetails(List errorDetails) { - this.errorDetails = errorDetails; - return this; - } - - public String getMediaProcessorId() { - return mediaProcessorId; - } - - public TaskType setMediaProcessorId(String mediaProcessorId) { - this.mediaProcessorId = mediaProcessorId; - return this; - } - - public String getName() { - return name; - } - - public TaskType setName(String name) { - this.name = name; - return this; - } - - public String getPerfMessage() { - return perfMessage; - } - - public TaskType setPerfMessage(String perfMessage) { - this.perfMessage = perfMessage; - return this; - } - - public Integer getPriority() { - return priority; - } - - public TaskType setPriority(Integer priority) { - this.priority = priority; - return this; - } - - public Double getProgress() { - return progress; - } - - public TaskType setProgress(Double progress) { - this.progress = progress; - return this; - } - - public Double getRunningDuration() { - return runningDuration; - } - - public TaskType setRunningDuration(Double runningDuration) { - this.runningDuration = runningDuration; - return this; - } - - public Date getStartTime() { - return startTime; - } - - public TaskType setStartTime(Date startTime) { - this.startTime = startTime; - return this; - } - - public Integer getState() { - return state; - } - - public TaskType setState(Integer state) { - this.state = state; - return this; - } - - public String getTaskBody() { - return taskBody; - } - - public TaskType setTaskBody(String taskBody) { - this.taskBody = taskBody; - return this; - } - - public Integer getOptions() { - return options; - } - - public TaskType setOptions(Integer options) { - this.options = options; - return this; - } - - public String getEncryptionKeyId() { - return encryptionKeyId; - } - - public TaskType setEncryptionKeyId(String encryptionKeyId) { - this.encryptionKeyId = encryptionKeyId; - return this; - } - - public String getEncryptionScheme() { - return encryptionScheme; - } - - public TaskType setEncryptionScheme(String encryptionScheme) { - this.encryptionScheme = encryptionScheme; - return this; - } - - public String getEncryptionVersion() { - return encryptionVersion; - } - - public TaskType setEncryptionVersion(String encryptionVersion) { - this.encryptionVersion = encryptionVersion; - return this; - } - - public String getInitializationVector() { - return initializationVector; - } - - public TaskType setInitializationVector(String initializationVector) { - this.initializationVector = initializationVector; - return this; - } - - public List getOutputMediaAssets() { - return outputMediaAssets; - } - - public TaskType setOutputMediaAssets(List outputMediaAssets) { - this.outputMediaAssets = outputMediaAssets; - return this; - } - - public List getInputMediaAssets() { - return inputMediaAssets; - } - - public TaskType setInputMediaAssets(List inputMediaAssets) { - this.inputMediaAssets = inputMediaAssets; - return this; - } - - public List getHistoricalEventTypes() { - return historicalEventTypes; - } - - public TaskType setHistoricalEventTypes( - List historicalEventTypes) { - this.historicalEventTypes = historicalEventTypes; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/package-info.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/package-info.java deleted file mode 100644 index 1c9ecda9766d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/package-info.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@XmlJavaTypeAdapter(value = ODataDateAdapter.class, type = java.util.Date.class) -package com.microsoft.windowsazure.services.media.implementation.content; - -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.services.media.implementation.ODataDateAdapter; - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/package.html deleted file mode 100644 index e7819f147963..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the media service OData operation class, interface, and utility classes. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/fairplay/FairPlayConfiguration.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/fairplay/FairPlayConfiguration.java deleted file mode 100644 index 9e2ef2c54b9f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/fairplay/FairPlayConfiguration.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.fairplay; - -import java.io.ByteArrayOutputStream; -import java.security.KeyStore; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.microsoft.windowsazure.core.utils.Base64; - -@JsonInclude(JsonInclude.Include.NON_NULL) -public class FairPlayConfiguration { - - private String askId; - - private String fairPlayPfxPasswordId; - - private String fairPlayPfx; - - private String contentEncryptionIV; - - public static String createSerializedFairPlayOptionConfiguration( - KeyStore keyStore, String pfxPassword, String pfxPasswordKeyId, String askId, - String contentIv) { - try { - ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - keyStore.store(outputStream, pfxPassword.toCharArray()); - String certString = Base64.encode(outputStream.toByteArray()); - FairPlayConfiguration config = new FairPlayConfiguration(); - config.askId = askId; - config.contentEncryptionIV = contentIv; - config.fairPlayPfx = certString; - config.fairPlayPfxPasswordId = pfxPasswordKeyId; - ObjectMapper mapper = new ObjectMapper(); - String configuration = mapper.writeValueAsString(config); - - return configuration; - } catch (Throwable t) { - throw new RuntimeException(t); - } - } - - static final char[] HEXARRAY = "0123456789ABCDEF".toCharArray(); - public static String bytesToHex(byte[] bytes) { - char[] hexChars = new char[bytes.length * 2]; - for (int j = 0; j < bytes.length; j++) { - int v = bytes[j] & 0xFF; - hexChars[j * 2] = HEXARRAY[v >>> 4]; - hexChars[j * 2 + 1] = HEXARRAY[v & 0x0F]; - } - return new String(hexChars); - } - - @JsonProperty("ASkId") - public String getASkId() { - return askId; - } - - @JsonProperty("FairPlayPfxPasswordId") - public String getFairPlayPfxPasswordId() { - return fairPlayPfxPasswordId; - } - - @JsonProperty("FairPlayPfx") - public String getFairPlayPfx() { - return fairPlayPfx; - } - - @JsonProperty("ContentEncryptionIV") - public String getContentEncryptionIV() { - return contentEncryptionIV; - }; -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/fairplay/package-info.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/fairplay/package-info.java deleted file mode 100644 index 345253ed44c1..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/fairplay/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.fairplay; diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/AgcAndColorStripeRestriction.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/AgcAndColorStripeRestriction.java deleted file mode 100644 index 995bd36f64bc..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/AgcAndColorStripeRestriction.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AgcAndColorStripeRestriction") -public class AgcAndColorStripeRestriction { - - @XmlElement(name = "ConfigurationData") - private byte configurationData; - - @SuppressWarnings("unused") - private AgcAndColorStripeRestriction() { - } - - public AgcAndColorStripeRestriction(byte configurationData) { - ScmsRestriction.verifyTwoBitConfigurationData(configurationData); - this.configurationData = configurationData; - } - - /** - * @return the configurationData - */ - public byte getConfigurationData() { - return configurationData; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ContentEncryptionKeyFromHeader.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ContentEncryptionKeyFromHeader.java deleted file mode 100644 index 6ea2b47df76e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ContentEncryptionKeyFromHeader.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ContentEncryptionKeyFromHeader") -public class ContentEncryptionKeyFromHeader extends PlayReadyContentKey { - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ContentEncryptionKeyFromKeyIdentifier.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ContentEncryptionKeyFromKeyIdentifier.java deleted file mode 100644 index b26e3460684f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ContentEncryptionKeyFromKeyIdentifier.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import java.security.InvalidParameterException; -import java.util.UUID; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ContentEncryptionKeyFromKeyIdentifier") -public class ContentEncryptionKeyFromKeyIdentifier extends PlayReadyContentKey { - - @XmlElement(name = "KeyIdentifier") - private UUID keyIdentifier; - - public ContentEncryptionKeyFromKeyIdentifier() { - - } - - public ContentEncryptionKeyFromKeyIdentifier(UUID keyIdentifier) { - if (keyIdentifier.equals(new UUID(0L, 0L))) { - throw new InvalidParameterException("keyIdentifier"); - } - - this.keyIdentifier = keyIdentifier; - } - - /** - * @return the keyIdentifier - */ - public UUID getKeyIdentifier() { - return keyIdentifier; - } - - /** - * @param keyIdentifier - * the keyIdentifier to set - */ - public void setKeyIdentifier(UUID keyIdentifier) { - this.keyIdentifier = keyIdentifier; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ErrorMessages.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ErrorMessages.java deleted file mode 100644 index e10337f21242..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ErrorMessages.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -public final class ErrorMessages { - - public static final String UNCOMPRESSED_DIGITAL_AUDIO_OPL_VALUE_ERROR - = "The value can only be set to null, 100, 150, 200, 250, or 300."; - public static final String UNCOMPRESSED_DIGITAL_VIDEO_OPL_VALUE_ERROR - = "The value can only be set to null, 100, 250, 270, or 300."; - public static final String BEGIN_DATE_AND_RELATIVE_BEGIN_DATE_CANNOTBE_SET_SIMULTANEOUSLY_ERROR - = "Set BeginDate or RelativeBeginDate but not both"; - public static final String EXPIRATION_DATE_AND_RELATIVE_EXPIRATION_DATE_CANNOTBE_SET_SIMULTANEOUSLY_ERROR - = "Set ExpirationDate or RelativeExpirationDate but not both"; - public static final String PLAY_READY_PLAY_RIGHT_REQUIRED - = "Each PlayReadyLicenseTemplate in the PlayReadyLicenseResponseTemplate must have a PlayReadyPlayRight"; - public static final String PLAY_READY_CONTENT_KEY_REQUIRED - = "Each PlayReadyLicenseTemplate in the PlayReadyLicenseResponseTemplate must have either a ContentEncryptionKeyFromHeader or a ContentEncryptionKeyFromKeyIdentifier"; - public static final String INVALID_TWO_BIT_CONFIGURATION_DATA - = "ConfigurationData must be 0, 1, 2, or 3"; - public static final String GRACE_PERIOD_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE - = "GracePeriod cannot be set on Non Persistent licenses."; - public static final String FIRST_PLAY_EXPIRATION_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE - = "FirstPlayExpiration cannot be set on the PlayRight of a Non Persistent license."; - public static final String EXPIRATION_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE - = "ExpirationDate cannot be set on Non Persistent licenses."; - public static final String DIGITAL_VIDEO_ONLY_MUTUALLY_EXCLUSIVE_WITH_PASSING_TO_UNKNOWN_OUTPUT_ERROR - = "PlayReady does not allow passing to unknown outputs if the DigitalVideoOnlyContentRestriction is enabled."; - public static final String COMPRESSED_DIGITAL_VIDEO_OPL_VALUE_ERROR - = "The value can only be set to null, 400, or 500."; - public static final String COMPRESSED_DIGITAL_AUDIO_OPL_VALUE_ERROR - = "The value can only be set to null, 100, 150, 200, 250, or 300."; - public static final String BEGIN_DATE_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE - = "BeginDate cannot be set on Non Persistent licenses."; - public static final String AT_LEAST_ONE_LICENSE_TEMPLATE_REQUIRED - = "A PlayReadyLicenseResponseTemplate must have at least one PlayReadyLicenseTemplate"; - public static final String ANALOG_VIDEO_OPL_VALUE_ERROR - = "The value can only be set to null, 100, 150, or 200."; - - private ErrorMessages() { - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ExplicitAnalogTelevisionRestriction.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ExplicitAnalogTelevisionRestriction.java deleted file mode 100644 index e49cddaee34b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ExplicitAnalogTelevisionRestriction.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ExplicitAnalogTelevisionRestriction") -public class ExplicitAnalogTelevisionRestriction { - - @XmlElement(name = "BestEffort") - private boolean bestEffort; - - @XmlElement(name = "ConfigurationData") - private byte configurationData; - - @SuppressWarnings("unused") - private ExplicitAnalogTelevisionRestriction() { - } - - public ExplicitAnalogTelevisionRestriction(boolean bestEffort, byte configurationData) { - ScmsRestriction.verifyTwoBitConfigurationData(configurationData); - this.bestEffort = bestEffort; - this.configurationData = configurationData; - } - - /** - * @return the bestEffort - */ - public boolean isBestEffort() { - return bestEffort; - } - - /** - * @param bestEffort - * the bestEffort to set - * @return this - */ - public ExplicitAnalogTelevisionRestriction setBestEffort(boolean bestEffort) { - this.bestEffort = bestEffort; - return this; - } - - /** - * @return the configurationData - */ - public byte getConfigurationData() { - return configurationData; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/MediaServicesLicenseTemplateSerializer.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/MediaServicesLicenseTemplateSerializer.java deleted file mode 100644 index 9f092460c752..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/MediaServicesLicenseTemplateSerializer.java +++ /dev/null @@ -1,177 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import java.io.File; -import java.io.StringReader; -import java.io.StringWriter; - -import javax.xml.XMLConstants; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; -import javax.xml.validation.Schema; -import javax.xml.validation.SchemaFactory; - -import org.xml.sax.SAXException; - -import com.sun.xml.bind.marshaller.NamespacePrefixMapper; - -public final class MediaServicesLicenseTemplateSerializer { - - private MediaServicesLicenseTemplateSerializer() { - - } - - public static String serialize(PlayReadyLicenseResponseTemplate template) throws JAXBException { - - validateLicenseResponseTemplate(template); - - StringWriter writer = new StringWriter(); - JAXBContext context = JAXBContext.newInstance(PlayReadyLicenseResponseTemplate.class); - Marshaller m = context.createMarshaller(); - m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); - m.setProperty("com.sun.xml.bind.namespacePrefixMapper", new NamespacePrefixMapper() { - @Override - public String[] getPreDeclaredNamespaceUris() { - return new String[] { - XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI - }; - } - - @Override - public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) { - if (namespaceUri.equals(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI)) { - return "i"; - } - return suggestion; - } - }); - m.marshal(template, writer); - return writer.toString(); - } - - public static PlayReadyLicenseResponseTemplate deserialize(String xml) throws JAXBException { - try { - return deserialize(xml, null); - } catch (SAXException e) { - // never reached. - return null; - } - } - - public static PlayReadyLicenseResponseTemplate deserialize(String xml, String validationSchemaFileName) - throws JAXBException, SAXException { - JAXBContext context = JAXBContext.newInstance(PlayReadyLicenseResponseTemplate.class); - Unmarshaller u = context.createUnmarshaller(); - if (validationSchemaFileName != null) { - SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); - Schema schema = factory.newSchema(new File(validationSchemaFileName)); - u.setSchema(schema); - } - PlayReadyLicenseResponseTemplate template = (PlayReadyLicenseResponseTemplate) u - .unmarshal(new StringReader(xml)); - - validateLicenseResponseTemplate(template); - - return template; - } - - private static void validateLicenseResponseTemplate(PlayReadyLicenseResponseTemplate templateToValidate) { - // Validate the PlayReadyLicenseResponseTemplate has at least one - // license - if (templateToValidate.getLicenseTemplates().size() <= 0) { - throw new IllegalArgumentException(ErrorMessages.AT_LEAST_ONE_LICENSE_TEMPLATE_REQUIRED); - } - - for (PlayReadyLicenseTemplate template : templateToValidate.getLicenseTemplates()) { - // This is actually enforced in the DataContract with the IsRequired - // attribute - // so this check should never fail. - if (template.getContentKey() == null) { - throw new IllegalArgumentException(ErrorMessages.PLAY_READY_CONTENT_KEY_REQUIRED); - } - - // A PlayReady license must have at least one Right in it. Today we - // only - // support the PlayRight so it is required. In the future we might - // support - // other types of rights (CopyRight, perhaps an extensible Right, - // whatever) - // so we enforce this in code and not in the DataContract itself. - if (template.getPlayRight() == null) { - throw new IllegalArgumentException(ErrorMessages.PLAY_READY_PLAY_RIGHT_REQUIRED); - } - - // - // Per the PlayReady Compliance rules (section 3.8 - Output Control - // for Unknown Outputs), passing content to - // unknown output is prohibited if the - // DigitalVideoOnlyContentRestriction is enabled. - // - if (template.getPlayRight().isDigitalVideoOnlyContentRestriction()) { - if ((template.getPlayRight() - .getAllowPassingVideoContentToUnknownOutput() == UnknownOutputPassingOption.Allowed) - || (template.getPlayRight() - .getAllowPassingVideoContentToUnknownOutput() == UnknownOutputPassingOption.AllowedWithVideoConstriction)) { - throw new IllegalArgumentException( - ErrorMessages.DIGITAL_VIDEO_ONLY_MUTUALLY_EXCLUSIVE_WITH_PASSING_TO_UNKNOWN_OUTPUT_ERROR); - } - } - - if (template.getLicenseType() == PlayReadyLicenseType.Nonpersistent) { - // - // The PlayReady Rights Manager SDK will return an error if you - // try to specify a license - // that is non-persistent and has a first play expiration set. - // The event log message related - // to the error will say "LicenseGenerationFailure: - // FirstPlayExpiration can not be set on Non - // Persistent license PlayRight." - // - if (template.getPlayRight().getFirstPlayExpiration() != null) { - throw new IllegalArgumentException( - ErrorMessages.FIRST_PLAY_EXPIRATION_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE); - } - - // - // The PlayReady Rights Manager SDK will return an error if you - // try to specify a license - // that is non-persistent and has a GracePeriod set. - // - if (template.getGracePeriod() != null) { - throw new IllegalArgumentException( - ErrorMessages.GRACE_PERIOD_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE); - } - - // - // The PlayReady Rights Manager SDK will return an error if you - // try to specify a license - // that is non-persistent and has a GracePeriod set. The event - // log message related - // to the error will say "LicenseGenerationFailure: BeginDate or - // ExpirationDate should not be set - // on Non Persistent licenses" - // - if (template.getBeginDate() != null) { - throw new IllegalArgumentException( - ErrorMessages.BEGIN_DATE_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE); - } - - // - // The PlayReady Rights Manager SDK will return an error if you - // try to specify a license - // that is non-persistent and has a GracePeriod set. The event - // log message related - // to the error will say "LicenseGenerationFailure: BeginDate or - // ExpirationDate should not be set - // on Non Persistent licenses" - // - if (template.getExpirationDate() != null) { - throw new IllegalArgumentException( - ErrorMessages.EXPIRATION_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE); - } - } - } - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyContentKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyContentKey.java deleted file mode 100644 index c24c4fa8b549..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyContentKey.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlTransient; - -@XmlTransient -@XmlSeeAlso({ ContentEncryptionKeyFromHeader.class, ContentEncryptionKeyFromKeyIdentifier.class }) -public abstract class PlayReadyContentKey { - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseResponseTemplate.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseResponseTemplate.java deleted file mode 100644 index aa4bf93c3838..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseResponseTemplate.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.Element; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; - -@XmlRootElement(name = "PlayReadyLicenseResponseTemplate") -@XmlAccessorType(XmlAccessType.FIELD) -public class PlayReadyLicenseResponseTemplate { - - @XmlElementWrapper(name = "LicenseTemplates") - @XmlElement(name = "PlayReadyLicenseTemplate") - private List licenseTemplates; - - @XmlElement(name = "ResponseCustomData") - private String responseCustomData; - - // mimics IExtensibleDataObject - @XmlAnyElement - private List extensionData; - - public PlayReadyLicenseResponseTemplate() { - internalConstruct(); - } - - private void internalConstruct() { - setLicenseTemplates(new ArrayList()); - setExtensionData(new ArrayList()); - } - - /** - * @return the licenseTemplates - */ - public List getLicenseTemplates() { - return licenseTemplates; - } - - /** - * @param licenseTemplates the licenseTemplates to set - */ - private void setLicenseTemplates(List licenseTemplates) { - this.licenseTemplates = licenseTemplates; - } - - /** - * @return the responseCustomData - */ - public String getResponseCustomData() { - return responseCustomData; - } - - /** - * @param responseCustomData the responseCustomData to set - */ - public void setResponseCustomData(String responseCustomData) { - this.responseCustomData = responseCustomData; - } - - /** - * @return the extensionData - */ - public List getExtensionData() { - return extensionData; - } - - /** - * @param extensionData the extensionData to set - */ - public void setExtensionData(List extensionData) { - this.extensionData = extensionData; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseTemplate.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseTemplate.java deleted file mode 100644 index 01c8aa29c753..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseTemplate.java +++ /dev/null @@ -1,214 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import java.util.Date; -import java.util.List; - -import javax.xml.bind.Element; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.datatype.Duration; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "PlayReadyLicenseTemplate") -public class PlayReadyLicenseTemplate { - - @XmlElement(name = "AllowTestDevices") - private boolean allowTestDevices; - - @XmlElement(name = "BeginDate") - private Date beginDate; - - @XmlElement(name = "ContentKey") - private PlayReadyContentKey contentKey; - - @XmlElement(name = "ExpirationDate") - private Date expirationDate; - - @XmlElement(name = "GracePeriod") - private Duration gracePeriod; - - @XmlElement(name = "LicenseType") - private PlayReadyLicenseType licenseType; - - @XmlElement(name = "PlayRight") - private PlayReadyPlayRight playRight; - - @XmlElement(name = "RelativeBeginDate") - private Duration relativeBeginDate; - - @XmlElement(name = "RelativeExpirationDate") - private Duration relativeExpirationDate; - - // mimics IExtensibleDataObject - @XmlAnyElement - private List extensionData; - - - /** - * @return the allowTestDevices - */ - public boolean isAllowTestDevices() { - return allowTestDevices; - } - - /** - * @param allowTestDevices the allowTestDevices to set - */ - public void setAllowTestDevices(boolean allowTestDevices) { - this.allowTestDevices = allowTestDevices; - } - - /** - * @return the beginDate - */ - public Date getBeginDate() { - return beginDate; - } - - /** - * @param beginDate the beginDate to set - */ - public void setBeginDate(Date beginDate) { - // - // License template should not have both BeginDate and RelativeBeginDate set. - // Only one of these two values should be set. - if (relativeBeginDate != null) { - throw new IllegalArgumentException(ErrorMessages.BEGIN_DATE_AND_RELATIVE_BEGIN_DATE_CANNOTBE_SET_SIMULTANEOUSLY_ERROR); - } - this.beginDate = beginDate; - } - - /** - * @return the expirationDate - */ - public Date getExpirationDate() { - return expirationDate; - } - - /** - * @param expirationDate the expirationDate to set - */ - public void setExpirationDate(Date expirationDate) { - // - // License template should not have both ExpirationDate and RelativeExpirationDate set. - // Only one of these two values should be set. - if (relativeExpirationDate != null) { - throw new IllegalArgumentException("Set ExpirationDate or RelativeExpirationDate but not both"); - } - this.expirationDate = expirationDate; - } - - /** - * @return the relativeBeginDate - */ - public Duration getRelativeBeginDate() { - return relativeBeginDate; - } - - /** - * @param relativeBeginDate the relativeBeginDate to set - */ - public void setRelativeBeginDate(Duration relativeBeginDate) { - // - // License template should not have both BeginDate and RelativeBeginDate set. - // Only one of these two values should be set. - if (beginDate != null) { - throw new IllegalArgumentException("Set BeginDate or RelativeBeginDate but not both"); - } - this.relativeBeginDate = relativeBeginDate; - } - - /** - * @return the relativeExpirationDate - */ - public Duration getRelativeExpirationDate() { - return relativeExpirationDate; - } - - /** - * @param relativeExpirationDate the relativeExpirationDate to set - */ - public void setRelativeExpirationDate(Duration relativeExpirationDate) { - // - // License template should not have both ExpirationDate and RelativeExpirationDate set. - // Only one of these two values should be set. - if (expirationDate != null) { - throw new IllegalArgumentException("Set ExpirationDate or RelativeExpirationDate but not both"); - } - this.relativeExpirationDate = relativeExpirationDate; - } - - /** - * @return the gracePeriod - */ - public Duration getGracePeriod() { - return gracePeriod; - } - - /** - * @param gracePeriod the gracePeriod to set - */ - public void setGracePeriod(Duration gracePeriod) { - this.gracePeriod = gracePeriod; - } - - /** - * @return the playRight - */ - public PlayReadyPlayRight getPlayRight() { - return playRight; - } - - /** - * @param playRight the playRight to set - */ - public void setPlayRight(PlayReadyPlayRight playRight) { - this.playRight = playRight; - } - - /** - * @return the licenseType - */ - public PlayReadyLicenseType getLicenseType() { - return licenseType; - } - - /** - * @param licenseType the licenseType to set - */ - public void setLicenseType(PlayReadyLicenseType licenseType) { - this.licenseType = licenseType; - } - - /** - * @return the contentKey - */ - public PlayReadyContentKey getContentKey() { - return contentKey; - } - - /** - * @param contentKey the contentKey to set - */ - public void setContentKey(PlayReadyContentKey contentKey) { - this.contentKey = contentKey; - } - - /** - * @return the extensionData - */ - public List getExtensionData() { - return extensionData; - } - - /** - * @param extensionData the extensionData to set - */ - public void setExtensionData(List extensionData) { - this.extensionData = extensionData; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseType.java deleted file mode 100644 index 176c02c03e0f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseType.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import java.security.InvalidParameterException; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -@XmlType -@XmlEnum -public enum PlayReadyLicenseType { - - @XmlEnumValue("Nonpersistent") Nonpersistent(0), - @XmlEnumValue("Persistent") Persistent(1); - - private int playReadyLicenseType; - - private PlayReadyLicenseType(int playReadyLicenseType) { - this.playReadyLicenseType = playReadyLicenseType; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return playReadyLicenseType; - } - - /** - * From code. - * - * @param code - * the code - * @return the content key type - */ - public static PlayReadyLicenseType fromCode(int code) { - switch (code) { - case 0: - return PlayReadyLicenseType.Nonpersistent; - case 1: - return PlayReadyLicenseType.Persistent; - default: - throw new InvalidParameterException("code"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyPlayRight.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyPlayRight.java deleted file mode 100644 index 49cee38578d0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyPlayRight.java +++ /dev/null @@ -1,277 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import java.util.List; - -import javax.xml.bind.Element; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.datatype.Duration; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "PlayRight") -public class PlayReadyPlayRight { - - @XmlElement(name = "AgcAndColorStripeRestriction") - private AgcAndColorStripeRestriction agcAndColorStripeRestriction; - - @XmlElement(name = "AllowPassingVideoContentToUnknownOutput") - private UnknownOutputPassingOption allowPassingVideoContentToUnknownOutput; - - @XmlElement(name = "AnalogVideoOpl") - private Integer analogVideoOpl; - - @XmlElement(name = "CompressedDigitalAudioOpl") - private Integer compressedDigitalAudioOpl; - - @XmlElement(name = "CompressedDigitalVideoOpl") - private Integer compressedDigitalVideoOpl; - - @XmlElement(name = "DigitalVideoOnlyContentRestriction") - private boolean digitalVideoOnlyContentRestriction; - - @XmlElement(name = "ExplicitAnalogTelevisionOutputRestriction") - private ExplicitAnalogTelevisionRestriction explicitAnalogTelevisionOutputRestriction; - - @XmlElement(name = "FirstPlayExpiration") - private Duration firstPlayExpiration; - - @XmlElement(name = "ImageConstraintForAnalogComponentVideoRestriction") - private boolean imageConstraintForAnalogComponentVideoRestriction; - - @XmlElement(name = "ImageConstraintForAnalogComputerMonitorRestriction") - private boolean imageConstraintForAnalogComputerMonitorRestriction; - - @XmlElement(name = "ScmsRestriction") - private ScmsRestriction scmsRestriction; - - @XmlElement(name = "UncompressedDigitalAudioOpl") - private Integer uncompressedDigitalAudioOpl; - - @XmlElement(name = "UncompressedDigitalVideoOpl") - private Integer uncompressedDigitalVideoOpl; - - // mimics IExtensibleDataObject - @XmlAnyElement - private List extensionData; - - /** - * @return the firstPlayExpiration - */ - public Duration getFirstPlayExpiration() { - return firstPlayExpiration; - } - - /** - * @param firstPlayExpiration the firstPlayExpiration to set - */ - public void setFirstPlayExpiration(Duration firstPlayExpiration) { - this.firstPlayExpiration = firstPlayExpiration; - } - - /** - * @return the scmsRestriction - */ - public ScmsRestriction getScmsRestriction() { - return scmsRestriction; - } - - /** - * @param scmsRestriction the scmsRestriction to set - */ - public void setScmsRestriction(ScmsRestriction scmsRestriction) { - this.scmsRestriction = scmsRestriction; - } - - /** - * @return the agcAndColorStripeRestriction - */ - public AgcAndColorStripeRestriction getAgcAndColorStripeRestriction() { - return agcAndColorStripeRestriction; - } - - /** - * @param agcAndColorStripeRestriction the agcAndColorStripeRestriction to set - */ - public void setAgcAndColorStripeRestriction(AgcAndColorStripeRestriction agcAndColorStripeRestriction) { - this.agcAndColorStripeRestriction = agcAndColorStripeRestriction; - } - - /** - * @return the explicitAnalogTelevisionOutputRestriction - */ - public ExplicitAnalogTelevisionRestriction getExplicitAnalogTelevisionOutputRestriction() { - return explicitAnalogTelevisionOutputRestriction; - } - - /** - * @param explicitAnalogTelevisionOutputRestriction the explicitAnalogTelevisionOutputRestriction to set - */ - public void setExplicitAnalogTelevisionOutputRestriction(ExplicitAnalogTelevisionRestriction explicitAnalogTelevisionOutputRestriction) { - this.explicitAnalogTelevisionOutputRestriction = explicitAnalogTelevisionOutputRestriction; - } - - /** - * @return the digitalVideoOnlyContentRestriction - */ - public boolean isDigitalVideoOnlyContentRestriction() { - return digitalVideoOnlyContentRestriction; - } - - /** - * @param digitalVideoOnlyContentRestriction the digitalVideoOnlyContentRestriction to set - */ - public void setDigitalVideoOnlyContentRestriction(boolean digitalVideoOnlyContentRestriction) { - this.digitalVideoOnlyContentRestriction = digitalVideoOnlyContentRestriction; - } - - /** - * @return the imageConstraintForAnalogComponentVideoRestriction - */ - public boolean isImageConstraintForAnalogComponentVideoRestriction() { - return imageConstraintForAnalogComponentVideoRestriction; - } - - /** - * @param imageConstraintForAnalogComponentVideoRestriction the imageConstraintForAnalogComponentVideoRestriction to set - */ - public void setImageConstraintForAnalogComponentVideoRestriction( - boolean imageConstraintForAnalogComponentVideoRestriction) { - this.imageConstraintForAnalogComponentVideoRestriction = imageConstraintForAnalogComponentVideoRestriction; - } - - /** - * @return the allowPassingVideoContentToUnknownOutput - */ - public UnknownOutputPassingOption getAllowPassingVideoContentToUnknownOutput() { - return allowPassingVideoContentToUnknownOutput; - } - - /** - * @param allowPassingVideoContentToUnknownOutput the allowPassingVideoContentToUnknownOutput to set - */ - public void setAllowPassingVideoContentToUnknownOutput(UnknownOutputPassingOption allowPassingVideoContentToUnknownOutput) { - this.allowPassingVideoContentToUnknownOutput = allowPassingVideoContentToUnknownOutput; - } - - /** - * @return the uncompressedDigitalVideoOpl - */ - public Integer getUncompressedDigitalVideoOpl() { - return uncompressedDigitalVideoOpl; - } - - /** - * @param uncompressedDigitalVideoOpl the uncompressedDigitalVideoOpl to set - */ - public void setUncompressedDigitalVideoOpl(Integer uncompressedDigitalVideoOpl) { - int value = uncompressedDigitalVideoOpl != null ? uncompressedDigitalVideoOpl.intValue() : -1; - if ((uncompressedDigitalVideoOpl != null) && (value != 100) && (value != 250) && (value != 270) && (value != 300)) { - throw new IllegalArgumentException(ErrorMessages.UNCOMPRESSED_DIGITAL_VIDEO_OPL_VALUE_ERROR); - } - this.uncompressedDigitalVideoOpl = uncompressedDigitalVideoOpl; - } - - /** - * @return the compressedDigitalVideoOpl - */ - public Integer getCompressedDigitalVideoOpl() { - return compressedDigitalVideoOpl; - } - - /** - * @param compressedDigitalVideoOpl the compressedDigitalVideoOpl to set - */ - public void setCompressedDigitalVideoOpl(Integer compressedDigitalVideoOpl) { - int value = compressedDigitalVideoOpl != null ? compressedDigitalVideoOpl.intValue() : -1; - if ((compressedDigitalVideoOpl != null) && (value != 400) && (value != 500)) { - throw new IllegalArgumentException(ErrorMessages.COMPRESSED_DIGITAL_VIDEO_OPL_VALUE_ERROR); - } - this.compressedDigitalVideoOpl = compressedDigitalVideoOpl; - } - - /** - * @return the analogVideoOpl - */ - public Integer getAnalogVideoOpl() { - return analogVideoOpl; - } - - /** - * @param analogVideoOpl the analogVideoOpl to set - */ - public void setAnalogVideoOpl(Integer analogVideoOpl) { - int value = analogVideoOpl != null ? analogVideoOpl.intValue() : -1; - if ((analogVideoOpl != null) && (value != 100) && (value != 150) && (value != 200)) { - throw new IllegalArgumentException(ErrorMessages.ANALOG_VIDEO_OPL_VALUE_ERROR); - } - this.analogVideoOpl = analogVideoOpl; - } - - /** - * @return the compressedDigitalAudioOpl - */ - public Integer getCompressedDigitalAudioOpl() { - return compressedDigitalAudioOpl; - } - - /** - * @param compressedDigitalAudioOpl the compressedDigitalAudioOpl to set - */ - public void setCompressedDigitalAudioOpl(Integer compressedDigitalAudioOpl) { - int value = compressedDigitalAudioOpl != null ? compressedDigitalAudioOpl.intValue() : -1; - if ((compressedDigitalAudioOpl != null) && (value != 100) && (value != 150) && (value != 200) && (value != 250) && (value != 300)) { - throw new IllegalArgumentException(ErrorMessages.COMPRESSED_DIGITAL_AUDIO_OPL_VALUE_ERROR); - } - this.compressedDigitalAudioOpl = compressedDigitalAudioOpl; - } - - /** - * @return the uncompressedDigitalAudioOpl - */ - public Integer getUncompressedDigitalAudioOpl() { - return uncompressedDigitalAudioOpl; - } - - /** - * @param uncompressedDigitalAudioOpl the uncompressedDigitalAudioOpl to set - */ - public void setUncompressedDigitalAudioOpl(Integer uncompressedDigitalAudioOpl) { - int value = uncompressedDigitalAudioOpl != null ? uncompressedDigitalAudioOpl.intValue() : -1; - if ((uncompressedDigitalAudioOpl != null) && (value != 100) && (value != 150) && (value != 200) && (value != 250) && (value != 300)) { - throw new IllegalArgumentException(ErrorMessages.UNCOMPRESSED_DIGITAL_AUDIO_OPL_VALUE_ERROR); - } - this.uncompressedDigitalAudioOpl = uncompressedDigitalAudioOpl; - } - - /** - * @return the imageConstraintForAnalogComputerMonitorRestriction - */ - public boolean isImageConstraintForAnalogComputerMonitorRestriction() { - return imageConstraintForAnalogComputerMonitorRestriction; - } - - /** - * @param imageConstraintForAnalogComputerMonitorRestriction the imageConstraintForAnalogComputerMonitorRestriction to set - */ - public void setImageConstraintForAnalogComputerMonitorRestriction( - boolean imageConstraintForAnalogComputerMonitorRestriction) { - this.imageConstraintForAnalogComputerMonitorRestriction = imageConstraintForAnalogComputerMonitorRestriction; - } - - /** - * @return the extensionData - */ - public List getExtensionData() { - return extensionData; - } - - /** - * @param extensionData the extensionData to set - */ - public void setExtensionData(List extensionData) { - this.extensionData = extensionData; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ScmsRestriction.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ScmsRestriction.java deleted file mode 100644 index cec697844afd..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ScmsRestriction.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ScmsRestriction") -public class ScmsRestriction { - - @XmlElement(name = "ConfigurationData") - private byte configurationData; - - @SuppressWarnings("unused") - private ScmsRestriction() { - } - - public ScmsRestriction(byte configurationData) { - verifyTwoBitConfigurationData(configurationData); - this.configurationData = configurationData; - } - - /** - * @return the configurationData - */ - public byte getConfigurationData() { - return configurationData; - } - - public static void verifyTwoBitConfigurationData(byte configurationData) { - if ((configurationData & 0x3) != configurationData) { - throw new IllegalArgumentException(ErrorMessages.INVALID_TWO_BIT_CONFIGURATION_DATA); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/UnknownOutputPassingOption.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/UnknownOutputPassingOption.java deleted file mode 100644 index 16e4f32d9ea0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/UnknownOutputPassingOption.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import java.security.InvalidParameterException; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -@XmlType -@XmlEnum -public enum UnknownOutputPassingOption { - - @XmlEnumValue("NotAllowed") NotAllowed(0), - @XmlEnumValue("Allowed") Allowed(1), - @XmlEnumValue("AllowedWithVideoConstriction") AllowedWithVideoConstriction(2); - - private int unknownOutputPassingOption; - - private UnknownOutputPassingOption(int unknownOutputPassingOption) { - this.unknownOutputPassingOption = unknownOutputPassingOption; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return unknownOutputPassingOption; - } - - /** - * From code. - * - * @param code - * the code - * @return the content key type - */ - public static UnknownOutputPassingOption fromCode(int code) { - switch (code) { - case 0: - return UnknownOutputPassingOption.NotAllowed; - case 1: - return UnknownOutputPassingOption.Allowed; - case 2: - return UnknownOutputPassingOption.AllowedWithVideoConstriction; - default: - throw new InvalidParameterException("code"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/package-info.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/package-info.java deleted file mode 100644 index 5a7638be202f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@XmlSchema( - namespace = "http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1", - elementFormDefault = XmlNsForm.QUALIFIED) -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import javax.xml.bind.annotation.XmlNsForm; -import javax.xml.bind.annotation.XmlSchema; \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/AsymmetricTokenVerificationKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/AsymmetricTokenVerificationKey.java deleted file mode 100644 index 9b77eb309ec6..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/AsymmetricTokenVerificationKey.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -/** - * Class AsymmetricTokenVerificationKey represents asymmetric keys which are used in token verification scenarios. - */ -@XmlAccessorType(XmlAccessType.PUBLIC_MEMBER) -public abstract class AsymmetricTokenVerificationKey extends TokenVerificationKey { - - /** - * the raw body of a key. - */ - private byte[] rawBody; - - /** - * Gets the raw body of a key. - * @return the rawBody - */ - @XmlElement(name = "RawBody", required = true, nillable = true) - public byte[] getRawBody() { - return rawBody; - } - - /** - * Sets the raw body of a key. - * @param rawBody the rawBody to set - */ - public void setRawBody(byte[] rawBody) { - this.rawBody = rawBody; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/ErrorMessages.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/ErrorMessages.java deleted file mode 100644 index 2aa265178a82..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/ErrorMessages.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -public final class ErrorMessages { - - public static final String PRIMARY_VERIFICATIONKEY_AND_OPENIDCONNECTDISCOVERYDOCUMENT_ARE_NULL - = "Both PrimaryVerificationKey and OpenIdConnectDiscoveryDocument are null."; - - public static final String OPENIDDISCOVERYURI_STRING_IS_NULL_OR_EMPTY - = "OpenIdConnectDiscoveryDocument.OpenIdDiscoveryUri string value is null or empty."; - - public static final String OPENIDDISCOVERYURI_STRING_IS_NOT_ABSOLUTE_URI - = "String representation of OpenIdConnectDiscoveryDocument.OpenIdDiscoveryUri is not valid absolute Uri."; - - private ErrorMessages() { - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/OpenIdConnectDiscoveryDocument.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/OpenIdConnectDiscoveryDocument.java deleted file mode 100644 index e285949cf938..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/OpenIdConnectDiscoveryDocument.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "OpenIdConnectDiscoveryDocument") -public class OpenIdConnectDiscoveryDocument { - - @XmlElement(name = "OpenIdDiscoveryUri") - private String openIdDiscoveryUri; - - /** - * @return the openIdDiscoveryUri - */ - public String getOpenIdDiscoveryUri() { - return openIdDiscoveryUri; - } - - /** - * @param openIdDiscoveryUri the openIdDiscoveryUri to set - */ - public void setOpenIdDiscoveryUri(String openIdDiscoveryUri) { - this.openIdDiscoveryUri = openIdDiscoveryUri; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/SymmetricVerificationKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/SymmetricVerificationKey.java deleted file mode 100644 index 414955366465..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/SymmetricVerificationKey.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -import com.microsoft.windowsazure.services.media.EncryptionUtils; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SymmetricVerificationKey") -public class SymmetricVerificationKey extends TokenVerificationKey { - - @XmlElement(name = "KeyValue") - private byte[] keyValue; - - /** - * Constructs a SymmetricVerificationKey using a randomly generated key value. - * The key value generated is 64 bytes long. - */ - public SymmetricVerificationKey() { - keyValue = new byte[64]; - EncryptionUtils.eraseKey(keyValue); - } - - /** - * Constructs a SymmetricVerificationKey using the provided key value. - * @param keyValue the provided key value - */ - public SymmetricVerificationKey(byte[] keyValue) { - this.keyValue = keyValue; - } - - /** - * @return the keyValue - */ - public byte[] getKeyValue() { - return keyValue; - } - - /** - * @param keyValue the keyValue to set - */ - public void setKeyValue(byte[] keyValue) { - this.keyValue = keyValue; - } - - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenClaim.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenClaim.java deleted file mode 100644 index 86cd62ff4018..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenClaim.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "TokenClaim") -public class TokenClaim { - - private static final String CONTENT_KEY_ID_CLAIM_TYPE = "urn:microsoft:azure:mediaservices:contentkeyidentifier"; - - private static final TokenClaim CONTENT_KEY_ID_CLAIM = new TokenClaim(CONTENT_KEY_ID_CLAIM_TYPE, null); - - @XmlElement(name = "ClaimType", required = true) - private String claimType; - - @XmlElement(name = "ClaimValue", required = true, nillable = true) - private String claimValue; - - public TokenClaim() { - - } - - public TokenClaim(String claimType, String claimValue) { - if (claimType == null) { - throw new NullPointerException("claimType"); - } - setClaimType(claimType); - setClaimValue(claimValue); - } - - /** - * @return the claimType - */ - public String getClaimType() { - return claimType; - } - - /** - * @param claimType the claimType to set - * @return this - */ - public TokenClaim setClaimType(String claimType) { - this.claimType = claimType; - return this; - } - - /** - * @return the claimValue - */ - public String getClaimValue() { - return claimValue; - } - - /** - * @param claimValue the claimValue to set - * @return this - */ - public TokenClaim setClaimValue(String claimValue) { - this.claimValue = claimValue; - return this; - } - - /** - * @return the contentKeyIdentifierClaimType - */ - public static String getContentKeyIdentifierClaimType() { - return CONTENT_KEY_ID_CLAIM_TYPE; - } - - /** - * @return the contentkeyidentifierclaim - */ - public static TokenClaim getContentKeyIdentifierClaim() { - return CONTENT_KEY_ID_CLAIM; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplate.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplate.java deleted file mode 100644 index 1979757a9ea9..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplate.java +++ /dev/null @@ -1,176 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import java.net.URI; -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; - -@XmlRootElement(name = "TokenRestrictionTemplate") -@XmlAccessorType(XmlAccessType.FIELD) -public class TokenRestrictionTemplate { - - @XmlElementWrapper(name = "AlternateVerificationKeys") - @XmlElement(name = "TokenVerificationKey") - private List alternateVerificationKeys; - - @XmlElement(name = "Audience", required = true) - private URI audience; - - @XmlElement(name = "Issuer", required = true) - private URI issuer; - - @XmlElement(name = "PrimaryVerificationKey", nillable = true) - private TokenVerificationKey primaryVerificationKey; - - @XmlElementWrapper(name = "RequiredClaims") - @XmlElement(name = "TokenClaim") - private List requiredClaims; - - @XmlElement(name = "TokenType") - private TokenType tokenType; - - @XmlElement(name = "OpenIdConnectDiscoveryDocument") - private OpenIdConnectDiscoveryDocument openIdConnectDiscoveryDocument; - - @SuppressWarnings("unused") - private TokenRestrictionTemplate() { - this.setTokenType(TokenType.SWT); - initCollections(); - } - - public TokenRestrictionTemplate(TokenType tokenType) { - this.setTokenType(tokenType); - initCollections(); - } - - private void initCollections() { - setRequiredClaims(new ArrayList()); - setAlternateVerificationKeys(new ArrayList()); - } - - /** - * @return the audience - */ - public URI getAudience() { - return audience; - } - - /** - * @param audience - * the audience to set - * @return this - */ - public TokenRestrictionTemplate setAudience(URI audience) { - this.audience = audience; - return this; - } - - /** - * @return the issuer - */ - public URI getIssuer() { - return issuer; - } - - /** - * @param issuer - * the issuer to set - * @return this - */ - public TokenRestrictionTemplate setIssuer(URI issuer) { - this.issuer = issuer; - return this; - } - - /** - * @return the tokenType - */ - public TokenType getTokenType() { - return tokenType; - } - - /** - * @param tokenType - * the tokenType to set - * @return this - */ - public TokenRestrictionTemplate setTokenType(TokenType tokenType) { - this.tokenType = tokenType; - return this; - } - - /** - * @return the primaryVerificationKey - */ - public TokenVerificationKey getPrimaryVerificationKey() { - return primaryVerificationKey; - } - - /** - * @param primaryVerificationKey - * the primaryVerificationKey to set - * @return this - */ - public TokenRestrictionTemplate setPrimaryVerificationKey(TokenVerificationKey primaryVerificationKey) { - this.primaryVerificationKey = primaryVerificationKey; - return this; - } - - /** - * @return the requiredClaims - */ - public List getRequiredClaims() { - return requiredClaims; - } - - /** - * @param requiredClaims - * the requiredClaims to set - * @return this - */ - public TokenRestrictionTemplate setRequiredClaims(List requiredClaims) { - this.requiredClaims = requiredClaims; - return this; - } - - /** - * @return the alternateVerificationKeys - */ - public List getAlternateVerificationKeys() { - return alternateVerificationKeys; - } - - /** - * @param alternateVerificationKeys - * the alternateVerificationKeys to set - * @return this - */ - public TokenRestrictionTemplate setAlternateVerificationKeys(List alternateVerificationKeys) { - this.alternateVerificationKeys = alternateVerificationKeys; - return this; - } - - /** - * @return the alternateVerificationKeys - */ - public OpenIdConnectDiscoveryDocument getOpenIdConnectDiscoveryDocument() { - return openIdConnectDiscoveryDocument; - } - - /** - * @param alternateVerificationKeys - * the alternateVerificationKeys to set - * @return this - */ - public TokenRestrictionTemplate setOpenIdConnectDiscoveryDocument( - OpenIdConnectDiscoveryDocument openIdConnectDiscoveryDocument) { - this.openIdConnectDiscoveryDocument = openIdConnectDiscoveryDocument; - return this; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplateSerializer.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplateSerializer.java deleted file mode 100644 index 3d4923ede2ec..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplateSerializer.java +++ /dev/null @@ -1,239 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import java.io.File; -import java.io.StringReader; -import java.io.StringWriter; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLEncoder; -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; -import java.util.Calendar; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -import javax.crypto.Mac; -import javax.crypto.spec.SecretKeySpec; -import javax.xml.XMLConstants; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; -import javax.xml.validation.Schema; -import javax.xml.validation.SchemaFactory; - -import org.xml.sax.SAXException; - -import com.microsoft.windowsazure.core.utils.Base64; -import com.sun.xml.bind.marshaller.NamespacePrefixMapper; - -import io.jsonwebtoken.Jwts; -import io.jsonwebtoken.SignatureAlgorithm; - -public final class TokenRestrictionTemplateSerializer { - - private TokenRestrictionTemplateSerializer() { - - } - - public static String serialize(TokenRestrictionTemplate template) throws JAXBException { - - validateTokenRestrictionTemplate(template); - - StringWriter writer = new StringWriter(); - JAXBContext context = JAXBContext.newInstance(TokenRestrictionTemplate.class); - Marshaller m = context.createMarshaller(); - m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); - m.setProperty("com.sun.xml.bind.namespacePrefixMapper", new NamespacePrefixMapper() { - @Override - public String[] getPreDeclaredNamespaceUris() { - return new String[] { - XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI - }; - } - - @Override - public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) { - if (namespaceUri.equals(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI)) { - return "i"; - } - return suggestion; - } - }); - m.marshal(template, writer); - return writer.toString(); - } - - private static void validateTokenRestrictionTemplate(TokenRestrictionTemplate template) { - if (template.getPrimaryVerificationKey() == null && template.getOpenIdConnectDiscoveryDocument() == null) { - throw new IllegalArgumentException( - ErrorMessages.PRIMARY_VERIFICATIONKEY_AND_OPENIDCONNECTDISCOVERYDOCUMENT_ARE_NULL); - } - - if (template.getOpenIdConnectDiscoveryDocument() != null) { - if (template.getOpenIdConnectDiscoveryDocument().getOpenIdDiscoveryUri() == null - || template.getOpenIdConnectDiscoveryDocument().getOpenIdDiscoveryUri().isEmpty()) { - throw new IllegalArgumentException(ErrorMessages.OPENIDDISCOVERYURI_STRING_IS_NULL_OR_EMPTY); - } - - boolean openIdDiscoveryUrlValid = true; - try { - new URL(template.getOpenIdConnectDiscoveryDocument().getOpenIdDiscoveryUri()); - } catch (MalformedURLException e) { - openIdDiscoveryUrlValid = false; - } - - if (!openIdDiscoveryUrlValid) { - throw new IllegalArgumentException(ErrorMessages.OPENIDDISCOVERYURI_STRING_IS_NOT_ABSOLUTE_URI); - } - } - } - - public static TokenRestrictionTemplate deserialize(String xml) throws JAXBException { - try { - return deserialize(xml, null); - } catch (SAXException e) { - // never reached. - return null; - } - } - - public static TokenRestrictionTemplate deserialize(String xml, String validationSchemaFileName) - throws JAXBException, SAXException { - JAXBContext context = JAXBContext.newInstance(TokenRestrictionTemplate.class); - Unmarshaller u = context.createUnmarshaller(); - if (validationSchemaFileName != null) { - SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); - Schema schema = factory.newSchema(new File(validationSchemaFileName)); - u.setSchema(schema); - } - TokenRestrictionTemplate template = (TokenRestrictionTemplate) u.unmarshal(new StringReader(xml)); - validateTokenRestrictionTemplate(template); - return template; - } - - private static String generateTokenExpiry(Date expiry) { - return Long.toString(expiry.getTime() / 1000L); - } - - @SuppressWarnings("deprecation") - private static String urlEncode(String toEncode) { - StringBuilder encoded = new StringBuilder(URLEncoder.encode(toEncode)); - // This code provides uppercase url encoding in order to - // get generateTestToken test working. - for (int i = 0; i < encoded.length() - 2; i++) { - if (encoded.charAt(i) == '%') { - encoded.setCharAt(i + 1, Character.toLowerCase(encoded.charAt(i + 1))); - encoded.setCharAt(i + 2, Character.toLowerCase(encoded.charAt(i + 2))); - } - } - return encoded.toString(); - } - - public static String generateTestToken(TokenRestrictionTemplate tokenTemplate, TokenVerificationKey signingKeyToUse, - UUID keyIdForContentKeyIdentifierClaim, Date tokenExpiration, Date notBefore) { - - if (tokenTemplate == null) { - throw new NullPointerException("tokenTemplate"); - } - - if (signingKeyToUse == null) { - signingKeyToUse = tokenTemplate.getPrimaryVerificationKey(); - } - - if (tokenExpiration == null) { - Calendar cal = Calendar.getInstance(); - cal.setTime(new Date()); - cal.add(Calendar.MINUTE, 10); - tokenExpiration = cal.getTime(); - } - - if (notBefore == null) { - Calendar cal = Calendar.getInstance(); - cal.setTime(new Date()); - cal.add(Calendar.MINUTE, -5); - notBefore = cal.getTime(); - } - - if (tokenTemplate.getTokenType().equals(TokenType.SWT)) { - return generateTestTokenSWT(tokenTemplate, signingKeyToUse, keyIdForContentKeyIdentifierClaim, - tokenExpiration); - } else { - return generateTestTokenJWT(tokenTemplate, signingKeyToUse, keyIdForContentKeyIdentifierClaim, - tokenExpiration, notBefore); - } - } - - public static String generateTestTokenJWT(TokenRestrictionTemplate tokenTemplate, - TokenVerificationKey signingKeyToUse, UUID keyIdForContentKeyIdentifierClaim, Date tokenExpiration, - Date notBefore) { - - SymmetricVerificationKey signingKey = (SymmetricVerificationKey) signingKeyToUse; - SecretKeySpec secretKey = new SecretKeySpec(signingKey.getKeyValue(), "HmacSHA256"); - - // Mapping Claims. - Map claims = new HashMap(); - for (TokenClaim claim : tokenTemplate.getRequiredClaims()) { - String claimValue = claim.getClaimValue(); - if (claimValue == null && claim.getClaimType().equals(TokenClaim.getContentKeyIdentifierClaimType())) { - if (keyIdForContentKeyIdentifierClaim == null) { - throw new IllegalArgumentException(String.format( - "The 'keyIdForContentKeyIdentifierClaim' parameter cannot be null when the token template contains a required '%s' claim type.", - TokenClaim.getContentKeyIdentifierClaimType())); - } - claimValue = keyIdForContentKeyIdentifierClaim.toString(); - } - claims.put(claim.getClaimType(), claimValue); - } - - return Jwts.builder().setHeaderParam("typ", "JWT").setClaims(claims) - .setIssuer(tokenTemplate.getIssuer().toString()).setAudience(tokenTemplate.getAudience().toString()) - .setIssuedAt(notBefore).setExpiration(tokenExpiration).signWith(SignatureAlgorithm.HS256, secretKey) - .compact(); - } - - public static String generateTestTokenSWT(TokenRestrictionTemplate tokenTemplate, - TokenVerificationKey signingKeyToUse, UUID keyIdForContentKeyIdentifierClaim, Date tokenExpiration) { - - StringBuilder builder = new StringBuilder(); - - for (TokenClaim claim : tokenTemplate.getRequiredClaims()) { - String claimValue = claim.getClaimValue(); - if (claim.getClaimType().equals(TokenClaim.getContentKeyIdentifierClaimType())) { - if (keyIdForContentKeyIdentifierClaim == null) { - throw new IllegalArgumentException(String.format( - "The 'keyIdForContentKeyIdentifierClaim' parameter cannot be null when the token template contains a required '%s' claim type.", - TokenClaim.getContentKeyIdentifierClaimType())); - } - claimValue = keyIdForContentKeyIdentifierClaim.toString(); - } - builder.append(String.format("%s=%s&", urlEncode(claim.getClaimType()), urlEncode(claimValue))); - } - - builder.append(String.format("Audience=%s&", urlEncode(tokenTemplate.getAudience().toString()))); - builder.append(String.format("ExpiresOn=%s&", generateTokenExpiry(tokenExpiration))); - builder.append(String.format("Issuer=%s", urlEncode(tokenTemplate.getIssuer().toString()))); - - SymmetricVerificationKey signingKey = (SymmetricVerificationKey) signingKeyToUse; - SecretKeySpec secretKey = new SecretKeySpec(signingKey.getKeyValue(), "HmacSHA256"); - Mac mac; - try { - mac = Mac.getInstance("HmacSHA256"); - mac.init(secretKey); - } catch (NoSuchAlgorithmException e) { - throw new RuntimeException(e); - } catch (InvalidKeyException e) { - throw new RuntimeException(e); - } - byte[] unsignedTokenAsBytes = builder.toString().getBytes(); - byte[] signatureBytes = mac.doFinal(unsignedTokenAsBytes); - String encoded = new String(Base64.encode(signatureBytes)); - - builder.append(String.format("&HMACSHA256=%s", urlEncode(encoded))); - - return builder.toString(); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenType.java deleted file mode 100644 index e8e86d75e0ae..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenType.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import java.security.InvalidParameterException; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -@XmlType -@XmlEnum -public enum TokenType { - - @XmlEnumValue("Undefined") Undefined(0), - @XmlEnumValue("SWT") SWT(1), - @XmlEnumValue("JWT") JWT(2); - - private int tokenType; - - private TokenType(int tokenType) { - this.tokenType = tokenType; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return tokenType; - } - - /** - * From code. - * - * @param code - * the code - * @return the content key type - */ - public static TokenType fromCode(int code) { - switch (code) { - case 0: - return TokenType.Undefined; - case 1: - return TokenType.SWT; - case 2: - return TokenType.JWT; - default: - throw new InvalidParameterException("code"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenVerificationKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenVerificationKey.java deleted file mode 100644 index 96b0e36c724c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenVerificationKey.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlTransient; - -@XmlTransient -@XmlSeeAlso({ SymmetricVerificationKey.class, X509CertTokenVerificationKey.class }) -public abstract class TokenVerificationKey { - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/X509CertTokenVerificationKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/X509CertTokenVerificationKey.java deleted file mode 100644 index 1d43d1991bb7..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/X509CertTokenVerificationKey.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import java.io.ByteArrayInputStream; -import java.security.cert.CertificateEncodingException; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlTransient; -import javax.xml.bind.annotation.XmlType; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "X509CertTokenVerificationKey") -public class X509CertTokenVerificationKey extends AsymmetricTokenVerificationKey { - - @XmlTransient - private X509Certificate x509Certificate; - - public X509CertTokenVerificationKey() { - } - - public X509CertTokenVerificationKey(X509Certificate x509Certificate) throws CertificateEncodingException { - this.setX509Certificate(x509Certificate); - super.setRawBody(x509Certificate.getEncoded()); - } - - /** - * @return the x509Certificate - */ - public X509Certificate getX509Certificate() { - return x509Certificate; - } - - /** - * @param x509Certificate the x509Certificate to set - */ - public void setX509Certificate(X509Certificate x509Certificate) { - this.x509Certificate = x509Certificate; - } - - @Override - public void setRawBody(byte[] rawBody) { - super.setRawBody(rawBody); - ByteArrayInputStream input = new ByteArrayInputStream(rawBody); - try { - this.x509Certificate = (X509Certificate) - CertificateFactory.getInstance("X.509").generateCertificate(input); - } catch (CertificateException e) { - super.setRawBody(null); - } - - } - - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/package-info.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/package-info.java deleted file mode 100644 index f19c1edb5dfc..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@XmlSchema( - namespace = "http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1", - elementFormDefault = XmlNsForm.QUALIFIED) -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import javax.xml.bind.annotation.XmlNsForm; -import javax.xml.bind.annotation.XmlSchema; \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/AllowedTrackTypes.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/AllowedTrackTypes.java deleted file mode 100644 index 8e3325cbd8ec..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/AllowedTrackTypes.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.widevine; - -public enum AllowedTrackTypes { - SD_ONLY, SD_HD -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/ContentKeySpecs.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/ContentKeySpecs.java deleted file mode 100644 index 30d03f7a95eb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/ContentKeySpecs.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.widevine; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ContentKeySpecs { - /** - * A track type name. - */ - @JsonProperty("track_type") - private String trackType; - - /** - * Unique identifier for the key. - */ - @JsonProperty("key_id") - private String keyId; - - /** - * Defines client robustness requirements for playback. 1 - Software-based - * whitebox crypto is required. 2 - Software crypto and an obfuscated - * decoder is required. 3 - The key material and crypto operations must be - * performed within a hardware backed trusted execution environment. 4 - The - * crypto and decoding of content must be performed within a hardware backed - * trusted execution environment. 5 - The crypto, decoding and all handling - * of the media (compressed and uncompressed) must be handled within a - * hardware backed trusted execution environment. - */ - @JsonProperty("security_level") - private Integer securityLevel; - - /** - * Indicates whether HDCP V1 or V2 is required or not. - */ - @JsonProperty("required_output_protection") - private RequiredOutputProtection requiredOutputProtection; - - @JsonProperty("track_type") - public String getTrackType() { - return trackType; - } - - @JsonProperty("track_type") - public void setTrackType(String trackType) { - this.trackType = trackType; - } - - @JsonProperty("key_id") - public String getKeyId() { - return keyId; - } - - @JsonProperty("key_id") - public void setKeyId(String keyId) { - this.keyId = keyId; - } - - @JsonProperty("security_level") - public Integer getSecurityLevel() { - return securityLevel; - } - - @JsonProperty("security_level") - public void setSecurityLevel(Integer securityLevel) { - this.securityLevel = securityLevel; - } - - @JsonProperty("required_output_protection") - public RequiredOutputProtection getRequiredOutputProtection() { - return requiredOutputProtection; - } - - @JsonProperty("required_output_protection") - public void setRequiredOutputProtection(RequiredOutputProtection requiredOutputProtection) { - this.requiredOutputProtection = requiredOutputProtection; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/Hdcp.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/Hdcp.java deleted file mode 100644 index f27b7c490a40..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/Hdcp.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.widevine; - -public enum Hdcp { - HDCP_NONE, HDCP_V1, HDCP_V2 -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/RequiredOutputProtection.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/RequiredOutputProtection.java deleted file mode 100644 index 99b9d474385f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/RequiredOutputProtection.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.widevine; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class RequiredOutputProtection { - /** - * Indicates whether HDCP is required. - */ - @JsonProperty("hdcp") - private Hdcp hdcp; - - @JsonProperty("hdcp") - public Hdcp getHdcp() { - return hdcp; - } - - @JsonProperty("hdcp") - public void setHdcp(Hdcp hdcp) { - this.hdcp = hdcp; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/WidevineMessage.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/WidevineMessage.java deleted file mode 100644 index d2d383451091..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/WidevineMessage.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.widevine; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; - -@JsonInclude(JsonInclude.Include.NON_NULL) -public class WidevineMessage { - /** - * Controls which content keys should be included in a license. Only one of - * allowed_track_types and content_key_specs can be specified. - */ - @JsonProperty("allowed_track_types") - private AllowedTrackTypes allowedTrackTypes; - - /** - * A finer grained control on what content keys to return. Only one of - * allowed_track_types and content_key_specs can be specified. - */ - @JsonProperty("content_key_specs") - private ContentKeySpecs[] contentKeySpecs; - - /** - * Policy settings for this license. In the event this asset has a - * pre-defined policy, these specified values will be used. - */ - @JsonProperty("policy_overrides") - private Object policyOverrides; - - @JsonProperty("allowed_track_types") - public AllowedTrackTypes getAllowedTrackTypes() { - return allowedTrackTypes; - } - - @JsonProperty("allowed_track_types") - public void setAllowedTrackTypes(AllowedTrackTypes allowedTrackTypes) { - this.allowedTrackTypes = allowedTrackTypes; - } - - @JsonProperty("content_key_specs") - public ContentKeySpecs[] getContentKeySpecs() { - return contentKeySpecs; - } - - @JsonProperty("content_key_specs") - public void setContentKeySpecs(ContentKeySpecs[] contentKeySpecs) { - this.contentKeySpecs = contentKeySpecs; - } - - @JsonProperty("policy_overrides") - public Object getPolicyOverrides() { - return policyOverrides; - } - - @JsonProperty("policy_overrides") - public void setPolicyOverrides(Object policyOverrides) { - this.policyOverrides = policyOverrides; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/package-info.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/package-info.java deleted file mode 100644 index 7f36a4577668..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/package-info.java +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation.templates.widevine; \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicy.java deleted file mode 100644 index d0988b833755..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicy.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.EnumSet; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.implementation.content.AccessPolicyType; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate Access Policy entities. - * - */ -public final class AccessPolicy { - - private static final String ENTITY_SET = "AccessPolicies"; - - private AccessPolicy() { - } - - /** - * Creates an operation to create a new access policy - * - * @param name - * name of the access policy - * @param durationInMinutes - * how long the access policy will be in force - * @param permissions - * permissions allowed by this access policy - * @return The operation - */ - public static EntityCreateOperation create(String name, - double durationInMinutes, - EnumSet permissions) { - return new Creator(name, durationInMinutes, permissions); - } - - private static class Creator extends - EntityOperationSingleResultBase implements - EntityCreateOperation { - private final String policyName; - private final double durationInMinutes; - private final EnumSet permissions; - - public Creator(String policyName, double durationInMinutes, - EnumSet permissions) { - - super(ENTITY_SET, AccessPolicyInfo.class); - - this.policyName = policyName; - this.durationInMinutes = durationInMinutes; - this.permissions = permissions; - } - - @Override - public Object getRequestContents() { - return new AccessPolicyType() - .setName(policyName) - .setDurationInMinutes(durationInMinutes) - .setPermissions( - AccessPolicyPermission - .bitsFromPermissions(permissions)); - } - - } - - /** - * Create an operation that will retrieve the given access policy - * - * @param accessPolicyId - * id of access policy to retrieve - * @return the operation - */ - public static EntityGetOperation get(String accessPolicyId) { - return new DefaultGetOperation(ENTITY_SET, - accessPolicyId, AccessPolicyInfo.class); - } - - /** - * Create an operation that will retrieve the access policy at the given - * link - * - * @param link - * the link - * @return the operation - */ - public static EntityGetOperation get( - LinkInfo link) { - return new DefaultGetOperation(link.getHref(), - AccessPolicyInfo.class); - } - - /** - * Create an operation that will retrieve all access policies - * - * @return the operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation to delete the given access policy - * - * @param accessPolicyId - * id of access policy to delete - * @return the delete operation - */ - public static EntityDeleteOperation delete(String accessPolicyId) { - return new DefaultDeleteOperation(ENTITY_SET, accessPolicyId); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicyInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicyInfo.java deleted file mode 100644 index a51c533b6245..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicyInfo.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; -import java.util.EnumSet; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.AccessPolicyType; - -/** - * Type containing data about access policies. - * - */ -public class AccessPolicyInfo extends ODataEntity { - - /** - * Creates a new {@link AccessPolicyInfo} wrapping the given ATOM entry and - * content objects. - * - * @param entry - * Entry containing this AccessPolicy data - * @param content - * Content with the AccessPolicy data - */ - public AccessPolicyInfo(EntryType entry, AccessPolicyType content) { - super(entry, content); - } - - /** - * Get the access policy id. - * - * @return the id. - */ - public String getId() { - return getContent().getId(); - } - - /** - * Get the creation date. - * - * @return the date. - */ - public Date getCreated() { - return getContent().getCreated(); - } - - /** - * Get the last modified date. - * - * @return the date. - */ - public Date getLastModified() { - return getContent().getLastModified(); - } - - /** - * Get the name. - * - * @return the name. - */ - public String getName() { - return getContent().getName(); - } - - /** - * Get the duration. - * - * @return the duration. - */ - public double getDurationInMinutes() { - return getContent().getDurationInMinutes(); - } - - /** - * Get the permissions. - * - * @return the permissions. - */ - public EnumSet getPermissions() { - return AccessPolicyPermission.permissionsFromBits(getContent() - .getPermissions()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicyPermission.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicyPermission.java deleted file mode 100644 index f9f658a1bbfb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicyPermission.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import java.util.EnumSet; - -/** - * Permissions available to an access policy - * - */ -public enum AccessPolicyPermission { - NONE(0), READ(1), WRITE(2), DELETE(4), LIST(8); - - private int flagValue; - - private AccessPolicyPermission(int value) { - flagValue = value; - } - - /** - * Get the flag bit value associated with this permission - * - * @return The integer permission value - */ - public int getFlagValue() { - return flagValue; - } - - /** - * Given an integer representing the permissions as a bit vector, convert it - * into an EnumSet<AccessPolicyPermission> object - * containing the correct permissions * - * - * @param bits - * The bit vector of permissions - * @return The set of permissions in an EnumSet object. - */ - public static EnumSet permissionsFromBits(int bits) { - EnumSet perms = EnumSet - .of(AccessPolicyPermission.NONE); - - for (AccessPolicyPermission p : AccessPolicyPermission.values()) { - if ((bits & p.getFlagValue()) != 0) { - perms.remove(AccessPolicyPermission.NONE); - perms.add(p); - } - } - - return perms; - } - - /** - * Convert an EnumSet containing permissions into the - * corresponding integer bit vector to be passed to Media services. - * - * @param perms - * The permissions - * @return The bit vector to go out over the wire. - */ - public static int bitsFromPermissions(EnumSet perms) { - int result = 0; - for (AccessPolicyPermission p : perms) { - result |= p.getFlagValue(); - } - - return result; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Asset.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Asset.java deleted file mode 100644 index 362e2e7b2cde..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Asset.java +++ /dev/null @@ -1,391 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.io.UnsupportedEncodingException; -import java.net.URI; -import java.net.URLEncoder; -import java.security.InvalidParameterException; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityLinkOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityProxyData; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUnlinkOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate Asset entities. - * - */ -public final class Asset { - - /** The Constant ENTITY_SET. */ - private static final String ENTITY_SET = "Assets"; - - // Prevent instantiation - /** - * Instantiates a new asset. - */ - private Asset() { - } - - /** - * Creates an Asset Creator. - * - * @return the creator - */ - public static Creator create() { - return new Creator(); - } - - /** - * The Class Creator. - */ - public static class Creator extends - EntityOperationSingleResultBase implements - EntityCreateOperation { - - /** The name. */ - private String name; - - /** The alternate id. */ - private String alternateId; - - /** The Name of the storage account that contains the asset blob container.. */ - private String storageAccountName; - - /** The options. */ - private AssetOption options; - - /** The state. */ - private AssetState state; - - /** - * Instantiates a new creator. - */ - public Creator() { - super(ENTITY_SET, AssetInfo.class); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityCreateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - AssetType assetType = new AssetType(); - assetType.setName(name); - assetType.setAlternateId(alternateId); - assetType.setStorageAccountName(storageAccountName); - if (options != null) { - assetType.setOptions(options.getCode()); - } - if (state != null) { - assetType.setState(state.getCode()); - } - return assetType; - } - - /** - * Set the name of the asset to be created. - * - * @param name - * The name - * @return The creator object (for call chaining) - */ - public Creator setName(String name) { - this.name = name; - return this; - } - - /** - * Sets the alternate id of the asset to be created. - * - * @param alternateId - * The id - * - * @return The creator object (for call chaining) - */ - public Creator setAlternateId(String alternateId) { - this.alternateId = alternateId; - return this; - } - - /** - * Sets the options. - * - * @param options - * the options - * @return the creator - */ - public Creator setOptions(AssetOption options) { - this.options = options; - return this; - } - - /** - * Sets the state. - * - * @param state - * the state - * @return the creator - */ - public Creator setState(AssetState state) { - this.state = state; - return this; - } - - /** - * Sets Name of the storage account that contains the asset's blob container. - * @param storageAccountName Name of the storage account that contains the asset's blob container. - */ - public Creator setStorageAccountName(String storageAccountName) { - this.storageAccountName = storageAccountName; - return this; - } - } - - /** - * Create an operation object that will get the state of the given asset. - * - * @param assetId - * id of asset to retrieve - * @return the get operation - */ - public static EntityGetOperation get(String assetId) { - return new DefaultGetOperation(ENTITY_SET, assetId, - AssetInfo.class); - } - - /** - * Get the asset at the given link - * - * @param link - * the link - * @return the get operation - */ - public static EntityGetOperation get(LinkInfo link) { - return new DefaultGetOperation(link.getHref(), - AssetInfo.class); - } - - /** - * Create an operation that will list all the assets. - * - * @return The list operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation that will list all the assets at the given link. - * - * @param link - * Link to request assets from. - * @return The list operation. - */ - public static DefaultListOperation list(LinkInfo link) { - return new DefaultListOperation(link.getHref(), - new GenericType>() { - }); - } - - /** - * Create an operation that will update the given asset. - * - * @param assetId - * id of the asset to update - * @return the update operation - */ - public static Updater update(String assetId) { - return new Updater(assetId); - } - - /** - * The Class Updater. - */ - public static class Updater extends EntityOperationBase implements - EntityUpdateOperation { - - /** The name. */ - private String name; - - /** The alternate id. */ - private String alternateId; - - /** - * Instantiates a new updater. - * - * @param assetId - * the asset id - */ - protected Updater(String assetId) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, - assetId)); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media - * .entityoperations.EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - // Deliberately empty - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityUpdateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - AssetType assetType = new AssetType(); - assetType.setName(name); - assetType.setAlternateId(alternateId); - return assetType; - } - - /** - * Sets new name for asset. - * - * @param name - * The new name - * @return Updater instance - */ - public Updater setName(String name) { - this.name = name; - return this; - } - - /** - * Sets new alternate id for asset. - * - * @param alternateId - * the new alternate id - * @return Updater instance - */ - public Updater setAlternateId(String alternateId) { - this.alternateId = alternateId; - return this; - } - } - - /** - * Create an operation to delete the given asset. - * - * @param assetId - * id of asset to delete - * @return the delete operation - */ - public static EntityDeleteOperation delete(String assetId) { - return new DefaultDeleteOperation(ENTITY_SET, assetId); - } - - /** - * Link content key. - * - * @param assetId - * the asset id - * @param contentKeyId - * the content key id - * @return the entity action operation - */ - public static EntityLinkOperation linkContentKey(String assetId, - String contentKeyId) { - String escapedContentKeyId = null; - try { - escapedContentKeyId = URLEncoder.encode(contentKeyId, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new InvalidParameterException("contentKeyId"); - } - URI contentKeyUri = URI.create(String.format("ContentKeys('%s')", - escapedContentKeyId)); - return new EntityLinkOperation(ENTITY_SET, assetId, "ContentKeys", - contentKeyUri); - } - - /** - * unlink a content key. - * - * @param assetId - * the asset id - * @param contentKeyId - * the content key id - * @return the entity action operation - */ - public static EntityUnlinkOperation unlinkContentKey(String assetId, - String contentKeyId) { - return new EntityUnlinkOperation(ENTITY_SET, assetId, "ContentKeys", contentKeyId); - } - - /** - * Link delivery policy - * - * @param assetId - * the asset id - * @param deliveryPolicyId - * the content key id - * @return the entity action operation - */ - public static EntityLinkOperation linkDeliveryPolicy(String assetId, - String deliveryPolicyId) { - String escapedContentKeyId = null; - try { - escapedContentKeyId = URLEncoder.encode(deliveryPolicyId, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new InvalidParameterException("deliveryPolicyId"); - } - URI contentKeyUri = URI.create(String.format("AssetDeliveryPolicies('%s')", - escapedContentKeyId)); - return new EntityLinkOperation(ENTITY_SET, assetId, "DeliveryPolicies", - contentKeyUri); - } - - /** - * unlink an asset delivery policy - * - * @param assetId - * the asset id - * @param adpId - * the asset delivery policy id - * @return the entity action operation - */ - public static EntityUnlinkOperation unlinkDeliveryPolicy(String assetId, - String adpId) { - return new EntityUnlinkOperation(ENTITY_SET, assetId, "DeliveryPolicies", adpId); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicy.java deleted file mode 100644 index 6fa384495ac0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicy.java +++ /dev/null @@ -1,246 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.EnumSet; -import java.util.Map; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.AssetDeliveryPolicyRestType; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate Asset Delivery Policy entities. - * - */ -public final class AssetDeliveryPolicy { - - private static final String ENTITY_SET = "AssetDeliveryPolicies"; - - private AssetDeliveryPolicy() { - } - - /** - * Creates an operation to create a new AssetDeliveryPolicy - * - * @param name - * name of the asset delivery policy - * @return The operation - */ - public static Creator create() { - return new Creator(); - } - - public static class Creator extends EntityOperationSingleResultBase - implements EntityCreateOperation { - - private String name; - private EnumSet assetDeliveryProtocol; - private AssetDeliveryPolicyType assetDeliveryPolicyType; - private Map assetDeliveryConfiguration; - - public Creator() { - super(ENTITY_SET, AssetDeliveryPolicyInfo.class); - } - - @Override - public Object getRequestContents() { - return new AssetDeliveryPolicyRestType().setName(name) - .setAssetDeliveryConfiguration(assetDeliveryConfiguration) - .setAssetDeliveryPolicyType(assetDeliveryPolicyType.getCode()) - .setAssetDeliveryProtocol(AssetDeliveryProtocol.bitsFromProtocols(assetDeliveryProtocol)); - } - - /** - * Set the name of the Asset Delivery Policy to be created. - * - * @param name - * The name - * @return The creator object (for call chaining) - */ - public Creator setName(String name) { - this.name = name; - return this; - } - - /** - * Set the protocol of the Asset Delivery Policy to be created. - * - * @param assetDeliveryProtocol - * The protocol - * @return The creator object (for call chaining) - */ - public Creator setAssetDeliveryProtocol(EnumSet assetDeliveryProtocol) { - this.assetDeliveryProtocol = assetDeliveryProtocol; - return this; - } - - /** - * Set the type of the Asset Delivery Policy to be created. - * - * @param assetDeliveryPolicyType - * The type - * @return The creator object (for call chaining) - */ - public Creator setAssetDeliveryPolicyType(AssetDeliveryPolicyType assetDeliveryPolicyType) { - this.assetDeliveryPolicyType = assetDeliveryPolicyType; - return this; - } - - /** - * Set the configuration of the Asset Delivery Policy to be created. - * - * @param assetDeliveryPolicyConfiguration - * The configuration - * @return The creator object (for call chaining) - */ - public Creator setAssetDeliveryConfiguration(Map assetDeliveryPolicyConfiguration) { - this.assetDeliveryConfiguration = assetDeliveryPolicyConfiguration; - return this; - } - - } - - /** - * Create an operation that will retrieve the given asset delivery policy - * - * @param assetDeliveryPolicyId - * id of asset delivery policy to retrieve - * @return the operation - */ - public static EntityGetOperation get(String assetDeliveryPolicyId) { - return new DefaultGetOperation(ENTITY_SET, assetDeliveryPolicyId, - AssetDeliveryPolicyInfo.class); - } - - /** - * Create an operation that will retrieve all asset delivery policies - * - * @return the operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation that will list all the asset delivery policies at the - * given link. - * - * @param link - * Link to request all the asset delivery policies. - * - * @return The list operation. - */ - public static DefaultListOperation list(LinkInfo link) { - return new DefaultListOperation(link.getHref(), - new GenericType>() { - }); - } - - /** - * Create an operation to delete the given asset delivery policy - * - * @param contentKeyAuthorizationPolicyId - * id of content key authorization policy to delete - * @return the delete operation - */ - - public static EntityDeleteOperation delete(String assetDeliveryPolicyId) { - return new DefaultDeleteOperation(ENTITY_SET, assetDeliveryPolicyId); - } - - /** - * Create an operation that will update the given asset delivery policy. - * - * @param assetDeliveryPolicyId - * id of the asset delivery policy to update - * @return the update operation - */ - public static Updater update(String assetDeliveryPolicyId) { - return new Updater(assetDeliveryPolicyId); - } - - /** - * The Class Updater. - */ - public static class Updater extends EntityOperationBase implements EntityUpdateOperation { - - private EnumSet assetDeliveryProtocol; - private AssetDeliveryPolicyType assetDeliveryPolicyType; - private Map assetDeliveryConfiguration; - - protected Updater(String assetDeliveryPolicyId) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, assetDeliveryPolicyId)); - - } - - @Override - public Object getRequestContents() { - return new AssetDeliveryPolicyRestType() - .setAssetDeliveryConfiguration(assetDeliveryConfiguration) - .setAssetDeliveryPolicyType(assetDeliveryPolicyType.getCode()) - .setAssetDeliveryProtocol(AssetDeliveryProtocol.bitsFromProtocols(assetDeliveryProtocol)); - } - - /** - * Set the protocol of the Asset Delivery Policy to be created. - * - * @param assetDeliveryProtocol - * The protocol - * @return The creator object (for call chaining) - */ - public Updater setAssetDeliveryProtocol(EnumSet assetDeliveryProtocol) { - this.assetDeliveryProtocol = assetDeliveryProtocol; - return this; - } - - /** - * Set the type of the Asset Delivery Policy to be created. - * - * @param assetDeliveryPolicyType - * The type - * @return The creator object (for call chaining) - */ - public Updater setAssetDeliveryPolicyType(AssetDeliveryPolicyType assetDeliveryPolicyType) { - this.assetDeliveryPolicyType = assetDeliveryPolicyType; - return this; - } - - /** - * Set the configuration of the Asset Delivery Policy to be created. - * - * @param assetDeliveryPolicyConfiguration - * The configuration - * @return The creator object (for call chaining) - */ - public Updater setAssetDeliveryConfiguration( - Map assetDeliveryPolicyConfiguration) { - this.assetDeliveryConfiguration = assetDeliveryPolicyConfiguration; - return this; - } - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyConfigurationKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyConfigurationKey.java deleted file mode 100644 index c32bce8d42f3..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyConfigurationKey.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Specifies the AssetDeliveryPolicyType. - */ -public enum AssetDeliveryPolicyConfigurationKey { - - /** No policies. */ - None(0), - /** Exact Envelope key URL. */ - EnvelopeKeyAcquisitionUrl(1), - /** Base key url that will have KID= appended for Envelope. */ - EnvelopeBaseKeyAcquisitionUrl(2), - /** The initialization vector to use for envelope encryption in Base64 format. */ - EnvelopeEncryptionIVAsBase64(3), - /** The PlayReady License Acquisition Url to use for common encryption. */ - PlayReadyLicenseAcquisitionUrl(4), - /** The PlayReady Custom Attributes to add to the PlayReady Content Header. */ - PlayReadyCustomAttributes(5), - /** The initialization vector to use for envelope encryption. */ - EnvelopeEncryptionIV(6), - /** Widevine DRM Acquisition Url to use for common encryption. */ - WidevineLicenseAcquisitionUrl(7), - /** Base Widevine url that will have KID= appended */ - WidevineBaseLicenseAcquisitionUrl(8), - /** FairPlay license acquisition URL. */ - FairPlayLicenseAcquisitionUrl(9), - /** Base FairPlay license acquisition URL that will have KID= appended. */ - FairPlayBaseLicenseAcquisitionUrl(10), - /** Initialization Vector that will be used for encrypting the content. Must match - IV in the AssetDeliveryPolicy. */ - CommonEncryptionIVForCbcs(11); - - /** The AssetDeliveryPolicyType code. */ - private int assetDeliveryPolicyConfigurationKey; - - /** - * Instantiates a new AssetDeliveryPolicyConfigurationKey. - * - * @param assetDeliveryPolicyConfigurationKey - * the AssetDeliveryPolicyConfigurationKey code - */ - private AssetDeliveryPolicyConfigurationKey(int assetDeliveryPolicyConfigurationKey) { - this.assetDeliveryPolicyConfigurationKey = assetDeliveryPolicyConfigurationKey; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return assetDeliveryPolicyConfigurationKey; - } - - /** - * Create an AssetDeliveryPolicyConfigurationKey instance based on the given integer. - * - * @param option - * the integer value of option - * @return The AssetDeliveryPolicyType - */ - public static AssetDeliveryPolicyConfigurationKey fromCode(int option) { - switch (option) { - case 0: - return AssetDeliveryPolicyConfigurationKey.None; - case 1: - return AssetDeliveryPolicyConfigurationKey.EnvelopeKeyAcquisitionUrl; - case 2: - return AssetDeliveryPolicyConfigurationKey.EnvelopeBaseKeyAcquisitionUrl; - case 3: - return AssetDeliveryPolicyConfigurationKey.EnvelopeEncryptionIVAsBase64; - case 4: - return AssetDeliveryPolicyConfigurationKey.PlayReadyLicenseAcquisitionUrl; - case 5: - return AssetDeliveryPolicyConfigurationKey.PlayReadyCustomAttributes; - case 6: - return AssetDeliveryPolicyConfigurationKey.EnvelopeEncryptionIV; - case 7: - return AssetDeliveryPolicyConfigurationKey.WidevineLicenseAcquisitionUrl; - case 8: - return AssetDeliveryPolicyConfigurationKey.WidevineBaseLicenseAcquisitionUrl; - case 9: - return AssetDeliveryPolicyConfigurationKey.FairPlayLicenseAcquisitionUrl; - case 10: - return AssetDeliveryPolicyConfigurationKey.FairPlayBaseLicenseAcquisitionUrl; - case 11: - return AssetDeliveryPolicyConfigurationKey.CommonEncryptionIVForCbcs; - default: - throw new InvalidParameterException("option"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyInfo.java deleted file mode 100644 index 4665ce3bf620..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyInfo.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; -import java.util.EnumSet; -import java.util.Map; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetDeliveryPolicyRestType; - -/** - * Type containing data about asset delivery policy. - * - */ -public class AssetDeliveryPolicyInfo extends ODataEntity { - - /** - * Creates a new {@link AssetDeliveryPolicyInfo} wrapping the given ATOM - * entry and content objects. - * - * @param entry - * the entry - * @param content - * the content - */ - public AssetDeliveryPolicyInfo(EntryType entry, AssetDeliveryPolicyRestType content) { - super(entry, content); - } - - /** - * Get the asset delivery policy id. - * - * @return the id. - */ - public String getId() { - return getContent().getId(); - } - - /** - * Get the asset delivery policy name. - * - * @return the name. - */ - public String getName() { - return getContent().getName(); - } - - /** - * Get the asset delivery policy type. - * - * @return the type. - */ - public AssetDeliveryPolicyType getAssetDeliveryPolicyType() { - return AssetDeliveryPolicyType.fromCode(getContent().getAssetDeliveryPolicyType()); - } - - /** - * Get the asset delivery policy protocol. - * - * @return the protocol. - */ - public EnumSet getAssetDeliveryProtocol() { - return AssetDeliveryProtocol.protocolsFromBits(getContent().getAssetDeliveryProtocol()); - } - - /** - * Get the asset delivery policy configuration. - * - * @return the configuration. - */ - public Map getAssetDeliveryConfiguration() { - return getContent().getAssetDeliveryConfiguration(); - } - - /** - * Get the asset delivery policy creation date. - * - * @return the creation date. - */ - public Date getCreated() { - return getContent().getCreated(); - } - - /** - * Get last date where any asset delivery policy's property was changed. - * - * @return the last date where any property was changed. - */ - public Date getLastModified() { - return getContent().getLastModified(); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyType.java deleted file mode 100644 index b1aab0531623..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyType.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Specifies the AssetDeliveryPolicyType. - */ -public enum AssetDeliveryPolicyType { - - /** Delivery Policy Type not set. An invalid value. */ - None(0), - /** The Asset should not be delivered via this AssetDeliveryProtocol. */ - Blocked(1), - /** Do not apply dynamic encryption to the asset. */ - NoDynamicEncryption(2), - /** Apply Dynamic Envelope encryption. */ - DynamicEnvelopeEncryption(3), - /** Apply Dynamic Common encryption. */ - DynamicCommonEncryption(4), - /** Apply Dynamic Common encryption with cbcs */ - DynamicCommonEncryptionCbcs(5); - - - /** The AssetDeliveryPolicyType code. */ - private int assetDeliveryPolicyTypeCode; - - /** - * Instantiates a new AssetDeliveryPolicyType. - * - * @param assetDeliveryPolicyTypeCode - * the AssetDeliveryPolicyType code - */ - private AssetDeliveryPolicyType(int assetDeliveryPolicyTypeCode) { - this.assetDeliveryPolicyTypeCode = assetDeliveryPolicyTypeCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return assetDeliveryPolicyTypeCode; - } - - /** - * Create an AssetDeliveryPolicyType instance based on the given integer. - * - * @param option - * the integer value of option - * @return The AssetDeliveryPolicyType - */ - public static AssetDeliveryPolicyType fromCode(int option) { - switch (option) { - case 0: - return AssetDeliveryPolicyType.None; - case 1: - return AssetDeliveryPolicyType.Blocked; - case 2: - return AssetDeliveryPolicyType.NoDynamicEncryption; - case 3: - return AssetDeliveryPolicyType.DynamicEnvelopeEncryption; - case 4: - return AssetDeliveryPolicyType.DynamicCommonEncryption; - case 5: - return AssetDeliveryPolicyType.DynamicCommonEncryptionCbcs; - default: - throw new InvalidParameterException("option"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryProtocol.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryProtocol.java deleted file mode 100644 index ad0721519bd5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryProtocol.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.EnumSet; - -/** - * - * Specifies the protocol of an AssetDeliveryPolicy. - * - */ -public enum AssetDeliveryProtocol { - - /** No protocols. */ - None(0), - /** Smooth streaming protocol. */ - SmoothStreaming (1), - /** MPEG Dynamic Adaptive Streaming over HTTP (DASH). */ - Dash(2), - /** Apple HTTP Live Streaming protocol. */ - HLS(4), - /** Adobe HTTP Dynamic Streaming (HDS). */ - Hds(8), - /** Include all protocols */ - All(0xFFFF); - - /** The content key type code. */ - private int falgValue; - - /** - * Instantiates a new content key type. - * - * @param contentKeyTypeCode - * the content key type code - */ - private AssetDeliveryProtocol(int falgValue) { - this.falgValue = falgValue; - } - - /** - * Gets the flags value. - * - * @return the flags value - */ - public int getFlagValue() { - return falgValue; - } - - /** - * Given an integer representing the protocols as a bit vector, convert it - * into an EnumSet<AssetDeliveryProtocol> object - * containing the correct protocols * - * - * @param bits - * The bit vector of protocols - * @return The set of protocols in an EnumSet object. - */ - public static EnumSet protocolsFromBits(int bits) { - EnumSet perms = EnumSet - .of(AssetDeliveryProtocol.None); - - for (AssetDeliveryProtocol p : AssetDeliveryProtocol.values()) { - if ((bits & p.getFlagValue()) == p.getFlagValue()) { - perms.remove(AssetDeliveryProtocol.None); - perms.add(p); - } - } - - return perms; - } - - /** - * Convert an EnumSet containing protocols into the - * corresponding integer bit vector to be passed to Media services. - * - * @param perms - * The protocols - * @return The bit vector to go out over the wire. - */ - public static int bitsFromProtocols(EnumSet protos) { - int result = 0; - - for (AssetDeliveryProtocol p : protos) { - result |= p.getFlagValue(); - } - - return result; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFile.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFile.java deleted file mode 100644 index 1b2178e02831..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFile.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityProxyData; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.AssetFileType; -import com.sun.jersey.api.client.GenericType; - -public final class AssetFile { - private static final String ENTITY_SET = "Files"; - - // Prevent instantiation - private AssetFile() { - } - - public static Creator create(String parentAssetId, String name) { - return new Creator(parentAssetId, name); - } - - public static final class Creator extends - EntityOperationSingleResultBase implements - EntityCreateOperation { - private final String parentAssetId; - private final String name; - private String contentChecksum; - private Long contentFileSize; - private String encryptionKeyId; - private String encryptionScheme; - private String encryptionVersion; - private String initializationVector; - private Boolean isEncrypted; - private Boolean isPrimary; - private String mimeType; - - private Creator(String parentAssetId, String name) { - super(ENTITY_SET, AssetFileInfo.class); - this.parentAssetId = parentAssetId; - this.name = name; - } - - @Override - public Object getRequestContents() throws ServiceException { - AssetFileType content = new AssetFileType().setName(name) - .setParentAssetId(parentAssetId) - .setContentChecksum(contentChecksum) - .setContentFileSize(contentFileSize) - .setEncryptionKeyId(encryptionKeyId) - .setEncryptionScheme(encryptionScheme) - .setEncryptionVersion(encryptionVersion) - .setInitializationVector(initializationVector) - .setIsEncrypted(isEncrypted).setIsPrimary(isPrimary) - .setMimeType(mimeType); - - return content; - } - - /** - * @param contentChecksum - * the contentChecksum to set - */ - public Creator setContentChecksum(String contentChecksum) { - this.contentChecksum = contentChecksum; - return this; - } - - /** - * @param contentFileSize - * the contentFileSize to set - */ - public Creator setContentFileSize(Long contentFileSize) { - this.contentFileSize = contentFileSize; - return this; - } - - /** - * @param encryptionKeyId - * the encryptionKeyId to set - */ - public Creator setEncryptionKeyId(String encryptionKeyId) { - this.encryptionKeyId = encryptionKeyId; - return this; - } - - /** - * @param encryptionScheme - * the encryptionScheme to set - */ - public Creator setEncryptionScheme(String encryptionScheme) { - this.encryptionScheme = encryptionScheme; - return this; - } - - /** - * @param encryptionVersion - * the encryptionVersion to set - */ - public Creator setEncryptionVersion(String encryptionVersion) { - this.encryptionVersion = encryptionVersion; - return this; - } - - /** - * @param initializationVector - * the initializationVector to set - */ - public Creator setInitializationVector(String initializationVector) { - this.initializationVector = initializationVector; - return this; - } - - /** - * @param isEncrypted - * the isEncrypted to set - */ - public Creator setIsEncrypted(Boolean isEncrypted) { - this.isEncrypted = isEncrypted; - return this; - } - - /** - * @param isPrimary - * the isPrimary to set - */ - public Creator setIsPrimary(Boolean isPrimary) { - this.isPrimary = isPrimary; - return this; - } - - /** - * @param mimeType - * the mimeType to set - */ - public Creator setMimeType(String mimeType) { - this.mimeType = mimeType; - return this; - } - - } - - /** - * Call the CreateFileInfos action on the server for the given asset - * - * @param assetId - * asset to create file infos for - * @return The action operation object to pass to rest proxy. - * @throws UnsupportedEncodingException - */ - public static EntityActionOperation createFileInfos(String assetId) { - String encodedId; - try { - encodedId = URLEncoder.encode(assetId, "UTF-8"); - } catch (UnsupportedEncodingException ex) { - // This can never happen unless JVM is broken - throw new RuntimeException(ex); - } - return new DefaultActionOperation("CreateFileInfos").addQueryParameter( - "assetid", "'" + encodedId + "'"); - } - - /** - * Call the service to get a single asset file entity - * - * @param assetFileId - * id of file to get - * @return the get operation to pass to rest proxy - */ - public static EntityGetOperation get(String assetFileId) { - return new DefaultGetOperation(ENTITY_SET, assetFileId, - AssetFileInfo.class); - } - - /** - * Calls the service to list all files - * - * @return The list operation to pass to rest proxy. - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation that will list all the AssetFiles at the given link. - * - * @param link - * Link to request AssetFiles from. - * @return The list operation. - */ - public static DefaultListOperation list( - LinkInfo link) { - return new DefaultListOperation(link.getHref(), - new GenericType>() { - }); - } - - public static Updater update(String assetFileId) { - return new Updater(assetFileId); - } - - public static final class Updater extends EntityOperationBase implements - EntityUpdateOperation { - private String contentChecksum; - private Long contentFileSize; - private String encryptionKeyId; - private String encryptionScheme; - private String encryptionVersion; - private String initializationVector; - private Boolean isEncrypted; - private Boolean isPrimary; - private String mimeType; - - private Updater(String assetFileId) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, - assetFileId)); - } - - @Override - public Object getRequestContents() { - return new AssetFileType().setContentChecksum(contentChecksum) - .setContentFileSize(contentFileSize) - .setEncryptionKeyId(encryptionKeyId) - .setEncryptionScheme(encryptionScheme) - .setEncryptionVersion(encryptionVersion) - .setInitializationVector(initializationVector) - .setIsEncrypted(isEncrypted).setIsPrimary(isPrimary) - .setMimeType(mimeType); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media - * .entityoperations.EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - // Deliberately empty - } - - /** - * @param contentChecksum - * the contentChecksum to set - */ - public Updater setContentChecksum(String contentChecksum) { - this.contentChecksum = contentChecksum; - return this; - } - - /** - * @param contentFileSize - * the contentFileSize to set - */ - public Updater setContentFileSize(Long contentFileSize) { - this.contentFileSize = contentFileSize; - return this; - } - - /** - * @param encryptionKeyId - * the encryptionKeyId to set - */ - public Updater setEncryptionKeyId(String encryptionKeyId) { - this.encryptionKeyId = encryptionKeyId; - return this; - } - - /** - * @param encryptionScheme - * the encryptionScheme to set - */ - public Updater setEncryptionScheme(String encryptionScheme) { - this.encryptionScheme = encryptionScheme; - return this; - } - - /** - * @param encryptionVersion - * the encryptionVersion to set - */ - public Updater setEncryptionVersion(String encryptionVersion) { - this.encryptionVersion = encryptionVersion; - return this; - } - - /** - * @param initializationVector - * the initializationVector to set - */ - public Updater setInitializationVector(String initializationVector) { - this.initializationVector = initializationVector; - return this; - } - - /** - * @param isEncrypted - * the isEncrypted to set - */ - public Updater setIsEncrypted(Boolean isEncrypted) { - this.isEncrypted = isEncrypted; - return this; - } - - /** - * @param isPrimary - * the isPrimary to set - */ - public Updater setIsPrimary(Boolean isPrimary) { - this.isPrimary = isPrimary; - return this; - } - - /** - * @param mimeType - * the mimeType to set - */ - public Updater setMimeType(String mimeType) { - this.mimeType = mimeType; - return this; - } - - } - - /** - * Calls the service to delete an asset file entity - * - * @param assetFileId - * file to delete - * @return the delete operation object - */ - public static EntityDeleteOperation delete(String assetFileId) { - return new DefaultDeleteOperation(ENTITY_SET, assetFileId); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFileInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFileInfo.java deleted file mode 100644 index 813b6567dfe3..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFileInfo.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetFileType; - -/** - * The Class AssetFileInfo. - */ -public class AssetFileInfo extends ODataEntity { - - public AssetFileInfo(EntryType entry, AssetFileType content) { - super(entry, content); - } - - public AssetFileInfo() { - super(new AssetFileType()); - } - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return this.getContent().getId(); - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return this.getContent().getName(); - } - - /** - * Gets the content file size. - * - * @return the content file size - */ - public long getContentFileSize() { - return this.getContent().getContentFileSize(); - } - - /** - * Gets the parent asset id. - * - * @return the parent asset id - */ - public String getParentAssetId() { - return this.getContent().getParentAssetId(); - } - - /** - * Gets the encryption version. - * - * @return the encryption version - */ - public String getEncryptionVersion() { - return this.getContent().getEncryptionVersion(); - } - - /** - * Gets the encryption scheme. - * - * @return the encryption scheme - */ - public String getEncryptionScheme() { - return this.getContent().getEncryptionScheme(); - } - - /** - * Gets the checks if is encrypted. - * - * @return the checks if is encrypted - */ - public boolean getIsEncrypted() { - return this.getContent().getIsEncrypted(); - } - - /** - * Gets the encryption key id. - * - * @return the encryption key id - */ - public String getEncryptionKeyId() { - return this.getContent().getEncryptionKeyId(); - } - - /** - * Gets the initialization vector. - * - * @return the initialization vector - */ - public String getInitializationVector() { - return this.getContent().getInitializationVector(); - } - - /** - * Gets the checks if is primary. - * - * @return the checks if is primary - */ - public boolean getIsPrimary() { - return this.getContent().getIsPrimary(); - } - - /** - * Gets the last modified. - * - * @return the last modified - */ - public Date getLastModified() { - return this.getContent().getLastModified(); - } - - /** - * Gets the created. - * - * @return the created - */ - public Date getCreated() { - return this.getContent().getCreated(); - } - - /** - * Gets the mime type. - * - * @return the mime type - */ - public String getMimeType() { - return this.getContent().getMimeType(); - } - - /** - * Gets the content checksum. - * - * @return the content checksum - */ - public String getContentChecksum() { - return this.getContent().getContentChecksum(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetInfo.java deleted file mode 100644 index daa2e7ce6627..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetInfo.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; - -/** - * Data about a Media Services Asset entity. - * - */ -public class AssetInfo extends ODataEntity { - - /** - * Instantiates a new asset info. - * - * @param entry - * the entry - * @param content - * the content - */ - public AssetInfo(EntryType entry, AssetType content) { - super(entry, content); - } - - /** - * Get the asset id. - * - * @return the id - */ - public String getId() { - return getContent().getId(); - } - - /** - * Get the asset name. - * - * @return the name - */ - public String getName() { - return this.getContent().getName(); - } - - /** - * Get the asset state. - * - * @return the state - */ - public AssetState getState() { - return AssetState.fromCode(getContent().getState()); - } - - /** - * Get the creation date. - * - * @return the date - */ - public Date getCreated() { - return this.getContent().getCreated(); - } - - /** - * Get last modified date. - * - * @return the date - */ - public Date getLastModified() { - return getContent().getLastModified(); - } - - /** - * Get the alternate id. - * - * @return the id - */ - public String getAlternateId() { - return getContent().getAlternateId(); - } - - /** - * Get the options. - * - * @return the options - */ - public AssetOption getOptions() { - return AssetOption.fromCode(getContent().getOptions()); - } - - /** - * Get the URI of the blob storage container of the specified Asset. - * - * @return the URI of the blob storage container of the specified Asset. - */ - public String getUri() { - return getContent().getUri(); - } - - /** - * Get the Name of the storage account that contains the asset’s blob container. - * - * @return the Name of the storage account that contains the asset’s blob container. - */ - public String getStorageAccountName() { - return getContent().getStorageAccountName(); - } - - /** - * Get a link to the asset's files - * - * @return the link - */ - public LinkInfo getAssetFilesLink() { - return this. getRelationLink("Files"); - } - - /** - * Get a link to the asset's content keys - * - * @return the link - */ - public LinkInfo getContentKeysLink() { - return this. getRelationLink("ContentKeys"); - } - - /** - * Get a link to the asset's locators - * - * @return the link - */ - public LinkInfo getLocatorsLink() { - return this. getRelationLink("Locators"); - } - - /** - * Get a link to this asset's parents - * - * @return the link - */ - public LinkInfo getParentAssetsLink() { - return this. getRelationLink("ParentAssets"); - } - - /** - * Get a link to this asset's delivery policies - * - * @return the link - */ - public LinkInfo getDeliveryPoliciesLink() { - return this. getRelationLink("DeliveryPolicies"); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetOption.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetOption.java deleted file mode 100644 index ff0984205dec..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetOption.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Specifies the options for encryption. - */ -public enum AssetOption { - - /** The None. */ - None(0), - /** The Storage encrypted. */ - StorageEncrypted(1), - /** The Common encryption protected. */ - CommonEncryptionProtected(2); - - /** The encryption option code. */ - private int encryptionOptionCode; - - /** - * Instantiates a new encryption option. - * - * @param encryptionOptionCode - * the encryption option code - */ - private AssetOption(int encryptionOptionCode) { - this.encryptionOptionCode = encryptionOptionCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return encryptionOptionCode; - } - - /** - * Create an AssetOption instance based on the given integer. - * - * @param option - * the integer value of option - * @return The AssetOption - */ - public static AssetOption fromCode(int option) { - switch (option) { - case 0: - return AssetOption.None; - case 1: - return AssetOption.StorageEncrypted; - case 2: - return AssetOption.CommonEncryptionProtected; - default: - throw new InvalidParameterException("option"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetState.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetState.java deleted file mode 100644 index bbadf9a1bc20..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/AssetState.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Specifies the states of the asset. - */ -public enum AssetState { - - /** The Initialized. */ - Initialized(0), - /** The Published. */ - Published(1), - /** The Deleted. */ - Deleted(2); - - /** The asset state code. */ - private int assetStateCode; - - /** - * Instantiates a new asset state. - * - * @param assetStateCode - * the asset state code - */ - private AssetState(int assetStateCode) { - this.assetStateCode = assetStateCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return assetStateCode; - } - - /** - * Create an AssetState instance from the corresponding int. - * - * @param state - * state as integer - * @return new AssetState instance - */ - public static AssetState fromCode(int state) { - switch (state) { - case 0: - return AssetState.Initialized; - case 1: - return AssetState.Published; - case 2: - return AssetState.Deleted; - default: - throw new InvalidParameterException("state"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKey.java deleted file mode 100644 index 89d9caba04d5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKey.java +++ /dev/null @@ -1,438 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.security.InvalidParameterException; - -import javax.ws.rs.core.MediaType; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import javax.xml.transform.stream.StreamSource; - -import org.codehaus.jettison.json.JSONException; -import org.codehaus.jettison.json.JSONObject; - -import com.microsoft.windowsazure.core.pipeline.PipelineHelpers; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultEntityTypeActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityTypeActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyRestType; -import com.microsoft.windowsazure.services.media.implementation.content.RebindContentKeyType; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate content key entities. - * - */ -public final class ContentKey { - - /** The Constant ENTITY_SET. */ - private static final String ENTITY_SET = "ContentKeys"; - - /** - * Instantiates a new content key. - */ - private ContentKey() { - } - - /** - * Creates an operation to create a new content key. - * - * @param id - * the id - * @param contentKeyType - * the content key type - * @param encryptedContentKey - * the encrypted content key - * @return The operation - */ - public static Creator create(String id, ContentKeyType contentKeyType, - String encryptedContentKey) { - return new Creator(id, contentKeyType, encryptedContentKey); - } - - /** - * The Class Creator. - */ - public static class Creator extends - EntityOperationSingleResultBase implements - EntityCreateOperation { - - /** The id. */ - private final String id; - - /** The content key type. */ - private final ContentKeyType contentKeyType; - - /** The encrypted content key. */ - private final String encryptedContentKey; - - /** The name. */ - private String name; - - /** The checksum. */ - private String checksum; - - /** The protection key id. */ - private String protectionKeyId; - - /** The protection key type. */ - private ProtectionKeyType protectionKeyType; - - /** - * Instantiates a new creator. - * - * @param id - * the id - * @param contentKeyType - * the content key type - * @param encryptedContentKey - * the encrypted content key - */ - public Creator(String id, ContentKeyType contentKeyType, - String encryptedContentKey) { - super(ENTITY_SET, ContentKeyInfo.class); - - this.id = id; - this.contentKeyType = contentKeyType; - this.encryptedContentKey = encryptedContentKey; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityCreateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - ContentKeyRestType contentKeyRestType = new ContentKeyRestType(); - contentKeyRestType.setId(id); - if (contentKeyType != null) { - contentKeyRestType.setContentKeyType(contentKeyType.getCode()); - } - if (protectionKeyType != null) { - contentKeyRestType.setProtectionKeyType(protectionKeyType - .getCode()); - } - contentKeyRestType.setEncryptedContentKey(encryptedContentKey); - contentKeyRestType.setName(name); - contentKeyRestType.setChecksum(checksum); - contentKeyRestType.setProtectionKeyId(protectionKeyId); - return contentKeyRestType; - } - - /** - * Sets the name. - * - * @param name - * the name - * @return the creator - */ - public Creator setName(String name) { - this.name = name; - return this; - } - - /** - * Sets the checksum. - * - * @param checksum - * the checksum - * @return the creator - */ - public Creator setChecksum(String checksum) { - this.checksum = checksum; - return this; - } - - /** - * Sets the protection key id. - * - * @param protectionKeyId - * the protection key id - * @return the creator - */ - public Creator setProtectionKeyId(String protectionKeyId) { - this.protectionKeyId = protectionKeyId; - return this; - } - - /** - * Sets the protection key type. - * - * @param protectionKeyType - * the protection key type - * @return the creator - */ - public Creator setProtectionKeyType(ProtectionKeyType protectionKeyType) { - this.protectionKeyType = protectionKeyType; - return this; - } - } - - /** - * Create an operation that will retrieve the given content key. - * - * @param contentKeyId - * id of content key to retrieve - * @return the operation - */ - public static EntityGetOperation get(String contentKeyId) { - return new DefaultGetOperation(ENTITY_SET, - contentKeyId, ContentKeyInfo.class); - } - - /** - * Create an operation that will retrieve all access policies. - * - * @return the operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation that will list all the content keys at the given - * link. - * - * @param link - * Link to request content keys from. - * @return The list operation. - */ - public static DefaultListOperation list( - LinkInfo link) { - return new DefaultListOperation(link.getHref(), - new GenericType>() { - }); - } - - /** - * Create an operation to delete the given content key. - * - * @param contentKeyId - * id of content key to delete - * @return the delete operation - */ - public static EntityDeleteOperation delete(String contentKeyId) { - return new DefaultDeleteOperation(ENTITY_SET, contentKeyId); - } - - /** - * Rebind content key with specified content key and X509 Certificate. - * - * @param contentKeyId - * the content key id - * @param x509Certificate - * the x509 certificate - * @return the entity action operation - */ - public static EntityTypeActionOperation rebind(String contentKeyId, - String x509Certificate) { - return new RebindContentKeyActionOperation(contentKeyId, - x509Certificate); - } - - /** - * Rebind content key with specified content key Id. - * - * @param contentKeyId - * the content key id - * @return the entity action operation - */ - public static EntityTypeActionOperation rebind(String contentKeyId) { - return rebind(contentKeyId, ""); - } - - private static class RebindContentKeyActionOperation extends - DefaultEntityTypeActionOperation { - private final JAXBContext jaxbContext; - - private final Unmarshaller unmarshaller; - - public RebindContentKeyActionOperation(String contentKeyId, - String x509Certificate) { - super("RebindContentKey"); - - String escapedContentKeyId; - try { - escapedContentKeyId = URLEncoder.encode(contentKeyId, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new InvalidParameterException( - "UTF-8 encoding is not supported."); - } - this.addQueryParameter("x509Certificate", "'" + x509Certificate - + "'"); - this.addQueryParameter("id", "'" + escapedContentKeyId + "'"); - - try { - jaxbContext = JAXBContext - .newInstance(RebindContentKeyType.class); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - - try { - unmarshaller = jaxbContext.createUnmarshaller(); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - } - - @Override - public String processTypeResponse(ClientResponse clientResponse) { - PipelineHelpers.throwIfNotSuccess(clientResponse); - RebindContentKeyType rebindContentKeyType = parseResponse(clientResponse); - return rebindContentKeyType.getContentKey(); - } - - private RebindContentKeyType parseResponse(ClientResponse clientResponse) { - InputStream inputStream = clientResponse.getEntityInputStream(); - JAXBElement rebindContentKeyTypeJaxbElement; - try { - rebindContentKeyTypeJaxbElement = unmarshaller.unmarshal( - new StreamSource(inputStream), - RebindContentKeyType.class); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - return rebindContentKeyTypeJaxbElement.getValue(); - } - - } - - - public static KeyDeliveryUrlGetter getKeyDeliveryUrl(String contentKeyId, ContentKeyDeliveryType contentKeyDeliveryType) { - return new KeyDeliveryUrlGetter(contentKeyId, contentKeyDeliveryType); - } - - private static class KeyDeliveryUrlGetter extends - EntityOperationSingleResultBase implements - EntityCreateOperation { - /** The contentKeyId */ - private final String contentKeyId; - - /** content Key delivery type */ - private final ContentKeyDeliveryType contentKeyDeliveryType; - - public KeyDeliveryUrlGetter(String contentKeyId, - ContentKeyDeliveryType contentKeyDeliveryType) { - super(ENTITY_SET, String.class); - - this.contentKeyId = contentKeyId; - this.contentKeyDeliveryType = contentKeyDeliveryType; - } - - @Override - public String getUri() { - String escapedEntityId; - try { - escapedEntityId = URLEncoder.encode(contentKeyId, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new InvalidParameterException( - "UTF-8 encoding is not supported."); - } - return String.format("%s('%s')/GetKeyDeliveryUrl", ENTITY_SET, escapedEntityId); - } - - @Override - public Object getRequestContents() throws ServiceException { - JSONObject document = new JSONObject(); - try { - document.put("keyDeliveryType", contentKeyDeliveryType.getCode()); - } catch (JSONException e) { - throw new ServiceException("JSON Exception", e); - } - return document.toString(); - } - - @Override - public MediaType getContentType() { - return MediaType.APPLICATION_JSON_TYPE; - } - - @Override - public MediaType getAcceptType() { - return MediaType.APPLICATION_JSON_TYPE; - } - - @Override - public Object processResponse(Object rawResponse) throws ServiceException { - try { - JSONObject object = new JSONObject(rawResponse.toString()); - return object.getString("value"); - } catch (JSONException e) { - throw new ServiceException(e); - } - } - } - - /** Updates a ContentKey with an ContentKeyAuthorizationPolicyId - * - * @param contentKeyId The id of the ContentKey to be updated. - * @param contentKeyAuthorizationPolicyId The id of the ContentKeyAuthorizationPolicy - * @return Entity Operation - */ - public static Updater update(String contentKeyId, String contentKeyAuthorizationPolicyId) { - return new Updater(contentKeyId, contentKeyAuthorizationPolicyId); - } - - public static class Updater extends EntityOperationBase implements - EntityUpdateOperation { - - private String contentKeyAuthorizationPolicyId; - - protected Updater(String contentKeyId, String contentKeyAuthorizationPolicyId) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, - contentKeyId)); - this.contentKeyAuthorizationPolicyId = contentKeyAuthorizationPolicyId; - } - - @Override - public MediaType getContentType() { - return MediaType.APPLICATION_JSON_TYPE; - } - - @Override - public Object getRequestContents() { - JSONObject document = new JSONObject(); - try { - document.put("AuthorizationPolicyId", contentKeyAuthorizationPolicyId); - } catch (JSONException e) { - throw new RuntimeException("JSON Exception", e); - } - return document.toString(); - } - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java deleted file mode 100644 index 608b03d9ac94..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.io.UnsupportedEncodingException; -import java.net.URI; -import java.net.URLEncoder; -import java.security.InvalidParameterException; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityLinkOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUnlinkOperation; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyType; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate Content Key Authorization Policy - * entities. - * - */ -public final class ContentKeyAuthorizationPolicy { - - private static final String ENTITY_SET = "ContentKeyAuthorizationPolicies"; - - private ContentKeyAuthorizationPolicy() { - } - - /** - * Creates an operation to create a new ContentKeyAuthorizationPolicy - * - * @param name - * name of the content key authorization policy - * @return The operation - */ - public static EntityCreateOperation create(String name) { - return new Creator(name); - } - - private static class Creator extends EntityOperationSingleResultBase - implements EntityCreateOperation { - - private String name; - - public Creator(String name) { - - super(ENTITY_SET, ContentKeyAuthorizationPolicyInfo.class); - - this.name = name; - } - - @Override - public Object getRequestContents() { - return new ContentKeyAuthorizationPolicyType().setName(name); - } - - } - - /** - * Create an operation that will retrieve the given content key - * authorization policy - * - * @param contentKeyAuthorizationPolicyId - * id of content key authorization policy to retrieve - * @return the operation - */ - public static EntityGetOperation get(String contentKeyAuthorizationPolicyId) { - return new DefaultGetOperation(ENTITY_SET, contentKeyAuthorizationPolicyId, - ContentKeyAuthorizationPolicyInfo.class); - } - - /** - * Create an operation that will retrieve the content key authorization - * policy at the given link - * - * @param link - * the link - * @return the operation - */ - public static EntityGetOperation get( - LinkInfo link) { - return new DefaultGetOperation(link.getHref(), - ContentKeyAuthorizationPolicyInfo.class); - } - - /** - * Create an operation that will retrieve all content key authorization - * polices - * - * @return the operation - */ - - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation to delete the given content key authorization policy - * - * @param contentKeyAuthorizationPolicyId - * id of content key authorization policy to delete - * @return the delete operation - */ - - public static EntityDeleteOperation delete(String contentKeyAuthorizationPolicyId) { - return new DefaultDeleteOperation(ENTITY_SET, contentKeyAuthorizationPolicyId); - } - - /** - * Link a content key authorization policy options. - * - * @param contentKeyAuthorizationPolicyId - * the content key authorization policy id - * @param contentKeyAuthorizationPolicyOptionId - * the content key authorization policy option id - * @return the entity action operation - */ - public static EntityLinkOperation linkOptions(String contentKeyAuthorizationPolicyId, - String contentKeyAuthorizationPolicyOptionId) { - String escapedContentKeyId = null; - try { - escapedContentKeyId = URLEncoder.encode(contentKeyAuthorizationPolicyOptionId, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new InvalidParameterException("contentKeyId"); - } - URI contentKeyUri = URI - .create(String.format("ContentKeyAuthorizationPolicyOptions('%s')", escapedContentKeyId)); - return new EntityLinkOperation(ENTITY_SET, contentKeyAuthorizationPolicyId, "Options", contentKeyUri); - } - - /** - * Unlink content key authorization policy options. - * - * @param assetId - * the asset id - * @param adpId - * the Asset Delivery Policy id - * @return the entity action operation - */ - public static EntityUnlinkOperation unlinkOptions(String contentKeyAuthorizationPolicyId, - String contentKeyAuthorizationPolicyOptionId) { - return new EntityUnlinkOperation(ENTITY_SET, contentKeyAuthorizationPolicyId, "Options", contentKeyAuthorizationPolicyOptionId); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyInfo.java deleted file mode 100644 index 7cdcff50b84b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyInfo.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyType; - -/** - * Type containing data about content key authorization policy options. - * - */ -public class ContentKeyAuthorizationPolicyInfo extends ODataEntity { - - /** - * Creates a new {@link ContentKeyAuthorizationPolicyInfo} wrapping the - * given ATOM entry and content objects. - * - * @param entry - * the entry - * @param content - * the content - */ - public ContentKeyAuthorizationPolicyInfo(EntryType entry, ContentKeyAuthorizationPolicyType content) { - super(entry, content); - } - - /** - * Get the content key authorization policy id. - * - * @return the id. - */ - public String getId() { - return getContent().getId(); - } - - /** - * Get the content key authorization policy name. - * - * @return the name. - */ - public String getName() { - return getContent().getName(); - } - - /** - * Get a link to the content key authorization policy's options - * - * @return the link to the content key authorization policy's options - */ - public LinkInfo getOptions() { - return this. getRelationLink("Options"); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOption.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOption.java deleted file mode 100644 index cd6b6479c000..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOption.java +++ /dev/null @@ -1,232 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.ArrayList; -import java.util.List; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyOptionType; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyRestrictionType; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate Access Policy entities. - * - */ -public final class ContentKeyAuthorizationPolicyOption { - - private static final String ENTITY_SET = "ContentKeyAuthorizationPolicyOptions"; - - private ContentKeyAuthorizationPolicyOption() { - } - - /** - * Creates an operation to create a new content key authorization options - * - * @param name - * Friendly name of the authorization policy - * @param keyDeliveryType - * Delivery method of the content key to the client - * @param keyDeliveryConfiguration - * Xml data, specific to the key delivery type that defines how - * the key is delivered to the client - * @param restrictions - * Requirements defined in each restriction must be met in order - * to deliver the key using the key delivery data - * @return The operation - */ - public static EntityCreateOperation create(String name, - int keyDeliveryType, String keyDeliveryConfiguration, - List restrictions) { - return new Creator(name, keyDeliveryType, keyDeliveryConfiguration, restrictions); - } - - private static class Creator extends EntityOperationSingleResultBase - implements EntityCreateOperation { - - private String name; - private int keyDeliveryType; - private String keyDeliveryConfiguration; - private List restrictions; - - public Creator(String name, int keyDeliveryType, String keyDeliveryConfiguration, - List restrictions) { - - super(ENTITY_SET, ContentKeyAuthorizationPolicyOptionInfo.class); - - this.name = name; - this.keyDeliveryType = keyDeliveryType; - this.keyDeliveryConfiguration = keyDeliveryConfiguration; - this.restrictions = new ArrayList(); - for (ContentKeyAuthorizationPolicyRestriction restriction : restrictions) { - this.restrictions.add(new ContentKeyAuthorizationPolicyRestrictionType().setName(restriction.getName()) - .setKeyRestrictionType(restriction.getKeyRestrictionType()) - .setRequirements(restriction.getRequirements())); - } - } - - @Override - public Object getRequestContents() { - return new ContentKeyAuthorizationPolicyOptionType().setName(name).setKeyDeliveryType(keyDeliveryType) - .setKeyDeliveryConfiguration(keyDeliveryConfiguration).setRestrictions(restrictions); - } - } - - /** - * - * - * Create an operation that will retrieve the given content key - * authorization policy option - * - * @param contentKeyAuthorizationPolicyOptionId - * id of content key authorization policy option to retrieve - * @return the operation - */ - public static EntityGetOperation get( - String contentKeyAuthorizationPolicyOptionId) { - return new DefaultGetOperation(ENTITY_SET, - contentKeyAuthorizationPolicyOptionId, ContentKeyAuthorizationPolicyOptionInfo.class); - } - - /** - * Create an operation that will list all the content keys authorization - * policy options at the given link. - * - * @param link - * Link to request content keys authorization policy options - * from. - * @return The list operation. - */ - public static DefaultListOperation list( - LinkInfo link) { - return new DefaultListOperation(link.getHref(), - new GenericType>() { - }); - } - - /** - * Create an operation that will retrieve all content key authorization - * policy options - * - * @return the operation - */ - - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation to delete the given content key authorization policy - * option - * - * @param contentKeyAuthorizationPolicyOptionId - * id of content key authorization policy option to delete - * @return the delete operation - */ - - public static EntityDeleteOperation delete(String contentKeyAuthorizationPolicyOptionId) { - return new DefaultDeleteOperation(ENTITY_SET, contentKeyAuthorizationPolicyOptionId); - } - - /** - * Create an operation that will update the given content key authorization policy option. - * - * @param contentKeyAuthorizationPolicyOptionId - * id of the acontent key authorization policy option to update - * @return the update operation - */ - public static Updater update(String contentKeyAuthorizationPolicyOptionId) { - return new Updater(contentKeyAuthorizationPolicyOptionId); - } - - /** - * The Class Updater. - */ - public static class Updater extends EntityOperationBase implements EntityUpdateOperation { - - private int keyDeliveryType; - private String keyDeliveryConfiguration; - private List restrictions; - - protected Updater(String contentKeyAuthorizationPolicyOptionId) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, - contentKeyAuthorizationPolicyOptionId)); - - } - - @Override - public Object getRequestContents() { - return new ContentKeyAuthorizationPolicyOptionType().setKeyDeliveryType(keyDeliveryType) - .setKeyDeliveryConfiguration(keyDeliveryConfiguration).setRestrictions(restrictions); - - } - - /** - * Set the protocol of the Asset Delivery Policy to be created. - * - * @param assetDeliveryProtocol - * The protocol - * @return The creator object (for call chaining) - */ - public Updater setKeyDeliveryType(int keyDeliveryType) { - this.keyDeliveryType = keyDeliveryType; - return this; - } - - /** - * Set the type of the Asset Delivery Policy to be created. - * - * @param assetDeliveryPolicyType - * The type - * @return The creator object (for call chaining) - */ - public Updater setKeyDeliveryConfiguration(String keyDeliveryConfiguration) { - this.keyDeliveryConfiguration = keyDeliveryConfiguration; - return this; - } - - /** - * Set the configuration of the Asset Delivery Policy to be created. - * - * @param assetDeliveryPolicyConfiguration - * The configuration - * @return The creator object (for call chaining) - */ - public Updater setRestrictions( - List restrictions) { - - this.restrictions = new ArrayList(); - for (ContentKeyAuthorizationPolicyRestriction restriction : restrictions) { - this.restrictions.add(new ContentKeyAuthorizationPolicyRestrictionType() - .setName(restriction.getName()) - .setKeyRestrictionType(restriction.getKeyRestrictionType()) - .setRequirements(restriction.getRequirements())); - } - return this; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOptionInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOptionInfo.java deleted file mode 100644 index 59b7ddd22b5a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOptionInfo.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.ArrayList; -import java.util.List; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyOptionType; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyRestrictionType; - -/** - * Type containing data about content key authorization policy options. - * - */ -public class ContentKeyAuthorizationPolicyOptionInfo extends ODataEntity { - - /** - * Creates a new {@link ContentKeyAuthorizationPolicyOptionInfo} wrapping - * the given ATOM entry and content objects. - * - * @param entry - * the entry - * @param content - * the content - */ - public ContentKeyAuthorizationPolicyOptionInfo(EntryType entry, ContentKeyAuthorizationPolicyOptionType content) { - super(entry, content); - } - - /** - * Get the access policy id. - * - * @return the id. - */ - public String getId() { - return getContent().getId(); - } - - /** - * Get the name. - * - * @return the name. - */ - public String getName() { - return getContent().getName(); - } - - /** - * Get the content key authorization policy options key delivery type. - * - * @return the key delivery type. - */ - public int getKeyDeliveryType() { - return getContent().getKeyDeliveryType(); - } - - /** - * Get the content key authorization policy options key delivery - * configuration. - * - * @return the key delivery configuration. - */ - public String getKeyDeliveryConfiguration() { - return getContent().getKeyDeliveryConfiguration(); - } - - /** - * Get the content key authorization policy options restrictions. - * - * @return the restrictions. - */ - public List getRestrictions() { - List result = new ArrayList(); - List restrictionsTypes = getContent().getRestrictions(); - - if (restrictionsTypes != null) { - for (ContentKeyAuthorizationPolicyRestrictionType restrictionType : restrictionsTypes) { - ContentKeyAuthorizationPolicyRestriction contentKeyAuthPolicyRestriction = new ContentKeyAuthorizationPolicyRestriction( - restrictionType.getName(), restrictionType.getKeyRestrictionType(), - restrictionType.getRequirements()); - result.add(contentKeyAuthPolicyRestriction); - } - } - - return result; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyRestriction.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyRestriction.java deleted file mode 100644 index 292d906edd6a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyRestriction.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -/** - * The Class ContentKeyAuthorizationPolicyRestriction. - */ -public class ContentKeyAuthorizationPolicyRestriction { - - public enum ContentKeyRestrictionType { - Open(0), - TokenRestricted(1), - IPRestricted(2); - - private final int value; - private ContentKeyRestrictionType(int value) { - this.value = value; - } - - public int getValue() { - return value; - } - - } - - private final String name; - - private final int keyRestrictionType; - - private final String requirements; - - /** - * Instantiates a new Content Key Authorization Policy Restriction - * - * @param name - * the name - * @param keyRestrictionType - * the keyRestrictionType - * @param requirements - * the requirements - */ - public ContentKeyAuthorizationPolicyRestriction(String name, int keyRestrictionType, String requirements) { - this.name = name; - this.keyRestrictionType = keyRestrictionType; - this.requirements = requirements; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return this.name; - } - - /** - * Gets the key restriction type. - * - * @return the key restriction type - */ - public int getKeyRestrictionType() { - return this.keyRestrictionType; - } - - /** - * Gets the requirements. - * - * @return the time requirements - */ - public String getRequirements() { - return this.requirements; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyDeliveryType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyDeliveryType.java deleted file mode 100644 index 60b00c6f3caa..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyDeliveryType.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Specifies the AssetDeliveryPolicyType. - */ -public enum ContentKeyDeliveryType { - - /** None. */ - None(0), - /** Use PlayReady License acquisition protocol. */ - PlayReadyLicense(1), - /** Use MPEG Baseline HTTP key protocol. */ - BaselineHttp(2), - /** Use Widevine license acquisition protocol. */ - Widevine(3), - /** Send FairPlay SPC to Key Delivery server and get CKC back */ - FairPlay(4); - - /** The AssetDeliveryPolicyType code. */ - private int contentKeyDeliveryType; - - /** - * Instantiates a new ContentKeyDeliveryType. - * - * @param contentKeyDeliveryType - * the ContentKeyDeliveryType code - */ - private ContentKeyDeliveryType(int contentKeyDeliveryType) { - this.contentKeyDeliveryType = contentKeyDeliveryType; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return contentKeyDeliveryType; - } - - /** - * Create an AssetDeliveryPolicyConfigurationKey instance based on the given integer. - * - * @param option - * the integer value of option - * @return The AssetDeliveryPolicyType - */ - public static ContentKeyDeliveryType fromCode(int option) { - switch (option) { - case 0: - return ContentKeyDeliveryType.None; - case 1: - return ContentKeyDeliveryType.PlayReadyLicense; - case 2: - return ContentKeyDeliveryType.BaselineHttp; - case 3: - return ContentKeyDeliveryType.Widevine; - case 4: - return ContentKeyDeliveryType.FairPlay; - default: - throw new InvalidParameterException("option"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfo.java deleted file mode 100644 index ec4666e646fe..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfo.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyRestType; - -/** - * The Class ContentKeyInfo. - */ -public class ContentKeyInfo extends ODataEntity { - - /** - * Instantiates a new content key info. - * - * @param entry - * the entry - * @param content - * the content - */ - public ContentKeyInfo(EntryType entry, ContentKeyRestType content) { - super(entry, content); - } - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return getContent().getId(); - } - - /** - * Gets the created. - * - * @return the created - */ - public Date getCreated() { - return getContent().getCreated(); - } - - /** - * Gets the last modified. - * - * @return the last modified - */ - public Date getLastModified() { - return getContent().getLastModified(); - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return getContent().getName(); - } - - /** - * Gets the check sum. - * - * @return the check sum - */ - public String getChecksum() { - return getContent().getChecksum(); - } - - /** - * Gets the protection key type. - * - * @return the protection key type - */ - public ProtectionKeyType getProtectionKeyType() { - return ProtectionKeyType.fromCode(getContent().getProtectionKeyType()); - } - - /** - * Gets the protection key id. - * - * @return the protection key id - */ - public String getProtectionKeyId() { - return getContent().getProtectionKeyId(); - } - - /** - * Gets the encrypted content key. - * - * @return the encrypted content key - */ - public String getEncryptedContentKey() { - return getContent().getEncryptedContentKey(); - } - - /** - * Gets the authorization policy id. - * - * @return the authorization policy id - */ - public String getAuthorizationPolicyId() { - return getContent().getAuthorizationPolicyId(); - } - - /** - * Gets the content key type. - * - * @return the content key type - */ - public ContentKeyType getContentKeyType() { - Integer contentKeyTypeInteger = getContent().getContentKeyType(); - ContentKeyType contentKeyType = null; - if (contentKeyTypeInteger != null) { - contentKeyType = ContentKeyType.fromCode(contentKeyTypeInteger); - } - return contentKeyType; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyType.java deleted file mode 100644 index fbb6542cbad0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyType.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * - * Specifies the type of a content key. - * - */ -public enum ContentKeyType { - - /** The Common encryption. */ - CommonEncryption(0), - /** The Storage encryption. */ - StorageEncryption(1), - /** The Configuration encryption. */ - ConfigurationEncryption(2), - /** The Envelope encryption. */ - EnvelopeEncryption(4), - /** Specifies a content key for common encryption with CBCS. */ - CommonEncryptionCbcs(6), - /** Application Secret key for FairPlay. */ - FairPlayASk (7), - /** Password for FairPlay application certificate. */ - FairPlayPfxPassword (8); - - /** The content key type code. */ - private int contentKeyTypeCode; - - /** - * Instantiates a new content key type. - * - * @param contentKeyTypeCode - * the content key type code - */ - private ContentKeyType(int contentKeyTypeCode) { - this.contentKeyTypeCode = contentKeyTypeCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return contentKeyTypeCode; - } - - /** - * From code. - * - * @param code - * the code - * @return the content key type - */ - public static ContentKeyType fromCode(int code) { - switch (code) { - case 0: - return ContentKeyType.CommonEncryption; - case 1: - return ContentKeyType.StorageEncryption; - case 2: - return ContentKeyType.ConfigurationEncryption; - case 4: - return ContentKeyType.EnvelopeEncryption; - case 6: - return ContentKeyType.CommonEncryptionCbcs; - case 7: - return ContentKeyType.FairPlayASk; - case 8: - return ContentKeyType.FairPlayPfxPassword; - default: - throw new InvalidParameterException("code"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnit.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnit.java deleted file mode 100644 index b4e2824fe884..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnit.java +++ /dev/null @@ -1,139 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.net.URI; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityProxyData; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.EncodingReservedUnitRestType; - -/** - * Class for updating EncodingReservedUnitTypes - * - */ -public final class EncodingReservedUnit { - - private static final String ENTITY_SET = "EncodingReservedUnitTypes"; - - private EncodingReservedUnit() { - } - - /** - * Get the EncodingReservedUnitTypes - * - * @return the operation - */ - public static EntityGetOperation get() { - return new DefaultGetOperation(ENTITY_SET, - EncodingReservedUnitInfo.class); - } - - /** - * Update the EncodingReservedUnitTypes - * @param encodingReservedUnitInfo - * - * @return the update operation - */ - public static Updater update(EncodingReservedUnitInfo encodingReservedUnitInfo) { - return new Updater(encodingReservedUnitInfo); - } - - /** - * The Class Updater. - */ - public static class Updater extends EntityOperationBase implements - EntityUpdateOperation { - - private int reservedUnitType; - private int currentReservedUnits; - - /** - * Instantiates a new updater. - * @param encodingReservedUnitInfo - * - * @param assetId - * the asset id - */ - protected Updater(final EncodingReservedUnitInfo encodingReservedUnitInfo) { - super(new EntityUriBuilder() { - @Override - public String getUri() { - URI uri = URI.create(String.format("%s(guid'%s')", ENTITY_SET, - encodingReservedUnitInfo.getAccountId())); - return uri.toString(); - } - }); - this.setReservedUnitType(encodingReservedUnitInfo.getReservedUnitType()); - this.setCurrentReservedUnits(encodingReservedUnitInfo.getCurrentReservedUnits()); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media - * .entityoperations.EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - // Deliberately empty - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityUpdateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - EncodingReservedUnitRestType encodingReservedUnitType = new EncodingReservedUnitRestType(); - encodingReservedUnitType.setAccountId(null); // never send account Id - encodingReservedUnitType.setCurrentReservedUnits(currentReservedUnits); - encodingReservedUnitType.setReservedUnitType(reservedUnitType); - return encodingReservedUnitType; - } - - /** - * Sets new quantity of reserved units. - * - * @param currentReservedUnits - * the new quantity of reserved units. - * @return Updater instance - */ - public Updater setCurrentReservedUnits(int currentReservedUnits) { - this.currentReservedUnits = currentReservedUnits; - return this; - } - - /** - * Sets new reserved units type. - * - * @param encodingReservedUnitType - * the new quantity of reserved units. - * @return Updater instance - */ - public Updater setReservedUnitType(EncodingReservedUnitType encodingReservedUnitType) { - this.reservedUnitType = encodingReservedUnitType.getCode(); - return this; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnitInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnitInfo.java deleted file mode 100644 index 81436e6a59c8..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnitInfo.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.EncodingReservedUnitRestType; - -/** - * Type containing data about access policies. - * - */ -public class EncodingReservedUnitInfo extends ODataEntity { - - /** - * Creates a new {@link EncodingReservedUnitInfo} wrapping the given ATOM entry and - * content objects. - * - * @param entry - * Entry containing this AccessPolicy data - * @param content - * Content with the AccessPolicy data - */ - public EncodingReservedUnitInfo(EntryType entry, EncodingReservedUnitRestType content) { - super(entry, content); - } - /** - * @return the accountId - */ - public String getAccountId() { - return getContent().getAccountId(); - } - - /** - * @return the reservedUnitType - */ - public EncodingReservedUnitType getReservedUnitType() { - return EncodingReservedUnitType.fromCode(getContent().getReservedUnitType()); - } - - /** - * @return the maxReservableUnits - */ - public int getMaxReservableUnits() { - return getContent().getMaxReservableUnits(); - } - - /** - * @return the currentReservedUnits - */ - public int getCurrentReservedUnits() { - return getContent().getCurrentReservedUnits(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnitType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnitType.java deleted file mode 100644 index 6e7b24194d17..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EncodingReservedUnitType.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Specifies the types of Encoding Reserved Units. - */ -public enum EncodingReservedUnitType { - - /** The Basic. */ - Basic(0), - /** The Standard. */ - Standard (1), - /** The Premium . */ - Premium (2); - - /** The Encoding Reserved Unit type code. */ - private int encodingReservedUnitType; - - /** - * Instantiates a new asset state. - * - * @param encodingReservedUnitType - * the EncodingReservedUnitType code - */ - private EncodingReservedUnitType(int encodingReservedUnitType) { - this.encodingReservedUnitType = encodingReservedUnitType; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return encodingReservedUnitType; - } - - /** - * Create an EncodingReservedUnitType instance from the corresponding int. - * - * @param type - * type as integer - * @return new EncodingReservedUnitType instance - */ - public static EncodingReservedUnitType fromCode(int state) { - switch (state) { - case 0: - return EncodingReservedUnitType.Basic; - case 1: - return EncodingReservedUnitType.Standard; - case 2: - return EncodingReservedUnitType.Premium; - default: - throw new InvalidParameterException("state"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EndPointType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EndPointType.java deleted file mode 100644 index 9a135b1645a8..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/EndPointType.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Enum defining the type of the end point. - */ -public enum EndPointType { - - /** Azure Queue. */ - AzureQueue(1); - - /** The code. */ - private int code; - - /** - * Instantiates a new end point type. - * - * @param code - * the code - */ - private EndPointType(int code) { - this.code = code; - } - - /** - * Get integer code corresponding to enum value. - * - * @return the code - */ - public int getCode() { - return code; - } - - /** - * Convert code into enum value. - * - * @param code - * the code - * @return the corresponding enum value - */ - public static EndPointType fromCode(int code) { - switch (code) { - case 1: - return AzureQueue; - default: - throw new InvalidParameterException("code"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ErrorDetail.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ErrorDetail.java deleted file mode 100644 index 7d3b9344bdf6..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ErrorDetail.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -/** - * The Class ErrorDetail. - */ -public class ErrorDetail { - - /** The code. */ - private final String code; - - /** The message. */ - private final String message; - - /** - * Instantiates a new error detail. - * - * @param code - * the code - * @param message - * the message - */ - public ErrorDetail(String code, String message) { - this.code = code; - this.message = message; - } - - /** - * Gets the code. - * - * @return the code - */ - public String getCode() { - return this.code; - } - - /** - * Gets the message. - * - * @return the message - */ - public String getMessage() { - return this.message; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Ipv4.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Ipv4.java deleted file mode 100644 index e2889f30d29d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Ipv4.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import org.codehaus.jackson.annotate.JsonProperty; - -/** - * The Class Ipv4. - */ -public class Ipv4 { - - /** The name. */ - private String name; - - /** The ip. */ - private String ip; - - /** - * Gets the name. - * - * @return the name - */ - @JsonProperty("Name") - public String getName() { - return this.name; - } - - @JsonProperty("Name") - public Ipv4 setName(String name) { - this.name = name; - return this; - } - - /** - * Gets the ip. - * - * @return the ip - */ - @JsonProperty("IP") - public String getIp() { - return this.ip; - } - - @JsonProperty("IP") - public Ipv4 setIp(String ip) { - this.ip = ip; - return this; - } -} \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Job.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Job.java deleted file mode 100644 index 7e97528703ea..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Job.java +++ /dev/null @@ -1,487 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.io.IOException; -import java.net.URI; -import java.util.ArrayList; -import java.util.List; - -import javax.mail.MessagingException; -import javax.mail.internet.MimeMultipart; -import javax.ws.rs.core.MediaType; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.ParserConfigurationException; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityBatchOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.implementation.MediaBatchOperations; -import com.microsoft.windowsazure.services.media.implementation.content.JobNotificationSubscriptionType; -import com.microsoft.windowsazure.services.media.implementation.content.JobType; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate Job entities. - * - */ -public final class Job { - - /** The Constant ENTITY_SET. */ - private static final String ENTITY_SET = "Jobs"; - - // Prevent instantiation - /** - * Instantiates a new job. - */ - private Job() { - } - - /** - * Creates an operation to create a new job. - * - * @return the creator - */ - public static Creator create() { - return new Creator(); - } - - /** - * The Class Creator. - */ - public static class Creator extends - EntityOperationSingleResultBase implements - EntityCreateOperation { - - /** The name. */ - private String name; - - /** The priority. */ - private Integer priority; - - /** The input media assets. */ - private final List inputMediaAssets; - - /** The content type. */ - private MediaType contentType; - - /** The task create batch operations. */ - private final List taskCreateBatchOperations; - - /** The fresh. */ - private Boolean fresh; - - /** The mime multipart. */ - private MimeMultipart mimeMultipart;; - - /** The media batch operations. */ - private MediaBatchOperations mediaBatchOperations; - - /** The job notification subscriptions. */ - private final List jobNotificationSubscriptions = new ArrayList(); - - /** - * Builds the mime multipart. - * - * @param serviceUri - * the service uri - */ - private void buildMimeMultipart(URI serviceUri) { - mediaBatchOperations = null; - CreateBatchOperation createJobBatchOperation = CreateBatchOperation - .create(serviceUri, this); - - try { - mediaBatchOperations = new MediaBatchOperations(serviceUri); - } catch (JAXBException e) { - throw new RuntimeException(e); - } catch (ParserConfigurationException e) { - throw new RuntimeException(e); - } - - mediaBatchOperations.addOperation(createJobBatchOperation); - for (Task.CreateBatchOperation taskCreateBatchOperation : taskCreateBatchOperations) { - mediaBatchOperations.addOperation(taskCreateBatchOperation); - } - - try { - mimeMultipart = mediaBatchOperations.getMimeMultipart(); - } catch (MessagingException e) { - throw new RuntimeException(e); - } catch (IOException e) { - throw new RuntimeException(e); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - - this.contentType = mediaBatchOperations.getContentType(); - this.fresh = false; - } - - /** - * Instantiates a new creator. - * - */ - public Creator() { - super(ENTITY_SET, JobInfo.class); - this.inputMediaAssets = new ArrayList(); - this.taskCreateBatchOperations = new ArrayList(); - this.fresh = true; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityCreateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() throws ServiceException { - if (fresh) { - buildMimeMultipart(getProxyData().getServiceUri()); - } - return mimeMultipart; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperationSingleResultBase#getResponseClass() - */ - @Override - public Class getResponseClass() { - return ClientResponse.class; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityCreateOperation#processResponse(java.lang.Object) - */ - @Override - public Object processResponse(Object clientResponse) - throws ServiceException { - try { - this.mediaBatchOperations - .parseBatchResult((ClientResponse) clientResponse); - } catch (IOException e) { - throw new ServiceException(e); - } - JobInfo jobInfo = null; - for (EntityBatchOperation entityBatchOperation : this.mediaBatchOperations - .getOperations()) { - if (entityBatchOperation instanceof Job.CreateBatchOperation) { - jobInfo = ((Job.CreateBatchOperation) entityBatchOperation) - .getJobInfo(); - break; - } - } - return jobInfo; - - } - - /** - * Adds the task creator. - * - * @param taskCreateBatchOperation - * the task create batch operation - * @return the creator - */ - public Creator addTaskCreator( - Task.CreateBatchOperation taskCreateBatchOperation) { - this.taskCreateBatchOperations.add(taskCreateBatchOperation); - this.fresh = true; - return this; - } - - /** - * Set the name of the job to be created. - * - * @param name - * The name - * @return The creator object (for call chaining) - */ - public Creator setName(String name) { - this.name = name; - this.fresh = true; - return this; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return this.name; - } - - /** - * Sets the priority. - * - * @param priority - * the priority - * @return the creator - */ - public Creator setPriority(Integer priority) { - this.priority = priority; - this.fresh = true; - return this; - } - - /** - * Gets the priority. - * - * @return the priority - */ - public Integer getPriority() { - return this.priority; - } - - /** - * Gets the input media assets. - * - * @return the input media assets - */ - public List getInputMediaAssets() { - return inputMediaAssets; - } - - /** - * Gets the task creators. - * - * @return the task creators - */ - public List getTaskCreators() { - return this.taskCreateBatchOperations; - } - - /** - * Adds the input media asset. - * - * @param assetId - * the asset id - * @return the creator - */ - public Creator addInputMediaAsset(String assetId) { - this.inputMediaAssets.add(assetId); - this.fresh = true; - return this; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperationBase#getContentType() - */ - @Override - public MediaType getContentType() { - if (fresh) { - buildMimeMultipart(getProxyData().getServiceUri()); - } - return this.contentType; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperationBase#getUri() - */ - @Override - public String getUri() { - return "$batch"; - } - - /** - * Adds the job notification subscription. - * - * @param jobNotificationSubscription - * the job notification subscription - * @return the creator - */ - public Creator addJobNotificationSubscription( - JobNotificationSubscription jobNotificationSubscription) { - this.jobNotificationSubscriptions.add(jobNotificationSubscription); - this.fresh = true; - return this; - } - - /** - * Gets the job notification subscription. - * - * @return the job notification subscription - */ - public List getJobNotificationSubscription() { - return this.jobNotificationSubscriptions; - } - } - - /** - * The Class CreateBatchOperation. - */ - public static class CreateBatchOperation extends EntityBatchOperation { - - /** The service uri. */ - private final URI serviceUri; - - /** The job info. */ - private JobInfo jobInfo; - - /** - * Instantiates a new creates the batch operation. - * - * @param serviceUri - * the service uri - */ - public CreateBatchOperation(URI serviceUri) { - this.serviceUri = serviceUri; - this.setVerb("POST"); - } - - /** - * Creates the. - * - * @param serviceUri - * the service uri - * @param creator - * the creator - * @return the creates the batch operation - */ - public static CreateBatchOperation create(URI serviceUri, - Creator creator) { - CreateBatchOperation createBatchOperation = new CreateBatchOperation( - serviceUri); - - JobType jobType = new JobType(); - jobType.setName(creator.getName()); - jobType.setPriority(creator.getPriority()); - for (JobNotificationSubscription jobNotificationSubscription : creator - .getJobNotificationSubscription()) { - JobNotificationSubscriptionType jobNotificationSubscriptionType = new JobNotificationSubscriptionType(); - jobNotificationSubscriptionType - .setNotificationEndPointId(jobNotificationSubscription - .getNotificationEndPointId()); - jobNotificationSubscriptionType - .setTargetJobState(jobNotificationSubscription - .getTargetJobState().getCode()); - jobType.addJobNotificationSubscriptionType(jobNotificationSubscriptionType); - } - - for (String inputMediaAsset : creator.getInputMediaAssets()) { - createBatchOperation - .addLink( - "InputMediaAssets", - String.format("%s/Assets('%s')", - createBatchOperation.getServiceUri() - .toString(), inputMediaAsset), - "application/atom+xml;type=feed", - "http://schemas.microsoft.com/ado/2007/08/dataservices/related/InputMediaAssets"); - } - createBatchOperation.addContentObject(jobType); - return createBatchOperation; - } - - /** - * Gets the service uri. - * - * @return the service uri - */ - public URI getServiceUri() { - return this.serviceUri; - } - - /** - * Sets the job info. - * - * @param jobInfo - * the job info - * @return the creates the batch operation - */ - public CreateBatchOperation setJobInfo(JobInfo jobInfo) { - this.jobInfo = jobInfo; - return this; - } - - /** - * Gets the job info. - * - * @return the job info - */ - public JobInfo getJobInfo() { - return this.jobInfo; - } - - } - - /** - * Create an operation object that will get the state of the given job. - * - * @param jobId - * id of job to retrieve - * @return the get operation - */ - public static EntityGetOperation get(String jobId) { - return new DefaultGetOperation(ENTITY_SET, jobId, - JobInfo.class); - } - - /** - * Create an operation that will list all the jobs. - * - * @return The list operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation to delete the given job. - * - * @param jobId - * id of job to delete - * @return the delete operation - */ - public static EntityDeleteOperation delete(String jobId) { - return new DefaultDeleteOperation(ENTITY_SET, jobId); - } - - /** - * Cancel. - * - * @param jobId - * the job id - * @return the entity action operation - */ - public static EntityActionOperation cancel(String jobId) { - return new DefaultActionOperation("CancelJob").addQueryParameter( - "jobId", String.format("'%s'", jobId)); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobInfo.java deleted file mode 100644 index ad8948b05676..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobInfo.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; -import java.util.List; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.JobNotificationSubscriptionType; -import com.microsoft.windowsazure.services.media.implementation.content.JobType; - -/** - * The Class JobInfo. - */ -public class JobInfo extends ODataEntity { - - /** - * Instantiates a new job info. - * - * @param entry - * the entry - * @param content - * the content - */ - public JobInfo(EntryType entry, JobType content) { - super(entry, content); - } - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return getContent().getId(); - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return getContent().getName(); - } - - /** - * Gets the created. - * - * @return the created - */ - public Date getCreated() { - return getContent().getCreated(); - } - - /** - * Gets the last modified. - * - * @return the last modified - */ - public Date getLastModified() { - return getContent().getLastModified(); - } - - /** - * Gets the end time. - * - * @return the end time - */ - public Date getEndTime() { - return getContent().getEndTime(); - } - - /** - * Gets the priority. - * - * @return the priority - */ - public int getPriority() { - return getContent().getPriority(); - } - - /** - * Gets the running duration. - * - * @return the running duration - */ - public double getRunningDuration() { - return getContent().getRunningDuration(); - } - - /** - * Gets the start time. - * - * @return the start time - */ - public Date getStartTime() { - return getContent().getStartTime(); - } - - /** - * Gets the state. - * - * @return the state - */ - public JobState getState() { - return JobState.fromCode(getContent().getState()); - } - - /** - * Gets the template id. - * - * @return the template id - */ - public String getTemplateId() { - return getContent().getTemplateId(); - } - - /** - * Get a link which, when listed, will return the input assets for the job. - * - * @return Link if found, null if not. - */ - public LinkInfo getInputAssetsLink() { - return this. getRelationLink("InputMediaAssets"); - } - - /** - * Get a link which, when listed, will return the output assets for the job. - * - * @return Link if found, null if not. - */ - public LinkInfo getOutputAssetsLink() { - return this. getRelationLink("OutputMediaAssets"); - } - - /** - * Gets the tasks link. - * - * @return the tasks link - */ - public LinkInfo getTasksLink() { - return this. getRelationLink("Tasks"); - } - - /** - * Gets the job notification subscriptions. - * - * @return the job notification subscriptions - */ - public List getJobNotificationSubscriptions() { - return JobNotificationSubscriptionListFactory.create(getContent() - .getJobNotificationSubscriptionTypes()); - } - - /** - * Adds the job notification subscription. - * - * @param jobNotificationSubscription - * the job notification subscription - * @return the job info - */ - public JobInfo addJobNotificationSubscription( - JobNotificationSubscription jobNotificationSubscription) { - getContent().addJobNotificationSubscriptionType( - new JobNotificationSubscriptionType() - .setNotificationEndPointId( - jobNotificationSubscription - .getNotificationEndPointId()) - .setTargetJobState( - jobNotificationSubscription.getTargetJobState() - .getCode())); - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobNotificationSubscription.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobNotificationSubscription.java deleted file mode 100644 index 9e5360a9344c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobNotificationSubscription.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -/** - * The Class JobNotificationSubscription. - */ -public class JobNotificationSubscription { - - /** The notification end point id. */ - private final String notificationEndPointId; - - /** The target job state. */ - private final TargetJobState targetJobState; - - /** - * Instantiates a new job notification subscription. - * - * @param uuid - * the notification end point id - * @param targetJobState - * the target job state - */ - public JobNotificationSubscription(String notificationEndPointId, - TargetJobState targetJobState) { - this.notificationEndPointId = notificationEndPointId; - this.targetJobState = targetJobState; - } - - /** - * Gets the notification end point. - * - * @return the code - */ - public String getNotificationEndPointId() { - return this.notificationEndPointId; - } - - /** - * Gets the message. - * - * @return the message - */ - public TargetJobState getTargetJobState() { - return this.targetJobState; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobNotificationSubscriptionListFactory.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobNotificationSubscriptionListFactory.java deleted file mode 100644 index 86006d630148..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobNotificationSubscriptionListFactory.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.ArrayList; -import java.util.List; - -import com.microsoft.windowsazure.services.media.implementation.content.JobNotificationSubscriptionType; - -/** - * The Class JobNotificationSubscription factory. - */ -public abstract class JobNotificationSubscriptionListFactory { - - public static List create( - List jobNotificationSubscriptionTypeList) { - if (jobNotificationSubscriptionTypeList == null) { - throw new IllegalArgumentException( - "The jobNotificationSubscriptionTypeList cannot be null."); - } - List jobNotificationSubscriptionList = new ArrayList(); - for (JobNotificationSubscriptionType jobNotificationSubscriptionType : jobNotificationSubscriptionTypeList) { - jobNotificationSubscriptionList - .add(new JobNotificationSubscription( - jobNotificationSubscriptionType - .getNotificationEndPointId(), - TargetJobState - .fromCode(jobNotificationSubscriptionType - .getTargetJobState()))); - } - return jobNotificationSubscriptionList; - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobState.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobState.java deleted file mode 100644 index b1edbc7e1d23..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/JobState.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * The Enum JobState. - */ -public enum JobState { - /** The Queued. */ - Queued(0), - - /** The Scheduled. */ - Scheduled(1), - - /** The Processing. */ - Processing(2), - - /** The Finished. */ - Finished(3), - - /** The Error. */ - Error(4), - - /** The Canceled. */ - Canceled(5), - - /** The Canceling. */ - Canceling(6); - - /** The job state code. */ - private int jobStateCode; - - /** - * Instantiates a new job state. - * - * @param jobStateCode - * the job state code - */ - private JobState(int jobStateCode) { - this.jobStateCode = jobStateCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return this.jobStateCode; - } - - /** - * From code. - * - * @param jobStateCode - * the job state code - * @return the job state - */ - public static JobState fromCode(int jobStateCode) { - switch (jobStateCode) { - case 0: - return JobState.Queued; - case 1: - return JobState.Scheduled; - case 2: - return JobState.Processing; - case 3: - return JobState.Finished; - case 4: - return JobState.Error; - case 5: - return JobState.Canceled; - case 6: - return JobState.Canceling; - default: - throw new InvalidParameterException("jobStateCode"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LinkInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LinkInfo.java deleted file mode 100644 index 7ffac5539bb0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LinkInfo.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.LinkType; - -/** - * Provides access to OData links - * - */ -public class LinkInfo> { - private final LinkType rawLink; - - /** - * Construct a new {@link LinkInfo} instance - */ - public LinkInfo(LinkType rawLink) { - this.rawLink = rawLink; - } - - /** - * Get link href - * - * @return the href - */ - public String getHref() { - return rawLink.getHref(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ListResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ListResult.java deleted file mode 100644 index c60001afd701..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ListResult.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; - -/** - * Wrapper class for all returned lists from Media Services - * - */ -public class ListResult implements List { - - private final List contents; - - public ListResult(Collection contentList) { - contents = Collections.unmodifiableList(new ArrayList(contentList)); - } - - @Override - public boolean add(T element) { - return contents.add(element); - } - - @Override - public void add(int index, T element) { - contents.add(index, element); - } - - @Override - public boolean addAll(Collection c) { - return contents.addAll(c); - } - - @Override - public boolean addAll(int index, Collection c) { - return contents.addAll(index, c); - } - - @Override - public void clear() { - contents.clear(); - } - - @Override - public boolean contains(Object object) { - return contents.contains(object); - } - - @Override - public boolean containsAll(Collection c) { - return contents.containsAll(c); - } - - @Override - public T get(int index) { - return contents.get(index); - } - - @Override - public int indexOf(Object object) { - return contents.indexOf(object); - } - - @Override - public boolean isEmpty() { - return contents.isEmpty(); - } - - @Override - public Iterator iterator() { - return contents.iterator(); - } - - @Override - public int lastIndexOf(Object object) { - return contents.lastIndexOf(object); - } - - @Override - public ListIterator listIterator() { - return contents.listIterator(); - } - - @Override - public ListIterator listIterator(int index) { - return contents.listIterator(index); - - } - - @Override - public boolean remove(Object o) { - return contents.remove(o); - } - - @Override - public T remove(int index) { - return contents.remove(index); - } - - @Override - public boolean removeAll(Collection c) { - return contents.removeAll(c); - } - - @Override - public boolean retainAll(Collection c) { - return contents.retainAll(c); - } - - @Override - public T set(int index, T element) { - return contents.set(index, element); - } - - @Override - public int size() { - return contents.size(); - } - - @Override - public List subList(int fromIndex, int toIndex) { - return contents.subList(fromIndex, toIndex); - } - - @Override - public Object[] toArray() { - return contents.toArray(); - } - - @Override - public U[] toArray(U[] a) { - return contents.toArray(a); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Locator.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Locator.java deleted file mode 100644 index 11402e7e0b74..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Locator.java +++ /dev/null @@ -1,303 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityProxyData; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.LocatorRestType; -import com.sun.jersey.api.client.GenericType; - -/** - * Implementation of Locator entity. - */ -public final class Locator { - - /** The Constant ENTITY_SET. */ - private static final String ENTITY_SET = "Locators"; - - /** - * Instantiates a new locator. - */ - private Locator() { - } - - /** - * Create an operation to create a new locator entity. - * - * @param accessPolicyId - * id of access policy for locator - * @param assetId - * id of asset for locator - * @param locatorType - * locator type - * @return the operation - */ - public static Creator create(String accessPolicyId, String assetId, - LocatorType locatorType) { - return new Creator(accessPolicyId, assetId, locatorType); - } - - /** - * The Class Creator. - */ - public static class Creator extends - EntityOperationSingleResultBase implements - EntityCreateOperation { - - /** The access policy id. */ - private final String accessPolicyId; - - /** The asset id. */ - private final String assetId; - - /** The base uri. */ - private String baseUri; - - /** The content access token. */ - private String contentAccessComponent; - - /** The locator type. */ - private final LocatorType locatorType; - - /** The path. */ - private String path; - - /** The start date time. */ - private Date startDateTime; - - /** The id. */ - private String id; - - /** - * Instantiates a new creator. - * - * @param accessPolicyId - * the access policy id - * @param assetId - * the asset id - * @param locatorType - * the locator type - */ - protected Creator(String accessPolicyId, String assetId, - LocatorType locatorType) { - super(ENTITY_SET, LocatorInfo.class); - this.accessPolicyId = accessPolicyId; - this.assetId = assetId; - this.locatorType = locatorType; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityCreateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - return new LocatorRestType().setId(id) - .setAccessPolicyId(accessPolicyId).setAssetId(assetId) - .setStartTime(startDateTime).setType(locatorType.getCode()) - .setBaseUri(baseUri) - .setContentAccessComponent(contentAccessComponent) - .setPath(path); - } - - /** - * Sets the base uri. - * - * @param baseUri - * the base uri - * @return the creator - */ - public Creator setBaseUri(String baseUri) { - this.baseUri = baseUri; - return this; - } - - /** - * Sets the path. - * - * @param path - * the path - * @return the creator - */ - public Creator setPath(String path) { - this.path = path; - return this; - } - - /** - * Set the date and time for when the locator starts to be available. - * - * @param startDateTime - * The date/time - * @return The creator instance (for function chaining) - */ - public Creator setStartDateTime(Date startDateTime) { - this.startDateTime = startDateTime; - return this; - } - - /** - * Sets the content access component. - * - * @param contentAccessComponent - * the content access component - * @return The creator instance - */ - public Creator setContentAccessComponent(String contentAccessComponent) { - this.contentAccessComponent = contentAccessComponent; - return this; - } - - /** - * Sets the id. - * - * @param id - * the id - * @return the entity creation operation - */ - public EntityCreateOperation setId(String id) { - this.id = id; - return this; - } - } - - /** - * Create an operation to get the given locator. - * - * @param locatorId - * id of locator to retrieve - * @return the get operation - */ - public static EntityGetOperation get(String locatorId) { - return new DefaultGetOperation(ENTITY_SET, locatorId, - LocatorInfo.class); - } - - /** - * Create an operation to list all locators. - * - * @return the list operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation that will list all the locators at the given link. - * - * @param link - * Link to request locators from. - * @return The list operation. - */ - public static DefaultListOperation list( - LinkInfo link) { - return new DefaultListOperation(link.getHref(), - new GenericType>() { - }); - } - - /** - * Create an operation to update the given locator. - * - * @param locatorId - * id of locator to update - * @return the update operation - */ - public static Updater update(String locatorId) { - return new Updater(locatorId); - } - - /** - * The Class Updater. - */ - public static class Updater extends EntityOperationBase implements - EntityUpdateOperation { - - /** The start date time. */ - private Date startDateTime; - - /** - * Instantiates a new updater. - * - * @param locatorId - * the locator id - */ - public Updater(String locatorId) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, - locatorId)); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityUpdateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - return new LocatorRestType().setStartTime(startDateTime); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media - * .entityoperations.EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - // Deliberately empty - } - - /** - * Set when the locator will become available. - * - * @param startDateTime - * the date & time - * @return Updater instance - */ - public Updater setStartDateTime(Date startDateTime) { - this.startDateTime = startDateTime; - return this; - } - } - - /** - * Create an operation to delete the given locator. - * - * @param locatorId - * id of locator to delete - * @return the operation - */ - public static EntityDeleteOperation delete(String locatorId) { - return new DefaultDeleteOperation(ENTITY_SET, locatorId); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LocatorInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LocatorInfo.java deleted file mode 100644 index 79b6775bcb60..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LocatorInfo.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.LocatorRestType; - -/** - * The Class LocatorInfo. - */ -public class LocatorInfo extends ODataEntity { - - /** - * Instantiates a new locator info. - * - * @param entry - * the entry - * @param content - * the content - */ - public LocatorInfo(EntryType entry, LocatorRestType content) { - super(entry, content); - } - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return getContent().getId(); - } - - /** - * Gets the expiration date time. - * - * @return the expiration date time - */ - public Date getExpirationDateTime() { - return getContent().getExpirationDateTime(); - } - - /** - * Gets the locator type. - * - * @return the locator type - */ - public LocatorType getLocatorType() { - return LocatorType.fromCode(getContent().getType()); - } - - /** - * Gets the path. - * - * @return the path - */ - public String getPath() { - return getContent().getPath(); - } - - /** - * Gets the access policy id. - * - * @return the access policy id - */ - public String getAccessPolicyId() { - return getContent().getAccessPolicyId(); - } - - /** - * Gets the asset id. - * - * @return the asset id - */ - public String getAssetId() { - return getContent().getAssetId(); - } - - /** - * Gets the start time. - * - * @return the start time - */ - public Date getStartTime() { - return getContent().getStartTime(); - } - - /** - * Gets the base uri. - * - * @return the base uri - */ - public String getBaseUri() { - return getContent().getBaseUri(); - } - - /** - * Gets the content access token. - * - * @return the content access token - */ - public String getContentAccessToken() { - return this.getContent().getContentAccessComponent(); - } - - /** - * Return a link that gets this locator's access policy - * - * @return the link - */ - public LinkInfo getAccessPolicyLink() { - return this. getRelationLink("AccessPolicy"); - } - - /** - * Return a link that gets this locator's asset - * - * @return the link - */ - public LinkInfo getAssetLink() { - return this. getRelationLink("Asset"); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LocatorType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LocatorType.java deleted file mode 100644 index 4fa6409e72b3..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/LocatorType.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * The Enum LocatorType. - */ -public enum LocatorType { - - /** The None. */ - None(0), - /** The sas. */ - SAS(1), - /** The Origin. */ - OnDemandOrigin(2); - - /** The locator type code. */ - private int locatorTypeCode; - - /** - * Instantiates a new locator type. - * - * @param locatorTypeCode - * the locator type code - */ - private LocatorType(int locatorTypeCode) { - this.locatorTypeCode = locatorTypeCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return this.locatorTypeCode; - } - - /** - * From code. - * - * @param type - * the type - * @return the locator type - */ - public static LocatorType fromCode(int type) { - switch (type) { - case 0: - return LocatorType.None; - case 1: - return LocatorType.SAS; - case 2: - return LocatorType.OnDemandOrigin; - default: - throw new InvalidParameterException("type"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/MediaProcessor.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/MediaProcessor.java deleted file mode 100644 index adc6186c2694..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/MediaProcessor.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.sun.jersey.api.client.GenericType; - -/** - * Entity operations for Media processors - * - */ -public final class MediaProcessor { - - private static final String ENTITY_SET = "MediaProcessors"; - - private MediaProcessor() { - } - - /** - * Create an operation to list all Media processors - * - * @return the list operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/MediaProcessorInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/MediaProcessorInfo.java deleted file mode 100644 index 9f3a0df22bcb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/MediaProcessorInfo.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.MediaProcessorType; - -/** - * Data about a Media Processor entity. - * - */ -public class MediaProcessorInfo extends ODataEntity { - - /** - * Instantiates a new media processor info. - * - * @param entry - * the entry - * @param content - * the content - */ - public MediaProcessorInfo(EntryType entry, MediaProcessorType content) { - super(entry, content); - } - - /** - * Get the asset id. - * - * @return the id - */ - public String getId() { - return getContent().getId(); - } - - /** - * Get the asset name. - * - * @return the name - */ - public String getName() { - return this.getContent().getName(); - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return this.getContent().getDescription(); - } - - /** - * Gets the sku. - * - * @return the sku - */ - public String getSku() { - return this.getContent().getSku(); - } - - /** - * Gets the vendor. - * - * @return the vendor - */ - public String getVendor() { - return this.getContent().getVendor(); - } - - /** - * Gets the version. - * - * @return the version - */ - public String getVersion() { - return this.getContent().getVersion(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPoint.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPoint.java deleted file mode 100644 index 7226b842db24..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPoint.java +++ /dev/null @@ -1,181 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.NotificationEndPointType; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate notification end point entities. - * - */ -public final class NotificationEndPoint { - - private static final String ENTITY_SET = "NotificationEndPoints"; - - private NotificationEndPoint() { - } - - /** - * Creates an operation to create a new notification end point. - * - * @param name - * name of the notification end point. - * @param endPointType - * the type of the notification end point. - * @param endPointAddress - * the address of the end point. - * @return The operation - */ - public static EntityCreateOperation create( - String name, EndPointType endPointType, String endPointAddress) { - return new Creator(name, endPointType, endPointAddress); - } - - public static class Creator extends - EntityOperationSingleResultBase implements - EntityCreateOperation { - private final String name; - private final EndPointType endPointType; - private final String endPointAddress; - - public Creator(String name, EndPointType endPointType, - String endPointAddress) { - - super(ENTITY_SET, NotificationEndPointInfo.class); - - this.name = name; - this.endPointType = endPointType; - this.endPointAddress = endPointAddress; - } - - @Override - public Object getRequestContents() { - return new NotificationEndPointType().setName(name) - .setEndPointType(endPointType.getCode()) - .setEndPointAddress(endPointAddress); - } - } - - /** - * Create an operation that will retrieve the given notification end point - * - * @param notificationEndPointId - * id of notification end point to retrieve - * @return the operation - */ - public static EntityGetOperation get( - String notificationEndPointId) { - return new DefaultGetOperation(ENTITY_SET, - notificationEndPointId, NotificationEndPointInfo.class); - } - - /** - * Create an operation that will retrieve the notification end point at the - * given link - * - * @param link - * the link - * @return the operation - */ - public static EntityGetOperation get( - LinkInfo link) { - return new DefaultGetOperation( - link.getHref(), NotificationEndPointInfo.class); - } - - /** - * Create an operation that will retrieve all notification end points - * - * @return the operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - public static Updater update(String notificationEndPointId) { - return new Updater(notificationEndPointId); - } - - /** - * Create an operation to delete the given notification end point - * - * @param notificationEndPointId - * id of notification end point to delete - * @return the delete operation - */ - public static EntityDeleteOperation delete(String notificationEndPointId) { - return new DefaultDeleteOperation(ENTITY_SET, notificationEndPointId); - } - - /** - * The Class Updater. - */ - public static class Updater extends EntityOperationBase implements - EntityUpdateOperation { - - /** The name. */ - private String name; - - /** - * Instantiates a new updater. - * - * @param notificationEndPointId - * the asset id - */ - protected Updater(String notificationEndPointId) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, - notificationEndPointId)); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityUpdateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - NotificationEndPointType notificationEndPointType = new NotificationEndPointType(); - notificationEndPointType.setName(name); - return notificationEndPointType; - } - - /** - * Sets new name for asset. - * - * @param name - * The new name - * @return Updater instance - */ - public Updater setName(String name) { - this.name = name; - return this; - } - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointInfo.java deleted file mode 100644 index 8b7b2a1ae389..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointInfo.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.NotificationEndPointType; - -/** - * Type containing data about notification end points. - * - */ -public class NotificationEndPointInfo extends - ODataEntity { - - /** - * Creates a new {@link NotificationEndPointInfo} wrapping the given ATOM - * entry and content objects. - * - * @param entry - * Entry containing this AccessPolicy data - * @param content - * Content with the AccessPolicy data - */ - public NotificationEndPointInfo(EntryType entry, - NotificationEndPointType content) { - super(entry, content); - } - - /** - * Get the notification end point id. - * - * @return the id. - */ - public String getId() { - return getContent().getId(); - } - - /** - * Get the name. - * - * @return the name. - */ - public String getName() { - return getContent().getName(); - } - - /** - * Get the creation date. - * - * @return the date. - */ - public Date getCreated() { - return getContent().getCreated(); - } - - /** - * Get the type of the end point. - * - * @return the end point type. - */ - public EndPointType getEndPointType() { - return EndPointType.fromCode(getContent().getEndPointType()); - } - - /** - * Gets the end point address. - * - * @return the end point address - */ - public String getEndPointAddress() { - return getContent().getEndPointAddress(); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Operation.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Operation.java deleted file mode 100644 index 2c9303ee80ad..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Operation.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; - -/** - * Class for creating operations to manipulate Asset entities. - * - */ -public final class Operation { - - /** The Constant ENTITY_SET. */ - private static final String ENTITY_SET = "Operations"; - - // Prevent instantiation - /** - * Instantiates a new asset. - */ - private Operation() { - } - - /** - * Create an operation object that will get the state of the given asset. - * - * @param assetId - * id of asset to retrieve - * @return the get operation - */ - public static EntityGetOperation get(String operationId) { - return new DefaultGetOperation(ENTITY_SET, operationId, - OperationInfo.class); - } -} \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/OperationInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/OperationInfo.java deleted file mode 100644 index 5df101fade86..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/OperationInfo.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.OperationType; - -public class OperationInfo extends ODataEntity { - - public OperationInfo(EntryType entry, OperationType content) { - super(entry, content); - } - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return getContent().getId(); - } - - /** - * Gets the target entity id. - * - * @return the target entity id - */ - public String getTargetEntityId() { - return getContent().getTargetEntityId(); - } - - /** - * Gets the state. - * - * @return the state - */ - public OperationState getState() { - return OperationState.fromCode(getContent().getState()); - } - - /** - * Gets the error code. - * - * @return the error code - */ - public String getErrorCode() { - return getContent().getErrorCode(); - } - - /** - * Gets the error message. - * - * @return the error message - */ - public String getErrorMessage() { - return getContent().getErrorMessage(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/OperationState.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/OperationState.java deleted file mode 100644 index 22e96d8c3b73..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/OperationState.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Specifies the states of the se. - */ -public enum OperationState { - - Succeeded("Succeeded"), - - Failed("Failed"), - - InProgress("InProgress"); - - /** The op state code. */ - private String operationStateCode; - - /** - * Instantiates a new op state. - * - * @param operationStateCode - * the op state code - */ - private OperationState(String operationStateCode) { - this.operationStateCode = operationStateCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public String getCode() { - return operationStateCode; - } - - /** - * Create an OperationState instance from the corresponding String. - * - * @param state - * state as integer - * @return new StreamingEndpointState instance - */ - public static OperationState fromCode(String state) { - if (state.equals("Succeeded")) { - return OperationState.Succeeded; - } else if (state.equals("Failed")) { - return OperationState.Failed; - } else if (state.equals("InProgress")) { - return OperationState.InProgress; - } else { - throw new InvalidParameterException("state"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKey.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKey.java deleted file mode 100644 index 30cd690a9f58..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKey.java +++ /dev/null @@ -1,224 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.io.InputStream; - -import javax.ws.rs.core.MediaType; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import javax.xml.transform.stream.StreamSource; - -import com.microsoft.windowsazure.core.pipeline.PipelineHelpers; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultEntityTypeActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityTypeActionOperation; -import com.microsoft.windowsazure.services.media.implementation.content.ProtectionKeyIdType; -import com.microsoft.windowsazure.services.media.implementation.content.ProtectionKeyRestType; -import com.sun.jersey.api.client.ClientResponse; - -/** - * Class for creating operations to manipulate protection key pseudo-entities. - * - */ -public final class ProtectionKey { - - private ProtectionKey() { - } - - /** - * Gets the protection key id. - * - * @param contentKeyType - * the content key type - * @return the protection key id - */ - public static EntityTypeActionOperation getProtectionKeyId( - ContentKeyType contentKeyType) { - return new GetProtectionKeyIdActionOperation("GetProtectionKeyId") - .addQueryParameter("contentKeyType", - String.format("%d", contentKeyType.getCode())) - .setAcceptType(MediaType.APPLICATION_XML_TYPE); - } - - /** - * Gets the protection key. - * - * @param protectionKeyId - * the protection key id - * @return the protection key - */ - public static EntityTypeActionOperation getProtectionKey( - String protectionKeyId) { - return new GetProtectionKeyActionOperation("GetProtectionKey") - .addQueryParameter("ProtectionKeyId", - String.format("'%s'", protectionKeyId)).setAcceptType( - MediaType.APPLICATION_XML_TYPE); - } - - /** - * The Class GetProtectionKeyIdActionOperation. - * - * @param - */ - private static class GetProtectionKeyIdActionOperation extends - DefaultEntityTypeActionOperation { - - /** The jaxb context. */ - private final JAXBContext jaxbContext; - - /** The unmarshaller. */ - private final Unmarshaller unmarshaller; - - /** - * Instantiates a new gets the protection key id action operation. - * - * @param name - * the name - */ - public GetProtectionKeyIdActionOperation(String name) { - super(name); - try { - jaxbContext = JAXBContext - .newInstance(ProtectionKeyIdType.class); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - - try { - unmarshaller = jaxbContext.createUnmarshaller(); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * DefaultActionOperation - * #processResponse(com.sun.jersey.api.client.ClientResponse) - */ - @Override - public String processTypeResponse(ClientResponse clientResponse) { - PipelineHelpers.throwIfNotSuccess(clientResponse); - ProtectionKeyIdType protectionKeyIdType; - try { - protectionKeyIdType = parseResponse(clientResponse); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - - return protectionKeyIdType.getProtectionKeyId(); - } - - /** - * Parses the response. - * - * @param clientResponse - * the client response - * @return the protection key id type - * @throws JAXBException - * the jAXB exception - */ - private ProtectionKeyIdType parseResponse(ClientResponse clientResponse) - throws JAXBException { - - InputStream inputStream = clientResponse.getEntityInputStream(); - JAXBElement protectionKeyIdTypeJaxbElement = unmarshaller - .unmarshal(new StreamSource(inputStream), - ProtectionKeyIdType.class); - return protectionKeyIdTypeJaxbElement.getValue(); - - } - - } - - /** - * The Class GetProtectionKeyActionOperation. - */ - private static class GetProtectionKeyActionOperation extends - DefaultEntityTypeActionOperation { - - /** The jaxb context. */ - private final JAXBContext jaxbContext; - - /** The unmarshaller. */ - private final Unmarshaller unmarshaller; - - /** - * Instantiates a new gets the protection key action operation. - * - * @param name - * the name - */ - public GetProtectionKeyActionOperation(String name) { - super(name); - try { - jaxbContext = JAXBContext - .newInstance(ProtectionKeyRestType.class); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - - try { - unmarshaller = jaxbContext.createUnmarshaller(); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * DefaultActionOperation - * #processResponse(com.sun.jersey.api.client.ClientResponse) - */ - @Override - public String processTypeResponse(ClientResponse clientResponse) { - PipelineHelpers.throwIfNotSuccess(clientResponse); - ProtectionKeyRestType protectionKeyRestType; - try { - protectionKeyRestType = parseResponse(clientResponse); - } catch (JAXBException e) { - throw new RuntimeException(e); - } - - return protectionKeyRestType.getProtectionKey(); - } - - /** - * Parses the response. - * - * @param clientResponse - * the client response - * @return the protection key rest type - * @throws JAXBException - * the jAXB exception - */ - private ProtectionKeyRestType parseResponse( - ClientResponse clientResponse) throws JAXBException { - InputStream inputStream = clientResponse.getEntityInputStream(); - JAXBElement protectionKeyTypeJaxbElement = unmarshaller - .unmarshal(new StreamSource(inputStream), - ProtectionKeyRestType.class); - return protectionKeyTypeJaxbElement.getValue(); - - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKeyType.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKeyType.java deleted file mode 100644 index 3c3f893fe993..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKeyType.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * The Enum ProtectionKeyType. - */ -public enum ProtectionKeyType { - - /** The X509 certificate thumbprint. */ - X509CertificateThumbprint(0); - - /** The protection key type code. */ - private int protectionKeyTypeCode; - - /** - * Instantiates a new protection key type. - * - * @param protectionKeyTypeCode - * the protection key type code - */ - private ProtectionKeyType(int protectionKeyTypeCode) { - this.protectionKeyTypeCode = protectionKeyTypeCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return protectionKeyTypeCode; - } - - /** - * Create an ProtectionKeyType instance from the corresponding int. - * - * @param protectionKeyTypeCode - * protectionKeyTypeCode as integer - * @return new ProtectionKeyType instance - */ - public static ProtectionKeyType fromCode(int protectionKeyTypeCode) { - switch (protectionKeyTypeCode) { - case 0: - return ProtectionKeyType.X509CertificateThumbprint; - default: - throw new InvalidParameterException("state"); - } - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StorageAccountInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StorageAccountInfo.java deleted file mode 100644 index 74f7550f4b05..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StorageAccountInfo.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.StorageAccountType; - -/** - * Data about a Media Services Asset entity. - * - */ -public class StorageAccountInfo extends ODataEntity { - - /** - * Instantiates a new asset info. - * - * @param entry - * the entry - * @param content - * the content - */ - public StorageAccountInfo(EntryType entry, StorageAccountType content) { - super(entry, content); - } - - /** - * Get the asset name. - * - * @return the name - */ - public String getName() { - return this.getContent().getName(); - } - - /** - * Get the bytes used - * - * @return the bytes used - */ - public long getBytesUsed() { - return getContent().getBytesUsed(); - } - - /** - * Gets true if this storage account is the default one. - * - * @return true if this storage account is the default one, instead false. - */ - public boolean isDefault() { - return getContent().isDefault(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StorageAccounts.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StorageAccounts.java deleted file mode 100644 index 04862a5f932c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StorageAccounts.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate Asset entities. - * - */ -public final class StorageAccounts { - - /** The Constant ENTITY_SET. */ - private static final String ENTITY_SET = "StorageAccounts"; - - // Prevent instantiation - /** - * Instantiates a new asset. - */ - private StorageAccounts() { - } - - /** - * Create an operation that will list all the assets. - * - * @return The list operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpoint.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpoint.java deleted file mode 100644 index 93391379b74c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpoint.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.List; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultEntityActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityOperationSingleResultBase; -import com.microsoft.windowsazure.services.media.entityoperations.EntityProxyData; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.CrossSiteAccessPoliciesType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointAccessControlType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointCacheControlType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointType; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.GenericType; -import com.sun.jersey.api.client.UniformInterfaceException; - -/** - * Class for creating operations to manipulate Asset entities. - * - */ -public final class StreamingEndpoint { - - /** The Constant ENTITY_SET. */ - private static final String ENTITY_SET = "StreamingEndpoints"; - - // Prevent instantiation - /** - * Instantiates a new asset. - */ - private StreamingEndpoint() { - } - - /** - * Creates an Asset Creator. - * - * @return the creator - */ - public static Creator create() { - return new Creator(); - } - - /** - * The Class Creator. - */ - public static class Creator extends EntityOperationSingleResultBase - implements EntityCreateOperation { - - private String name; - private String description; - private int scaleUnits; - private boolean cdnEnabled; - private List customHostNames; - private StreamingEndpointAccessControlType streamingEndpointAccessControl; - private StreamingEndpointCacheControlType streamingEndpointCacheControl; - private CrossSiteAccessPoliciesType crossSiteAccessPolicies; - - /** - * Instantiates a new creator. - */ - public Creator() { - super(ENTITY_SET, StreamingEndpointInfo.class); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public Class getResponseClass() { - return ClientResponse.class; - } - - @Override - public Object processResponse(Object rawResponse) throws ServiceException { - ClientResponse clientResponse = (ClientResponse) rawResponse; - - if (clientResponse.getStatus() >= 300) { - clientResponse.bufferEntity(); - throw new UniformInterfaceException( - String.format("Received: %s", clientResponse.getEntity(String.class)), clientResponse); - } - - StreamingEndpointInfo streamingEndpointInfo = clientResponse.getEntity(StreamingEndpointInfo.class); - - if (clientResponse.getHeaders().containsKey("operation-id")) { - List operationIds = clientResponse.getHeaders().get("operation-id"); - if (operationIds.size() >= 0) { - streamingEndpointInfo.setOperationId(operationIds.get(0)); - } - } - return streamingEndpointInfo; - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityCreateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - StreamingEndpointType streamingEndpointType = new StreamingEndpointType(); - streamingEndpointType.setName(name); - streamingEndpointType.setDescription(description); - streamingEndpointType.setCdnEnabled(cdnEnabled); - streamingEndpointType.setCustomHostName(customHostNames); - streamingEndpointType.setCrossSiteAccessPolicies(crossSiteAccessPolicies); - streamingEndpointType.setScaleUnits(scaleUnits); - streamingEndpointType.setAccessControl(streamingEndpointAccessControl); - streamingEndpointType.setCacheControl(streamingEndpointCacheControl); - return streamingEndpointType; - } - - /** - * Set the name of the streaming endpoint to be created. - * - * @param name - * The name - * @return The creator object (for call chaining) - */ - public Creator setName(String name) { - this.name = name; - return this; - } - - /** - * Set the description of the streaming endpoint to be created. - * - * @param description - * The description - * @return The creator object (for call chaining) - */ - public Creator setDescription(String description) { - this.description = description; - return this; - } - - /** - * Set the scale units of the streaming endpoint to be created. - * - * @param scaleUnits - * the scale units - * @return The creator object (for call chaining) - */ - public Creator setScaleUnits(int scaleUnits) { - this.scaleUnits = scaleUnits; - return this; - } - - /** - * Set if CDN is enabled on the streaming endpoint to be created. - * - * @param cdnEnabled - * true if CDN is enabled - * @return The creator object (for call chaining) - */ - public Creator setCdnEnabled(boolean cdnEnabled) { - this.cdnEnabled = cdnEnabled; - return this; - } - - /** - * Set the access control policies of the streaming endpoint to be - * created. - * - * @param streamingEndpointAccessControl - * the access control policies - * @return The creator object (for call chaining) - */ - public Creator setAccessControl(StreamingEndpointAccessControlType streamingEndpointAccessControl) { - this.streamingEndpointAccessControl = streamingEndpointAccessControl; - return this; - } - - /** - * Set the list of custom host names of the streaming endpoint to be - * created. - * - * @param customHostNames - * the list of custom host names - * @return The creator object (for call chaining) - */ - public Creator setCustomHostNames(List customHostNames) { - this.customHostNames = customHostNames; - return this; - } - - /** - * Set the streaming endpoint cache control of the streaming endpoint to - * be created. - * - * @param streamingEndpointCacheControl - * the streaming endpoint cache control - * @return The creator object (for call chaining) - */ - public Creator setCacheControl(StreamingEndpointCacheControlType streamingEndpointCacheControl) { - this.streamingEndpointCacheControl = streamingEndpointCacheControl; - return this; - } - - /** - * Set the cross site access policies of the streaming endpoint to be - * created. - * - * @param crossSiteAccessPolicies - * the cross site access policies - * @return The creator object (for call chaining) - */ - public Creator setCrossSiteAccessPolicies(CrossSiteAccessPoliciesType crossSiteAccessPolicies) { - this.crossSiteAccessPolicies = crossSiteAccessPolicies; - return this; - } - - } - - /** - * Create an operation object that will get the state of the given asset. - * - * @param assetId - * id of asset to retrieve - * @return the get operation - */ - public static EntityGetOperation get(String streamingEndpointId) { - return new DefaultGetOperation(ENTITY_SET, streamingEndpointId, - StreamingEndpointInfo.class); - } - - /** - * Create an operation that will list all the assets. - * - * @return The list operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation that will update the given asset. - * - * @param assetId - * id of the asset to update - * @return the update operation - */ - public static Updater update(String streamingEndpointId) { - return new Updater(streamingEndpointId); - } - - public static Updater update(StreamingEndpointInfo streamingEndpointInfo) { - return new Updater(streamingEndpointInfo); - } - - /** - * The Class Updater. - */ - public static class Updater extends EntityOperationBase implements EntityUpdateOperation { - - private String description = null; - private boolean cdnEnabled; - private List customHostNames = null; - private StreamingEndpointAccessControlType streamingEndpointAccessControl = null; - private StreamingEndpointCacheControlType streamingEndpointCacheControl = null; - private CrossSiteAccessPoliciesType crossSiteAccessPolicies = null; - - /** - * Instantiates a new updater. - * - * @param assetId - * the asset id - */ - protected Updater(String streamingEndpointId) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, streamingEndpointId)); - } - - protected Updater(StreamingEndpointInfo streamingEndpointInfo) { - super(new EntityOperationBase.EntityIdUriBuilder(ENTITY_SET, streamingEndpointInfo.getId())); - this.setCdnEnabled(streamingEndpointInfo.isCdnEnabled()); - this.setCustomHostNames(streamingEndpointInfo.getCustomHostNames()); - this.setDescription(streamingEndpointInfo.getDescription()); - this.setCrossSiteAccessPolicies(streamingEndpointInfo.getCrossSiteAccessPolicies()); - this.setAccessControl(streamingEndpointInfo.getAccessControl()); - this.setCacheControl(streamingEndpointInfo.getCacheControl()); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityOperation - * #setProxyData(com.microsoft.windowsazure.services.media - * .entityoperations.EntityProxyData) - */ - @Override - public void setProxyData(EntityProxyData proxyData) { - // Deliberately empty - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.media.entityoperations. - * EntityUpdateOperation#getRequestContents() - */ - @Override - public Object getRequestContents() { - StreamingEndpointType streamingEndpointType = new StreamingEndpointType(); - streamingEndpointType.setDescription(description); - streamingEndpointType.setCdnEnabled(cdnEnabled); - streamingEndpointType.setCustomHostName(customHostNames); - streamingEndpointType.setCrossSiteAccessPolicies(crossSiteAccessPolicies); - streamingEndpointType.setAccessControl(streamingEndpointAccessControl); - streamingEndpointType.setCacheControl(streamingEndpointCacheControl); - return streamingEndpointType; - } - - /** - * Set the new description of the streaming endpoint to be updated. - * - * @param description - * The description - * @return The creator object (for call chaining) - */ - public Updater setDescription(String description) { - this.description = description; - return this; - } - - /** - * Set the new value for CDN enabled on the streaming endpoint to be - * updated. - * - * @param cdnEnabled - * true if CDN is enabled - * @return The creator object (for call chaining) - */ - public Updater setCdnEnabled(boolean cdnEnabled) { - this.cdnEnabled = cdnEnabled; - return this; - } - - /** - * Set the new access control policies of the streaming endpoint to be - * updated. - * - * @param streamingEndpointAccessControl - * the access control policies - * @return The creator object (for call chaining) - */ - public Updater setAccessControl(StreamingEndpointAccessControlType streamingEndpointAccessControl) { - this.streamingEndpointAccessControl = streamingEndpointAccessControl; - return this; - } - - /** - * Set the new list of custom host names of the streaming endpoint to be - * updated. - * - * @param customHostNames - * the list of custom host names - * @return The creator object (for call chaining) - */ - public Updater setCustomHostNames(List customHostNames) { - this.customHostNames = customHostNames; - return this; - } - - /** - * Set the new streaming endpoint cache control of the streaming - * endpoint to be updated. - * - * @param streamingEndpointCacheControl - * the streaming endpoint cache control - * @return The creator object (for call chaining) - */ - public Updater setCacheControl(StreamingEndpointCacheControlType streamingEndpointCacheControl) { - this.streamingEndpointCacheControl = streamingEndpointCacheControl; - return this; - } - - /** - * Set the new cross site access policies of the streaming endpoint to - * be updated. - * - * @param crossSiteAccessPolicies - * the cross site access policies - * @return The creator object (for call chaining) - */ - public Updater setCrossSiteAccessPolicies(CrossSiteAccessPoliciesType crossSiteAccessPolicies) { - this.crossSiteAccessPolicies = crossSiteAccessPolicies; - return this; - } - } - - /** - * Create an operation to delete the given streaming endpoint - * - * @param assetId - * id of asset to delete - * @return the delete operation - */ - public static EntityDeleteOperation delete(String streamingEndpointId) { - return new DefaultDeleteOperation(ENTITY_SET, streamingEndpointId); - } - - public static EntityActionOperation start(String streamingEndpointId) { - return new DefaultEntityActionOperation(ENTITY_SET, streamingEndpointId, "Start"); - } - - public static EntityActionOperation stop(String streamingEndpointId) { - return new DefaultEntityActionOperation(ENTITY_SET, streamingEndpointId, "Stop"); - } - - public static EntityActionOperation scale(String streamingEndpointId, int scaleUnits) { - DefaultEntityActionOperation operation = new DefaultEntityActionOperation(ENTITY_SET, streamingEndpointId, - "Scale"); - operation.addBodyParameter("scaleUnits", scaleUnits); - return operation; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpointInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpointInfo.java deleted file mode 100644 index 07b7e2edb8de..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpointInfo.java +++ /dev/null @@ -1,188 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; -import java.util.List; - -import com.microsoft.windowsazure.services.media.entityoperations.EntityWithOperationIdentifier; -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.CrossSiteAccessPoliciesType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointAccessControlType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointCacheControlType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointType; - -/** - * Data about a Media Services Asset entity. - * - */ -public class StreamingEndpointInfo extends ODataEntity - implements EntityWithOperationIdentifier { - - private String operationIdentifier = null; - - /** - * Instantiates a new streaming end point info. - * - * @param entry - * the entry - * @param content - * the content - */ - public StreamingEndpointInfo(EntryType entry, StreamingEndpointType content) { - super(entry, content); - } - - /** - * Get the streaming end point id. - * - * @return the id - */ - public String getId() { - return getContent().getId(); - } - - /** - * Get the streaming end point name. - * - * @return the name - */ - public String getName() { - return this.getContent().getName(); - } - - /** - * Get the streaming end point description. - * - * @return the description - */ - public String getDescription() { - return this.getContent().getDescription(); - } - - /** - * Get the creation date. - * - * @return the date - */ - public Date getCreated() { - return this.getContent().getCreated(); - } - - /** - * Get last modified date. - * - * @return the date - */ - public Date getLastModified() { - return getContent().getLastModified(); - } - - /** - * Get the streaming end point state. - * - * @return the state - */ - public StreamingEndpointState getState() { - return StreamingEndpointState.fromCode(getContent().getState()); - } - - /** - * Get the host name - * - * @return the host name - */ - public String getHostName() { - return getContent().getHostName(); - } - - /** - * Get the scale units - * - * @return the scale units - */ - public int getScaleUnits() { - return getContent().getScaleUnits(); - } - - /** - * Get the list of custom host names. - * - * @return the id - */ - public List getCustomHostNames() { - return getContent().getCustomHostName(); - } - - /** - * True if CDN is enabled. - */ - public boolean isCdnEnabled() { - return getContent().isCdnEnabled(); - } - - /** - * Get the access control policy - * - * @return the access control policy - */ - public StreamingEndpointAccessControlType getAccessControl() { - return getContent().getAccessControl(); - } - - /** - * Get the cache control policy - * - * @return the cahe control policy - */ - public StreamingEndpointCacheControlType getCacheControl() { - return getContent().getCacheControl(); - } - - /** - * Get the cross site access policy - * - * @return the cross site access policy - */ - public CrossSiteAccessPoliciesType getCrossSiteAccessPolicies() { - return getContent().getCrossSiteAccessPolicies(); - } - - /** - * Get the operation-id if any. - */ - @Override - public String getOperationId() { - return operationIdentifier; - } - - /** - * Set the operation-id. - */ - @Override - public void setOperationId(String operationIdentifier) { - this.operationIdentifier = operationIdentifier; - } - - /** - * @return true if the entity has an operation-id. - */ - @Override - public boolean hasOperationIdentifier() { - return operationIdentifier != null; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpointState.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpointState.java deleted file mode 100644 index 1b26974fb5c0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/StreamingEndpointState.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Specifies the states of the se. - */ -public enum StreamingEndpointState { - - Stopped("Stopped"), - - Starting("Starting"), - - Running("Running"), - - Scaling("Scaling"), - - Stopping("Stopping"); - - /** The se state code. */ - private String streamingEndpointStateCode; - - /** - * Instantiates a new se state. - * - * @param streamingEndpointStateCode - * the se state code - */ - private StreamingEndpointState(String streamingEndpointStateCode) { - this.streamingEndpointStateCode = streamingEndpointStateCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public String getCode() { - return streamingEndpointStateCode; - } - - /** - * Create an StreamingEndpointState instance from the corresponding int. - * - * @param state - * state as integer - * @return new StreamingEndpointState instance - */ - public static StreamingEndpointState fromCode(String state) { - if (state.equals("Stopped")) { - return StreamingEndpointState.Stopped; - } else if (state.equals("Starting")) { - return StreamingEndpointState.Starting; - } else if (state.equals("Running")) { - return StreamingEndpointState.Running; - } else if (state.equals("Scaling")) { - return StreamingEndpointState.Scaling; - } else if (state.equals("Stopping")) { - return StreamingEndpointState.Stopping; - } else { - throw new InvalidParameterException("state"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TargetJobState.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TargetJobState.java deleted file mode 100644 index d7b87705c119..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TargetJobState.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * The Enum TargetJobState. - */ -public enum TargetJobState { - /** None. */ - None(0), - - /** FinalStatesOnly. */ - FinalStatesOnly(1), - - /** All. */ - All(2); - - /** The target job state code. */ - private int targetJobStateCode; - - /** - * Instantiates a new job state. - * - * @param targetJobStateCode - * the job state code - */ - private TargetJobState(int targetJobStateCode) { - this.targetJobStateCode = targetJobStateCode; - } - - /** - * Gets the code. - * - * @return the code - */ - public int getCode() { - return this.targetJobStateCode; - } - - /** - * From code. - * - * @param targetJobStateCode - * the target job state code - * @return the job state - */ - public static TargetJobState fromCode(int targetJobStateCode) { - switch (targetJobStateCode) { - case 0: - return TargetJobState.None; - case 1: - return TargetJobState.FinalStatesOnly; - case 2: - return TargetJobState.All; - default: - throw new InvalidParameterException("targetJobStateCode"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Task.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Task.java deleted file mode 100644 index bdb8d2d377ea..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Task.java +++ /dev/null @@ -1,226 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import com.microsoft.windowsazure.services.media.entityoperations.DefaultListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityBatchOperation; -import com.microsoft.windowsazure.services.media.implementation.content.TaskType; -import com.sun.jersey.api.client.GenericType; - -/** - * Class for creating operations to manipulate Task entities. - * - */ -public final class Task { - - /** The Constant ENTITY_SET. */ - private static final String ENTITY_SET = "Tasks"; - - // Prevent instantiation - /** - * Instantiates a new task. - */ - private Task() { - } - - /** - * Creates the. - * - * @param mediaProcessorId - * the media processor id - * @param taskBody - * the task body - * @return the creates the batch operation - */ - public static CreateBatchOperation create(String mediaProcessorId, - String taskBody) { - return new CreateBatchOperation(mediaProcessorId, taskBody); - } - - /** - * Create an operation that will list all the tasks. - * - * @return The list operation - */ - public static DefaultListOperation list() { - return new DefaultListOperation(ENTITY_SET, - new GenericType>() { - }); - } - - /** - * Create an operation that will list the tasks pointed to by the given - * link. - * - * @param link - * link to tasks - * @return the list operation. - */ - public static DefaultListOperation list(LinkInfo link) { - return new DefaultListOperation(link.getHref(), - new GenericType>() { - }); - } - - /** - * The Class CreateBatchOperation. - */ - public static class CreateBatchOperation extends EntityBatchOperation { - - /** The task type. */ - private final TaskType taskType; - - /** - * Instantiates a new creates the batch operation. - * - * @param mediaProcessorId - * the media processor id - * @param taskBody - * the task body - */ - public CreateBatchOperation(String mediaProcessorId, String taskBody) { - this.setVerb("POST"); - taskType = new TaskType(); - addContentObject(taskType); - this.taskType.setMediaProcessorId(mediaProcessorId); - this.taskType.setTaskBody(taskBody); - } - - /** - * Sets the options. - * - * @param options - * the options - * @return the creates the batch operation - */ - public CreateBatchOperation setOptions(TaskOption options) { - this.taskType.setOptions(options.getCode()); - return this; - } - - /** - * Sets the configuration. - * - * @param configuration - * the configuration - * @return the creates the batch operation - */ - public CreateBatchOperation setConfiguration(String configuration) { - this.taskType.setConfiguration(configuration); - return this; - } - - /** - * Sets the name. - * - * @param name - * the name - * @return the creates the batch operation - */ - public CreateBatchOperation setName(String name) { - this.taskType.setName(name); - return this; - } - - /** - * Sets the task body. - * - * @param taskBody - * the task body - * @return the creates the batch operation - */ - public CreateBatchOperation setTaskBody(String taskBody) { - this.taskType.setTaskBody(taskBody); - return this; - } - - /** - * Sets the media processor id. - * - * @param mediaProcessorId - * the media processor id - * @return the creates the batch operation - */ - public CreateBatchOperation setMediaProcessorId(String mediaProcessorId) { - this.taskType.setMediaProcessorId(mediaProcessorId); - return this; - } - - /** - * Sets the priority. - * - * @param priority - * the priority - * @return the creates the batch operation - */ - public CreateBatchOperation setPriority(int priority) { - this.taskType.setPriority(priority); - return this; - } - - /** - * Sets the encryption key id. - * - * @param encryptionKeyId - * the encryption key id - * @return the creates the batch operation - */ - public CreateBatchOperation setEncryptionKeyId(String encryptionKeyId) { - this.taskType.setEncryptionKeyId(encryptionKeyId); - return this; - } - - /** - * Sets the encryption scheme. - * - * @param encryptionScheme - * the encryption scheme - * @return the creates the batch operation - */ - public CreateBatchOperation setEncryptionScheme(String encryptionScheme) { - this.taskType.setEncryptionScheme(encryptionScheme); - return this; - } - - /** - * Sets the encryption version. - * - * @param encryptionVersion - * the encryption version - * @return the creates the batch operation - */ - public CreateBatchOperation setEncryptionVersion( - String encryptionVersion) { - this.taskType.setEncryptionVersion(encryptionVersion); - return this; - } - - /** - * Sets the initialization vector. - * - * @param initializationVector - * the initialization vector - * @return the creates the batch operation - */ - public CreateBatchOperation setInitializationVector( - String initializationVector) { - this.taskType.setInitializationVector(initializationVector); - return this; - } - - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskHistoricalEvent.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskHistoricalEvent.java deleted file mode 100644 index bd7d13f7daa1..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskHistoricalEvent.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; - -/** - * The Class TaskHistoricalEvent. - */ -public class TaskHistoricalEvent { - - /** The code. */ - private final String code; - - /** The message. */ - private final String message; - - /** The time stamp. */ - private final Date timeStamp; - - /** - * Instantiates a new task historical event. - * - * @param code - * the code - * @param message - * the message - * @param timeStamp - * the time stamp - */ - public TaskHistoricalEvent(String code, String message, Date timeStamp) { - this.code = code; - this.message = message; - this.timeStamp = timeStamp; - } - - /** - * Gets the code. - * - * @return the code - */ - public String getCode() { - return this.code; - } - - /** - * Gets the message. - * - * @return the message - */ - public String getMessage() { - return this.message; - } - - /** - * Gets the time stamp. - * - * @return the time stamp - */ - public Date getTimeStamp() { - return this.timeStamp; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskInfo.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskInfo.java deleted file mode 100644 index 3dc4636e0654..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskInfo.java +++ /dev/null @@ -1,260 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import com.microsoft.windowsazure.services.media.implementation.ODataEntity; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.ErrorDetailType; -import com.microsoft.windowsazure.services.media.implementation.content.TaskHistoricalEventType; -import com.microsoft.windowsazure.services.media.implementation.content.TaskType; - -/** - * The Class TaskInfo. - */ -public class TaskInfo extends ODataEntity { - - /** - * Instantiates a new task info. - * - * @param entry - * the entry - * @param content - * the content - */ - public TaskInfo(EntryType entry, TaskType content) { - super(entry, content); - } - - /** - * Gets the id. - * - * @return the id - */ - public String getId() { - return getContent().getId(); - } - - /** - * Gets the configuration. - * - * @return the configuration - */ - public String getConfiguration() { - return getContent().getConfiguration(); - } - - /** - * Gets the end time. - * - * @return the end time - */ - public Date getEndTime() { - return getContent().getEndTime(); - } - - /** - * Gets the error details. - * - * @return the error details - */ - public List getErrorDetails() { - List result = new ArrayList(); - List errorDetailTypes = getContent().getErrorDetails(); - if (errorDetailTypes != null) { - for (ErrorDetailType errorDetailType : errorDetailTypes) { - ErrorDetail errorDetail = new ErrorDetail( - errorDetailType.getCode(), errorDetailType.getMessage()); - result.add(errorDetail); - } - return result; - } - return null; - } - - /** - * Gets the task historical events. - * - * @return the task historical events - */ - public List getHistoricalEvents() { - List result = new ArrayList(); - List historicalEventTypes = getContent() - .getHistoricalEventTypes(); - - if (historicalEventTypes != null) { - for (TaskHistoricalEventType taskHistoricalEventType : historicalEventTypes) { - String message = taskHistoricalEventType.getMessage(); - if ((message != null) && (message.isEmpty())) { - message = null; - } - TaskHistoricalEvent taskHistoricalEvent = new TaskHistoricalEvent( - taskHistoricalEventType.getCode(), message, - taskHistoricalEventType.getTimeStamp()); - result.add(taskHistoricalEvent); - } - } - - return result; - } - - /** - * Gets the media processor id. - * - * @return the media processor id - */ - public String getMediaProcessorId() { - return getContent().getMediaProcessorId(); - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return getContent().getName(); - } - - /** - * Gets the perf message. - * - * @return the perf message - */ - public String getPerfMessage() { - return getContent().getPerfMessage(); - } - - /** - * Gets the priority. - * - * @return the priority - */ - public int getPriority() { - return getContent().getPriority(); - } - - /** - * Gets the progress. - * - * @return the progress - */ - public double getProgress() { - return getContent().getProgress(); - } - - /** - * Gets the running duration. - * - * @return the running duration - */ - public double getRunningDuration() { - return getContent().getRunningDuration(); - } - - /** - * Gets the start time. - * - * @return the start time - */ - public Date getStartTime() { - return getContent().getStartTime(); - } - - /** - * Gets the state. - * - * @return the state - */ - public TaskState getState() { - return TaskState.fromCode(getContent().getState()); - } - - /** - * Gets the task body. - * - * @return the task body - */ - public String getTaskBody() { - return getContent().getTaskBody(); - } - - /** - * Gets the options. - * - * @return the options - */ - public TaskOption getOptions() { - return TaskOption.fromCode(getContent().getOptions()); - } - - /** - * Gets the encryption key id. - * - * @return the encryption key id - */ - public String getEncryptionKeyId() { - return getContent().getEncryptionKeyId(); - } - - /** - * Gets the encryption scheme. - * - * @return the encryption scheme - */ - public String getEncryptionScheme() { - return getContent().getEncryptionScheme(); - } - - /** - * Gets the encryption version. - * - * @return the encryption version - */ - public String getEncryptionVersion() { - return getContent().getEncryptionVersion(); - } - - /** - * Gets the initialization vector. - * - * @return the initialization vector - */ - public String getInitializationVector() { - return getContent().getInitializationVector(); - } - - /** - * Gets link to the task's input assets. - * - * @return the link - */ - public LinkInfo getInputAssetsLink() { - return this. getRelationLink("InputMediaAssets"); - } - - /** - * Gets link to the task's output assets. - * - * @return the link - */ - public LinkInfo getOutputAssetsLink() { - return this. getRelationLink("OutputMediaAssets"); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskOption.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskOption.java deleted file mode 100644 index 252b30e04e96..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskOption.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Enum describing options for creating tasks - * - */ -public enum TaskOption { - - /** - * None - */ - None(0), - - /** - * Encrypt task configuration - */ - ProtectedConfiguration(1); - - private int code; - - private TaskOption(int code) { - this.code = code; - } - - /** - * Get integer code corresponding to enum value - * - * @return the code - */ - public int getCode() { - return code; - } - - /** - * Return enum value corresponding to integer code - * - * @param code - * the code - * @return the enum value - */ - public static TaskOption fromCode(int code) { - switch (code) { - case 0: - return None; - case 1: - return ProtectedConfiguration; - - default: - throw new InvalidParameterException("code"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskState.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskState.java deleted file mode 100644 index 67651ad9f930..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/TaskState.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.security.InvalidParameterException; - -/** - * Enum defining the state of various tasks. - */ -public enum TaskState { - - /** No state. */ - None(0), - - /** Active. */ - Active(1), - - /** Running. */ - Running(2), - - /** Completed. */ - Completed(3), - - /** Error. */ - Error(4), - - /** The Canceled. */ - Canceled(5), - - /** The Canceling. */ - Canceling(6); - - /** The code. */ - private int code; - - /** - * Instantiates a new task state. - * - * @param code - * the code - */ - private TaskState(int code) { - this.code = code; - } - - /** - * Get integer code corresponding to enum value. - * - * @return the code - */ - public int getCode() { - return code; - } - - /** - * Convert code into enum value. - * - * @param code - * the code - * @return the corresponding enum value - */ - public static TaskState fromCode(int code) { - switch (code) { - case 0: - return None; - case 1: - return Active; - case 2: - return Running; - case 3: - return Completed; - case 4: - return Error; - case 5: - return Canceled; - case 6: - return Canceling; - default: - throw new InvalidParameterException("code"); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/package.html deleted file mode 100644 index 719e4d9b595c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the media service data transfer object classes. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/package.html deleted file mode 100644 index 324cb3246c05..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the media services, interface, and associated configuration and utility classes. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/Exports.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/Exports.java deleted file mode 100644 index b16c68775883..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/Exports.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue; - -import com.microsoft.windowsazure.core.Builder; -import com.microsoft.windowsazure.core.UserAgentFilter; -import com.microsoft.windowsazure.services.queue.implementation.QueueExceptionProcessor; -import com.microsoft.windowsazure.services.queue.implementation.QueueRestProxy; -import com.microsoft.windowsazure.services.queue.implementation.SharedKeyFilter; -import com.microsoft.windowsazure.services.queue.implementation.SharedKeyLiteFilter; - -public class Exports implements Builder.Exports { - @Override - public void register(Builder.Registry registry) { - registry.add(QueueContract.class, QueueExceptionProcessor.class); - registry.add(QueueExceptionProcessor.class); - registry.add(QueueRestProxy.class); - registry.add(SharedKeyLiteFilter.class); - registry.add(SharedKeyFilter.class); - registry.add(UserAgentFilter.class); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueConfiguration.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueConfiguration.java deleted file mode 100644 index a8e30604a8b0..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueConfiguration.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue; - -/** - * A class that contains static strings used to identify parts of a service - * configuration instance associated with the Windows Azure Queue service. - *

- * These values must not be altered. - */ -public abstract class QueueConfiguration { - public static final String ACCOUNT_NAME = "queue.accountName"; - public static final String ACCOUNT_KEY = "queue.accountKey"; - public static final String URI = "queue.uri"; -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueContract.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueContract.java deleted file mode 100644 index 4eede912e5a5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueContract.java +++ /dev/null @@ -1,516 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue; - -import java.util.HashMap; - -import com.microsoft.windowsazure.core.pipeline.jersey.JerseyFilterableService; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.queue.models.CreateMessageOptions; -import com.microsoft.windowsazure.services.queue.models.CreateQueueOptions; -import com.microsoft.windowsazure.services.queue.models.GetQueueMetadataResult; -import com.microsoft.windowsazure.services.queue.models.GetServicePropertiesResult; -import com.microsoft.windowsazure.services.queue.models.ListMessagesOptions; -import com.microsoft.windowsazure.services.queue.models.ListMessagesResult; -import com.microsoft.windowsazure.services.queue.models.ListQueuesOptions; -import com.microsoft.windowsazure.services.queue.models.ListQueuesResult; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesOptions; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesResult; -import com.microsoft.windowsazure.services.queue.models.QueueServiceOptions; -import com.microsoft.windowsazure.services.queue.models.ServiceProperties; -import com.microsoft.windowsazure.services.queue.models.UpdateMessageResult; - -/** - * Defines the methods available on the Windows Azure storage queue service. - * Construct an object instance implementing QueueContract with - * one of the static create methods on {@link QueueService}. These - * methods associate a {@link Configuration} with the implementation, so the - * methods on the instance of QueueContract all work with a - * particular storage account. - */ -public interface QueueContract extends JerseyFilterableService { - /** - * Gets the service properties of the queue. - * - * @return A {@link GetServicePropertiesResult} reference to the queue - * service properties. - * - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - GetServicePropertiesResult getServiceProperties() throws ServiceException; - - /** - * Gets the service properties of the queue, using the specified options. - * Use the {@link QueueServiceOptions options} parameter to specify the - * server timeout for the operation. - * - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @return A {@link GetServicePropertiesResult} reference to the queue - * service properties. - * - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - GetServicePropertiesResult getServiceProperties(QueueServiceOptions options) - throws ServiceException; - - /** - * Sets the service properties of the queue. - * - * @param serviceProperties - * A {@link ServiceProperties} instance containing the queue - * service properties to set. - * - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void setServiceProperties(ServiceProperties serviceProperties) - throws ServiceException; - - /** - * Sets the service properties of the queue, using the specified options. - * Use the {@link QueueServiceOptions options} parameter to specify the - * server timeout for the operation. - * - * @param serviceProperties - * A {@link ServiceProperties} instance containing the queue - * service properties to set. - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs accessing the storage service. - */ - void setServiceProperties(ServiceProperties serviceProperties, - QueueServiceOptions options) throws ServiceException; - - /** - * Creates a queue in the storage account with the specified queue name. - * - * @param queue - * A {@link String} containing the name of the queue to create. - * - * @throws ServiceException - * if an error occurs in the storage service. - */ - void createQueue(String queue) throws ServiceException; - - /** - * Creates a queue in the storage account with the specified queue name, - * using the specified options. Use the {@link QueueServiceOptions options} - * parameter to specify the server timeout for the operation. - * - * @param queue - * A {@link String} containing the name of the queue to create. - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void createQueue(String queue, CreateQueueOptions options) - throws ServiceException; - - /** - * Deletes the queue in the storage account with the specified queue name. - * - * @param queue - * A {@link String} containing the name of the queue to delete. - * - * @throws ServiceException - * if an error occurs in the storage service. - */ - void deleteQueue(String queue) throws ServiceException; - - /** - * Deletes the queue in the storage account with the specified queue name, - * using the specified options. Use the {@link QueueServiceOptions options} - * parameter to specify the server timeout for the operation. - * - * @param queue - * A {@link String} containing the name of the queue to delete. - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void deleteQueue(String queue, QueueServiceOptions options) - throws ServiceException; - - /** - * Gets a list of the queues in the storage account. - * - * @return A {@link ListQueuesResult} reference to the queues returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - ListQueuesResult listQueues() throws ServiceException; - - /** - * Gets a list of the queues in the storage account, using the specified - * options. Use the {@link ListQueuesOptions options} parameter to specify - * the server timeout for the operation, the prefix for queue names to - * match, the marker for the beginning of the queues to list, the maximum - * number of results to return, and whether to include queue metadata with - * the results. - * - * @param options - * A {@link ListQueuesOptions} instance containing options for - * the request. - * @return A {@link ListQueuesResult} reference to the queues returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - ListQueuesResult listQueues(ListQueuesOptions options) - throws ServiceException; - - /** - * Gets the metadata for the named queue in the storage account. Queue - * metadata is a user-defined collection of key-value {@link String} pairs - * that is opaque to the server. - * - * @param queue - * A {@link String} containing the name of the queue to get the - * metadata for. - * @return A {@link GetQueueMetadataResult} reference to the metadata for - * the queue. - * @throws ServiceException - * if an error occurs in the storage service. - */ - GetQueueMetadataResult getQueueMetadata(String queue) - throws ServiceException; - - /** - * Gets the metadata for the named queue in the storage account, using the - * specified options. Use the {@link QueueServiceOptions options} parameter - * to specify the server timeout for the operation. Queue metadata is a - * user-defined collection of key-value {@link String} pairs that is opaque - * to the server. - * - * @param queue - * A {@link String} containing the name of the queue to get the - * metadata for. - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @return A {@link ListQueuesResult} reference to the queues returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - GetQueueMetadataResult getQueueMetadata(String queue, - QueueServiceOptions options) throws ServiceException; - - /** - * Sets the specified metadata on the named queue in the storage account. - * Queue metadata is a user-defined collection of key-value {@link String} - * pairs that is opaque to the server. - * - * @param queue - * A {@link String} containing the name of the queue to set the - * metadata on. - * @param metadata - * A {@link java.util.HashMap} of metadata key-value - * {@link String} pairs to set on the queue. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void setQueueMetadata(String queue, HashMap metadata) - throws ServiceException; - - /** - * Sets the specified metadata on the named queue in the storage account, - * using the specified options. Use the {@link QueueServiceOptions options} - * parameter to specify the server timeout for the operation. Queue metadata - * is a user-defined collection of key-value {@link String} pairs that is - * opaque to the server. - * - * @param queue - * A {@link String} containing the name of the queue to set the - * metadata on. - * @param metadata - * A {@link java.util.HashMap} of metadata key-value - * {@link String} pairs to set on the queue. - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void setQueueMetadata(String queue, HashMap metadata, - QueueServiceOptions options) throws ServiceException; - - /** - * Appends a message with the specified text to the tail of the named queue - * in the storage account. - * - * @param queue - * A {@link String} containing the name of the queue to append - * the message to. - * @param messageText - * A {@link String} containing the text of the message to append - * to the queue. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void createMessage(String queue, String messageText) - throws ServiceException; - - /** - * Appends a message with the specified text to the tail of the named queue - * in the storage account, using the specified options. Use the - * {@link CreateMessageOptions options} parameter to specify the server - * timeout for the operation, the message visibility timeout, and the - * message time to live in the queue. - * - * @param queue - * A {@link String} containing the name of the queue to append - * the message to. - * @param messageText - * A {@link String} containing the text of the message to append - * to the queue. - * @param options - * A {@link CreateMessageOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void createMessage(String queue, String messageText, - CreateMessageOptions options) throws ServiceException; - - /** - * Updates the message in the named queue with the specified message ID and - * pop receipt value to have the specified message text and visibility - * timeout value. - * - * @param queue - * A {@link String} containing the name of the queue with the - * message to update. - * @param messageId - * A {@link String} containing the ID of the message to update. - * @param popReceipt - * A {@link String} containing the pop receipt for the message - * returned by a call to updateMessage or listMessages. - * @param messageText - * A {@link String} containing the updated text to set for the - * message. - * @param visibilityTimeoutInSeconds - * The new visibility timeout to set on the message, in seconds. - * @return An {@link UpdateMessageResult} reference to the updated message - * result returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - UpdateMessageResult updateMessage(String queue, String messageId, - String popReceipt, String messageText, - int visibilityTimeoutInSeconds) throws ServiceException; - - /** - * Updates the message in the named queue with the specified message ID and - * pop receipt value to have the specified message text and visibility - * timeout value, using the specified options. Use the - * {@link QueueServiceOptions options} parameter to specify the server - * timeout for the operation. - * - * @param queue - * A {@link String} containing the name of the queue with the - * message to update. - * @param messageId - * A {@link String} containing the ID of the message to update. - * @param popReceipt - * A {@link String} containing the pop receipt for the message - * returned by a call to updateMessage or listMessages. - * @param messageText - * A {@link String} containing the updated text to set for the - * message. - * @param visibilityTimeoutInSeconds - * The new visibility timeout to set on the message, in seconds. - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @return An {@link UpdateMessageResult} reference to the updated message - * result returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - UpdateMessageResult updateMessage(String queue, String messageId, - String popReceipt, String messageText, - int visibilityTimeoutInSeconds, QueueServiceOptions options) - throws ServiceException; - - /** - * Deletes the message in the named queue with the specified message ID and - * pop receipt value. - * - * @param queue - * A {@link String} containing the name of the queue with the - * message to delete. - * @param messageId - * A {@link String} containing the ID of the message to delete. - * @param popReceipt - * A {@link String} containing the pop receipt for the message - * returned by a call to updateMessage or listMessages. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void deleteMessage(String queue, String messageId, String popReceipt) - throws ServiceException; - - /** - * Deletes the message in the named queue with the specified message ID and - * popReceipt value, using the specified options. Use the - * {@link QueueServiceOptions options} parameter to specify the server - * timeout for the operation. - * - * @param queue - * A {@link String} containing the name of the queue with the - * message to delete. - * @param messageId - * A {@link String} containing the ID of the message to delete. - * @param popReceipt - * A {@link String} containing the pop receipt for the message - * returned by a call to updateMessage or listMessages. - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void deleteMessage(String queue, String messageId, String popReceipt, - QueueServiceOptions options) throws ServiceException; - - /** - * Retrieves the first message from head of the named queue in the storage - * account. This marks the message as invisible for the default visibility - * timeout period. When message processing is complete, the message must be - * deleted with a call to - * {@link com.microsoft.windowsazure.services.queue.QueueContract#deleteMessage(String, String, String, QueueServiceOptions) - * deleteMessage}. If message processing will take longer than the - * visibility timeout period, use the - * {@link com.microsoft.windowsazure.services.queue.QueueContract#updateMessage(String, String, String, String, int, QueueServiceOptions) - * updateMessage} method to extend the visibility timeout. The message will - * become visible in the queue again when the timeout completes if it is not - * deleted. - *

- * To get a list of multiple messages from the head of the queue, call the - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listMessages(String, ListMessagesOptions)} method - * with options set specifying the number of messages to return. - * - * @param queue - * A {@link String} containing the name of the queue to get the - * message from. - * @return A {@link ListMessagesResult} reference to the message result - * returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - ListMessagesResult listMessages(String queue) throws ServiceException; - - /** - * Retrieves up to 32 messages from the head of the named queue in the - * storage account, using the specified options. Use the - * {@link ListMessagesOptions options} parameter to specify the server - * timeout for the operation, the number of messages to retrieve, and the - * visibility timeout to set on the retrieved messages. When message - * processing is complete, each message must be deleted with a call to - * {@link com.microsoft.windowsazure.services.queue.QueueContract#deleteMessage(String, String, String, QueueServiceOptions) - * deleteMessage}. If message processing takes longer than the default - * timeout period, use the - * {@link com.microsoft.windowsazure.services.queue.QueueContract#updateMessage(String, String, String, String, int, QueueServiceOptions) - * updateMessage} method to extend the visibility timeout. Each message will - * become visible in the queue again when the timeout completes if it is not - * deleted. - * - * @param queue - * A {@link String} containing the name of the queue to get the - * messages from. - * @param options - * A {@link ListMessagesOptions} instance containing options for - * the request. - * @return A {@link ListMessagesResult} reference to the message result - * returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - ListMessagesResult listMessages(String queue, ListMessagesOptions options) - throws ServiceException; - - /** - * Peeks a message from the named queue. A peek request retrieves a message - * from the head of the queue without changing its visibility. - * - * @param queue - * A {@link String} containing the name of the queue to peek the - * message from. - * @return A {@link PeekMessagesResult} reference to the message result - * returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - PeekMessagesResult peekMessages(String queue) throws ServiceException; - - /** - * Peeks messages from the named queue, using the specified options. A peek - * request retrieves messages from the head of the queue without changing - * their visibility. Use the {@link PeekMessagesOptions options} parameter - * to specify the server timeout for the operation and the number of - * messages to retrieve. - * - * @param queue - * A {@link String} containing the name of the queue to peek the - * message from. - * @param options - * A {@link PeekMessagesOptions} instance containing options for - * the request. - * @return A {@link PeekMessagesResult} reference to the message result - * returned. - * @throws ServiceException - * if an error occurs in the storage service. - */ - PeekMessagesResult peekMessages(String queue, PeekMessagesOptions options) - throws ServiceException; - - /** - * Deletes all messages in the named queue. - * - * @param queue - * A {@link String} containing the name of the queue to delete - * all messages from. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void clearMessages(String queue) throws ServiceException; - - /** - * Deletes all messages in the named queue, using the specified options. Use - * the {@link QueueServiceOptions options} parameter to specify the server - * timeout for the operation. - * - * @param queue - * A {@link String} containing the name of the queue to delete - * all messages from. - * @param options - * A {@link QueueServiceOptions} instance containing options for - * the request. - * @throws ServiceException - * if an error occurs in the storage service. - */ - void clearMessages(String queue, QueueServiceOptions options) - throws ServiceException; - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueService.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueService.java deleted file mode 100644 index babf9cadc88b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/QueueService.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue; - -import com.microsoft.windowsazure.Configuration; - -/** - * A class for static factory methods that return instances implementing - * {@link com.microsoft.windowsazure.services.queue.QueueContract}. - */ -public final class QueueService { - /** - * Private default constructor. - */ - private QueueService() { - } - - /** - * A static factory method that returns an instance implementing - * {@link com.microsoft.windowsazure.services.queue.QueueContract} using default values for initializing a - * {@link Configuration} instance. Note that the returned interface will not - * work unless storage account credentials have been added to the - * "META-INF/com.microsoft.windowsazure.properties" resource file. - * - * @return An instance implementing {@link com.microsoft.windowsazure.services.queue.QueueContract} for interacting - * with the queue service. - */ - public static QueueContract create() { - return create(null, Configuration.getInstance()); - } - - /** - * A static factory method that returns an instance implementing - * {@link com.microsoft.windowsazure.services.queue.QueueContract} using the specified {@link Configuration} instance. - * The {@link Configuration} instance must have storage account information - * and credentials set before this method is called for the returned - * interface to work. - * - * @param config - * A {@link Configuration} instance configured with storage - * account information and credentials. - * - * @return An instance implementing {@link com.microsoft.windowsazure.services.queue.QueueContract} for interacting - * with the queue service. - */ - public static QueueContract create(Configuration config) { - return create(null, config); - } - - /** - * A static factory method that returns an instance implementing - * {@link com.microsoft.windowsazure.services.queue.QueueContract} using default values for initializing a - * {@link Configuration} instance, and using the specified profile prefix - * for service settings. Note that the returned interface will not work - * unless storage account settings and credentials have been added to the - * "META-INF/com.microsoft.windowsazure.properties" resource file with the - * specified profile prefix. - * - * @param profile - * A string prefix for the account name and credentials settings - * in the {@link Configuration} instance. - * @return An instance implementing {@link com.microsoft.windowsazure.services.queue.QueueContract} for interacting - * with the queue service. - */ - public static QueueContract create(String profile) { - return create(profile, Configuration.getInstance()); - } - - /** - * A static factory method that returns an instance implementing - * {@link com.microsoft.windowsazure.services.queue.QueueContract} using the specified {@link Configuration} instance - * and profile prefix for service settings. The {@link Configuration} - * instance must have storage account information and credentials set with - * the specified profile prefix before this method is called for the - * returned interface to work. - * - * @param profile - * A string prefix for the account name and credentials settings - * in the {@link Configuration} instance. - * @param config - * A {@link Configuration} instance configured with storage - * account information and credentials. - * - * @return An instance implementing {@link com.microsoft.windowsazure.services.queue.QueueContract} for interacting - * with the queue service. - */ - public static QueueContract create(String profile, Configuration config) { - return config.create(profile, QueueContract.class); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueExceptionProcessor.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueExceptionProcessor.java deleted file mode 100644 index 2e50c29347e5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueExceptionProcessor.java +++ /dev/null @@ -1,415 +0,0 @@ -/** - * - * Copyright (c) Microsoft and contributors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.microsoft.windowsazure.services.queue.implementation; - -import java.util.HashMap; - -import javax.inject.Inject; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.exception.ServiceExceptionFactory; -import com.microsoft.windowsazure.services.queue.QueueContract; -import com.microsoft.windowsazure.services.queue.models.CreateMessageOptions; -import com.microsoft.windowsazure.services.queue.models.CreateQueueOptions; -import com.microsoft.windowsazure.services.queue.models.GetQueueMetadataResult; -import com.microsoft.windowsazure.services.queue.models.GetServicePropertiesResult; -import com.microsoft.windowsazure.services.queue.models.ListMessagesOptions; -import com.microsoft.windowsazure.services.queue.models.ListMessagesResult; -import com.microsoft.windowsazure.services.queue.models.ListQueuesOptions; -import com.microsoft.windowsazure.services.queue.models.ListQueuesResult; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesOptions; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesResult; -import com.microsoft.windowsazure.services.queue.models.QueueServiceOptions; -import com.microsoft.windowsazure.services.queue.models.ServiceProperties; -import com.microsoft.windowsazure.services.queue.models.UpdateMessageResult; -import com.sun.jersey.api.client.ClientHandlerException; -import com.sun.jersey.api.client.UniformInterfaceException; - -public class QueueExceptionProcessor implements QueueContract { - private static Log log = LogFactory.getLog(QueueExceptionProcessor.class); - private final QueueContract service; - - @Inject - public QueueExceptionProcessor(QueueRestProxy service) { - this.service = service; - } - - public QueueExceptionProcessor(QueueContract service) { - this.service = service; - } - - public QueueContract withFilter(ServiceFilter filter) { - return new QueueExceptionProcessor(service.withFilter(filter)); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.core.FilterableService# - * withRequestFilterFirst - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public QueueContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter) { - return new QueueExceptionProcessor( - service.withRequestFilterFirst(serviceRequestFilter)); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.core.FilterableService# - * withRequestFilterLast - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public QueueContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter) { - return new QueueExceptionProcessor( - service.withRequestFilterLast(serviceRequestFilter)); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.core.FilterableService# - * withResponseFilterFirst - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public QueueContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter) { - return new QueueExceptionProcessor( - service.withResponseFilterFirst(serviceResponseFilter)); - } - - /* - * (non-Javadoc) - * - * @see com.microsoft.windowsazure.services.core.FilterableService# - * withResponseFilterLast - * (com.microsoft.windowsazure.services.core.ServiceFilter) - */ - @Override - public QueueContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter) { - return new QueueExceptionProcessor( - service.withResponseFilterLast(serviceResponseFilter)); - } - - private ServiceException processCatch(ServiceException e) { - log.warn(e.getMessage(), e.getCause()); - return ServiceExceptionFactory.process("queue", e); - } - - public GetServicePropertiesResult getServiceProperties() - throws ServiceException { - try { - return service.getServiceProperties(); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public GetServicePropertiesResult getServiceProperties( - QueueServiceOptions options) throws ServiceException { - try { - return service.getServiceProperties(options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void setServiceProperties(ServiceProperties serviceProperties) - throws ServiceException { - try { - service.setServiceProperties(serviceProperties); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void setServiceProperties(ServiceProperties serviceProperties, - QueueServiceOptions options) throws ServiceException { - try { - service.setServiceProperties(serviceProperties, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void createQueue(String queue) throws ServiceException { - try { - service.createQueue(queue); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void createQueue(String queue, CreateQueueOptions options) - throws ServiceException { - try { - service.createQueue(queue, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void deleteQueue(String queue) throws ServiceException { - try { - service.deleteQueue(queue); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void deleteQueue(String queue, QueueServiceOptions options) - throws ServiceException { - try { - service.deleteQueue(queue, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public ListQueuesResult listQueues() throws ServiceException { - try { - return service.listQueues(); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public ListQueuesResult listQueues(ListQueuesOptions options) - throws ServiceException { - try { - return service.listQueues(options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public GetQueueMetadataResult getQueueMetadata(String queue) - throws ServiceException { - try { - return service.getQueueMetadata(queue); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public GetQueueMetadataResult getQueueMetadata(String queue, - QueueServiceOptions options) throws ServiceException { - try { - return service.getQueueMetadata(queue, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void setQueueMetadata(String queue, HashMap metadata) - throws ServiceException { - try { - service.setQueueMetadata(queue, metadata); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void setQueueMetadata(String queue, - HashMap metadata, QueueServiceOptions options) - throws ServiceException { - try { - service.setQueueMetadata(queue, metadata, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void createMessage(String queue, String messageText) - throws ServiceException { - try { - service.createMessage(queue, messageText); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void createMessage(String queue, String messageText, - CreateMessageOptions options) throws ServiceException { - try { - service.createMessage(queue, messageText, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public UpdateMessageResult updateMessage(String queue, String messageId, - String popReceipt, String messageText, - int visibilityTimeoutInSeconds) throws ServiceException { - try { - return service.updateMessage(queue, messageId, popReceipt, - messageText, visibilityTimeoutInSeconds); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public UpdateMessageResult updateMessage(String queue, String messageId, - String popReceipt, String messageText, - int visibilityTimeoutInSeconds, QueueServiceOptions options) - throws ServiceException { - try { - return service.updateMessage(queue, messageId, popReceipt, - messageText, visibilityTimeoutInSeconds, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public ListMessagesResult listMessages(String queue) - throws ServiceException { - try { - return service.listMessages(queue); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public ListMessagesResult listMessages(String queue, - ListMessagesOptions options) throws ServiceException { - try { - return service.listMessages(queue, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public PeekMessagesResult peekMessages(String queue) - throws ServiceException { - try { - return service.peekMessages(queue); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public PeekMessagesResult peekMessages(String queue, - PeekMessagesOptions options) throws ServiceException { - try { - return service.peekMessages(queue, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void deleteMessage(String queue, String messageId, String popReceipt) - throws ServiceException { - try { - service.deleteMessage(queue, messageId, popReceipt); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void deleteMessage(String queue, String messageId, - String popReceipt, QueueServiceOptions options) - throws ServiceException { - try { - service.deleteMessage(queue, messageId, popReceipt, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void clearMessages(String queue) throws ServiceException { - try { - service.clearMessages(queue); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } - - public void clearMessages(String queue, QueueServiceOptions options) - throws ServiceException { - try { - service.clearMessages(queue, options); - } catch (UniformInterfaceException e) { - throw processCatch(new ServiceException(e)); - } catch (ClientHandlerException e) { - throw processCatch(new ServiceException(e)); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueMessage.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueMessage.java deleted file mode 100644 index 7f5445bcc4ec..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueMessage.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * - * Copyright (c) Microsoft and contributors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.microsoft.windowsazure.services.queue.implementation; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -@XmlRootElement(name = "QueueMessage") -public class QueueMessage { - private String messageText; - - @XmlElement(name = "MessageText") - public String getMessageText() { - return messageText; - } - - public void setMessageText(String messageText) { - this.messageText = messageText; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueRestProxy.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueRestProxy.java deleted file mode 100644 index 97da2aa56501..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/QueueRestProxy.java +++ /dev/null @@ -1,519 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.implementation; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -import javax.inject.Inject; -import javax.inject.Named; - -import com.microsoft.windowsazure.core.RFC1123DateConverter; -import com.microsoft.windowsazure.core.UserAgentFilter; -import com.microsoft.windowsazure.core.pipeline.PipelineHelpers; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestFilter; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterRequestAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.ClientFilterResponseAdapter; -import com.microsoft.windowsazure.core.pipeline.jersey.HttpURLConnectionClient; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.queue.QueueConfiguration; -import com.microsoft.windowsazure.services.queue.QueueContract; -import com.microsoft.windowsazure.services.queue.models.CreateMessageOptions; -import com.microsoft.windowsazure.services.queue.models.CreateQueueOptions; -import com.microsoft.windowsazure.services.queue.models.GetQueueMetadataResult; -import com.microsoft.windowsazure.services.queue.models.GetServicePropertiesResult; -import com.microsoft.windowsazure.services.queue.models.ListMessagesOptions; -import com.microsoft.windowsazure.services.queue.models.ListMessagesResult; -import com.microsoft.windowsazure.services.queue.models.ListQueuesOptions; -import com.microsoft.windowsazure.services.queue.models.ListQueuesResult; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesOptions; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesResult; -import com.microsoft.windowsazure.services.queue.models.QueueServiceOptions; -import com.microsoft.windowsazure.services.queue.models.ServiceProperties; -import com.microsoft.windowsazure.services.queue.models.UpdateMessageResult; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.WebResource; -import com.sun.jersey.api.client.WebResource.Builder; -import com.sun.jersey.api.client.filter.ClientFilter; - -public class QueueRestProxy implements QueueContract { - // private static Log log = LogFactory.getLog(QueueRestProxy.class); - - private static final String API_VERSION = "2011-08-18"; - private final HttpURLConnectionClient channel; - private final String accountName; - private final String url; - private final RFC1123DateConverter dateMapper; - private final ClientFilter[] filters; - private final SharedKeyFilter sharedKeyFilter; - - @Inject - public QueueRestProxy(HttpURLConnectionClient channel, - @Named(QueueConfiguration.ACCOUNT_NAME) String accountName, - @Named(QueueConfiguration.URI) String url, - SharedKeyFilter sharedKeyFilter, UserAgentFilter userAgentFilter) { - - this.channel = channel; - this.accountName = accountName; - this.url = url; - this.sharedKeyFilter = sharedKeyFilter; - this.dateMapper = new RFC1123DateConverter(); - this.filters = new ClientFilter[0]; - channel.addFilter(sharedKeyFilter); - channel.addFilter(new ClientFilterRequestAdapter(userAgentFilter)); - } - - public QueueRestProxy(HttpURLConnectionClient channel, - ClientFilter[] filters, String accountName, String url, - SharedKeyFilter filter, RFC1123DateConverter dateMapper) { - - this.channel = channel; - this.filters = filters; - this.accountName = accountName; - this.url = url; - this.sharedKeyFilter = filter; - this.dateMapper = dateMapper; - } - - @Override - public QueueContract withFilter(ServiceFilter filter) { - ClientFilter[] currentFilters = filters; - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterAdapter(filter); - return new QueueRestProxy(this.channel, newFilters, this.accountName, - this.url, this.sharedKeyFilter, this.dateMapper); - } - - @Override - public QueueContract withRequestFilterFirst( - ServiceRequestFilter serviceRequestFilter) { - ClientFilter[] currentFilters = filters; - ClientFilter[] newFilters = new ClientFilter[currentFilters.length + 1]; - System.arraycopy(currentFilters, 0, newFilters, 1, - currentFilters.length); - newFilters[0] = new ClientFilterRequestAdapter(serviceRequestFilter); - return new QueueRestProxy(this.channel, newFilters, this.accountName, - this.url, this.sharedKeyFilter, this.dateMapper); - } - - @Override - public QueueContract withRequestFilterLast( - ServiceRequestFilter serviceRequestFilter) { - ClientFilter[] currentFilters = filters; - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterRequestAdapter( - serviceRequestFilter); - return new QueueRestProxy(this.channel, newFilters, this.accountName, - this.url, this.sharedKeyFilter, this.dateMapper); - } - - @Override - public QueueContract withResponseFilterFirst( - ServiceResponseFilter serviceResponseFilter) { - ClientFilter[] currentFilters = filters; - ClientFilter[] newFilters = new ClientFilter[currentFilters.length + 1]; - System.arraycopy(currentFilters, 0, newFilters, 1, - currentFilters.length); - newFilters[0] = new ClientFilterResponseAdapter(serviceResponseFilter); - return new QueueRestProxy(this.channel, newFilters, this.accountName, - this.url, this.sharedKeyFilter, this.dateMapper); - } - - @Override - public QueueContract withResponseFilterLast( - ServiceResponseFilter serviceResponseFilter) { - ClientFilter[] currentFilters = filters; - ClientFilter[] newFilters = Arrays.copyOf(currentFilters, - currentFilters.length + 1); - newFilters[currentFilters.length] = new ClientFilterResponseAdapter( - serviceResponseFilter); - return new QueueRestProxy(this.channel, newFilters, this.accountName, - this.url, this.sharedKeyFilter, this.dateMapper); - } - - private void throwIfError(ClientResponse r) { - PipelineHelpers.throwIfError(r); - } - - private WebResource addOptionalQueryParam(WebResource webResource, - String key, Object value) { - return PipelineHelpers.addOptionalQueryParam(webResource, key, value); - } - - private WebResource addOptionalQueryParam(WebResource webResource, - String key, int value, int defaultValue) { - return PipelineHelpers.addOptionalQueryParam(webResource, key, value, - defaultValue); - } - - private Builder addOptionalMetadataHeader(Builder builder, - Map metadata) { - return PipelineHelpers.addOptionalMetadataHeader(builder, metadata); - } - - private HashMap getMetadataFromHeaders( - ClientResponse response) { - return PipelineHelpers.getMetadataFromHeaders(response); - } - - private WebResource getResource(QueueServiceOptions options) { - WebResource webResource = channel.resource(url).path("/"); - webResource = addOptionalQueryParam(webResource, "timeout", - options.getTimeout()); - for (ClientFilter filter : filters) { - webResource.addFilter(filter); - } - - return webResource; - } - - @Override - public GetServicePropertiesResult getServiceProperties() - throws ServiceException { - return getServiceProperties(new QueueServiceOptions()); - } - - @Override - public GetServicePropertiesResult getServiceProperties( - QueueServiceOptions options) throws ServiceException { - WebResource webResource = getResource(options).path("/") - .queryParam("resType", "service") - .queryParam("comp", "properties"); - - WebResource.Builder builder = webResource.header("x-ms-version", - API_VERSION); - - GetServicePropertiesResult result = new GetServicePropertiesResult(); - result.setValue(builder.get(ServiceProperties.class)); - return result; - } - - @Override - public void setServiceProperties(ServiceProperties serviceProperties) - throws ServiceException { - setServiceProperties(serviceProperties, new QueueServiceOptions()); - } - - @Override - public void setServiceProperties(ServiceProperties serviceProperties, - QueueServiceOptions options) throws ServiceException { - WebResource webResource = getResource(options).path("/") - .queryParam("resType", "service") - .queryParam("comp", "properties"); - - WebResource.Builder builder = webResource.header("x-ms-version", - API_VERSION); - - builder.put(serviceProperties); - } - - @Override - public void createQueue(String queue) throws ServiceException { - createQueue(queue, new CreateQueueOptions()); - - } - - @Override - public void createQueue(String queue, CreateQueueOptions options) - throws ServiceException { - if (queue == null) { - throw new NullPointerException(); - } - - WebResource webResource = getResource(options).path(queue); - - WebResource.Builder builder = webResource.header("x-ms-version", - API_VERSION); - builder = addOptionalMetadataHeader(builder, options.getMetadata()); - - builder.put(); - } - - @Override - public void deleteQueue(String queue) throws ServiceException { - deleteQueue(queue, new QueueServiceOptions()); - } - - @Override - public void deleteQueue(String queue, QueueServiceOptions options) - throws ServiceException { - if (queue == null) { - throw new NullPointerException(); - } - - WebResource webResource = getResource(options).path(queue); - - WebResource.Builder builder = webResource.header("x-ms-version", - API_VERSION); - - builder.delete(); - } - - @Override - public ListQueuesResult listQueues() throws ServiceException { - return listQueues(new ListQueuesOptions()); - } - - @Override - public ListQueuesResult listQueues(ListQueuesOptions options) - throws ServiceException { - WebResource webResource = getResource(options).path("/").queryParam( - "comp", "list"); - webResource = addOptionalQueryParam(webResource, "prefix", - options.getPrefix()); - webResource = addOptionalQueryParam(webResource, "marker", - options.getMarker()); - webResource = addOptionalQueryParam(webResource, "maxresults", - options.getMaxResults(), 0); - if (options.isIncludeMetadata()) { - webResource = webResource.queryParam("include", "metadata"); - } - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - return builder.get(ListQueuesResult.class); - } - - @Override - public GetQueueMetadataResult getQueueMetadata(String queue) - throws ServiceException { - return getQueueMetadata(queue, new QueueServiceOptions()); - } - - @Override - public GetQueueMetadataResult getQueueMetadata(String queue, - QueueServiceOptions options) throws ServiceException { - if (queue == null) { - throw new NullPointerException(); - } - - WebResource webResource = getResource(options).path(queue).queryParam( - "comp", "metadata"); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - ClientResponse response = builder.get(ClientResponse.class); - throwIfError(response); - - GetQueueMetadataResult result = new GetQueueMetadataResult(); - result.setApproximateMessageCount(Integer.parseInt(response - .getHeaders().getFirst("x-ms-approximate-messages-count"))); - result.setMetadata(getMetadataFromHeaders(response)); - - return result; - } - - @Override - public void setQueueMetadata(String queue, HashMap metadata) - throws ServiceException { - setQueueMetadata(queue, metadata, new QueueServiceOptions()); - } - - @Override - public void setQueueMetadata(String queue, - HashMap metadata, QueueServiceOptions options) - throws ServiceException { - if (queue == null) { - throw new NullPointerException(); - } - - WebResource webResource = getResource(options).path(queue).queryParam( - "comp", "metadata"); - - WebResource.Builder builder = webResource.header("x-ms-version", - API_VERSION); - builder = addOptionalMetadataHeader(builder, metadata); - - builder.put(); - } - - @Override - public void createMessage(String queue, String messageText) - throws ServiceException { - createMessage(queue, messageText, new CreateMessageOptions()); - } - - @Override - public void createMessage(String queue, String messageText, - CreateMessageOptions options) throws ServiceException { - if (queue == null) { - throw new NullPointerException("queue"); - } - if (messageText == null) { - throw new NullPointerException("messageText"); - } - - WebResource webResource = getResource(options).path(queue).path( - "messages"); - webResource = addOptionalQueryParam(webResource, "visibilitytimeout", - options.getVisibilityTimeoutInSeconds()); - webResource = addOptionalQueryParam(webResource, "messagettl", - options.getTimeToLiveInSeconds()); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - QueueMessage queueMessage = new QueueMessage(); - queueMessage.setMessageText(messageText); - - builder.post(queueMessage); - } - - @Override - public UpdateMessageResult updateMessage(String queue, String messageId, - String popReceipt, String messageText, - int visibilityTimeoutInSeconds) throws ServiceException { - return updateMessage(queue, messageId, popReceipt, messageText, - visibilityTimeoutInSeconds, new QueueServiceOptions()); - } - - @Override - public UpdateMessageResult updateMessage(String queue, String messageId, - String popReceipt, String messageText, - int visibilityTimeoutInSeconds, QueueServiceOptions options) - throws ServiceException { - if (queue == null) { - throw new NullPointerException("queue"); - } - if (messageId == null) { - throw new NullPointerException("messageId"); - } - if (messageText == null) { - throw new NullPointerException("messageText"); - } - - WebResource webResource = getResource(options).path(queue) - .path("messages").path(messageId); - webResource = addOptionalQueryParam(webResource, "popreceipt", - popReceipt); - webResource = addOptionalQueryParam(webResource, "visibilitytimeout", - visibilityTimeoutInSeconds); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - QueueMessage queueMessage = new QueueMessage(); - queueMessage.setMessageText(messageText); - - ClientResponse response = builder.put(ClientResponse.class, - queueMessage); - throwIfError(response); - - UpdateMessageResult result = new UpdateMessageResult(); - result.setPopReceipt(response.getHeaders().getFirst("x-ms-popreceipt")); - result.setTimeNextVisible(dateMapper.parse(response.getHeaders() - .getFirst("x-ms-time-next-visible"))); - return result; - } - - @Override - public ListMessagesResult listMessages(String queue) - throws ServiceException { - return listMessages(queue, new ListMessagesOptions()); - } - - @Override - public ListMessagesResult listMessages(String queue, - ListMessagesOptions options) throws ServiceException { - if (queue == null) { - throw new NullPointerException(); - } - - WebResource webResource = getResource(options).path(queue).path( - "messages"); - webResource = addOptionalQueryParam(webResource, "visibilitytimeout", - options.getVisibilityTimeoutInSeconds()); - webResource = addOptionalQueryParam(webResource, "numofmessages", - options.getNumberOfMessages()); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - return builder.get(ListMessagesResult.class); - } - - @Override - public PeekMessagesResult peekMessages(String queue) - throws ServiceException { - return peekMessages(queue, new PeekMessagesOptions()); - } - - @Override - public PeekMessagesResult peekMessages(String queue, - PeekMessagesOptions options) throws ServiceException { - if (queue == null) { - throw new NullPointerException(); - } - - WebResource webResource = getResource(options).path(queue) - .path("messages").queryParam("peekonly", "true"); - webResource = addOptionalQueryParam(webResource, "numofmessages", - options.getNumberOfMessages()); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - return builder.get(PeekMessagesResult.class); - } - - @Override - public void deleteMessage(String queue, String messageId, String popReceipt) - throws ServiceException { - deleteMessage(queue, messageId, popReceipt, new QueueServiceOptions()); - } - - @Override - public void deleteMessage(String queue, String messageId, - String popReceipt, QueueServiceOptions options) - throws ServiceException { - if (queue == null) { - throw new NullPointerException(); - } - if (messageId == null) { - throw new NullPointerException(); - } - - WebResource webResource = getResource(options).path(queue) - .path("messages").path(messageId); - webResource = addOptionalQueryParam(webResource, "popreceipt", - popReceipt); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - builder.delete(); - } - - @Override - public void clearMessages(String queue) throws ServiceException { - clearMessages(queue, new QueueServiceOptions()); - } - - @Override - public void clearMessages(String queue, QueueServiceOptions options) - throws ServiceException { - if (queue == null) { - throw new NullPointerException(); - } - - WebResource webResource = getResource(options).path(queue).path( - "messages"); - - Builder builder = webResource.header("x-ms-version", API_VERSION); - - builder.delete(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/SharedKeyFilter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/SharedKeyFilter.java deleted file mode 100644 index 9df31e5344ac..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/SharedKeyFilter.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * - * Copyright (c) Microsoft and contributors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.microsoft.windowsazure.services.queue.implementation; - -import javax.inject.Named; - -import com.microsoft.windowsazure.services.queue.QueueConfiguration; - -public class SharedKeyFilter extends - com.microsoft.windowsazure.services.blob.implementation.SharedKeyFilter { - public SharedKeyFilter( - @Named(QueueConfiguration.ACCOUNT_NAME) String accountName, - @Named(QueueConfiguration.ACCOUNT_KEY) String accountKey) { - super(accountName, accountKey); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/SharedKeyLiteFilter.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/SharedKeyLiteFilter.java deleted file mode 100644 index a04f1437ebe3..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/SharedKeyLiteFilter.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * - * Copyright (c) Microsoft and contributors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.microsoft.windowsazure.services.queue.implementation; - -import javax.inject.Named; - -import com.microsoft.windowsazure.services.queue.QueueConfiguration; - -public class SharedKeyLiteFilter - extends - com.microsoft.windowsazure.services.blob.implementation.SharedKeyLiteFilter { - public SharedKeyLiteFilter( - @Named(QueueConfiguration.ACCOUNT_NAME) String accountName, - @Named(QueueConfiguration.ACCOUNT_KEY) String accountKey) { - super(accountName, accountKey); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/package.html deleted file mode 100644 index 7cfd5ada0c07..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/implementation/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the implementation of the queue service classes and utilities. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/CreateMessageOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/CreateMessageOptions.java deleted file mode 100644 index 9520eaf05ce9..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/CreateMessageOptions.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - - -/** - * Represents the options that may be set on the Queue service for - * {@link com.microsoft.windowsazure.services.queue.QueueContract#createMessage(String, String, CreateMessageOptions) - * createMessage} requests. These options include a server response timeout for - * the request, the visibility timeout to set on the created message, and the - * time-to-live value to set on the message. - */ -public class CreateMessageOptions extends QueueServiceOptions { - private Integer visibilityTimeoutInSeconds; - private Integer timeToLiveInSeconds; - - /** - * Sets the server request timeout value associated with this - * {@link CreateMessageOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CreateMessageOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CreateMessageOptions} instance. - */ - @Override - public CreateMessageOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the message visibility timeout in seconds value in this - * {@link CreateMessageOptions} instance. to set on messages when making a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#createMessage(String, String, CreateMessageOptions) - * createMessage} request. - * - * @return The message visibility timeout in seconds. - */ - public Integer getVisibilityTimeoutInSeconds() { - return visibilityTimeoutInSeconds; - } - - /** - * Sets the message visibility timeout in seconds value to set on messages - * when making a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#createMessage(String, String, CreateMessageOptions) - * createMessage} request. This allows messages to be loaded into the queue - * but not become visible until the visibility timeout has passed. Valid - * visibility timeout values range from 0 to 604800 seconds (0 to 7 days), - * and must be less than the time-to-live value. - *

- * The visibilityTimeoutInSeconds value only affects calls made on - * methods where this {@link CreateMessageOptions} instance is passed as a - * parameter. - * - * @param visibilityTimeoutInSeconds - * The length of time during which the message will be invisible, - * starting when it is added to the queue, or 0 to make the - * message visible immediately. This value must be greater than - * or equal to zero and less than or equal to the time-to-live - * value. - * @return A reference to this {@link CreateMessageOptions} instance. - */ - public CreateMessageOptions setVisibilityTimeoutInSeconds( - Integer visibilityTimeoutInSeconds) { - this.visibilityTimeoutInSeconds = visibilityTimeoutInSeconds; - return this; - } - - /** - * Gets the message time-to-live in seconds value associated with this - * {@link CreateMessageOptions} instance. - * - * @return The message time-to-live value in seconds. - */ - public Integer getTimeToLiveInSeconds() { - return timeToLiveInSeconds; - } - - /** - * Sets the message time-to-live timeout value to set on messages when - * making a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#createMessage(String, String, CreateMessageOptions) - * createMessage} request. This is the maximum duration in seconds for the - * message to remain in the queue after it is created. Valid - * timeToLiveInSeconds values range from 0 to 604800 seconds (0 to - * 7 days), with the default value set to seven days. - *

- * The timeToLiveInSeconds value only affects calls made on methods - * where this {@link CreateMessageOptions} instance is passed as a - * parameter. - * - * @param timeToLiveInSeconds - * The maximum time to allow the message to be in the queue, in - * seconds. - * @return A reference to this {@link CreateMessageOptions} instance. - */ - public CreateMessageOptions setTimeToLiveInSeconds( - Integer timeToLiveInSeconds) { - this.timeToLiveInSeconds = timeToLiveInSeconds; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/CreateQueueOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/CreateQueueOptions.java deleted file mode 100644 index 0f31007b3713..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/CreateQueueOptions.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - -import java.util.HashMap; - -/** - * Represents the options that may be set on a queue when created in the storage - * service with a {@link com.microsoft.windowsazure.services.queue.QueueContract#createQueue(String, CreateQueueOptions) - * createQueue} request. These options include a server response timeout for the - * request and the metadata to associate with the created queue. - */ -public class CreateQueueOptions extends QueueServiceOptions { - private HashMap metadata = new HashMap(); - - /** - * Sets the server request timeout value associated with this - * {@link CreateQueueOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link CreateQueueOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link CreateQueueOptions} instance. - */ - @Override - public CreateQueueOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the metadata collection of key-value {@link String} pairs to set on - * a queue when the queue is created. - * - * @return A {@link java.util.HashMap} of key-value {@link String} pairs - * containing the metadata to set on the queue. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Sets the metadata collection of key-value {@link String} pairs to set on - * a queue when the queue is created. Queue metadata is a user-defined - * collection of key-value pairs that is opaque to the server. - *

- * The metadata value is only added to a newly created queue where - * this {@link CreateQueueOptions} instance is passed as a parameter. - * - * @param metadata - * The {@link java.util.HashMap} of key-value {@link String} - * pairs containing the metadata to set on the queue. - * @return A reference to this {@link CreateQueueOptions} instance. - */ - public CreateQueueOptions setMetadata(HashMap metadata) { - this.metadata = metadata; - return this; - } - - /** - * Adds a key-value pair of {@link String} to the metadata collection to set - * on a queue when the queue is created. Queue metadata is a user-defined - * collection of key-value pairs that is opaque to the server. If the key - * already exists in the metadata collection, the value parameter will - * overwrite the existing value paired with that key without notification. - *

- * The updated metadata is only added to a newly created queue where this - * {@link CreateQueueOptions} instance is passed as a parameter. - * - * @param key - * A {@link String} containing the key part of the key-value pair - * to add to the metadata. - * @param value - * A {@link String} containing the value part of the key-value - * pair to add to the metadata. - * @return A reference to this {@link CreateQueueOptions} instance. - */ - public CreateQueueOptions addMetadata(String key, String value) { - this.metadata.put(key, value); - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/GetQueueMetadataResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/GetQueueMetadataResult.java deleted file mode 100644 index c8729f40f97d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/GetQueueMetadataResult.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - -import java.util.HashMap; - -/** - * A wrapper class for the result returned from a Queue Service REST API - * operation to get queue metadata. This is returned by calls to implementations - * of {@link com.microsoft.windowsazure.services.queue.QueueContract#getQueueMetadata(String)} and - * {@link com.microsoft.windowsazure.services.queue.QueueContract#getQueueMetadata(String, QueueServiceOptions)}. - *

- * See the Get - * Queue Metadata documentation on MSDN for details of the underlying Queue - * Service REST API operation. - */ -public class GetQueueMetadataResult { - private long approximateMessageCount; - private HashMap metadata; - - /** - * Gets the queue's approximate message count, as reported by the server. - * - * @return The queue's approximate message count. - */ - public long getApproximateMessageCount() { - return approximateMessageCount; - } - - /** - * Reserved for internal use. This method is invoked by the API as part of - * the response generation from the Queue Service REST API operation to set - * the value for the approximate message count returned by the server. - * - * @param approximateMessageCount - * The queue's approximate message count to set. - */ - public void setApproximateMessageCount(long approximateMessageCount) { - this.approximateMessageCount = approximateMessageCount; - } - - /** - * Gets the metadata collection of key-value {@link String} pairs currently - * set on a queue. Queue metadata is a user-defined collection of key-value - * pairs that is opaque to the server. - * - * @return A {@link java.util.HashMap} of key-value {@link String} pairs - * containing the metadata set on the queue. - */ - public HashMap getMetadata() { - return metadata; - } - - /** - * Reserved for internal use. This method is invoked by the API as part of - * the response generation from the Queue Service REST API operation to set - * the value from the queue metadata returned by the server. - * - * @param metadata - * A {@link java.util.HashMap} of key-value {@link String} pairs - * containing the metadata set on the queue. - */ - public void setMetadata(HashMap metadata) { - this.metadata = metadata; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/GetServicePropertiesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/GetServicePropertiesResult.java deleted file mode 100644 index bc2144dfdde9..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/GetServicePropertiesResult.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - - -/** - * A wrapper class for the service properties returned in response to Queue - * Service REST API operations. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.queue.QueueContract#getServiceProperties()} and - * {@link com.microsoft.windowsazure.services.queue.QueueContract#getServiceProperties(QueueServiceOptions)}. - *

- * See the Get - * Queue Service Properties documentation on MSDN for details of the - * underlying Queue Service REST API operation. - */ -public class GetServicePropertiesResult { - private ServiceProperties value; - - /** - * Gets a {@link ServiceProperties} instance containing the service property - * values associated with the storage account. - *

- * Modifying the values in the {@link ServiceProperties} instance returned - * does not affect the values associated with the storage account. To change - * the values in the storage account, call the - * {@link com.microsoft.windowsazure.services.queue.QueueContract#setServiceProperties} method and pass the modified - * {@link ServiceProperties} instance as a parameter. - * - * @return A {@link ServiceProperties} instance containing the property - * values associated with the storage account. - */ - public ServiceProperties getValue() { - return value; - } - - /** - * Reserved for internal use. Sets the value of the - * {@link ServiceProperties} instance associated with a storage service call - * result. This method is invoked by the API to store service properties - * returned by a call to a REST operation and is not intended for public - * use. - * - * @param value - * A {@link ServiceProperties} instance containing the property - * values associated with the storage account. - */ - public void setValue(ServiceProperties value) { - this.value = value; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListMessagesOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListMessagesOptions.java deleted file mode 100644 index 7e6515df3700..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListMessagesOptions.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listMessages(String, ListMessagesOptions) listMessages} - * request. These options include a server response timeout for the request, the - * number of messages to retrieve from the queue, and the visibility timeout to - * set on the retrieved messages. - */ -public class ListMessagesOptions extends QueueServiceOptions { - private Integer numberOfMessages; - private Integer visibilityTimeoutInSeconds; - - /** - * Sets the server request timeout value associated with this - * {@link ListMessagesOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link ListMessagesOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link ListMessagesOptions} instance. - */ - @Override - public ListMessagesOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the number of messages to request from the queue with this - * {@link ListMessagesOptions} instance. - * - * @return The number of messages requested. - */ - public Integer getNumberOfMessages() { - return numberOfMessages; - } - - /** - * Sets the number of messages to request from the queue with this - * {@link ListMessagesOptions} instance. - *

- * The numberOfMessages value is only used for requests where this - * {@link ListMessagesOptions} instance is passed as a parameter. - * - * @param numberOfMessages - * The number of messages to request. The valid range of values - * is 0 to 32. - * @return A reference to this {@link ListMessagesOptions} instance. - */ - public ListMessagesOptions setNumberOfMessages(Integer numberOfMessages) { - this.numberOfMessages = numberOfMessages; - return this; - } - - /** - * Gets the visibility timeout to set on the messages requested from the - * queue with this {@link ListMessagesOptions} instance. - * - * @return The visibility timeout to set on the messages requested from the - * queue. - */ - public Integer getVisibilityTimeoutInSeconds() { - return visibilityTimeoutInSeconds; - } - - /** - * Sets the visibility timeout value to set on the messages requested from - * the queue with this {@link ListMessagesOptions} instance. - *

- * The visibilityTimeoutInSeconds value is only used for requests - * where this {@link ListMessagesOptions} instance is passed as a parameter. - * - * @param visibilityTimeoutInSeconds - * The visibility timeout to set on the messages requested from - * the queue. The valid range of values is 0 to 604800 seconds. - * @return A reference to this {@link ListMessagesOptions} instance. - */ - public ListMessagesOptions setVisibilityTimeoutInSeconds( - Integer visibilityTimeoutInSeconds) { - this.visibilityTimeoutInSeconds = visibilityTimeoutInSeconds; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListMessagesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListMessagesResult.java deleted file mode 100644 index 1d2b26f26d1d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListMessagesResult.java +++ /dev/null @@ -1,262 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.core.RFC1123DateAdapter; - -/** - * A wrapper class for the result returned from a Queue Service REST API - * operation to get a list of messages. This is returned by calls to - * implementations of {@link com.microsoft.windowsazure.services.queue.QueueContract#listMessages(String)} and - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listMessages(String, ListMessagesOptions)}. - *

- * See the Get - * Messages documentation on MSDN for details of the underlying Queue - * Service REST API operation. - */ -@XmlRootElement(name = "QueueMessagesList") -public class ListMessagesResult { - private List queueMessages = new ArrayList(); - - /** - * Gets the list of queue messages returned by a {@link com.microsoft.windowsazure.services.queue.QueueContract} - * .listMessages request. The queue messages returned have their - * visibility timeout set to allow for processing by the client. The client - * must delete the messages once processing is complete, or they will become - * visible in the queue when the visibility timeout period is over. - * - * @return A {@link List} of {@link QueueMessage} instances representing the - * messages returned by the request. - */ - @XmlElement(name = "QueueMessage") - public List getQueueMessages() { - return queueMessages; - } - - /** - * Reserved for internal use. Sets the list of queue messages returned by a - * {@link com.microsoft.windowsazure.services.queue.QueueContract} .listMessages request. This method is - * invoked by the API as part of the response generation from the Queue - * Service REST API operation to set the value from the queue message list - * returned by the server. - * - * @param queueMessages - * A {@link List} of {@link QueueMessage} instances representing - * the messages returned by the request. - */ - public void setQueueMessages(List queueMessages) { - this.queueMessages = queueMessages; - } - - /** - * Represents a message in the queue returned by the server. A - * {@link QueueMessage} instance contains a copy of the queue message data - * in the storage service as of the time the message was requested. - */ - public static class QueueMessage { - private String messageId; - private Date insertionDate; - private Date expirationDate; - private String popReceipt; - private Date timeNextVisible; - private int dequeueCount; - private String messageText; - - /** - * Gets the message ID for the message in the queue. The message ID is a - * value that is opaque to the client that must be used along with the - * pop receipt to validate an update message or delete message - * operation. - * - * @return A {@link String} containing the message ID. - */ - @XmlElement(name = "MessageId") - public String getMessageId() { - return messageId; - } - - /** - * Reserved for internal use. Sets the value of the message ID for the - * queue message. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set - * the value with the message ID returned by the server. - * - * @param messageId - * A {@link String} containing the message ID. - */ - public void setMessageId(String messageId) { - this.messageId = messageId; - } - - /** - * Gets the {@link Date} when this message was added to the queue. - * - * @return The {@link Date} when this message was added to the queue. - */ - @XmlElement(name = "InsertionTime") - @XmlJavaTypeAdapter(RFC1123DateAdapter.class) - public Date getInsertionDate() { - return insertionDate; - } - - /** - * Reserved for internal use. Sets the value of the insertion time for - * the queue message. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set - * the value with the insertion time returned by the server. - * - * @param insertionDate - * The {@link Date} when this message was added to the queue. - */ - public void setInsertionDate(Date insertionDate) { - this.insertionDate = insertionDate; - } - - /** - * Gets the {@link Date} when this message will expire and be - * automatically removed from the queue. - * - * @return The {@link Date} when this message will expire. - */ - @XmlElement(name = "ExpirationTime") - @XmlJavaTypeAdapter(RFC1123DateAdapter.class) - public Date getExpirationDate() { - return expirationDate; - } - - /** - * Reserved for internal use. Sets the value of the expiration time for - * the queue message. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set - * the value with the expiration time returned by the server. - * - * @param expirationDate - * The {@link Date} when this message will expire. - */ - public void setExpirationDate(Date expirationDate) { - this.expirationDate = expirationDate; - } - - /** - * Gets the pop receipt value for the queue message. The pop receipt is - * a value that is opaque to the client that must be used along with the - * message ID to validate an update message or delete message operation. - * - * @return A {@link String} containing the pop receipt value for the - * queue message. - */ - @XmlElement(name = "PopReceipt") - public String getPopReceipt() { - return popReceipt; - } - - /** - * Reserved for internal use. Sets the value of the pop receipt for the - * queue message. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set - * the value with the pop receipt returned by the server. - * - * @param popReceipt - * A {@link String} containing the pop receipt value for the - * queue message. - */ - public void setPopReceipt(String popReceipt) { - this.popReceipt = popReceipt; - } - - /** - * Gets the {@link Date} when this message will become visible in the - * queue. - * - * @return The {@link Date} when this message will become visible in the - * queue. - */ - @XmlElement(name = "TimeNextVisible") - @XmlJavaTypeAdapter(RFC1123DateAdapter.class) - public Date getTimeNextVisible() { - return timeNextVisible; - } - - /** - * Reserved for internal use. Sets the value of the time the message - * will become visible. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set - * the value with the time next visible returned by the server. - * - * @param timeNextVisible - * The {@link Date} when this message will become visible in - * the queue. - */ - public void setTimeNextVisible(Date timeNextVisible) { - this.timeNextVisible = timeNextVisible; - } - - /** - * Gets the number of times this queue message has been retrieved with a - * list messages operation. - * - * @return The number of times this queue message has been retrieved. - */ - @XmlElement(name = "DequeueCount") - public int getDequeueCount() { - return dequeueCount; - } - - /** - * Reserved for internal use. Sets the value of the dequeue count of the - * message. This method is invoked by the API as part of the response - * generation from the Queue Service REST API operation to set the value - * with the queue message dequeue count returned by the server. - * - * @param dequeueCount - * The number of times this queue message has been retrieved. - */ - public void setDequeueCount(int dequeueCount) { - this.dequeueCount = dequeueCount; - } - - /** - * Gets the {@link String} containing the content of the queue message. - * - * @return A {@link String} containing the content of the queue message. - */ - @XmlElement(name = "MessageText") - public String getMessageText() { - return messageText; - } - - /** - * Reserved for internal use. Sets the {@link String} containing the - * content of the message. This method is invoked by the API as part of - * the response generation from the Queue Service REST API operation to - * set the value with the queue message content returned by the server. - * - * @param messageText - * A {@link String} containing the content of the message. - */ - public void setMessageText(String messageText) { - this.messageText = messageText; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListQueuesOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListQueuesOptions.java deleted file mode 100644 index 3b6e1deee6b7..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListQueuesOptions.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - - -/** - * Represents the options that may be set on the Queue service for - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions)} requests. These options - * include a server response timeout for the request, a prefix to match queue - * names to return, a marker to specify where to resume a list queues query, the - * maximum number of queues to return in a single response, and whether to - * include queue metadata with the response. - */ -public class ListQueuesOptions extends QueueServiceOptions { - private String prefix; - private String marker; - private int maxResults; - private boolean includeMetadata; - - /** - * Sets the server request timeout value associated with this - * {@link ListQueuesOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link ListQueuesOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link ListQueuesOptions} instance. - */ - @Override - public ListQueuesOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the prefix {@link String} used to match queue names to return in a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} request. - * - * @return The prefix {@link String} used to match queue names to return in - * a {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} - * request. - */ - public String getPrefix() { - return prefix; - } - - /** - * Sets the prefix {@link String} to use to match queue names to return in a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} request. - *

- * The prefix value only affects calls made on methods where this - * {@link ListQueuesOptions} instance is passed as a parameter. - * - * @param prefix - * The prefix {@link String} to use to match queue names to - * return in a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} - * request. - * @return A reference to this {@link ListQueuesOptions} instance. - */ - public ListQueuesOptions setPrefix(String prefix) { - this.prefix = prefix; - return this; - } - - /** - * Gets a {@link String} value that identifies the beginning of the list of - * queues to be returned with a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} request. - *

- * The {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} method - * returns a NextMarker element within the response if the - * list returned was not complete, which can be accessed with the - * {@link ListQueuesResult#getNextMarker()} method. This opaque value may - * then be set on a {@link ListQueuesOptions} instance with a call to - * {@link ListQueuesOptions#setMarker(String) setMarker} to be used in a - * subsequent {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} - * call to request the next portion of the list of queues. - * - * @return The marker value that identifies the beginning of the list of - * queues to be returned. - */ - public String getMarker() { - return marker; - } - - /** - * Sets a {@link String} marker value that identifies the beginning of the - * list of queues to be returned with a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} request. - *

- * The {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} method - * returns a NextMarker element within the response if the - * list returned was not complete, which can be accessed with the - * {@link ListQueuesResult#getNextMarker()} method. This opaque value may - * then be set on a {@link ListQueuesOptions} instance with a call to - * {@link ListQueuesOptions#setMarker(String) setMarker} to be used in a - * subsequent {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} - * call to request the next portion of the list of queues. - * - * @param marker - * The {@link String} marker value to set. - * @return A reference to this {@link ListQueuesOptions} instance. - */ - public ListQueuesOptions setMarker(String marker) { - this.marker = marker; - return this; - } - - /** - * Gets the maximum number of queues to return with a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} request. - * If the value is not specified, the server will return up to 5,000 items. - * - * @return The maximum number of queues to return. - */ - public int getMaxResults() { - return maxResults; - } - - /** - * Sets the maximum number of queues to return with a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} request. - * If the value is not specified, by default the server will return up to - * 5,000 items. - *

- * The maxResults value only affects calls made on methods where this - * {@link ListQueuesOptions} instance is passed as a parameter. - * - * @param maxResults - * The maximum number of queues to return. - * @return A reference to this {@link ListQueuesOptions} instance. - */ - public ListQueuesOptions setMaxResults(int maxResults) { - this.maxResults = maxResults; - return this; - } - - /** - * Gets a flag indicating whether to return metadata with a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} request. - * - * @return true to return metadata. - */ - public boolean isIncludeMetadata() { - return includeMetadata; - } - - /** - * Sets a flag indicating whether to return metadata with a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} request. - * - * @param includeMetadata - * true to return metadata. - * @return A reference to this {@link ListQueuesOptions} instance. - */ - public ListQueuesOptions setIncludeMetadata(boolean includeMetadata) { - this.includeMetadata = includeMetadata; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListQueuesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListQueuesResult.java deleted file mode 100644 index bba9354d417e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ListQueuesResult.java +++ /dev/null @@ -1,332 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.services.blob.implementation.MetadataAdapter; - -/** - * A wrapper class for the results returned in response to Queue service REST - * API operations to list queues. This is returned by calls to implementations - * of {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues()} and - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions)}. - *

- * See the List Queues documentation on MSDN for details of the underlying Queue - * service REST API operation. - */ -@XmlRootElement(name = "EnumerationResults") -public class ListQueuesResult { - private List queues = new ArrayList(); - private String accountName; - private String prefix; - private String marker; - private String nextMarker; - private int maxResults; - - /** - * Gets the list of queues returned by a {@link com.microsoft.windowsazure.services.queue.QueueContract} - * .listQueues request. - * - * @return A {@link List} of {@link Queue} instances representing the queues - * returned by the request. - */ - @XmlElementWrapper(name = "Queues") - @XmlElement(name = "Queue") - public List getQueues() { - return queues; - } - - /** - * Reserved for internal use. Sets the list of queues returned by a - * {@link com.microsoft.windowsazure.services.queue.QueueContract}.listQueues request. This method is invoked - * by the API as part of the response generation from the Queue service REST - * API operation to set the value from the queue list returned by the - * server. - * - * @param value - * A {@link List} of {@link Queue} instances representing the - * queues returned by the request. - */ - public void setQueues(List value) { - this.queues = value; - } - - /** - * Gets the base URI for Queue service REST API operations on the storage - * account. The URI consists of the protocol along with the DNS prefix name - * for the account followed by ".queue.core.windows.net". For example, if - * the DNS prefix name for the storage account is "myaccount" then the value - * returned by this method is "http://myaccount.queue.core.windows.net". - * - * @return A {@link String} containing the base URI for Queue service REST - * API operations on the storage account. - */ - @XmlAttribute(name = "AccountName") - public String getAccountName() { - return accountName; - } - - /** - * Reserved for internal use. Sets the base URI for Queue service REST API - * operations on the storage account. This method is invoked by the API as - * part of the response generation from the Queue service REST API operation - * to set the value from the response returned by the server. - * - * @param accountName - * A {@link String} containing the base URI for Queue service - * REST API operations on the storage account. - */ - public void setAccountName(String accountName) { - this.accountName = accountName; - } - - /** - * Gets the prefix {@link String} used to qualify the results returned by - * the {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} - * request. Only queues with names that start with the prefix are returned - * by the request. By default, the prefix is empty and all queues are - * returned. - * - * @return The {@link String} prefix used to qualify the names of the queues - * returned. - */ - @XmlElement(name = "Prefix") - public String getPrefix() { - return prefix; - } - - /** - * Reserved for internal use. Sets the prefix {@link String} used to qualify - * the results returned by the Queue service REST API list queues operation - * invoked with a call to - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues}. This - * method is invoked by the API as part of the response generation from the - * Queue service REST API operation to set the value from the - * Prefix element returned by the server. - * - * @param prefix - * The {@link String} prefix used to qualify the names of the - * queues returned. - */ - public void setPrefix(String prefix) { - this.prefix = prefix; - } - - /** - * Gets the marker value for the beginning of the queue results returned by - * the {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} - * request. The marker is used by the server to specify the place to resume - * a query for queues. The marker value is a {@link String} opaque to the - * client. A {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} - * request response may include a NextMarker value if there - * are more queue results than can be returned in a single response. Call - * the {@link ListQueuesResult#getNextMarker() getNextMarker} method to get - * this value. The client can request the next set of queue results by - * setting the marker to this value in the {@link ListQueuesOptions} - * parameter. By default, this value is empty and the server responds with - * the first queues that match the request. - * - * @return A {@link String} containing the marker value used for the - * response. - */ - @XmlElement(name = "Marker") - public String getMarker() { - return marker; - } - - /** - * Reserved for internal use. Sets the marker value specifying the beginning - * of the results returned by the Queue service REST API list queues - * operation invoked with a call to - * {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues}. This - * method is invoked by the API as part of the response generation from the - * Queue service REST API operation to set the value from the - * Marker element returned by the server. - * - * @param marker - * A {@link String} containing the marker value used for the - * response. - */ - public void setMarker(String marker) { - this.marker = marker; - } - - /** - * Gets the next marker value needed to retrieve additional queues. If more - * queues are available that satisfy a listQueues request than can - * be returned in the response, the server generates a marker value to - * specify the beginning of the queues to return in a subsequent request. - * The client can request the next set of queue results by setting the - * marker to this value in the {@link ListQueuesOptions} parameter. This - * value is empty if there are no more queues that satisfy the request than - * are included in the response. - * - * @return A {@link String} containing the marker value to use to resume the - * list queues request. - */ - @XmlElement(name = "NextMarker") - public String getNextMarker() { - return nextMarker; - } - - /** - * Reserved for internal use. Sets the next marker value specifying the - * place to resume a list queues query if more results are available than - * have been returned by the Queue service REST API list queues operation - * response. This method is invoked by the API as part of the response - * generation from the Queue service REST API operation to set the value - * from the NextMarker element returned by the server. - * - * @param nextMarker - * A {@link String} containing the marker value to use to resume - * the list queues request. - */ - public void setNextMarker(String nextMarker) { - this.nextMarker = nextMarker; - } - - /** - * Gets the value specified for the number of queue results to return for - * the {@link com.microsoft.windowsazure.services.queue.QueueContract#listQueues(ListQueuesOptions) listQueues} - * request. The server will not return more than this number of queues in - * the response. If the value is not specified, the server will return up to - * 5,000 items. - *

- * If there are more queues available that match the request than the number - * returned, the response will include a next marker value to specify the - * beginning of the queues to return in a subsequent request. Call the - * {@link ListQueuesResult#getNextMarker() getNextMarker} method to get this - * value. The client can request the next set of queue results by setting - * the marker to this value in the {@link ListQueuesOptions} parameter. - * - * @return The maximum number of results to return specified by the request. - */ - @XmlElement(name = "MaxResults") - public int getMaxResults() { - return maxResults; - } - - /** - * Reserved for internal use. Sets the value returned by the Queue service - * REST API list queues operation response for the maximum number of queues - * to return. This method is invoked by the API as part of the response - * generation from the Queue service REST API operation to set the value - * from the MaxResults element returned by the server. - * - * @param maxResults - * The maximum number of results to return specified by the - * request. - */ - public void setMaxResults(int maxResults) { - this.maxResults = maxResults; - } - - /** - * Represents a queue in the storage account returned by the server. A - * {@link Queue} instance contains a copy of the queue name, URI, and - * metadata in the storage service as of the time the queue was requested. - */ - public static class Queue { - private String name; - private String url; - private HashMap metadata = new HashMap(); - - /** - * Gets the name of this queue. - * - * @return A {@link String} containing the name of this queue. - */ - @XmlElement(name = "Name") - public String getName() { - return name; - } - - /** - * Reserved for internal use. Sets the name of this queue. This method - * is invoked by the API as part of the response generation from the - * Queue service REST API operation to set the value from the - * Name element returned by the server. - * - * @param name - * A {@link String} containing the name of this queue. - */ - public void setName(String name) { - this.name = name; - } - - /** - * Gets the URI for Queue service REST API operations on this queue. - * - * @return A {@link String} containing the URI for Queue service REST - * API operations on this queue. - */ - @XmlElement(name = "Url") - public String getUrl() { - return url; - } - - /** - * Reserved for internal use. Sets the URI of this queue. This method is - * invoked by the API as part of the response generation from the Queue - * service REST API operation to set the value from the - * Url element returned by the server. - * - * @param url - * A {@link String} containing the URI for Queue service REST - * API operations on this queue. - */ - public void setUrl(String url) { - this.url = url; - } - - /** - * Gets the metadata collection of key-value {@link String} pairs - * associated with this queue. - * - * @return A {@link java.util.HashMap} of key-value {@link String} pairs - * containing the queue metadata. - */ - @XmlElement(name = "Metadata") - @XmlJavaTypeAdapter(MetadataAdapter.class) - public HashMap getMetadata() { - return metadata; - } - - /** - * Reserved for internal use. Sets the metadata of this queue. This - * method is invoked by the API as part of the response generation from - * the Queue service REST API operation to set the value from the - * Metadata element returned by the server. - * - * @param metadata - * A {@link java.util.HashMap} of key-value {@link String} - * pairs containing the queue metadata. - */ - public void setMetadata(HashMap metadata) { - this.metadata = metadata; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/PeekMessagesOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/PeekMessagesOptions.java deleted file mode 100644 index a4f7c0dca208..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/PeekMessagesOptions.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - - -/** - * Represents the options that may be set on a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#peekMessages(String, PeekMessagesOptions) peekMessages} - * request. These options include a server response timeout for the request and - * the number of messages to peek from the queue. - */ -public class PeekMessagesOptions extends QueueServiceOptions { - private Integer numberOfMessages; - - /** - * Sets the server request timeout value associated with this - * {@link PeekMessagesOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link PeekMessagesOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link PeekMessagesOptions} instance. - */ - @Override - public PeekMessagesOptions setTimeout(Integer timeout) { - super.setTimeout(timeout); - return this; - } - - /** - * Gets the number of messages to return in the response to a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#peekMessages(String, PeekMessagesOptions) - * peekMessages} request specified in this instance. - * - * @return The number of messages to return in the response. - */ - public Integer getNumberOfMessages() { - return numberOfMessages; - } - - /** - * Sets the number of messages to return in the response to a - * {@link com.microsoft.windowsazure.services.queue.QueueContract#peekMessages(String, PeekMessagesOptions) - * peekMessages} request. - *

- * The numberOfMessages value only affects calls made on methods - * where this {@link PeekMessagesOptions} instance is passed as a parameter. - * - * - * @param numberOfMessages - * The number of messages to return in the response. This value - * must be in the range from 0 to 32. - * @return A reference to this {@link PeekMessagesOptions} instance. - */ - public PeekMessagesOptions setNumberOfMessages(Integer numberOfMessages) { - this.numberOfMessages = numberOfMessages; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/PeekMessagesResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/PeekMessagesResult.java deleted file mode 100644 index 2c02b7c1f2c2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/PeekMessagesResult.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.microsoft.windowsazure.core.RFC1123DateAdapter; - -/** - * A wrapper class for the results returned in response to Queue Service REST - * API operations to peek messages. This is returned by calls to implementations - * of {@link com.microsoft.windowsazure.services.queue.QueueContract#peekMessages(String)} and - * {@link com.microsoft.windowsazure.services.queue.QueueContract#peekMessages(String, PeekMessagesOptions)}. - *

- * See the Peek Messages documentation on MSDN for details of the underlying Queue - * Service REST API operation. - */ -@XmlRootElement(name = "QueueMessagesList") -public class PeekMessagesResult { - private List queueMessages = new ArrayList(); - - /** - * Gets the list of queue messages returned by a {@link com.microsoft.windowsazure.services.queue.QueueContract} - * .peekMessages request. The queue messages returned do not have a - * visibility timeout set, and they can be retrieved by other clients for - * processing. - * - * @return A {@link List} of {@link QueueMessage} instances representing the - * messages returned by the request. - */ - @XmlElement(name = "QueueMessage") - public List getQueueMessages() { - return queueMessages; - } - - /** - * Reserved for internal use. Sets the list of queue messages returned by a - * {@link com.microsoft.windowsazure.services.queue.QueueContract} .peekMessages request. This method is - * invoked by the API as part of the response generation from the Queue - * Service REST API operation to set the value from the queue message list - * returned by the server. - * - * @param queueMessages - * A {@link List} of {@link QueueMessage} instances representing - * the messages returned by the request. - */ - public void setQueueMessages(List queueMessages) { - this.queueMessages = queueMessages; - } - - /** - * Represents a message in the queue returned by the server. A - * {@link QueueMessage} instance contains a copy of the queue message data - * in the storage service as of the time the message was requested. - */ - public static class QueueMessage { - private String messageId; - private Date insertionDate; - private Date expirationDate; - private int dequeueCount; - private String messageText; - - /** - * Gets the message ID for the message in the queue. * - * - * @return A {@link String} containing the message ID. - */ - @XmlElement(name = "MessageId") - public String getMessageId() { - return messageId; - } - - /** - * Reserved for internal use. Sets the value of the message ID for the - * queue message. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set - * the value with the message ID returned by the server. - * - * @param messageId - * A {@link String} containing the message ID. - */ - public void setMessageId(String messageId) { - this.messageId = messageId; - } - - /** - * Gets the {@link Date} when this message was added to the queue. - * - * @return The {@link Date} when this message was added to the queue. - */ - @XmlElement(name = "InsertionTime") - @XmlJavaTypeAdapter(RFC1123DateAdapter.class) - public Date getInsertionDate() { - return insertionDate; - } - - /** - * Reserved for internal use. Sets the value of the insertion time for - * the queue message. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set - * the value with the insertion time returned by the server. - * - * @param insertionDate - * The {@link Date} when this message was added to the queue. - */ - public void setInsertionDate(Date insertionDate) { - this.insertionDate = insertionDate; - } - - /** - * Gets the {@link Date} when this message will expire and be - * automatically removed from the queue. - * - * @return The {@link Date} when this message will expire. - */ - @XmlElement(name = "ExpirationTime") - @XmlJavaTypeAdapter(RFC1123DateAdapter.class) - public Date getExpirationDate() { - return expirationDate; - } - - /** - * Reserved for internal use. Sets the value of the expiration time for - * the queue message. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set - * the value with the expiration time returned by the server. - * - * @param expirationDate - * The {@link Date} when this message will expire. - */ - public void setExpirationDate(Date expirationDate) { - this.expirationDate = expirationDate; - } - - /** - * Gets the number of times this queue message has been retrieved with a - * list messages operation. - * - * @return The number of times this queue message has been retrieved. - */ - @XmlElement(name = "DequeueCount") - public int getDequeueCount() { - return dequeueCount; - } - - /** - * Reserved for internal use. Sets the value of the dequeue count of the - * message. This method is invoked by the API as part of the response - * generation from the Queue Service REST API operation to set the value - * with the queue message dequeue count returned by the server. - * - * @param dequeueCount - * The number of times this queue message has been retrieved. - */ - public void setDequeueCount(int dequeueCount) { - this.dequeueCount = dequeueCount; - } - - /** - * Gets the {@link String} containing the content of the queue message. - * - * @return A {@link String} containing the content of the queue message. - */ - @XmlElement(name = "MessageText") - public String getMessageText() { - return messageText; - } - - /** - * Reserved for internal use. Sets the {@link String} containing the - * content of the message. This method is invoked by the API as part of - * the response generation from the Queue Service REST API operation to - * set the value with the queue message content returned by the server. - * - * @param messageText - * A {@link String} containing the content of the message. - */ - public void setMessageText(String messageText) { - this.messageText = messageText; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/QueueServiceOptions.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/QueueServiceOptions.java deleted file mode 100644 index d273936c8487..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/QueueServiceOptions.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - - -/** - * Represents the base class for options that may be set on Queue Service REST - * API operations invoked through the {@link com.microsoft.windowsazure.services.queue.QueueContract} interface. This - * class defines a server request timeout, which can be applied to all - * operations. - */ -public class QueueServiceOptions { - // Nullable because it is optional - private Integer timeout; - - /** - * Gets the current server request timeout value associated with this - * {@link QueueServiceOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link QueueServiceOptions} instance is passed as a parameter. - * - * @return The server request timeout value in milliseconds. - */ - public Integer getTimeout() { - return timeout; - } - - /** - * Sets the server request timeout value associated with this - * {@link QueueServiceOptions} instance. - *

- * The timeout value only affects calls made on methods where this - * {@link QueueServiceOptions} instance is passed as a parameter. - * - * @param timeout - * The server request timeout value to set in milliseconds. - * @return A reference to this {@link QueueServiceOptions} instance. - */ - public QueueServiceOptions setTimeout(Integer timeout) { - this.timeout = timeout; - return this; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ServiceProperties.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ServiceProperties.java deleted file mode 100644 index 0723e6f4fbab..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/ServiceProperties.java +++ /dev/null @@ -1,480 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * A wrapper class for the Queue service properties set or retrieved with Queue - * Service REST API operations. This is returned by calls to implementations of - * {@link com.microsoft.windowsazure.services.queue.QueueContract#getServiceProperties()} and - * {@link com.microsoft.windowsazure.services.queue.QueueContract#getServiceProperties(QueueServiceOptions)} and passed to - * the server with calls to - * {@link com.microsoft.windowsazure.services.queue.QueueContract#setServiceProperties(ServiceProperties)} and - * {@link com.microsoft.windowsazure.services.queue.QueueContract#setServiceProperties(ServiceProperties, QueueServiceOptions)} - * . - *

- * See the Get - * Queue Service Properties and Set - * Queue Service Properties documentation on MSDN for details of the - * underlying Queue Service REST API operations. See the Storage Analytics Overview documentation on MSDN for more information - * about logging and metrics. - */ -@XmlRootElement(name = "StorageServiceProperties") -public class ServiceProperties { - private Logging logging = new Logging(); - private Metrics metrics = new Metrics(); - - /** - * Gets a reference to the {@link Logging} instance in this - * {@link ServiceProperties} instance. - *

- * This {@link ServiceProperties} instance holds a local copy of the Queue - * service properties when returned by a call to {@link com.microsoft.windowsazure.services.queue.QueueContract} - * .getServiceProperties. - *

- * Note that changes to this value are not reflected in the Queue service - * properties until they have been set on the storage account with a call to - * {@link com.microsoft.windowsazure.services.queue.QueueContract}.setServiceProperties. - * - * @return A reference to the {@link Logging} instance in this - * {@link ServiceProperties} instance. - */ - @XmlElement(name = "Logging") - public Logging getLogging() { - return logging; - } - - /** - * Sets the {@link Logging} instance in this {@link ServiceProperties} - * instance. - *

- * Note that changes to this value are not reflected in the Queue service - * properties until they have been set on the storage account with a call to - * {@link com.microsoft.windowsazure.services.queue.QueueContract}.setServiceProperties. - * - * @param logging - * The {@link Logging} instance to set in this - * {@link ServiceProperties} instance. - * @return A reference to this {@link ServiceProperties} instance. - */ - public ServiceProperties setLogging(Logging logging) { - this.logging = logging; - return this; - } - - /** - * Gets a reference to the {@link Metrics} instance in this - * {@link ServiceProperties} instance. - *

- * This {@link ServiceProperties} instance holds a local copy of the Queue - * service properties when returned by a call to {@link com.microsoft.windowsazure.services.queue.QueueContract} - * .getServiceProperties. - *

- * Note that changes to this value are not reflected in the Queue service - * properties until they have been set on the storage account with a call to - * {@link com.microsoft.windowsazure.services.queue.QueueContract}.setServiceProperties. - * - * @return A reference to the {@link Metrics} instance in this - * {@link ServiceProperties} instance. - */ - @XmlElement(name = "Metrics") - public Metrics getMetrics() { - return metrics; - } - - /** - * Sets the {@link Metrics} instance in this {@link ServiceProperties} - * instance. - *

- * Note that changes to this value are not reflected in the Queue service - * properties until they have been set on the storage account with a call to - * {@link com.microsoft.windowsazure.services.queue.QueueContract}.setServiceProperties. - * - * @param metrics - * The {@link Metrics} instance to set in this - * {@link ServiceProperties} instance. - * @return A reference to this {@link ServiceProperties} instance. - */ - public ServiceProperties setMetrics(Metrics metrics) { - this.metrics = metrics; - return this; - } - - /** - * This inner class represents the settings for logging on the Queue service - * of the storage account. These settings include the Storage Analytics - * version, whether to log delete requests, read requests, or write - * requests, and a {@link RetentionPolicy} instance for retention policy - * settings. - */ - public static class Logging { - private String version; - private Boolean delete; - private Boolean read; - private Boolean write; - private RetentionPolicy retentionPolicy; - - /** - * Gets a reference to the {@link RetentionPolicy} instance in this - * {@link Logging} instance. - * - * @return A reference to the {@link RetentionPolicy} instance in this - * {@link Logging} instance. - */ - @XmlElement(name = "RetentionPolicy") - public RetentionPolicy getRetentionPolicy() { - return retentionPolicy; - } - - /** - * Sets the {@link RetentionPolicy} instance in this {@link Logging} - * instance. - * - * @param retentionPolicy - * The {@link RetentionPolicy} instance to set in this - * {@link Logging} instance. - * @return A reference to this {@link Logging} instance. - */ - public Logging setRetentionPolicy(RetentionPolicy retentionPolicy) { - this.retentionPolicy = retentionPolicy; - return this; - } - - /** - * Gets a flag indicating whether queue write operations are logged. If - * this value is true then all requests that write to the - * Queue service will be logged. These requests include adding a - * message, updating a message, setting queue metadata, and creating a - * queue. - * - * @return true if queue write operations are logged, - * otherwise false. - */ - @XmlElement(name = "Write") - public boolean isWrite() { - return write; - } - - /** - * Sets a flag indicating whether queue write operations are logged. If - * this value is true then all requests that write to the - * Queue service will be logged. These requests include adding a - * message, updating a message, setting queue metadata, and creating a - * queue. - * - * @param write - * true to enable logging of queue write - * operations, otherwise false. - * @return A reference to this {@link Logging} instance. - */ - public Logging setWrite(boolean write) { - this.write = write; - return this; - } - - /** - * Gets a flag indicating whether queue read operations are logged. If - * this value is true then all requests that read from the - * Queue service will be logged. These requests include listing queues, - * getting queue metadata, listing messages, and peeking messages. - * - * @return true if queue read operations are logged, - * otherwise false. - */ - @XmlElement(name = "Read") - public boolean isRead() { - return read; - } - - /** - * Sets a flag indicating whether queue read operations are logged. If - * this value is true then all requests that read from the - * Queue service will be logged. These requests include listing queues, - * getting queue metadata, listing messages, and peeking messages. - * - * @param read - * true to enable logging of queue read - * operations, otherwise false. - * @return A reference to this {@link Logging} instance. - */ - public Logging setRead(boolean read) { - this.read = read; - return this; - } - - /** - * Gets a flag indicating whether queue delete operations are logged. If - * this value is true then all requests that delete from - * the Queue service will be logged. These requests include deleting - * queues, deleting messages, and clearing messages. - * - * @return true if queue delete operations are logged, - * otherwise false. - */ - @XmlElement(name = "Delete") - public boolean isDelete() { - return delete; - } - - /** - * Sets a flag indicating whether queue delete operations are logged. If - * this value is true then all requests that delete from - * the Queue service will be logged. These requests include deleting - * queues, deleting messages, and clearing messages. - * - * @param delete - * true to enable logging of queue delete - * operations, otherwise false. - * @return A reference to this {@link Logging} instance. - */ - public Logging setDelete(boolean delete) { - this.delete = delete; - return this; - } - - /** - * Gets the Storage Analytics version number associated with this - * {@link Logging} instance. - * - * @return A {@link String} containing the Storage Analytics version - * number. - */ - @XmlElement(name = "Version") - public String getVersion() { - return version; - } - - /** - * Sets the Storage Analytics version number to associate with this - * {@link Logging} instance. The current supported version number is - * "1.0". - *

- * See the Storage Analytics Overview documentation on MSDN for more - * information. - * - * @param version - * A {@link String} containing the Storage Analytics version - * number to set. - * @return A reference to this {@link Logging} instance. - */ - public Logging setVersion(String version) { - this.version = version; - return this; - } - } - - /** - * This inner class represents the settings for metrics on the Queue service - * of the storage account. These settings include the Storage Analytics - * version, whether metrics are enabled, whether to include API operation - * summary statistics, and a {@link RetentionPolicy} instance for retention - * policy settings. - */ - public static class Metrics { - private String version; - private boolean enabled; - private Boolean includeAPIs; - private RetentionPolicy retentionPolicy; - - /** - * Gets a reference to the {@link RetentionPolicy} instance in this - * {@link Metrics} instance. - * - * @return A reference to the {@link RetentionPolicy} instance in this - * {@link Metrics} instance. - */ - @XmlElement(name = "RetentionPolicy") - public RetentionPolicy getRetentionPolicy() { - return retentionPolicy; - } - - /** - * Sets the {@link RetentionPolicy} instance in this {@link Metrics} - * instance. - * - * @param retentionPolicy - * The {@link RetentionPolicy} instance to set in this - * {@link Metrics} instance. - * @return A reference to this {@link Metrics} instance. - */ - public Metrics setRetentionPolicy(RetentionPolicy retentionPolicy) { - this.retentionPolicy = retentionPolicy; - return this; - } - - /** - * Gets a flag indicating whether metrics should generate summary - * statistics for called API operations. If this value is - * true then all Queue service REST API operations will be - * included in the metrics. - * - * @return true if Queue service REST API operations are - * included in metrics, otherwise false. - */ - @XmlElement(name = "IncludeAPIs") - public Boolean isIncludeAPIs() { - return includeAPIs; - } - - /** - * Sets a flag indicating whether metrics should generate summary - * statistics for called API operations. If this value is - * true then all Queue service REST API operations will be - * included in the metrics. - * - * @param includeAPIs - * true to include Queue service REST API - * operations in metrics, otherwise false. - * @return A reference to this {@link Metrics} instance. - */ - public Metrics setIncludeAPIs(Boolean includeAPIs) { - this.includeAPIs = includeAPIs; - return this; - } - - /** - * Gets a flag indicating whether metrics is enabled for the Queue - * storage service. - * - * @return A flag indicating whether metrics is enabled for the Queue - * storage service. - */ - @XmlElement(name = "Enabled") - public boolean isEnabled() { - return enabled; - } - - /** - * Sets a flag indicating whether to enable metrics for the Queue - * storage service. - * - * @param enabled - * true to enable metrics for the Queue storage - * service, otherwise false. - * @return A reference to this {@link Metrics} instance. - */ - public Metrics setEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Gets the Storage Analytics version number associated with this - * {@link Metrics} instance. - * - * @return A {@link String} containing the Storage Analytics version - * number. - */ - @XmlElement(name = "Version") - public String getVersion() { - return version; - } - - /** - * Sets the Storage Analytics version number to associate with this - * {@link Metrics} instance. The current supported version number is - * "1.0". - *

- * See the Storage Analytics Overview documentation on MSDN for more - * information. - * - * @param version - * A {@link String} containing the Storage Analytics version - * number to set. - * @return A reference to this {@link Metrics} instance. - */ - public Metrics setVersion(String version) { - this.version = version; - return this; - } - } - - /** - * This inner class represents the retention policy settings for logging or - * metrics on the Queue service of the storage account. These settings - * include whether a retention policy is enabled for the data, and the - * number of days that metrics or logging data should be retained. - */ - public static class RetentionPolicy { - private boolean enabled; - private Integer days; // nullable, because optional if "enabled" is - // false - - /** - * Gets the number of days that metrics or logging data should be - * retained. All data older than this value will be deleted. The value - * may be null if a retention policy is not enabled. - * - * @return The number of days that metrics or logging data should be - * retained. - */ - @XmlElement(name = "Days") - public Integer getDays() { - return days; - } - - /** - * Sets the number of days that metrics or logging data should be - * retained. All data older than this value will be deleted. The value - * must be in the range from 1 to 365. This value must be set if a - * retention policy is enabled, but is not required if a retention - * policy is not enabled. - * - * @param days - * The number of days that metrics or logging data should be - * retained. - * @return A reference to this {@link RetentionPolicy} instance. - */ - public RetentionPolicy setDays(Integer days) { - this.days = days; - return this; - } - - /** - * Gets a flag indicating whether a retention policy is enabled for the - * storage service. - * - * @return true if data retention is enabled, otherwise - * false. - */ - @XmlElement(name = "Enabled") - public boolean isEnabled() { - return enabled; - } - - /** - * Sets a flag indicating whether a retention policy is enabled for the - * storage service. - * - * @param enabled - * Set true to enable data retention. - * @return A reference to this {@link RetentionPolicy} instance. - */ - public RetentionPolicy setEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/UpdateMessageResult.java b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/UpdateMessageResult.java deleted file mode 100644 index f8a7decde7b8..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/UpdateMessageResult.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue.models; - -import java.util.Date; - -/** - * A wrapper class for the results returned in response to Queue Service REST - * API operations to update a message. This is returned by calls to - * implementations of - * {@link com.microsoft.windowsazure.services.queue.QueueContract#updateMessage(String, String, String, String, int)} and - * {@link com.microsoft.windowsazure.services.queue.QueueContract#updateMessage(String, String, String, String, int, QueueServiceOptions)} - * . - *

- * See the Update Message documentation on MSDN for details of the underlying Queue - * Service REST API operation. - */ -public class UpdateMessageResult { - private String popReceipt; - private Date timeNextVisible; - - /** - * Gets the pop receipt value for the updated queue message. The pop receipt - * is a value that is opaque to the client that must be used along with the - * message ID to validate an update message or delete message operation. - * - * @return A {@link String} containing the pop receipt value for the queue - * message. - */ - public String getPopReceipt() { - return popReceipt; - } - - /** - * Reserved for internal use. Sets the value of the pop receipt for the - * updated queue message. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set the - * value with the pop receipt returned by the server. - * - * @param popReceipt - * A {@link String} containing the pop receipt value for the - * queue message. - */ - public void setPopReceipt(String popReceipt) { - this.popReceipt = popReceipt; - } - - /** - * Gets the {@link Date} when the updated message will become visible in the - * queue. - * - * @return The {@link Date} when the updated message will become visible in - * the queue. - */ - public Date getTimeNextVisible() { - return timeNextVisible; - } - - /** - * Reserved for internal use. Sets the value of the time the updated message - * will become visible. This method is invoked by the API as part of the - * response generation from the Queue Service REST API operation to set the - * value with the time next visible returned by the server. - * - * @param timeNextVisible - * The {@link Date} when the updated message will become visible - * in the queue. - */ - public void setTimeNextVisible(Date timeNextVisible) { - this.timeNextVisible = timeNextVisible; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/package.html deleted file mode 100644 index 6d2f45a3fae7..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/models/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the queue data transfer object classes. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/package.html b/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/package.html deleted file mode 100644 index 4847f5461cb6..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/queue/package.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This package contains the queue service class, interface, and associated configuration and utility classes. - - diff --git a/sdk/mediaservices/microsoft-azure-media/src/main/resources/META-INF/services/com.microsoft.windowsazure.core.Builder$Exports b/sdk/mediaservices/microsoft-azure-media/src/main/resources/META-INF/services/com.microsoft.windowsazure.core.Builder$Exports deleted file mode 100644 index 834120dd4c16..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/main/resources/META-INF/services/com.microsoft.windowsazure.core.Builder$Exports +++ /dev/null @@ -1,3 +0,0 @@ -com.microsoft.windowsazure.services.blob.Exports -com.microsoft.windowsazure.services.queue.Exports -com.microsoft.windowsazure.services.media.Exports \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/media/authentication/AzureAdTokenProviderTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/media/authentication/AzureAdTokenProviderTest.java deleted file mode 100644 index 6e44272f2c61..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/media/authentication/AzureAdTokenProviderTest.java +++ /dev/null @@ -1,118 +0,0 @@ -package com.microsoft.windowsazure.media.authentication; - -import static org.junit.Assert.*; -import static org.junit.Assume.*; - -import java.io.FileInputStream; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.aad.adal4j.AsymmetricKeyCredential; -import com.microsoft.windowsazure.Configuration; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.IntegrationTestBase; -import com.microsoft.windowsazure.services.media.MediaConfiguration; -import com.microsoft.windowsazure.services.media.MediaContract; -import com.microsoft.windowsazure.services.media.MediaService; -import com.microsoft.windowsazure.services.media.authentication.AzureAdClientSymmetricKey; -import com.microsoft.windowsazure.services.media.authentication.AzureAdClientUsernamePassword; -import com.microsoft.windowsazure.services.media.authentication.AzureAdTokenCredentials; -import com.microsoft.windowsazure.services.media.authentication.AzureAdTokenProvider; -import com.microsoft.windowsazure.services.media.authentication.AzureEnvironments; -import com.microsoft.windowsazure.services.media.authentication.TokenProvider; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; - -public class AzureAdTokenProviderTest extends IntegrationTestBase { - - @Test - public void ServicePrincipalClientSymmetricKeyShouldWork() throws Exception { - // Arrange - String tenant = config.getProperty("media.azuread.test.tenant").toString(); - String restApiEndpoint = config.getProperty("media.azuread.test.account_api_uri").toString(); - String clientId = config.getProperty("media.azuread.test.clientid").toString(); - String clientKey = config.getProperty("media.azuread.test.clientkey").toString(); - AzureAdTokenCredentials credentials = new AzureAdTokenCredentials( - tenant, - new AzureAdClientSymmetricKey(clientId, clientKey), - AzureEnvironments.AZURE_CLOUD_ENVIRONMENT); - TokenProvider provider = new AzureAdTokenProvider(credentials, executorService); - Configuration configuration = MediaConfiguration.configureWithAzureAdTokenProvider( - new URI(restApiEndpoint), - provider); - MediaContract mediaService = MediaService.create(configuration); - - // Act - ListResult assets = mediaService.list(Asset.list()); - - // Assert - assertNotNull(assets); - } - - @Test - public void UserPasswordShouldWork() throws Exception { - // Arrange - String tenant = config.getProperty("media.azuread.test.tenant").toString(); - String restApiEndpoint = config.getProperty("media.azuread.test.account_api_uri").toString(); - String username = config.getProperty("media.azuread.test.useraccount").toString(); - String password = config.getProperty("media.azuread.test.userpassword").toString(); - - assumeFalse(username.equals("undefined")); - assumeFalse(password.equals("undefined")); - - AzureAdTokenCredentials credentials = new AzureAdTokenCredentials( - tenant, - new AzureAdClientUsernamePassword(username, password), - AzureEnvironments.AZURE_CLOUD_ENVIRONMENT); - TokenProvider provider = new AzureAdTokenProvider(credentials, executorService); - Configuration configuration = MediaConfiguration.configureWithAzureAdTokenProvider( - new URI(restApiEndpoint), - provider); - MediaContract mediaService = MediaService.create(configuration); - - // Act - ListResult assets = mediaService.list(Asset.list()); - - // Assert - assertNotNull(assets); - } - - @Test - public void ServicePrincipalWithCertificateShouldWork() throws Exception { - // Arrange - String tenant = config.getProperty("media.azuread.test.tenant").toString(); - String restApiEndpoint = config.getProperty("media.azuread.test.account_api_uri").toString(); - String clientId = config.getProperty("media.azuread.test.clientid").toString(); - String pfxFile = config.getProperty("media.azuread.test.pfxfile").toString(); - String pfxPassword = config.getProperty("media.azuread.test.pfxpassword").toString(); - - assumeFalse(pfxFile.equals("undefined")); - assumeFalse(pfxPassword.equals("undefined")); - - InputStream pfx = new FileInputStream(pfxFile); - AzureAdTokenCredentials credentials = new AzureAdTokenCredentials( - tenant, - AsymmetricKeyCredential.create(clientId, pfx, pfxPassword), - AzureEnvironments.AZURE_CLOUD_ENVIRONMENT); - TokenProvider provider = new AzureAdTokenProvider(credentials, executorService); - Configuration configuration = MediaConfiguration.configureWithAzureAdTokenProvider( - new URI(restApiEndpoint), - provider); - MediaContract mediaService = MediaService.create(configuration); - - // Act - ListResult assets = mediaService.list(Asset.list()); - - // Assert - assertNotNull(assets); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/media/authentication/package-info.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/media/authentication/package-info.java deleted file mode 100644 index 4374821a2931..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/media/authentication/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.microsoft.windowsazure.media.authentication; \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/blob/BlobServiceIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/blob/BlobServiceIntegrationTest.java deleted file mode 100644 index 05a4a5fc4453..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/blob/BlobServiceIntegrationTest.java +++ /dev/null @@ -1,782 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.blob; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.io.BufferedReader; -import java.io.ByteArrayInputStream; -import java.io.FilterInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.io.StringWriter; -import java.io.Writer; -import java.util.HashSet; -import java.util.Set; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.Configuration; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceRequestContext; -import com.microsoft.windowsazure.core.pipeline.filter.ServiceResponseContext; -import com.microsoft.windowsazure.core.pipeline.jersey.ExponentialRetryPolicy; -import com.microsoft.windowsazure.core.pipeline.jersey.RetryPolicyFilter; -import com.microsoft.windowsazure.core.pipeline.jersey.ServiceFilter; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.blob.models.BlobProperties; -import com.microsoft.windowsazure.services.blob.models.BlockList; -import com.microsoft.windowsazure.services.blob.models.CreateBlobOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobResult; -import com.microsoft.windowsazure.services.blob.models.CreateContainerOptions; -import com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesResult; -import com.microsoft.windowsazure.services.blob.models.GetBlobResult; -import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.ListBlobBlocksResult; -import com.microsoft.windowsazure.services.blob.models.ListContainersOptions; -import com.microsoft.windowsazure.services.blob.models.ListContainersResult; -import com.microsoft.windowsazure.services.blob.models.ListContainersResult.Container; - -public class BlobServiceIntegrationTest extends IntegrationTestBase { - private static final String testContainersPrefix = "sdktest-"; - private static final String createableContainersPrefix = "csdktest-"; - private static String CREATEABLE_CONTAINER_1; - private static String TEST_CONTAINER_FOR_BLOBS; - private static String[] creatableContainers; - private static String[] testContainers; - private static boolean createdRoot; - - @BeforeClass - public static void setup() throws Exception { - // Setup container names array (list of container names used by - // integration tests) - testContainers = new String[10]; - for (int i = 0; i < testContainers.length; i++) { - testContainers[i] = String.format("%s%d", testContainersPrefix, - i + 1); - } - - creatableContainers = new String[10]; - for (int i = 0; i < creatableContainers.length; i++) { - creatableContainers[i] = String.format("%s%d", - createableContainersPrefix, i + 1); - } - - CREATEABLE_CONTAINER_1 = creatableContainers[0]; - TEST_CONTAINER_FOR_BLOBS = testContainers[0]; - // Create all test containers and their content - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - createContainers(service, testContainersPrefix, testContainers); - - try { - service.createContainer("$root"); - createdRoot = true; - } catch (ServiceException e) { - // e.printStackTrace(); - } - } - - @AfterClass - public static void cleanup() throws Exception { - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - deleteContainers(service, testContainersPrefix, testContainers); - deleteContainers(service, createableContainersPrefix, - creatableContainers); - - // If container was created, delete it - if (createdRoot) { - try { - service.deleteContainer("$root"); - createdRoot = false; - } catch (ServiceException e) { - // e.printStackTrace(); - } - } - } - - private static void createContainers(BlobContract service, String prefix, - String[] list) throws Exception { - Set containers = listContainers(service, prefix); - for (String item : list) { - if (!containers.contains(item)) { - service.createContainer(item); - } - } - } - - private static void deleteContainers(BlobContract service, String prefix, - String[] list) throws Exception { - Set containers = listContainers(service, prefix); - for (String item : list) { - if (containers.contains(item)) { - service.deleteContainer(item); - } - } - } - - private static Set listContainers(BlobContract service, - String prefix) throws Exception { - HashSet result = new HashSet(); - ListContainersResult list = service - .listContainers(new ListContainersOptions().setPrefix(prefix)); - for (Container item : list.getContainers()) { - result.add(item.getName()); - } - return result; - } - - @Test - public void createContainerWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - service.createContainer(CREATEABLE_CONTAINER_1); - - // Assert - } - - @Test(expected = IllegalArgumentException.class) - public void createNullContainerFail() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - service.createContainer(null); - - // Assert - assertTrue(false); - } - - @Test - public void deleteContainerWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - String containerName = "deletecontainerworks"; - service.createContainer(containerName, new CreateContainerOptions() - .setPublicAccess("blob").addMetadata("test", "bar") - .addMetadata("blah", "bleah")); - - // Act - service.deleteContainer(containerName); - ListContainersResult listContainerResult = service.listContainers(); - - // Assert - for (Container container : listContainerResult.getContainers()) { - assertTrue(!container.getName().equals(containerName)); - } - } - - @Test(expected = IllegalArgumentException.class) - public void deleteNullContainerFail() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - service.deleteContainer(null); - - // Assert - assertTrue(false); - } - - @Test - public void listContainersWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - ListContainersResult results = service.listContainers(); - - // Assert - assertNotNull(results); - assertTrue(testContainers.length <= results.getContainers().size()); - assertNotNull(results.getContainers().get(0).getName()); - assertNotNull(results.getContainers().get(0).getMetadata()); - assertNotNull(results.getContainers().get(0).getProperties()); - assertNotNull(results.getContainers().get(0).getProperties().getEtag()); - assertNotNull(results.getContainers().get(0).getProperties() - .getLastModified()); - assertNotNull(results.getContainers().get(0).getUrl()); - } - - @Test - public void listContainersWithPaginationWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - ListContainersResult results = service - .listContainers(new ListContainersOptions().setMaxResults(3)); - ListContainersResult results2 = service - .listContainers(new ListContainersOptions().setMarker(results - .getNextMarker())); - - // Assert - assertNotNull(results); - assertEquals(3, results.getContainers().size()); - assertNotNull(results.getNextMarker()); - assertEquals(3, results.getMaxResults()); - - assertNotNull(results2); - assertTrue(testContainers.length - 3 <= results2.getContainers().size()); - assertEquals("", results2.getNextMarker()); - assertEquals(0, results2.getMaxResults()); - } - - @Test - public void listContainersWithPrefixWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - ListContainersResult results = service - .listContainers(new ListContainersOptions().setPrefix( - testContainersPrefix).setMaxResults(3)); - // Assert - assertNotNull(results); - assertEquals(3, results.getContainers().size()); - assertNotNull(results.getNextMarker()); - assertEquals(3, results.getMaxResults()); - - // Act - ListContainersResult results2 = service - .listContainers(new ListContainersOptions().setPrefix( - testContainersPrefix) - .setMarker(results.getNextMarker())); - - // Assert - assertNotNull(results2); - assertNotNull(results2.getNextMarker()); - assertEquals(0, results2.getMaxResults()); - - // Act - ListContainersResult results3 = service - .listContainers(new ListContainersOptions() - .setPrefix(testContainersPrefix)); - - // Assert - assertEquals(results.getContainers().size() - + results2.getContainers().size(), results3.getContainers() - .size()); - } - - @Test - public void listBlockBlobWithNoCommittedBlocksWorks() throws Exception { - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - String container = TEST_CONTAINER_FOR_BLOBS; - String blob = "listBlockBlobWithNoCommittedBlocksWorks"; - - service.createBlockBlob(container, blob, null); - service.createBlobBlock(container, blob, "01", - new ByteArrayInputStream(new byte[] { 0x00 })); - service.deleteBlob(container, blob); - - try { - // Note: This next two lines should give a 404, because the blob no - // longer - // exists. However, the service sometimes allow this improper - // access, so - // the SDK has to handle the situation gracefully. - service.createBlobBlock(container, blob, "01", - new ByteArrayInputStream(new byte[] { 0x00 })); - ListBlobBlocksResult result = service.listBlobBlocks(container, - blob); - assertEquals(0, result.getCommittedBlocks().size()); - } catch (ServiceException ex) { - assertEquals(404, ex.getHttpStatusCode()); - } - } - - @Test - public void listBlobBlocksOnEmptyBlobWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String container = TEST_CONTAINER_FOR_BLOBS; - String blob = "test13"; - String content = new String(new char[512]); - service.createBlockBlob(container, blob, new ByteArrayInputStream( - content.getBytes("UTF-8"))); - - ListBlobBlocksResult result = service.listBlobBlocks(container, blob); - - // Assert - assertNotNull(result); - assertNotNull(result.getLastModified()); - assertNotNull(result.getEtag()); - assertEquals(512, result.getContentLength()); - assertNotNull(result.getCommittedBlocks()); - assertEquals(0, result.getCommittedBlocks().size()); - assertNotNull(result.getUncommittedBlocks()); - assertEquals(0, result.getUncommittedBlocks().size()); - } - - @Test - public void listBlobBlocksWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String container = TEST_CONTAINER_FOR_BLOBS; - String blob = "test14"; - service.createBlockBlob(container, blob, null); - service.createBlobBlock(container, blob, "123", - new ByteArrayInputStream(new byte[256])); - service.createBlobBlock(container, blob, "124", - new ByteArrayInputStream(new byte[512])); - service.createBlobBlock(container, blob, "125", - new ByteArrayInputStream(new byte[195])); - - ListBlobBlocksResult result = service.listBlobBlocks(container, blob, - new ListBlobBlocksOptions().setCommittedList(true) - .setUncommittedList(true)); - - // Assert - assertNotNull(result); - assertNotNull(result.getLastModified()); - assertNotNull(result.getEtag()); - assertEquals(0, result.getContentLength()); - assertNotNull(result.getCommittedBlocks()); - assertEquals(0, result.getCommittedBlocks().size()); - assertNotNull(result.getUncommittedBlocks()); - assertEquals(3, result.getUncommittedBlocks().size()); - assertEquals("123", result.getUncommittedBlocks().get(0).getBlockId()); - assertEquals(256, result.getUncommittedBlocks().get(0).getBlockLength()); - assertEquals("124", result.getUncommittedBlocks().get(1).getBlockId()); - assertEquals(512, result.getUncommittedBlocks().get(1).getBlockLength()); - assertEquals("125", result.getUncommittedBlocks().get(2).getBlockId()); - assertEquals(195, result.getUncommittedBlocks().get(2).getBlockLength()); - } - - @Test - public void listBlobBlocksWithOptionsWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String container = TEST_CONTAINER_FOR_BLOBS; - String blob = "test14"; - service.createBlockBlob(container, blob, null); - service.createBlobBlock(container, blob, "123", - new ByteArrayInputStream(new byte[256])); - - BlockList blockList = new BlockList(); - blockList.addUncommittedEntry("123"); - service.commitBlobBlocks(container, blob, blockList); - - service.createBlobBlock(container, blob, "124", - new ByteArrayInputStream(new byte[512])); - service.createBlobBlock(container, blob, "125", - new ByteArrayInputStream(new byte[195])); - - ListBlobBlocksResult result1 = service.listBlobBlocks(container, blob, - new ListBlobBlocksOptions().setCommittedList(true) - .setUncommittedList(true)); - ListBlobBlocksResult result2 = service.listBlobBlocks(container, blob, - new ListBlobBlocksOptions().setCommittedList(true)); - ListBlobBlocksResult result3 = service.listBlobBlocks(container, blob, - new ListBlobBlocksOptions().setUncommittedList(true)); - - // Assert - assertEquals(1, result1.getCommittedBlocks().size()); - assertEquals(2, result1.getUncommittedBlocks().size()); - - assertEquals(1, result2.getCommittedBlocks().size()); - assertEquals(0, result2.getUncommittedBlocks().size()); - - assertEquals(0, result3.getCommittedBlocks().size()); - assertEquals(2, result3.getUncommittedBlocks().size()); - } - - @Test - public void commitBlobBlocksWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String container = TEST_CONTAINER_FOR_BLOBS; - String blob = "test14"; - String blockId1 = "1fedcba"; - String blockId2 = "2abcdef"; - String blockId3 = "3zzzzzz"; - service.createBlockBlob(container, blob, null); - service.createBlobBlock(container, blob, blockId1, - new ByteArrayInputStream(new byte[256])); - service.createBlobBlock(container, blob, blockId2, - new ByteArrayInputStream(new byte[512])); - service.createBlobBlock(container, blob, blockId3, - new ByteArrayInputStream(new byte[195])); - - BlockList blockList = new BlockList(); - blockList.addUncommittedEntry(blockId1).addLatestEntry(blockId3); - service.commitBlobBlocks(container, blob, blockList); - - ListBlobBlocksResult result = service.listBlobBlocks(container, blob, - new ListBlobBlocksOptions().setCommittedList(true) - .setUncommittedList(true)); - - // Assert - assertNotNull(result); - assertNotNull(result.getLastModified()); - assertNotNull(result.getEtag()); - assertEquals(256 + 195, result.getContentLength()); - - assertNotNull(result.getCommittedBlocks()); - assertEquals(2, result.getCommittedBlocks().size()); - assertEquals(blockId1, result.getCommittedBlocks().get(0).getBlockId()); - assertEquals(256, result.getCommittedBlocks().get(0).getBlockLength()); - assertEquals(blockId3, result.getCommittedBlocks().get(1).getBlockId()); - assertEquals(195, result.getCommittedBlocks().get(1).getBlockLength()); - - assertNotNull(result.getUncommittedBlocks()); - assertEquals(0, result.getUncommittedBlocks().size()); - } - - @Test - public void createBlobBlockWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String container = TEST_CONTAINER_FOR_BLOBS; - String blob = "test13"; - String content = new String(new char[512]); - service.createBlockBlob(container, blob, new ByteArrayInputStream( - content.getBytes("UTF-8"))); - service.createBlobBlock(container, blob, "123", - new ByteArrayInputStream(content.getBytes("UTF-8"))); - service.createBlobBlock(container, blob, "124", - new ByteArrayInputStream(content.getBytes("UTF-8"))); - - // Assert - } - - @Test - public void createBlobBlockNullContainerWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String container = null; - String blob = "createblobblocknullcontainerworks"; - String content = new String(new char[512]); - service.createBlockBlob(container, blob, new ByteArrayInputStream( - content.getBytes("UTF-8"))); - GetBlobPropertiesResult result = service.getBlobProperties(null, blob); - GetBlobResult getBlobResult = service.getBlob(null, blob); - - // Assert - assertNotNull(result); - assertNotNull(result.getMetadata()); - assertEquals(0, result.getMetadata().size()); - BlobProperties props = result.getProperties(); - assertNotNull(props); - - assertEquals(content, - inputStreamToString(getBlobResult.getContentStream(), "UTF-8")); - } - - @Test - public void createBlockBlobWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - service.createBlockBlob(TEST_CONTAINER_FOR_BLOBS, "test2", - new ByteArrayInputStream("some content".getBytes())); - - // Assert - } - - @Test - public void createBlockBlobWithValidEtag() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - CreateBlobResult createBlobResult = service.createBlockBlob( - TEST_CONTAINER_FOR_BLOBS, "test2", new ByteArrayInputStream( - "some content".getBytes())); - - // Assert - assertNotNull(createBlobResult); - assertNotNull(createBlobResult.getEtag()); - } - - @Test - public void createBlockBlobWithOptionsWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String content = "some content"; - service.createBlockBlob( - TEST_CONTAINER_FOR_BLOBS, - "test2", - new ByteArrayInputStream(content.getBytes("UTF-8")), - new CreateBlobOptions() - .setBlobCacheControl("test") - .setBlobContentEncoding("UTF-8") - .setBlobContentLanguage("en-us") - /* .setBlobContentMD5("1234") */.setBlobContentType( - "text/plain") - .setCacheControl("test") - .setContentEncoding("UTF-8") - /* .setContentMD5("1234") */.setContentType( - "text/plain")); - - GetBlobPropertiesResult result = service.getBlobProperties( - TEST_CONTAINER_FOR_BLOBS, "test2"); - - // Assert - assertNotNull(result); - - assertNotNull(result.getMetadata()); - assertEquals(0, result.getMetadata().size()); - - BlobProperties props = result.getProperties(); - assertNotNull(props); - assertEquals("test", props.getCacheControl()); - assertEquals("UTF-8", props.getContentEncoding()); - assertEquals("en-us", props.getContentLanguage()); - assertEquals("text/plain", props.getContentType()); - assertEquals(content.length(), props.getContentLength()); - assertNotNull(props.getEtag()); - assertNull(props.getContentMD5()); - assertNotNull(props.getLastModified()); - assertEquals("BlockBlob", props.getBlobType()); - assertEquals("unlocked", props.getLeaseStatus()); - assertEquals(0, props.getSequenceNumber()); - } - - @Test - public void getBlockBlobWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String content = "some content"; - service.createBlockBlob( - TEST_CONTAINER_FOR_BLOBS, - "test2", - new ByteArrayInputStream(content.getBytes("UTF-8")), - new CreateBlobOptions() - .setBlobCacheControl("test") - .setBlobContentEncoding("UTF-8") - .setBlobContentLanguage("en-us") - /* .setBlobContentMD5("1234") */.setBlobContentType( - "text/plain") - .setCacheControl("test") - .setContentEncoding("UTF-8") - /* .setContentMD5("1234") */.setContentType( - "text/plain")); - - GetBlobResult result = service.getBlob(TEST_CONTAINER_FOR_BLOBS, - "test2"); - - // Assert - assertNotNull(result); - - assertNotNull(result.getMetadata()); - assertEquals(0, result.getMetadata().size()); - - BlobProperties props = result.getProperties(); - assertNotNull(props); - assertEquals("test", props.getCacheControl()); - assertEquals("UTF-8", props.getContentEncoding()); - assertEquals("en-us", props.getContentLanguage()); - assertEquals("text/plain", props.getContentType()); - assertEquals(content.length(), props.getContentLength()); - assertNotNull(props.getEtag()); - assertNull(props.getContentMD5()); - assertNotNull(props.getLastModified()); - assertEquals("BlockBlob", props.getBlobType()); - assertEquals("unlocked", props.getLeaseStatus()); - assertEquals(0, props.getSequenceNumber()); - assertEquals(content, - inputStreamToString(result.getContentStream(), "UTF-8")); - } - - @Test - public void deleteBlobWorks() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - String content = "some content"; - service.createBlockBlob(TEST_CONTAINER_FOR_BLOBS, "test2", - new ByteArrayInputStream(content.getBytes("UTF-8"))); - - service.deleteBlob(TEST_CONTAINER_FOR_BLOBS, "test2"); - - // Assert - } - - class RetryPolicyObserver implements ServiceFilter { - public int requestCount; - - @Override - public ServiceResponseContext handle(ServiceRequestContext request, - Next next) throws Exception { - requestCount++; - return next.handle(request); - } - } - - private class NonResetableInputStream extends FilterInputStream { - - protected NonResetableInputStream(InputStream in) { - super(in); - } - - @Override - public boolean markSupported() { - return false; - } - } - - @Test - public void retryPolicyThrowsOnInvalidInputStream() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - service = service.withFilter(new RetryPolicyFilter( - new ExponentialRetryPolicy(100/* deltaBackoff */, - 3/* maximumAttempts */, new int[] { 400, 500, 503 }))); - - Exception error = null; - try { - String content = "foo"; - InputStream contentStream = new ByteArrayInputStream( - content.getBytes("UTF-8")); - InputStream stream = new NonResetableInputStream(contentStream); - - service.createBlockBlob(TEST_CONTAINER_FOR_BLOBS, "testretry", - stream); - } catch (Exception e) { - error = e; - } - - // Assert - assertNotNull(error); - } - - private class ResetableInputStream extends FilterInputStream { - private boolean resetCalled; - - protected ResetableInputStream(InputStream in) { - super(in); - } - - @Override - public void reset() throws IOException { - super.reset(); - setResetCalled(true); - } - - public boolean isResetCalled() { - return resetCalled; - } - - public void setResetCalled(boolean resetCalled) { - this.resetCalled = resetCalled; - } - } - - @Test - public void retryPolicyCallsResetOnValidInputStream() throws Exception { - // Arrange - Configuration config = createConfiguration(); - BlobContract service = BlobService.create(config); - - // Act - service = service.withFilter(new RetryPolicyFilter( - new ExponentialRetryPolicy(100/* deltaBackoff */, - 3/* maximumAttempts */, new int[] { 403 }))); - - ServiceException error = null; - ResetableInputStream stream = null; - try { - String content = "foo"; - InputStream contentStream = new ByteArrayInputStream( - content.getBytes("UTF-8")); - stream = new ResetableInputStream(contentStream); - - service.createBlockBlob(TEST_CONTAINER_FOR_BLOBS, - "invalidblobname @#$#@$@", stream); - } catch (ServiceException e) { - error = e; - } - - // Assert - assertNotNull(error); - assertEquals(403, error.getHttpStatusCode()); - assertNotNull(stream); - assertTrue(stream.isResetCalled()); - } - - private String inputStreamToString(InputStream inputStream, String encoding) - throws IOException { - Writer writer = new StringWriter(); - - char[] buffer = new char[1024]; - try { - Reader reader = new BufferedReader(new InputStreamReader( - inputStream, encoding)); - while (true) { - int n = reader.read(buffer); - if (n == -1) - break; - writer.write(buffer, 0, n); - } - } finally { - inputStream.close(); - } - return writer.toString(); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/blob/IntegrationTestBase.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/blob/IntegrationTestBase.java deleted file mode 100644 index b5b99d5c910e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/blob/IntegrationTestBase.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * - * Copyright (c) Microsoft and contributors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.microsoft.windowsazure.services.blob; - -import com.microsoft.windowsazure.Configuration; - -public abstract class IntegrationTestBase { - protected static Configuration createConfiguration() { - Configuration config = Configuration.getInstance(); - overrideWithEnv(config, BlobConfiguration.ACCOUNT_NAME); - overrideWithEnv(config, BlobConfiguration.ACCOUNT_KEY); - overrideWithEnv(config, BlobConfiguration.URI); - return config; - } - - private static void overrideWithEnv(Configuration config, String key) { - String value = System.getenv(key); - if (value == null) - return; - - config.setProperty(key, value); - } - - protected static boolean isRunningWithEmulator(Configuration config) { - String accountName = "devstoreaccount1"; - String accountKey = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="; - - return accountName.equals(config - .getProperty(BlobConfiguration.ACCOUNT_NAME)) - && accountKey.equals(config - .getProperty(BlobConfiguration.ACCOUNT_KEY)); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AccessPolicyIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AccessPolicyIntegrationTest.java deleted file mode 100644 index b6a1e5ce37bd..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AccessPolicyIntegrationTest.java +++ /dev/null @@ -1,240 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.util.ArrayList; -import java.util.EnumSet; -import java.util.List; - -import org.junit.Test; - -import com.microsoft.windowsazure.core.pipeline.jersey.ExponentialRetryPolicy; -import com.microsoft.windowsazure.core.pipeline.jersey.RetryPolicyFilter; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.AccessPolicy; -import com.microsoft.windowsazure.services.media.models.AccessPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AccessPolicyPermission; - -public class AccessPolicyIntegrationTest extends IntegrationTestBase { - private void verifyInfosEqual(String message, AccessPolicyInfo expected, - AccessPolicyInfo actual) { - verifyPolicyProperties(message, expected.getName(), - expected.getDurationInMinutes(), expected.getPermissions(), - actual); - } - - private void verifyPolicyProperties(String message, String testName, - double duration, AccessPolicyPermission permission, - AccessPolicyInfo policy) { - verifyPolicyProperties(message, testName, duration, - EnumSet.of(permission), policy); - } - - private void verifyPolicyProperties(String message, String testName, - double duration, EnumSet permissions, - AccessPolicyInfo policy) { - assertNotNull(message, policy); - assertEquals(message + " Name", testName, policy.getName()); - assertEquals(message + " DurationInMinutes", duration, - policy.getDurationInMinutes(), 0.00001); - for (AccessPolicyPermission permission : permissions) { - if (permission != AccessPolicyPermission.NONE) { - assertTrue( - message + "permissions should contain " + permission, - policy.getPermissions().contains(permission)); - } - } - assertEquals(message + " Permissions", permissions, - policy.getPermissions()); - - assertNotNull(message + " Id", policy.getId()); - assertNotNull(message + " Created", policy.getCreated()); - assertNotNull(message + " LastModified", policy.getLastModified()); - assertEquals(message + " Created & LastModified", policy.getCreated(), - policy.getLastModified()); - } - - @Test - public void canCreateAccessPolicy() throws Exception { - String testName = testPolicyPrefix + "CanCreate"; - double duration = 5; - - AccessPolicyInfo policy = service.create(AccessPolicy.create(testName, - duration, EnumSet.of(AccessPolicyPermission.WRITE))); - - verifyPolicyProperties("policy", testName, duration, - AccessPolicyPermission.WRITE, policy); - } - - @Test - public void canCreateAccessPolicyWithReadPermissions() throws Exception { - String testName = testPolicyPrefix + "CanCreateRead"; - double duration = 5; - - AccessPolicyInfo policy = service.create(AccessPolicy.create(testName, - duration, EnumSet.of(AccessPolicyPermission.READ))); - - verifyPolicyProperties("policy", testName, duration, - AccessPolicyPermission.READ, policy); - } - - @Test - public void canGetSinglePolicyById() throws Exception { - String expectedName = testPolicyPrefix + "GetOne"; - double duration = 1; - AccessPolicyInfo policyToGet = service.create(AccessPolicy.create( - expectedName, duration, - EnumSet.of(AccessPolicyPermission.WRITE))); - - AccessPolicyInfo retrievedPolicy = service.get(AccessPolicy - .get(policyToGet.getId())); - - assertEquals(policyToGet.getId(), retrievedPolicy.getId()); - verifyPolicyProperties("retrievedPolicy", expectedName, duration, - AccessPolicyPermission.WRITE, retrievedPolicy); - } - - @Test - public void canGetSinglePolicyByInvalidId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.get(AccessPolicy.get(invalidId)); - } - - @Test - public void canGetSinglePolicyByNonexistId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.get(AccessPolicy.get(validButNonexistAccessPolicyId)); - } - - @Test - public void canRetrieveListOfAccessPolicies() throws Exception { - String[] policyNames = new String[] { testPolicyPrefix + "ListOne", - testPolicyPrefix + "ListTwo" }; - double duration = 3; - EnumSet permissions = EnumSet.of( - AccessPolicyPermission.WRITE, AccessPolicyPermission.LIST); - - List expectedAccessPolicies = new ArrayList(); - for (int i = 0; i < policyNames.length; i++) { - AccessPolicyInfo policy = service.create(AccessPolicy.create( - policyNames[i], duration, permissions)); - expectedAccessPolicies.add(policy); - } - - List actualAccessPolicies = service.list(AccessPolicy - .list()); - - verifyListResultContains("listAccessPolicies", expectedAccessPolicies, - actualAccessPolicies, new ComponentDelegate() { - @Override - public void verifyEquals(String message, Object expected, - Object actual) { - verifyInfosEqual(message, (AccessPolicyInfo) expected, - (AccessPolicyInfo) actual); - } - }); - } - - @Test - public void canUseQueryParametersWhenListingAccessPolicies() - throws Exception { - String[] policyNames = new String[] { testPolicyPrefix + "ListThree", - testPolicyPrefix + "ListFour", testPolicyPrefix + "ListFive", - testPolicyPrefix + "ListSix", testPolicyPrefix + "ListSeven" }; - - double duration = 3; - EnumSet permissions = EnumSet.of( - AccessPolicyPermission.WRITE, AccessPolicyPermission.LIST); - - List expectedAccessPolicies = new ArrayList(); - for (int i = 0; i < policyNames.length; i++) { - AccessPolicyInfo policy = service.create(AccessPolicy.create( - policyNames[i], duration, permissions)); - expectedAccessPolicies.add(policy); - } - - List actualAccessPolicies = service.list(AccessPolicy - .list().setTop(2)); - - assertEquals(2, actualAccessPolicies.size()); - } - - // Note: Access Policy cannot be updated. - - @Test - public void canDeleteAccessPolicyById() throws Exception { - String policyName = testPolicyPrefix + "ToDelete"; - double duration = 1; - AccessPolicyInfo policyToDelete = service - .create(AccessPolicy.create(policyName, duration, - EnumSet.of(AccessPolicyPermission.WRITE))); - List listPoliciesResult = service.list(AccessPolicy - .list()); - int policyCountBaseline = listPoliciesResult.size(); - - service.delete(AccessPolicy.delete(policyToDelete.getId())); - - listPoliciesResult = service.list(AccessPolicy.list()); - assertEquals("listPoliciesResult.size", policyCountBaseline - 1, - listPoliciesResult.size()); - - for (AccessPolicyInfo policy : service.list(AccessPolicy.list())) { - assertFalse(policyToDelete.getId().equals(policy.getId())); - } - - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.get(AccessPolicy.get(policyToDelete.getId())); - } - - @Test - public void canDeleteAccessPolicyByInvalidId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.delete(AccessPolicy.delete(invalidId)); - } - - @Test - public void canDeleteAccessPolicyByNonexistId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.delete(AccessPolicy.delete(validButNonexistAccessPolicyId)); - } - - @Test - public void canRetryAccessPolicyCreation() throws Exception { - String name = testPolicyPrefix + "canRetryAccessPolicyCreationPolicy"; - double duration = 1; - EnumSet write = EnumSet - .of(AccessPolicyPermission.WRITE); - service.create(AccessPolicy.create(name + "1", duration, write)); - - ExponentialRetryPolicy forceRetryPolicy = new ExponentialRetryPolicy(1, - 1, new int[] { 201 }); - MediaContract forceRetryService = service - .withFilter(new RetryPolicyFilter(forceRetryPolicy)); - - forceRetryService.create(AccessPolicy.create(name + "2", duration, - write)); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AssetFileIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AssetFileIntegrationTest.java deleted file mode 100644 index 4e7b7cb969b9..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AssetFileIntegrationTest.java +++ /dev/null @@ -1,279 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.Date; -import java.util.EnumSet; - -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.AccessPolicy; -import com.microsoft.windowsazure.services.media.models.AccessPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AccessPolicyPermission; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetFile; -import com.microsoft.windowsazure.services.media.models.AssetFileInfo; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; - -public class AssetFileIntegrationTest extends IntegrationTestBase { - - // Some dummy binary data for uploading - private static byte[] firstPrimes = new byte[] { 2, 3, 5, 7, 11, 13, 17, - 19, 23, 29 }; - private static byte[] onesAndZeros = new byte[] { 1, 0, 1, 0, 1, 0, 1, 0 }; - private static byte[] countingUp = new byte[] { 3, 4, 5, 6, 7, 8, 9, 10, 11 }; - - private static final String BLOB_NAME = "primes.bin"; - private static final String BLOB_NAME_2 = "primes2.bin"; - - private static AccessPolicyInfo writePolicy; - - @BeforeClass - public static void setup() throws Exception { - IntegrationTestBase.setup(); - - writePolicy = createWritePolicy("uploadWritePolicy", 30); - } - - @Test - public void canCreateFileForUploadedBlob() throws Exception { - AssetInfo asset = createTestAsset("createFileForUploadedBlob"); - LocatorInfo locator = createLocator(writePolicy, asset, 5); - WritableBlobContainerContract blobWriter = service - .createBlobWriter(locator); - - createAndUploadBlob(blobWriter, BLOB_NAME, firstPrimes); - - service.action(AssetFile.createFileInfos(asset.getId())); - - ListResult files = service.list(AssetFile.list(asset - .getAssetFilesLink())); - - assertEquals(1, files.size()); - AssetFileInfo file = files.get(0); - assertEquals(BLOB_NAME, file.getName()); - } - - @Test - public void canCreateFileEntityDirectly() throws Exception { - AssetInfo asset = createTestAsset("createFileEntityDirectly"); - LocatorInfo locator = createLocator(writePolicy, asset, 5); - WritableBlobContainerContract blobWriter = service - .createBlobWriter(locator); - - createAndUploadBlob(blobWriter, BLOB_NAME_2, firstPrimes); - - service.create(AssetFile.create(asset.getId(), BLOB_NAME_2)); - - ListResult files = service.list(AssetFile.list(asset - .getAssetFilesLink())); - - boolean found = false; - for (AssetFileInfo file : files) { - if (file.getName().equals(BLOB_NAME_2)) { - found = true; - break; - } - } - - assertTrue(found); - } - - @Test - public void canCreateAssetWithMultipleFiles() throws Exception { - AssetInfo asset = createTestAsset("createWithMultipleFiles"); - AccessPolicyInfo policy = createWritePolicy("createWithMultipleFiles", - 10); - LocatorInfo locator = createLocator(policy, asset, 5); - - WritableBlobContainerContract blobWriter = service - .createBlobWriter(locator); - - createAndUploadBlob(blobWriter, "blob1.bin", firstPrimes); - createAndUploadBlob(blobWriter, "blob2.bin", onesAndZeros); - createAndUploadBlob(blobWriter, "blob3.bin", countingUp); - - AssetFileInfo file1 = service.create(AssetFile - .create(asset.getId(), "blob1.bin").setIsPrimary(true) - .setIsEncrypted(false) - .setContentFileSize(new Long(firstPrimes.length))); - - AssetFileInfo file2 = service.create(AssetFile - .create(asset.getId(), "blob2.bin").setIsPrimary(false) - .setIsEncrypted(false) - .setContentFileSize(new Long(onesAndZeros.length))); - - AssetFileInfo file3 = service.create(AssetFile - .create(asset.getId(), "blob3.bin").setIsPrimary(false) - .setIsEncrypted(false) - .setContentFileSize(new Long(countingUp.length)) - .setContentChecksum("1234")); - - ListResult files = service.list(AssetFile.list(asset - .getAssetFilesLink())); - - assertEquals(3, files.size()); - - ArrayList results = new ArrayList(files); - Collections.sort(results, new Comparator() { - @Override - public int compare(AssetFileInfo o1, AssetFileInfo o2) { - return o1.getName().compareTo(o2.getName()); - } - }); - - assertAssetFileInfoEquals("results.get(0)", file1, results.get(0)); - assertAssetFileInfoEquals("results.get(1)", file2, results.get(1)); - assertAssetFileInfoEquals("results.get(2)", file3, results.get(2)); - } - - @Test - public void canCreateFileAndThenUpdateIt() throws Exception { - AssetInfo asset = createTestAsset("createAndUpdate"); - AccessPolicyInfo policy = createWritePolicy("createAndUpdate", 10); - LocatorInfo locator = createLocator(policy, asset, 5); - WritableBlobContainerContract blobWriter = service - .createBlobWriter(locator); - - createAndUploadBlob(blobWriter, "toUpdate.bin", firstPrimes); - - AssetFileInfo file = service.create(AssetFile.create(asset.getId(), - "toUpdate.bin")); - - service.update(AssetFile.update(file.getId()).setMimeType( - "application/octet-stream")); - - AssetFileInfo fromServer = service.get(AssetFile.get(file.getId())); - - assertEquals("application/octet-stream", fromServer.getMimeType()); - } - - @Test - public void canDeleteFileFromAsset() throws Exception { - AssetInfo asset = createTestAsset("deleteFile"); - AccessPolicyInfo policy = createWritePolicy("deleteFile", 10); - LocatorInfo locator = createLocator(policy, asset, 5); - WritableBlobContainerContract blobWriter = service - .createBlobWriter(locator); - - createAndUploadBlob(blobWriter, "todelete.bin", firstPrimes); - createAndUploadBlob(blobWriter, "tokeep.bin", onesAndZeros); - - service.action(AssetFile.createFileInfos(asset.getId())); - - ListResult originalFiles = service.list(AssetFile - .list(asset.getAssetFilesLink())); - assertEquals(2, originalFiles.size()); - - for (AssetFileInfo file : originalFiles) { - if (file.getName().equals("todelete.bin")) { - service.delete(AssetFile.delete(file.getId())); - break; - } - } - - ListResult newFiles = service.list(AssetFile.list(asset - .getAssetFilesLink())); - assertEquals(1, newFiles.size()); - assertEquals("tokeep.bin", newFiles.get(0).getName()); - } - - // - // Helper functions to create various media services entities - // - private static AssetInfo createTestAsset(String name) - throws ServiceException { - return service.create(Asset.create().setName(testAssetPrefix + name)); - } - - private static AccessPolicyInfo createWritePolicy(String name, - int durationInMinutes) throws ServiceException { - return service.create(AccessPolicy.create(testPolicyPrefix + name, - durationInMinutes, EnumSet.of(AccessPolicyPermission.WRITE))); - } - - private static void createAndUploadBlob( - WritableBlobContainerContract blobWriter, String blobName, - byte[] data) throws ServiceException { - InputStream blobContent = new ByteArrayInputStream(data); - blobWriter.createBlockBlob(blobName, blobContent); - } - - // - // Assertion helpers - // - - private void assertAssetFileInfoEquals(String message, - AssetFileInfo expected, AssetFileInfo actual) { - verifyAssetInfoProperties(message, expected.getId(), - expected.getName(), expected.getParentAssetId(), - expected.getIsPrimary(), expected.getIsEncrypted(), - expected.getEncryptionKeyId(), expected.getEncryptionScheme(), - expected.getEncryptionVersion(), - expected.getInitializationVector(), expected.getCreated(), - expected.getLastModified(), expected.getContentChecksum(), - expected.getMimeType(), actual); - } - - private void verifyAssetInfoProperties(String message, String id, - String name, String parentAssetId, boolean isPrimary, - boolean isEncrypted, String encryptionKeyId, - String encryptionScheme, String encryptionVersion, - String initializationVector, Date created, Date lastModified, - String contentChecksum, String mimeType, AssetFileInfo assetFile) { - assertNotNull(message, assetFile); - - assertEquals(message + ".getId", id, assetFile.getId()); - assertEquals(message + ".getName", name, assetFile.getName()); - assertEquals(message + ".getParentAssetId", parentAssetId, - assetFile.getParentAssetId()); - assertEquals(message + ".getIsPrimary", isPrimary, - assetFile.getIsPrimary()); - - assertEquals(message + ".getIsEncrypted", isEncrypted, - assetFile.getIsEncrypted()); - assertEquals(message + ".getEncryptionKeyId", encryptionKeyId, - assetFile.getEncryptionKeyId()); - assertEquals(message + ".getEncryptionScheme", encryptionScheme, - assetFile.getEncryptionScheme()); - assertEquals(message + ".getEncryptionVersion", encryptionVersion, - assetFile.getEncryptionVersion()); - assertEquals(message + ".getInitializationVector", - initializationVector, assetFile.getInitializationVector()); - - assertDateApproxEquals(message + ".getCreated", created, - assetFile.getCreated()); - assertDateApproxEquals(message + ".getLastModified", lastModified, - assetFile.getLastModified()); - assertEquals(message + ".getContentChecksum", contentChecksum, - assetFile.getContentChecksum()); - assertEquals(message + ".getMimeType", mimeType, - assetFile.getMimeType()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AssetIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AssetIntegrationTest.java deleted file mode 100644 index 53ec341ecce7..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/AssetIntegrationTest.java +++ /dev/null @@ -1,563 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.net.URISyntaxException; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; -import java.util.EnumSet; -import java.util.List; -import java.util.UUID; - -import org.junit.Test; - -import com.microsoft.windowsazure.core.utils.Base64; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.AccessPolicy; -import com.microsoft.windowsazure.services.media.models.AccessPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AccessPolicyPermission; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetDeliveryPolicy; -import com.microsoft.windowsazure.services.media.models.AssetDeliveryPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AssetDeliveryPolicyType; -import com.microsoft.windowsazure.services.media.models.AssetDeliveryProtocol; -import com.microsoft.windowsazure.services.media.models.AssetFile; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.AssetOption; -import com.microsoft.windowsazure.services.media.models.AssetState; -import com.microsoft.windowsazure.services.media.models.ContentKey; -import com.microsoft.windowsazure.services.media.models.ContentKeyInfo; -import com.microsoft.windowsazure.services.media.models.ContentKeyType; -import com.microsoft.windowsazure.services.media.models.Job; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.LinkInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.Locator; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; -import com.microsoft.windowsazure.services.media.models.LocatorType; -import com.microsoft.windowsazure.services.media.models.ProtectionKey; -import com.microsoft.windowsazure.services.media.models.Task; -import com.microsoft.windowsazure.services.media.models.Task.CreateBatchOperation; - -public class AssetIntegrationTest extends IntegrationTestBase { - - private void verifyInfosEqual(String message, AssetInfo expected, - AssetInfo actual) { - verifyAssetProperties(message, expected.getName(), - expected.getAlternateId(), expected.getOptions(), - expected.getState(), actual); - } - - private void verifyAssetProperties(String message, String testName, - String altId, AssetOption encryptionOption, AssetState assetState, - AssetInfo actualAsset) { - verifyAssetProperties(message, testName, altId, encryptionOption, - assetState, null, null, null, actualAsset); - } - - private void verifyAssetProperties(String message, String testName, - String altId, AssetOption encryptionOption, AssetState assetState, - String id, Date created, Date lastModified, AssetInfo actualAsset) { - assertNotNull(message, actualAsset); - assertEquals(message + " Name", testName, actualAsset.getName()); - assertEquals(message + " AlternateId", altId, - actualAsset.getAlternateId()); - assertEquals(message + " Options", encryptionOption, - actualAsset.getOptions()); - assertEquals(message + " State", assetState, actualAsset.getState()); - if (id != null) { - assertEquals(message + " Id", id, actualAsset.getId()); - } - if (created != null) { - assertEquals(message + " Created", created, - actualAsset.getCreated()); - } - if (lastModified != null) { - assertEquals(message + " LastModified", lastModified, - actualAsset.getLastModified()); - } - } - - @Test - public void createAssetOptionsSuccess() throws Exception { - // Arrange - String testName = testAssetPrefix + "createAssetOptionsSuccess"; - String altId = "altId"; - AssetOption encryptionOption = AssetOption.StorageEncrypted; - AssetState assetState = AssetState.Published; - - // Act - AssetInfo actualAsset = service.create(Asset.create() - .setAlternateId(altId).setOptions(encryptionOption) - .setState(assetState).setName(testName)); - - // Assert - verifyAssetProperties("actualAsset", testName, altId, encryptionOption, - assetState, actualAsset); - } - - @Test - public void createAssetMeanString() throws Exception { - // Arrange - String meanString = "'\"(?++\\+&==/&?''$@:// +ne " - + "{\"jsonLike\":\"Created\":\"\\/Date(1336368841597)\\/\",\"Name\":null,cksum value\"}}" - + "Some unicode: \uB2E4\uB974\uB2E4\uB294\u0625 \u064A\u062F\u064A\u0648\u0009\r\n"; - - String testName = testAssetPrefix + "createAssetMeanString" - + meanString; - - // Act - AssetInfo actualAsset = service - .create(Asset.create().setName(testName)); - - // Assert - assertEquals("actualAsset Name", testName, actualAsset.getName()); - } - - @Test - public void createAssetNullNameSuccess() throws Exception { - // Arrange - - // Act - AssetInfo actualAsset = null; - try { - actualAsset = service.create(Asset.create()); - // Assert - verifyAssetProperties("actualAsset", "", "", AssetOption.None, - AssetState.Initialized, actualAsset); - } finally { - // Clean up the anonymous asset now while we have the id, because we - // do not want to delete all anonymous assets in the bulk-cleanup - // code. - try { - if (actualAsset != null) { - service.delete(Asset.delete(actualAsset.getId())); - } - } catch (ServiceException ex) { - // ex.printStackTrace(); - } - } - } - - @Test - public void getAssetSuccess() throws Exception { - // Arrange - String testName = testAssetPrefix + "GetAssetSuccess"; - String altId = "altId"; - AssetOption encryptionOption = AssetOption.StorageEncrypted; - AssetState assetState = AssetState.Published; - - AssetInfo assetInfo = service.create(Asset.create().setName(testName) - .setAlternateId(altId).setOptions(encryptionOption) - .setState(assetState)); - - // Act - AssetInfo actualAsset = service.get(Asset.get(assetInfo.getId())); - - // Assert - verifyInfosEqual("actualAsset", assetInfo, actualAsset); - } - - @Test - public void getAssetInvalidId() throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.get(Asset.get(invalidId)); - } - - @Test - public void getAssetNonexistId() throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.get(Asset.get(validButNonexistAssetId)); - } - - @Test - public void listAssetSuccess() throws ServiceException { - // Arrange - String altId = "altId"; - AssetOption encryptionOption = AssetOption.StorageEncrypted; - AssetState assetState = AssetState.Published; - - String[] assetNames = new String[] { testAssetPrefix + "assetA", - testAssetPrefix + "assetB" }; - List expectedAssets = new ArrayList(); - for (int i = 0; i < assetNames.length; i++) { - String name = assetNames[i]; - expectedAssets.add(service.create(Asset.create().setName(name) - .setAlternateId(altId).setOptions(encryptionOption) - .setState(assetState))); - } - - // Act - Collection listAssetResult = service.list(Asset.list()); - - // Assert - - verifyListResultContains("listAssets", expectedAssets, listAssetResult, - new ComponentDelegate() { - @Override - public void verifyEquals(String message, Object expected, - Object actual) { - verifyInfosEqual(message, (AssetInfo) expected, - (AssetInfo) actual); - } - }); - } - - @Test - public void canListAssetsWithOptions() throws ServiceException { - String[] assetNames = new String[] { - testAssetPrefix + "assetListOptionsA", - testAssetPrefix + "assetListOptionsB", - testAssetPrefix + "assetListOptionsC", - testAssetPrefix + "assetListOptionsD" }; - List expectedAssets = new ArrayList(); - for (int i = 0; i < assetNames.length; i++) { - String name = assetNames[i]; - expectedAssets.add(service.create(Asset.create().setName(name))); - } - - Collection listAssetResult = service.list(Asset.list() - .setTop(2)); - - // Assert - - assertEquals(2, listAssetResult.size()); - } - - @Test - public void updateAssetSuccess() throws Exception { - // Arrange - String originalTestName = testAssetPrefix - + "updateAssetSuccessOriginal"; - AssetOption originalEncryptionOption = AssetOption.StorageEncrypted; - AssetState originalAssetState = AssetState.Initialized; - AssetInfo originalAsset = service.create(Asset.create() - .setName(originalTestName).setAlternateId("altId") - .setOptions(originalEncryptionOption)); - - String updatedTestName = testAssetPrefix + "updateAssetSuccessUpdated"; - String altId = "otherAltId"; - - // Act - service.update(Asset.update(originalAsset.getId()) - .setName(updatedTestName).setAlternateId(altId)); - AssetInfo updatedAsset = service.get(Asset.get(originalAsset.getId())); - - // Assert - verifyAssetProperties("updatedAsset", updatedTestName, altId, - originalEncryptionOption, originalAssetState, updatedAsset); - } - - @Test - public void updateAssetNoChangesSuccess() throws Exception { - // Arrange - String originalTestName = testAssetPrefix - + "updateAssetNoChangesSuccess"; - String altId = "altId"; - AssetInfo originalAsset = service.create(Asset.create() - .setName(originalTestName).setAlternateId(altId)); - - // Act - service.update(Asset.update(originalAsset.getId())); - AssetInfo updatedAsset = service.get(Asset.get(originalAsset.getId())); - - // Assert - verifyInfosEqual("updatedAsset", originalAsset, updatedAsset); - } - - @Test - public void updateAssetFailedWithInvalidId() throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.update(Asset.update(validButNonexistAssetId)); - } - - @Test - public void deleteAssetSuccess() throws Exception { - // Arrange - String assetName = testAssetPrefix + "deleteAssetSuccess"; - AssetInfo assetInfo = service.create(Asset.create().setName(assetName)); - List listAssetsResult = service.list(Asset.list()); - int assetCountBaseline = listAssetsResult.size(); - - // Act - service.delete(Asset.delete(assetInfo.getId())); - - // Assert - listAssetsResult = service.list(Asset.list()); - assertEquals("listAssetsResult.size", assetCountBaseline - 1, - listAssetsResult.size()); - - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.get(Asset.get(assetInfo.getId())); - } - - @Test - public void deleteAssetFailedWithInvalidId() throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.delete(Asset.delete(validButNonexistAssetId)); - } - - @Test - public void linkAssetContentKeySuccess() throws ServiceException, - URISyntaxException, CertificateException { - // Arrange - String originalTestName = testAssetPrefix - + "linkAssetContentKeySuccess"; - AssetInfo assetInfo = service.create(Asset.create() - .setName(originalTestName) - .setOptions(AssetOption.StorageEncrypted)); - - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.StorageEncryption)); - String contentKeyId = String - .format("nb:kid:UUID:%s", UUID.randomUUID()); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - service.create(ContentKey.create(contentKeyId, - ContentKeyType.StorageEncryption, encryptedContentKey) - .setProtectionKeyId(protectionKeyId)); - - // Act - service.action(Asset.linkContentKey(assetInfo.getId(), contentKeyId)); - - // Assert - - List contentKeys = service.list(ContentKey - .list(assetInfo.getContentKeysLink())); - assertEquals(1, contentKeys.size()); - assertEquals(contentKeyId, contentKeys.get(0).getId()); - } - - @Test - public void linkAssetContentKeyInvalidIdFailed() throws ServiceException, - URISyntaxException { - // Arrange - - // Act - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.action(Asset.linkContentKey(validButNonexistAssetId, - "nb:kid:UUID:invalidContentKeyId")); - - // Assert - } - - @Test - public void canGetParentBackFromAsset() throws ServiceException, - InterruptedException { - // Arrange - String originalAssetName = testAssetPrefix - + "canGetParentBackFromAsset"; - AssetInfo originalAsset = service.create(Asset.create().setName( - originalAssetName)); - - int durationInMinutes = 10; - AccessPolicyInfo accessPolicyInfo = service.create(AccessPolicy.create( - testPolicyPrefix + "uploadAesPortectedAssetSuccess", - durationInMinutes, EnumSet.of(AccessPolicyPermission.WRITE))); - - LocatorInfo locatorInfo = service.create(Locator.create( - accessPolicyInfo.getId(), originalAsset.getId(), - LocatorType.SAS)); - WritableBlobContainerContract blobWriter = service - .createBlobWriter(locatorInfo); - - InputStream mpeg4H264InputStream = getClass().getResourceAsStream( - "/media/MPEG4-H264.mp4"); - blobWriter.createBlockBlob("MPEG4-H264.mp4", mpeg4H264InputStream); - service.action(AssetFile.createFileInfos(originalAsset.getId())); - - String jobName = testJobPrefix + "createJobSuccess"; - CreateBatchOperation taskCreator = Task - .create(MEDIA_ENCODER_MEDIA_PROCESSOR_ID, - "" - + "JobInputAsset(0)" - + "JobOutputAsset(0)" - + "") - .setConfiguration("H.264 256k DSL CBR") - .setName("My encoding Task"); - JobInfo jobInfo = service.create(Job.create().setName(jobName) - .addInputMediaAsset(originalAsset.getId()) - .addTaskCreator(taskCreator)); - - // Act - ListResult outputAssets = service.list(Asset.list(jobInfo - .getOutputAssetsLink())); - assertEquals(1, outputAssets.size()); - AssetInfo childAsset = outputAssets.get(0); - - LinkInfo parentAssetLink = childAsset.getParentAssetsLink(); - AssetInfo parentAsset = service.get(Asset.get(parentAssetLink)); - - // Assert - assertEquals(originalAsset.getId(), parentAsset.getId()); - } - - @Test - public void unlinkAssetContentKeySuccess() throws ServiceException, - URISyntaxException, CertificateException { - // Arrange - String originalTestName = testAssetPrefix - + "linkAssetContentKeySuccess"; - AssetInfo assetInfo = service.create(Asset.create() - .setName(originalTestName) - .setOptions(AssetOption.StorageEncrypted)); - - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.StorageEncryption)); - String contentKeyId = String - .format("nb:kid:UUID:%s", UUID.randomUUID()); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - service.create(ContentKey.create(contentKeyId, - ContentKeyType.StorageEncryption, encryptedContentKey) - .setProtectionKeyId(protectionKeyId)); - service.action(Asset.linkContentKey(assetInfo.getId(), contentKeyId)); - - // Act - service.delete(Asset.unlinkContentKey(assetInfo.getId(), contentKeyId)); - - // Assert - List contentKeys = service.list(ContentKey - .list(assetInfo.getContentKeysLink())); - assertEquals(0, contentKeys.size()); - } - - @Test - public void linkAssetDeliveryPolicySuccess() throws ServiceException, - URISyntaxException, CertificateException { - // Arrange - String originalTestName = testAssetPrefix - + "linkAssetContentKeySuccess"; - AssetDeliveryPolicyInfo adpInfo = service.create(AssetDeliveryPolicy.create() - .setName(originalTestName) - .setAssetDeliveryPolicyType(AssetDeliveryPolicyType.NoDynamicEncryption) - .setAssetDeliveryProtocol(EnumSet.of(AssetDeliveryProtocol.SmoothStreaming))); - - AssetInfo assetInfo = service.create(Asset.create() - .setName(originalTestName) - .setOptions(AssetOption.StorageEncrypted)); - - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.StorageEncryption)); - String contentKeyId = String - .format("nb:kid:UUID:%s", UUID.randomUUID()); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - service.create(ContentKey.create(contentKeyId, - ContentKeyType.StorageEncryption, encryptedContentKey) - .setProtectionKeyId(protectionKeyId)); - service.action(Asset.linkContentKey(assetInfo.getId(), contentKeyId)); - - // Act - service.action(Asset.linkDeliveryPolicy(assetInfo.getId(), adpInfo.getId())); - - // Assert - AssetInfo assetInfo2 = service.get(Asset.get(assetInfo.getId())); - ListResult listResult = service.list(AssetDeliveryPolicy.list(assetInfo2.getDeliveryPoliciesLink())); - assertNotNull(listResult); - assertEquals(listResult.size(), 1); - assertEquals(listResult.get(0).getName(), originalTestName); - assertEquals(listResult.get(0).getAssetDeliveryPolicyType(), AssetDeliveryPolicyType.NoDynamicEncryption); - } - - @Test - public void unlinkAssetDeliveryPolicySuccess() throws ServiceException, - URISyntaxException, CertificateException { - // Arrange - String originalTestName = testAssetPrefix - + "unlinkAssetContentKeySuccess"; - AssetDeliveryPolicyInfo adpInfo = service.create(AssetDeliveryPolicy.create() - .setName(originalTestName) - .setAssetDeliveryPolicyType(AssetDeliveryPolicyType.NoDynamicEncryption) - .setAssetDeliveryProtocol(EnumSet.of(AssetDeliveryProtocol.SmoothStreaming))); - - AssetInfo assetInfo = service.create(Asset.create() - .setName(originalTestName) - .setOptions(AssetOption.StorageEncrypted)); - - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.StorageEncryption)); - String contentKeyId = String - .format("nb:kid:UUID:%s", UUID.randomUUID()); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - service.create(ContentKey.create(contentKeyId, - ContentKeyType.StorageEncryption, encryptedContentKey) - .setProtectionKeyId(protectionKeyId)); - service.action(Asset.linkContentKey(assetInfo.getId(), contentKeyId)); - service.action(Asset.linkDeliveryPolicy(assetInfo.getId(), adpInfo.getId())); - - // Act - service.delete(Asset.unlinkDeliveryPolicy(assetInfo.getId(), adpInfo.getId())); - - // Assert - AssetInfo assetInfo2 = service.get(Asset.get(assetInfo.getId())); - ListResult listResult = service.list(AssetDeliveryPolicy.list(assetInfo2.getDeliveryPoliciesLink())); - assertNotNull(listResult); - assertEquals(listResult.size(), 0); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ContentKeyIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ContentKeyIntegrationTest.java deleted file mode 100644 index cc6d0431318e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ContentKeyIntegrationTest.java +++ /dev/null @@ -1,518 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; - -import java.io.ByteArrayInputStream; -import java.net.URI; -import java.net.URL; -import java.net.URLDecoder; -import java.net.URLEncoder; -import java.security.PrivateKey; -import java.security.Security; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.core.utils.Base64; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.ContentKey; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicy; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyInfo; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyOption; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyOptionInfo; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyRestriction; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType; -import com.microsoft.windowsazure.services.media.models.ContentKeyDeliveryType; -import com.microsoft.windowsazure.services.media.models.ContentKeyInfo; -import com.microsoft.windowsazure.services.media.models.ContentKeyType; -import com.microsoft.windowsazure.services.media.models.ProtectionKey; -import com.microsoft.windowsazure.services.media.models.ProtectionKeyType; - -public class ContentKeyIntegrationTest extends IntegrationTestBase { - - private final String validButNonexistContentKeyId = "nb:kid:UUID:80dfe751-e5a1-4b29-a992-4a75276473af"; - private final ContentKeyType testContentKeyType = ContentKeyType.CommonEncryption; - private final String testEncryptedContentKey = "bFE4M/kZrKi00AoLOVpbQ4R9xja5P/pfBv9SC9I1Gw8yx+OIWdazGNpT7MgpeOLSebkxO5iDAIUKX5Es6oRUiH6pTNAMEtiHFBrKywODKnTQ09pCAMmdIA4q1gLeEUpsXPY/YXaLsTrBGbmRtlUYyaZEjestsngV8JpkJemCGjmMF0bHCoQRKt0LCVl/cqyWawzBuyaJniUCDdU8jem7sjrw8BbgCDmTAUmaj9TYxEP98d3wEJcL4pzDzOloYWXqzNB9assXgcQ0eouT7onSHa1d76X2E5q16AIIoOndLyIuAxlwFqpzF6LFy3X9mNGEY1iLXeFA89DE0PPx8EHtyg=="; - - private void assertByteArrayEquals(byte[] source, byte[] target) { - assertEquals(source.length, target.length); - for (int i = 0; i < source.length; i++) { - assertEquals(source[i], target[i]); - } - } - - private ContentKeyInfo createTestContentKey(String contentKeyNameSuffix) - throws ServiceException { - String testContentKeyId = createRandomContentKeyId(); - String testContentKeyName = testContentKeyPrefix + contentKeyNameSuffix; - - ContentKeyInfo contentKeyInfo = service.create(ContentKey.create( - testContentKeyId, testContentKeyType, testEncryptedContentKey) - .setName(testContentKeyName)); - return contentKeyInfo; - } - - private ContentKeyInfo createValidTestContentKeyWithAesKey( - String contentKeyNameSuffix, byte[] aesKey) throws Exception { - String testContnetKeyName = testContentKeyPrefix + contentKeyNameSuffix; - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.StorageEncryption)); - String protectionKey = service.action(ProtectionKey - .getProtectionKey(protectionKeyId)); - - String testContentKeyIdUuid = UUID.randomUUID().toString(); - String testContentKeyId = String.format("nb:kid:UUID:%s", - testContentKeyIdUuid); - - byte[] encryptedContentKey = EncryptionHelper.encryptSymmetricKey( - protectionKey, aesKey); - String encryptedContentKeyString = Base64.encode(encryptedContentKey); - String checksum = EncryptionHelper.calculateContentKeyChecksum( - testContentKeyIdUuid, aesKey); - - ContentKeyInfo contentKeyInfo = service.create(ContentKey - .create(testContentKeyId, ContentKeyType.StorageEncryption, - encryptedContentKeyString).setChecksum(checksum) - .setProtectionKeyId(protectionKeyId) - .setName(testContnetKeyName)); - - return contentKeyInfo; - } - - private ContentKeyInfo createValidTestContentKey(String contentKeyNameSuffix) - throws Exception { - byte[] aesKey = createTestAesKey(); - return createValidTestContentKeyWithAesKey(contentKeyNameSuffix, aesKey); - } - - private byte[] createTestAesKey() { - byte[] aesKey = new byte[32]; - int i; - for (i = 0; i < 32; i++) { - aesKey[i] = 1; - } - - return aesKey; - } - - private String createRandomContentKeyId() { - UUID uuid = UUID.randomUUID(); - String randomContentKey = String.format("nb:kid:UUID:%s", uuid); - return randomContentKey; - } - - private void verifyInfosEqual(String message, ContentKeyInfo expected, - ContentKeyInfo actual) { - verifyContentKeyProperties(message, expected.getId(), - expected.getContentKeyType(), - expected.getEncryptedContentKey(), expected.getName(), - expected.getProtectionKeyId(), expected.getProtectionKeyType(), - expected.getChecksum(), actual); - } - - private void verifyContentKeyProperties(String message, String id, - ContentKeyType contentKeyType, String encryptedContentKey, - String name, String protectionKeyId, - ProtectionKeyType protectionKeyType, String checksum, - ContentKeyInfo actual) { - assertNotNull(message, actual); - assertEquals(message + " Id", id, actual.getId()); - assertEquals(message + " ContentKeyType", contentKeyType, - actual.getContentKeyType()); - assertEquals(message + " EncryptedContentKey", encryptedContentKey, - actual.getEncryptedContentKey()); - assertEquals(message + " Name", name, actual.getName()); - assertEquals(message + " ProtectionKeyId", protectionKeyId, - actual.getProtectionKeyId()); - assertEquals(message + " ProtectionKeyType", protectionKeyType, - actual.getProtectionKeyType()); - assertEquals(message + " Checksum", checksum, actual.getChecksum()); - } - - @BeforeClass - public static void Setup() { - Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); - } - - @Test - public void canCreateContentKey() throws Exception { - // Arrange - String testCanCreateContentKeyId = createRandomContentKeyId(); - String testCanCreateContentKeyName = testContentKeyPrefix - + "testCanCreateContentKey"; - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(testContentKeyType)); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - // Act - ContentKeyInfo contentKeyInfo = service.create(ContentKey - .create(testCanCreateContentKeyId, testContentKeyType, encryptedContentKey) - .setName(testCanCreateContentKeyName) - .setProtectionKeyId(protectionKeyId)); - - // Assert - verifyContentKeyProperties("ContentKey", testCanCreateContentKeyId, - testContentKeyType, encryptedContentKey, - testCanCreateContentKeyName, protectionKeyId, - ProtectionKeyType.fromCode(0), "", contentKeyInfo); - } - - @Test - public void canGetSingleContentKeyById() throws Exception { - // Arrange - String expectedName = testContentKeyPrefix + "GetOne"; - String testGetSingleContentKeyByIdId = createRandomContentKeyId(); - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(testContentKeyType)); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - ContentKeyInfo ContentKeyToGet = service.create(ContentKey - .create(testGetSingleContentKeyByIdId, testContentKeyType, encryptedContentKey) - .setName(expectedName) - .setProtectionKeyId(protectionKeyId)); - - // Act - ContentKeyInfo retrievedContentKeyInfo = service.get(ContentKey - .get(ContentKeyToGet.getId())); - - // Assert - assertEquals(ContentKeyToGet.getId(), retrievedContentKeyInfo.getId()); - verifyContentKeyProperties("ContentKey", testGetSingleContentKeyByIdId, - testContentKeyType, encryptedContentKey, expectedName, - protectionKeyId, ProtectionKeyType.fromCode(0), "", - retrievedContentKeyInfo); - } - - @Test - public void cannotGetSingleContentKeyByInvalidId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.get(ContentKey.get(invalidId)); - } - - @Test - public void canRetrieveListOfContentKeys() throws Exception { - // Arrange - String[] ContentKeyNames = new String[] { - testContentKeyPrefix + "ListOne", - testContentKeyPrefix + "ListTwo" }; - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(testContentKeyType)); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - List expectedContentKeys = new ArrayList(); - for (int i = 0; i < ContentKeyNames.length; i++) { - String testCanRetrieveListOfContentKeysId = createRandomContentKeyId(); - ContentKeyInfo contentKey = service.create(ContentKey.create( - testCanRetrieveListOfContentKeysId, testContentKeyType, encryptedContentKey) - .setProtectionKeyId(protectionKeyId)); - expectedContentKeys.add(contentKey); - } - - // Act - List actualContentKeys = service - .list(ContentKey.list()); - - // Assert - verifyListResultContains("listContentKeyss", expectedContentKeys, - actualContentKeys, new ComponentDelegate() { - @Override - public void verifyEquals(String message, Object expected, - Object actual) { - verifyInfosEqual(message, (ContentKeyInfo) expected, - (ContentKeyInfo) actual); - } - }); - } - - @Test - public void canUseQueryParametersWhenListingContentKeys() throws Exception { - // Arrange - String[] ContentKeyNames = new String[] { - testContentKeyPrefix + "ListThree", - testContentKeyPrefix + "ListFour", - testContentKeyPrefix + "ListFive", - testContentKeyPrefix + "ListSix", - testContentKeyPrefix + "ListSeven" }; - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(testContentKeyType)); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - List expectedContentKeys = new ArrayList(); - for (int i = 0; i < ContentKeyNames.length; i++) { - ContentKeyInfo contentKeyInfo = service.create(ContentKey.create( - createRandomContentKeyId(), testContentKeyType, encryptedContentKey) - .setProtectionKeyId(protectionKeyId)); - expectedContentKeys.add(contentKeyInfo); - } - - // Act - List actualContentKeys = service.list(ContentKey.list() - .setTop(2)); - - // Assert - assertEquals(2, actualContentKeys.size()); - } - - @Test - public void canDeleteContentKeyById() throws Exception { - // Arrange - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(testContentKeyType)); - String contentKeyName = testContentKeyPrefix + "ToDelete"; - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - ContentKeyInfo contentKeyToDelete = service.create(ContentKey - .create(createRandomContentKeyId(), testContentKeyType, encryptedContentKey) - .setName(contentKeyName) - .setProtectionKeyId(protectionKeyId)); - List listContentKeysResult = service.list(ContentKey - .list()); - int ContentKeyCountBaseline = listContentKeysResult.size(); - - // Act - service.delete(ContentKey.delete(contentKeyToDelete.getId())); - - // Assert - listContentKeysResult = service.list(ContentKey.list()); - assertEquals("listPoliciesResult.size", ContentKeyCountBaseline - 1, - listContentKeysResult.size()); - - for (ContentKeyInfo contentKey : service.list(ContentKey.list())) { - assertFalse(contentKeyToDelete.getId().equals(contentKey.getId())); - } - - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.get(ContentKey.get(contentKeyToDelete.getId())); - } - - @Test - public void cannotDeleteContentKeyByInvalidId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.delete(ContentKey.delete(invalidId)); - } - - @Test - public void cannotDeleteContentKeyByNonexistId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.delete(ContentKey.delete(validButNonexistContentKeyId)); - } - - @Test - public void rebindContentKeyNoX509CertificateSuccess() throws Exception { - - ContentKeyInfo contentKeyInfo = createValidTestContentKey("rebindContentKeyNoX509Success"); - - String contentKey = service.action(ContentKey.rebind(contentKeyInfo - .getId())); - assertNotNull(contentKey); - - } - - @Test - public void rebindInvalidContentKeyNoX509CertificateFail() - throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - ContentKeyInfo contentKeyInfo = createTestContentKey("rebindInvalidContentKeyNoX509Fail"); - - service.action(ContentKey.rebind(contentKeyInfo.getId())); - - } - - @Test - public void rebindContentKeyWithX509CertficateSuccess() throws Exception { - Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); - byte[] aesKey = createTestAesKey(); - ContentKeyInfo contentKeyInfo = createValidTestContentKeyWithAesKey( - "rebindContentKeyWithX509Success", aesKey); - URL serverCertificateUri = getClass().getResource( - "/certificate/server.crt"); - X509Certificate x509Certificate = EncryptionHelper - .loadX509Certificate(URLDecoder.decode( - serverCertificateUri.getFile(), "UTF-8")); - URL serverPrivateKey = getClass() - .getResource("/certificate/server.der"); - PrivateKey privateKey = EncryptionHelper.getPrivateKey(URLDecoder - .decode(serverPrivateKey.getFile(), "UTF-8")); - - String rebindedContentKey = service.action(ContentKey.rebind( - contentKeyInfo.getId(), URLEncoder.encode( - Base64.encode(x509Certificate.getEncoded()), "UTF-8"))); - byte[] decryptedAesKey = EncryptionHelper.decryptSymmetricKey( - rebindedContentKey, privateKey); - assertByteArrayEquals(aesKey, decryptedAesKey); - } - - @Test - public void rebindContentKeyWithIncorrectContentKeyIdFailed() - throws ServiceException { - expectedException.expect(ServiceException.class); - service.action(ContentKey.rebind("invalidContentKeyId")); - } - - @Test - public void rebindContentKeyWithIncorrectX509CertificateFailed() - throws ServiceException { - expectedException.expect(ServiceException.class); - ContentKeyInfo contentKeyInfo = createTestContentKey("rebindContentKeyWithIncorrectX509CertficateFailed"); - - service.action(ContentKey.rebind(contentKeyInfo.getId(), - "InvalidX509Certificate")); - } - - @Test - public void canSetContentKeyAuthorizationPolicySuccess() throws Exception { - // Arrange - String testCanCreateContentKeyId = createRandomContentKeyId(); - String testCanCreateContentKeyName = testContentKeyPrefix - + "testSetContentKeyAuthorizationPolicy"; - - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.EnvelopeEncryption)); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - ContentKeyInfo contentKeyInfo = service.create(ContentKey - .create(testCanCreateContentKeyId, ContentKeyType.EnvelopeEncryption, encryptedContentKey) - .setName(testCanCreateContentKeyName) - .setProtectionKeyId(protectionKeyId)); - List restrictions = new ArrayList(); - restrictions.add(new ContentKeyAuthorizationPolicyRestriction(testCanCreateContentKeyName, ContentKeyRestrictionType.Open.getValue(), null)); - ContentKeyAuthorizationPolicyOptionInfo contentKeyAuthPoliceOptionInfo = service.create( - ContentKeyAuthorizationPolicyOption.create(testCanCreateContentKeyName, - ContentKeyDeliveryType.BaselineHttp.getCode(), null, restrictions)); - ContentKeyAuthorizationPolicyInfo contentKeyAuthorizationPolicyInfo = service.create( - ContentKeyAuthorizationPolicy.create(testCanCreateContentKeyName)); - service.action(ContentKeyAuthorizationPolicy.linkOptions(contentKeyAuthorizationPolicyInfo.getId(), contentKeyAuthPoliceOptionInfo.getId())); - - // Act - service.update(ContentKey.update(contentKeyInfo.getId(), contentKeyAuthorizationPolicyInfo.getId())); - - // Assert - ContentKeyInfo contentKeyInfo2 = service.get(ContentKey.get(contentKeyInfo.getId())); - assertNotNull(contentKeyInfo2); - assertEquals(contentKeyInfo2.getName(), contentKeyInfo.getName()); - assertEquals(contentKeyInfo2.getAuthorizationPolicyId(), contentKeyAuthorizationPolicyInfo.getId()); - } - - @Test - public void canGetDeliveryUrlSuccess() throws Exception { - // Arrange - String testCanCreateContentKeyId = createRandomContentKeyId(); - String testCanCreateContentKeyName = testContentKeyPrefix - + "testGetDeliveryUrl"; - - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.EnvelopeEncryption)); - - // Create a new ContentKey (secure random) - byte[] contentKeyData = new byte[16]; - EncryptionUtils.eraseKey(contentKeyData); - String protectionKey = service.action(ProtectionKey.getProtectionKey(protectionKeyId)); - X509Certificate certificate = (X509Certificate) CertificateFactory.getInstance("X.509") - .generateCertificate(new ByteArrayInputStream(Base64.decode(protectionKey))); - - byte[] encryptedContentKeyBin = EncryptionUtils.encryptSymmetricKeyData(certificate, contentKeyData); - String encryptedContentKey = Base64.encode(encryptedContentKeyBin); - - ContentKeyInfo contentKeyInfo = service.create(ContentKey - .create(testCanCreateContentKeyId, ContentKeyType.EnvelopeEncryption, encryptedContentKey) - .setName(testCanCreateContentKeyName) - .setProtectionKeyId(protectionKeyId)); - List restrictions = new ArrayList(); - restrictions.add(new ContentKeyAuthorizationPolicyRestriction(testCanCreateContentKeyName, ContentKeyRestrictionType.Open.getValue(), null)); - ContentKeyAuthorizationPolicyOptionInfo contentKeyAuthPoliceOptionInfo = service.create( - ContentKeyAuthorizationPolicyOption.create(testCanCreateContentKeyName, - ContentKeyDeliveryType.BaselineHttp.getCode(), null, restrictions)); - ContentKeyAuthorizationPolicyInfo contentKeyAuthorizationPolicyInfo = service.create( - ContentKeyAuthorizationPolicy.create(testCanCreateContentKeyName)); - service.action(ContentKeyAuthorizationPolicy.linkOptions(contentKeyAuthorizationPolicyInfo.getId(), contentKeyAuthPoliceOptionInfo.getId())); - - // Act - String acquisitionUrlString = service - .create(ContentKey.getKeyDeliveryUrl(contentKeyInfo.getId(), ContentKeyDeliveryType.BaselineHttp)); - - // Assert - URI acquisitionUrl = URI.create(acquisitionUrlString); - assertNotNull(acquisitionUrl); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncodingReservedUnitTypeIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncodingReservedUnitTypeIntegrationTest.java deleted file mode 100644 index bf170c72fa50..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncodingReservedUnitTypeIntegrationTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.EncodingReservedUnit; -import com.microsoft.windowsazure.services.media.models.EncodingReservedUnitInfo; -import com.microsoft.windowsazure.services.media.models.EncodingReservedUnitType; -import com.microsoft.windowsazure.services.media.models.OperationState; - -public class EncodingReservedUnitTypeIntegrationTest extends IntegrationTestBase { - private static EncodingReservedUnitInfo encodingReservedUnitInfo; - - @BeforeClass - public static void beforeTesting() throws ServiceException { - encodingReservedUnitInfo = service.get(EncodingReservedUnit.get()); - } - - @AfterClass - public static void afterTesting() throws ServiceException { - String opId = service.update(EncodingReservedUnit.update(encodingReservedUnitInfo) - .setCurrentReservedUnits(encodingReservedUnitInfo.getCurrentReservedUnits()) - .setReservedUnitType(encodingReservedUnitInfo.getReservedUnitType())); - - OperationUtils.await(service, opId); - } - - @Test - public void getEncodingReservedUnitType() throws Exception { - // Arrange - // Act - EncodingReservedUnitInfo encodingReservedUnitInfo = service.get(EncodingReservedUnit.get()); - - // Assert - assertNotNull(encodingReservedUnitInfo); - } - - @Test - public void updateCurrentEncodingReservedUnits() throws Exception { - // Arrange - int expectedReservedUnits = 2; - EncodingReservedUnitInfo encodingReservedUnitInfo = service.get(EncodingReservedUnit.get()); - assertNotNull(encodingReservedUnitInfo); - - // Act - String opId = service.update(EncodingReservedUnit.update(encodingReservedUnitInfo) - .setCurrentReservedUnits(expectedReservedUnits)); - - OperationState state = OperationUtils.await(service, opId); - - encodingReservedUnitInfo = service.get(EncodingReservedUnit.get()); - - // Assert - assertEquals(OperationState.Succeeded, state); - assertNotNull(encodingReservedUnitInfo); - assertEquals(encodingReservedUnitInfo.getCurrentReservedUnits(), expectedReservedUnits); - } - - @Test - public void updateTypeofEncodingReservedUnits() throws Exception { - // Arrange - EncodingReservedUnitType expectedReservedUnitType = EncodingReservedUnitType.Standard; - EncodingReservedUnitInfo encodingReservedUnitInfo = service.get(EncodingReservedUnit.get()); - assertNotNull(encodingReservedUnitInfo); - - // Act - String opId = service.update(EncodingReservedUnit.update(encodingReservedUnitInfo) - .setReservedUnitType(expectedReservedUnitType)); - - OperationState state = OperationUtils.await(service, opId); - - encodingReservedUnitInfo = service.get(EncodingReservedUnit.get()); - - // Assert - assertEquals(OperationState.Succeeded, state); - assertNotNull(encodingReservedUnitInfo); - assertEquals(encodingReservedUnitInfo.getReservedUnitType(), expectedReservedUnitType); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncryptionHelper.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncryptionHelper.java deleted file mode 100644 index ecf9f4727d27..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncryptionHelper.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import java.io.ByteArrayInputStream; -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.security.Key; -import java.security.KeyFactory; -import java.security.PrivateKey; -import java.security.SecureRandom; -import java.security.cert.Certificate; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.security.spec.PKCS8EncodedKeySpec; - -import javax.crypto.Cipher; -import javax.crypto.CipherInputStream; -import javax.crypto.spec.IvParameterSpec; -import javax.crypto.spec.SecretKeySpec; - -import com.microsoft.windowsazure.core.utils.Base64; - -class EncryptionHelper { - public static boolean canUseStrongCrypto() { - try { - Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); - SecretKeySpec secretKeySpec = new SecretKeySpec(new byte[32], "AES"); - cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec); - } catch (Exception e) { - return false; - } - return true; - } - - public static byte[] encryptSymmetricKey(String protectionKey, - byte[] inputData) throws Exception { - byte[] protectionKeyBytes = Base64.decode(protectionKey); - return encryptSymmetricKey(protectionKeyBytes, inputData); - } - - public static byte[] encryptSymmetricKey(byte[] protectionKey, - byte[] inputData) throws Exception { - CertificateFactory certificateFactory = CertificateFactory - .getInstance("X.509"); - ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream( - protectionKey); - Certificate certificate = certificateFactory - .generateCertificate(byteArrayInputStream); - return encryptSymmetricKey(certificate, inputData); - } - - public static byte[] encryptSymmetricKey(Certificate certificate, - byte[] inputData) throws Exception { - Cipher cipher = Cipher.getInstance( - "RSA/None/OAEPWithSHA1AndMGF1Padding", "BC"); - Key publicKey = certificate.getPublicKey(); - SecureRandom secureRandom = new SecureRandom(); - cipher.init(Cipher.ENCRYPT_MODE, publicKey, secureRandom); - byte[] cipherText = cipher.doFinal(inputData); - return cipherText; - } - - public static String calculateContentKeyChecksum(String uuid, byte[] aesKey) - throws Exception { - Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); - SecretKeySpec secretKeySpec = new SecretKeySpec(aesKey, "AES"); - cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec); - byte[] encryptionResult = cipher.doFinal(uuid.getBytes("UTF8")); - byte[] checksumByteArray = new byte[8]; - System.arraycopy(encryptionResult, 0, checksumByteArray, 0, 8); - String checksum = Base64.encode(checksumByteArray); - return checksum; - } - - public static InputStream encryptFile(InputStream inputStream, byte[] key, - byte[] iv) throws Exception { - Cipher cipher = Cipher.getInstance("AES/CTR/NoPadding"); - SecretKeySpec keySpec = new SecretKeySpec(key, "AES"); - IvParameterSpec ivParameterSpec = new IvParameterSpec(iv); - cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivParameterSpec); - CipherInputStream cipherInputStream = new CipherInputStream( - inputStream, cipher); - return cipherInputStream; - } - - public static byte[] decryptSymmetricKey(String encryptedContent, - PrivateKey privateKey) throws Exception { - byte[] encryptedContentByteArray = Base64.decode(encryptedContent); - return decryptSymmetricKey(encryptedContentByteArray, privateKey); - } - - public static byte[] decryptSymmetricKey(byte[] encryptedContent, - PrivateKey privateKey) throws Exception { - if (encryptedContent == null) { - throw new IllegalArgumentException( - "The encrypted content cannot be null."); - } - - if (encryptedContent.length == 0) { - throw new IllegalArgumentException( - "The encrypted content cannot be empty."); - } - - if (privateKey == null) { - throw new IllegalArgumentException( - "The private key cannot be null."); - } - - Cipher cipher = Cipher.getInstance( - "RSA/ECB/OAEPWithSHA1AndMGF1Padding", "BC"); - cipher.init(Cipher.DECRYPT_MODE, privateKey); - byte[] decrypted = cipher.doFinal(encryptedContent); - return decrypted; - } - - public static X509Certificate loadX509Certificate(String certificateFileName) - throws Exception { - if ((certificateFileName == null) || certificateFileName.isEmpty()) { - throw new IllegalArgumentException( - "certificate file name cannot be null or empty."); - } - - CertificateFactory certificateFactory = CertificateFactory - .getInstance("X.509"); - FileInputStream certificateInputStream = new FileInputStream( - certificateFileName); - X509Certificate x509Certificate = (X509Certificate) certificateFactory - .generateCertificate(certificateInputStream); - return x509Certificate; - } - - public static PrivateKey getPrivateKey(String certificateFileName) - throws Exception { - if ((certificateFileName == null) || certificateFileName.isEmpty()) { - throw new IllegalArgumentException( - "certificate file name cannot be null or empty."); - } - - File file = new File(certificateFileName); - FileInputStream fis = new FileInputStream(file); - DataInputStream dataInputStream = new DataInputStream(fis); - byte[] keyBytes = new byte[(int) file.length()]; - dataInputStream.readFully(keyBytes); - dataInputStream.close(); - - PKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec( - keyBytes); - KeyFactory keyFactory = KeyFactory.getInstance("RSA"); - return keyFactory.generatePrivate(pkcs8EncodedKeySpec); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncryptionIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncryptionIntegrationTest.java deleted file mode 100644 index 75e195968f07..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EncryptionIntegrationTest.java +++ /dev/null @@ -1,376 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; - -import java.io.IOException; -import java.io.InputStream; -import java.math.BigInteger; -import java.net.URL; -import java.net.URLDecoder; -import java.security.Key; -import java.security.KeyPair; -import java.security.KeyPairGenerator; -import java.security.PrivateKey; -import java.security.SecureRandom; -import java.security.Security; -import java.security.cert.X509Certificate; -import java.util.EnumSet; -import java.util.List; -import java.util.Random; -import java.util.UUID; - -import javax.crypto.Cipher; - -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.core.utils.Base64; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.AccessPolicy; -import com.microsoft.windowsazure.services.media.models.AccessPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AccessPolicyPermission; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetFile; -import com.microsoft.windowsazure.services.media.models.AssetFileInfo; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.AssetOption; -import com.microsoft.windowsazure.services.media.models.ContentKey; -import com.microsoft.windowsazure.services.media.models.ContentKeyInfo; -import com.microsoft.windowsazure.services.media.models.ContentKeyType; -import com.microsoft.windowsazure.services.media.models.Job; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.JobState; -import com.microsoft.windowsazure.services.media.models.LinkInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.Locator; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; -import com.microsoft.windowsazure.services.media.models.LocatorType; -import com.microsoft.windowsazure.services.media.models.MediaProcessor; -import com.microsoft.windowsazure.services.media.models.MediaProcessorInfo; -import com.microsoft.windowsazure.services.media.models.ProtectionKey; -import com.microsoft.windowsazure.services.media.models.Task; -import com.microsoft.windowsazure.services.media.models.TaskInfo; -import com.microsoft.windowsazure.services.media.models.TaskState; - -public class EncryptionIntegrationTest extends IntegrationTestBase { - private final String storageDecryptionProcessor = "Storage Decryption"; - - private void assertByteArrayEquals(byte[] source, byte[] target) { - assertEquals(source.length, target.length); - for (int i = 0; i < source.length; i++) { - assertEquals(source[i], target[i]); - } - } - - @BeforeClass - public static void Setup() { - Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); - } - - @Test - public void uploadAesProtectedAssetAndDownloadSuccess() throws Exception { - // Arrange - if (!EncryptionHelper.canUseStrongCrypto()) { - throw new UnsupportedOperationException("JVM does not support the required encryption. Please download unlimited strength jurisdiction policy files."); - } - - // Media Services requires 256-bit (32-byte) keys and - // 128-bit (16-byte) initialization vectors (IV) for AES encryption, - // and also requires that only the first 8 bytes of the IV is filled. - Random random = new Random(); - byte[] aesKey = new byte[32]; - random.nextBytes(aesKey); - byte[] effectiveIv = new byte[8]; - random.nextBytes(effectiveIv); - byte[] iv = new byte[16]; - System.arraycopy(effectiveIv, 0, iv, 0, effectiveIv.length); - - InputStream mpeg4H264InputStream = getClass().getResourceAsStream( - "/media/MPEG4-H264.mp4"); - InputStream encryptedContent = EncryptionHelper.encryptFile( - mpeg4H264InputStream, aesKey, iv); - int durationInMinutes = 10; - - // Act - AssetInfo assetInfo = service.create(Asset.create() - .setName(testAssetPrefix + "uploadAesProtectedAssetSuccess") - .setOptions(AssetOption.StorageEncrypted)); - WritableBlobContainerContract blobWriter = getBlobWriter( - assetInfo.getId(), durationInMinutes); - - // gets the public key for storage encryption. - String contentKeyId = createContentKey(aesKey); - - // link the content key with the asset. - service.action(Asset.linkContentKey(assetInfo.getId(), contentKeyId)); - - // upload the encrypted file to the server. - uploadEncryptedAssetFile(assetInfo, blobWriter, "MPEG4-H264.mp4", - encryptedContent, contentKeyId, iv); - - // submit and execute the decoding job. - JobInfo jobInfo = decodeAsset(testJobPrefix - + "uploadAesProtectedAssetSuccess", assetInfo.getId()); - - // assert - LinkInfo taskLinkInfo = jobInfo.getTasksLink(); - List taskInfos = service.list(Task.list(taskLinkInfo)); - for (TaskInfo taskInfo : taskInfos) { - assertEquals(TaskState.Completed, taskInfo.getState()); - ListResult outputs = service.list(Asset.list(taskInfo - .getOutputAssetsLink())); - assertEquals(1, outputs.size()); - } - assertEquals(JobState.Finished, jobInfo.getState()); - - // Verify that the contents match - InputStream expected = getClass().getResourceAsStream( - "/media/MPEG4-H264.mp4"); - - ListResult outputAssets = service.list(Asset.list(jobInfo - .getOutputAssetsLink())); - assertEquals(1, outputAssets.size()); - AssetInfo outputAsset = outputAssets.get(0); - ListResult assetFiles = service.list(AssetFile - .list(assetInfo.getAssetFilesLink())); - assertEquals(1, assetFiles.size()); - AssetFileInfo outputFile = assetFiles.get(0); - - InputStream actual = getFileContents(outputAsset.getId(), - outputFile.getName(), durationInMinutes); - assertStreamsEqual(expected, actual); - } - - @Test - public void testEncryptedContentCanBeDecrypted() throws Exception { - byte[] aesKey = new byte[32]; - for (int i = 0; i < 32; i++) { - aesKey[i] = 1; - } - URL serverCertificateUri = getClass().getResource( - "/certificate/server.crt"); - X509Certificate x509Certificate = EncryptionHelper - .loadX509Certificate(URLDecoder.decode( - serverCertificateUri.getFile(), "UTF-8")); - URL serverPrivateKey = getClass() - .getResource("/certificate/server.der"); - PrivateKey privateKey = EncryptionHelper.getPrivateKey(URLDecoder - .decode(serverPrivateKey.getFile(), "UTF-8")); - byte[] encryptedAesKey = EncryptionHelper.encryptSymmetricKey( - x509Certificate, aesKey); - byte[] decryptedAesKey = EncryptionHelper.decryptSymmetricKey( - encryptedAesKey, privateKey); - - assertByteArrayEquals(aesKey, decryptedAesKey); - } - - @Test - public void testEncryptedContentCanBeDecryptedUsingPreGeneratedKeyPair() - throws Exception { - byte[] input = "abc".getBytes(); - Cipher cipher = Cipher.getInstance( - "RSA/ECB/OAEPWithSHA1AndMGF1Padding", "BC"); - SecureRandom random = new SecureRandom(); - URL serverCertificateUri = getClass().getResource( - "/certificate/server.crt"); - X509Certificate x509Certificate = EncryptionHelper - .loadX509Certificate(URLDecoder.decode( - serverCertificateUri.getFile(), "UTF-8")); - URL serverPrivateKey = getClass() - .getResource("/certificate/server.der"); - PrivateKey privateKey = EncryptionHelper.getPrivateKey(URLDecoder - .decode(serverPrivateKey.getFile(), "UTF-8")); - Key pubKey = x509Certificate.getPublicKey(); - cipher.init(Cipher.ENCRYPT_MODE, pubKey, random); - byte[] cipherText = cipher.doFinal(input); - cipher.init(Cipher.DECRYPT_MODE, privateKey); - - // Act - byte[] plainText = cipher.doFinal(cipherText); - - // Assert - assertByteArrayEquals(input, plainText); - } - - @Test - public void testEncryptionDecryptionFunctionUsingGeneratedKeyPair() - throws Exception { - // Arrange - byte[] input = "abc".getBytes(); - Cipher cipher = Cipher.getInstance( - "RSA/ECB/OAEPWithSHA1AndMGF1Padding", "BC"); - SecureRandom random = new SecureRandom(); - KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA", "BC"); - generator.initialize(386, random); - KeyPair pair = generator.generateKeyPair(); - Key pubKey = pair.getPublic(); - Key privKey = pair.getPrivate(); - cipher.init(Cipher.ENCRYPT_MODE, pubKey, random); - byte[] cipherText = cipher.doFinal(input); - cipher.init(Cipher.DECRYPT_MODE, privKey); - - // Act - byte[] plainText = cipher.doFinal(cipherText); - - // Assert - assertByteArrayEquals(input, plainText); - } - - private JobInfo decodeAsset(String name, String inputAssetId) - throws ServiceException, InterruptedException { - MediaProcessorInfo mediaProcessorInfo = service.list( - MediaProcessor.list().set("$filter", - "Name eq '" + storageDecryptionProcessor + "'")).get(0); - - String taskBody = "" - + "JobInputAsset(0)JobOutputAsset(0)"; - JobInfo jobInfo = service.create(Job - .create() - .addInputMediaAsset(inputAssetId) - .addTaskCreator( - Task.create(mediaProcessorInfo.getId(), taskBody) - .setName(name))); - - JobInfo currentJobInfo = jobInfo; - int retryCounter = 0; - while (currentJobInfo.getState().getCode() < 3 && retryCounter < 30) { - Thread.sleep(10000); - currentJobInfo = service.get(Job.get(jobInfo.getId())); - retryCounter++; - } - return currentJobInfo; - } - - private String createContentKey(byte[] aesKey) throws ServiceException, - Exception { - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.StorageEncryption)); - String protectionKey = service.action(ProtectionKey - .getProtectionKey(protectionKeyId)); - - String contentKeyIdUuid = UUID.randomUUID().toString(); - String contentKeyId = String.format("nb:kid:UUID:%s", contentKeyIdUuid); - - byte[] encryptedContentKey = EncryptionHelper.encryptSymmetricKey( - protectionKey, aesKey); - String encryptedContentKeyString = Base64.encode(encryptedContentKey); - String checksum = EncryptionHelper.calculateContentKeyChecksum( - contentKeyIdUuid, aesKey); - - ContentKeyInfo contentKeyInfo = service.create(ContentKey - .create(contentKeyId, ContentKeyType.StorageEncryption, - encryptedContentKeyString).setChecksum(checksum) - .setProtectionKeyId(protectionKeyId)); - return contentKeyInfo.getId(); - } - - private void uploadEncryptedAssetFile(AssetInfo asset, - WritableBlobContainerContract blobWriter, String blobName, - InputStream blobContent, String encryptionKeyId, byte[] iv) - throws ServiceException { - blobWriter.createBlockBlob(blobName, blobContent); - service.action(AssetFile.createFileInfos(asset.getId())); - ListResult files = service.list(AssetFile.list( - asset.getAssetFilesLink()).set("$filter", - "Name eq '" + blobName + "'")); - assertEquals(1, files.size()); - AssetFileInfo file = files.get(0); - byte[] sub = new byte[9]; - // Offset bytes to ensure that the sign-bit is not set. - // Media Services expects unsigned Int64 values. - System.arraycopy(iv, 0, sub, 1, 8); - BigInteger longIv = new BigInteger(sub); - String initializationVector = longIv.toString(); - - service.update(AssetFile.update(file.getId()).setIsEncrypted(true) - .setEncryptionKeyId(encryptionKeyId) - .setEncryptionScheme("StorageEncryption") - .setEncryptionVersion("1.0") - .setInitializationVector(initializationVector)); - } - - private WritableBlobContainerContract getBlobWriter(String assetId, - int durationInMinutes) throws ServiceException { - AccessPolicyInfo accessPolicyInfo = service.create(AccessPolicy.create( - testPolicyPrefix + "uploadAesPortectedAssetSuccess", - durationInMinutes, EnumSet.of(AccessPolicyPermission.WRITE))); - - // creates locator for the input media asset - LocatorInfo locatorInfo = service.create(Locator.create( - accessPolicyInfo.getId(), assetId, LocatorType.SAS)); - WritableBlobContainerContract blobWriter = service - .createBlobWriter(locatorInfo); - return blobWriter; - } - - private InputStream getFileContents(String assetId, String fileName, - int availabilityWindowInMinutes) throws ServiceException, - InterruptedException, IOException { - AccessPolicyInfo readAP = service.create(AccessPolicy.create( - testPolicyPrefix + "tempAccessPolicy", - availabilityWindowInMinutes, - EnumSet.of(AccessPolicyPermission.READ))); - LocatorInfo readLocator = service.create(Locator.create(readAP.getId(), - assetId, LocatorType.SAS)); - URL file = new URL(readLocator.getBaseUri() + "/" + fileName - + readLocator.getContentAccessToken()); - - // There can be a delay before a new read locator is applied for the - // asset files. - InputStream reader = null; - for (int counter = 0; true; counter++) { - try { - reader = file.openConnection().getInputStream(); - break; - } catch (IOException e) { - System.out.println("Got error, wait a bit and try again"); - if (counter < 6) { - Thread.sleep(10000); - } else { - // No more retries. - throw e; - } - } - } - - return reader; - } - - private void assertStreamsEqual(InputStream inputStream1, - InputStream inputStream2) throws IOException { - byte[] buffer1 = new byte[1024]; - byte[] buffer2 = new byte[1024]; - try { - while (true) { - int n1 = inputStream1.read(buffer1); - int n2 = inputStream2.read(buffer2); - assertEquals("number of bytes read from streams", n1, n2); - if (n1 == -1) { - break; - } - for (int i = 0; i < n1; i++) { - assertEquals("byte " + i + " read from streams", - buffer1[i], buffer2[i]); - } - } - } finally { - inputStream1.close(); - inputStream2.close(); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EntityProxyTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EntityProxyTest.java deleted file mode 100644 index f9b29118eb6c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/EntityProxyTest.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.util.HashSet; -import java.util.Set; - -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; - -public class EntityProxyTest extends IntegrationTestBase { - private static MediaContract entityService; - - @BeforeClass - public static void entityProxyTestSetup() { - entityService = config.create(MediaContract.class); - } - - @Test - public void canCreateEntityProxy() { - assertNotNull(entityService); - } - - @Test - public void canCreateDefaultAssetEntity() throws Exception { - - AssetInfo asset = entityService.create(Asset.create()); - - assertNotNull(asset.getId()); - } - - @Test - public void canCreateAssetOnServerWithNameAndAltId() throws Exception { - String name = testAssetPrefix + "AName"; - String altId = "unit test alt id"; - - AssetInfo asset = entityService.create(Asset.create().setName(name) - .setAlternateId(altId)); - - assertNotNull(asset.getId()); - assertEquals(name, asset.getName()); - assertEquals(altId, asset.getAlternateId()); - } - - @Test - public void canRetrieveAssetById() throws Exception { - AssetInfo createdAsset = entityService.create(Asset.create().setName( - testAssetPrefix + "canRetrieveAssetById")); - - AssetInfo retrieved = entityService - .get(Asset.get(createdAsset.getId())); - - assertEquals(createdAsset.getId(), retrieved.getId()); - assertEquals(createdAsset.getName(), retrieved.getName()); - - } - - @Test - public void canListAllAssets() throws Exception { - int numAssetsToCreate = 4; - Set expectedAssets = createTestAssets(numAssetsToCreate, - "canList"); - - ListResult assets = entityService.list(Asset.list()); - - assertTrue(assets.size() >= numAssetsToCreate); - - for (AssetInfo asset : assets) { - if (expectedAssets.contains(asset.getId())) { - expectedAssets.remove(asset.getId()); - } - } - assertEquals(0, expectedAssets.size()); - } - - @Test - public void canListAssetsWithQueryParameters() throws Exception { - createTestAssets(4, "withQuery"); - - ListResult assets = entityService.list(Asset.list() - .setTop(2)); - - assertEquals(2, assets.size()); - } - - @Test - public void canUpdateAssetNameAndAltId() throws Exception { - String newName = testAssetPrefix + "newName"; - String newAltId = "updated alt id"; - - AssetInfo initialAsset = entityService.create(Asset.create().setName( - testAssetPrefix + "originalName")); - - entityService.update(Asset.update(initialAsset.getId()) - .setName(newName).setAlternateId(newAltId)); - - AssetInfo updatedAsset = entityService.get(Asset.get(initialAsset - .getId())); - - assertEquals(initialAsset.getId(), updatedAsset.getId()); - assertEquals(newName, updatedAsset.getName()); - assertEquals(newAltId, updatedAsset.getAlternateId()); - } - - @Test - public void canDeleteAssetsById() throws Exception { - int numToDelete = 3; - Set assetsToDelete = createTestAssets(numToDelete, "toDelete"); - - ListResult currentAssets = entityService.list(Asset.list()); - - for (String id : assetsToDelete) { - entityService.delete(Asset.delete(id)); - } - - ListResult afterDeleteAssets = entityService.list(Asset - .list()); - - assertEquals(currentAssets.size() - numToDelete, - afterDeleteAssets.size()); - - for (AssetInfo asset : afterDeleteAssets) { - assetsToDelete.remove(asset.getId()); - } - - assertEquals(numToDelete, assetsToDelete.size()); - } - - private Set createTestAssets(int numAssets, String namePart) - throws Exception { - Set expectedAssets = new HashSet(); - - for (int i = 0; i < numAssets; ++i) { - AssetInfo asset = entityService.create(Asset.create().setName( - testAssetPrefix + namePart + Integer.toString(i))); - expectedAssets.add(asset.getId()); - } - return expectedAssets; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ExportsTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ExportsTest.java deleted file mode 100644 index 2e166db4fb4a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ExportsTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import java.net.URI; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.RedirectFilter; -import com.microsoft.windowsazure.services.media.implementation.ResourceLocationManager; - -/** - * Tests to verify the items exported from media services can be resolved from - * configuration. - * - */ -public class ExportsTest extends IntegrationTestBase { - - @Test - public void canResolveLocationManagerFromConfig() throws Exception { - ResourceLocationManager rlm = config - .create(ResourceLocationManager.class); - URI rootUri = new URI( - (String) config.getProperty(MediaConfiguration.AZURE_AD_API_SERVER)); - - assertEquals(rootUri, rlm.getBaseURI()); - } - - @Test - public void canResolveRedirectFilterFromConfig() throws Exception { - RedirectFilter filter = config.create(RedirectFilter.class); - assertNotNull(filter); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/IntegrationTestBase.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/IntegrationTestBase.java deleted file mode 100644 index 731348634a40..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/IntegrationTestBase.java +++ /dev/null @@ -1,487 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.lang.reflect.Method; -import java.net.URI; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; -import java.util.EnumSet; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.rules.ExpectedException; - -import com.microsoft.windowsazure.Configuration; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.authentication.AzureAdClientSymmetricKey; -import com.microsoft.windowsazure.services.media.authentication.AzureAdTokenCredentials; -import com.microsoft.windowsazure.services.media.authentication.AzureAdTokenProvider; -import com.microsoft.windowsazure.services.media.authentication.AzureEnvironments; -import com.microsoft.windowsazure.services.media.authentication.TokenProvider; -import com.microsoft.windowsazure.services.media.models.AccessPolicy; -import com.microsoft.windowsazure.services.media.models.AccessPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AccessPolicyPermission; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetFile; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.ContentKey; -import com.microsoft.windowsazure.services.media.models.ContentKeyInfo; -import com.microsoft.windowsazure.services.media.models.Job; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.JobState; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.Locator; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; -import com.microsoft.windowsazure.services.media.models.LocatorType; -import com.microsoft.windowsazure.services.media.models.MediaProcessor; -import com.microsoft.windowsazure.services.media.models.MediaProcessorInfo; -import com.microsoft.windowsazure.services.media.models.NotificationEndPoint; -import com.microsoft.windowsazure.services.media.models.NotificationEndPointInfo; -import com.microsoft.windowsazure.services.media.models.StreamingEndpoint; -import com.microsoft.windowsazure.services.media.models.StreamingEndpointInfo; -import com.microsoft.windowsazure.services.media.models.StreamingEndpointState; -import com.microsoft.windowsazure.services.queue.QueueConfiguration; -import com.microsoft.windowsazure.services.queue.QueueContract; -import com.microsoft.windowsazure.services.queue.QueueService; -import com.microsoft.windowsazure.services.queue.models.ListQueuesResult; -import com.microsoft.windowsazure.services.queue.models.ListQueuesResult.Queue; - -public abstract class IntegrationTestBase { - protected static MediaContract service; - protected static QueueContract queueService; - protected static Configuration config; - protected static ExecutorService executorService; - protected static TokenProvider tokenProvider; - - protected static final String testAssetPrefix = "testAsset"; - protected static final String testPolicyPrefix = "testPolicy"; - protected static final String testContentKeyPrefix = "testContentKey"; - protected static final String testJobPrefix = "testJobPrefix"; - protected static final String testQueuePrefix = "testqueueprefix"; - protected static final String testChannelPrefix = "testChannel"; - protected static final String testProgramPrefix = "testProgram"; - protected static final String testNotificationEndPointPrefix = "testNotificationEndPointPrefix"; - protected static final String testStreamingEndPointPrefix = "testSEPPrfx"; - - protected static final String validButNonexistAssetId = "nb:cid:UUID:0239f11f-2d36-4e5f-aa35-44d58ccc0973"; - protected static final String validButNonexistAccessPolicyId = "nb:pid:UUID:38dcb3a0-ef64-4ad0-bbb5-67a14c6df2f7"; - protected static final String validButNonexistLocatorId = "nb:lid:UUID:92a70402-fca9-4aa3-80d7-d4de3792a27a"; - - protected static String MEDIA_ENCODER_MEDIA_PROCESSOR_ID = "nb:mpid:UUID:ff4df607-d419-42f0-bc17-a481b1331e56"; - protected static final String invalidId = "notAValidId"; - - @Rule - public ExpectedException expectedException = ExpectedException.none(); - - @BeforeClass - public static void setup() throws Exception { - executorService = Executors.newFixedThreadPool(5); - config = Configuration.getInstance(); - - String tenant = config.getProperty("media.azuread.test.tenant").toString(); - String clientId = config.getProperty("media.azuread.test.clientid").toString(); - String clientKey = config.getProperty("media.azuread.test.clientkey").toString(); - String apiserver = config.getProperty("media.azuread.test.account_api_uri").toString(); - - // Setup Azure AD Credentials (in this case using username and password) - AzureAdTokenCredentials credentials = new AzureAdTokenCredentials( - tenant, - new AzureAdClientSymmetricKey(clientId, clientKey), - AzureEnvironments.AZURE_CLOUD_ENVIRONMENT); - - tokenProvider = new AzureAdTokenProvider(credentials, executorService); - - // configure the account endpoint and the token provider for injection - config.setProperty(MediaConfiguration.AZURE_AD_API_SERVER, apiserver); - config.setProperty(MediaConfiguration.AZURE_AD_TOKEN_PROVIDER, tokenProvider); - - overrideWithEnv(config, QueueConfiguration.ACCOUNT_KEY, - "media.queue.account.key"); - overrideWithEnv(config, QueueConfiguration.ACCOUNT_NAME, - "media.queue.account.name"); - overrideWithEnv(config, QueueConfiguration.URI, "media.queue.uri"); - - service = MediaService.create(config); - queueService = QueueService.create(config); - - cleanupEnvironment(); - } - - protected static void getLatestMediaProcessorID() throws Exception { - ListResult listMediaProcessorsResult = service - .list(MediaProcessor.list()); - List ps = listMediaProcessorsResult; - double latestVersion = 0.0; - int position = -1; - for (int i = 0; i < ps.size(); i++) { - MediaProcessorInfo mediaProcessorInfo = ps.get(i); - double d = Double.parseDouble(mediaProcessorInfo.getVersion()); - if (d > latestVersion) { - latestVersion = d; - position = i; - } - } - - if (position != -1) { - MEDIA_ENCODER_MEDIA_PROCESSOR_ID = ps.get(position).getId(); - } - } - - protected static void overrideWithEnv(Configuration config, String key) { - String value = System.getenv(key); - if (value == null) - return; - - config.setProperty(key, value); - } - - protected static void overrideWithEnv(Configuration config, String key, - String enviromentKey) { - String value = System.getenv(enviromentKey); - if (value == null) - return; - - config.setProperty(key, value); - } - - @AfterClass - public static void cleanup() throws Exception { - cleanupEnvironment(); - - // shutdown the executor service required by ADAL4J - executorService.shutdown(); - } - - protected static void cleanupEnvironment() { - removeAllTestLocators(); - removeAllTestAssets(); - removeAllTestAccessPolicies(); - removeAllTestJobs(); - removeAllTestContentKeys(); - removeAllTestQueues(); - removeAllTestNotificationEndPoints(); - removeAllTestStreamingEndPoints(); - } - - private static boolean ensureStreamingPointStopped(String streamingEndpointId) throws ServiceException { - StreamingEndpointInfo streamingEndPoint = service.get(StreamingEndpoint.get(streamingEndpointId)); - if (streamingEndPoint.getState().equals(StreamingEndpointState.Stopped)) { - return true; - } - if (streamingEndPoint.getState().equals(StreamingEndpointState.Running)) { - String opid = service.action(StreamingEndpoint.stop(streamingEndpointId)); - OperationUtils.await(service, opid); - return ensureStreamingPointStopped(streamingEndpointId); - } - try { - Thread.sleep(5000); - } catch (InterruptedException e) { - // do nothing - } - return ensureStreamingPointStopped(streamingEndpointId); - } - - private static void removeAllTestStreamingEndPoints() - { - try { - ListResult listStreamingEndpointResult = service.list(StreamingEndpoint.list()); - for (StreamingEndpointInfo streamingEndPoint : listStreamingEndpointResult) { - if (streamingEndPoint.getName().startsWith(testStreamingEndPointPrefix)) { - try { - ensureStreamingPointStopped(streamingEndPoint.getId()); - String operationId = service.delete(StreamingEndpoint.delete(streamingEndPoint.getId())); - if (operationId != null) { - OperationUtils.await(service, operationId); - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - - private static void removeAllTestNotificationEndPoints() - { - try { - ListResult listNotificationEndPointResult = service.list(NotificationEndPoint.list()); - for (NotificationEndPointInfo notificationEndPoint : listNotificationEndPointResult) { - if (notificationEndPoint.getName().startsWith(testNotificationEndPointPrefix)); - try { - service.delete(NotificationEndPoint.delete(notificationEndPoint.getId())); - } catch (Exception e) { - // e.printStackTrace(); - } - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - - private static void removeAllTestQueues() { - try { - ListQueuesResult listQueueResult = queueService.listQueues(); - for (Queue queue : listQueueResult.getQueues()) { - try { - queueService.deleteQueue(queue.getName()); - } catch (Exception e) { - // e.printStackTrace(); - } - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - - private static void removeAllTestContentKeys() { - try { - List contentKeyInfos = service.list(ContentKey - .list()); - - for (ContentKeyInfo contentKeyInfo : contentKeyInfos) { - try { - service.delete(ContentKey.delete(contentKeyInfo.getId())); - } catch (Exception e) { - // e.printStackTrace(); - } - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - - private static void removeAllTestAccessPolicies() { - try { - List policies = service.list(AccessPolicy.list()); - - for (AccessPolicyInfo policy : policies) { - if (policy.getName().startsWith(testPolicyPrefix)) { - service.delete(AccessPolicy.delete(policy.getId())); - } - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - - private static void removeAllTestAssets() { - try { - List listAssetsResult = service.list(Asset.list()); - for (AssetInfo assetInfo : listAssetsResult) { - try { - if (assetInfo.getName().startsWith(testAssetPrefix)) { - service.delete(Asset.delete(assetInfo.getId())); - } else if (assetInfo.getName() - .startsWith("JobOutputAsset(") - && assetInfo.getName().contains(testJobPrefix)) { - // Delete the temp assets associated with Job results. - service.delete(Asset.delete(assetInfo.getId())); - } else if (assetInfo.getName().startsWith("Output")) { - service.delete(Asset.delete(assetInfo.getId())); - } else if (assetInfo.getName().isEmpty()) { - service.delete(Asset.delete(assetInfo.getId())); - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - - private static void removeAllTestLocators() { - try { - ListResult listLocatorsResult = service.list(Locator - .list()); - for (LocatorInfo locatorInfo : listLocatorsResult) { - AssetInfo ai = service.get(Asset.get(locatorInfo.getAssetId())); - if (ai.getName().startsWith(testAssetPrefix)) { - service.delete(Locator.delete(locatorInfo.getId())); - } - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - - private static void removeAllTestJobs() { - try { - ListResult jobs = service.list(Job.list()); - for (JobInfo job : jobs) { - if (job.getName().startsWith(testJobPrefix)) { - // Job can't be deleted when it's state is - // canceling, scheduled,queued or processing - try { - if (isJobBusy(job.getState())) { - service.action(Job.cancel(job.getId())); - job = service.get(Job.get(job.getId())); - } - - int retryCounter = 0; - while (isJobBusy(job.getState()) && retryCounter < 10) { - Thread.sleep(2000); - job = service.get(Job.get(job.getId())); - retryCounter++; - } - - if (!isJobBusy(job.getState())) { - service.delete(Job.delete(job.getId())); - } else { - // Not much to do so except wait. - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - } - } catch (Exception e) { - // e.printStackTrace(); - } - } - - private static boolean isJobBusy(JobState state) { - return state == JobState.Canceling || state == JobState.Scheduled - || state == JobState.Queued || state == JobState.Processing; - } - - interface ComponentDelegate { - void verifyEquals(String message, Object expected, Object actual); - } - - protected static AssetInfo setupAssetWithFile() throws ServiceException { - String name = UUID.randomUUID().toString(); - String testBlobName = "test" + name + ".bin"; - AssetInfo assetInfo = service.create(Asset.create().setName( - testAssetPrefix + name)); - - AccessPolicyInfo accessPolicyInfo = service.create(AccessPolicy.create( - testPolicyPrefix + name, 10, - EnumSet.of(AccessPolicyPermission.WRITE))); - LocatorInfo locator = createLocator(accessPolicyInfo, assetInfo, 5); - WritableBlobContainerContract blobWriter = service - .createBlobWriter(locator); - InputStream blobContent = new ByteArrayInputStream(new byte[] { 4, 8, - 15, 16, 23, 42 }); - blobWriter.createBlockBlob(testBlobName, blobContent); - - service.action(AssetFile.createFileInfos(assetInfo.getId())); - - return assetInfo; - } - - protected static LocatorInfo createLocator(AccessPolicyInfo accessPolicy, - AssetInfo asset, int startDeltaMinutes) throws ServiceException { - - Date now = new Date(); - Date start = new Date(now.getTime() - (startDeltaMinutes * 60 * 1000)); - - return service.create(Locator.create(accessPolicy.getId(), - asset.getId(), LocatorType.SAS).setStartDateTime(start)); - } - - protected void verifyListResultContains(List expectedInfos, - Collection actualInfos, ComponentDelegate delegate) { - verifyListResultContains("", expectedInfos, actualInfos, delegate); - } - - protected void verifyListResultContains(String message, - List expectedInfos, Collection actualInfos, - ComponentDelegate delegate) { - assertNotNull(message + ": actualInfos", actualInfos); - assertTrue( - message - + ": actual size should be same size or larger than expected size", - actualInfos.size() >= expectedInfos.size()); - - List orderedAndFilteredActualInfo = new ArrayList(); - try { - for (T expectedInfo : expectedInfos) { - Method getId = expectedInfo.getClass().getMethod("getId"); - String expectedId = (String) getId.invoke(expectedInfo); - for (T actualInfo : actualInfos) { - if (((String) getId.invoke(actualInfo)).equals(expectedId)) { - orderedAndFilteredActualInfo.add(actualInfo); - break; - } - } - } - } catch (Exception e) { - // Don't worry about problems here. - // e.printStackTrace(); - } - - assertEquals(message - + ": actual filtered size should be same as expected size", - expectedInfos.size(), orderedAndFilteredActualInfo.size()); - - if (delegate != null) { - for (int i = 0; i < expectedInfos.size(); i++) { - delegate.verifyEquals(message - + ": orderedAndFilteredActualInfo " + i, - expectedInfos.get(i), - orderedAndFilteredActualInfo.get(i)); - } - } - } - - protected void assertEqualsNullEmpty(String message, String expected, - String actual) { - if ((expected == null || expected.length() == 0) - && (actual == null || actual.length() == 0)) { - // both nullOrEmpty, so match. - } else { - assertEquals(message, expected, actual); - } - } - - protected void assertDateApproxEquals(Date expected, Date actual) { - assertDateApproxEquals("", expected, actual); - } - - protected void assertDateApproxEquals(String message, Date expected, - Date actual) { - // Default allows for a 2:30 minutes difference in dates, for clock skew, - // network delays, etc. - long deltaInMilliseconds = 150000; - - if (expected == null || actual == null) { - assertEquals(message, expected, actual); - } else { - long diffInMilliseconds = Math.abs(expected.getTime() - - actual.getTime()); - - if (diffInMilliseconds > deltaInMilliseconds) { - assertEquals(message, expected, actual); - } - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/JobIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/JobIntegrationTest.java deleted file mode 100644 index a5bdc5bea3c1..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/JobIntegrationTest.java +++ /dev/null @@ -1,525 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; -import static org.hamcrest.core.Is.is; -import static org.hamcrest.core.AnyOf.anyOf; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.UUID; - -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.EndPointType; -import com.microsoft.windowsazure.services.media.models.ErrorDetail; -import com.microsoft.windowsazure.services.media.models.Job; -import com.microsoft.windowsazure.services.media.models.Job.Creator; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.JobNotificationSubscription; -import com.microsoft.windowsazure.services.media.models.JobState; -import com.microsoft.windowsazure.services.media.models.LinkInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.NotificationEndPoint; -import com.microsoft.windowsazure.services.media.models.NotificationEndPointInfo; -import com.microsoft.windowsazure.services.media.models.TargetJobState; -import com.microsoft.windowsazure.services.media.models.Task; -import com.microsoft.windowsazure.services.media.models.Task.CreateBatchOperation; -import com.microsoft.windowsazure.services.media.models.TaskHistoricalEvent; -import com.microsoft.windowsazure.services.media.models.TaskInfo; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesResult.QueueMessage; - -public class JobIntegrationTest extends IntegrationTestBase { - - private static AssetInfo assetInfo; - - private void verifyJobInfoEqual(String message, JobInfo expected, - JobInfo actual) throws ServiceException { - verifyJobProperties(message, expected.getName(), - expected.getPriority(), expected.getRunningDuration(), - expected.getState(), expected.getTemplateId(), - expected.getCreated(), expected.getLastModified(), - expected.getStartTime(), expected.getEndTime(), null, actual); - } - - private void verifyJobProperties(String message, String testName, - Integer priority, double runningDuration, JobState state, - String templateId, Date created, Date lastModified, Date startTime, - Date endTime, Integer expectedTaskCount, JobInfo actualJob) - throws ServiceException { - assertNotNull(message, actualJob); - - assertNotNull(message + "Id", actualJob.getId()); - - assertEquals(message + " Name", testName, actualJob.getName()); - // comment out due to issue 464 - // assertEquals(message + " Priority", priority, - // actualJob.getPriority()); - assertEquals(message + " RunningDuration", runningDuration, - actualJob.getRunningDuration(), 0.001); - assertEquals(message + " State", state, actualJob.getState()); - assertEqualsNullEmpty(message + " TemplateId", templateId, - actualJob.getTemplateId()); - - assertDateApproxEquals(message + " Created", created, - actualJob.getCreated()); - assertDateApproxEquals(message + " LastModified", lastModified, - actualJob.getLastModified()); - assertDateApproxEquals(message + " StartTime", startTime, - actualJob.getStartTime()); - assertDateApproxEquals(message + " EndTime", endTime, - actualJob.getEndTime()); - - if (expectedTaskCount != null) { - LinkInfo tasksLink = actualJob.getTasksLink(); - ListResult actualTasks = service.list(Task - .list(tasksLink)); - assertEquals(message + " tasks size", expectedTaskCount.intValue(), - actualTasks.size()); - } - } - - private JobNotificationSubscription getJobNotificationSubscription( - String jobNotificationSubscriptionId, TargetJobState targetJobState) { - return new JobNotificationSubscription(jobNotificationSubscriptionId, - targetJobState); - } - - private JobInfo createJob(String name) throws ServiceException { - return service.create(Job.create().setName(name).setPriority(3) - .addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0))); - } - - private CreateBatchOperation getTaskCreator(int outputAssetPosition) { - return Task - .create(MEDIA_ENCODER_MEDIA_PROCESSOR_ID, - "" - + "JobInputAsset(0)" - + "JobOutputAsset(" - + outputAssetPosition + ")" - + "") - .setConfiguration("H.264 256k DSL CBR") - .setName("My encoding Task"); - } - - @BeforeClass - public static void setup() throws Exception { - IntegrationTestBase.setup(); - assetInfo = setupAssetWithFile(); - } - - @Test - public void createJobSuccess() throws ServiceException { - // Arrange - String name = testJobPrefix + "createJobSuccess"; - int priority = 3; - double duration = 0.0; - JobState state = JobState.Queued; - String templateId = null; - Date created = new Date(); - Date lastModified = new Date(); - Date stateTime = null; - Date endTime = null; - - // Act - JobInfo actualJob = service.create(Job.create().setName(name) - .setPriority(priority).addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0))); - - // Assert - verifyJobProperties("actualJob", name, priority, duration, state, - templateId, created, lastModified, stateTime, endTime, 1, - actualJob); - } - - @Test - public void createJobWithFreshMediaContractSuccess() throws ServiceException { - // Arrange - String name = testJobPrefix + "createJobSuccess"; - int priority = 3; - double duration = 0.0; - JobState state = JobState.Queued; - String templateId = null; - Date created = new Date(); - Date lastModified = new Date(); - Date stateTime = null; - Date endTime = null; - - MediaContract freshService = MediaService.create(config); - - // Act - JobInfo actualJob = freshService.create(Job.create().setName(name) - .setPriority(priority).addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0))); - - // Assert - verifyJobProperties("actualJob", name, priority, duration, state, - templateId, created, lastModified, stateTime, endTime, 1, - actualJob); - } - - @Test - public void createJobWithNotificationSuccess() throws ServiceException { - // Arrange - String name = testJobPrefix + "createJobWithNotificationSuccess"; - String queueName = testQueuePrefix + "createjobwithnotificationsuccess"; - int priority = 3; - double duration = 0.0; - JobState state = JobState.Queued; - String templateId = null; - Date created = new Date(); - Date lastModified = new Date(); - Date stateTime = null; - Date endTime = null; - - queueService.createQueue(queueName); - String notificationEndPointName = UUID.randomUUID().toString(); - - service.create(NotificationEndPoint.create(notificationEndPointName, - EndPointType.AzureQueue, queueName)); - ListResult listNotificationEndPointInfos = service - .list(NotificationEndPoint.list()); - String notificationEndPointId = null; - - for (NotificationEndPointInfo notificationEndPointInfo : listNotificationEndPointInfos) { - if (notificationEndPointInfo.getName().equals( - notificationEndPointName)) { - notificationEndPointId = notificationEndPointInfo.getId(); - } - } - - JobNotificationSubscription jobNotificationSubcription = getJobNotificationSubscription( - notificationEndPointId, TargetJobState.All); - - Creator creator = Job.create().setName(name).setPriority(priority) - .addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0)) - .addJobNotificationSubscription(jobNotificationSubcription); - - // Act - JobInfo actualJob = service.create(creator); - - // Assert - JobInfo pendingJobInfo = service.get(Job.get(actualJob.getId())); - int retryCounter = 0; - while (pendingJobInfo.getState() != JobState.Error - && retryCounter < 100) { - try { - Thread.sleep(2000); - } catch (InterruptedException e) { - } - pendingJobInfo = service.get(Job.get(actualJob.getId())); - retryCounter++; - } - verifyJobProperties("actualJob", name, priority, duration, state, - templateId, created, lastModified, stateTime, endTime, 1, - actualJob); - List queueMessages = queueService.peekMessages(queueName) - .getQueueMessages(); - assertEquals(1, queueMessages.size()); - } - - @Test - public void createJobTwoTasksSuccess() throws ServiceException { - // Arrange - String name = testJobPrefix + "createJobSuccess"; - int priority = 3; - double duration = 0.0; - JobState state = JobState.Queued; - String templateId = null; - Date created = new Date(); - Date lastModified = new Date(); - Date stateTime = null; - Date endTime = null; - List tasks = new ArrayList(); - tasks.add(getTaskCreator(0)); - tasks.add(getTaskCreator(1)); - - // Act - JobInfo actualJob = service.create(Job.create().setName(name) - .setPriority(priority).addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(tasks.get(0)).addTaskCreator(tasks.get(1))); - - // Assert - verifyJobProperties("actualJob", name, priority, duration, state, - templateId, created, lastModified, stateTime, endTime, 2, - actualJob); - } - - @Test - public void getJobSuccess() throws ServiceException { - // Arrange - String name = testJobPrefix + "getJobSuccess"; - int priority = 3; - double duration = 0.0; - JobState state = JobState.Queued; - String templateId = null; - String jobId = createJob(name).getId(); - Date created = new Date(); - Date lastModified = new Date(); - Date stateTime = null; - Date endTime = null; - - // Act - JobInfo actualJob = service.get(Job.get(jobId)); - - // Assert - verifyJobProperties("actualJob", name, priority, duration, state, - templateId, created, lastModified, stateTime, endTime, 1, - actualJob); - } - - @Test - public void getJobInvalidIdFailed() throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.get(Job.get(invalidId)); - } - - @Test - public void listJobSuccess() throws ServiceException { - // Arrange - JobInfo jobInfo = createJob(testJobPrefix + "listJobSuccess"); - List jobInfos = new ArrayList(); - jobInfos.add(jobInfo); - ListResult expectedListJobsResult = new ListResult( - jobInfos); - - // Act - ListResult actualListJobResult = service.list(Job.list()); - - // Assert - verifyListResultContains("listJobs", expectedListJobsResult, - actualListJobResult, new ComponentDelegate() { - @Override - public void verifyEquals(String message, Object expected, - Object actual) { - try { - verifyJobInfoEqual(message, (JobInfo) expected, - (JobInfo) actual); - } catch (ServiceException e) { - fail(e.getMessage()); - } - } - }); - } - - @Test - public void canListJobsWithOptions() throws ServiceException { - String[] assetNameSuffixes = new String[] { "A", "B", "C", "D" }; - List expectedJobs = new ArrayList(); - for (String suffix : assetNameSuffixes) { - JobInfo jobInfo = createJob(testJobPrefix + "assetListOptions" - + suffix); - expectedJobs.add(jobInfo); - } - - ListResult listJobsResult = service.list(Job.list().setTop(2)); - - // Assert - assertEquals(2, listJobsResult.size()); - } - - @Test - public void cancelJobSuccess() throws ServiceException { - // Arrange - JobInfo jobInfo = createJob(testJobPrefix + "cancelJobSuccess"); - - // Act - service.action(Job.cancel(jobInfo.getId())); - - // Assert - JobInfo canceledJob = service.get(Job.get(jobInfo.getId())); - assertThat(canceledJob.getState(), anyOf(is(JobState.Canceling), is(JobState.Canceled))); - } - - @Test - public void cancelJobFailedWithInvalidId() throws ServiceException { - // Arrange - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - - // Act - service.action(Job.cancel(invalidId)); - - // Assert - } - - @Test - public void deleteJobSuccess() throws ServiceException, - InterruptedException { - // Arrange - JobInfo jobInfo = createJob(testJobPrefix + "deleteJobSuccess"); - service.action(Job.cancel(jobInfo.getId())); - JobInfo cancellingJobInfo = service.get(Job.get(jobInfo.getId())); - int retryCounter = 0; - while (cancellingJobInfo.getState() == JobState.Canceling - && retryCounter < 100) { - Thread.sleep(2000); - cancellingJobInfo = service.get(Job.get(jobInfo.getId())); - retryCounter++; - } - - // Act - service.delete(Job.delete(jobInfo.getId())); - - // Assert - expectedException.expect(ServiceException.class); - service.get(Job.get(jobInfo.getId())); - - } - - @Test - public void deleteJobInvalidIdFail() throws ServiceException { - // Arrange - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - - // Act - service.delete(Job.delete(invalidId)); - - // Assert - } - - @Test - public void canGetInputOutputAssetsFromJob() throws Exception { - String name = testJobPrefix + "canGetInputOutputAssetsFromJob"; - int priority = 3; - - JobInfo actualJob = service.create(Job.create().setName(name) - .setPriority(priority).addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0))); - - ListResult inputs = service.list(Asset.list(actualJob - .getInputAssetsLink())); - ListResult outputs = service.list(Asset.list(actualJob - .getOutputAssetsLink())); - - assertEquals(1, inputs.size()); - assertEquals(assetInfo.getId(), inputs.get(0).getId()); - - assertEquals(1, outputs.size()); - assertTrue(outputs.get(0).getName().contains(name)); - } - - @Test - public void canGetTasksFromJob() throws Exception { - String name = testJobPrefix + "canGetTaskAssetsFromJob"; - int priority = 3; - - JobInfo actualJob = service.create(Job.create().setName(name) - .setPriority(priority).addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0))); - - ListResult tasks = service.list(Task.list(actualJob - .getTasksLink())); - - assertEquals(1, tasks.size()); - } - - @Test - public void canGetErrorDetailsFromTask() throws Exception { - String name = testJobPrefix + "canGetErrorDetailsFromTask"; - - JobInfo actualJob = service.create(Job.create().setName(name) - .addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0))); - - JobInfo currentJobInfo = actualJob; - int retryCounter = 0; - while (currentJobInfo.getState().getCode() < 3 && retryCounter < 30) { - Thread.sleep(10000); - currentJobInfo = service.get(Job.get(actualJob.getId())); - retryCounter++; - } - - ListResult tasks = service.list(Task.list(actualJob - .getTasksLink())); - TaskInfo taskInfo = tasks.get(0); - List errorDetails = taskInfo.getErrorDetails(); - - assertEquals(1, errorDetails.size()); - ErrorDetail errorDetail = errorDetails.get(0); - assertNotNull(errorDetail.getCode()); - assertNotNull(errorDetail.getMessage()); - } - - @Test - public void canGetInputOutputAssetsFromTask() throws Exception { - String name = testJobPrefix + "canGetInputOutputAssetsFromTask"; - int priority = 3; - - JobInfo actualJob = service.create(Job.create().setName(name) - .setPriority(priority).addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0))); - - ListResult tasks = service.list(Task.list(actualJob - .getTasksLink())); - ListResult inputs = service.list(Asset.list(tasks.get(0) - .getInputAssetsLink())); - ListResult outputs = service.list(Asset.list(tasks.get(0) - .getOutputAssetsLink())); - - assertEquals(1, inputs.size()); - assertEquals(assetInfo.getId(), inputs.get(0).getId()); - - assertEquals(1, outputs.size()); - assertTrue(outputs.get(0).getName().contains(name)); - } - - @Test - public void canGetTaskHistoricalEventsFromTask() throws Exception { - // Arrange - String jobName = testJobPrefix + "canGetTaskHistoricalEventsFromTask"; - int priority = 3; - int retryCounter = 0; - - // Act - JobInfo actualJobInfo = service.create(Job.create().setName(jobName) - .setPriority(priority).addInputMediaAsset(assetInfo.getId()) - .addTaskCreator(getTaskCreator(0))); - - while (actualJobInfo.getState().getCode() < 3 && retryCounter < 30) { - Thread.sleep(10000); - actualJobInfo = service.get(Job.get(actualJobInfo.getId())); - retryCounter++; - } - ListResult tasks = service.list(Task.list(actualJobInfo - .getTasksLink())); - TaskInfo taskInfo = tasks.get(0); - List historicalEvents = taskInfo - .getHistoricalEvents(); - TaskHistoricalEvent historicalEvent = historicalEvents.get(0); - - // Assert - assertTrue(historicalEvents.size() >= 4); - assertNotNull(historicalEvent.getCode()); - assertNotNull(historicalEvent.getTimeStamp()); - assertNull(historicalEvent.getMessage()); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/LocatorIntegrationTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/LocatorIntegrationTests.java deleted file mode 100644 index f5a951214c14..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/LocatorIntegrationTests.java +++ /dev/null @@ -1,356 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import java.util.ArrayList; -import java.util.Date; -import java.util.EnumSet; -import java.util.List; -import java.util.UUID; - -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.AccessPolicy; -import com.microsoft.windowsazure.services.media.models.AccessPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AccessPolicyPermission; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.Locator; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; -import com.microsoft.windowsazure.services.media.models.LocatorType; - -public class LocatorIntegrationTests extends IntegrationTestBase { - - private static AssetInfo assetInfo; - private static AccessPolicyInfo accessPolicyInfo; - private static AccessPolicyInfo accessPolicyInfoRead; - private static int minuteInMS = 60 * 1000; - private static int tenMinutesInMS = 10 * 60 * 1000; - - private void verifyLocatorInfosEqual(String message, LocatorInfo expected, - LocatorInfo actual) { - verifyLocatorProperties(message, expected.getAccessPolicyId(), - expected.getAssetId(), expected.getLocatorType(), - expected.getStartTime(), expected.getId(), expected.getPath(), - actual); - } - - private void verifyLocatorProperties(String message, String accessPolicyId, - String assetId, LocatorType locatorType, Date startTime, - LocatorInfo actualLocator) { - verifyLocatorProperties(message, accessPolicyId, assetId, locatorType, - startTime, null, null, actualLocator); - } - - private void verifyLocatorProperties(String message, String accessPolicyId, - String assetId, LocatorType locatorType, Date startTime, String id, - String path, LocatorInfo actualLocator) { - assertNotNull(message, actualLocator); - assertEquals(message + " accessPolicyId", accessPolicyId, - actualLocator.getAccessPolicyId()); - assertEquals(message + " assetId", assetId, actualLocator.getAssetId()); - assertEquals(message + " locatorType", locatorType, - actualLocator.getLocatorType()); - - assertDateApproxEquals(message + " startTime", startTime, - actualLocator.getStartTime()); - - if (id == null) { - assertNotNull(message + " Id", actualLocator.getId()); - } else { - assertEquals(message + " Id", id, actualLocator.getId()); - } - if (path == null) { - assertNotNull(message + " path", actualLocator.getPath()); - } else { - assertEquals(message + " path", path, actualLocator.getPath()); - } - } - - @BeforeClass - public static void setup() throws Exception { - IntegrationTestBase.setup(); - accessPolicyInfo = service - .create(AccessPolicy.create( - testPolicyPrefix + "ForLocatorTest", 5, - EnumSet.of(AccessPolicyPermission.WRITE))); - accessPolicyInfoRead = service.create(AccessPolicy.create( - testPolicyPrefix + "ForLocatorTestRead", 15, - EnumSet.of(AccessPolicyPermission.READ))); - } - - @Before - public void instanceSetup() throws Exception { - assetInfo = service.create(Asset.create().setName( - testAssetPrefix + "ForLocatorTest")); - } - - @Test - public void createLocatorSuccess() throws ServiceException { - // Arrange - LocatorType locatorType = LocatorType.SAS; - - // Act - LocatorInfo locatorInfo = service.create(Locator.create( - accessPolicyInfoRead.getId(), assetInfo.getId(), locatorType)); - - // Assert - verifyLocatorProperties("locatorInfo", accessPolicyInfoRead.getId(), - assetInfo.getId(), locatorType, null, locatorInfo); - } - - @Test - public void createLocatorWithSpecifiedIdSuccess() throws ServiceException { - // Arrange - LocatorType locatorType = LocatorType.SAS; - - // Act - LocatorInfo locatorInfo = service.create(Locator.create( - accessPolicyInfoRead.getId(), assetInfo.getId(), locatorType) - .setId(String.format("nb:lid:UUID:%s", UUID.randomUUID() - .toString()))); - - // Assert - verifyLocatorProperties("locatorInfo", accessPolicyInfoRead.getId(), - assetInfo.getId(), locatorType, null, locatorInfo); - } - - @Test - public void createLocatorOptionsSetStartTimeSuccess() - throws ServiceException { - // Arrange - Date expectedStartDateTime = new Date(); - expectedStartDateTime.setTime(expectedStartDateTime.getTime() - + tenMinutesInMS); - LocatorType locatorType = LocatorType.SAS; - - // Act - LocatorInfo locatorInfo = service.create(Locator.create( - accessPolicyInfo.getId(), assetInfo.getId(), locatorType) - .setStartDateTime(expectedStartDateTime)); - - // Assert - verifyLocatorProperties("locatorInfo", accessPolicyInfo.getId(), - assetInfo.getId(), locatorType, expectedStartDateTime, - locatorInfo); - } - - @Test - public void getLocatorSuccess() throws ServiceException { - // Arrange - LocatorType locatorType = LocatorType.SAS; - Date expectedStartDateTime = new Date(); - expectedStartDateTime.setTime(expectedStartDateTime.getTime() - + tenMinutesInMS); - - LocatorInfo expectedLocatorInfo = service.create(Locator.create( - accessPolicyInfo.getId(), assetInfo.getId(), locatorType) - .setStartDateTime(expectedStartDateTime)); - - // Act - LocatorInfo actualLocatorInfo = service.get(Locator - .get(expectedLocatorInfo.getId())); - - // Assert - verifyLocatorInfosEqual("actualLocatorInfo", expectedLocatorInfo, - actualLocatorInfo); - } - - @Test - public void getLocatorInvalidId() throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.get(Locator.get(invalidId)); - } - - @Test - public void getLocatorNonexistId() throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.get(Locator.get(validButNonexistLocatorId)); - } - - @Test - public void listLocatorsSuccess() throws ServiceException { - // Arrange - LocatorType locatorType = LocatorType.SAS; - List expectedLocators = new ArrayList(); - for (int i = 0; i < 2; i++) { - expectedLocators.add(service.create(Locator.create( - accessPolicyInfo.getId(), assetInfo.getId(), locatorType))); - } - - // Act - ListResult listLocatorsResult = service.list(Locator - .list()); - - // Assert - assertNotNull(listLocatorsResult); - verifyListResultContains("listLocatorsResult", expectedLocators, - listLocatorsResult, new ComponentDelegate() { - @Override - public void verifyEquals(String message, Object expected, - Object actual) { - verifyLocatorInfosEqual(message, - (LocatorInfo) expected, (LocatorInfo) actual); - } - }); - } - - @Test - public void listLocatorsWithOptions() throws ServiceException { - List expectedLocators = new ArrayList(); - for (int i = 0; i < 5; i++) { - expectedLocators.add(service.create(Locator.create( - accessPolicyInfo.getId(), assetInfo.getId(), - LocatorType.SAS))); - } - - ListResult result = service.list(Locator - .list() - .setTop(3) - .set("$filter", - "(Id eq '" + expectedLocators.get(1).getId() - + "') or (" + "Id eq '" - + expectedLocators.get(3).getId() + "')")); - - assertEquals(2, result.size()); - } - - @Test - public void updateLocatorSuccess() throws ServiceException { - // Arrange - LocatorType locatorType = LocatorType.OnDemandOrigin; - LocatorInfo locatorInfo = service.create(Locator.create( - accessPolicyInfoRead.getId(), assetInfo.getId(), locatorType)); - - Date startTime = new Date(); - startTime.setTime(startTime.getTime() - tenMinutesInMS); - - // Act - service.update(Locator.update(locatorInfo.getId()).setStartDateTime( - startTime)); - LocatorInfo updatedLocatorInfo = service.get(Locator.get(locatorInfo - .getId())); - - // Assert - Date expectedExpiration = new Date(); - expectedExpiration.setTime(startTime.getTime() - + (long) accessPolicyInfoRead.getDurationInMinutes() - * minuteInMS); - - verifyLocatorProperties("updatedLocatorInfo", - locatorInfo.getAccessPolicyId(), locatorInfo.getAssetId(), - locatorInfo.getLocatorType(), startTime, locatorInfo.getId(), - locatorInfo.getPath(), updatedLocatorInfo); - } - - @Test - public void updateLocatorNoChangesSuccess() throws ServiceException { - // Arrange - LocatorType locatorType = LocatorType.OnDemandOrigin; - Date expirationDateTime = new Date(); - expirationDateTime.setTime(expirationDateTime.getTime() - + tenMinutesInMS); - Date startTime = new Date(); - startTime.setTime(startTime.getTime() - tenMinutesInMS); - - LocatorInfo locatorInfo = service.create(Locator.create( - accessPolicyInfoRead.getId(), assetInfo.getId(), locatorType) - .setStartDateTime(startTime)); - - // Act - service.update(Locator.update(locatorInfo.getId())); - LocatorInfo updatedLocatorInfo = service.get(Locator.get(locatorInfo - .getId())); - - // Assert - verifyLocatorInfosEqual("updatedLocatorInfo", locatorInfo, - updatedLocatorInfo); - } - - @Test - public void deleteLocatorSuccess() throws ServiceException { - // Arrange - LocatorType locatorType = LocatorType.SAS; - LocatorInfo locatorInfo = service.create(Locator.create( - accessPolicyInfo.getId(), assetInfo.getId(), locatorType)); - ListResult listLocatorsResult = service.list(Locator - .list()); - int assetCountBaseline = listLocatorsResult.size(); - - // Act - service.delete(Locator.delete(locatorInfo.getId())); - - // Assert - listLocatorsResult = service.list(Locator.list()); - assertEquals("listLocatorsResult.size", assetCountBaseline - 1, - listLocatorsResult.size()); - - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.get(Locator.get(locatorInfo.getId())); - } - - @Test - public void deleteLocatorInvalidIdFailed() throws ServiceException { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.delete(Locator.delete(invalidId)); - } - - @Test - public void canGetLocatorBackFromAsset() throws Exception { - LocatorInfo locator = service.create(Locator.create( - accessPolicyInfo.getId(), assetInfo.getId(), LocatorType.SAS)); - - ListResult locators = service.list(Locator.list(assetInfo - .getLocatorsLink())); - - assertEquals(1, locators.size()); - assertEquals(locator.getId(), locators.get(0).getId()); - - } - - @Test - public void canGetAssetFromLocator() throws Exception { - LocatorInfo locator = service.create(Locator.create( - accessPolicyInfo.getId(), assetInfo.getId(), LocatorType.SAS)); - - AssetInfo asset = service.get(Asset.get(locator.getAssetLink())); - - assertEquals(assetInfo.getId(), asset.getId()); - } - - @Test - public void canGetAccessPolicyFromLocator() throws Exception { - LocatorInfo locator = service.create(Locator.create( - accessPolicyInfo.getId(), assetInfo.getId(), LocatorType.SAS)); - - AccessPolicyInfo accessPolicy = service.get(AccessPolicy.get(locator - .getAccessPolicyLink())); - - assertEquals(accessPolicyInfo.getId(), accessPolicy.getId()); - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/MediaProcessorIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/MediaProcessorIntegrationTest.java deleted file mode 100644 index 83c34ad2da98..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/MediaProcessorIntegrationTest.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.util.List; - -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.MediaProcessor; -import com.microsoft.windowsazure.services.media.models.MediaProcessorInfo; - -public class MediaProcessorIntegrationTest extends IntegrationTestBase { - - private void verifyMediaProcessorInfo(String message, - MediaProcessorInfo mediaProcessorInfo) { - assertEquals(message + " id length", 49, mediaProcessorInfo.getId() - .length()); - assertTrue(message + " name length > 0", mediaProcessorInfo.getName() - .length() > 0); - assertNotNull(message + " description", - mediaProcessorInfo.getDescription()); - assertNotNull(message + " sku", mediaProcessorInfo.getSku()); - assertTrue(message + " vendor length > 0", mediaProcessorInfo - .getVendor().length() > 0); - assertTrue(message + " version length > 0", mediaProcessorInfo - .getVersion().length() > 0); - } - - private void verifyMediaProcessorInfo(String message, String id, - String name, String description, String sku, String vendor, - MediaProcessorInfo mediaProcessorInfo) { - assertEquals(message + " id", id, mediaProcessorInfo.getId()); - assertEquals(message + " name", name, mediaProcessorInfo.getName()); - assertEquals(message + " description", description, - mediaProcessorInfo.getDescription()); - assertEquals(message + " sku", sku, mediaProcessorInfo.getSku()); - assertEquals(message + " vendor", vendor, - mediaProcessorInfo.getVendor()); - assertTrue(message + "version length > 0", mediaProcessorInfo - .getVersion().length() > 0); - } - - @Test - public void listMediaProcessorsSuccess() throws ServiceException { - // Arrange - - // Act - ListResult listMediaProcessorsResult = service - .list(MediaProcessor.list()); - - // Assert - assertNotNull("listMediaProcessorsResult", listMediaProcessorsResult); - assertTrue("listMediaProcessorsResult size > 0", - listMediaProcessorsResult.size() > 0); - List ps = listMediaProcessorsResult; - for (int i = 0; i < ps.size(); i++) { - MediaProcessorInfo mediaProcessorInfo = ps.get(i); - verifyMediaProcessorInfo("mediaProcessorInfo:" + i, - mediaProcessorInfo); - } - } - - @Test - public void listMediaProcessorWithOptionSuccess() throws ServiceException { - ListResult listMediaProcessorsResult = service - .list(MediaProcessor - .list() - .setTop(2) - .set("$filter", - "Id eq 'nb:mpid:UUID:aec03716-7c5e-4f68-b592-f4850eba9f10'")); - - assertNotNull("listMediaProcessorsResult", listMediaProcessorsResult); - assertEquals("listMediaProcessors size", 1, - listMediaProcessorsResult.size()); - MediaProcessorInfo mediaProcessorInfo = listMediaProcessorsResult - .get(0); - verifyMediaProcessorInfo("mediaProcessorInfo", - "nb:mpid:UUID:aec03716-7c5e-4f68-b592-f4850eba9f10", - "Storage Decryption", "Storage Decryption", "", "Microsoft", - mediaProcessorInfo); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/NotificationEndPointIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/NotificationEndPointIntegrationTest.java deleted file mode 100644 index 0a921d4b7fac..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/NotificationEndPointIntegrationTest.java +++ /dev/null @@ -1,221 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; - -import java.util.ArrayList; -import java.util.List; - -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.EndPointType; -import com.microsoft.windowsazure.services.media.models.NotificationEndPoint; -import com.microsoft.windowsazure.services.media.models.NotificationEndPointInfo; - -public class NotificationEndPointIntegrationTest extends IntegrationTestBase { - private final String validButNonexistNotificationEndPointId = "notificationEndPointId"; - private final String testEndPointAddress = "testendpointaddress"; - - private void verifyNotificationEndPointInfosEqual(String message, - NotificationEndPointInfo expected, NotificationEndPointInfo actual) { - verifyNotificationEndPointProperties(message, expected.getName(), - expected.getEndPointType(), expected.getEndPointAddress(), - actual); - } - - private void verifyNotificationEndPointProperties(String message, - String name, EndPointType endPointType, String endPointAddress, - NotificationEndPointInfo notificationEndPointInfo) { - assertNotNull(message, notificationEndPointInfo); - assertEquals(message + " Name", name, - notificationEndPointInfo.getName()); - assertEquals(message + " EndPointType", endPointType, - notificationEndPointInfo.getEndPointType()); - assertEquals(message + " EndPointAddress", endPointAddress, - notificationEndPointInfo.getEndPointAddress()); - assertNotNull(message + " Created", - notificationEndPointInfo.getCreated()); - assertNotNull(message + " Id", notificationEndPointInfo.getId()); - } - - @Test - public void canCreateNotificationEndPoint() throws Exception { - String testName = testNotificationEndPointPrefix + "CanCreate"; - - NotificationEndPointInfo actualNotificationEndPoint = service - .create(NotificationEndPoint.create(testName, - EndPointType.AzureQueue, testEndPointAddress)); - - verifyNotificationEndPointProperties("notification end point ", - testName, EndPointType.AzureQueue, testEndPointAddress, - actualNotificationEndPoint); - } - - @Test - public void canCreateNotificationEndPointWithReadPermissions() - throws Exception { - String testName = testNotificationEndPointPrefix + "CanCreate"; - - NotificationEndPointInfo actualNotificationEndPoint = service - .create(NotificationEndPoint.create(testName, - EndPointType.AzureQueue, testEndPointAddress)); - - verifyNotificationEndPointProperties("notification end point", - testName, EndPointType.AzureQueue, testEndPointAddress, - actualNotificationEndPoint); - } - - @Test - public void canGetSingleNotificationEndPointById() throws Exception { - String expectedName = testNotificationEndPointPrefix + "GetOne"; - NotificationEndPointInfo expectedNotificationEndPointInfo = service - .create(NotificationEndPoint.create(expectedName, - EndPointType.AzureQueue, testEndPointAddress)); - - NotificationEndPointInfo actualNotificationEndPointInfo = service - .get(NotificationEndPoint.get(expectedNotificationEndPointInfo - .getId())); - - assertEquals(expectedNotificationEndPointInfo.getId(), - actualNotificationEndPointInfo.getId()); - verifyNotificationEndPointProperties("notification end point", - expectedName, EndPointType.AzureQueue, testEndPointAddress, - actualNotificationEndPointInfo); - } - - @Test - public void canGetSingleNotificationEndPointByInvalidId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.get(NotificationEndPoint.get(invalidId)); - } - - @Test - public void cannotGetSingleNotificationEndPointByNonexistId() - throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.get(NotificationEndPoint - .get(validButNonexistNotificationEndPointId)); - } - - @Test - public void canRetrieveListOfNotificationEndPoints() throws Exception { - String[] notificationEndPointNames = new String[] { - testNotificationEndPointPrefix + "ListOne", - testNotificationEndPointPrefix + "ListTwo" }; - - List expectedNotificationEndPoints = new ArrayList(); - for (int i = 0; i < notificationEndPointNames.length; i++) { - NotificationEndPointInfo notificationEndPointInfo = service - .create(NotificationEndPoint.create( - notificationEndPointNames[i], - EndPointType.AzureQueue, testEndPointAddress)); - expectedNotificationEndPoints.add(notificationEndPointInfo); - } - - List actualAccessPolicies = service - .list(NotificationEndPoint.list()); - - verifyListResultContains("listNotificationEndPoints", - expectedNotificationEndPoints, actualAccessPolicies, - new ComponentDelegate() { - @Override - public void verifyEquals(String message, Object expected, - Object actual) { - verifyNotificationEndPointInfosEqual(message, - (NotificationEndPointInfo) expected, - (NotificationEndPointInfo) actual); - } - }); - } - - @Test - public void canUseQueryParametersWhenListingNotificationEndPoints() - throws Exception { - String[] notificationEndPointNames = new String[] { - testNotificationEndPointPrefix + "ListThree", - testNotificationEndPointPrefix + "ListFour", - testNotificationEndPointPrefix + "ListFive", - testNotificationEndPointPrefix + "ListSix", - testNotificationEndPointPrefix + "ListSeven" }; - - List expectedNotificationEndPointInfos = new ArrayList(); - for (int i = 0; i < notificationEndPointNames.length; i++) { - NotificationEndPointInfo notificationEndPointInfo = service - .create(NotificationEndPoint.create( - notificationEndPointNames[i], - EndPointType.AzureQueue, testEndPointAddress)); - expectedNotificationEndPointInfos.add(notificationEndPointInfo); - } - - List actualNotificationEndPointInfos = service - .list(NotificationEndPoint.list().setTop(2)); - - assertEquals(2, actualNotificationEndPointInfos.size()); - } - - @Test - public void canDeleteNotificationEndPointById() throws Exception { - String testNotificationEndPointName = testNotificationEndPointPrefix - + "ToDelete"; - NotificationEndPointInfo notificationEndPointToBeDeleted = service - .create(NotificationEndPoint.create( - testNotificationEndPointName, EndPointType.AzureQueue, - testEndPointAddress)); - List listNotificationEndPointsResult = service - .list(NotificationEndPoint.list()); - int notificationEndPointBaseline = listNotificationEndPointsResult.size(); - - service.delete(NotificationEndPoint - .delete(notificationEndPointToBeDeleted.getId())); - - listNotificationEndPointsResult = service.list(NotificationEndPoint.list()); - assertEquals("listNotificationEndPointResult.size", notificationEndPointBaseline - 1, - listNotificationEndPointsResult.size()); - - for (NotificationEndPointInfo policy : service - .list(NotificationEndPoint.list())) { - assertFalse(notificationEndPointToBeDeleted.getId().equals( - policy.getId())); - } - - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(404)); - service.get(NotificationEndPoint.get(notificationEndPointToBeDeleted - .getId())); - } - - @Test - public void canDeleteNotificationEndPointByInvalidId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.delete(NotificationEndPoint.delete(invalidId)); - } - - @Test - public void cannotDeleteNotificationEndPointByNonexistId() throws Exception { - expectedException.expect(ServiceException.class); - expectedException.expect(new ServiceExceptionMatcher(400)); - service.delete(NotificationEndPoint - .delete(validButNonexistNotificationEndPointId)); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ProtectionKeyIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ProtectionKeyIntegrationTest.java deleted file mode 100644 index a96b0a5ddd9a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ProtectionKeyIntegrationTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertNotNull; - -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.ContentKeyType; -import com.microsoft.windowsazure.services.media.models.ProtectionKey; - -public class ProtectionKeyIntegrationTest extends IntegrationTestBase { - - @Test - public void canGetProtectionKeyId() throws ServiceException { - // Arrange - - // Act - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.CommonEncryption)); - - // Assert - assertNotNull(protectionKeyId); - } - - @Test - public void canGetProtectionKey() throws ServiceException { - // Arrange - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.CommonEncryption)); - - // Act - String protectionKey = service.action(ProtectionKey - .getProtectionKey(protectionKeyId)); - - // Assert - assertNotNull(protectionKey); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ServiceExceptionMatcher.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ServiceExceptionMatcher.java deleted file mode 100644 index 3031e792f553..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/ServiceExceptionMatcher.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import org.hamcrest.BaseMatcher; -import org.hamcrest.Description; - -import com.microsoft.windowsazure.exception.ServiceException; - -public class ServiceExceptionMatcher extends BaseMatcher { - private final int httpStatusCode; - - public ServiceExceptionMatcher(int httpStatusCode) { - this.httpStatusCode = httpStatusCode; - } - - @Override - public boolean matches(Object item) { - if (item == null || item.getClass() != ServiceException.class) { - return false; - } - - if (((ServiceException) item).getHttpStatusCode() != this.httpStatusCode) { - return false; - } - - return true; - } - - @Override - public void describeTo(Description description) { - description.appendText("Must be ServiceException with status code" - + this.httpStatusCode); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/StorageAccountsTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/StorageAccountsTest.java deleted file mode 100644 index 40b8017992f2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/StorageAccountsTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.StorageAccountInfo; -import com.microsoft.windowsazure.services.media.models.StorageAccounts; - -public class StorageAccountsTest extends IntegrationTestBase { - - @Test - public void listStorageAccountsSuccess() throws Exception { - // Arrange - - // Act - ListResult storageAccounts = service.list(StorageAccounts.list()); - - // Assert - assertNotNull(storageAccounts); - assertTrue(storageAccounts.size() > 0); - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/StreamingEndopointIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/StreamingEndopointIntegrationTest.java deleted file mode 100644 index 91457c62e792..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/StreamingEndopointIntegrationTest.java +++ /dev/null @@ -1,310 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assume.assumeTrue; - -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; -import java.util.List; - -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.AkamaiAccessControlType; -import com.microsoft.windowsazure.services.media.implementation.content.AkamaiSignatureHeaderAuthenticationKey; -import com.microsoft.windowsazure.services.media.implementation.content.CrossSiteAccessPoliciesType; -import com.microsoft.windowsazure.services.media.implementation.content.IPAccessControlType; -import com.microsoft.windowsazure.services.media.implementation.content.IPRangeType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointAccessControlType; -import com.microsoft.windowsazure.services.media.implementation.content.StreamingEndpointCacheControlType; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.OperationState; -import com.microsoft.windowsazure.services.media.models.StreamingEndpoint; -import com.microsoft.windowsazure.services.media.models.StreamingEndpointInfo; -import com.microsoft.windowsazure.services.media.models.StreamingEndpointState; - -public class StreamingEndopointIntegrationTest extends IntegrationTestBase { - - @Test - public void streamingEndpointReachEndpointsLimit() throws Exception { - // Arrange - String endpoint1 = testStreamingEndPointPrefix + "ReachEndpointsLimit1"; - String endpoint2 = testStreamingEndPointPrefix + "ReachEndpointsLimit2"; - - StreamingEndpointInfo streamingEndpointInfo = service.create(StreamingEndpoint.create().setName(endpoint1)); - - OperationUtils.await(service, streamingEndpointInfo); - - // Act - try { - StreamingEndpointInfo streamingEndpoint2Info = service.create(StreamingEndpoint.create().setName(endpoint2)); - - // mark this test as ignored if the subscription supports more than 2 streaming endpoints - assumeTrue(streamingEndpoint2Info == null); - - } catch(Exception e) { - - // Assert Act - assertTrue("Error should be ExceededResourceQuota", e.getMessage().contains("ExceededResourceQuota")); - } - - // Cleanup - String deleteOpId = service.delete(StreamingEndpoint.delete(streamingEndpointInfo.getId())); - OperationState state = OperationUtils.await(service, deleteOpId); - - // Assert Cleanup - assertEquals(state, OperationState.Succeeded); - } - - @Test - public void streamingEndpointCreateListByNameAndDelete() throws Exception { - // Arrange - String expectedName = testStreamingEndPointPrefix + "ListByNameTest"; - StreamingEndpointInfo streamingEndpointInfo = service.create(StreamingEndpoint.create().setName(expectedName)); - - OperationUtils.await(service, streamingEndpointInfo); - - // Act - ListResult listStreamingEndpointResult = service.list(StreamingEndpoint.list() - .set("$filter", "(Name eq '" + expectedName + "')")); - - // Assert - assertNotNull(listStreamingEndpointResult); - assertEquals(1, listStreamingEndpointResult.size()); - StreamingEndpointInfo info = listStreamingEndpointResult.get(0); - assertNotNull(info); - assertEquals(info.getName(), expectedName); - - // Cleanup - String deleteOpId = service.delete(StreamingEndpoint.delete(info.getId())); - OperationState state = OperationUtils.await(service, deleteOpId); - - // Assert Cleanup - assertEquals(state, OperationState.Succeeded); - } - - @Test - public void streamingEndpointCreateStartStopDeleteTest() throws Exception { - // Arrange - String expectedName = testStreamingEndPointPrefix + "Startable"; - StreamingEndpointInfo streamingEndpointInfo = service.create(StreamingEndpoint.create().setName(expectedName)); - - OperationUtils.await(service, streamingEndpointInfo); - - // Act - String startingOpId = service.action(StreamingEndpoint.start(streamingEndpointInfo.getId())); - OperationState state = OperationUtils.await(service, startingOpId); - - // Assert - assertEquals(state, OperationState.Succeeded); - streamingEndpointInfo = service.get(StreamingEndpoint.get(streamingEndpointInfo.getId())); - assertNotNull(streamingEndpointInfo); - assertEquals(StreamingEndpointState.Running, streamingEndpointInfo.getState()); - - // Act 2 - startingOpId = service.action(StreamingEndpoint.stop(streamingEndpointInfo.getId())); - state = OperationUtils.await(service, startingOpId); - - // Assert 2 - assertEquals(state, OperationState.Succeeded); - - // Cleanup - String deleteOpId = service.delete(StreamingEndpoint.delete(streamingEndpointInfo.getId())); - state = OperationUtils.await(service, deleteOpId); - // Assert Cleanup - assertEquals(state, OperationState.Succeeded); - } - - @Test - public void streamingEndpointCreateStartScaleStopDeleteTest() throws Exception { - // Arrange - int expectedScaleUnits = 2; - String expectedName = testStreamingEndPointPrefix + "Scalable"; - StreamingEndpointInfo streamingEndpointInfo = service.create(StreamingEndpoint.create().setName(expectedName)); - - OperationUtils.await(service, streamingEndpointInfo); - - // Act - String startingOpId = service.action(StreamingEndpoint.start(streamingEndpointInfo.getId())); - OperationState state = OperationUtils.await(service, startingOpId); - - // Assert - assertEquals(state, OperationState.Succeeded); - streamingEndpointInfo = service.get(StreamingEndpoint.get(streamingEndpointInfo.getId())); - assertNotNull(streamingEndpointInfo); - assertEquals(StreamingEndpointState.Running, streamingEndpointInfo.getState()); - - startingOpId = service.action(StreamingEndpoint.scale(streamingEndpointInfo.getId(), expectedScaleUnits)); - state = OperationUtils.await(service, startingOpId); - // Assert 3 - assertEquals(state, OperationState.Succeeded); - streamingEndpointInfo = service.get(StreamingEndpoint.get(streamingEndpointInfo.getId())); - assertNotNull(streamingEndpointInfo); - assertEquals(expectedScaleUnits, streamingEndpointInfo.getScaleUnits()); - - // Act 3 - startingOpId = service.action(StreamingEndpoint.stop(streamingEndpointInfo.getId())); - state = OperationUtils.await(service, startingOpId); - // Assert 3 - assertEquals(state, OperationState.Succeeded); - - // Cleanup - String deleteOpId = service.delete(StreamingEndpoint.delete(streamingEndpointInfo.getId())); - state = OperationUtils.await(service, deleteOpId); - // Assert Cleanup - assertEquals(state, OperationState.Succeeded); - } - - @Test - public void streamingEndpointEnableCDNTest() throws Exception { - // Arrange - int expectedScaleUnits = 1; - String expectedName = testStreamingEndPointPrefix + "EnableCDN"; - - // Act 1 - StreamingEndpointInfo streamingEndpointInfo = service.create(StreamingEndpoint.create().setName(expectedName)); - OperationState state = OperationUtils.await(service, streamingEndpointInfo); - // Assert 1 - assertEquals(state, OperationState.Succeeded); - - // Act 2 - String opId = service.action(StreamingEndpoint.scale(streamingEndpointInfo.getId(), expectedScaleUnits)); - state = OperationUtils.await(service, opId); - // Assert 2 - assertEquals(state, OperationState.Succeeded); - - // Act 3 - opId = service.update(StreamingEndpoint.update(streamingEndpointInfo).setCdnEnabled(true)); - state = OperationUtils.await(service, opId); - // Assert 3 - assertEquals(state, OperationState.Succeeded); - - // Act 4 - streamingEndpointInfo = service.get(StreamingEndpoint.get(streamingEndpointInfo.getId())); - // Assert 4 - assertTrue(streamingEndpointInfo.isCdnEnabled()); - - // Cleanup - String deleteOpId = service.delete(StreamingEndpoint.delete(streamingEndpointInfo.getId())); - state = OperationUtils.await(service, deleteOpId); - // Assert Cleanup - assertEquals(state, OperationState.Succeeded); - } - - @Test - public void createAndRetrieveTheSameStreamingEndpointTest() throws Exception { - // Arrange - int expectedScaleUnits = 1; - boolean expectedCdnState = false; - String expectedName = testStreamingEndPointPrefix + "createAndRetrieve"; - String expectedDesc = "expected description"; - int expectedMaxAge = 1800; - String expectedClientAccessPolicy = ""; - String expectedCrossDomainPolicy = ""; - String expectedAkamaiIdentifier = "akamaikey"; - - Calendar cal = Calendar.getInstance(); - cal.setTime(new Date()); - cal.add(Calendar.HOUR, 48); - Date expectedAkamaiExpiration = cal.getTime(); - String expectedAkamaiB64 = "/31iWKdqNC7YUnj8zQ3XHA=="; - String expectedIPAddress = "0.0.0.0"; - String expectedIPName = "Allow All"; - - CrossSiteAccessPoliciesType expectedCrossSiteAccessPolicies = new CrossSiteAccessPoliciesType(); - expectedCrossSiteAccessPolicies.setClientAccessPolicy(expectedClientAccessPolicy); - expectedCrossSiteAccessPolicies.setCrossDomainPolicy(expectedCrossDomainPolicy); - - IPAccessControlType expectedIP = new IPAccessControlType(); - expectedIP.setIpRange(new ArrayList()); - expectedIP.getIpRange().add(new IPRangeType()); - expectedIP.getIpRange().get(0).setAddress(expectedIPAddress); - expectedIP.getIpRange().get(0).setName(expectedIPName); - expectedIP.getIpRange().get(0).setSubnetPrefixLength(0); - - AkamaiAccessControlType expectedAkamai = new AkamaiAccessControlType(); - List akamaiSignatureHeaderAuthenticationKeyList = - new ArrayList(); - akamaiSignatureHeaderAuthenticationKeyList.add(new AkamaiSignatureHeaderAuthenticationKey()); - akamaiSignatureHeaderAuthenticationKeyList.get(0).setExpiration(expectedAkamaiExpiration); - akamaiSignatureHeaderAuthenticationKeyList.get(0).setId(expectedAkamaiIdentifier); - akamaiSignatureHeaderAuthenticationKeyList.get(0).setBase64Key(expectedAkamaiB64); - expectedAkamai.setAkamaiSignatureHeaderAuthenticationKeyList(akamaiSignatureHeaderAuthenticationKeyList); - - StreamingEndpointAccessControlType expectedStreamingEndpointAccessControl = new StreamingEndpointAccessControlType(); - expectedStreamingEndpointAccessControl.setAkamai(expectedAkamai); - expectedStreamingEndpointAccessControl.setIP(expectedIP); - - StreamingEndpointCacheControlType expectedStreamingEndpointCacheControl = new StreamingEndpointCacheControlType(); - - expectedStreamingEndpointCacheControl.setMaxAge(expectedMaxAge ); - - // Act - StreamingEndpointInfo streamingEndpointInfo = service.create( - StreamingEndpoint.create() - .setName(expectedName) - .setCdnEnabled(expectedCdnState) - .setDescription(expectedDesc) - .setScaleUnits(expectedScaleUnits) - .setCrossSiteAccessPolicies(expectedCrossSiteAccessPolicies) - .setAccessControl(expectedStreamingEndpointAccessControl) - .setCacheControl(expectedStreamingEndpointCacheControl ) - ); - - OperationState state = OperationUtils.await(service, streamingEndpointInfo); - - // Act validations - assertEquals(OperationState.Succeeded, state); - assertNotNull(streamingEndpointInfo); - - // Retrieve the StramingEndpoint again. - StreamingEndpointInfo result = service.get(StreamingEndpoint.get(streamingEndpointInfo.getId())); - - // Assert - assertNotNull(result); - assertEquals(result.getScaleUnits(), expectedScaleUnits); - assertEquals(result.getName(), expectedName); - assertEquals(result.getDescription(), expectedDesc); - assertEquals(result.getCrossSiteAccessPolicies().getClientAccessPolicy(), expectedClientAccessPolicy); - assertEquals(result.getCrossSiteAccessPolicies().getCrossDomainPolicy(), expectedCrossDomainPolicy); - assertEquals(result.getCacheControl().getMaxAge(), expectedMaxAge); - List akamai = result.getAccessControl().getAkamai().getAkamaiSignatureHeaderAuthenticationKeyList(); - assertNotNull(akamai); - assertEquals(akamai.size(), 1); - assertEquals(akamai.get(0).getId(), expectedAkamaiIdentifier); - assertEquals(akamai.get(0).getExpiration(), expectedAkamaiExpiration); - assertEquals(akamai.get(0).getBase64Key(), expectedAkamaiB64); - List ip = result.getAccessControl().getIP().getIpRange(); - assertNotNull(ip); - assertEquals(ip.size(), 1); - assertEquals(ip.get(0).getAddress(), expectedIPAddress); - assertEquals(ip.get(0).getName(), expectedIPName); - assertEquals(ip.get(0).getSubnetPrefixLength(), 0); - - // Cleanup - String deleteOpId = service.delete(StreamingEndpoint.delete(result.getId())); - state = OperationUtils.await(service, deleteOpId); - // Assert Cleanup - assertEquals(state, OperationState.Succeeded); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/TaskIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/TaskIntegrationTest.java deleted file mode 100644 index bdb2da64a3f5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/TaskIntegrationTest.java +++ /dev/null @@ -1,337 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.io.UnsupportedEncodingException; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.UUID; - -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.Job; -import com.microsoft.windowsazure.services.media.models.Job.Creator; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.JobState; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.Task; -import com.microsoft.windowsazure.services.media.models.Task.CreateBatchOperation; -import com.microsoft.windowsazure.services.media.models.TaskInfo; -import com.microsoft.windowsazure.services.media.models.TaskOption; -import com.microsoft.windowsazure.services.media.models.TaskState; -import com.sun.jersey.core.util.Base64; - -public class TaskIntegrationTest extends IntegrationTestBase { - private static AssetInfo assetInfo; - private Creator jobCreator; - - private static final String commonConfiguration = "H.264 256k DSL CBR"; - - @BeforeClass - public static void setup() throws Exception { - IntegrationTestBase.setup(); - assetInfo = setupAssetWithFile(); - } - - @Before - public void instanceSetup() { - this.jobCreator = Job.create() - .setName(testJobPrefix + UUID.randomUUID().toString()) - .setPriority(3).addInputMediaAsset(assetInfo.getId()); - } - - @Test - public void createTaskSuccess() throws ServiceException, - UnsupportedEncodingException { - // Arrange - - // Required - String mediaProcessorId = MEDIA_ENCODER_MEDIA_PROCESSOR_ID; - String taskBody = constructTaskBody(0); - - // Optional parameters - String configuration = new String(Base64.encode(commonConfiguration), - "UTF8"); - String name = "My encoding Task " + UUID.randomUUID().toString(); - int jobPriority = 3; - TaskOption options = TaskOption.ProtectedConfiguration; - // Use a fake id, to simulate real use. - String encryptionKeyId = "nb:kid:UUID:" + UUID.randomUUID().toString(); - String encryptionScheme = "ConfigurationEncryption"; - String encryptionVersion = "1.0"; - // Use a trivial vector, 16 bytes of zeros, base-64 encoded. - String initializationVector = new String(Base64.encode(new byte[16]), - "UTF8"); - - CreateBatchOperation taskCreator = Task - .create(mediaProcessorId, taskBody) - .setConfiguration(configuration).setName(name) - .setPriority(jobPriority).setOptions(options) - .setEncryptionKeyId(encryptionKeyId) - .setEncryptionScheme(encryptionScheme) - .setEncryptionVersion(encryptionVersion) - .setInitializationVector(initializationVector); - jobCreator.addTaskCreator(taskCreator); - - // Act - JobInfo job = service.create(jobCreator); - List taskInfos = service.list(Task.list(job.getTasksLink())); - - // Assert - assertEquals("taskInfos count", 1, taskInfos.size()); - verifyTaskPropertiesJustStarted("taskInfo", mediaProcessorId, options, - taskBody, configuration, name, jobPriority, encryptionKeyId, - encryptionScheme, encryptionVersion, initializationVector, - taskInfos.get(0)); - } - - @Test - public void createTwoTasksSuccess() throws ServiceException { - // Arrange - - // Required - String mediaProcessorId = MEDIA_ENCODER_MEDIA_PROCESSOR_ID; - String[] taskBodies = new String[] { constructTaskBody(0), - constructTaskBody(1) }; - - // Optional parameters - String configuration = commonConfiguration; - String baseName = "My encoding Task " + UUID.randomUUID().toString(); - String[] suffixes = new String[] { " 1", " 2" }; - int jobPriority = 3; - TaskOption options = TaskOption.None; - - List taskCreators = new ArrayList(); - - for (int i = 0; i < taskBodies.length; i++) { - CreateBatchOperation taskCreator = Task - .create(mediaProcessorId, taskBodies[i]) - .setConfiguration(configuration) - .setName(baseName + suffixes[i]); - taskCreators.add(taskCreator); - jobCreator.addTaskCreator(taskCreator); - } - - // Act - JobInfo job = service.create(jobCreator); - List taskInfos = service.list(Task.list(job.getTasksLink())); - - // Assert - assertEquals("taskInfos count", taskCreators.size(), taskInfos.size()); - for (int i = 0; i < taskCreators.size(); i++) { - verifyTaskPropertiesJustStartedNoEncryption("taskInfo", - mediaProcessorId, options, taskBodies[i], configuration, - baseName + suffixes[i], jobPriority, taskInfos.get(i)); - } - } - - @Test - public void canListTasksWithOptions() throws ServiceException { - // Arrange - String mediaProcessorId = MEDIA_ENCODER_MEDIA_PROCESSOR_ID; - String configuration = commonConfiguration; - String[] taskNameSuffixes = new String[] { "A", "B", "C", "D" }; - String baseName = "My encoding Task " + UUID.randomUUID().toString(); - int taskCounter = 0; - for (String suffix : taskNameSuffixes) { - CreateBatchOperation taskCreator = Task - .create(mediaProcessorId, constructTaskBody(taskCounter++)) - .setConfiguration(configuration).setName(baseName + suffix); - jobCreator.addTaskCreator(taskCreator); - } - - service.create(jobCreator); - - // Act - ListResult listTaskResult1 = service.list(Task.list().set( - "$filter", "startswith(Name, '" + baseName + "') eq true")); - ListResult listTaskResult2 = service.list(Task.list() - .set("$filter", "startswith(Name, '" + baseName + "') eq true") - .setTop(2)); - - // Assert - assertEquals("listTaskResult1.size", 4, listTaskResult1.size()); - assertEquals("listTaskResult2.size", 2, listTaskResult2.size()); - } - - @Test - public void cancelTaskSuccess() throws ServiceException, - InterruptedException { - // Arrange - String mediaProcessorId = MEDIA_ENCODER_MEDIA_PROCESSOR_ID; - String taskBody = constructTaskBody(0); - String configuration = commonConfiguration; - String name = "My encoding Task " + UUID.randomUUID().toString(); - CreateBatchOperation taskCreator = Task - .create(mediaProcessorId, taskBody) - .setConfiguration(configuration).setName(name); - jobCreator.addTaskCreator(taskCreator); - - JobInfo jobInfo = service.create(jobCreator); - - // Act - service.action(Job.cancel(jobInfo.getId())); - JobInfo cancellingJobInfo = service.get(Job.get(jobInfo.getId())); - while (cancellingJobInfo.getState() == JobState.Canceling) { - Thread.sleep(2000); - cancellingJobInfo = service.get(Job.get(jobInfo.getId())); - } - - // Assert - List taskInfos = service.list(Task.list(cancellingJobInfo - .getTasksLink())); - for (TaskInfo taskInfo : taskInfos) { - verifyTaskPropertiesNoEncryption("canceled task", mediaProcessorId, - TaskOption.None, taskBody, configuration, name, 3, - null, null, 0.0, 0.0, null, TaskState.Canceled, - taskInfo); - } - } - - private void verifyTaskProperties(String message, String mediaProcessorId, - TaskOption options, String taskBody, String configuration, - String name, int priority, String encryptionKeyId, - String encryptionScheme, String encryptionVersion, - String initializationVector, Date endTime, String errorDetails, - double progress, double runningDuration, Date startTime, - TaskState state, TaskInfo actual) throws ServiceException { - assertNotNull(message, actual); - assertNotNull(message + " id", actual.getId()); - - // Required fields - assertEquals(message + " getMediaProcessorId", mediaProcessorId, - actual.getMediaProcessorId()); - assertEquals(message + " getOptions", options, actual.getOptions()); - assertEquals(message + " getTaskBody", taskBody, actual.getTaskBody()); - - // Optional fields - assertEquals(message + " getConfiguration", configuration, - actual.getConfiguration()); - assertEquals(message + " getName", name, actual.getName()); - assertEquals(message + " getPriority", priority, actual.getPriority()); - - // Optional encryption fields - assertEqualsNullEmpty(message + " getEncryptionKeyId", encryptionKeyId, - actual.getEncryptionKeyId()); - assertEqualsNullEmpty(message + " getEncryptionScheme", - encryptionScheme, actual.getEncryptionScheme()); - assertEqualsNullEmpty(message + " getEncryptionVersion", - encryptionVersion, actual.getEncryptionVersion()); - assertEqualsNullEmpty(message + " getInitializationVector", - initializationVector, actual.getInitializationVector()); - - // Read-only fields - assertNotNull(message + " getErrorDetails", actual.getErrorDetails()); - assertEquals(message + " getErrorDetails.size", 0, actual - .getErrorDetails().size()); - - ListResult inputAssets = service.list(Asset.list(actual - .getInputAssetsLink())); - ListResult outputAssets = service.list(Asset.list(actual - .getOutputAssetsLink())); - - assertEquals(message + " inputAssets.size", 1, inputAssets.size()); - assertEquals(message + " inputAssets.get(0).getId", assetInfo.getId(), - inputAssets.get(0).getId()); - - assertEquals(message + " outputAssets.size", 1, outputAssets.size()); - // Because this is a new asset, there is not much else to test - assertTrue(message + " outputAssets.get(0).getId != assetInfo.getId", - !assetInfo.getId().equals(outputAssets.get(0).getId())); - - assertEquals(message + " getProgress", progress, actual.getProgress(), - 0.01); - assertEquals(message + " getRunningDuration", runningDuration, - actual.getRunningDuration(), 0.01); - assertDateApproxEquals(message + " getStartTime", startTime, - actual.getStartTime()); - assertEquals(message + " getState", state, actual.getState()); - - // Note: The PerfMessage is not validated because it is server - // generated. - } - - private void verifyTaskPropertiesJustStarted(String message, - String mediaProcessorId, TaskOption options, String taskBody, - String configuration, String name, int priority, - String encryptionKeyId, String encryptionScheme, - String encryptionVersion, String initializationVector, - TaskInfo actual) throws ServiceException { - - // Read-only - Date endTime = null; - String errorDetails = null; - double progress = 0.0; - int runningDuration = 0; - Date startTime = null; - TaskState state = TaskState.None; - - verifyTaskProperties(message, mediaProcessorId, options, taskBody, - configuration, name, priority, encryptionKeyId, - encryptionScheme, encryptionVersion, initializationVector, - endTime, errorDetails, progress, runningDuration, startTime, - state, actual); - } - - private void verifyTaskPropertiesJustStartedNoEncryption(String message, - String mediaProcessorId, TaskOption options, String taskBody, - String configuration, String name, int priority, TaskInfo actual) - throws ServiceException { - String encryptionKeyId = null; - String encryptionScheme = "None"; - String encryptionVersion = null; - String initializationVector = null; - - verifyTaskPropertiesJustStarted(message, mediaProcessorId, options, - taskBody, configuration, name, priority, encryptionKeyId, - encryptionScheme, encryptionVersion, initializationVector, - actual); - } - - private void verifyTaskPropertiesNoEncryption(String message, - String mediaProcessorId, TaskOption options, String taskBody, - String configuration, String name, int priority, Date endTime, - String errorDetails, double progress, double runningDuration, - Date startTime, TaskState state, TaskInfo actual) - throws ServiceException { - String encryptionKeyId = null; - String encryptionScheme = "None"; - String encryptionVersion = null; - String initializationVector = null; - - verifyTaskProperties(message, mediaProcessorId, options, taskBody, - configuration, name, priority, encryptionKeyId, - encryptionScheme, encryptionVersion, initializationVector, - endTime, errorDetails, progress, runningDuration, startTime, - state, actual); - } - - private String constructTaskBody(int outputIndex) { - return "JobInputAsset(0)" - + "JobOutputAsset(" + outputIndex - + ")"; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/UploadingIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/UploadingIntegrationTest.java deleted file mode 100644 index ffd0f5f07d4d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/UploadingIntegrationTest.java +++ /dev/null @@ -1,173 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.EnumSet; -import java.util.Random; - -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.core.pipeline.jersey.ExponentialRetryPolicy; -import com.microsoft.windowsazure.core.pipeline.jersey.RetryPolicyFilter; -import com.microsoft.windowsazure.services.blob.models.BlockList; -import com.microsoft.windowsazure.services.blob.models.CommitBlobBlocksOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobBlockOptions; -import com.microsoft.windowsazure.services.blob.models.CreateBlobOptions; -import com.microsoft.windowsazure.services.media.models.AccessPolicy; -import com.microsoft.windowsazure.services.media.models.AccessPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AccessPolicyPermission; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; - -/** - * Testing uploading in various permutations. - * - */ -public class UploadingIntegrationTest extends IntegrationTestBase { - private static WritableBlobContainerContract blobWriter; - private static byte[] firstPrimes = new byte[] { 2, 3, 5, 7, 11, 13, 17, - 19, 23, 29 }; - - @BeforeClass - public static void setup() throws Exception { - IntegrationTestBase.setup(); - - AssetInfo asset = service.create(Asset.create().setName( - testAssetPrefix + "uploadBlockBlobAsset")); - - AccessPolicyInfo policy = service.create(AccessPolicy.create( - testPolicyPrefix + "uploadWritePolicy", 10, - EnumSet.of(AccessPolicyPermission.WRITE))); - - LocatorInfo locator = createLocator(policy, asset, 5); - - blobWriter = service.createBlobWriter(locator); - - ExponentialRetryPolicy retryPolicy = new ExponentialRetryPolicy(5000, - 5, new int[] { 400, 404 }); - blobWriter = blobWriter.withFilter(new RetryPolicyFilter(retryPolicy)); - } - - @Test - public void canUploadBlockBlob() throws Exception { - InputStream blobContent = new ByteArrayInputStream(firstPrimes); - blobWriter.createBlockBlob("uploadBlockBlobTest", blobContent); - } - - @Test - public void canUploadLargeBlockBlob() throws Exception { - - InputStream blobContent = new InputStream() { - private int count = 0; - private int _mark = 0; - private int invalidate = 0; - - private Random rand = new Random(); - - @Override - public int read() throws IOException { - if ((this.count++) > 1024*1024*66) { - return -1; - } - if (invalidate > 0) { - this.invalidate--; - if (this.invalidate == 0) { - this._mark = 0; - } - } - return rand.nextInt(256); - } - - @Override - public void mark(int mark) { - this._mark = this.count; - } - - @Override - public void reset() { - this.count = this._mark; - this._mark = 0; - } - - @Override - public boolean markSupported() { - return true; - } - }; - - blobWriter.createBlockBlob("uploadLargeBlockBlobTest", blobContent); - } - - @Test - public void canUploadBlockBlobWithOptions() throws Exception { - InputStream blobContent = new ByteArrayInputStream(firstPrimes); - CreateBlobOptions options = new CreateBlobOptions().addMetadata( - "testMetadataKey", "testMetadataValue"); - blobWriter.createBlockBlob("canUploadBlockBlobWithOptions", - blobContent, options); - } - - @Test - public void canCreateBlobBlock() throws Exception { - InputStream blobContent = new ByteArrayInputStream(firstPrimes); - blobWriter.createBlobBlock("canCreateBlobBlock", "123", blobContent); - } - - @Test - public void canCreateBlobBlockWithOptions() throws Exception { - InputStream blobContent = new ByteArrayInputStream(firstPrimes); - CreateBlobBlockOptions options = new CreateBlobBlockOptions() - .setTimeout(100); - blobWriter.createBlobBlock("canCreateBlobBlockWithOptions", "123", - blobContent, options); - } - - @Test - public void canCommitBlobBlocks() throws Exception { - BlockList blockList = new BlockList(); - blobWriter.commitBlobBlocks("canCommitBlobBlocks", blockList); - } - - @Test - public void canCommitBlobBlocksWithOptions() throws Exception { - BlockList blockList = new BlockList(); - CommitBlobBlocksOptions options = new CommitBlobBlocksOptions() - .setBlobContentType("text/html;charset=ISO-8859-1"); - blobWriter.commitBlobBlocks("canCommitBlobBlocksWithOptions", - blockList, options); - } - - @Test - public void canUploadBlockBlobWithExplicitRetry() throws Exception { - InputStream blobContent = new ByteArrayInputStream(firstPrimes); - blobWriter.createBlockBlob("canUploadBlockBlobWithExplicitRetry1", - blobContent); - - ExponentialRetryPolicy forceRetryPolicy = new ExponentialRetryPolicy(1, - 1, new int[] { 201 }); - WritableBlobContainerContract forceRetryBlobWriter = blobWriter - .withFilter(new RetryPolicyFilter(forceRetryPolicy)); - - blobContent.reset(); - forceRetryBlobWriter.createBlockBlob( - "canUploadBlockBlobWithExplicitRetry2", blobContent); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyEntityTest.java deleted file mode 100644 index 55f264fee908..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyEntityTest.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.contentprotection; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import java.net.URLEncoder; - -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyType; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicy; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyInfo; - -/** - * Tests for the methods and factories of the Asset entity. - */ -public class ContentKeyAuthorizationPolicyEntityTest { - // Common Arrange - private static final String ENTITY_SET = "ContentKeyAuthorizationPolicies"; - private static final String sampleCKAPId = "nb:ckpid:UUID:e640675d-adf5-4a15-b8c5-021e3ab01a10"; - private static final String sampleCKAPName = "sampleContentKeyAuthPolicyName"; - private final String expectedUri = String.format("%s('%s')", ENTITY_SET, URLEncoder.encode(sampleCKAPId, "UTF-8")); - - public ContentKeyAuthorizationPolicyEntityTest() throws Exception { - } - - @Test - public void ckapCreateReturnsValidPayload() throws ServiceException { - // Act - ContentKeyAuthorizationPolicyType payload = (ContentKeyAuthorizationPolicyType) ContentKeyAuthorizationPolicy - .create(sampleCKAPName).getRequestContents(); - - // Assert - assertNotNull(payload); - assertNull(payload.getId()); - assertEquals(payload.getName(), sampleCKAPName); - - } - - @Test - public void ckapGetReturnsExpectedUri() throws Exception { - // Act - EntityGetOperation getter = ContentKeyAuthorizationPolicy.get(sampleCKAPId); - - // Assert - assertEquals(expectedUri, getter.getUri()); - } - - @Test - public void ckapListReturnsExpectedUri() { - // Act - EntityListOperation lister = ContentKeyAuthorizationPolicy.list(); - - // Assert - assertEquals(ENTITY_SET, lister.getUri()); - assertNotNull(lister.getQueryParameters()); - assertEquals(0, lister.getQueryParameters().size()); - } - - @Test - public void ckapListCanTakeQueryParameters() { - EntityListOperation lister = ContentKeyAuthorizationPolicy.list().setTop(10) - .setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void ckapListCanTakeQueryParametersChained() { - EntityListOperation lister = ContentKeyAuthorizationPolicy.list().setTop(10) - .setSkip(2).set("filter", "something"); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals("something", lister.getQueryParameters().getFirst("filter")); - assertEquals(3, lister.getQueryParameters().size()); - } - - @Test - public void ckapDeleteReturnsExpectedUri() throws Exception { - EntityDeleteOperation deleter = ContentKeyAuthorizationPolicy.delete(sampleCKAPId); - - assertEquals(expectedUri, deleter.getUri()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyInfoTest.java deleted file mode 100644 index 93cb32e7cc9e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyInfoTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.contentprotection; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyType; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyInfo; - -public class ContentKeyAuthorizationPolicyInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "expectedId"; - ContentKeyAuthorizationPolicyInfo contentKeyAuthorizationPolicyInfo = new ContentKeyAuthorizationPolicyInfo( - null, new ContentKeyAuthorizationPolicyType().setId(expectedId)); - - // Act - String actualId = contentKeyAuthorizationPolicyInfo.getId(); - - // Assert - assertEquals(expectedId, actualId); - } - - @Test - public void testGetSetName() { - // Arrange - String expectedName = "expectedName"; - ContentKeyAuthorizationPolicyInfo contentKeyAuthorizationPolicyInfo = new ContentKeyAuthorizationPolicyInfo( - null, new ContentKeyAuthorizationPolicyType().setName(expectedName)); - - // Act - String actualName = contentKeyAuthorizationPolicyInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyOptionEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyOptionEntityTest.java deleted file mode 100644 index 8f517f4456a4..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyOptionEntityTest.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.contentprotection; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import java.net.URLEncoder; -import java.util.ArrayList; -import java.util.List; - -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyOptionType; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyOption; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyOptionInfo; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyRestriction; - -/** - * Tests for the methods and factories of the Asset entity. - */ -public class ContentKeyAuthorizationPolicyOptionEntityTest { - private static final String ENTITY_SET = "ContentKeyAuthorizationPolicyOptions"; - private static final String sampleCKAPOId = "nb:ckpoid:UUID:c244a5a7-a3d9-4ba0-a707-4336554f09b2"; - private static final String sampleCKAPOName = "sampleContentKeyAuthPolicyOptName"; - private static final String sampleCKAPOKDC = "sampleKeyDeliveryConfiguration"; - private final String expectedUri = String.format("%s('%s')", ENTITY_SET, URLEncoder.encode(sampleCKAPOId, "UTF-8")); - - public ContentKeyAuthorizationPolicyOptionEntityTest() throws Exception { - } - - @Test - public void ckapoCreateReturnsValidPayload() throws ServiceException { - List restrictions = new ArrayList(); - ContentKeyAuthorizationPolicyOptionType payload = (ContentKeyAuthorizationPolicyOptionType) ContentKeyAuthorizationPolicyOption - .create(sampleCKAPOName, 2, sampleCKAPOKDC, restrictions).getRequestContents(); - - assertNotNull(payload); - assertNull(payload.getId()); - assertEquals(payload.getName(), sampleCKAPOName); - assertEquals(payload.getKeyDeliveryType(), 2); - assertEquals(payload.getKeyDeliveryConfiguration(), sampleCKAPOKDC); - assertNotNull(payload.getRestrictions()); - } - - @Test - public void ckapoGetReturnsExpectedUri() throws Exception { - EntityGetOperation getter = ContentKeyAuthorizationPolicyOption - .get(sampleCKAPOId); - - assertEquals(expectedUri, getter.getUri()); - } - - @Test - public void ckapoListReturnsExpectedUri() { - EntityListOperation lister = ContentKeyAuthorizationPolicyOption - .list(); - - assertEquals(ENTITY_SET, lister.getUri()); - assertNotNull(lister.getQueryParameters()); - assertEquals(0, lister.getQueryParameters().size()); - } - - @Test - public void ckapoListCanTakeQueryParameters() { - EntityListOperation lister = ContentKeyAuthorizationPolicyOption.list() - .setTop(10).setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void ckapoListCanTakeQueryParametersChained() { - EntityListOperation lister = ContentKeyAuthorizationPolicyOption.list() - .setTop(10).setSkip(2).set("filter", "something"); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals("something", lister.getQueryParameters().getFirst("filter")); - assertEquals(3, lister.getQueryParameters().size()); - } - - @Test - public void ckapoDeleteReturnsExpectedUri() throws Exception { - EntityDeleteOperation deleter = ContentKeyAuthorizationPolicyOption.delete(sampleCKAPOId); - - assertEquals(expectedUri, deleter.getUri()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyOptionInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyOptionInfoTest.java deleted file mode 100644 index c5128f90d42f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyOptionInfoTest.java +++ /dev/null @@ -1,110 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.contentprotection; - -import static org.junit.Assert.assertEquals; - -import java.util.ArrayList; -import java.util.List; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyOptionType; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyAuthorizationPolicyRestrictionType; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyOptionInfo; -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyRestriction; - -public class ContentKeyAuthorizationPolicyOptionInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "expectedId"; - ContentKeyAuthorizationPolicyOptionInfo contentKeyAuthorizationPolicyOptionInfo = new ContentKeyAuthorizationPolicyOptionInfo( - null, new ContentKeyAuthorizationPolicyOptionType().setId(expectedId)); - - // Act - String actualId = contentKeyAuthorizationPolicyOptionInfo.getId(); - - // Assert - assertEquals(expectedId, actualId); - } - - @Test - public void testGetSetName() { - // Arrange - String expectedName = "expectedName"; - ContentKeyAuthorizationPolicyOptionInfo contentKeyAuthorizationPolicyOptionInfo = new ContentKeyAuthorizationPolicyOptionInfo( - null, new ContentKeyAuthorizationPolicyOptionType().setName(expectedName)); - - // Act - String actualName = contentKeyAuthorizationPolicyOptionInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } - - @Test - public void testGetSetKeyDeliveryConfiguration() { - // Arrange - String expectedKeyDeliveryConfiguration = "expectedKeyDeliveryConfiguration"; - ContentKeyAuthorizationPolicyOptionInfo contentKeyAuthorizationPolicyOptionInfo = new ContentKeyAuthorizationPolicyOptionInfo( - null, new ContentKeyAuthorizationPolicyOptionType() - .setKeyDeliveryConfiguration(expectedKeyDeliveryConfiguration)); - - // Act - String actualKeyDeliveryConfiguration = contentKeyAuthorizationPolicyOptionInfo.getKeyDeliveryConfiguration(); - - // Assert - assertEquals(expectedKeyDeliveryConfiguration, actualKeyDeliveryConfiguration); - - } - - @Test - public void testGetSetKeyDeliveryType() { - // Arrange - int expectedKeyDeliveryType = 2; - ContentKeyAuthorizationPolicyOptionInfo contentKeyAuthorizationPolicyOptionInfo = new ContentKeyAuthorizationPolicyOptionInfo( - null, new ContentKeyAuthorizationPolicyOptionType().setKeyDeliveryType(expectedKeyDeliveryType)); - - // Act - int actualKeyDeliveryType = contentKeyAuthorizationPolicyOptionInfo.getKeyDeliveryType(); - - // Assert - assertEquals(expectedKeyDeliveryType, actualKeyDeliveryType); - } - - @Test - public void testGetSetRestrictions() { - // Arrange - String expectedRestrictionName = "expectedRestriction"; - String expectedRestrictionReq = ""; - int expectedRestrictionType = 2; - List settedRestrictions = new ArrayList(); - settedRestrictions.add(new ContentKeyAuthorizationPolicyRestrictionType().setName(expectedRestrictionName) - .setKeyRestrictionType(expectedRestrictionType).setRequirements(expectedRestrictionReq)); - ContentKeyAuthorizationPolicyOptionInfo contentKeyAuthorizationPolicyOptionInfo = new ContentKeyAuthorizationPolicyOptionInfo( - null, new ContentKeyAuthorizationPolicyOptionType().setRestrictions(settedRestrictions)); - - // Act - List actualRestrictions = contentKeyAuthorizationPolicyOptionInfo - .getRestrictions(); - - // Assert - assertEquals(actualRestrictions.get(0).getName(), expectedRestrictionName); - assertEquals(actualRestrictions.get(0).getKeyRestrictionType(), expectedRestrictionType); - assertEquals(actualRestrictions.get(0).getRequirements(), expectedRestrictionReq); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyRestrictionTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyRestrictionTest.java deleted file mode 100644 index 739b91fd1ce2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/contentprotection/ContentKeyAuthorizationPolicyRestrictionTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.contentprotection; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.models.ContentKeyAuthorizationPolicyRestriction; - -/** - * Tests for the methods and factories of the Asset entity. - */ -public class ContentKeyAuthorizationPolicyRestrictionTest { - - @Test - public void roundTripTest() { - // provides full code coverage - assertEquals(ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.Open, ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.valueOf("Open")); - assertEquals(ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.TokenRestricted, ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.valueOf("TokenRestricted")); - assertEquals(ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.IPRestricted, ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.valueOf("IPRestricted")); - } - - @Test - public void getValueOfContentKeyRestrictionTypeTest() { - // provides full code coverage - assertEquals(ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.Open.getValue(), 0); - assertEquals(ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.TokenRestricted.getValue(), 1); - assertEquals(ContentKeyAuthorizationPolicyRestriction.ContentKeyRestrictionType.IPRestricted.getValue(), 2); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/LinkRetrievalTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/LinkRetrievalTest.java deleted file mode 100644 index 2d027a525238..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/LinkRetrievalTest.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import javax.xml.bind.JAXBElement; -import javax.xml.namespace.QName; - -import org.junit.Before; -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.atom.LinkType; -import com.microsoft.windowsazure.services.media.implementation.content.Constants; -import com.microsoft.windowsazure.services.media.implementation.content.MediaProcessorType; -import com.microsoft.windowsazure.services.media.models.LinkInfo; -import com.microsoft.windowsazure.services.media.models.MediaProcessorInfo; - -/** - * Testing retrieval of links from ATOM entities - * - */ -public class LinkRetrievalTest { - private static QName linkName = new QName("link", Constants.ATOM_NS); - private MediaProcessorInfo info; - private LinkType link1; - private LinkType link2; - - @Before - public void setup() { - EntryType entry = new EntryType(); - - link1 = new LinkType(); - link1.setTitle("someLink"); - link1.setRel("Related/something"); - link1.setHref("some/uri/somewhere"); - - link2 = new LinkType(); - link2.setTitle("someOtherLink"); - link2.setRel("Related/else"); - link2.setHref("some/other/href/somewhere"); - - entry.getEntryChildren().add( - new JAXBElement(linkName, LinkType.class, link1)); - entry.getEntryChildren().add( - new JAXBElement(linkName, LinkType.class, link2)); - - MediaProcessorType payload = new MediaProcessorType().setId("DummyId") - .setName("Dummy Name").setVersion("0.0.0").setVendor("Contoso") - .setSku("sku skiddo").setDescription("For testing links only"); - - ContentType contentElement = new ContentType(); - contentElement.getContent().add( - new JAXBElement( - Constants.ODATA_PROPERTIES_ELEMENT_NAME, - MediaProcessorType.class, payload)); - - entry.getEntryChildren().add( - new JAXBElement( - Constants.ATOM_CONTENT_ELEMENT_NAME, ContentType.class, - contentElement)); - - info = new MediaProcessorInfo(entry, payload); - } - - @Test - public void canRetrieveSingleLinkFromEntity() { - assertTrue(info.hasLink(link1.getRel())); - } - - @Test - public void getFalseWhenLinkIsntThere() { - assertFalse(info.hasLink("noSuchLink")); - } - - @Test - public void canRetrieveEntireLinkByRel() { - LinkInfo link = info.getLink(link2.getRel()); - - assertLinksEqual(link2, link); - } - - @Test - public void getNullWhenLinkIsntThere() { - assertNull(info.getLink("noSuchLink")); - } - - private static void assertLinksEqual(LinkType expected, LinkInfo actual) { - assertEquals(expected.getHref(), actual.getHref()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperationsTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperationsTest.java deleted file mode 100644 index 05615e3c458b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperationsTest.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.net.URI; - -import javax.mail.MessagingException; -import javax.mail.internet.MimeMultipart; -import javax.ws.rs.core.UriBuilder; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.ParserConfigurationException; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.models.Job; -import com.microsoft.windowsazure.services.media.models.Task; - -public class MediaBatchOperationsTest { - - @Test - public void createMediaBatchOperationSuccess() throws JAXBException, - ParserConfigurationException { - // Arrange - URI serviceUri = UriBuilder.fromPath("http://www.contoso.com/media") - .build(); - - // Act - MediaBatchOperations mediaBatchOperations = new MediaBatchOperations( - serviceUri); - - // Assert - assertNotNull(mediaBatchOperations); - - } - - @Test(expected = IllegalArgumentException.class) - public void createMediaBatchOperationFailedWithNullUri() - throws JAXBException, ParserConfigurationException { - // Arrange - URI serviceUri = null; - - // Act - @SuppressWarnings("unused") - MediaBatchOperations mediaBatchOperations = new MediaBatchOperations( - serviceUri); - - // Assert - assertTrue(false); - - } - - @Test - public void addCreateJobOperationToMediaBatchOperationsSuccess() - throws JAXBException, ParserConfigurationException { - // Arrange - URI serviceUri = UriBuilder.fromPath("http://www.contoso.com/media") - .build(); - Job.CreateBatchOperation createJobOperation = new Job.CreateBatchOperation( - serviceUri); - - // Act - MediaBatchOperations mediaBatchOperations = new MediaBatchOperations( - serviceUri); - mediaBatchOperations.addOperation(createJobOperation); - - // Assert - assertNotNull(mediaBatchOperations); - assertEquals(1, mediaBatchOperations.getOperations().size()); - - } - - @Test - public void addCreateTaskOperationToMediaBatchOperationsSuccess() - throws JAXBException, ParserConfigurationException { - // Arrange - URI serviceUri = UriBuilder.fromPath("http://www.contoso.com/media") - .build(); - String mediaProcessorId = "testMediaProcessorId"; - String taskBody = "testTaskBody"; - - Task.CreateBatchOperation taskCreateBatchOperation = new Task.CreateBatchOperation( - mediaProcessorId, taskBody); - - // Act - MediaBatchOperations mediaBatchOperations = new MediaBatchOperations( - serviceUri); - mediaBatchOperations.addOperation(taskCreateBatchOperation); - - // Assert - assertNotNull(mediaBatchOperations); - assertEquals(1, mediaBatchOperations.getOperations().size()); - } - - @Test - public void getMimeMultipartSuccess() throws JAXBException, - ParserConfigurationException, MessagingException, IOException { - // Arrange - String mediaProcessorId = "testMediaProcessorId"; - String taskBody = "testTaskBody"; - URI serviceUri = UriBuilder.fromPath("http://www.contoso.com/media") - .build(); - Task.CreateBatchOperation taskCreateBatchOperation = new Task.CreateBatchOperation( - mediaProcessorId, taskBody); - Job.CreateBatchOperation jobCreateBatchOperation = new Job.CreateBatchOperation( - serviceUri); - - // Act - MediaBatchOperations mediaBatchOperations = new MediaBatchOperations( - serviceUri); - mediaBatchOperations.addOperation(jobCreateBatchOperation); - mediaBatchOperations.addOperation(taskCreateBatchOperation); - MimeMultipart mimeMultipart = mediaBatchOperations.getMimeMultipart(); - - // Assert - assertNotNull(mediaBatchOperations); - assertEquals(2, mediaBatchOperations.getOperations().size()); - assertNotNull(mimeMultipart); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataDateParsingTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataDateParsingTest.java deleted file mode 100644 index 8e46df841647..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataDateParsingTest.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import static org.junit.Assert.assertEquals; - -import java.util.Calendar; -import java.util.Date; -import java.util.GregorianCalendar; -import java.util.TimeZone; - -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests around parsing dates - OData requires date strings without timezones be - * treated as UTC. ISO spec, and Java default, is to use local timezone. So we - * need to plug in to tweak Jaxb to use OData conventions. - * - */ -public class ODataDateParsingTest { - private static TimeZone utc; - private static TimeZone pst; - - @BeforeClass - public static void setupClass() { - utc = TimeZone.getDefault(); - utc.setRawOffset(0); - - pst = TimeZone.getDefault(); - pst.setRawOffset(-8 * 60 * 60 * 1000); - } - - @Test - public void canConvertDateToString() throws Exception { - - Calendar sampleTime = new GregorianCalendar(2012, 11, 28, 17, 43, 12); - sampleTime.setTimeZone(utc); - - Date sampleDate = sampleTime.getTime(); - - String formatted = new ODataDateAdapter().marshal(sampleDate); - - assertEquals("2012-12-28T17:43:12Z", formatted); - - } - - @Test - public void stringWithTimezoneRoundTripsCorrectly() throws Exception { - String exampleDate = "2012-11-28T17:43:12-08:00"; - - Date parsedTime = new ODataDateAdapter().unmarshal(exampleDate); - - Calendar expectedTime = new GregorianCalendar(2012, 10, 28, 17, 43, 12); - expectedTime.setTimeZone(pst); - - assertEquals(expectedTime.getTimeInMillis(), parsedTime.getTime()); - } - - @Test - public void stringWithUTCTimezoneRoundTripsCorrectly() throws Exception { - String exampleDate = "2012-11-28T17:43:12Z"; - - Date parsedTime = new ODataDateAdapter().unmarshal(exampleDate); - - Calendar expectedTime = new GregorianCalendar(2012, 10, 28, 17, 43, 12); - expectedTime.setTimeZone(utc); - - assertEquals(expectedTime.getTimeInMillis(), parsedTime.getTime()); - } - - @Test - public void stringWithNoTimezoneActsAsUTC() throws Exception { - String exampleDate = "2012-11-28T17:43:12"; - - Date parsedTime = new ODataDateAdapter().unmarshal(exampleDate); - - Calendar expectedTime = new GregorianCalendar(2012, 10, 28, 17, 43, 12); - expectedTime.setTimeZone(utc); - - assertEquals(expectedTime.getTimeInMillis(), parsedTime.getTime()); - } - - @Test - public void stringWithFractionalTimeReturnsCorrectMillisecondsTo100nsBoundary() - throws Exception { - String exampleDate = "2012-11-28T17:43:12.1234567Z"; - - Date parsedTime = new ODataDateAdapter().unmarshal(exampleDate); - - Calendar timeToNearestSecond = Calendar.getInstance(); - timeToNearestSecond.setTimeZone(utc); - timeToNearestSecond.set(2012, 10, 28, 17, 43, 12); - timeToNearestSecond.set(Calendar.MILLISECOND, 0); - - long millis = parsedTime.getTime() - - timeToNearestSecond.getTimeInMillis(); - - assertEquals(123, millis); - } - - @Test - public void stringWithFractionalTimeReturnsCorrectMillisecondsAsFractionNotCount() - throws Exception { - String exampleDate = "2012-11-28T17:43:12.1Z"; - - Date parsedTime = new ODataDateAdapter().unmarshal(exampleDate); - - Calendar timeToNearestSecond = Calendar.getInstance(); - timeToNearestSecond.setTimeZone(utc); - timeToNearestSecond.set(2012, 10, 28, 17, 43, 12); - timeToNearestSecond.set(Calendar.MILLISECOND, 0); - - long millis = parsedTime.getTime() - - timeToNearestSecond.getTimeInMillis(); - assertEquals(100, millis); - - } - - @Test - public void stringWithFractionalSecondsAndTimezoneOffsetParses() - throws Exception { - String exampleDate = "2012-11-28T17:43:12.1-08:00"; - Date parsedTime = new ODataDateAdapter().unmarshal(exampleDate); - - Calendar expectedTime = new GregorianCalendar(2012, 10, 28, 17, 43, 12); - expectedTime.setTimeZone(pst); - expectedTime.set(Calendar.MILLISECOND, 100); - - assertEquals(expectedTime.getTimeInMillis(), parsedTime.getTime()); - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataSerializationFromJerseyTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataSerializationFromJerseyTest.java deleted file mode 100644 index 1cbb12fc34e9..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataSerializationFromJerseyTest.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.net.URISyntaxException; -import java.util.List; - -import javax.ws.rs.core.MediaType; - -import org.junit.Assert; -import org.junit.Test; - -import com.microsoft.windowsazure.core.UserAgentFilter; -import com.microsoft.windowsazure.core.utils.DefaultDateFactory; -import com.microsoft.windowsazure.services.media.IntegrationTestBase; -import com.microsoft.windowsazure.services.media.MediaConfiguration; -import com.microsoft.windowsazure.services.media.MediaContract; -import com.microsoft.windowsazure.services.media.authentication.AzureAdTokenProvider; -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.WebResource; -import com.sun.jersey.api.client.config.ClientConfig; -import com.sun.jersey.api.client.config.DefaultClientConfig; -import com.sun.jersey.api.json.JSONConfiguration; - -public class ODataSerializationFromJerseyTest extends IntegrationTestBase { - - @Test - public void canBuildJerseyClientToCreateAnAssetWhichIsProperlyDeserialized() - throws Exception { - // Build a jersey client object by hand; this is working up to the - // full integration into the media services rest proxy, but we - // need to go step by step to begin. - - ClientConfig cc = new DefaultClientConfig(); - cc.getProperties().put(ClientConfig.PROPERTY_FOLLOW_REDIRECTS, false); - cc.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, true); - cc.getSingletons().add(new ODataEntityProvider()); - Client c = Client.create(cc); - - // c.addFilter(new LoggingFilter(System.out)); - c.addFilter(new RedirectFilter(createLocationManager())); - c.addFilter(new OAuthFilter(tokenProvider)); - c.addFilter(new VersionHeadersFilter()); - - WebResource assetResource = c.resource("Assets"); - - ODataAtomMarshaller m = new ODataAtomMarshaller(); - AssetType requestData = new AssetType(); - requestData.setName(testAssetPrefix + "firstTestAsset"); - requestData.setAlternateId("some external id"); - - AssetInfo newAsset = assetResource.type(MediaType.APPLICATION_ATOM_XML) - .accept(MediaType.APPLICATION_ATOM_XML) - .post(AssetInfo.class, m.marshalEntry(requestData)); - - Assert.assertNotNull(newAsset); - Assert.assertEquals(testAssetPrefix + "firstTestAsset", - newAsset.getName()); - Assert.assertEquals("some external id", newAsset.getAlternateId()); - } - - private ResourceLocationManager createLocationManager() - throws URISyntaxException { - return new ResourceLocationManager( - (String) config.getProperty(MediaConfiguration.AZURE_AD_API_SERVER)); - } - - @Test - public void canCreateAssetThroughMediaServiceAPI() throws Exception { - MediaContract client = createService(); - AssetInfo newAsset = client.create(Asset.create().setName( - testAssetPrefix + "secondTestAsset")); - - Assert.assertEquals(testAssetPrefix + "secondTestAsset", - newAsset.getName()); - } - - @Test - public void canRetrieveListOfAssets() throws Exception { - MediaContract client = createService(); - List assets = client.list(Asset.list()); - - Assert.assertNotNull(assets); - } - - private MediaContract createService() { - return config.create(MediaContract.class); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataSerializationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataSerializationTest.java deleted file mode 100644 index ee91f1291fad..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ODataSerializationTest.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.util.List; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.Marshaller; -import javax.xml.namespace.QName; - -import org.junit.Assert; -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; -import com.microsoft.windowsazure.services.media.implementation.content.Constants; -import com.microsoft.windowsazure.services.media.models.AssetInfo; - -public class ODataSerializationTest { - - private final String sampleFeedOneAsset = "\n" - + "\n" - + " https://wamsbayclus001rest-hs.cloudapp.net/api/Assets\n" - + " Assets\n" - + " 2012-08-28T18:35:15Z\n" - + " \n" - + " \n" - + " https://wamsbayclus001rest-hs.cloudapp.net/api/Assets('nb%3Acid%3AUUID%3A1f6c7bb4-8013-486e-b4c9-2e4a6842b9a6')\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " <updated>2012-08-28T18:35:15Z</updated>\n" - + " <author>\n" - + " <name />\n" - + " </author>\n" - + " <m:action metadata=\"https://wamsbayclus001rest-hs.cloudapp.net/api/$metadata#WindowsAzureMediaServices.Publish\" title=\"Publish\" target=\"https://wamsbayclus001rest-hs.cloudapp.net/api/Assets('nb%3Acid%3AUUID%3A1f6c7bb4-8013-486e-b4c9-2e4a6842b9a6')/Publish\" />\n" - + " <content type=\"application/xml\">\n" - + " <m:properties>\n" - + " <d:Id>nb:cid:UUID:1f6c7bb4-8013-486e-b4c9-2e4a6842b9a6</d:Id>\n" - + " <d:State m:type=\"Edm.Int32\">0</d:State>\n" - + " <d:Created m:type=\"Edm.DateTime\">2012-08-28T18:34:06.123</d:Created>\n" - + " <d:LastModified m:type=\"Edm.DateTime\">2012-08-28T18:34:06.123</d:LastModified>\n" - + " <d:AlternateId m:null=\"true\" />\n" - + " <d:Name>testAsset</d:Name>\n" - + " <d:Options m:type=\"Edm.Int32\">0</d:Options>\n" - + " </m:properties>\n" - + " </content>\n" - + " </entry>\n" - + "</feed>"; - - @Test - public void canUnmarshallAssetFromFeed() throws Exception { - ODataAtomUnmarshaller um = new ODataAtomUnmarshaller(); - InputStream input = new ByteArrayInputStream( - sampleFeedOneAsset.getBytes("UTF-8")); - List<AssetInfo> entries = um.unmarshalFeed(input, AssetInfo.class); - Assert.assertEquals(1, entries.size()); - Assert.assertEquals("nb:cid:UUID:1f6c7bb4-8013-486e-b4c9-2e4a6842b9a6", - entries.get(0).getId()); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Test - public void canMarshalEntryFromJavaObject() throws Exception { - AssetType a = new AssetType(); - a.setName("testNewAsset"); - a.setOptions(0); - a.setAlternateId("some other id"); - - JAXBContext context = JAXBContext.newInstance(EntryType.class, - AssetType.class); - Marshaller m = context.createMarshaller(); - - EntryType e = new EntryType(); - ContentType c = new ContentType(); - c.getContent().add( - new JAXBElement(Constants.ODATA_PROPERTIES_ELEMENT_NAME, - AssetType.class, a)); - e.getEntryChildren().add( - new JAXBElement(Constants.ATOM_CONTENT_ELEMENT_NAME, - ContentType.class, c)); - - m.marshal(new JAXBElement(new QName(Constants.ATOM_NS, "entry"), - EntryType.class, e), System.out); - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/RedirectionFilterTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/RedirectionFilterTest.java deleted file mode 100644 index b87632d6250f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/RedirectionFilterTest.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import static org.junit.Assert.assertEquals; - -import javax.ws.rs.core.MultivaluedMap; - -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.mockito.Mockito; - -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.ClientHandlerException; -import com.sun.jersey.api.client.ClientRequest; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.filter.ClientFilter; -import com.sun.jersey.core.header.InBoundHeaders; - -public class RedirectionFilterTest { - @Rule - public ExpectedException thrown = ExpectedException.none(); - - private final String originalBaseURI = "https://base.somewhere.example/API/"; - private final String redirectedBaseURI = "http://redirected.somewhere.example/Stuff/"; - - @Test - public void whenInvokedAndNotRedirected_shouldAddBaseURIToRequest() - throws Exception { - RequestRecordingFilter sink = new RequestRecordingFilter(); - Client c = Client.create(); - c.addFilter(sink); - c.addFilter(new RedirectFilter(new ResourceLocationManager( - originalBaseURI))); - - c.resource("Files").get(ClientResponse.class); - - assertEquals(originalBaseURI + "Files", sink.request.getURI() - .toString()); - } - - @Test - public void whenInvokedAndRedirected_shouldHaveRedirectedURIInRequest() - throws Exception { - RequestRecordingFilter sink = new RequestRecordingFilter(); - Client c = Client.create(); - c.addFilter(sink); - c.addFilter(new RedirectingTestFilter(originalBaseURI, - redirectedBaseURI)); - - c.addFilter(new RedirectFilter(new ResourceLocationManager( - originalBaseURI))); - - ClientResponse response = c.resource("Things") - .get(ClientResponse.class); - - assertEquals(200, response.getStatus()); - assertEquals(redirectedBaseURI + "Things", sink.request.getURI() - .toString()); - } - - @Test - public void whenRedirectedMultipleTimes_requestEndsUpAtFinalRediret() - throws Exception { - RequestRecordingFilter sink = new RequestRecordingFilter(); - Client c = Client.create(); - c.addFilter(sink); - c.addFilter(new RedirectingTestFilter("https://a.example/API/", - "https://b.example/API/")); - c.addFilter(new RedirectingTestFilter("https://b.example/API/", - "https://c.example/API/")); - c.addFilter(new RedirectingTestFilter("https://c.example/API/", - "https://final.example/Code/")); - - c.addFilter(new RedirectFilter(new ResourceLocationManager( - "https://a.example/API/"))); - - ClientResponse response = c.resource("Stuff").get(ClientResponse.class); - - assertEquals(200, response.getStatus()); - - assertEquals("https://final.example/Code/Stuff", sink.request.getURI() - .toString()); - } - - @Test - public void whenRedirectingToNull_shouldGetClientException() - throws Exception { - RequestRecordingFilter sink = new RequestRecordingFilter(); - Client c = Client.create(); - c.addFilter(sink); - c.addFilter(new RedirectingTestFilter(originalBaseURI, null)); - c.addFilter(new RedirectFilter(new ResourceLocationManager( - originalBaseURI))); - - thrown.expect(ClientHandlerException.class); - c.resource("Something").get(ClientResponse.class); - } - - @Test - public void whenRedirectingToBadURI_shouldGetClientException() - throws Exception { - RequestRecordingFilter sink = new RequestRecordingFilter(); - Client c = Client.create(); - c.addFilter(sink); - c.addFilter(new RedirectingTestFilter(originalBaseURI, - "no way this is valid!")); - c.addFilter(new RedirectFilter(new ResourceLocationManager( - originalBaseURI))); - - thrown.expect(ClientHandlerException.class); - c.resource("Something").get(ClientResponse.class); - } - - // Test support classes - - // - // Filter that acts as a "sink" so the request doesn't go out over - // the wire. Also holds onto the request object that went through - // the pipeline so that it can be asserted against in the test. - // - private class RequestRecordingFilter extends ClientFilter { - public ClientRequest request; - - @Override - public ClientResponse handle(ClientRequest request) - throws ClientHandlerException { - this.request = request; - - ClientResponse response = Mockito.mock(ClientResponse.class); - Mockito.when(response.getStatus()).thenReturn(200); - return response; - } - } - - // - // Filter that will 301-redirect requests depending on which URI - // the request goes to. - // - - private class RedirectingTestFilter extends ClientFilter { - private final String uriToRedirect; - private final String uriRedirectedTo; - - public RedirectingTestFilter(String uriToRedirect, - String uriRedirectedTo) { - this.uriToRedirect = uriToRedirect; - this.uriRedirectedTo = uriRedirectedTo; - } - - @Override - public ClientResponse handle(ClientRequest request) - throws ClientHandlerException { - - if (request.getURI().toString().startsWith(uriToRedirect)) { - ClientResponse response = Mockito.mock(ClientResponse.class); - Mockito.when(response.getClientResponseStatus()).thenReturn( - ClientResponse.Status.MOVED_PERMANENTLY); - MultivaluedMap<String, String> headers = new InBoundHeaders(); - headers.add("location", uriRedirectedTo); - Mockito.when(response.getHeaders()).thenReturn(headers); - return response; - } else { - return getNext().handle(request); - } - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ResourceLocationManagerTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ResourceLocationManagerTest.java deleted file mode 100644 index f7585471f74a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/ResourceLocationManagerTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import static org.junit.Assert.assertEquals; - -import java.net.URI; - -import org.junit.Test; - -public class ResourceLocationManagerTest { - - @Test - public void testCanCreateWithBaseUri() throws Exception { - String baseUri = "https://base.uri.example"; - ResourceLocationManager m = new ResourceLocationManager(baseUri); - - assertEquals(baseUri, m.getBaseURI().toString()); - } - - @Test - public void testWhenCallingGetRedirectedURI_shouldReturnURIWithBaseURIPreprended() - throws Exception { - String baseURI = "http://base.uri.example/path/"; - ResourceLocationManager m = new ResourceLocationManager(baseURI); - - URI originalURI = new URI("Assets"); - - URI redirectedURI = m.getRedirectedURI(originalURI); - - assertEquals(baseURI + "Assets", redirectedURI.toString()); - } - - @Test - public void settingBaseURIAfterRedirecting_shouldReturnURIWithNewBaseURI() - throws Exception { - String baseURI = "http://base.uri.example/path/"; - String redirectedBaseURI = "http://other.uri.example/API/"; - ResourceLocationManager m = new ResourceLocationManager(baseURI); - - URI targetURI = new URI("Assets"); - - URI originalURI = m.getRedirectedURI(targetURI); - m.setRedirectedURI(redirectedBaseURI); - URI redirectedURI = m.getRedirectedURI(targetURI); - - assertEquals(baseURI + "Assets", originalURI.toString()); - assertEquals(redirectedBaseURI + "Assets", redirectedURI.toString()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/SASTokenFilterTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/SASTokenFilterTest.java deleted file mode 100644 index 5fd980cb7d37..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/SASTokenFilterTest.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.net.URI; -import java.util.HashMap; -import java.util.Map; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mockito; - -import com.sun.jersey.api.client.Client; -import com.sun.jersey.api.client.ClientHandlerException; -import com.sun.jersey.api.client.ClientRequest; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.WebResource; -import com.sun.jersey.api.client.filter.ClientFilter; - -public class SASTokenFilterTest { - - private final String sampleSASToken = "st=2012-10-05T21%3A10%3A25Z&se=2012-10-05T21%3A15%3A25Z&sr=c&si=89fa57b4-293f-40df-a0cb-9d84ee493b8c&sig=iMDPr8V%2FIJrYG8t2GeSqBh5tTUdM7ykOObFVICa%2F%2F1Q%3D"; - private RequestRecordingFilter sink; - private Client client; - - @Before - public void setup() throws Exception { - sink = new RequestRecordingFilter(); - client = Client.create(); - client.addFilter(sink); - client.addFilter(new SASTokenFilter(sampleSASToken)); - } - - @Test - public void filterAddsQueryParameterToRequestUrl() throws Exception { - - WebResource r = client - .resource("http://astorageaccount.blob.something.example/asset-abcd"); - - r.get(ClientResponse.class); - - assertContainsSASToken(sink.request.getURI()); - } - - @Test - public void filterPreservesQueryParameters() throws Exception { - client.resource("http://storage.service.example/asset-efgh") - .queryParam("param0", "first").queryParam("param1", "second") - .get(ClientResponse.class); - - assertContainsSASToken(sink.request.getURI()); - - Map<String, String> queryParams = parseQueryParameters(sink.request - .getURI()); - assertTrue(queryParams.containsKey("param0")); - assertTrue(queryParams.containsKey("param1")); - assertEquals("first", queryParams.get("param0")); - assertEquals("second", queryParams.get("param1")); - } - - // Test support code - - // - // Filter that acts as a "sink" so the request doesn't go out over - // the wire. Also holds onto the request object that went through - // the pipeline so that it can be asserted against in the test. - // - private class RequestRecordingFilter extends ClientFilter { - public ClientRequest request; - - @Override - public ClientResponse handle(ClientRequest request) - throws ClientHandlerException { - this.request = request; - - ClientResponse response = Mockito.mock(ClientResponse.class); - Mockito.when(response.getStatus()).thenReturn(200); - return response; - } - } - - // Assertion helpers - - private void assertContainsSASToken(URI uri) { - Map<String, String> queryParams = parseQueryParameters(uri); - - assertTrue(queryParams.containsKey("st")); - assertTrue(queryParams.containsKey("se")); - assertTrue(queryParams.containsKey("sr")); - assertTrue(queryParams.containsKey("si")); - assertTrue(queryParams.containsKey("sig")); - - assertEquals("iMDPr8V%2FIJrYG8t2GeSqBh5tTUdM7ykOObFVICa%2F%2F1Q%3D", - queryParams.get("sig")); - } - - // Simplistic parsing of query parameters into map so we can assert against - // contents - // easily. - private Map<String, String> parseQueryParameters(URI uri) { - HashMap<String, String> queryParameters = new HashMap<String, String>(); - String queryString = uri.getRawQuery(); - if (queryString.startsWith("?")) { - queryString = queryString.substring(1); - } - - String[] parameters = queryString.split("&"); - - for (String param : parameters) { - int firstEqualIndex = param.indexOf('='); - String paramName = param.substring(0, firstEqualIndex); - String value = param.substring(firstEqualIndex + 1); - - queryParameters.put(paramName, value); - } - return queryParameters; - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/StatusLineTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/StatusLineTest.java deleted file mode 100644 index 18a74eddbd77..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/StatusLineTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.implementation; - -import static org.junit.Assert.assertEquals; - -import java.io.ByteArrayInputStream; - -import javax.activation.DataSource; - -import org.junit.Test; - -import com.microsoft.windowsazure.core.utils.InputStreamDataSource; - -public class StatusLineTest { - - @Test - public void testCanCreateStatus() throws Exception { - // Arrange - String httpResponse = "HTTP/1.1 200 OK"; - int expectedStatus = 200; - String expectedReason = "OK"; - ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream( - httpResponse.getBytes()); - DataSource dataSource = new InputStreamDataSource(byteArrayInputStream, - "defaultContentType"); - - // Act - StatusLine statusLine = StatusLine.create(dataSource); - - // Assert - assertEquals(expectedStatus, statusLine.getStatus()); - assertEquals(expectedReason, statusLine.getReason()); - } - - @Test - public void testGetSetStatus() { - // Arrange - String httpResponse = "HTTP/1.1 200 OK"; - int expectedStatus = 300; - String expectedReason = "NotOK"; - ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream( - httpResponse.getBytes()); - DataSource dataSource = new InputStreamDataSource(byteArrayInputStream, - "defaultContentType"); - StatusLine statusLine = StatusLine.create(dataSource); - - // Act - statusLine.setStatus(expectedStatus); - statusLine.setReason(expectedReason); - - // Assert - assertEquals(expectedStatus, statusLine.getStatus()); - assertEquals(expectedReason, statusLine.getReason()); - } - - @Test - public void testGetSetReason() { - - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/AgcAndColorStripeRestrictionTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/AgcAndColorStripeRestrictionTests.java deleted file mode 100644 index bbfdedb0b647..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/AgcAndColorStripeRestrictionTests.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import static org.junit.Assert.*; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.AgcAndColorStripeRestriction; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ErrorMessages; - -public class AgcAndColorStripeRestrictionTests { - - @Test - public void NewAgcAndColorStripeRestrictionTests() { - // Arrange - byte expectedConfigurationData = 2; - - // Act - AgcAndColorStripeRestriction agcAndColorStripeRestriction = new AgcAndColorStripeRestriction( - expectedConfigurationData); - byte resultConfigurationData = agcAndColorStripeRestriction.getConfigurationData(); - - // Assert - assertEquals(expectedConfigurationData, resultConfigurationData); - } - - @Test - public void BadConfigurationDataAgcAndColorStripeRestrictionShouldThrown() { - // Arrange - byte expectedConfigurationData = 4; - - // Act - try { - @SuppressWarnings("unused") - AgcAndColorStripeRestriction agcAndColorStripeRestriction = new AgcAndColorStripeRestriction( - expectedConfigurationData); - fail("Should Thrown"); - - } catch (IllegalArgumentException e) { - // Assert - assertEquals(e.getMessage(), ErrorMessages.INVALID_TWO_BIT_CONFIGURATION_DATA); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ExplicitAnalogTelevisionRestrictionTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ExplicitAnalogTelevisionRestrictionTests.java deleted file mode 100644 index f3e81330d7e2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ExplicitAnalogTelevisionRestrictionTests.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import static org.junit.Assert.*; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ErrorMessages; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ExplicitAnalogTelevisionRestriction; - -public class ExplicitAnalogTelevisionRestrictionTests { - - @Test - public void NewExplicitAnalogTelevisionRestrictionTest() { - // Arrange - boolean expectedBestEffort = true; - byte expectedConfigurationData = 2; - - // Act - ExplicitAnalogTelevisionRestriction explicitAnalogTelevisionRestriction = new ExplicitAnalogTelevisionRestriction( - expectedBestEffort, expectedConfigurationData); - boolean resultBestEffort = explicitAnalogTelevisionRestriction.isBestEffort(); - byte resultConfigurationData = explicitAnalogTelevisionRestriction.getConfigurationData(); - - // Assert - assertEquals(expectedBestEffort, resultBestEffort); - assertEquals(expectedConfigurationData, resultConfigurationData); - } - - @Test - public void GetterSetterExplicitAnalogTelevisionRestrictionTest() { - // Arrange - boolean expectedBestEffort = true; - byte expectedConfigurationData = 2; - - // Act - ExplicitAnalogTelevisionRestriction explicitAnalogTelevisionRestriction = new ExplicitAnalogTelevisionRestriction( - false, expectedConfigurationData); - explicitAnalogTelevisionRestriction.setBestEffort(expectedBestEffort); - boolean resultBestEffort = explicitAnalogTelevisionRestriction.isBestEffort(); - byte resultConfigurationData = explicitAnalogTelevisionRestriction.getConfigurationData(); - - // Assert - assertEquals(expectedBestEffort, resultBestEffort); - assertEquals(expectedConfigurationData, resultConfigurationData); - } - - @Test - public void BadConfigurationDataExplicitAnalogTelevisionRestrictionShouldThrown() { - // Arrange - byte expectedConfigurationData = 4; - - // Act - try { - @SuppressWarnings("unused") - ExplicitAnalogTelevisionRestriction explicitAnalogTelevisionRestriction = new ExplicitAnalogTelevisionRestriction( - false, expectedConfigurationData); - fail("Should Thrown"); - - // Assert - } catch (IllegalArgumentException e) { - assertEquals(e.getMessage(), ErrorMessages.INVALID_TWO_BIT_CONFIGURATION_DATA); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/MediaServicesLicenseTemplateSerializerTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/MediaServicesLicenseTemplateSerializerTests.java deleted file mode 100644 index 4fce03454e6a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/MediaServicesLicenseTemplateSerializerTests.java +++ /dev/null @@ -1,539 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import static org.junit.Assert.*; - -import java.util.Date; -import java.util.UUID; -import java.util.Arrays; - -import javax.xml.datatype.DatatypeFactory; -import javax.xml.datatype.Duration; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.AgcAndColorStripeRestriction; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ContentEncryptionKeyFromHeader; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ContentEncryptionKeyFromKeyIdentifier; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ErrorMessages; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ExplicitAnalogTelevisionRestriction; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.MediaServicesLicenseTemplateSerializer; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.PlayReadyLicenseResponseTemplate; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.PlayReadyLicenseTemplate; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.PlayReadyLicenseType; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.PlayReadyPlayRight; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ScmsRestriction; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.UnknownOutputPassingOption; - -public class MediaServicesLicenseTemplateSerializerTests { - - private final String schemaFile = null; // MediaServicesLicenseTemplateSerializerTests.class - /// .getClassLoader().getResource("") - /// .getPath() + "schemas/TokenRestrictionTemplate.xsd"; - - @Test - public void roundTripTest() throws Exception { - PlayReadyLicenseResponseTemplate template = new PlayReadyLicenseResponseTemplate(); - template.setResponseCustomData("This is my response custom data"); - PlayReadyLicenseTemplate licenseTemplate = new PlayReadyLicenseTemplate(); - template.getLicenseTemplates().add(licenseTemplate); - - //@Act - - licenseTemplate.setLicenseType(PlayReadyLicenseType.Persistent); - licenseTemplate.setBeginDate(new Date()); - licenseTemplate.setExpirationDate(new Date()); - licenseTemplate.setContentKey(new ContentEncryptionKeyFromKeyIdentifier(UUID.randomUUID())); - - PlayReadyPlayRight playRight = new PlayReadyPlayRight(); - licenseTemplate.setPlayRight(playRight); - - playRight.setAgcAndColorStripeRestriction(new AgcAndColorStripeRestriction((byte) 1)); - playRight.setAllowPassingVideoContentToUnknownOutput(UnknownOutputPassingOption.Allowed); - playRight.setAnalogVideoOpl(100); - playRight.setCompressedDigitalAudioOpl(300); - playRight.setCompressedDigitalVideoOpl(400); - playRight.setExplicitAnalogTelevisionOutputRestriction(new ExplicitAnalogTelevisionRestriction(true, (byte)0)); - playRight.setImageConstraintForAnalogComponentVideoRestriction(true); - playRight.setImageConstraintForAnalogComputerMonitorRestriction(true); - playRight.setScmsRestriction(new ScmsRestriction((byte)2)); - playRight.setUncompressedDigitalAudioOpl(250); - playRight.setUncompressedDigitalVideoOpl(270); - - String result = MediaServicesLicenseTemplateSerializer.serialize(template); - assertNotNull(result); - - PlayReadyLicenseResponseTemplate deserialized = MediaServicesLicenseTemplateSerializer.deserialize(result, schemaFile); - assertNotNull(deserialized); - } - - @Test - public void roundTripTestWithRelativeBeginDateRelativeEndDate() throws Exception { - PlayReadyLicenseResponseTemplate template = new PlayReadyLicenseResponseTemplate(); - template.setResponseCustomData("This is my response custom data"); - PlayReadyLicenseTemplate licenseTemplate = new PlayReadyLicenseTemplate(); - template.getLicenseTemplates().add(licenseTemplate); - - licenseTemplate.setLicenseType(PlayReadyLicenseType.Persistent); - licenseTemplate.setRelativeBeginDate(DatatypeFactory.newInstance().newDuration("PT1H")); - licenseTemplate.setRelativeExpirationDate(DatatypeFactory.newInstance().newDuration("PT1H")); - licenseTemplate.setContentKey(new ContentEncryptionKeyFromKeyIdentifier(UUID.randomUUID())); - - PlayReadyPlayRight playRight = new PlayReadyPlayRight(); - licenseTemplate.setPlayRight(playRight); - - playRight.setAgcAndColorStripeRestriction(new AgcAndColorStripeRestriction((byte) 1)); - playRight.setAllowPassingVideoContentToUnknownOutput(UnknownOutputPassingOption.Allowed); - playRight.setAnalogVideoOpl(100); - playRight.setCompressedDigitalAudioOpl(300); - playRight.setCompressedDigitalVideoOpl(400); - playRight.setExplicitAnalogTelevisionOutputRestriction(new ExplicitAnalogTelevisionRestriction(true, (byte)0)); - playRight.setImageConstraintForAnalogComponentVideoRestriction(true); - playRight.setImageConstraintForAnalogComputerMonitorRestriction(true); - playRight.setScmsRestriction(new ScmsRestriction((byte)2)); - playRight.setUncompressedDigitalAudioOpl(250); - playRight.setUncompressedDigitalVideoOpl(270); - - String result = MediaServicesLicenseTemplateSerializer.serialize(template); - assertNotNull(result); - - PlayReadyLicenseResponseTemplate deserialized = MediaServicesLicenseTemplateSerializer.deserialize(result, schemaFile); - assertNotNull(deserialized); - } - - @Test - public void roundTripTestErrorWithRelativeBeginDateBeginDate() throws Exception { - try { - PlayReadyLicenseResponseTemplate template = new PlayReadyLicenseResponseTemplate(); - template.setResponseCustomData("This is my response custom data"); - PlayReadyLicenseTemplate licenseTemplate = new PlayReadyLicenseTemplate(); - template.getLicenseTemplates().add(licenseTemplate); - - licenseTemplate.setLicenseType(PlayReadyLicenseType.Persistent); - licenseTemplate.setBeginDate(new Date()); - licenseTemplate.setRelativeBeginDate(DatatypeFactory.newInstance().newDuration("PT1H")); - - fail("Should Thrown"); - } catch (IllegalArgumentException e) { - assertTrue(e.getMessage().contains("both")); - } - } - - @Test - public void roundTripTestErrorWithBeginDateRelativeBeginDate() throws Exception { - try { - PlayReadyLicenseResponseTemplate template = new PlayReadyLicenseResponseTemplate(); - template.setResponseCustomData("This is my response custom data"); - PlayReadyLicenseTemplate licenseTemplate = new PlayReadyLicenseTemplate(); - template.getLicenseTemplates().add(licenseTemplate); - - licenseTemplate.setLicenseType(PlayReadyLicenseType.Persistent); - licenseTemplate.setRelativeBeginDate(DatatypeFactory.newInstance().newDuration("PT1H")); - licenseTemplate.setBeginDate(new Date()); - - fail("Should Thrown"); - } catch (IllegalArgumentException e) { - assertTrue(e.getMessage().contains("both")); - } - } - - @Test - public void roundTripTestErrorWithRelativeExpirationDateExpirationDate() throws Exception { - try { - PlayReadyLicenseResponseTemplate template = new PlayReadyLicenseResponseTemplate(); - template.setResponseCustomData("This is my response custom data"); - PlayReadyLicenseTemplate licenseTemplate = new PlayReadyLicenseTemplate(); - template.getLicenseTemplates().add(licenseTemplate); - - licenseTemplate.setLicenseType(PlayReadyLicenseType.Persistent); - licenseTemplate.setExpirationDate(new Date()); - licenseTemplate.setRelativeExpirationDate(DatatypeFactory.newInstance().newDuration("PT1H")); - - fail("Should Thrown"); - } catch (IllegalArgumentException e) { - assertTrue(e.getMessage().contains("both")); - } - } - - @Test - public void roundTripTestErrorWithExpirationDateRelativeExpirationDate() throws Exception { - try { - PlayReadyLicenseResponseTemplate template = new PlayReadyLicenseResponseTemplate(); - template.setResponseCustomData("This is my response custom data"); - PlayReadyLicenseTemplate licenseTemplate = new PlayReadyLicenseTemplate(); - template.getLicenseTemplates().add(licenseTemplate); - - licenseTemplate.setLicenseType(PlayReadyLicenseType.Persistent); - licenseTemplate.setRelativeExpirationDate(DatatypeFactory.newInstance().newDuration("PT1H")); - licenseTemplate.setExpirationDate(new Date()); - - fail("Should Thrown"); - } catch (IllegalArgumentException e) { - assertTrue(e.getMessage().contains("both")); - } - } - - @Test - public void validateNonPersistentLicenseConstraints() throws Exception { - // Arrange - @SuppressWarnings("unused") - String serializedTemplate = null; - Duration durationSanmple = DatatypeFactory.newInstance().newDuration("PT1H"); - PlayReadyLicenseResponseTemplate template = new PlayReadyLicenseResponseTemplate(); - PlayReadyLicenseTemplate licenseTemplate = new PlayReadyLicenseTemplate(); - template.getLicenseTemplates().add(licenseTemplate); - PlayReadyPlayRight playRight = new PlayReadyPlayRight(); - licenseTemplate.setPlayRight(playRight); - // Set as Nonpersistent - licenseTemplate.setLicenseType(PlayReadyLicenseType.Nonpersistent); - - // ACT 1: Make sure we cannot set GracePeriod on a NonPersistent license - try - { - serializedTemplate = MediaServicesLicenseTemplateSerializer.serialize(template); - fail("Expected IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.PLAY_READY_CONTENT_KEY_REQUIRED, e.getMessage()); - licenseTemplate.setContentKey(new ContentEncryptionKeyFromHeader()); - } - - // ACT 2: Make sure we cannot set GracePeriod on a NonPersistent license - licenseTemplate.setGracePeriod(durationSanmple); - try - { - serializedTemplate = MediaServicesLicenseTemplateSerializer.serialize(template); - fail("Expected IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.GRACE_PERIOD_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE, e.getMessage()); - } - - // ACT 3: Make sure we cannot set a FirstPlayExpiration on a NonPersistent license. - licenseTemplate.setGracePeriod(null); - playRight.setFirstPlayExpiration(durationSanmple); - - try - { - serializedTemplate = MediaServicesLicenseTemplateSerializer.serialize(template); - fail("Expected IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.FIRST_PLAY_EXPIRATION_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE, e.getMessage()); - } - - // ACT 4: Make sure we cannot set a BeginDate on a NonPersistent license. - playRight.setFirstPlayExpiration(null); - licenseTemplate.setBeginDate(new Date()); - - try - { - serializedTemplate = MediaServicesLicenseTemplateSerializer.serialize(template); - fail("Expected IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.BEGIN_DATE_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE, e.getMessage()); - } - - // ACT 5: Make sure we cannot set an ExpirationDate on a NonPersistent license. - licenseTemplate.setBeginDate(null); - licenseTemplate.setExpirationDate(new Date()); - - try - { - serializedTemplate = MediaServicesLicenseTemplateSerializer.serialize(template); - fail("Expected IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.EXPIRATION_CANNOT_BE_SET_ON_NON_PERSISTENT_LICENSE, e.getMessage()); - } - } - - @Test - public void digitalVideoOnlyContentRestrictionAndAllowPassingVideoContentToUnknownOutputMutuallyExclusive() throws Exception { - String serializedTemplate = null; - PlayReadyLicenseResponseTemplate template = new PlayReadyLicenseResponseTemplate(); - PlayReadyLicenseTemplate licenseTemplate = new PlayReadyLicenseTemplate(); - template.getLicenseTemplates().add(licenseTemplate); - // Set as Nonpersistent - licenseTemplate.setLicenseType(PlayReadyLicenseType.Nonpersistent); - licenseTemplate.setContentKey(new ContentEncryptionKeyFromHeader()); - PlayReadyPlayRight playRight = new PlayReadyPlayRight(); - licenseTemplate.setPlayRight(playRight); - - // ACT 1: Make sure we cannot set DigitalVideoOnlyContentRestriction to true if - // UnknownOutputPassingOption.Allowed is set - playRight.setAllowPassingVideoContentToUnknownOutput(UnknownOutputPassingOption.Allowed); - playRight.setDigitalVideoOnlyContentRestriction(true); - try - { - serializedTemplate = MediaServicesLicenseTemplateSerializer.serialize(template); - fail("Expected IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - // ASSERT 1 - assertEquals(ErrorMessages.DIGITAL_VIDEO_ONLY_MUTUALLY_EXCLUSIVE_WITH_PASSING_TO_UNKNOWN_OUTPUT_ERROR, e.getMessage()); - } - - // ACT 2: Make sure we cannot set UnknownOutputPassingOption.AllowedWithVideoConstriction - // if DigitalVideoOnlyContentRestriction is true - playRight.setAllowPassingVideoContentToUnknownOutput(UnknownOutputPassingOption.AllowedWithVideoConstriction); - try - { - serializedTemplate = MediaServicesLicenseTemplateSerializer.serialize(template); - fail("Expected IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - // ASSERT 2 - assertEquals(ErrorMessages.DIGITAL_VIDEO_ONLY_MUTUALLY_EXCLUSIVE_WITH_PASSING_TO_UNKNOWN_OUTPUT_ERROR, e.getMessage()); - } - - // ACT 3: Make sure we can set DigitalVideoOnlyContentRestriction to true if - // UnknownOutputPassingOption.NotAllowed is set - playRight.setAllowPassingVideoContentToUnknownOutput(UnknownOutputPassingOption.NotAllowed); - serializedTemplate = MediaServicesLicenseTemplateSerializer.serialize(template); - - // ASSERT 3 - assertNotNull(serializedTemplate); - assertNotNull(MediaServicesLicenseTemplateSerializer.deserialize(serializedTemplate)); - } - - @Test - public void knownGoodInputTest() throws Exception - { - String serializedTemplate = "<PlayReadyLicenseResponseTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1\"><LicenseTemplates><PlayReadyLicenseTemplate><AllowTestDevices>false</AllowTestDevices><BeginDate i:nil=\"true\" /><ContentKey i:type=\"ContentEncryptionKeyFromHeader\" /><ContentType>Unspecified</ContentType><ExpirationDate i:nil=\"true\" /><LicenseType>Nonpersistent</LicenseType><PlayRight><AgcAndColorStripeRestriction><ConfigurationData>1</ConfigurationData></AgcAndColorStripeRestriction><AllowPassingVideoContentToUnknownOutput>Allowed</AllowPassingVideoContentToUnknownOutput><AnalogVideoOpl>100</AnalogVideoOpl><CompressedDigitalAudioOpl>300</CompressedDigitalAudioOpl><CompressedDigitalVideoOpl>400</CompressedDigitalVideoOpl><DigitalVideoOnlyContentRestriction>false</DigitalVideoOnlyContentRestriction><ExplicitAnalogTelevisionOutputRestriction><BestEffort>true</BestEffort><ConfigurationData>0</ConfigurationData></ExplicitAnalogTelevisionOutputRestriction><ImageConstraintForAnalogComponentVideoRestriction>true</ImageConstraintForAnalogComponentVideoRestriction><ImageConstraintForAnalogComputerMonitorRestriction>true</ImageConstraintForAnalogComputerMonitorRestriction><ScmsRestriction><ConfigurationData>2</ConfigurationData></ScmsRestriction><UncompressedDigitalAudioOpl>250</UncompressedDigitalAudioOpl><UncompressedDigitalVideoOpl>270</UncompressedDigitalVideoOpl></PlayRight></PlayReadyLicenseTemplate></LicenseTemplates><ResponseCustomData>This is my response custom data</ResponseCustomData></PlayReadyLicenseResponseTemplate>"; - - PlayReadyLicenseResponseTemplate responseTemplate2 = MediaServicesLicenseTemplateSerializer.deserialize(serializedTemplate, schemaFile); - assertNotNull(responseTemplate2); - } - - @Test - public void knownGoodInputMinimalLicenseTest() throws Exception - { - String serializedTemplate = "<PlayReadyLicenseResponseTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1\"><LicenseTemplates><PlayReadyLicenseTemplate><ContentKey i:type=\"ContentEncryptionKeyFromHeader\" /><PlayRight /></PlayReadyLicenseTemplate></LicenseTemplates></PlayReadyLicenseResponseTemplate>"; - - PlayReadyLicenseResponseTemplate responseTemplate2 = MediaServicesLicenseTemplateSerializer.deserialize(serializedTemplate, schemaFile); - assertNotNull(responseTemplate2); - } - - @Test - public void inputMissingContentKeyShouldThrowArgumentException() throws Exception - { - String serializedTemplate = "<PlayReadyLicenseResponseTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1\"><LicenseTemplates><PlayReadyLicenseTemplate><PlayRight /></PlayReadyLicenseTemplate></LicenseTemplates></PlayReadyLicenseResponseTemplate>"; - - try - { - MediaServicesLicenseTemplateSerializer.deserialize(serializedTemplate, schemaFile); - fail("Should throw an IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.PLAY_READY_CONTENT_KEY_REQUIRED, e.getMessage()); - } - } - - @Test - public void inputMissingPlayRightShouldThrowArgumentException() throws Exception - { - String serializedTemplate = "<PlayReadyLicenseResponseTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1\"><LicenseTemplates><PlayReadyLicenseTemplate><ContentKey i:type=\"ContentEncryptionKeyFromHeader\" /></PlayReadyLicenseTemplate></LicenseTemplates></PlayReadyLicenseResponseTemplate>"; - - try - { - MediaServicesLicenseTemplateSerializer.deserialize(serializedTemplate, schemaFile); - fail("Should throw an IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.PLAY_READY_PLAY_RIGHT_REQUIRED, e.getMessage()); - } - } - - @Test - public void inputMissingLicenseTemplatesShouldThrowArgumentException() throws Exception - { - String serializedTemplate = "<PlayReadyLicenseResponseTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1\"><LicenseTemplates></LicenseTemplates></PlayReadyLicenseResponseTemplate>"; - - try - { - MediaServicesLicenseTemplateSerializer.deserialize(serializedTemplate, schemaFile); - fail("Should throw an IllegalArgumentException"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.AT_LEAST_ONE_LICENSE_TEMPLATE_REQUIRED, e.getMessage()); - } - } - - @Test - public void ScmsRestrictionConfigurationDataValidationTest() - { - byte[] validConfigurationValues = new byte[] { 0, 1, 2, 3 }; - byte[] invalidConfigurationValues = new byte[] {(byte) 255, (byte) 128, 4, 5, 15}; - - for (byte configurationData : validConfigurationValues) - { - new ScmsRestriction(configurationData); - } - - for (byte configurationData : invalidConfigurationValues) - { - try - { - new ScmsRestriction(configurationData); - fail("Invalid configuration data accepted"); - } - catch (IllegalArgumentException e) - { - assertEquals(ErrorMessages.INVALID_TWO_BIT_CONFIGURATION_DATA, e.getMessage()); - } - } - } - - @Test - public void validateOutputProtectionLevelValueChecks() - { - // From the PlayReady Compliance Rules for issuing PlayReady Licenses. - // - // Table 6.6: Allowed Output Protection Level Values - // - // Field Allowed Values - // - // Minimum Compressed Digital Audio Output Protection Level 100, 150, 200, 250, 300 - // Minimum Uncompressed Digital Audio Output Protection Level 100, 150, 200, 250, 300 - // Minimum Compressed Digital Video Output Protection Level 400, 500 - // Minimum Uncompressed Digital Video Output Protection Level 100, 250, 270, 300 - // Minimum Analog Television Output Protection Level 100, 150, 200 - // - - boolean[] expectedResult = null; - - // First check null, which all of the Opls values support. Setting Opl values is optional - // and null is the way the user signals that they do not want to set a value. - boolean[] currentResult = setOutputProtectionLevelValues(null); - expectedResult = new boolean[] { true, true, true, true, true }; - assertTrue("null result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - - for (int i = 0; i <= 550; i += 10) - { - currentResult = setOutputProtectionLevelValues(i); - - switch (i) - { - case 100: - expectedResult = new boolean[] {true, true, false, true, true }; - assertTrue("100 result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - case 150: - expectedResult = new boolean[] {true, true, false, false, true }; - assertTrue("150 result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - case 200: - expectedResult = new boolean[] {true, true, false, false, true }; - assertTrue("200 result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - case 250: - expectedResult = new boolean[] {true, true, false, true, false }; - assertTrue("250 result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - case 270: - expectedResult = new boolean[] { false, false, false, true, false }; - assertTrue("270 result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - case 300: - expectedResult = new boolean[] { true, true, false, true, false }; - assertTrue("300 result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - case 400: - expectedResult = new boolean[] { false, false, true, false, false }; - assertTrue("400 result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - case 500: - expectedResult = new boolean[] { false, false, true, false, false }; - assertTrue("500 result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - default: - // These values should always return false for all types - expectedResult = new boolean[] { false, false, false, false, false }; - assertTrue("" + i + " result didn't match expectations", Arrays.equals(currentResult, expectedResult)); - break; - } - - } - } - - private boolean[] setOutputProtectionLevelValues(Integer valueToSet) - { - PlayReadyPlayRight playRight = new PlayReadyPlayRight(); - boolean[] returnValue = new boolean[5]; - - try - { - playRight.setCompressedDigitalAudioOpl(valueToSet); - returnValue[0] = true; - } - catch (IllegalArgumentException ae) - { - if (!ae.getMessage().equals(ErrorMessages.COMPRESSED_DIGITAL_AUDIO_OPL_VALUE_ERROR)) { - throw ae; - } - } - - try - { - playRight.setUncompressedDigitalAudioOpl(valueToSet); - returnValue[1] = true; - } - catch (IllegalArgumentException ae) - { - if (!ae.getMessage().equals(ErrorMessages.UNCOMPRESSED_DIGITAL_AUDIO_OPL_VALUE_ERROR)) { - throw ae; - } - } - - try - { - playRight.setCompressedDigitalVideoOpl(valueToSet); - returnValue[2] = true; - } - catch (IllegalArgumentException ae) - { - if (!ae.getMessage().equals(ErrorMessages.COMPRESSED_DIGITAL_VIDEO_OPL_VALUE_ERROR)) { - throw ae; - } - } - - try - { - playRight.setUncompressedDigitalVideoOpl(valueToSet); - returnValue[3] = true; - } - catch (IllegalArgumentException ae) - { - if (!ae.getMessage().equals(ErrorMessages.UNCOMPRESSED_DIGITAL_VIDEO_OPL_VALUE_ERROR)) { - throw ae; - } - } - - try - { - playRight.setAnalogVideoOpl(valueToSet); - returnValue[4] = true; - } - catch (IllegalArgumentException ae) - { - if (!ae.getMessage().equals(ErrorMessages.ANALOG_VIDEO_OPL_VALUE_ERROR)) { - throw ae; - } - } - - return returnValue; - } - -} - diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyContentKeyTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyContentKeyTests.java deleted file mode 100644 index 441e53414fde..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyContentKeyTests.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import static org.junit.Assert.*; - -import java.security.InvalidParameterException; -import java.util.UUID; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ContentEncryptionKeyFromHeader; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ContentEncryptionKeyFromKeyIdentifier; - -public class PlayReadyContentKeyTests { - - @Test - public void InvalidUUIDContentEncryptionKeyFromKeyIdentifierTest() { - // Arrange - UUID invalidUUID = new UUID(0L, 0L); - - // Act - try { - @SuppressWarnings("unused") - ContentEncryptionKeyFromKeyIdentifier contentEncryptionKeyFromKeyIdentifier = - new ContentEncryptionKeyFromKeyIdentifier(invalidUUID); - fail("Should Thrown"); - } catch (InvalidParameterException e) { - assertEquals(e.getMessage(), "keyIdentifier"); - } - } - - @Test - public void ValidUUIDContentEncryptionKeyFromKeyIdentifierTest() { - // Arrange - UUID validUUID = UUID.randomUUID(); - - // Act - ContentEncryptionKeyFromKeyIdentifier contentEncryptionKeyFromKeyIdentifier = - new ContentEncryptionKeyFromKeyIdentifier(validUUID); - UUID resultUUID = contentEncryptionKeyFromKeyIdentifier.getKeyIdentifier(); - - // Assert - assertEquals(resultUUID, validUUID); - } - - @Test - public void GetterSetterUUIDContentEncryptionKeyFromKeyIdentifierTest() { - // Arrange - UUID expectedUUID = UUID.randomUUID(); - - // Act - ContentEncryptionKeyFromKeyIdentifier contentEncryptionKeyFromKeyIdentifier = - new ContentEncryptionKeyFromKeyIdentifier(UUID.randomUUID()); - - contentEncryptionKeyFromKeyIdentifier.setKeyIdentifier(expectedUUID); - UUID resultUUID = contentEncryptionKeyFromKeyIdentifier.getKeyIdentifier(); - - // Assert - assertEquals(resultUUID, expectedUUID); - } - - @Test - public void NewContentEncryptionKeyFromHeaderTest() { - // Arrange - // Act - ContentEncryptionKeyFromHeader contentEncryptionKeyFromHeader = - new ContentEncryptionKeyFromHeader(); - // Assert - assertNotNull(contentEncryptionKeyFromHeader); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseTypeTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseTypeTests.java deleted file mode 100644 index 34d743db8036..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyLicenseTypeTests.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import static org.junit.Assert.*; - -import java.security.InvalidParameterException; -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.PlayReadyLicenseType; - -public class PlayReadyLicenseTypeTests { - - @Test - public void valueOfPlayReadyLicenseTypeTestsTests() { - // provides full code coverage - assertEquals(PlayReadyLicenseType.Nonpersistent, PlayReadyLicenseType.valueOf("Nonpersistent")); - assertEquals(PlayReadyLicenseType.Persistent, PlayReadyLicenseType.valueOf("Persistent")); - } - - @Test - public void fromCodeNonpersistentPlayReadyLicenseTypeTest() { - // Arrange - PlayReadyLicenseType expectedPlayReadyLicenseType = PlayReadyLicenseType.Nonpersistent; - - // Act - PlayReadyLicenseType playReadyLicenseType = PlayReadyLicenseType.fromCode(0); - - // Assert - assertEquals(playReadyLicenseType, expectedPlayReadyLicenseType); - } - - @Test - public void fromCodePersistentPlayReadyLicenseTypeTest() { - // Arrange - PlayReadyLicenseType expectedPlayReadyLicenseType = PlayReadyLicenseType.Persistent; - - // Act - PlayReadyLicenseType playReadyLicenseType = PlayReadyLicenseType.fromCode(1); - - // Assert - assertEquals(playReadyLicenseType, expectedPlayReadyLicenseType); - } - - @Test - public void fromCodeInvalidTokenTypeTests() { - // Arrange - int invalidCode = 666; - String expectedMessage = "code"; - // Act - try { - @SuppressWarnings("unused") - PlayReadyLicenseType tokenPlayReadyLicenseType = PlayReadyLicenseType.fromCode(invalidCode); - fail("Should throw"); - } catch (InvalidParameterException e) { - // Assert - assertEquals(e.getMessage(), expectedMessage); - } - } - - @Test - public void getCodePersistentPlayReadyLicenseTypeTests() { - // Arrange - int expectedCode = 1; - - // Act - PlayReadyLicenseType tokenTypeResult = PlayReadyLicenseType.Persistent; - int resultCode = tokenTypeResult.getCode(); - - // Assert - assertEquals(resultCode, expectedCode); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyPlayRightTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyPlayRightTest.java deleted file mode 100644 index 14ac67042de8..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/PlayReadyPlayRightTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import static org.junit.Assert.*; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.AgcAndColorStripeRestriction; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ExplicitAnalogTelevisionRestriction; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.PlayReadyPlayRight; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.UnknownOutputPassingOption; - -public class PlayReadyPlayRightTest { - - @Test - public void RoundTripTest() throws Exception { - // Arrange - PlayReadyPlayRight playRight = new PlayReadyPlayRight(); - // Act - playRight.setAgcAndColorStripeRestriction(new AgcAndColorStripeRestriction((byte) 0)); - playRight.setAllowPassingVideoContentToUnknownOutput(UnknownOutputPassingOption.NotAllowed); - playRight.setAnalogVideoOpl(100); - playRight.setCompressedDigitalAudioOpl(200); - playRight.setCompressedDigitalVideoOpl(400); - playRight.setDigitalVideoOnlyContentRestriction(true); - playRight.setExplicitAnalogTelevisionOutputRestriction(new ExplicitAnalogTelevisionRestriction(true, (byte)0)); - // Test - assertEquals(playRight.getAgcAndColorStripeRestriction().getConfigurationData(), (byte)0); - assertEquals(playRight.getAllowPassingVideoContentToUnknownOutput(), UnknownOutputPassingOption.NotAllowed); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ScmsRestrictionTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ScmsRestrictionTests.java deleted file mode 100644 index c969d03052bc..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/ScmsRestrictionTests.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import static org.junit.Assert.*; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ErrorMessages; -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.ScmsRestriction; - -public class ScmsRestrictionTests { - - @Test - public void NewScmsRestrictionTests() { - // Arrange - byte expectedConfigurationData = 2; - - // Act - ScmsRestriction scmsRestriction = new ScmsRestriction( - expectedConfigurationData); - byte resultConfigurationData = scmsRestriction.getConfigurationData(); - - // Assert - assertEquals(expectedConfigurationData, resultConfigurationData); - } - - @Test - public void BadConfigurationDataScmsRestrictionShouldThrown() { - // Arrange - byte expectedConfigurationData = 4; - - // Act - try { - @SuppressWarnings("unused") - ScmsRestriction scmsRestriction = new ScmsRestriction( - expectedConfigurationData); - fail("Should Thrown"); - - } catch (IllegalArgumentException e) { - // Assert - assertEquals(e.getMessage(), ErrorMessages.INVALID_TWO_BIT_CONFIGURATION_DATA); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/UnknownOutputPassingOptionTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/UnknownOutputPassingOptionTests.java deleted file mode 100644 index 2dfa9f05787a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/playreadylicense/UnknownOutputPassingOptionTests.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense; - -import static org.junit.Assert.*; - -import java.security.InvalidParameterException; -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.playreadylicense.UnknownOutputPassingOption; - -public class UnknownOutputPassingOptionTests { - - @Test - public void valueOfPlayReadyLicenseTypeTestsTests() { - // provides full code coverage - assertEquals(UnknownOutputPassingOption.NotAllowed, UnknownOutputPassingOption.valueOf("NotAllowed")); - assertEquals(UnknownOutputPassingOption.Allowed, UnknownOutputPassingOption.valueOf("Allowed")); - assertEquals(UnknownOutputPassingOption.AllowedWithVideoConstriction, - UnknownOutputPassingOption.valueOf("AllowedWithVideoConstriction")); - } - - @Test - public void fromCodeNotAllowedUnknownOutputPassingOption() { - // Arrange - UnknownOutputPassingOption expectedUnknownOutputPassingOption = UnknownOutputPassingOption.NotAllowed; - - // Act - UnknownOutputPassingOption unknownOutputPassingOptionResult = UnknownOutputPassingOption.fromCode(0); - - // Assert - assertEquals(expectedUnknownOutputPassingOption, unknownOutputPassingOptionResult); - } - - @Test - public void fromCodeAllowedUnknownOutputPassingOptionTests() { - // Arrange - UnknownOutputPassingOption expectedUnknownOutputPassingOption = UnknownOutputPassingOption.Allowed; - - // Act - UnknownOutputPassingOption unknownOutputPassingOptionResult = UnknownOutputPassingOption.fromCode(1); - - // Assert - assertEquals(expectedUnknownOutputPassingOption, unknownOutputPassingOptionResult); - } - - @Test - public void fromCodeAllowedWithVideoConstrictionUnknownOutputPassingOptionTests() { - // Arrange - UnknownOutputPassingOption expectedUnknownOutputPassingOption = UnknownOutputPassingOption.AllowedWithVideoConstriction; - - // Act - UnknownOutputPassingOption unknownOutputPassingOptionResult = UnknownOutputPassingOption.fromCode(2); - - // Assert - assertEquals(expectedUnknownOutputPassingOption, unknownOutputPassingOptionResult); - } - - @Test - public void fromCodeInvalidUnknownOutputPassingOptionTests() { - // Arrange - int invalidCode = 666; - String expectedMessage = "code"; - // Act - try { - @SuppressWarnings("unused") - UnknownOutputPassingOption unknownOutputPassingOptionResult = UnknownOutputPassingOption - .fromCode(invalidCode); - fail("Should throw"); - } catch (InvalidParameterException e) { - // Assert - assertEquals(e.getMessage(), expectedMessage); - } - } - - @Test - public void getCodeJWTTokenTypeTests() { - // Arrange - int expectedCode = 2; - - // Act - UnknownOutputPassingOption unknownOutputPassingOptionResult = UnknownOutputPassingOption.AllowedWithVideoConstriction; - int resultCode = unknownOutputPassingOptionResult.getCode(); - - // Assert - assertEquals(resultCode, expectedCode); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/SymmetricVerificationKeyTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/SymmetricVerificationKeyTests.java deleted file mode 100644 index fe0965a618fb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/SymmetricVerificationKeyTests.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import static org.junit.Assert.*; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction.SymmetricVerificationKey; - -public class SymmetricVerificationKeyTests { - - @Test - public void NewSymmetricVerificationKeyShouldCreateNewKey() { - // Arrange - SymmetricVerificationKey key = new SymmetricVerificationKey(); - - // Act - byte[] resultKey = key.getKeyValue(); - - // Assert - assertNotNull(resultKey); - } - - @Test - public void GetterSetterSymmetricVerificationKey() { - // Arrange - SymmetricVerificationKey key = new SymmetricVerificationKey(); - byte[] keyValue = key.getKeyValue(); - - // Act - SymmetricVerificationKey key2 = new SymmetricVerificationKey(); - key2.setKeyValue(keyValue); - byte[] resultsValue = key2.getKeyValue(); - - // Assert - assertArrayEquals(keyValue, resultsValue); - } - - @Test - public void KeyInConstructorSymmetricVerificationKeyShouldMatch() { - // Arrange - SymmetricVerificationKey key = new SymmetricVerificationKey(); - byte[] keyValue = key.getKeyValue(); - - // Act - SymmetricVerificationKey key2 = new SymmetricVerificationKey(keyValue); - byte[] resultsValue = key2.getKeyValue(); - - // Assert - assertArrayEquals(keyValue, resultsValue); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenClaimTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenClaimTests.java deleted file mode 100644 index 5fb9f9738ee4..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenClaimTests.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import static org.junit.Assert.*; - -import org.junit.Test; - -public class TokenClaimTests { - - @Test - public void defaultConstructorTest() { - // Arrange and Act - TokenClaim value = new TokenClaim(); - // Asset - assertNotNull(value); - } - - @Test - public void constructorTest() { - // Arrange - String expectedType = "type"; - String expectedValue = "value"; - // Act - TokenClaim value = new TokenClaim(expectedType, expectedValue); - - // Assert - assertNotNull(value); - assertEquals(value.getClaimType(), expectedType); - assertEquals(value.getClaimValue(), expectedValue); - } - - @Test - public void nullInConstructorShouldThrownTest() { - // Arrange - String providedType = null; - String expectedValue = "value"; - - // Act - try { - @SuppressWarnings("unused") - TokenClaim value = new TokenClaim(providedType, expectedValue); - fail("Should thrown"); - } catch (NullPointerException e) { - // Assert - assertTrue(e.getMessage().contains("claimType")); - } - } - - @Test - public void staticValuesTest() { - // Arrange - String expectedTokenClaimType = "urn:microsoft:azure:mediaservices:contentkeyidentifier"; - - // Act - String results = TokenClaim.getContentKeyIdentifierClaimType(); - - // Assert - assertEquals(results, expectedTokenClaimType); - } - - @Test - public void staticValues2Test() { - // Arrange - String expectedTokenClaimType = "urn:microsoft:azure:mediaservices:contentkeyidentifier"; - TokenClaim claim = TokenClaim.getContentKeyIdentifierClaim(); - - // Act - String results = claim.getClaimType(); - - // Assert - assertEquals(results, expectedTokenClaimType); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplateSerializerTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplateSerializerTests.java deleted file mode 100644 index 9cae3f6526df..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenRestrictionTemplateSerializerTests.java +++ /dev/null @@ -1,321 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.net.URI; -import java.net.URISyntaxException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Locale; -import java.util.TimeZone; -import java.util.UUID; - -import javax.xml.bind.JAXBException; - -import org.junit.Test; -import org.xml.sax.SAXException; - -public class TokenRestrictionTemplateSerializerTests { - - private final String schemaFile = TokenRestrictionTemplateSerializerTests.class.getClassLoader().getResource("") - .getPath() + "schemas/TokenRestrictionTemplate.xsd"; - private final String _sampleIssuer = "http://sampleIssuerUrl"; - private final String _sampleAudience = "http://sampleAudience"; - - @Test - public void RoundTripTest() throws JAXBException, URISyntaxException { - TokenRestrictionTemplate template = new TokenRestrictionTemplate(TokenType.SWT); - - template.setPrimaryVerificationKey(new SymmetricVerificationKey()); - template.getAlternateVerificationKeys().add(new SymmetricVerificationKey()); - template.setAudience(new URI(_sampleAudience)); - template.setIssuer(new URI(_sampleIssuer)); - template.getRequiredClaims().add(TokenClaim.getContentKeyIdentifierClaim()); - template.getRequiredClaims().add(new TokenClaim("Rental", "true")); - - String serializedTemplate = TokenRestrictionTemplateSerializer.serialize(template); - assertTrue(serializedTemplate != null && serializedTemplate.length() > 0); - - TokenRestrictionTemplate template2 = TokenRestrictionTemplateSerializer.deserialize(serializedTemplate); - assertNotNull(template2); - assertEquals(template.getIssuer(), template2.getIssuer()); - assertEquals(template.getAudience(), template2.getAudience()); - assertEquals(template.getTokenType(), TokenType.SWT); - SymmetricVerificationKey fromTemplate = (SymmetricVerificationKey) template.getPrimaryVerificationKey(); - SymmetricVerificationKey fromTemplate2 = (SymmetricVerificationKey) template2.getPrimaryVerificationKey(); - - assertArrayEquals(fromTemplate.getKeyValue(), fromTemplate2.getKeyValue()); - } - - @Test - public void KnownGoodInputForSwtOnlyScheme() throws JAXBException { - String tokenTemplate = "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\"><AlternateVerificationKeys><TokenVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>FakeTestKey</KeyValue></TokenVerificationKey></AlternateVerificationKeys><Audience>http://sampleaudience/</Audience><Issuer>http://sampleissuerurl/</Issuer><PrimaryVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>FakeTestKey</KeyValue></PrimaryVerificationKey><RequiredClaims><TokenClaim><ClaimType>urn:microsoft:azure:mediaservices:contentkeyidentifier</ClaimType><ClaimValue i:nil=\"true\" /></TokenClaim><TokenClaim><ClaimType>urn:myservice:claims:rental</ClaimType><ClaimValue>true</ClaimValue></TokenClaim></RequiredClaims></TokenRestrictionTemplate>"; - - TokenRestrictionTemplate template = TokenRestrictionTemplateSerializer.deserialize(tokenTemplate); - assertNotNull(template); - assertEquals(TokenType.SWT, template.getTokenType()); - } - - @Test - public void KnownGoodInputForJWT() throws JAXBException { - String tokenTemplate = "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\"><AlternateVerificationKeys /><Audience>http://sampleissuerurl/</Audience><Issuer>http://sampleaudience/</Issuer><PrimaryVerificationKey i:type=\"X509CertTokenVerificationKey\"><RawBody>MIIDAzCCAeugAwIBAgIQ2cl0q8oGkaFG+ZTZYsilhDANBgkqhkiG9w0BAQ0FADARMQ8wDQYDVQQDEwZDQVJvb3QwHhcNMTQxMjAxMTg0NzI5WhcNMzkxMjMxMjM1OTU5WjARMQ8wDQYDVQQDEwZDQVJvb3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDjgMbtZcLtKNdJXHSGQ7l6xJBtNCVhjF4+BLZq+D2RmubKTAnGXhNGY4FO2LrPjfkWumdnv5DOlFuwHy2qrsZu1TFZxxQzU9/Yp3VAD1Afk7ShUOxniPpIO9vfkUH+FEX1Taq4ncR/TkiwnIZLy+bBa0DlF2MsPGC62KbiN4xJqvSIuecxQvcN8MZ78NDejtj1/XHF7VBmVjWi5B79GpTvY9ap39BU8nM0Q8vWb9DwmpWLz8j7hm25f+8laHIE6U8CpeeD/OrZT8ncCD0hbhR3ZGGoFqJbyv2CLPVGeaIhIxBH41zgrBYR53NjkRLTB4IEUCgeTGvSzweqlb+4totdAgMBAAGjVzBVMA8GA1UdEwEB/wQFMAMBAf8wQgYDVR0BBDswOYAQSHiCUWtQlUe79thqsTDbbqETMBExDzANBgNVBAMTBkNBUm9vdIIQ2cl0q8oGkaFG+ZTZYsilhDANBgkqhkiG9w0BAQ0FAAOCAQEABa/2D+Rxo6tp63sDFRViikNkDa5GFZscQLn4Rm35NmUt35Wc/AugLaTJ7iP5zJTYIBUI9DDhHbgFqmYpW0p14NebJlBzrRFIaoHBOsHhy4VYrxIB8Q/OvSGPgbI2c39ni/odyTYKVtJacxPrIt+MqeiFMjJ19cJSOkKT2AFoPMa/L0++znMcEObSAHYMy1U51J1njpQvNJ+MQiR8y2gvmMbGEcMgicIJxbLB2imqJWCQkFUlsrxwuuzSvNaLkdd/HyhsR1JXc+kOREO8gWjhT6MAdgGKC9+neamR7sqwJHPNfcLYTDFOhi6cJH10z74mU1Xa5uLsX+aZp2YYHUFw4Q==</RawBody></PrimaryVerificationKey><RequiredClaims /><TokenType>JWT</TokenType></TokenRestrictionTemplate>"; - TokenRestrictionTemplate template = TokenRestrictionTemplateSerializer.deserialize(tokenTemplate); - assertNotNull(template); - assertEquals(TokenType.JWT, template.getTokenType()); - } - - @Test - public void KnownGoodInputForSWT() throws JAXBException { - String tokenTemplate = "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\"><AlternateVerificationKeys /><Audience>http://sampleissuerurl/</Audience><Issuer>http://sampleaudience/</Issuer><PrimaryVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>FakeTestKey</KeyValue></PrimaryVerificationKey><RequiredClaims><TokenClaim><ClaimType>urn:microsoft:azure:mediaservices:contentkeyidentifier</ClaimType><ClaimValue i:nil=\"true\" /></TokenClaim><TokenClaim><ClaimType>urn:myservice:claims:rental</ClaimType><ClaimValue>true</ClaimValue></TokenClaim></RequiredClaims><TokenType>SWT</TokenType></TokenRestrictionTemplate>"; - TokenRestrictionTemplate template = TokenRestrictionTemplateSerializer.deserialize(tokenTemplate); - assertNotNull(template); - assertEquals(TokenType.SWT, template.getTokenType()); - } - - @Test - public void InputMissingIssuerShouldThrow() { - String tokenTemplate = "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\"><AlternateVerificationKeys><TokenVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>RmFrZVRlc3RLZXk=</KeyValue></TokenVerificationKey></AlternateVerificationKeys><Audience>http://sampleaudience/</Audience><PrimaryVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>RmFrZVRlc3RLZXk=</KeyValue></PrimaryVerificationKey><RequiredClaims><TokenClaim><ClaimType>urn:microsoft:azure:mediaservices:contentkeyidentifier</ClaimType><ClaimValue i:nil=\"true\" /></TokenClaim><TokenClaim><ClaimType>urn:myservice:claims:rental</ClaimType><ClaimValue>true</ClaimValue></TokenClaim></RequiredClaims></TokenRestrictionTemplate>"; - - try { - @SuppressWarnings("unused") - TokenRestrictionTemplate template = TokenRestrictionTemplateSerializer.deserialize(tokenTemplate, - schemaFile); - fail("Should throw"); - } catch (JAXBException e) { - assertTrue(e.getLinkedException().getMessage().contains("Issuer")); - } catch (SAXException e) { - fail("Invalid Schema"); - } - } - - @Test - public void InputMissingAudienceShouldThrow() { - String tokenTemplate = "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\"><AlternateVerificationKeys><TokenVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>RmFrZVRlc3RLZXk=</KeyValue></TokenVerificationKey></AlternateVerificationKeys><Issuer>http://sampleissuerurl/</Issuer><PrimaryVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>RmFrZVRlc3RLZXk=</KeyValue></PrimaryVerificationKey><RequiredClaims><TokenClaim><ClaimType>urn:microsoft:azure:mediaservices:contentkeyidentifier</ClaimType><ClaimValue i:nil=\"true\" /></TokenClaim><TokenClaim><ClaimType>urn:myservice:claims:rental</ClaimType><ClaimValue>true</ClaimValue></TokenClaim></RequiredClaims></TokenRestrictionTemplate>"; - - try { - @SuppressWarnings("unused") - TokenRestrictionTemplate template = TokenRestrictionTemplateSerializer.deserialize(tokenTemplate, - schemaFile); - fail("Should throw"); - } catch (JAXBException e) { - assertTrue(e.getLinkedException().getMessage().contains("Audience")); - } catch (SAXException e) { - fail("Invalid Schema"); - } - } - - @Test - public void InputMissingPrimaryKeyShouldThrow() { - String tokenTemplate = "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\"><AlternateVerificationKeys><TokenVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>RmFrZVRlc3RLZXk=</KeyValue></TokenVerificationKey></AlternateVerificationKeys><Audience>http://sampleaudience/</Audience><Issuer>http://sampleissuerurl/</Issuer><RequiredClaims><TokenClaim><ClaimType>urn:microsoft:azure:mediaservices:contentkeyidentifier</ClaimType><ClaimValue i:nil=\"true\" /></TokenClaim><TokenClaim><ClaimType>urn:myservice:claims:rental</ClaimType><ClaimValue>true</ClaimValue></TokenClaim></RequiredClaims></TokenRestrictionTemplate>"; - - try { - @SuppressWarnings("unused") - TokenRestrictionTemplate template = TokenRestrictionTemplateSerializer.deserialize(tokenTemplate, - schemaFile); - fail("Should throw"); - } catch (JAXBException e) { - assertTrue(e.getLinkedException().getMessage().contains("PrimaryVerificationKey")); - } catch (SAXException e) { - fail("Invalid Schema"); - } - } - - @Test - public void InputMissingRequiredClaimsOkay() throws JAXBException { - String tokenTemplate = "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\"><AlternateVerificationKeys><TokenVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>FakeTestKey</KeyValue></TokenVerificationKey></AlternateVerificationKeys><Audience>http://sampleaudience/</Audience><Issuer>http://sampleissuerurl/</Issuer><PrimaryVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>FakeTestKey</KeyValue></PrimaryVerificationKey></TokenRestrictionTemplate>"; - - TokenRestrictionTemplate template = TokenRestrictionTemplateSerializer.deserialize(tokenTemplate); - assertNotNull(template); - assertEquals(template.getTokenType(), TokenType.SWT); - } - - @Test - public void knownGoodGenerateTestTokenSWT() throws Exception { - // Arrange - String expectedToken = "urn%3amicrosoft%3aazure%3amediaservices%3acontentkeyidentifier=24734598-f050-4cbb-8b98-2dad6eaa260a&Audience=http%3a%2f%2faudience.com&ExpiresOn=1451606400&Issuer=http%3a%2f%2fissuer.com&HMACSHA256=2XrNjMo1EIZflJOovHxt9dekEhb2DhqG9fU5MjQy9vI%3d"; - byte[] knownSymetricKey = "64bytes6RNhi8EsxcYsdYQ9zpFuNR1Ks9milykbxYWGILaK0LKzd5dCtYonsr456".getBytes(); - UUID knownGuid = UUID.fromString("24734598-f050-4cbb-8b98-2dad6eaa260a"); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH); - sdf.setTimeZone(TimeZone.getTimeZone("UTC")); - Date knownExpireOn = sdf.parse("2016-01-01"); - String knownAudience = "http://audience.com"; - String knownIssuer = "http://issuer.com"; - TokenRestrictionTemplate template = new TokenRestrictionTemplate(TokenType.SWT); - template.setPrimaryVerificationKey(new SymmetricVerificationKey(knownSymetricKey)); - template.setAudience(new URI(knownAudience)); - template.setIssuer(new URI(knownIssuer)); - template.getRequiredClaims().add(TokenClaim.getContentKeyIdentifierClaim()); - - // Act - String resultsToken = TokenRestrictionTemplateSerializer.generateTestToken(template, - template.getPrimaryVerificationKey(), knownGuid, knownExpireOn, null); - - // Assert - assertEquals(expectedToken, resultsToken); - } - - @Test - public void knownGoodGenerateTestTokenJWT() throws Exception { - // Arrange - String expectedToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ1cm46Y29udG9zbyIsInVybjptaWNyb3NvZnQ6YXp1cmU6bWVkaWFzZXJ2aWNlczpjb250ZW50a2V5aWRlbnRpZmllciI6IjA5MTQ0MzVkLTE1MDAtODBjNC02YzJiLWYxZTUyZmRhNDdhZSIsImlzcyI6Imh0dHBzOi8vdHN0LmNvbnRvc28uY29tIiwiZXhwIjoxNDUxNjA2NDAwLCJpYXQiOjE0MjAwNzA0MDB9.Lv3YphKPyakYwcX3CAcA--VKOrvBG0CuAARejz3DDLM"; - byte[] knownSymetricKey = "64bytes6RNhi8EsxcYsdYQ9zpFuNR1Ks9milykbxYWGILaK0LKzd5dCtYonsr456".getBytes(); - String strUuid = "0914435d-1500-80c4-6c2b-f1e52fda47ae"; - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH); - sdf.setTimeZone(TimeZone.getTimeZone("UTC")); - Date notBefore = sdf.parse("2015-01-01"); - Date expires = sdf.parse("2016-01-01"); - String knownAudience = "urn:contoso"; - String knownIssuer = "https://tst.contoso.com"; - TokenRestrictionTemplate template = new TokenRestrictionTemplate(TokenType.JWT); - template.setPrimaryVerificationKey(new SymmetricVerificationKey(knownSymetricKey)); - template.setAudience(new URI(knownAudience)); - template.setIssuer(new URI(knownIssuer)); - template.getRequiredClaims().add(new TokenClaim(TokenClaim.getContentKeyIdentifierClaimType(), strUuid)); - - // Act - String resultsToken = TokenRestrictionTemplateSerializer.generateTestToken(template, null, null, expires, notBefore); - - // Assert - assertEquals(expectedToken, resultsToken); - } - - @Test - public void NullContentKeyIdentifierClaimShouldThrownSWT() throws Exception { - byte[] knownSymetricKey = "64bytes6RNhi8EsxcYsdYQ9zpFuNR1Ks9milykbxYWGILaK0LKzd5dCtYonsr456".getBytes(); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH); - sdf.setTimeZone(TimeZone.getTimeZone("UTC")); - Date knownExpireOn = sdf.parse("2016-01-01"); - String knownAudience = "http://audience.com"; - String knownIssuer = "http://issuer.com"; - TokenRestrictionTemplate template = new TokenRestrictionTemplate(TokenType.SWT); - template.setPrimaryVerificationKey(new SymmetricVerificationKey(knownSymetricKey)); - template.setAudience(new URI(knownAudience)); - template.setIssuer(new URI(knownIssuer)); - template.getRequiredClaims().add(TokenClaim.getContentKeyIdentifierClaim()); - - // Act - try { - TokenRestrictionTemplateSerializer.generateTestToken(template, - template.getPrimaryVerificationKey(), null, knownExpireOn, null); - fail("Null ContentKeyIdentifier Claim Should thrown."); - } catch(IllegalArgumentException e) { - // Assert - assertTrue(e.getMessage().contains("keyIdForContentKeyIdentifierClaim")); - } - } - - @Test - public void NullContentKeyIdentifierClaimShouldThrownJWT() throws Exception { - byte[] knownSymetricKey = "64bytes6RNhi8EsxcYsdYQ9zpFuNR1Ks9milykbxYWGILaK0LKzd5dCtYonsr456".getBytes(); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH); - sdf.setTimeZone(TimeZone.getTimeZone("UTC")); - Date knownExpireOn = sdf.parse("2016-01-01"); - String knownAudience = "http://audience.com"; - String knownIssuer = "http://issuer.com"; - TokenRestrictionTemplate template = new TokenRestrictionTemplate(TokenType.JWT); - template.setPrimaryVerificationKey(new SymmetricVerificationKey(knownSymetricKey)); - template.setAudience(new URI(knownAudience)); - template.setIssuer(new URI(knownIssuer)); - template.getRequiredClaims().add(TokenClaim.getContentKeyIdentifierClaim()); - - // Act - try { - TokenRestrictionTemplateSerializer.generateTestToken(template, - template.getPrimaryVerificationKey(), null, knownExpireOn, null); - fail("Null ContentKeyIdentifier Claim Should thrown."); - } catch(IllegalArgumentException e) { - // Assert - assertTrue(e.getMessage().contains("keyIdForContentKeyIdentifierClaim")); - } - } - - @Test - public void OpenIdDocumentAsVerificationKeyRoundTrip() throws JAXBException, URISyntaxException - { - String openConnectId = "https://openconnectIddiscoveryUri"; - String expectedElement = - "<OpenIdDiscoveryUri>https://openconnectIddiscoveryUri</OpenIdDiscoveryUri>"; - - TokenRestrictionTemplate template = new TokenRestrictionTemplate(TokenType.JWT); - template.setAudience(new URI(_sampleAudience)); - template.setIssuer(new URI(_sampleIssuer)); - OpenIdConnectDiscoveryDocument openId = new OpenIdConnectDiscoveryDocument(); - openId.setOpenIdDiscoveryUri(openConnectId); - template.setOpenIdConnectDiscoveryDocument(openId); - String templateAsString = TokenRestrictionTemplateSerializer.serialize(template); - assertTrue(templateAsString.contains("<PrimaryVerificationKey i:nil=\"true\"/>")); - assertTrue(templateAsString.contains(expectedElement)); - TokenRestrictionTemplate output = TokenRestrictionTemplateSerializer.deserialize(templateAsString); - assertNotNull(output); - assertNotNull(output.getOpenIdConnectDiscoveryDocument()); - assertNull(output.getPrimaryVerificationKey()); - assertTrue(output.getAlternateVerificationKeys().isEmpty()); - assertEquals(output.getOpenIdConnectDiscoveryDocument().getOpenIdDiscoveryUri(), openConnectId); - - } - - @Test - public void TokenRestrictionTemplateSerializeNotPrimaryKeyAndNoOpenConnectIdDocument() throws URISyntaxException - { - TokenRestrictionTemplate template = new TokenRestrictionTemplate(TokenType.JWT); - template.setAudience(new URI(_sampleAudience)); - template.setIssuer(new URI(_sampleIssuer)); - try { - TokenRestrictionTemplateSerializer.serialize(template); - fail(); - } - catch (Exception ex) { - assertEquals("Both PrimaryVerificationKey and OpenIdConnectDiscoveryDocument are null.", ex.getMessage()); - } - } - - @Test - public void InputMissingPrimaryKeyShouldNotThrow() - { - String tokenTemplate = "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\"><AlternateVerificationKeys><TokenVerificationKey i:type=\"SymmetricVerificationKey\"><KeyValue>FakeTestKey</KeyValue></TokenVerificationKey></AlternateVerificationKeys><Audience>http://sampleaudience/</Audience><Issuer>http://sampleissuerurl/</Issuer><RequiredClaims><TokenClaim><ClaimType>urn:microsoft:azure:mediaservices:contentkeyidentifier</ClaimType><ClaimValue i:nil=\"true\" /></TokenClaim><TokenClaim><ClaimType>urn:myservice:claims:rental</ClaimType><ClaimValue>true</ClaimValue></TokenClaim></RequiredClaims></TokenRestrictionTemplate>"; - try { - TokenRestrictionTemplateSerializer.deserialize(tokenTemplate); - fail(); - } catch (Exception ex) { - assertEquals("Both PrimaryVerificationKey and OpenIdConnectDiscoveryDocument are null.", ex.getMessage()); - } - } - - @Test - public void TokenRestrictionTemplateDeserializeNotAbsoluteDiscoveryUri() - { - String body = - "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\" ><AlternateVerificationKeys /><Audience>http://sampleissuerurl/</Audience><Issuer>http://sampleaudience/</Issuer><OpenIdConnectDiscoveryDocument ><OpenIdDiscoveryUri >RelativeUri</OpenIdDiscoveryUri></OpenIdConnectDiscoveryDocument></TokenRestrictionTemplate>"; - - try - { - TokenRestrictionTemplateSerializer.deserialize(body); - fail(); - } - catch (Exception ex) - { - assertEquals("String representation of OpenIdConnectDiscoveryDocument.OpenIdDiscoveryUri is not valid absolute Uri.", ex.getMessage()); - } - } - - @Test - public void TokenRestrictionTemplateDeserializeNilOpenConnectIdDocumentUriNoPrimaryKey() - { - String body = - "<TokenRestrictionTemplate xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1\" ><AlternateVerificationKeys /><Audience>http://sampleissuerurl/</Audience><Issuer>http://sampleaudience/</Issuer><OpenIdConnectDiscoveryDocument ><OpenIdDiscoveryUri i:nil=\"true\"></OpenIdDiscoveryUri></OpenIdConnectDiscoveryDocument></TokenRestrictionTemplate>"; - try - { - TokenRestrictionTemplateSerializer.deserialize(body); - fail(); - } - catch (Exception ex) - { - assertEquals("OpenIdConnectDiscoveryDocument.OpenIdDiscoveryUri string value is null or empty.", ex.getMessage()); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenTypeTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenTypeTests.java deleted file mode 100644 index b51451310d0e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/TokenTypeTests.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import static org.junit.Assert.*; - -import java.security.InvalidParameterException; -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction.TokenType; - -public class TokenTypeTests { - - @Test - public void valueOfUndefinedTokenTypeTests() { - // provides full code coverage - assertEquals(TokenType.Undefined, TokenType.valueOf("Undefined")); - assertEquals(TokenType.SWT, TokenType.valueOf("SWT")); - assertEquals(TokenType.JWT, TokenType.valueOf("JWT")); - } - - @Test - public void fromCodeUndefinedTokenTypeTests() { - // Arrange - TokenType expectedTokenType = TokenType.Undefined; - - // Act - TokenType tokenTypeResult = TokenType.fromCode(0); - - // Assert - assertEquals(tokenTypeResult, expectedTokenType); - } - - @Test - public void fromCodeSWTTokenTypeTests() { - // Arrange - TokenType expectedTokenType = TokenType.SWT; - - // Act - TokenType tokenTypeResult = TokenType.fromCode(1); - - // Assert - assertEquals(tokenTypeResult, expectedTokenType); - } - - @Test - public void fromCodeJWTTokenTypeTests() { - // Arrange - TokenType expectedTokenType = TokenType.JWT; - - // Act - TokenType tokenTypeResult = TokenType.fromCode(2); - - // Assert - assertEquals(tokenTypeResult, expectedTokenType); - } - - @Test - public void fromCodeInvalidTokenTypeTests() { - // Arrange - int invalidCode = 666; - String expectedMessage = "code"; - // Act - try { - @SuppressWarnings("unused") - TokenType tokenTypeResult = TokenType.fromCode(invalidCode); - fail("Should throw"); - } catch (InvalidParameterException e) { - // Assert - assertEquals(e.getMessage(), expectedMessage); - } - } - - @Test - public void getCodeJWTTokenTypeTests() { - // Arrange - int expectedCode = 2; - - // Act - TokenType tokenTypeResult = TokenType.JWT; - int resultCode = tokenTypeResult.getCode(); - - // Assert - assertEquals(resultCode, expectedCode); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/X509CertTokenVerificationKeyTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/X509CertTokenVerificationKeyTests.java deleted file mode 100644 index 21daf4e1011a..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/tokenrestriction/X509CertTokenVerificationKeyTests.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction; - -import static org.junit.Assert.*; - -import java.io.BufferedInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.templates.tokenrestriction.X509CertTokenVerificationKey; - -public class X509CertTokenVerificationKeyTests { - - private final URL certFileName = getClass().getResource("/certificate/server.crt"); - - @Test - public void EmptyX509Certificate() { - // Arrange - X509CertTokenVerificationKey certKey = new X509CertTokenVerificationKey(); - - // Act - X509Certificate cert = certKey.getX509Certificate(); - - // Assert - assertNull(cert); - } - - @Test - public void X509CertificateInConstructorShouldExists() throws CertificateException, IOException { - // Arrange - InputStream certFile = certFileName.openStream(); - BufferedInputStream certInStream = new BufferedInputStream(certFile); - X509Certificate cert = (X509Certificate) - CertificateFactory.getInstance("X.509").generateCertificate(certInStream); - - // Act - X509CertTokenVerificationKey certKey = new X509CertTokenVerificationKey(cert); - X509Certificate resultCert = certKey.getX509Certificate(); - - // Assert - assertNotNull(resultCert); - assertEquals(cert, resultCert); - } - - @Test - public void GetterSetterX509Certificate() throws CertificateException, IOException { - // Arrange - InputStream certFile = certFileName.openStream(); - BufferedInputStream certInStream = new BufferedInputStream(certFile); - X509Certificate cert = (X509Certificate) - CertificateFactory.getInstance("X.509").generateCertificate(certInStream); - - // Act - X509CertTokenVerificationKey certKey = new X509CertTokenVerificationKey(); - certKey.setX509Certificate(cert); - X509Certificate resultCert = certKey.getX509Certificate(); - - // Assert - assertNotNull(resultCert); - assertEquals(cert, resultCert); - } - - @Test - public void RawBodyOfX509CertificateShouldMatch() throws CertificateException, IOException { - // Arrange - InputStream certFile = certFileName.openStream(); - BufferedInputStream certInStream = new BufferedInputStream(certFile); - X509Certificate cert = (X509Certificate) - CertificateFactory.getInstance("X.509").generateCertificate(certInStream); - X509CertTokenVerificationKey certKey = new X509CertTokenVerificationKey(cert); - - // Act - byte[] rawBody = certKey.getRawBody(); - X509CertTokenVerificationKey secondCertKey = new X509CertTokenVerificationKey(); - secondCertKey.setRawBody(rawBody); - X509Certificate resultCert = secondCertKey.getX509Certificate(); - - // Assert - assertNotNull(resultCert); - assertEquals(cert, resultCert); - } - - @Test - public void InvalidRawBodyOfX509CertificateShouldNullRawBody() throws CertificateException, IOException { - // Arrange - X509CertTokenVerificationKey certKey = new X509CertTokenVerificationKey(); - - // Act - certKey.setRawBody("invalid rawbody".getBytes()); - byte[] resultRawBody = certKey.getRawBody(); - - // Assert - assertNull(resultRawBody); - } - - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/WidevineMessageSerializerTests.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/WidevineMessageSerializerTests.java deleted file mode 100644 index e23d2c7d1d0b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/implementation/templates/widevine/WidevineMessageSerializerTests.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.microsoft.windowsazure.services.media.implementation.templates.widevine; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import java.io.IOException; -import java.net.URISyntaxException; -import javax.xml.bind.JAXBException; - -import org.junit.Test; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; - -public class WidevineMessageSerializerTests { - - @Test - public void RoundTripTest() throws JAXBException, URISyntaxException, IOException { - ObjectMapper mapper = new ObjectMapper(); - WidevineMessage message = new WidevineMessage(); - message.setAllowedTrackTypes(AllowedTrackTypes.SD_HD); - ContentKeySpecs ckspecs = new ContentKeySpecs(); - message.setContentKeySpecs(new ContentKeySpecs[] { ckspecs }); - ckspecs.setRequiredOutputProtection(new RequiredOutputProtection()); - ckspecs.getRequiredOutputProtection().setHdcp(Hdcp.HDCP_NONE); - ckspecs.setSecurityLevel(1); - ckspecs.setTrackType("SD"); - message.setPolicyOverrides(new Object() { - public boolean can_play = true; - public boolean can_persist = true; - public boolean can_renew = false; - }); - - String json = mapper.writeValueAsString(message); - - WidevineMessage result = mapper.readValue(json, WidevineMessage.class); - - assertEqualsWidevineMessage(message, result); - } - - @Test - public void FromJsonTest() throws JAXBException, URISyntaxException, JsonProcessingException { - String expected = "{\"allowed_track_types\":\"SD_HD\",\"content_key_specs\":[{\"track_type\":\"SD\",\"key_id\":null,\"security_level\":1,\"required_output_protection\":{\"hdcp\":\"HDCP_NONE\"}}],\"policy_overrides\":{\"can_play\":true,\"can_persist\":true,\"can_renew\":false}}"; - ObjectMapper mapper = new ObjectMapper(); - WidevineMessage message = new WidevineMessage(); - message.setAllowedTrackTypes(AllowedTrackTypes.SD_HD); - ContentKeySpecs ckspecs = new ContentKeySpecs(); - message.setContentKeySpecs(new ContentKeySpecs[] { ckspecs }); - ckspecs.setRequiredOutputProtection(new RequiredOutputProtection()); - ckspecs.getRequiredOutputProtection().setHdcp(Hdcp.HDCP_NONE); - ckspecs.setSecurityLevel(1); - ckspecs.setTrackType("SD"); - message.setPolicyOverrides(new Object() { - public boolean can_play = true; - public boolean can_persist = true; - public boolean can_renew = false; - }); - - String json = mapper.writeValueAsString(message); - - assertEquals(expected, json); - } - - private static void assertEqualsWidevineMessage(WidevineMessage expected, WidevineMessage actual) { - assertEquals(expected.getAllowedTrackTypes(), actual.getAllowedTrackTypes()); - if (expected.getContentKeySpecs() == null) { - assertNull(actual.getContentKeySpecs()); - } else { - assertNotNull(actual.getContentKeySpecs()); - assertEquals(expected.getContentKeySpecs().length, actual.getContentKeySpecs().length); - for (int i = 0; i < expected.getContentKeySpecs().length; i++) { - ContentKeySpecs expectedCks = expected.getContentKeySpecs()[i]; - ContentKeySpecs actualCks = actual.getContentKeySpecs()[i]; - assertEquals(expectedCks.getKeyId(), actualCks.getKeyId()); - assertEquals(expectedCks.getSecurityLevel(), actualCks.getSecurityLevel()); - assertEquals(expectedCks.getTrackType(), actualCks.getTrackType()); - if (expectedCks.getRequiredOutputProtection() != null) { - assertNotNull(actualCks.getRequiredOutputProtection()); - assertEquals(expectedCks.getRequiredOutputProtection().getHdcp(), - actualCks.getRequiredOutputProtection().getHdcp()); - } else { - assertNull(actualCks.getRequiredOutputProtection()); - } - assertEquals(expectedCks.getKeyId(), actualCks.getKeyId()); - } - } - if (expected.getPolicyOverrides() == null) { - assertNull(actual.getPolicyOverrides()); - } else { - assertNotNull(actual.getPolicyOverrides()); - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyEntityTest.java deleted file mode 100644 index d875f988d51b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyEntityTest.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.net.URLEncoder; -import java.util.EnumSet; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.implementation.content.AccessPolicyType; - -/** - * Tests for access policy entity - * - */ -public class AccessPolicyEntityTest { - private static final String examplePolicyId = "nb:pid:UUID:c577052a-6c0a-45b0-bf15-3ff3a2a41802"; - private final String expectedUri; - - public AccessPolicyEntityTest() throws Exception { - expectedUri = String.format("AccessPolicies('%s')", - URLEncoder.encode(examplePolicyId, "UTF-8")); - } - - @Test - public void createAccessPolicyProvidesExpectedPayload() throws Exception { - String name = "some Access Policy"; - double duration = 10; - EnumSet<AccessPolicyPermission> permissions = EnumSet.of( - AccessPolicyPermission.READ, AccessPolicyPermission.LIST); - - EntityCreateOperation<AccessPolicyInfo> creator = AccessPolicy.create( - name, duration, permissions); - - AccessPolicyType payload = (AccessPolicyType) creator - .getRequestContents(); - - assertEquals(name, payload.getName()); - assertEquals(duration, payload.getDurationInMinutes(), 0.0); - assertEquals(AccessPolicyPermission.bitsFromPermissions(permissions), - payload.getPermissions().intValue()); - } - - @Test - public void getReturnsExpectedUri() throws Exception { - EntityGetOperation<AccessPolicyInfo> getter = AccessPolicy - .get(examplePolicyId); - - assertEquals(expectedUri, getter.getUri()); - } - - @Test - public void listReturnsExpectedUri() throws Exception { - EntityListOperation<AccessPolicyInfo> lister = AccessPolicy.list(); - - assertEquals("AccessPolicies", lister.getUri()); - } - - @Test - public void listWithQueryParametersReturnsThem() throws Exception { - EntityListOperation<AccessPolicyInfo> lister = AccessPolicy.list() - .setTop(10).setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void deleteReturnsExpectedUri() throws Exception { - assertEquals(expectedUri, AccessPolicy.delete(examplePolicyId).getUri()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyInfoTest.java deleted file mode 100644 index 07732ab7cc13..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyInfoTest.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import java.util.Date; -import java.util.EnumSet; - -import org.junit.Assert; -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.AccessPolicyType; - -public class AccessPolicyInfoTest { - - @Test - public void getSetId() { - String expected = "expectedId"; - - AccessPolicyInfo policy = new AccessPolicyInfo(null, - new AccessPolicyType().setId(expected)); - - String actual = policy.getId(); - - Assert.assertEquals(expected, actual); - } - - @Test - public void getSetCreated() { - Date expected = new Date(); - AccessPolicyInfo policy = new AccessPolicyInfo(null, - new AccessPolicyType().setCreated(expected)); - - Date actual = policy.getCreated(); - - Assert.assertEquals(expected, actual); - } - - @Test - public void getSetLastModified() { - Date expected = new Date(); - AccessPolicyInfo policy = new AccessPolicyInfo(null, - new AccessPolicyType().setLastModified(expected)); - - Date actual = policy.getLastModified(); - - Assert.assertEquals(expected, actual); - } - - @Test - public void getSetName() { - String expected = "policy name goes here"; - AccessPolicyInfo policy = new AccessPolicyInfo(null, - new AccessPolicyType().setName(expected)); - - String actual = policy.getName(); - - Assert.assertEquals(expected, actual); - } - - @Test - public void getSetDurationInMinutes() { - double expected = 60; // arbitrary value - AccessPolicyInfo policy = new AccessPolicyInfo(null, - new AccessPolicyType().setDurationInMinutes(expected)); - - double actual = policy.getDurationInMinutes(); - - Assert.assertEquals(expected, actual, 0.0); - } - - @Test - public void getSetPermissions() { - EnumSet<AccessPolicyPermission> expected = EnumSet.of( - AccessPolicyPermission.LIST, AccessPolicyPermission.WRITE); - AccessPolicyInfo policy = new AccessPolicyInfo(null, - new AccessPolicyType().setPermissions(AccessPolicyPermission - .bitsFromPermissions(expected))); - - EnumSet<AccessPolicyPermission> actual = policy.getPermissions(); - - Assert.assertEquals(expected, actual); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyPermissionTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyPermissionTest.java deleted file mode 100644 index f9134fb1eac2..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AccessPolicyPermissionTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import java.util.EnumSet; - -import org.junit.Test; - -public class AccessPolicyPermissionTest { - - @Test - public void testGetFlagValue() { - assertEquals(0, AccessPolicyPermission.NONE.getFlagValue()); - assertEquals(1, AccessPolicyPermission.READ.getFlagValue()); - assertEquals(2, AccessPolicyPermission.WRITE.getFlagValue()); - assertEquals(4, AccessPolicyPermission.DELETE.getFlagValue()); - assertEquals(8, AccessPolicyPermission.LIST.getFlagValue()); - } - - @Test - public void testZeroResultsInNonePermission() { - EnumSet<AccessPolicyPermission> perms = AccessPolicyPermission - .permissionsFromBits(0); - assertTrue(perms.contains(AccessPolicyPermission.NONE)); - } - - @Test - public void testAllBitsSetResultsInAllPermissions() { - EnumSet<AccessPolicyPermission> perms = AccessPolicyPermission - .permissionsFromBits(1 + 2 + 4 + 8); - - assertFalse(perms.contains(AccessPolicyPermission.NONE)); - assertTrue(perms.contains(AccessPolicyPermission.READ)); - assertTrue(perms.contains(AccessPolicyPermission.WRITE)); - assertTrue(perms.contains(AccessPolicyPermission.DELETE)); - assertTrue(perms.contains(AccessPolicyPermission.LIST)); - } - - @Test - public void testWriteBitsResultsInOnlyWritePermissions() { - EnumSet<AccessPolicyPermission> perms = AccessPolicyPermission - .permissionsFromBits(2); - - assertFalse(perms.contains(AccessPolicyPermission.NONE)); - assertFalse(perms.contains(AccessPolicyPermission.READ)); - assertTrue(perms.contains(AccessPolicyPermission.WRITE)); - assertFalse(perms.contains(AccessPolicyPermission.DELETE)); - assertFalse(perms.contains(AccessPolicyPermission.LIST)); - } - - @Test - public void testEmptyPermissionsResultsInZeroBits() { - EnumSet<AccessPolicyPermission> perms = EnumSet - .noneOf(AccessPolicyPermission.class); - int bits = AccessPolicyPermission.bitsFromPermissions(perms); - - assertEquals(0, bits); - } - - @Test - public void allPermissionsInSetResultsInCorrectValue() { - EnumSet<AccessPolicyPermission> perms = EnumSet.of( - AccessPolicyPermission.READ, AccessPolicyPermission.WRITE, - AccessPolicyPermission.DELETE, AccessPolicyPermission.LIST, - AccessPolicyPermission.NONE); - int bits = AccessPolicyPermission.bitsFromPermissions(perms); - - assertEquals(1 + 2 + 4 + 8, bits); - } - - @Test - public void writePermissionsInSetResultsInCorrectValue() { - EnumSet<AccessPolicyPermission> perms = EnumSet - .of(AccessPolicyPermission.WRITE); - int bits = AccessPolicyPermission.bitsFromPermissions(perms); - - assertEquals(2, bits); - } - - @Test - public void unknownPermissionBitsAreIgnored() { - EnumSet<AccessPolicyPermission> perms = AccessPolicyPermission - .permissionsFromBits(16 + 32); - - assertTrue(perms.contains(AccessPolicyPermission.NONE)); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyEntityTest.java deleted file mode 100644 index ce801b584bee..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetDeliveryPolicyEntityTest.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import java.io.StringReader; -import java.io.StringWriter; -import java.util.Date; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; -import javax.xml.namespace.QName; -import javax.xml.transform.stream.StreamSource; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.AssetDeliveryPolicyRestType; - -/** - * Tests for access policy entity - * - */ -public class AssetDeliveryPolicyEntityTest { - - private final String sampleAdpId = "nb:adpid:UUID:92b0f6ba-3c9f-49b6-a5fa-2a8703b04ecd"; - - public AssetDeliveryPolicyEntityTest() throws Exception { - } - - @Test - public void restTypeRoundTripTest() throws Exception { - // Arrange - String expectedName = "restTypeRoundTripTest"; - String expectedEnvelopeBaseKeyAcquisitionUrl = "expectedEnvelopeBaseKeyAcquisitionUrl"; - String expectedEnvelopeEncryptionIV = "expectedEnvelopeEncryptionIV"; - String expectedEnvelopeEncryptionIVAsBase64 = "expectedEnvelopeEncryptionIVAsBase64"; - String expectedEnvelopeKeyAcquisitionUrl = "expectedEnvelopeKeyAcquisitionUrl"; - String expectedPlayReadyCustomAttributes = "expectedPlayReadyCustomAttributes"; - String expectedPlayReadyLicenseAcquisitionUrl = "expectedPlayReadyLicenseAcquisitionUrl"; - AssetDeliveryPolicyType expectedAssetDeliveryPolicyType = AssetDeliveryPolicyType.DynamicCommonEncryption; - Date expectedDate = new Date(); - AssetDeliveryPolicyRestType adp = new AssetDeliveryPolicyRestType(); - adp.setId(sampleAdpId); - adp.setCreated(expectedDate); - adp.setName(expectedName); - adp.setAssetDeliveryProtocol(AssetDeliveryProtocol.bitsFromProtocols(EnumSet.of(AssetDeliveryProtocol.Dash, AssetDeliveryProtocol.Hds, AssetDeliveryProtocol.HLS, AssetDeliveryProtocol.SmoothStreaming))); - Map<AssetDeliveryPolicyConfigurationKey, String> assetDeliveryConfiguration - = new HashMap<AssetDeliveryPolicyConfigurationKey, String>(); - assetDeliveryConfiguration.put(AssetDeliveryPolicyConfigurationKey.EnvelopeBaseKeyAcquisitionUrl, expectedEnvelopeBaseKeyAcquisitionUrl); - assetDeliveryConfiguration.put(AssetDeliveryPolicyConfigurationKey.EnvelopeEncryptionIV, expectedEnvelopeEncryptionIV); - assetDeliveryConfiguration.put(AssetDeliveryPolicyConfigurationKey.EnvelopeEncryptionIVAsBase64, expectedEnvelopeEncryptionIVAsBase64); - assetDeliveryConfiguration.put(AssetDeliveryPolicyConfigurationKey.EnvelopeKeyAcquisitionUrl, expectedEnvelopeKeyAcquisitionUrl); - assetDeliveryConfiguration.put(AssetDeliveryPolicyConfigurationKey.PlayReadyCustomAttributes, expectedPlayReadyCustomAttributes); - assetDeliveryConfiguration.put(AssetDeliveryPolicyConfigurationKey.PlayReadyLicenseAcquisitionUrl, expectedPlayReadyLicenseAcquisitionUrl); - adp.setAssetDeliveryConfiguration(assetDeliveryConfiguration); - adp.setAssetDeliveryPolicyType(expectedAssetDeliveryPolicyType.getCode()); - - JAXBContext context = JAXBContext.newInstance(AssetDeliveryPolicyRestType.class); - JAXBContext context2 = JAXBContext.newInstance(AssetDeliveryPolicyRestType.class); - Marshaller marshaller = context.createMarshaller(); - Unmarshaller unmarshaller = context2.createUnmarshaller(); - StringWriter writer = new StringWriter(); - QName qName = new QName("test.schema", "AssetDeliveryPolicyRestType"); - JAXBElement<AssetDeliveryPolicyRestType> root = new JAXBElement<AssetDeliveryPolicyRestType>(qName, AssetDeliveryPolicyRestType.class, adp); - // Act - marshaller.marshal(root, writer); - String xml = writer.toString(); - - JAXBElement<AssetDeliveryPolicyRestType> root2 = (JAXBElement<AssetDeliveryPolicyRestType>) unmarshaller.unmarshal(new StreamSource(new StringReader(xml)), AssetDeliveryPolicyRestType.class); - AssetDeliveryPolicyRestType results = root2.getValue(); - - // Assert - assertNotNull(results); - Map<AssetDeliveryPolicyConfigurationKey, String> resultADC = results.getAssetDeliveryConfiguration(); - assertEquals(resultADC.get(AssetDeliveryPolicyConfigurationKey.EnvelopeBaseKeyAcquisitionUrl), expectedEnvelopeBaseKeyAcquisitionUrl); - assertEquals(resultADC.get(AssetDeliveryPolicyConfigurationKey.EnvelopeEncryptionIV), expectedEnvelopeEncryptionIV); - assertEquals(resultADC.get(AssetDeliveryPolicyConfigurationKey.EnvelopeEncryptionIVAsBase64), expectedEnvelopeEncryptionIVAsBase64); - assertEquals(resultADC.get(AssetDeliveryPolicyConfigurationKey.EnvelopeKeyAcquisitionUrl), expectedEnvelopeKeyAcquisitionUrl); - assertEquals(resultADC.get(AssetDeliveryPolicyConfigurationKey.PlayReadyCustomAttributes), expectedPlayReadyCustomAttributes); - assertEquals(resultADC.get(AssetDeliveryPolicyConfigurationKey.PlayReadyLicenseAcquisitionUrl), expectedPlayReadyLicenseAcquisitionUrl); - assertEquals(results.getAssetDeliveryPolicyType().intValue(), expectedAssetDeliveryPolicyType.getCode()); - assertEquals(results.getCreated(), expectedDate); - assertEquals(results.getName(), expectedName); - assertEquals(results.getId(), sampleAdpId); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetEntityTest.java deleted file mode 100644 index aa72b1811cfd..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetEntityTest.java +++ /dev/null @@ -1,207 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import java.net.URLEncoder; - -import javax.xml.bind.JAXBElement; -import javax.xml.namespace.QName; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.atom.LinkType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; -import com.microsoft.windowsazure.services.media.implementation.content.Constants; -import com.microsoft.windowsazure.services.media.implementation.content.JobType; - -/** - * Tests for the methods and factories of the Asset entity. - */ -public class AssetEntityTest { - static final String sampleAssetId = "nb:cid:UUID:1151b8bd-9ada-4e7f-9787-8dfa49968eab"; - private final String expectedUri = String.format("Assets('%s')", - URLEncoder.encode(sampleAssetId, "UTF-8")); - - public AssetEntityTest() throws Exception { - } - - @Test - public void assetCreateReturnsDefaultCreatePayload() { - AssetType payload = (AssetType) Asset.create().getRequestContents(); - - assertNotNull(payload); - assertNull(payload.getId()); - assertNull(payload.getState()); - assertNull(payload.getCreated()); - assertNull(payload.getLastModified()); - assertNull(payload.getAlternateId()); - assertNull(payload.getName()); - assertNull(payload.getOptions()); - } - - @Test - public void assetCreateCanSetAssetName() { - String name = "assetCreateCanSetAssetName"; - - Asset.Creator creator = Asset.create().setName( - "assetCreateCanSetAssetName"); - - AssetType payload = (AssetType) creator.getRequestContents(); - - assertNotNull(payload); - assertNull(payload.getId()); - assertNull(payload.getState()); - assertNull(payload.getCreated()); - assertNull(payload.getLastModified()); - assertNull(payload.getAlternateId()); - assertEquals(name, payload.getName()); - assertNull(payload.getOptions()); - } - - @Test - public void assetGetReturnsExpectedUri() throws Exception { - String expectedUri = String.format("Assets('%s')", - URLEncoder.encode(sampleAssetId, "UTF-8")); - - EntityGetOperation<AssetInfo> getter = Asset.get(sampleAssetId); - - assertEquals(expectedUri, getter.getUri()); - } - - @Test - public void assetListReturnsExpectedUri() { - EntityListOperation<AssetInfo> lister = Asset.list(); - - assertEquals("Assets", lister.getUri()); - assertNotNull(lister.getQueryParameters()); - assertEquals(0, lister.getQueryParameters().size()); - } - - @Test - public void assetListCanTakeQueryParameters() { - EntityListOperation<AssetInfo> lister = Asset.list().setTop(10) - .setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void assetListCanTakeQueryParametersChained() { - EntityListOperation<AssetInfo> lister = Asset.list().setTop(10) - .setSkip(2).set("filter", "something"); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals("something", lister.getQueryParameters() - .getFirst("filter")); - assertEquals(3, lister.getQueryParameters().size()); - } - - @Test - public void assetUpdateReturnsExpectedUri() throws Exception { - EntityUpdateOperation updater = Asset.update(sampleAssetId); - assertEquals(expectedUri, updater.getUri()); - } - - @Test - public void assetUpdateCanSetNameAndAltId() throws Exception { - - String expectedName = "newAssetName"; - String expectedAltId = "newAltId"; - - EntityUpdateOperation updater = Asset.update(sampleAssetId) - .setName(expectedName).setAlternateId(expectedAltId); - - AssetType payload = (AssetType) updater.getRequestContents(); - - assertEquals(expectedName, payload.getName()); - assertEquals(expectedAltId, payload.getAlternateId()); - } - - @Test - public void assetDeleteReturnsExpectedUri() throws Exception { - EntityDeleteOperation deleter = Asset.delete(sampleAssetId); - - assertEquals(expectedUri, deleter.getUri()); - } - - private static final String expectedOutputAsset = "Job(someJobId)/OutputAssets"; - private static final String expectedInputAsset = "Job(someJobId)/InputAssets"; - - @Test - public void listForLinkReturnsExpectedUri() throws Exception { - JobInfo fakeJob = createJob(); - - EntityListOperation<AssetInfo> lister = Asset.list(fakeJob - .getInputAssetsLink()); - - assertEquals(lister.getUri(), expectedInputAsset); - } - - private JobInfo createJob() { - EntryType fakeJobEntry = new EntryType(); - addEntryLink(fakeJobEntry, Constants.ODATA_DATA_NS - + "/related/OutputMediaAssets", expectedOutputAsset, - "application/atom+xml;type=feed", "OutputAssets"); - addEntryLink(fakeJobEntry, Constants.ODATA_DATA_NS - + "/related/InputMediaAssets", expectedInputAsset, - "application/atom+xml;type=feed", "InputAssets"); - - JobType payload = new JobType().setId("SomeId").setName("FakeJob"); - addEntryContent(fakeJobEntry, payload); - - return new JobInfo(fakeJobEntry, payload); - } - - private void addEntryLink(EntryType entry, String rel, String href, - String type, String title) { - LinkType link = new LinkType(); - link.setRel(rel); - link.setHref(href); - link.setType(type); - link.setTitle(title); - - JAXBElement<LinkType> linkElement = new JAXBElement<LinkType>( - new QName("link", Constants.ATOM_NS), LinkType.class, link); - entry.getEntryChildren().add(linkElement); - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - private ContentType addEntryContent(EntryType entry, Object content) { - ContentType contentWrapper = new ContentType(); - contentWrapper.getContent().add( - new JAXBElement(Constants.ODATA_PROPERTIES_ELEMENT_NAME, - content.getClass(), content)); - - entry.getEntryChildren().add( - new JAXBElement<ContentType>( - Constants.ATOM_CONTENT_ELEMENT_NAME, ContentType.class, - contentWrapper)); - return contentWrapper; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileEntityTest.java deleted file mode 100644 index 5ec2a9ec5579..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileEntityTest.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.entityoperations.EntityActionOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.AssetFileType; - -public class AssetFileEntityTest { - private final String exampleAssetId = "nb:cid:UUID:bfe1c840-36c3-4a78-9b63-38e6eebd94c2"; - private final String exampleFileId = "nb:cid:UUID:49a229ad-8cc5-470f-9e0b-11838283aa58"; - private final String encodedAssetId = "'nb%3Acid%3AUUID%3Abfe1c840-36c3-4a78-9b63-38e6eebd94c2'"; - private final String encodedFileId = "'nb%3Acid%3AUUID%3A49a229ad-8cc5-470f-9e0b-11838283aa58'"; - - public AssetFileEntityTest() throws Exception { - - } - - @Test - public void createFileInfosHasExpectedUri() throws Exception { - EntityActionOperation action = AssetFile - .createFileInfos(exampleAssetId); - - assertEquals("CreateFileInfos", action.getUri()); - assertEquals(encodedAssetId, - action.getQueryParameters().getFirst("assetid")); - } - - @Test - public void createWithOptionsSetsOptionsAsExpected() throws Exception { - String expectedName = "newFile.mp4"; - Long expectedSize = 65432L; - String expectedChecksum = "check"; - String expectedEncryptionKey = "ooh, secret!"; - String expectedEncryptionScheme = "scheme"; - String expectedEncryptionVersion = "some version"; - String expectedInitializationVector = "cross product"; - Boolean expectedIsEncrypted = true; - Boolean expectedIsPrimary = true; - String expectedMimeType = "application/octet-stream"; - - EntityCreateOperation<AssetFileInfo> creator = AssetFile - .create(exampleAssetId, expectedName) - .setContentChecksum(expectedChecksum) - .setContentFileSize(expectedSize) - .setEncryptionKeyId(expectedEncryptionKey) - .setEncryptionScheme(expectedEncryptionScheme) - .setEncryptionVersion(expectedEncryptionVersion) - .setInitializationVector(expectedInitializationVector) - .setIsEncrypted(expectedIsEncrypted) - .setIsPrimary(expectedIsPrimary).setMimeType(expectedMimeType); - - AssetFileType payload = (AssetFileType) creator.getRequestContents(); - - assertEquals(expectedName, payload.getName()); - assertEquals(exampleAssetId, payload.getParentAssetId()); - assertEquals(expectedSize, payload.getContentFileSize()); - assertEquals(expectedChecksum, payload.getContentChecksum()); - assertEquals(expectedEncryptionKey, payload.getEncryptionKeyId()); - assertEquals(expectedEncryptionScheme, payload.getEncryptionScheme()); - assertEquals(expectedEncryptionVersion, payload.getEncryptionVersion()); - assertEquals(expectedInitializationVector, - payload.getInitializationVector()); - assertEquals(expectedIsEncrypted, payload.getIsEncrypted()); - assertEquals(expectedIsPrimary, payload.getIsPrimary()); - assertEquals(expectedMimeType, payload.getMimeType()); - assertNull(payload.getCreated()); - assertNull(payload.getLastModified()); - } - - @Test - public void getByIdHasCorrectUri() throws Exception { - String expectedUri = String.format("Files(%s)", encodedFileId); - EntityGetOperation<AssetFileInfo> getter = AssetFile.get(exampleFileId); - - assertEquals(expectedUri, getter.getUri()); - } - - @Test - public void listAllFileInfosHasCorrectUri() throws Exception { - String expectedUri = "Files"; - EntityListOperation<AssetFileInfo> lister = AssetFile.list(); - assertEquals(expectedUri, lister.getUri()); - } - - @Test - public void updateWithAllOptionsHasCorrectPayload() throws Exception { - Long expectedSize = 65432L; - String expectedChecksum = "check"; - String expectedEncryptionKey = "ooh, secret!"; - String expectedEncryptionScheme = "scheme"; - String expectedEncryptionVersion = "some version"; - String expectedInitializationVector = "cross product"; - Boolean expectedIsEncrypted = true; - Boolean expectedIsPrimary = true; - String expectedMimeType = "application/octet-stream"; - - EntityUpdateOperation updater = AssetFile.update(exampleFileId) - .setContentChecksum(expectedChecksum) - .setContentFileSize(expectedSize) - .setEncryptionKeyId(expectedEncryptionKey) - .setEncryptionScheme(expectedEncryptionScheme) - .setEncryptionVersion(expectedEncryptionVersion) - .setInitializationVector(expectedInitializationVector) - .setIsEncrypted(expectedIsEncrypted) - .setIsPrimary(expectedIsPrimary).setMimeType(expectedMimeType); - - AssetFileType payload = (AssetFileType) updater.getRequestContents(); - - assertNull(payload.getName()); - assertNull(payload.getId()); - assertNull(payload.getParentAssetId()); - assertEquals(expectedSize, payload.getContentFileSize()); - assertEquals(expectedChecksum, payload.getContentChecksum()); - assertEquals(expectedEncryptionKey, payload.getEncryptionKeyId()); - assertEquals(expectedEncryptionScheme, payload.getEncryptionScheme()); - assertEquals(expectedEncryptionVersion, payload.getEncryptionVersion()); - assertEquals(expectedInitializationVector, - payload.getInitializationVector()); - assertEquals(expectedIsEncrypted, payload.getIsEncrypted()); - assertEquals(expectedIsPrimary, payload.getIsPrimary()); - assertEquals(expectedMimeType, payload.getMimeType()); - assertNull(payload.getCreated()); - assertNull(payload.getLastModified()); - } - - @Test - public void deleteHasCorrectUri() throws Exception { - String expectedUri = String.format("Files(%s)", encodedFileId); - EntityDeleteOperation deleter = AssetFile.delete(exampleFileId); - - assertEquals(expectedUri, deleter.getUri()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileInfoTest.java deleted file mode 100644 index 568b6bc70f8c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileInfoTest.java +++ /dev/null @@ -1,199 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.util.Date; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.AssetFileType; - -public class AssetFileInfoTest { - - @Test - public void testGetSetId() { - String expectedId = "testId"; - AssetFileInfo file = new AssetFileInfo(null, - new AssetFileType().setId(expectedId)); - - String actualId = file.getId(); - - // Assert - assertEquals(expectedId, actualId); - } - - @Test - public void testGetSetName() { - String expectedName = "testName"; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setName(expectedName)); - - String actualName = fileInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } - - @Test - public void testGetSetContentFileSize() { - // Arrange - Long expectedContentFileSize = 1234l; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setContentFileSize(expectedContentFileSize)); - - // Act - long actualContentFileSize = fileInfo.getContentFileSize(); - - // Assert - assertEquals(expectedContentFileSize.longValue(), actualContentFileSize); - - } - - @Test - public void testGetSetParentAssetId() { - String expectedParentAssetId = "testParentAssetId"; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setParentAssetId(expectedParentAssetId)); - - String actualParentAssetId = fileInfo.getParentAssetId(); - - assertEquals(expectedParentAssetId, actualParentAssetId); - } - - @Test - public void testGetSetEncryptionVersion() { - String expectedEncryptionVersion = "testEncryptionVersion"; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType() - .setEncryptionVersion(expectedEncryptionVersion)); - - String actualEncryptionVersion = fileInfo.getEncryptionVersion(); - - assertEquals(expectedEncryptionVersion, actualEncryptionVersion); - } - - @Test - public void testGetSetEncryptionScheme() { - // Arrange - String expectedEncryptionScheme = "testEncryptionScheme"; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType() - .setEncryptionScheme(expectedEncryptionScheme)); - - // Act - String actualEncryptionScheme = fileInfo.getEncryptionScheme(); - - // Assert - assertEquals(expectedEncryptionScheme, actualEncryptionScheme); - } - - @Test - public void testGetSetIsEncrypted() { - // Arrange - Boolean expectedIsEncrypted = true; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setIsEncrypted(expectedIsEncrypted)); - - // Act - Boolean actualIsEncrypted = fileInfo.getIsEncrypted(); - - // Assert - assertEquals(expectedIsEncrypted, actualIsEncrypted); - } - - @Test - public void testGetSetEncryptionKeyId() { - String expectedEncryptionKeyId = "testEncryptionKeyId"; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setEncryptionKeyId(expectedEncryptionKeyId)); - - String actualEncryptionKeyId = fileInfo.getEncryptionKeyId(); - - assertEquals(expectedEncryptionKeyId, actualEncryptionKeyId); - } - - @Test - public void testGetSetInitializationVector() { - String expectedInitializationVector = "testInitializationVector"; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType() - .setInitializationVector(expectedInitializationVector)); - - String actualInitializationVector = fileInfo.getInitializationVector(); - - assertEquals(expectedInitializationVector, actualInitializationVector); - - } - - @Test - public void testGetSetIsPrimary() { - // Arrange - Boolean expectedIsPrimary = true; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setIsPrimary(expectedIsPrimary)); - - // Act - Boolean actualIsPrimary = fileInfo.getIsPrimary(); - - // Assert - assertEquals(expectedIsPrimary, actualIsPrimary); - } - - @Test - public void testGetSetLastModified() { - Date expectedLastModified = new Date(); - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setLastModified(expectedLastModified)); - - Date actualLastModified = fileInfo.getLastModified(); - - assertEquals(expectedLastModified, actualLastModified); - } - - @Test - public void testGetSetCreated() { - Date expectedCreated = new Date(); - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setCreated(expectedCreated)); - - Date actualCreated = fileInfo.getCreated(); - - assertEquals(expectedCreated, actualCreated); - } - - @Test - public void testGetSetMimeType() { - String expectedMimeType = "testMimeType"; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setMimeType(expectedMimeType)); - - String actualMimeType = fileInfo.getMimeType(); - - assertEquals(expectedMimeType, actualMimeType); - } - - @Test - public void testGetSetContentChecksum() { - String expectedContentChecksum = "testContentChecksum"; - AssetFileInfo fileInfo = new AssetFileInfo(null, - new AssetFileType().setContentChecksum(expectedContentChecksum)); - - String actualContentChecksum = fileInfo.getContentChecksum(); - - assertEquals(expectedContentChecksum, actualContentChecksum); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetInfoTest.java deleted file mode 100644 index 6c7e0b1f3f47..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/AssetInfoTest.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.util.Date; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; - -public class AssetInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "expectedId"; - AssetInfo assetInfo = new AssetInfo(null, - new AssetType().setId(expectedId)); - - // Act - String actualId = assetInfo.getId(); - - // Assert - assertEquals(expectedId, actualId); - - } - - @Test - public void testGetSetState() { - // Arrange - AssetState expectedState = AssetState.Published; - AssetInfo assetInfo = new AssetInfo(null, - new AssetType().setState(expectedState.getCode())); - - // Act - AssetState actualState = assetInfo.getState(); - - // Assert - assertEquals(expectedState, actualState); - } - - @Test - public void testGetSetCreated() throws Exception { - // Arrange - Date expectedCreated = new Date(); - - AssetInfo assetInfo = new AssetInfo(null, - new AssetType().setCreated(expectedCreated)); - - // Act - Date actualCreated = assetInfo.getCreated(); - - // Assert - assertEquals(expectedCreated, actualCreated); - - } - - @Test - public void testGetSetLastModified() throws Exception { - // Arrange - Date expectedLastModified = new Date(); - AssetInfo assetInfo = new AssetInfo(null, - new AssetType().setLastModified(expectedLastModified)); - - // Act - Date actualLastModified = assetInfo.getLastModified(); - - // Assert - assertEquals(expectedLastModified, actualLastModified); - } - - @Test - public void testGetSetAlternateId() { - // Arrange - String expectedAlternateId = "testAlternateId"; - AssetInfo assetInfo = new AssetInfo(null, - new AssetType().setAlternateId(expectedAlternateId)); - - // Act - String actualAlternateId = assetInfo.getAlternateId(); - - // Assert - assertEquals(expectedAlternateId, actualAlternateId); - } - - @Test - public void testGetSetName() { - // Arrange - String expectedName = "testName"; - AssetInfo assetInfo = new AssetInfo(null, - new AssetType().setName(expectedName)); - - // Act - String actualName = assetInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } - - @Test - public void testGetSetOptions() { - // Arrange - - AssetOption expectedOptions = AssetOption.None; - AssetInfo assetInfo = new AssetInfo(null, - new AssetType().setOptions(expectedOptions.getCode())); - - // Act - AssetOption actualOptions = assetInfo.getOptions(); - - // Assert - assertEquals(expectedOptions, actualOptions); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ChannelEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ChannelEntityTest.java deleted file mode 100644 index bcec8d340d25..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ChannelEntityTest.java +++ /dev/null @@ -1,207 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import java.net.URLEncoder; - -import javax.xml.bind.JAXBElement; -import javax.xml.namespace.QName; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.atom.LinkType; -import com.microsoft.windowsazure.services.media.implementation.content.AssetType; -import com.microsoft.windowsazure.services.media.implementation.content.Constants; -import com.microsoft.windowsazure.services.media.implementation.content.JobType; - -/** - * Tests for the methods and factories of the Asset entity. - */ -public class ChannelEntityTest { - static final String sampleAssetId = "nb:cid:UUID:1151b8bd-9ada-4e7f-9787-8dfa49968eab"; - private final String expectedUri = String.format("Assets('%s')", - URLEncoder.encode(sampleAssetId, "UTF-8")); - - public ChannelEntityTest() throws Exception { - } - - @Test - public void assetCreateReturnsDefaultCreatePayload() { - AssetType payload = (AssetType) Asset.create().getRequestContents(); - - assertNotNull(payload); - assertNull(payload.getId()); - assertNull(payload.getState()); - assertNull(payload.getCreated()); - assertNull(payload.getLastModified()); - assertNull(payload.getAlternateId()); - assertNull(payload.getName()); - assertNull(payload.getOptions()); - } - - @Test - public void assetCreateCanSetAssetName() { - String name = "assetCreateCanSetAssetName"; - - Asset.Creator creator = Asset.create().setName( - "assetCreateCanSetAssetName"); - - AssetType payload = (AssetType) creator.getRequestContents(); - - assertNotNull(payload); - assertNull(payload.getId()); - assertNull(payload.getState()); - assertNull(payload.getCreated()); - assertNull(payload.getLastModified()); - assertNull(payload.getAlternateId()); - assertEquals(name, payload.getName()); - assertNull(payload.getOptions()); - } - - @Test - public void assetGetReturnsExpectedUri() throws Exception { - String expectedUri = String.format("Assets('%s')", - URLEncoder.encode(sampleAssetId, "UTF-8")); - - EntityGetOperation<AssetInfo> getter = Asset.get(sampleAssetId); - - assertEquals(expectedUri, getter.getUri()); - } - - @Test - public void assetListReturnsExpectedUri() { - EntityListOperation<AssetInfo> lister = Asset.list(); - - assertEquals("Assets", lister.getUri()); - assertNotNull(lister.getQueryParameters()); - assertEquals(0, lister.getQueryParameters().size()); - } - - @Test - public void assetListCanTakeQueryParameters() { - EntityListOperation<AssetInfo> lister = Asset.list().setTop(10) - .setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void assetListCanTakeQueryParametersChained() { - EntityListOperation<AssetInfo> lister = Asset.list().setTop(10) - .setSkip(2).set("filter", "something"); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals("something", lister.getQueryParameters() - .getFirst("filter")); - assertEquals(3, lister.getQueryParameters().size()); - } - - @Test - public void assetUpdateReturnsExpectedUri() throws Exception { - EntityUpdateOperation updater = Asset.update(sampleAssetId); - assertEquals(expectedUri, updater.getUri()); - } - - @Test - public void assetUpdateCanSetNameAndAltId() throws Exception { - - String expectedName = "newAssetName"; - String expectedAltId = "newAltId"; - - EntityUpdateOperation updater = Asset.update(sampleAssetId) - .setName(expectedName).setAlternateId(expectedAltId); - - AssetType payload = (AssetType) updater.getRequestContents(); - - assertEquals(expectedName, payload.getName()); - assertEquals(expectedAltId, payload.getAlternateId()); - } - - @Test - public void assetDeleteReturnsExpectedUri() throws Exception { - EntityDeleteOperation deleter = Asset.delete(sampleAssetId); - - assertEquals(expectedUri, deleter.getUri()); - } - - private static final String expectedOutputAsset = "Job(someJobId)/OutputAssets"; - private static final String expectedInputAsset = "Job(someJobId)/InputAssets"; - - @Test - public void listForLinkReturnsExpectedUri() throws Exception { - JobInfo fakeJob = createJob(); - - EntityListOperation<AssetInfo> lister = Asset.list(fakeJob - .getInputAssetsLink()); - - assertEquals(lister.getUri(), expectedInputAsset); - } - - private JobInfo createJob() { - EntryType fakeJobEntry = new EntryType(); - addEntryLink(fakeJobEntry, Constants.ODATA_DATA_NS - + "/related/OutputMediaAssets", expectedOutputAsset, - "application/atom+xml;type=feed", "OutputAssets"); - addEntryLink(fakeJobEntry, Constants.ODATA_DATA_NS - + "/related/InputMediaAssets", expectedInputAsset, - "application/atom+xml;type=feed", "InputAssets"); - - JobType payload = new JobType().setId("SomeId").setName("FakeJob"); - addEntryContent(fakeJobEntry, payload); - - return new JobInfo(fakeJobEntry, payload); - } - - private void addEntryLink(EntryType entry, String rel, String href, - String type, String title) { - LinkType link = new LinkType(); - link.setRel(rel); - link.setHref(href); - link.setType(type); - link.setTitle(title); - - JAXBElement<LinkType> linkElement = new JAXBElement<LinkType>( - new QName("link", Constants.ATOM_NS), LinkType.class, link); - entry.getEntryChildren().add(linkElement); - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - private ContentType addEntryContent(EntryType entry, Object content) { - ContentType contentWrapper = new ContentType(); - contentWrapper.getContent().add( - new JAXBElement(Constants.ODATA_PROPERTIES_ELEMENT_NAME, - content.getClass(), content)); - - entry.getEntryChildren().add( - new JAXBElement<ContentType>( - Constants.ATOM_CONTENT_ELEMENT_NAME, ContentType.class, - contentWrapper)); - return contentWrapper; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyEntityTest.java deleted file mode 100644 index 7173ad58f121..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyEntityTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import java.net.URLEncoder; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyRestType; - -/** - * Tests for the ContentKey entity - * - */ -public class ContentKeyEntityTest { - private final String testContentKeyId = "nb:kid:UUID:c82307be-1a81-4554-ba7d-cf6dfa735a5a"; - private final ContentKeyType testContentKeyType = ContentKeyType.StorageEncryption; - private final String testEncryptedContentKey = "testEncryptedContentKey"; - private final String testExpectedContentKeyUri = String.format( - "ContentKeys('%s')", URLEncoder.encode(testContentKeyId, "UTF-8")); - - public ContentKeyEntityTest() throws Exception { - - } - - @Test - public void createContentKeyHasCorrectUrl() throws Exception { - EntityCreateOperation<ContentKeyInfo> creator = ContentKey.create( - testContentKeyId, testContentKeyType, testEncryptedContentKey); - - assertEquals("ContentKeys", creator.getUri()); - } - - @Test - public void createContentKeyHasCorrectPayload() throws Exception { - ContentKeyRestType contentKeyRestType = (ContentKeyRestType) ContentKey - .create(testContentKeyId, testContentKeyType, - testEncryptedContentKey).getRequestContents(); - - assertEquals(testContentKeyId, contentKeyRestType.getId()); - assertEquals(testContentKeyType.getCode(), contentKeyRestType - .getContentKeyType().intValue()); - assertEquals(testEncryptedContentKey, - contentKeyRestType.getEncryptedContentKey()); - assertNull(contentKeyRestType.getChecksum()); - assertNull(contentKeyRestType.getCreated()); - assertNull(contentKeyRestType.getLastModified()); - assertNull(contentKeyRestType.getName()); - assertNull(contentKeyRestType.getProtectionKeyId()); - assertNull(contentKeyRestType.getProtectionKeyType()); - } - - @Test - public void getContentKeyGivesExpectedUri() throws Exception { - assertEquals(testExpectedContentKeyUri, ContentKey - .get(testContentKeyId).getUri()); - } - - @Test - public void listContentKeyReturnsExpectedUri() { - EntityListOperation<ContentKeyInfo> lister = ContentKey.list(); - - assertEquals("ContentKeys", lister.getUri()); - assertNotNull(lister.getQueryParameters()); - assertEquals(0, lister.getQueryParameters().size()); - } - - @Test - public void listContentKeyCanTakeQueryParameters() { - - EntityListOperation<ContentKeyInfo> lister = ContentKey.list() - .setTop(10).setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void ContentKeyDeleteReturnsExpectedUri() throws Exception { - EntityDeleteOperation deleter = ContentKey.delete(testContentKeyId); - assertEquals(testExpectedContentKeyUri, deleter.getUri()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfoTest.java deleted file mode 100644 index bf609b39e41d..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfoTest.java +++ /dev/null @@ -1,178 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.util.Date; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.ContentKeyRestType; - -public class ContentKeyInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "expectedId"; - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType().setId(expectedId)); - - // Act - String actualId = contentKeyInfo.getId(); - - // Assert - assertEquals(expectedId, actualId); - } - - @Test - public void testGetSetCreated() { - // Arrange - Date expectedCreated = new Date(); - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType().setCreated(expectedCreated)); - - // Act - Date actualCreated = contentKeyInfo.getCreated(); - - // Assert - assertEquals(expectedCreated, actualCreated); - } - - @Test - public void testGetSetLastModified() { - // Arrange - Date expectedLastModified = new Date(); - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType().setLastModified(expectedLastModified)); - - // Act - Date actualLastModified = contentKeyInfo.getLastModified(); - - // Assert - assertEquals(expectedLastModified, actualLastModified); - } - - @Test - public void testGetSetContentKeyType() { - // Arrange - ContentKeyType expectedContentKeyType = ContentKeyType.ConfigurationEncryption; - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType() - .setContentKeyType(expectedContentKeyType.getCode())); - - // Act - ContentKeyType actualContentKeyType = contentKeyInfo - .getContentKeyType(); - - // Assert - assertEquals(expectedContentKeyType, actualContentKeyType); - - } - - @Test - public void testGetSetEncryptedContentKey() { - // Arrange - String expectedEncryptedContentKey = "testX509Certificate"; - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType() - .setEncryptedContentKey(expectedEncryptedContentKey)); - - // Act - String actualEncryptedContentKey = contentKeyInfo - .getEncryptedContentKey(); - - // Assert - assertEquals(expectedEncryptedContentKey, actualEncryptedContentKey); - } - - @Test - public void testGetSetName() { - // Arrange - String expectedName = "expectedName"; - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType().setName(expectedName)); - - // Act - String actualName = contentKeyInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } - - @Test - public void testGetSetProtectionKeyId() { - // Arrange - String expectedProtectionKeyId = "expectedProtectionKeyId"; - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType() - .setProtectionKeyId(expectedProtectionKeyId)); - - // Act - String actualProtectionKeyId = contentKeyInfo.getProtectionKeyId(); - - // Assert - assertEquals(expectedProtectionKeyId, actualProtectionKeyId); - - } - - @Test - public void testGetSetProtectionKeyType() { - // Arrange - ProtectionKeyType expectedProtectionKeyType = ProtectionKeyType.X509CertificateThumbprint; - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType() - .setProtectionKeyType(expectedProtectionKeyType - .getCode())); - - // Act - ProtectionKeyType actualProtectionKeyType = contentKeyInfo - .getProtectionKeyType(); - - // Assert - assertEquals(expectedProtectionKeyType, actualProtectionKeyType); - } - - @Test - public void testGetSetCheckSum() { - // Arrange - String expectedCheckSum = "testCheckSum"; - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType().setChecksum(expectedCheckSum)); - - // Act - String actualCheckSum = contentKeyInfo.getChecksum(); - - // Assert - assertEquals(expectedCheckSum, actualCheckSum); - - } - - @Test - public void testGetSetAuthorizationPolicyId() { - // Arrange - String expectedAuthorizationPolicyId = "testAuthorizationPolicyId"; - ContentKeyInfo contentKeyInfo = new ContentKeyInfo(null, - new ContentKeyRestType().setAuthorizationPolicyId(expectedAuthorizationPolicyId)); - - // Act - String actualAuthorizationPolicyId = contentKeyInfo.getAuthorizationPolicyId(); - - // Assert - assertEquals(expectedAuthorizationPolicyId, actualAuthorizationPolicyId); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/GenericListResultTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/GenericListResultTest.java deleted file mode 100644 index f754ea0fc665..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/GenericListResultTest.java +++ /dev/null @@ -1,431 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.ListIterator; -import java.util.NoSuchElementException; - -import org.junit.Test; - -/** - * Test for the {link ListResult<T>} type. - * - */ -public class GenericListResultTest { - private final String[] expectedStrings = { "One", "Two", "Three" }; - - @Test - public void emptyListResultIsEmpty() throws Exception { - assertTrue(new ListResult<String>(new ArrayList<String>()).isEmpty()); - } - - @Test - public void listWithContentsIsNotEmpty() throws Exception { - ListResult<String> result = createStringListResult(); - - assertFalse(result.isEmpty()); - } - - @Test - public void createWithEmptyCollectionGivesNoResults() throws Exception { - List<AssetInfo> result = new ListResult<AssetInfo>( - new ArrayList<AssetInfo>()); - - assertEquals(0, result.size()); - } - - @Test - public void createWithCollectionContentsContainsContents() throws Exception { - List<String> result = createStringListResult(); - - assertEquals(expectedStrings.length, result.size()); - } - - @Test - public void createWithCollectionContentsCanRetrieveContents() - throws Exception { - List<String> result = createStringListResult(); - - for (int i = 0; i < expectedStrings.length; ++i) { - assertEquals(expectedStrings[i], result.get(i)); - } - } - - @Test - public void canIterateThroughResults() throws Exception { - List<String> result = createStringListResult(); - - int i = 0; - for (String s : result) { - assertEquals(expectedStrings[i], s); - ++i; - } - } - - @Test - public void canCheckContainsForObjectInList() throws Exception { - ListResult<String> result = createStringListResult(); - - assertTrue(result.contains(expectedStrings[1])); - } - - @Test - public void canCheckContainsForObjectNotInList() throws Exception { - ListResult<String> result = createStringListResult(); - - assertFalse(result.contains("This is not a string in the list")); - } - - @Test - public void canCheckContainsAllForObjectsInList() throws Exception { - ListResult<String> result = createStringListResult(); - List<String> contains = new ArrayList<String>(); - contains.add(expectedStrings[2]); - contains.add(expectedStrings[1]); - - assertTrue(result.containsAll(contains)); - } - - @Test - public void canCheckContainsAllForObjectsNotInList() throws Exception { - ListResult<String> result = createStringListResult(); - List<String> contains = new ArrayList<String>(); - contains.add(expectedStrings[2]); - contains.add("This is not in the list"); - - assertFalse(result.containsAll(contains)); - } - - @Test - public void canGetIndexOfItemInList() throws Exception { - ListResult<String> result = createStringListResult(); - - assertEquals(1, result.indexOf(expectedStrings[1])); - } - - @Test - public void indexOfItemNotInListIsMinusOne() throws Exception { - ListResult<String> result = createStringListResult(); - - assertEquals(-1, result.indexOf("Not in collection")); - } - - @Test - public void lastIndexOfItemInCollectionIsCorrect() throws Exception { - ListResult<String> result = new ListResult<String>(Arrays.asList("c", - "b", "c", "a")); - - assertEquals(2, result.lastIndexOf("c")); - } - - @Test - public void lastIndexOfItemNotInCollectionIsMinusOne() throws Exception { - ListResult<String> result = createStringListResult(); - - assertEquals(-1, result.lastIndexOf("Not in collection")); - } - - @Test - public void optionalListMethodsAreUnsupported() throws Exception { - final ListResult<String> result = createStringListResult(); - - assertListIsImmutable(result); - } - - @Test - public void canGetWorkingListIteratorFromResult() throws Exception { - ListResult<String> result = createStringListResult(); - - ListIterator<String> iterator = result.listIterator(); - int i = 0; - for (i = 0; i < expectedStrings.length; ++i) { - assertIteratorAtPositionMovingForward(i, iterator); - } - - for (; i >= 0; --i) { - assertIteratorAtPositionMovingBackward(i, iterator); - } - } - - @Test - public void canGetWorkingListIteratorAtIndexFromResult() throws Exception { - ListResult<String> result = createStringListResult(); - - ListIterator<String> iterator = result.listIterator(1); - int i = 1; - for (; i < expectedStrings.length; ++i) { - assertIteratorAtPositionMovingForward(i, iterator); - } - - for (; i >= 0; --i) { - assertIteratorAtPositionMovingBackward(i, iterator); - } - } - - @Test - public void listIteratorIsImmutable() throws Exception { - ListResult<String> result = createStringListResult(); - final ListIterator<String> iterator = result.listIterator(); - - assertUnsupported(new Action() { - @Override - public void Do() { - iterator.add("new string"); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - iterator.remove(); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - iterator.set("replace string"); - } - }); - } - - @Test - public void listIteratorIsImmutableWhenCreatedWithIndex() throws Exception { - ListResult<String> result = createStringListResult(); - final ListIterator<String> iterator = result.listIterator(1); - - assertUnsupported(new Action() { - @Override - public void Do() { - iterator.add("new string"); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - iterator.remove(); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - iterator.set("replace string"); - } - }); - } - - @Test - public void canGetObjectArrayFromResult() throws Exception { - ListResult<String> result = createStringListResult(); - Object[] array = result.toArray(); - - assertNotNull(array); - assertEquals(result.size(), array.length); - for (int i = 0; i < result.size(); ++i) { - assertEquals(result.get(i), array[i]); - } - } - - @Test - public void canGetTypedArrayFromResult() throws Exception { - ListResult<String> result = createStringListResult(); - String[] array = result.toArray(new String[0]); - - assertNotNull(array); - assertEquals(result.size(), array.length); - for (int i = 0; i < result.size(); ++i) { - assertEquals(result.get(i), array[i]); - } - } - - @Test - public void canGetExpectedSublistFromResult() throws Exception { - ListResult<String> result = createStringListResult(); - List<String> sublist = result.subList(1, 3); - - assertEquals(2, sublist.size()); - assertEquals(result.get(1), sublist.get(0)); - assertEquals(result.get(2), sublist.get(1)); - } - - @Test - public void sublistIsImmutable() throws Exception { - ListResult<String> result = createStringListResult(); - final List<String> sublist = result.subList(1, 3); - - assertListIsImmutable(sublist); - } - - private ListResult<String> createStringListResult() { - ListResult<String> result = new ListResult<String>( - Arrays.asList(expectedStrings)); - - return result; - } - - // / Assertion helpers /// - - private void assertIteratorState(int position, ListIterator<String> iterator) { - boolean expectHasNext = position < expectedStrings.length; - boolean expectHasPrevious = position != 0; - - assertNotNull("Iterator is null", iterator); - assertEquals(String.format("HasNext at position %d", position), - expectHasNext, iterator.hasNext()); - assertEquals(String.format("HasPrevious at position %d", position), - expectHasPrevious, iterator.hasPrevious()); - - if (expectHasNext) { - assertEquals(String.format("NextIndex at position %d", position), - position, iterator.nextIndex()); - } - - if (expectHasPrevious) { - assertEquals( - String.format("PreviousIndex at position %d", position), - position - 1, iterator.previousIndex()); - } - - } - - private void assertIteratorAtPositionMovingForward(int position, - ListIterator<String> iterator) { - assertIteratorState(position, iterator); - - if (iterator.hasNext()) { - assertEquals(expectedStrings[position], iterator.next()); - } else { - try { - iterator.next(); - fail("Exception should have been thrown"); - } catch (NoSuchElementException ex) { - // Ok, we expected this - } - } - } - - private void assertIteratorAtPositionMovingBackward(int position, - ListIterator<String> iterator) { - assertIteratorState(position, iterator); - - if (iterator.hasPrevious()) { - assertEquals(expectedStrings[position - 1], iterator.previous()); - } else { - try { - iterator.previous(); - fail("Exception should have been thrown"); - } catch (NoSuchElementException ex) { - // Ok, we expected this - } - } - } - - private interface Action { - void Do(); - } - - private void assertUnsupported(Action action) { - try { - action.Do(); - fail("Expected UnsupportedOperationException"); - } catch (UnsupportedOperationException ex) { - // This is ok - } - } - - private void assertListIsImmutable(final List<String> list) { - assertUnsupported(new Action() { - @Override - public void Do() { - list.add("new string"); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.add(2, "new string"); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.addAll(Arrays.asList("a", "b")); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.addAll(2, Arrays.asList("a", "b")); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.clear(); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.remove(1); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.remove(list.get(1)); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.removeAll(Arrays.asList(list.get(0), list.get(1))); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.retainAll(Arrays.asList(list.get(1))); - } - }); - - assertUnsupported(new Action() { - @Override - public void Do() { - list.set(1, "new string"); - } - }); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/JobEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/JobEntityTest.java deleted file mode 100644 index b17a8f220043..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/JobEntityTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import java.net.URI; - -import javax.mail.internet.MimeMultipart; - -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityProxyData; - -/** - * Tests for the methods and factories of the Job entity. - */ -public class JobEntityTest { - - private EntityProxyData createProxyData() { - return new EntityProxyData() { - @Override - public URI getServiceUri() { - return URI.create("http://contoso.com"); - } - }; - } - - public JobEntityTest() throws Exception { - } - - @Test - public void JobCreateReturnsDefaultCreatePayload() throws ServiceException { - Job.Creator jobCreator = Job.create(); - jobCreator.setProxyData(createProxyData()); - MimeMultipart payload = (MimeMultipart) jobCreator.getRequestContents(); - assertNotNull(payload); - } - - @Test - public void JobListReturnsExpectedUri() { - EntityListOperation<JobInfo> lister = Job.list(); - - assertEquals("Jobs", lister.getUri()); - assertNotNull(lister.getQueryParameters()); - assertEquals(0, lister.getQueryParameters().size()); - } - - @Test - public void JobListCanTakeQueryParameters() { - EntityListOperation<JobInfo> lister = Job.list().setTop(10).setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void JobListCanTakeQueryParametersChained() { - EntityListOperation<JobInfo> lister = Job.list().setTop(10).setSkip(2) - .set("filter", "something"); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals("something", lister.getQueryParameters() - .getFirst("filter")); - assertEquals(3, lister.getQueryParameters().size()); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/JobInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/JobInfoTest.java deleted file mode 100644 index a1c92e73ebbf..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/JobInfoTest.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.util.Date; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.JobNotificationSubscriptionType; -import com.microsoft.windowsazure.services.media.implementation.content.JobType; - -public class JobInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "expectedId"; - JobInfo JobInfo = new JobInfo(null, new JobType().setId(expectedId)); - - // Act - String actualId = JobInfo.getId(); - - // Assert - assertEquals(expectedId, actualId); - - } - - @Test - public void testGetSetName() { - // Arrange - String expectedName = "testGetSetName"; - JobInfo JobInfo = new JobInfo(null, new JobType().setName(expectedName)); - - // Act - String actualName = JobInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } - - @Test - public void testGetSetCreated() throws Exception { - // Arrange - Date expectedCreated = new Date(); - - JobInfo JobInfo = new JobInfo(null, - new JobType().setCreated(expectedCreated)); - - // Act - Date actualCreated = JobInfo.getCreated(); - - // Assert - assertEquals(expectedCreated, actualCreated); - - } - - @Test - public void testGetSetLastModified() throws Exception { - // Arrange - Date expectedLastModified = new Date(); - JobInfo JobInfo = new JobInfo(null, - new JobType().setLastModified(expectedLastModified)); - - // Act - Date actualLastModified = JobInfo.getLastModified(); - - // Assert - assertEquals(expectedLastModified, actualLastModified); - } - - @Test - public void testGetSetPriority() { - // Arrange - int expectedPriority = 3; - JobInfo JobInfo = new JobInfo(null, - new JobType().setPriority(expectedPriority)); - - // Act - int actualPriority = JobInfo.getPriority(); - - // Assert - assertEquals(expectedPriority, actualPriority); - } - - @Test - public void testGetSetRunningDuration() { - // Arrange - Double expectedRunningDuration = 1234.5; - JobInfo JobInfo = new JobInfo(null, - new JobType().setRunningDuration(expectedRunningDuration)); - - // Act - Double actualRunningDuration = JobInfo.getRunningDuration(); - - // Assert - assertEquals(expectedRunningDuration, actualRunningDuration); - } - - @Test - public void testGetSetStartTime() { - // Arrange - Date expectedStartTime = new Date(); - JobInfo JobInfo = new JobInfo(null, - new JobType().setLastModified(expectedStartTime)); - - // Act - Date actualStartTime = JobInfo.getLastModified(); - - // Assert - assertEquals(expectedStartTime, actualStartTime); - } - - @Test - public void testGetSetState() { - // Arrange - JobState expectedJobState = JobState.Finished; - JobInfo JobInfo = new JobInfo(null, - new JobType().setState(expectedJobState.getCode())); - - // Act - JobState actualJobState = JobInfo.getState(); - - // Assert - assertEquals(expectedJobState, actualJobState); - } - - @Test - public void testGetSetNotificationEndPoint() { - // Arrange - String expectedNotificationEndPointId = "testNotificationEndPointId"; - JobNotificationSubscription expectedJobNotificationSubscription = new JobNotificationSubscription( - expectedNotificationEndPointId, TargetJobState.All); - JobNotificationSubscriptionType expectedJobNotificationSubscriptionType = new JobNotificationSubscriptionType(); - JobType expectedJobType = new JobType(); - expectedJobType - .addJobNotificationSubscriptionType(expectedJobNotificationSubscriptionType - .setNotificationEndPointId( - expectedNotificationEndPointId) - .setTargetJobState(TargetJobState.All.getCode())); - JobInfo jobInfo = new JobInfo(null, expectedJobType); - - // Act - JobNotificationSubscription actualJobNotificationSubscription = jobInfo - .getJobNotificationSubscriptions().get(0); - - // Assert - assertEquals( - expectedJobNotificationSubscription.getNotificationEndPointId(), - actualJobNotificationSubscription.getNotificationEndPointId()); - assertEquals(expectedJobNotificationSubscription.getTargetJobState(), - actualJobNotificationSubscription.getTargetJobState()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorEntityTest.java deleted file mode 100644 index 05dc90122a51..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorEntityTest.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import java.net.URLEncoder; -import java.util.Date; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.entityoperations.EntityCreateOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.LocatorRestType; - -/** - * Tests for the Locator entity - * - */ -public class LocatorEntityTest { - private final String exampleAssetId = "nb:cid:UUID:61a5ebbe-d5e0-49a5-b28c-e9535321b6cd"; - private final String exampleAccessPolicyId = "nb:pid:UUID:c82307be-1a81-4554-ba7d-cf6dfa735a5a"; - private final String exampleLocatorId = "nb:lid:UUID:f282b0a1-fb21-4b83-87d6-d4c96d77aef9"; - private final String expectedLocatorUri = String.format("Locators('%s')", - URLEncoder.encode(exampleLocatorId, "UTF-8")); - - public LocatorEntityTest() throws Exception { - - } - - @Test - public void createLocatorHasCorrectUrl() throws Exception { - EntityCreateOperation<LocatorInfo> creator = Locator.create( - exampleAccessPolicyId, exampleAssetId, LocatorType.SAS); - - assertEquals("Locators", creator.getUri()); - } - - @Test - public void createLocatorHasCorrectPayload() throws Exception { - LocatorRestType locatorType = (LocatorRestType) Locator.create( - exampleAccessPolicyId, exampleAssetId, LocatorType.SAS) - .getRequestContents(); - - assertEquals(exampleAssetId, locatorType.getAssetId()); - assertEquals(exampleAccessPolicyId, locatorType.getAccessPolicyId()); - assertEquals(LocatorType.SAS.getCode(), locatorType.getType() - .intValue()); - assertNull(locatorType.getStartTime()); - assertNull(locatorType.getExpirationDateTime()); - } - - @Test - public void createLocatorCanSetStartTime() throws Exception { - Date now = new Date(); - - EntityCreateOperation<LocatorInfo> creator = Locator.create( - exampleAccessPolicyId, exampleAssetId, LocatorType.SAS) - .setStartDateTime(now); - - LocatorRestType locatorType = (LocatorRestType) creator - .getRequestContents(); - - assertEquals(exampleAssetId, locatorType.getAssetId()); - assertEquals(exampleAccessPolicyId, locatorType.getAccessPolicyId()); - assertEquals(LocatorType.SAS.getCode(), locatorType.getType() - .intValue()); - assertEquals(now, locatorType.getStartTime()); - } - - @Test - public void createLocatorCanSetPath() throws Exception { - - String expectedPath = "testExpectedPath"; - - EntityCreateOperation<LocatorInfo> creator = Locator.create( - exampleAccessPolicyId, exampleAssetId, LocatorType.SAS) - .setPath(expectedPath); - - LocatorRestType locatorType = (LocatorRestType) creator - .getRequestContents(); - - assertEquals(expectedPath, locatorType.getPath()); - - } - - @Test - public void createLocatorCanSetBaseUri() throws Exception { - - String expectedBaseUri = "testExpectedBaseUri"; - - EntityCreateOperation<LocatorInfo> creator = Locator.create( - exampleAccessPolicyId, exampleAssetId, LocatorType.SAS) - .setBaseUri(expectedBaseUri); - - LocatorRestType locatorType = (LocatorRestType) creator - .getRequestContents(); - - assertEquals(expectedBaseUri, locatorType.getBaseUri()); - - } - - @Test - public void createLocatorCanSetContentAccessComponent() throws Exception { - - String expectedContentAccessComponent = "testExpectedContentAccessComponent"; - - EntityCreateOperation<LocatorInfo> creator = Locator.create( - exampleAccessPolicyId, exampleAssetId, LocatorType.SAS) - .setContentAccessComponent(expectedContentAccessComponent); - - LocatorRestType locatorType = (LocatorRestType) creator - .getRequestContents(); - - assertEquals(expectedContentAccessComponent, - locatorType.getContentAccessComponent()); - - } - - @Test - public void getLocatorGivesExpectedUri() throws Exception { - assertEquals(expectedLocatorUri, Locator.get(exampleLocatorId).getUri()); - } - - @Test - public void listLocatorReturnsExpectedUri() { - EntityListOperation<LocatorInfo> lister = Locator.list(); - - assertEquals("Locators", lister.getUri()); - assertNotNull(lister.getQueryParameters()); - assertEquals(0, lister.getQueryParameters().size()); - } - - @Test - public void listLocatorCanTakeQueryParameters() { - - EntityListOperation<LocatorInfo> lister = Locator.list().setTop(10) - .setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void locatorUpdateReturnsExpectedUri() throws Exception { - EntityUpdateOperation updater = Locator.update(exampleLocatorId); - assertEquals(expectedLocatorUri, updater.getUri()); - } - - @Test - public void locatorUpdateCanSetStarTime() throws Exception { - Date now = new Date(); - - Date tenMinutesAgo = new Date(now.getTime() - 10 * 60 * 1000); - - EntityUpdateOperation updater = Locator.update(exampleLocatorId) - .setStartDateTime(tenMinutesAgo); - - LocatorRestType payload = (LocatorRestType) updater - .getRequestContents(); - - assertEquals(tenMinutesAgo, payload.getStartTime()); - } - - @Test - public void locatorDeleteReturnsExpectedUri() throws Exception { - EntityDeleteOperation deleter = Locator.delete(exampleLocatorId); - - assertEquals(expectedLocatorUri, deleter.getUri()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorInfoTest.java deleted file mode 100644 index d038b3e0f98e..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/LocatorInfoTest.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.util.Date; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.LocatorRestType; - -public class LocatorInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "testId"; - LocatorInfo locator = new LocatorInfo(null, - new LocatorRestType().setId(expectedId)); - - // Act - String actualId = locator.getId(); - - // Assert - assertEquals(expectedId, actualId); - } - - @Test - public void testGetSetExpirationDateTime() { - // Arrange - Date expectedExpirationDateTime = new Date(); - LocatorInfo locatorInfo = new LocatorInfo(null, - new LocatorRestType() - .setExpirationDateTime(expectedExpirationDateTime)); - - // Act - Date actualExpirationDateTime = locatorInfo.getExpirationDateTime(); - - // Assert - assertEquals(expectedExpirationDateTime, actualExpirationDateTime); - } - - @Test - public void testGetSetType() { - // Arrange - LocatorType expectedLocatorType = LocatorType.SAS; - LocatorInfo locatorInfo = new LocatorInfo(null, - new LocatorRestType().setType(expectedLocatorType.getCode())); - - // Act - LocatorType actualLocatorType = locatorInfo.getLocatorType(); - - // Assert - assertEquals(expectedLocatorType, actualLocatorType); - } - - @Test - public void testGetSetPath() { - // Arrange - String expectedPath = "testPath"; - LocatorInfo locatorInfo = new LocatorInfo(null, - new LocatorRestType().setPath(expectedPath)); - - // Act - String actualPath = locatorInfo.getPath(); - - // Assert - assertEquals(expectedPath, actualPath); - } - - @Test - public void testGetSetAccessPolicyId() { - // Arrange - String expectedAccessPolicyId = "testAccessPolicyId"; - LocatorInfo locatorInfo = new LocatorInfo(null, - new LocatorRestType().setAccessPolicyId(expectedAccessPolicyId)); - - // Act - String actualAccessPolicyId = locatorInfo.getAccessPolicyId(); - - // Assert - assertEquals(expectedAccessPolicyId, actualAccessPolicyId); - } - - @Test - public void testGetSetAssetId() { - // Arrange - String expectedAssetId = "testAssetId"; - LocatorInfo locatorInfo = new LocatorInfo(null, - new LocatorRestType().setAssetId(expectedAssetId)); - - // Act - String actualAssetId = locatorInfo.getAssetId(); - - // Assert - assertEquals(expectedAssetId, actualAssetId); - } - - @Test - public void testGetSetStartTime() { - // Arrange - Date expectedStartTime = new Date(); - LocatorInfo locatorInfo = new LocatorInfo(null, - new LocatorRestType().setStartTime(expectedStartTime)); - - // Act - Date actualStartTime = locatorInfo.getStartTime(); - - // Assert - assertEquals(expectedStartTime, actualStartTime); - } - - @Test - public void testGetSetBaseUri() { - // Arrange - String expectedBaseUri = "testBaseUri"; - LocatorInfo locatorInfo = new LocatorInfo(null, - new LocatorRestType().setBaseUri(expectedBaseUri)); - - // Act - String actualBaseUri = locatorInfo.getBaseUri(); - - // Assert - assertEquals(expectedBaseUri, actualBaseUri); - } - - @Test - public void testGetSetContentAccessComponent() { - // Arrange - String expectedContentAccessComponent = "testContentAccessToken"; - LocatorInfo locatorInfo = new LocatorInfo( - null, - new LocatorRestType() - .setContentAccessComponent(expectedContentAccessComponent)); - - // Act - String actualContentAccessComponent = locatorInfo - .getContentAccessToken(); - - // Assert - assertEquals(expectedContentAccessComponent, - actualContentAccessComponent); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/MediaProcessorEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/MediaProcessorEntityTest.java deleted file mode 100644 index f3c3f572d7ef..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/MediaProcessorEntityTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; - -/** - * Tests for the MediaProcessor entity - * - */ -public class MediaProcessorEntityTest { - - @Test - public void listMediaProcessorsReturnsExpectedUri() { - assertEquals("MediaProcessors", MediaProcessor.list().getUri()); - } - - @Test - public void listMediaProcessorsCanTakeQueryParmeters() { - - EntityListOperation<MediaProcessorInfo> lister = MediaProcessor.list() - .setTop(10).setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/MediaProcessorInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/MediaProcessorInfoTest.java deleted file mode 100644 index b161eafbe2c8..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/MediaProcessorInfoTest.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.MediaProcessorType; - -public class MediaProcessorInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "expectedId"; - MediaProcessorInfo mediaProcessorInfo = new MediaProcessorInfo(null, - new MediaProcessorType().setId(expectedId)); - - // Act - String actualId = mediaProcessorInfo.getId(); - - // Assert - assertEquals(expectedId, actualId); - - } - - @Test - public void testGetSetName() { - // Arrange - String expectedName = "testName"; - MediaProcessorInfo mediaProcessorInfo = new MediaProcessorInfo(null, - new MediaProcessorType().setName(expectedName)); - - // Act - String actualName = mediaProcessorInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } - - @Test - public void testGetSetDescription() throws Exception { - // Arrange - String expectedDescription = "testDescription"; - - MediaProcessorInfo mediaProcessorInfo = new MediaProcessorInfo(null, - new MediaProcessorType().setDescription(expectedDescription)); - - // Act - String actualDescription = mediaProcessorInfo.getDescription(); - - // Assert - assertEquals(expectedDescription, actualDescription); - - } - - @Test - public void testGetSetSku() throws Exception { - // Arrange - String expectedSku = "testSku"; - MediaProcessorInfo mediaProcessorInfo = new MediaProcessorInfo(null, - new MediaProcessorType().setSku(expectedSku)); - - // Act - String actualSku = mediaProcessorInfo.getSku(); - - // Assert - assertEquals(expectedSku, actualSku); - } - - @Test - public void testGetSetVendor() { - // Arrange - String expectedVendor = "testVendor"; - MediaProcessorInfo mediaProcessorInfo = new MediaProcessorInfo(null, - new MediaProcessorType().setVendor(expectedVendor)); - - // Act - String actualVendor = mediaProcessorInfo.getVendor(); - - // Assert - assertEquals(expectedVendor, actualVendor); - } - - @Test - public void testGetSetVersion() { - // Arrange - String expectedVersion = "testVersion"; - MediaProcessorInfo mediaProcessorInfo = new MediaProcessorInfo(null, - new MediaProcessorType().setVersion(expectedVersion)); - - // Act - String actualVersion = mediaProcessorInfo.getVersion(); - - // Assert - assertEquals(expectedVersion, actualVersion); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointEntityTest.java deleted file mode 100644 index 03e8c9ce0ea4..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointEntityTest.java +++ /dev/null @@ -1,149 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import java.net.URLEncoder; - -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.entityoperations.EntityDeleteOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityGetOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.entityoperations.EntityUpdateOperation; -import com.microsoft.windowsazure.services.media.implementation.content.NotificationEndPointType; -import com.microsoft.windowsazure.services.media.models.NotificationEndPoint.Creator; - -/** - * Tests for the methods and factories of the NotificationEndPoint entity. - */ -public class NotificationEndPointEntityTest { - static final String sampleNotificationEndPointId = "nb:cid:UUID:1151b8bd-9ada-4e7f-9787-8dfa49968eab"; - private final String expectedUri = String.format( - "NotificationEndPoints('%s')", - URLEncoder.encode(sampleNotificationEndPointId, "UTF-8")); - private final String testNotificationEndPoint = "testNotificationEndPoint"; - private final String testQueueName = "testqueue"; - - public NotificationEndPointEntityTest() throws Exception { - } - - @Test - public void NotificationEndPointCreateReturnsDefaultCreatePayload() - throws ServiceException { - NotificationEndPointType payload = (NotificationEndPointType) NotificationEndPoint - .create(testNotificationEndPoint, EndPointType.AzureQueue, - testQueueName).getRequestContents(); - - assertNotNull(payload); - assertNull(payload.getId()); - assertNull(payload.getCreated()); - assertNotNull(payload.getName()); - assertNotNull(payload.getEndPointAddress()); - assertNotNull(payload.getEndPointType()); - } - - @Test - public void NotificationEndPointCreateCanSetNotificationEndPointName() { - String name = "NotificationEndPointCreateCanSetNotificationEndPointName"; - - NotificationEndPoint.Creator creator = (Creator) NotificationEndPoint - .create(name, EndPointType.AzureQueue, testQueueName); - - NotificationEndPointType payload = (NotificationEndPointType) creator - .getRequestContents(); - - assertNotNull(payload); - assertNull(payload.getId()); - assertNull(payload.getCreated()); - assertEquals(name, payload.getName()); - } - - @Test - public void NotificationEndPointGetReturnsExpectedUri() throws Exception { - String expectedUri = String.format("NotificationEndPoints('%s')", - URLEncoder.encode(sampleNotificationEndPointId, "UTF-8")); - - EntityGetOperation<NotificationEndPointInfo> getter = NotificationEndPoint - .get(sampleNotificationEndPointId); - - assertEquals(expectedUri, getter.getUri()); - } - - @Test - public void NotificationEndPointListReturnsExpectedUri() { - EntityListOperation<NotificationEndPointInfo> lister = NotificationEndPoint - .list(); - - assertEquals("NotificationEndPoints", lister.getUri()); - assertNotNull(lister.getQueryParameters()); - assertEquals(0, lister.getQueryParameters().size()); - } - - @Test - public void NotificationEndPointListCanTakeQueryParameters() { - EntityListOperation<NotificationEndPointInfo> lister = NotificationEndPoint - .list().setTop(10).setSkip(2); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals(2, lister.getQueryParameters().size()); - } - - @Test - public void NotificationEndPointListCanTakeQueryParametersChained() { - EntityListOperation<NotificationEndPointInfo> lister = NotificationEndPoint - .list().setTop(10).setSkip(2).set("filter", "something"); - - assertEquals("10", lister.getQueryParameters().getFirst("$top")); - assertEquals("2", lister.getQueryParameters().getFirst("$skip")); - assertEquals("something", lister.getQueryParameters() - .getFirst("filter")); - assertEquals(3, lister.getQueryParameters().size()); - } - - @Test - public void NotificationEndPointUpdateReturnsExpectedUri() throws Exception { - EntityUpdateOperation updater = NotificationEndPoint - .update(sampleNotificationEndPointId); - assertEquals(expectedUri, updater.getUri()); - } - - @Test - public void NotificationEndPointUpdateCanSetNameAndAltId() throws Exception { - - String expectedName = "newNotificationEndPointName"; - - EntityUpdateOperation updater = NotificationEndPoint.update( - sampleNotificationEndPointId).setName(expectedName); - - NotificationEndPointType payload = (NotificationEndPointType) updater - .getRequestContents(); - - assertEquals(expectedName, payload.getName()); - } - - @Test - public void NotificationEndPointDeleteReturnsExpectedUri() throws Exception { - EntityDeleteOperation deleter = NotificationEndPoint - .delete(sampleNotificationEndPointId); - assertEquals(expectedUri, deleter.getUri()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointInfoTest.java deleted file mode 100644 index fb589ee8585c..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/NotificationEndPointInfoTest.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.util.Date; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.NotificationEndPointType; - -public class NotificationEndPointInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "expectedId"; - NotificationEndPointInfo notificationEndPointInfo = new NotificationEndPointInfo( - null, new NotificationEndPointType().setId(expectedId)); - - // Act - String actualId = notificationEndPointInfo.getId(); - - // Assert - assertEquals(expectedId, actualId); - - } - - @Test - public void testGetSetName() { - // Arrange - String expectedName = "notificationEndPointName"; - NotificationEndPointInfo notificationEndPointInfo = new NotificationEndPointInfo( - null, new NotificationEndPointType().setName(expectedName)); - - // Act - String actualName = notificationEndPointInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } - - @Test - public void testGetSetCreated() throws Exception { - // Arrange - Date expectedCreated = new Date(); - - NotificationEndPointInfo notificationEndPointInfo = new NotificationEndPointInfo( - null, - new NotificationEndPointType().setCreated(expectedCreated)); - - // Act - Date actualCreated = notificationEndPointInfo.getCreated(); - - // Assert - assertEquals(expectedCreated, actualCreated); - - } - - @Test - public void testGetSetEndPointType() throws Exception { - // Arrange - EndPointType expectedEndPointType = EndPointType.AzureQueue; - NotificationEndPointInfo notificationEndPointInfo = new NotificationEndPointInfo( - null, - new NotificationEndPointType() - .setEndPointType(expectedEndPointType.getCode())); - - // Act - EndPointType actualEndPointType = notificationEndPointInfo - .getEndPointType(); - - // Assert - assertEquals(expectedEndPointType, actualEndPointType); - } - - @Test - public void testGetSetEndPointAddress() { - // Arrange - String expectedEndPointAddress = "testGetSetEndPointAddress"; - NotificationEndPointInfo notificationEndPointInfo = new NotificationEndPointInfo( - null, - new NotificationEndPointType() - .setEndPointAddress(expectedEndPointAddress)); - - // Act - String actualEndPointAddress = notificationEndPointInfo - .getEndPointAddress(); - - // Assert - assertEquals(expectedEndPointAddress, actualEndPointAddress); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ProtectionKeyEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ProtectionKeyEntityTest.java deleted file mode 100644 index 91889681025f..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/ProtectionKeyEntityTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.util.List; - -import org.junit.Test; - -/** - * Tests for the methods and factories of the ProtectionKey entity. - */ -public class ProtectionKeyEntityTest { - - public ProtectionKeyEntityTest() throws Exception { - } - - @Test - public void ProtectionKeyIdReturnsPayloadWithTheRightProtectionKeyType() { - List<String> contentKeyTypeArray = ProtectionKey - .getProtectionKeyId(ContentKeyType.StorageEncryption) - .getQueryParameters().get("contentKeyType"); - String actualContentKeyType = contentKeyTypeArray.get(0); - - assertEquals(ContentKeyType.StorageEncryption.getCode(), - Integer.parseInt(actualContentKeyType)); - } - - @Test - public void ProtectionKeyReturnsPayloadWithTheRightProtectionKeyId() { - String expectedProtectionKeyId = "expectedProtectionKey"; - String actualProtectionKeyId = ProtectionKey - .getProtectionKey(expectedProtectionKeyId).getQueryParameters() - .getFirst("ProtectionKeyId"); - expectedProtectionKeyId = String - .format("'%s'", expectedProtectionKeyId); - - assertEquals(expectedProtectionKeyId, actualProtectionKeyId); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/TaskEntityTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/TaskEntityTest.java deleted file mode 100644 index 7927eff9a139..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/TaskEntityTest.java +++ /dev/null @@ -1,195 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import javax.xml.bind.JAXBElement; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.atom.ContentType; -import com.microsoft.windowsazure.services.media.implementation.atom.EntryType; -import com.microsoft.windowsazure.services.media.implementation.content.TaskType; - -/** - * Tests for the methods and factories of the Task entity. - */ -public class TaskEntityTest { - static final String sampleTaskId = "nb:cid:UUID:1151b8bd-9ada-4e7f-9787-8dfa49968eab"; - - private TaskType getTaskType(EntryType entryType) { - for (Object child : entryType.getEntryChildren()) { - if (child instanceof JAXBElement) { - @SuppressWarnings("rawtypes") - JAXBElement element = (JAXBElement) child; - if (element.getDeclaredType() == ContentType.class) { - ContentType contentType = (ContentType) element.getValue(); - for (Object grandChild : contentType.getContent()) { - if (grandChild instanceof JAXBElement) { - @SuppressWarnings("rawtypes") - JAXBElement contentElement = (JAXBElement) grandChild; - TaskType taskType = (TaskType) contentElement - .getValue(); - return taskType; - } - } - return null; - } - } - } - return null; - } - - public TaskEntityTest() throws Exception { - } - - @Test - public void taskCreateReturnsDefaultCreatePayload() { - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task.create(expectedMediaProcessorId, - expectedTaskBody).getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedMediaProcessorId, taskType.getMediaProcessorId()); - assertEquals(expectedTaskBody, taskType.getTaskBody()); - } - - @Test - public void taskCreateCanSetTaskName() { - String expectedName = "TaskCreateCanSetTaskName"; - - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task - .create(expectedMediaProcessorId, expectedTaskBody) - .setName(expectedName).getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedName, taskType.getName()); - } - - @Test - public void taskCreateCanSetConfiguration() { - String expectedConfiguration = "TaskCreateCanSetTaskCofniguration"; - - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task - .create(expectedMediaProcessorId, expectedTaskBody) - .setConfiguration(expectedConfiguration).getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedConfiguration, taskType.getConfiguration()); - } - - @Test - public void taskCreateCanSetPriority() { - Integer expectedPriority = 3; - - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task - .create(expectedMediaProcessorId, expectedTaskBody) - .setPriority(expectedPriority).getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedPriority, taskType.getPriority()); - } - - @Test - public void taskCreateCanSetTaskBody() { - String expectedTaskBodyResult = "expectedTaskBodyResult"; - - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task - .create(expectedMediaProcessorId, expectedTaskBody) - .setTaskBody(expectedTaskBodyResult).getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedTaskBodyResult, taskType.getTaskBody()); - } - - @Test - public void taskCreateCanSetEncryptionKeyId() { - String expectedEncryptionKeyId = "expectedEncryptionKeyId"; - - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task - .create(expectedMediaProcessorId, expectedTaskBody) - .setEncryptionKeyId(expectedEncryptionKeyId).getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedEncryptionKeyId, taskType.getEncryptionKeyId()); - } - - @Test - public void taskCreateCanSetEncryptionScheme() { - String expectedEncryptionScheme = "expectedEncryptionScheme"; - - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task - .create(expectedMediaProcessorId, expectedTaskBody) - .setEncryptionScheme(expectedEncryptionScheme).getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedEncryptionScheme, taskType.getEncryptionScheme()); - } - - @Test - public void taskCreateCanSetEncryptionVersion() { - String expectedEncryptionVersion = "expectedEncryptionVersion"; - - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task - .create(expectedMediaProcessorId, expectedTaskBody) - .setEncryptionVersion(expectedEncryptionVersion).getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedEncryptionVersion, taskType.getEncryptionVersion()); - } - - @Test - public void taskCreateCanSetInitializationVector() { - String expectedInitializationVector = "expectedEncryptionKeyId"; - - String expectedMediaProcessorId = "expectedMediaProcessorId"; - String expectedTaskBody = "expectedTaskBody"; - - TaskType taskType = getTaskType(Task - .create(expectedMediaProcessorId, expectedTaskBody) - .setInitializationVector(expectedInitializationVector) - .getEntryType()); - - assertNotNull(taskType); - assertEquals(expectedInitializationVector, - taskType.getInitializationVector()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/TaskInfoTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/TaskInfoTest.java deleted file mode 100644 index ec0f74296fa5..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/media/models/TaskInfoTest.java +++ /dev/null @@ -1,292 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.media.models; - -import static org.junit.Assert.assertEquals; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import org.junit.Test; - -import com.microsoft.windowsazure.services.media.implementation.content.ErrorDetailType; -import com.microsoft.windowsazure.services.media.implementation.content.TaskType; - -public class TaskInfoTest { - - @Test - public void testGetSetId() { - // Arrange - String expectedId = "expectedId"; - TaskInfo taskInfo = new TaskInfo(null, new TaskType().setId(expectedId)); - - // Act - String actualId = taskInfo.getId(); - - // Assert - assertEquals(expectedId, actualId); - - } - - @Test - public void testGetSetConfiguration() { - // Arrange - String expectedConfiguration = "expectedConfiguration"; - TaskInfo taskInfo = new TaskInfo(null, - new TaskType().setConfiguration(expectedConfiguration)); - - // Act - String actualConfiguration = taskInfo.getConfiguration(); - - // Assert - assertEquals(expectedConfiguration, actualConfiguration); - } - - @Test - public void testGetSetEndTime() throws Exception { - // Arrange - Date expectedEndTime = new Date(); - - TaskInfo taskInfo = new TaskInfo(null, - new TaskType().setEndTime(expectedEndTime)); - - // Act - Date actualEndTime = taskInfo.getEndTime(); - - // Assert - assertEquals(expectedEndTime, actualEndTime); - - } - - @Test - public void testGetSetErrorDetails() throws Exception { - // Arrange - List<ErrorDetail> expectedErrorDetails = new ArrayList<ErrorDetail>(); - List<ErrorDetailType> expectedErrorDetailsType = new ArrayList<ErrorDetailType>(); - for (ErrorDetailType errorDetailType : expectedErrorDetailsType) { - ErrorDetail errorDetail = new ErrorDetail( - errorDetailType.getCode(), errorDetailType.getMessage()); - expectedErrorDetails.add(errorDetail); - } - TaskInfo taskInfo = new TaskInfo(null, - new TaskType().setErrorDetails(expectedErrorDetailsType)); - - // Act - List<ErrorDetail> actualErrorDetails = taskInfo.getErrorDetails(); - - // Assert - assertEquals(expectedErrorDetails, actualErrorDetails); - } - - @Test - public void testGetSetMediaProcessorId() { - // Arrange - String expectedName = "testName"; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setName(expectedName)); - - // Act - String actualName = TaskInfo.getName(); - - // Assert - assertEquals(expectedName, actualName); - } - - @Test - public void testGetSetName() { - // Arrange - - TaskOption expectedOptions = TaskOption.None; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setOptions(expectedOptions.getCode())); - - // Act - TaskOption actualOptions = TaskInfo.getOptions(); - - // Assert - assertEquals(expectedOptions, actualOptions); - } - - @Test - public void testGetSetPerfMessage() { - // Arrange - String expectedPerfMessage = "testGetSetPerfMessage"; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setPerfMessage(expectedPerfMessage)); - - // Act - String actualPerfMessage = TaskInfo.getPerfMessage(); - - // Assert - assertEquals(expectedPerfMessage, actualPerfMessage); - } - - @Test - public void testGetSetPriority() { - // Arrange - int expectedPriority = 3; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setPriority(expectedPriority)); - - // Act - int actualPriority = TaskInfo.getPriority(); - - // Assert - assertEquals(expectedPriority, actualPriority); - } - - @Test - public void testGetSetProgress() { - // Arrange - double expectedProgress = 3; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setProgress(expectedProgress)); - - // Act - double actualProgress = TaskInfo.getProgress(); - - // Assert - assertEquals(expectedProgress, actualProgress, 0.00001); - } - - @Test - public void testGetSetRunningDuration() { - // Arrange - double expectedRunningDuration = 3; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setRunningDuration(expectedRunningDuration)); - - // Act - double actualRunningDuration = TaskInfo.getRunningDuration(); - - // Assert - assertEquals(expectedRunningDuration, actualRunningDuration, 0.00001); - } - - @Test - public void testGetSetStartTime() { - // Arrange - Date expectedStartTime = new Date(); - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setStartTime(expectedStartTime)); - - // Act - Date actualStartTime = TaskInfo.getStartTime(); - - // Assert - assertEquals(expectedStartTime, actualStartTime); - } - - @Test - public void testGetSetState() { - // Arrange - TaskState expectedState = TaskState.Completed; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setState(expectedState.getCode())); - - // Act - TaskState actualState = TaskInfo.getState(); - - // Assert - assertEquals(expectedState, actualState); - } - - @Test - public void testGetSetTaskBody() { - // Arrange - String expectedTaskBody = "getSetTaskBody"; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setTaskBody(expectedTaskBody)); - - // Act - String actualTaskBody = TaskInfo.getTaskBody(); - - // Assert - assertEquals(expectedTaskBody, actualTaskBody); - } - - @Test - public void testGetSetOptions() { - // Arrange - TaskOption expectedTaskOption = TaskOption.ProtectedConfiguration; - TaskInfo TaskInfo = new TaskInfo(null, - new TaskType().setOptions(expectedTaskOption.getCode())); - - // Act - TaskOption actualTaskOption = TaskInfo.getOptions(); - - // Assert - assertEquals(expectedTaskOption, actualTaskOption); - } - - @Test - public void testGetSetEncryptionKeyId() { - // Arrange - String expectedEncryptionKeyId = "getSetEncryptionKeyId"; - TaskInfo taskInfo = new TaskInfo(null, - new TaskType().setEncryptionKeyId(expectedEncryptionKeyId)); - - // Act - String actualEncryptionKeyId = taskInfo.getEncryptionKeyId(); - - // Assert - assertEquals(expectedEncryptionKeyId, actualEncryptionKeyId); - } - - @Test - public void testGetSetEncryptionScheme() { - // Arrange - String expectedEncryptionScheme = "getSetEncryptionScheme"; - TaskInfo taskInfo = new TaskInfo(null, - new TaskType().setEncryptionScheme(expectedEncryptionScheme)); - - // Act - String actualEncryptionScheme = taskInfo.getEncryptionScheme(); - - // Assert - assertEquals(expectedEncryptionScheme, actualEncryptionScheme); - } - - @Test - public void testGetSetEncryptionVersion() { - // Arrange - String expectedEncryptionVersion = "1.5"; - TaskInfo taskInfo = new TaskInfo(null, - new TaskType().setEncryptionVersion(expectedEncryptionVersion)); - - // Act - String actualEncryptionVersion = taskInfo.getEncryptionVersion(); - - // Assert - assertEquals(expectedEncryptionVersion, actualEncryptionVersion); - } - - @Test - public void testGetSetInitializationVector() { - // Arrange - String expectedInitializationVector = "testInitializationVector"; - TaskInfo taskInfo = new TaskInfo(null, - new TaskType() - .setEncryptionVersion(expectedInitializationVector)); - - // Act - String actualInitializationVector = taskInfo.getEncryptionVersion(); - - // Assert - assertEquals(expectedInitializationVector, actualInitializationVector); - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/queue/IntegrationTestBase.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/queue/IntegrationTestBase.java deleted file mode 100644 index 307a62cdfc84..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/queue/IntegrationTestBase.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * - * Copyright (c) Microsoft and contributors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.microsoft.windowsazure.services.queue; - -import com.microsoft.windowsazure.Configuration; - -public abstract class IntegrationTestBase { - protected static Configuration createConfiguration() { - Configuration config = Configuration.getInstance(); - overrideWithEnv(config, QueueConfiguration.ACCOUNT_NAME); - overrideWithEnv(config, QueueConfiguration.ACCOUNT_KEY); - overrideWithEnv(config, QueueConfiguration.URI); - return config; - } - - private static void overrideWithEnv(Configuration config, String key) { - String value = System.getenv(key); - if (value == null) - return; - - config.setProperty(key, value); - } - - protected static boolean isRunningWithEmulator(Configuration config) { - String accountName = "devstoreaccount1"; - String accountKey = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="; - - return accountName.equals(config - .getProperty(QueueConfiguration.ACCOUNT_NAME)) - && accountKey.equals(config - .getProperty(QueueConfiguration.ACCOUNT_KEY)); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/queue/QueueServiceIntegrationTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/queue/QueueServiceIntegrationTest.java deleted file mode 100644 index af2db32d929b..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/queue/QueueServiceIntegrationTest.java +++ /dev/null @@ -1,600 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.services.queue; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.util.Date; -import java.util.GregorianCalendar; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Set; -import java.util.TimeZone; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; - -import com.microsoft.windowsazure.Configuration; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.queue.models.CreateQueueOptions; -import com.microsoft.windowsazure.services.queue.models.GetQueueMetadataResult; -import com.microsoft.windowsazure.services.queue.models.ListMessagesOptions; -import com.microsoft.windowsazure.services.queue.models.ListMessagesResult; -import com.microsoft.windowsazure.services.queue.models.ListMessagesResult.QueueMessage; -import com.microsoft.windowsazure.services.queue.models.ListQueuesOptions; -import com.microsoft.windowsazure.services.queue.models.ListQueuesResult; -import com.microsoft.windowsazure.services.queue.models.ListQueuesResult.Queue; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesOptions; -import com.microsoft.windowsazure.services.queue.models.PeekMessagesResult; -import com.microsoft.windowsazure.services.queue.models.ServiceProperties; -import com.microsoft.windowsazure.services.queue.models.UpdateMessageResult; - -public class QueueServiceIntegrationTest extends IntegrationTestBase { - private static final String testQueuesPrefix = "sdktest-"; - private static final String createableQueuesPrefix = "csdktest-"; - private static String TEST_QUEUE_FOR_MESSAGES; - private static String TEST_QUEUE_FOR_MESSAGES_2; - private static String TEST_QUEUE_FOR_MESSAGES_3; - private static String TEST_QUEUE_FOR_MESSAGES_4; - private static String TEST_QUEUE_FOR_MESSAGES_5; - private static String TEST_QUEUE_FOR_MESSAGES_6; - private static String TEST_QUEUE_FOR_MESSAGES_7; - private static String TEST_QUEUE_FOR_MESSAGES_8; - private static String CREATABLE_QUEUE_1; - private static String CREATABLE_QUEUE_2; - private static String CREATABLE_QUEUE_3; - private static String CREATABLE_QUEUE_4; - private static String[] creatableQueues; - private static String[] testQueues; - private static QueueContract service; - private static Configuration config; - - @Rule - public ExpectedException expectedException = ExpectedException.none(); - - @BeforeClass - public static void setup() throws Exception { - // Setup container names array (list of container names used by - // integration tests) - testQueues = new String[10]; - for (int i = 0; i < testQueues.length; i++) { - testQueues[i] = String.format("%s%d", testQueuesPrefix, i + 1); - } - - creatableQueues = new String[10]; - for (int i = 0; i < creatableQueues.length; i++) { - creatableQueues[i] = String.format("%s%d", createableQueuesPrefix, - i + 1); - } - - TEST_QUEUE_FOR_MESSAGES = testQueues[0]; - TEST_QUEUE_FOR_MESSAGES_2 = testQueues[1]; - TEST_QUEUE_FOR_MESSAGES_3 = testQueues[2]; - TEST_QUEUE_FOR_MESSAGES_4 = testQueues[3]; - TEST_QUEUE_FOR_MESSAGES_5 = testQueues[4]; - TEST_QUEUE_FOR_MESSAGES_6 = testQueues[5]; - TEST_QUEUE_FOR_MESSAGES_7 = testQueues[6]; - TEST_QUEUE_FOR_MESSAGES_8 = testQueues[7]; - - CREATABLE_QUEUE_1 = creatableQueues[0]; - CREATABLE_QUEUE_2 = creatableQueues[1]; - CREATABLE_QUEUE_3 = creatableQueues[2]; - CREATABLE_QUEUE_4 = creatableQueues[3]; - - // Create all test containers and their content - config = createConfiguration(); - service = QueueService.create(config); - - createQueues(service, testQueuesPrefix, testQueues); - } - - @AfterClass - public static void cleanup() throws Exception { - - deleteQueues(service, testQueuesPrefix, testQueues); - deleteQueues(service, createableQueuesPrefix, creatableQueues); - } - - private static void createQueues(QueueContract service, String prefix, - String[] list) throws Exception { - Set<String> containers = listQueues(service, prefix); - for (String item : list) { - if (!containers.contains(item)) { - service.createQueue(item); - } - } - } - - private static void deleteQueues(QueueContract service, String prefix, - String[] list) throws Exception { - Set<String> containers = listQueues(service, prefix); - for (String item : list) { - if (containers.contains(item)) { - service.deleteQueue(item); - } - } - } - - private static Set<String> listQueues(QueueContract service, String prefix) - throws Exception { - HashSet<String> result = new HashSet<String>(); - ListQueuesResult list = service.listQueues(new ListQueuesOptions() - .setPrefix(prefix)); - for (Queue item : list.getQueues()) { - result.add(item.getName()); - } - return result; - } - - @Test - public void getServicePropertiesWorks() throws Exception { - // Arrange - - // Don't run this test with emulator, as v1.6 doesn't support this - // method - if (isRunningWithEmulator(config)) { - return; - } - - // Act - ServiceProperties props = service.getServiceProperties().getValue(); - - // Assert - assertNotNull(props); - assertNotNull(props.getLogging()); - assertNotNull(props.getLogging().getRetentionPolicy()); - assertNotNull(props.getLogging().getVersion()); - assertNotNull(props.getMetrics().getRetentionPolicy()); - assertNotNull(props.getMetrics().getVersion()); - } - - @Test - public void setServicePropertiesWorks() throws Exception { - // Arrange - - // Don't run this test with emulator, as v1.6 doesn't support this - // method - if (isRunningWithEmulator(config)) { - return; - } - - // Act - ServiceProperties props = service.getServiceProperties().getValue(); - - props.getLogging().setRead(true); - service.setServiceProperties(props); - - props = service.getServiceProperties().getValue(); - - // Assert - assertNotNull(props); - assertNotNull(props.getLogging()); - assertNotNull(props.getLogging().getRetentionPolicy()); - assertNotNull(props.getLogging().getVersion()); - assertTrue(props.getLogging().isRead()); - assertNotNull(props.getMetrics().getRetentionPolicy()); - assertNotNull(props.getMetrics().getVersion()); - } - - @Test - public void createQueueWorks() throws Exception { - // Arrange - - // Act - service.createQueue(CREATABLE_QUEUE_1); - GetQueueMetadataResult result = service - .getQueueMetadata(CREATABLE_QUEUE_1); - service.deleteQueue(CREATABLE_QUEUE_1); - - // Assert - assertNotNull(result); - assertEquals(0, result.getApproximateMessageCount()); - assertNotNull(result.getMetadata()); - assertEquals(0, result.getMetadata().size()); - } - - @Test - public void deleteQueueWorks() throws Exception { - // Arrange - expectedException.expect(ServiceException.class); - - service.createQueue(CREATABLE_QUEUE_4); - - // Act - service.deleteQueue(CREATABLE_QUEUE_4); - GetQueueMetadataResult result = service - .getQueueMetadata(CREATABLE_QUEUE_4); - - // Assert - assertNull(result); - } - - @Test - public void createQueueWithOptionsWorks() throws Exception { - // Arrange - - // Act - service.createQueue(CREATABLE_QUEUE_2, new CreateQueueOptions() - .addMetadata("foo", "bar").addMetadata("test", "blah")); - GetQueueMetadataResult result = service - .getQueueMetadata(CREATABLE_QUEUE_2); - service.deleteQueue(CREATABLE_QUEUE_2); - - // Assert - assertNotNull(result); - assertEquals(0, result.getApproximateMessageCount()); - assertNotNull(result.getMetadata()); - assertEquals(2, result.getMetadata().size()); - assertEquals("bar", result.getMetadata().get("foo")); - assertEquals("blah", result.getMetadata().get("test")); - } - - @Test - public void listQueuesWorks() throws Exception { - // Arrange - - // Act - ListQueuesResult result = service.listQueues(); - - // Assert - assertNotNull(result); - assertNotNull(result.getQueues()); - assertNotNull(result.getAccountName()); - assertNull(result.getMarker()); - assertEquals(0, result.getMaxResults()); - assertTrue(testQueues.length <= result.getQueues().size()); - } - - @Test - public void listQueuesWithOptionsWorks() throws Exception { - // Arrange - - // Act - ListQueuesResult result = service.listQueues(new ListQueuesOptions() - .setMaxResults(3).setPrefix(testQueuesPrefix)); - ListQueuesResult result2 = service.listQueues(new ListQueuesOptions() - .setMarker(result.getNextMarker()).setPrefix(testQueuesPrefix) - .setIncludeMetadata(true)); - - // Assert - assertNotNull(result); - assertNotNull(result.getQueues()); - assertEquals(3, result.getQueues().size()); - assertEquals(3, result.getMaxResults()); - assertNotNull(result.getAccountName()); - assertNull(result.getMarker()); - assertNotNull(result.getQueues().get(0)); - assertNotNull(result.getQueues().get(0).getMetadata()); - assertNotNull(result.getQueues().get(0).getName()); - assertNotNull(result.getQueues().get(0).getUrl()); - - assertNotNull(result2); - assertNotNull(result2.getQueues()); - assertTrue(testQueues.length - 3 <= result2.getQueues().size()); - assertEquals(0, result2.getMaxResults()); - assertNotNull(result2.getAccountName()); - assertEquals(result.getNextMarker(), result2.getMarker()); - assertNotNull(result2.getQueues().get(0)); - assertNotNull(result2.getQueues().get(0).getMetadata()); - assertNotNull(result2.getQueues().get(0).getName()); - assertNotNull(result2.getQueues().get(0).getUrl()); - } - - @Test - public void setQueueMetadataWorks() throws Exception { - // Arrange - - // Act - service.createQueue(CREATABLE_QUEUE_3); - - HashMap<String, String> metadata = new HashMap<String, String>(); - metadata.put("foo", "bar"); - metadata.put("test", "blah"); - service.setQueueMetadata(CREATABLE_QUEUE_3, metadata); - - GetQueueMetadataResult result = service - .getQueueMetadata(CREATABLE_QUEUE_3); - - service.deleteQueue(CREATABLE_QUEUE_3); - - // Assert - assertNotNull(result); - assertEquals(0, result.getApproximateMessageCount()); - assertNotNull(result.getMetadata()); - assertEquals(2, result.getMetadata().size()); - assertEquals("bar", result.getMetadata().get("foo")); - assertEquals("blah", result.getMetadata().get("test")); - } - - @Test - public void createMessageWorks() throws Exception { - // Arrange - - // Act - service.createMessage(TEST_QUEUE_FOR_MESSAGES, "message1"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES, "message2"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES, "message3"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES, "message4"); - - // Assert - } - - @Test - public void createNullMessageException() throws Exception { - // Arrange - - // Act - expectedException.expect(NullPointerException.class); - service.createMessage(TEST_QUEUE_FOR_MESSAGES, null); - } - - @Test - public void listMessagesWorks() throws Exception { - // Arrange - GregorianCalendar calendar = new GregorianCalendar(); - calendar.setTimeZone(TimeZone.getTimeZone("UTC")); - calendar.set(2010, 01, 01); - Date year2010 = calendar.getTime(); - - // Act - service.createMessage(TEST_QUEUE_FOR_MESSAGES_2, "message1"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_2, "message2"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_2, "message3"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_2, "message4"); - ListMessagesResult result = service - .listMessages(TEST_QUEUE_FOR_MESSAGES_2); - - // Assert - assertNotNull(result); - assertEquals(1, result.getQueueMessages().size()); - - QueueMessage entry = result.getQueueMessages().get(0); - - assertNotNull(entry.getMessageId()); - assertNotNull(entry.getMessageText()); - assertNotNull(entry.getPopReceipt()); - assertEquals(1, entry.getDequeueCount()); - - assertNotNull(entry.getExpirationDate()); - assertTrue(year2010.before(entry.getExpirationDate())); - - assertNotNull(entry.getInsertionDate()); - assertTrue(year2010.before(entry.getInsertionDate())); - - assertNotNull(entry.getTimeNextVisible()); - assertTrue(year2010.before(entry.getTimeNextVisible())); - } - - @Test - public void listMessagesWithOptionsWorks() throws Exception { - // Arrange - GregorianCalendar calendar = new GregorianCalendar(); - calendar.setTimeZone(TimeZone.getTimeZone("UTC")); - calendar.set(2010, 01, 01); - Date year2010 = calendar.getTime(); - - // Act - service.createMessage(TEST_QUEUE_FOR_MESSAGES_3, "message1"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_3, "message2"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_3, "message3"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_3, "message4"); - ListMessagesResult result = service.listMessages( - TEST_QUEUE_FOR_MESSAGES_3, - new ListMessagesOptions().setNumberOfMessages(4) - .setVisibilityTimeoutInSeconds(20)); - - // Assert - assertNotNull(result); - assertEquals(4, result.getQueueMessages().size()); - for (int i = 0; i < 4; i++) { - QueueMessage entry = result.getQueueMessages().get(i); - - assertNotNull(entry.getMessageId()); - assertNotNull(entry.getMessageText()); - assertNotNull(entry.getPopReceipt()); - assertEquals(1, entry.getDequeueCount()); - - assertNotNull(entry.getExpirationDate()); - assertTrue(year2010.before(entry.getExpirationDate())); - - assertNotNull(entry.getInsertionDate()); - assertTrue(year2010.before(entry.getInsertionDate())); - - assertNotNull(entry.getTimeNextVisible()); - assertTrue(year2010.before(entry.getTimeNextVisible())); - } - } - - @Test - public void peekMessagesWorks() throws Exception { - // Arrange - GregorianCalendar calendar = new GregorianCalendar(); - calendar.setTimeZone(TimeZone.getTimeZone("UTC")); - calendar.set(2010, 01, 01); - Date year2010 = calendar.getTime(); - - // Act - service.createMessage(TEST_QUEUE_FOR_MESSAGES_4, "message1"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_4, "message2"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_4, "message3"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_4, "message4"); - PeekMessagesResult result = service - .peekMessages(TEST_QUEUE_FOR_MESSAGES_4); - - // Assert - assertNotNull(result); - assertEquals(1, result.getQueueMessages().size()); - - com.microsoft.windowsazure.services.queue.models.PeekMessagesResult.QueueMessage entry = result - .getQueueMessages().get(0); - - assertNotNull(entry.getMessageId()); - assertNotNull(entry.getMessageText()); - assertEquals(0, entry.getDequeueCount()); - - assertNotNull(entry.getExpirationDate()); - assertTrue(year2010.before(entry.getExpirationDate())); - - assertNotNull(entry.getInsertionDate()); - assertTrue(year2010.before(entry.getInsertionDate())); - } - - @Test - public void peekMessagesWithOptionsWorks() throws Exception { - // Arrange - GregorianCalendar calendar = new GregorianCalendar(); - calendar.setTimeZone(TimeZone.getTimeZone("UTC")); - calendar.set(2010, 01, 01); - Date year2010 = calendar.getTime(); - - // Act - service.createMessage(TEST_QUEUE_FOR_MESSAGES_5, "message1"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_5, "message2"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_5, "message3"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_5, "message4"); - PeekMessagesResult result = service.peekMessages( - TEST_QUEUE_FOR_MESSAGES_5, - new PeekMessagesOptions().setNumberOfMessages(4)); - - // Assert - assertNotNull(result); - assertEquals(4, result.getQueueMessages().size()); - for (int i = 0; i < 4; i++) { - com.microsoft.windowsazure.services.queue.models.PeekMessagesResult.QueueMessage entry = result - .getQueueMessages().get(i); - - assertNotNull(entry.getMessageId()); - assertNotNull(entry.getMessageText()); - assertEquals(0, entry.getDequeueCount()); - - assertNotNull(entry.getExpirationDate()); - assertTrue(year2010.before(entry.getExpirationDate())); - - assertNotNull(entry.getInsertionDate()); - assertTrue(year2010.before(entry.getInsertionDate())); - } - } - - @Test - public void clearMessagesWorks() throws Exception { - // Arrange - - // Act - service.createMessage(TEST_QUEUE_FOR_MESSAGES_6, "message1"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_6, "message2"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_6, "message3"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_6, "message4"); - service.clearMessages(TEST_QUEUE_FOR_MESSAGES_6); - - PeekMessagesResult result = service - .peekMessages(TEST_QUEUE_FOR_MESSAGES_6); - - // Assert - assertNotNull(result); - assertEquals(0, result.getQueueMessages().size()); - } - - @Test - public void deleteMessageWorks() throws Exception { - // Arrange - - // Act - service.createMessage(TEST_QUEUE_FOR_MESSAGES_7, "message1"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_7, "message2"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_7, "message3"); - service.createMessage(TEST_QUEUE_FOR_MESSAGES_7, "message4"); - - ListMessagesResult result = service - .listMessages(TEST_QUEUE_FOR_MESSAGES_7); - service.deleteMessage(TEST_QUEUE_FOR_MESSAGES_7, result - .getQueueMessages().get(0).getMessageId(), result - .getQueueMessages().get(0).getPopReceipt()); - ListMessagesResult result2 = service.listMessages( - TEST_QUEUE_FOR_MESSAGES_7, - new ListMessagesOptions().setNumberOfMessages(32)); - - // Assert - assertNotNull(result2); - assertEquals(3, result2.getQueueMessages().size()); - } - - @Test - public void updateNullMessageException() throws Exception { - // Arrange - String messageId = "messageId"; - - String popReceipt = "popReceipt"; - String messageText = null; - int visibilityTimeoutInSeconds = 10; - - // Act - expectedException.expect(NullPointerException.class); - service.updateMessage(TEST_QUEUE_FOR_MESSAGES_8, messageId, popReceipt, - messageText, visibilityTimeoutInSeconds); - - } - - @Test - public void updateMessageWorks() throws Exception { - // Arrange - GregorianCalendar calendar = new GregorianCalendar(); - calendar.setTimeZone(TimeZone.getTimeZone("UTC")); - calendar.set(2010, 01, 01); - Date year2010 = calendar.getTime(); - - // Act - service.createMessage(TEST_QUEUE_FOR_MESSAGES_8, "message1"); - - ListMessagesResult listResult1 = service - .listMessages(TEST_QUEUE_FOR_MESSAGES_8); - UpdateMessageResult updateResult = service.updateMessage( - TEST_QUEUE_FOR_MESSAGES_8, listResult1.getQueueMessages() - .get(0).getMessageId(), listResult1.getQueueMessages() - .get(0).getPopReceipt(), "new text", 0); - ListMessagesResult listResult2 = service - .listMessages(TEST_QUEUE_FOR_MESSAGES_8); - - // Assert - assertNotNull(updateResult); - assertNotNull(updateResult.getPopReceipt()); - assertNotNull(updateResult.getTimeNextVisible()); - assertTrue(year2010.before(updateResult.getTimeNextVisible())); - - assertNotNull(listResult2); - QueueMessage entry = listResult2.getQueueMessages().get(0); - - assertEquals(listResult1.getQueueMessages().get(0).getMessageId(), - entry.getMessageId()); - assertEquals("new text", entry.getMessageText()); - assertNotNull(entry.getPopReceipt()); - assertEquals(2, entry.getDequeueCount()); - - assertNotNull(entry.getExpirationDate()); - assertTrue(year2010.before(entry.getExpirationDate())); - - assertNotNull(entry.getInsertionDate()); - assertTrue(year2010.before(entry.getInsertionDate())); - - assertNotNull(entry.getTimeNextVisible()); - assertTrue(year2010.before(entry.getTimeNextVisible())); - - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceScenarioTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceScenarioTest.java deleted file mode 100644 index 44ae452e53da..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceScenarioTest.java +++ /dev/null @@ -1,231 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.scenarios; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; - -import java.io.InputStream; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.List; -import java.util.Random; -import java.util.UUID; - -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.MediaContract; -import com.microsoft.windowsazure.services.media.MediaService; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.AssetOption; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.Task; -import com.microsoft.windowsazure.services.scenarios.MediaServiceWrapper.EncoderType; - -public class MediaServiceScenarioTest extends ScenarioTestBase { - private static final String rootTestAssetPrefix = "testAssetPrefix-"; - private static final String testJobPrefix = "testJobPrefix"; - private static String testAssetPrefix; - private static MediaServiceWrapper wrapper; - private static MediaServiceValidation validator; - - @BeforeClass - public static void setup() throws ServiceException { - ScenarioTestBase.initializeConfig(); - MediaContract service = MediaService.create(config); - wrapper = new MediaServiceWrapper(service); - validator = new MediaServiceValidation(service); - testAssetPrefix = rootTestAssetPrefix + UUID.randomUUID() + "-"; - } - - @AfterClass - public static void cleanup() throws ServiceException { - wrapper.removeAllAssetsWithPrefix(rootTestAssetPrefix); - wrapper.removeAllAccessPoliciesWithPrefix(); - wrapper.removeAllJobWithPrefix(testJobPrefix); - ScenarioTestBase.cleanupConfig(); - } - - @Test - public void newAsset() throws Exception { - AssetInfo asset = wrapper.createAsset(testAssetPrefix + "newAsset", - AssetOption.None); - validator.validateAsset(asset, testAssetPrefix + "newAsset", - AssetOption.None); - } - - @Test - public void pageOverAssets() throws ServiceException { - signalSetupStarting(); - String rootName = testAssetPrefix + "pageOverAssets"; - List<String> assetNames = createListOfAssetNames(rootName, 4); - for (String assetName : assetNames) { - wrapper.createAsset(assetName, AssetOption.None); - } - signalSetupFinished(); - - List<ListResult<AssetInfo>> pages = wrapper.getAssetSortedPagedResults( - rootName, 3); - validator.validateAssetSortedPages(pages, assetNames, 3); - } - - @Test - public void uploadFiles() throws Exception { - signalSetupStarting(); - AssetInfo asset = wrapper.createAsset(testAssetPrefix + "uploadFiles", - AssetOption.None); - signalSetupFinished(); - - wrapper.uploadFilesToAsset(asset, 10, getTestAssetFiles()); - validator.validateAssetFiles(asset, getTestAssetFiles()); - } - - @Test - public void uploadEncryptedFiles() throws Exception { - signalSetupStarting(); - byte[] aesKey = getNewAesKey(); - AssetInfo asset = wrapper.createAsset(testAssetPrefix - + "uploadEncryptedFiles", AssetOption.StorageEncrypted); - - signalSetupFinished(); - - wrapper.uploadFilesToAsset(asset, 10, getTestAssetFiles(), aesKey); - validator.validateAssetFiles(asset, getTestAssetFiles()); - } - - @Test - public void downloadFiles() throws Exception { - signalSetupStarting(); - AssetInfo asset = wrapper.createAsset( - testAssetPrefix + "downloadFiles", AssetOption.None); - wrapper.uploadFilesToAsset(asset, 10, getTestAssetFiles()); - signalSetupFinished(); - - Map<String, InputStream> actualFileStreams = wrapper - .downloadFilesFromAsset(asset, 10); - validator.validateAssetFiles(getTestAssetFiles(), actualFileStreams); - } - - @Test - public void createJob() throws Exception { - signalSetupStarting(); - AssetInfo asset = wrapper.createAsset(testAssetPrefix + "createJob", - AssetOption.None); - wrapper.uploadFilesToAsset(asset, 10, getTestAssetFiles()); - signalSetupFinished(); - - String jobName = testJobPrefix + UUID.randomUUID().toString(); - JobInfo job = wrapper.createJob(jobName, asset, createTasks()); - validator.validateJob(job, jobName, asset, createTasks()); - } - - @Test - public void transformAsset() throws Exception { - signalSetupStarting(); - AssetInfo asset = wrapper.createAsset(testAssetPrefix - + "transformAsset", AssetOption.None); - wrapper.uploadFilesToAsset(asset, 10, getTestAssetFiles()); - String jobName = testJobPrefix + UUID.randomUUID().toString(); - - JobInfo job = wrapper.createJob(jobName, asset, wrapper - .createTaskOptions("Transform", 0, 0, - EncoderType.WindowsAzureMediaEncoder)); - signalSetupFinished(); - - waitForJobToFinish(job); - List<AssetInfo> outputAssets = wrapper.getJobOutputMediaAssets(job); - - validator.validateOutputAssets(outputAssets, getTestAssetFiles().keySet()); - } - - @Test - public void transformEncryptedAsset() throws Exception { - signalSetupStarting(); - byte[] aesKey = getNewAesKey(); - AssetInfo asset = wrapper.createAsset(testAssetPrefix - + "transformEncryptedAsset", AssetOption.StorageEncrypted); - - wrapper.uploadFilesToAsset(asset, 10, getTestAssetFiles(), aesKey); - String jobName = "my job transformEncryptedAsset" - + UUID.randomUUID().toString(); - JobInfo job = wrapper.createJob(jobName, asset, wrapper - .createTaskOptions("Decode", 0, 0, - EncoderType.StorageDecryption)); - signalSetupFinished(); - - waitForJobToFinish(job); - List<AssetInfo> outputAssets = wrapper.getJobOutputMediaAssets(job); - validator.validateOutputAssets(outputAssets, getTestAssetFiles().keySet()); - - // Verify output asset files. - assertEquals("output assets count", 1, outputAssets.size()); - AssetInfo outputAsset = outputAssets.get(0); - validator.validateAssetFiles(outputAsset, getTestAssetFiles()); - - // Verify assets were decoded. - Map<String, InputStream> actualFileStreams = wrapper.downloadFilesFromAsset(outputAsset, 10); - validator.validateAssetFiles(getTestAssetFiles(), actualFileStreams); - } - - private byte[] getNewAesKey() { - // Media Services requires 256-bit (32-byte) keys for AES encryption. - Random random = new Random(); - byte[] aesKey = new byte[32]; - random.nextBytes(aesKey); - return aesKey; - } - - private void waitForJobToFinish(JobInfo job) throws InterruptedException, - ServiceException { - for (int counter = 0; !wrapper.isJobFinished(job); counter++) { - if (counter > 30) { - fail("Took took long for the job to finish"); - } - Thread.sleep(10000); - } - } - - private List<Task.CreateBatchOperation> createTasks() - throws ServiceException { - List<Task.CreateBatchOperation> tasks = new ArrayList<Task.CreateBatchOperation>(); - - tasks.add(wrapper.createTaskOptions("Decryptor", 0, 0, - EncoderType.StorageDecryption)); - tasks.add(wrapper.createTaskOptions("Processor", 0, 1, - EncoderType.WindowsAzureMediaEncoder)); - return tasks; - } - - private Map<String, InputStream> getTestAssetFiles() { - Map<String, InputStream> inputFiles = new HashMap<String, InputStream>(); - inputFiles.put("MPEG4-H264.mp4", - getClass().getResourceAsStream("/media/MPEG4-H264.mp4")); - return inputFiles; - } - - private List<String> createListOfAssetNames(String rootName, int count) { - List<String> assetNames = new ArrayList<String>(); - for (int i = 0; i < count; i++) { - assetNames.add(rootName + i); - } - return assetNames; - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceValidation.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceValidation.java deleted file mode 100644 index 9f9ccec71cbb..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceValidation.java +++ /dev/null @@ -1,298 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.scenarios; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.io.InputStream; -import java.security.NoSuchAlgorithmException; -import java.util.ArrayList; -import java.util.Date; -import java.util.Map; -import java.util.List; - -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.MediaContract; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetFile; -import com.microsoft.windowsazure.services.media.models.AssetFileInfo; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.AssetOption; -import com.microsoft.windowsazure.services.media.models.AssetState; -import com.microsoft.windowsazure.services.media.models.ContentKey; -import com.microsoft.windowsazure.services.media.models.ContentKeyInfo; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.Task; -import java.util.Set; - -class MediaServiceValidation { - private final MediaContract service; - - public MediaServiceValidation(MediaContract service) { - this.service = service; - } - - public void validateAsset(AssetInfo asset, String name, - AssetOption encryption) throws ServiceException { - // Check the asset state. - assertNotNull("asset", asset); - assertNotNull("asset.getId", asset.getId()); - assertFalse("asset.getId != ''", "".equals(asset.getId())); - assertEquals("asset.state", AssetState.Initialized, asset.getState()); - assertEquals("asset.getOptions", encryption, asset.getOptions()); - - // Verify no files by default. - List<AssetFileInfo> initialFiles = service.list(AssetFile.list(asset - .getAssetFilesLink())); - assertNotNull("initialFiles", initialFiles); - assertEquals("initialFiles.size", 0, initialFiles.size()); - - // Reload asset from server for ID - AssetInfo reloadedAsset = service.get(Asset.get(asset.getId())); - - // Verify names match - assertNotNull("reloadedAsset", reloadedAsset); - assertNotNull("reloadedAsset.getId", reloadedAsset.getId()); - assertEquals("reloadedAsset.getId, asset.getId", asset.getId(), - reloadedAsset.getId()); - assertEquals("reloadedAsset.state", AssetState.Initialized, - reloadedAsset.getState()); - assertEquals("reloadedAsset.getOptions", encryption, - reloadedAsset.getOptions()); - } - - public void validateAssetSortedPages(List<ListResult<AssetInfo>> pages, - List<String> assetNames, int pageSize) { - int sumSizeOfPages = 0; - List<String> actualAssetNames = new ArrayList<String>(); - - for (ListResult<AssetInfo> page : pages) { - sumSizeOfPages += page.size(); - for (AssetInfo asset : page) { - actualAssetNames.add(asset.getName()); - } - } - - assertEquals("sumSizeOfPages", assetNames.size(), sumSizeOfPages); - assertEquals("size of last page", 0, pages.get(pages.size() - 1).size()); - - // Do not worry about comparing the details of the sorted pages, - // because Media Services splits on the internal order, then sorts - // each page individually. - } - - public void validateAssetFiles(AssetInfo asset, - Map<String, InputStream> inputFiles) throws ServiceException, - IOException, NoSuchAlgorithmException { - List<AssetFileInfo> assetFiles = service.list(AssetFile.list(asset - .getAssetFilesLink())); - - assertNotNull("assetFiles", assetFiles); - assertEquals("assetFiles.size", inputFiles.size(), assetFiles.size()); - - ContentKeyInfo contentKey = null; - if (asset.getOptions() == AssetOption.StorageEncrypted) { - ListResult<ContentKeyInfo> contentKeys = service.list(ContentKey - .list(asset.getContentKeysLink())); - assertEquals("contentKeys size", 1, contentKeys.size()); - contentKey = contentKeys.get(0); - } - - // Compare encryption info for asset files - for (AssetFileInfo assetFile : assetFiles) { - if (asset.getOptions() == AssetOption.StorageEncrypted) { - assertEquals("assetFile.getIsEncrypted", true, - assetFile.getIsEncrypted()); - assertEquals("assetFile.getEncryptionKeyId", - contentKey.getId(), assetFile.getEncryptionKeyId()); - assertNotNullOrEmpty("assetFile.getEncryptionScheme", - assetFile.getEncryptionScheme()); - assertNotNullOrEmpty("assetFile.getEncryptionVersion", - assetFile.getEncryptionVersion()); - assertNotNullOrEmpty("assetFile.getInitializationVector", - assetFile.getInitializationVector()); - } else { - assertEquals("assetFile.getIsEncrypted", false, - assetFile.getIsEncrypted()); - assertNullOrEmpty("assetFile.getEncryptionKeyId", - assetFile.getEncryptionKeyId()); - assertNullOrEmpty("assetFile.getEncryptionScheme", - assetFile.getEncryptionScheme()); - assertNullOrEmpty("assetFile.getEncryptionVersion", - assetFile.getEncryptionVersion()); - assertNullOrEmpty("assetFile.getInitializationVector", - assetFile.getInitializationVector()); - } - } - - // Compare the asset files with all files - List<AssetFileInfo> allFiles = service.list(AssetFile.list()); - for (AssetFileInfo assetFile : assetFiles) { - assertEquals("fi.getParentAssetId", asset.getId(), - assetFile.getParentAssetId()); - AssetFileInfo match = null; - for (AssetFileInfo aFile : allFiles) { - if (aFile.getId().equals(assetFile.getId())) { - match = aFile; - break; - } - } - - assertFileInfosEqual("match from all files", assetFile, match); - } - } - - public void validateAssetFiles(Map<String, InputStream> inputFiles, - Map<String, InputStream> actualFileStreams) - throws IOException, InterruptedException { - assertEquals("fileUrls count", inputFiles.size(), - actualFileStreams.size()); - for (String fileName : actualFileStreams.keySet()) { - InputStream expected = inputFiles.get(fileName); - InputStream actual = actualFileStreams.get(fileName); - assertStreamsEqual(expected, actual); - } - } - - public void validateJob(JobInfo job, String name, AssetInfo asset, - List<Task.CreateBatchOperation> createTasks) - throws ServiceException { - assertDateApproxEquals("getEndTime", new Date(), job.getCreated()); - assertEquals("job.getName", name, job.getName()); - - List<AssetInfo> inputAssets = service.list(Asset.list(job - .getInputAssetsLink())); - assertNotNull("inputAssets", inputAssets); - assertEquals("inputAssets.size()", 1, inputAssets.size()); - assertEquals("inputAssets.get(0)", asset.getId(), inputAssets.get(0) - .getId()); - - List<AssetInfo> outputAssets = service.list(Asset.list(job - .getOutputAssetsLink())); - assertNotNull("outputAssets", outputAssets); - assertEquals("outputAssets.size()", createTasks.size(), - outputAssets.size()); - } - - public void validateOutputAssets(List<AssetInfo> outputAssets, - Set<String> enumeration) { - assertNotNull("outputAssets", outputAssets); - for (AssetInfo asset : outputAssets) { - assertNotNull("asset", asset); - assertNotNull("asset.getId", asset.getId()); - assertFalse("asset.getId != ''", "".equals(asset.getId())); - assertEquals("asset.state", AssetState.Initialized, - asset.getState()); - assertEquals("asset.getOptions", AssetOption.None, - asset.getOptions()); - } - } - - public void assertFileInfosEqual(String message, AssetFileInfo fi, - AssetFileInfo match) { - assertNotNull(message + ":fi", fi); - assertNotNull(message + ":match", match); - assertEquals(message + ":getContentChecksum", fi.getContentChecksum(), - match.getContentChecksum()); - assertEquals(message + ":getContentFileSize", fi.getContentFileSize(), - match.getContentFileSize()); - assertEquals(message + ":getCreated", fi.getCreated(), - match.getCreated()); - assertEquals(message + ":getEncryptionKeyId", fi.getEncryptionKeyId(), - match.getEncryptionKeyId()); - assertEquals(message + ":getEncryptionScheme", - fi.getEncryptionScheme(), match.getEncryptionScheme()); - assertEquals(message + ":getEncryptionVersion", - fi.getEncryptionVersion(), match.getEncryptionVersion()); - assertEquals(message + ":getId", fi.getId(), match.getId()); - assertEquals(message + ":getIsEncrypted", fi.getIsEncrypted(), - match.getIsEncrypted()); - assertEquals(message + ":getIsPrimary", fi.getIsPrimary(), - match.getIsPrimary()); - assertEquals(message + ":getLastModified", fi.getLastModified(), - match.getLastModified()); - assertEquals(message + ":getMimeType", fi.getMimeType(), - match.getMimeType()); - assertEquals(message + ":getName", fi.getName(), match.getName()); - assertEquals(message + ":getParentAssetId", fi.getParentAssetId(), - match.getParentAssetId()); - } - - protected void assertDateApproxEquals(String message, Date expected, - Date actual) { - // Default allows for a 30 seconds difference in dates, for clock skew, - // network delays, etc. - long deltaInMilliseconds = 30000; - - if (expected == null || actual == null) { - assertEquals(message, expected, actual); - } else { - long diffInMilliseconds = Math.abs(expected.getTime() - - actual.getTime()); - - if (diffInMilliseconds > deltaInMilliseconds) { - assertEquals(message, expected, actual); - } - } - } - - private void assertStreamsEqual(InputStream inputStream1, - InputStream inputStream2) throws IOException { - byte[] buffer1 = new byte[1024]; - byte[] buffer2 = new byte[1024]; - try { - while (true) { - int n1 = inputStream1.read(buffer1); - int n2 = inputStream2.read(buffer2); - assertEquals("number of bytes read from streams", n1, n2); - if (n1 == -1) { - break; - } - for (int i = 0; i < n1; i++) { - assertEquals("byte " + i + " read from streams", - buffer1[i], buffer2[i]); - } - } - } finally { - inputStream1.close(); - inputStream2.close(); - } - } - - private void assertNullOrEmpty(String message, String actual) { - if (actual == null) { - assertNull(message, actual); - } else { - assertEquals(message, "", actual); - } - } - - private void assertNotNullOrEmpty(String message, String actual) { - if (actual == null) { - assertNotNull(message, actual); - } else { - assertTrue(message + ": expect " + actual + " to be null or empty", - actual.length() > 0); - } - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceWrapper.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceWrapper.java deleted file mode 100644 index 26b5d99e8052..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/MediaServiceWrapper.java +++ /dev/null @@ -1,549 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.scenarios; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.math.BigInteger; -import java.net.MalformedURLException; -import java.net.URL; -import java.security.DigestInputStream; -import java.security.Key; -import java.security.MessageDigest; -import java.security.SecureRandom; -import java.security.cert.Certificate; -import java.security.cert.CertificateFactory; -import java.util.ArrayList; -import java.util.EnumSet; -import java.util.Map; -import java.util.List; -import java.util.Random; -import java.util.UUID; - -import javax.crypto.Cipher; -import javax.crypto.CipherInputStream; -import javax.crypto.spec.IvParameterSpec; -import javax.crypto.spec.SecretKeySpec; - -import com.microsoft.windowsazure.core.utils.Base64; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.services.media.MediaContract; -import com.microsoft.windowsazure.services.media.WritableBlobContainerContract; -import com.microsoft.windowsazure.services.media.entityoperations.EntityListOperation; -import com.microsoft.windowsazure.services.media.implementation.content.AssetFileType; -import com.microsoft.windowsazure.services.media.models.AccessPolicy; -import com.microsoft.windowsazure.services.media.models.AccessPolicyInfo; -import com.microsoft.windowsazure.services.media.models.AccessPolicyPermission; -import com.microsoft.windowsazure.services.media.models.Asset; -import com.microsoft.windowsazure.services.media.models.AssetFile; -import com.microsoft.windowsazure.services.media.models.AssetFile.Updater; -import com.microsoft.windowsazure.services.media.models.AssetFileInfo; -import com.microsoft.windowsazure.services.media.models.AssetInfo; -import com.microsoft.windowsazure.services.media.models.AssetOption; -import com.microsoft.windowsazure.services.media.models.ContentKey; -import com.microsoft.windowsazure.services.media.models.ContentKeyType; -import com.microsoft.windowsazure.services.media.models.Job; -import com.microsoft.windowsazure.services.media.models.Job.Creator; -import com.microsoft.windowsazure.services.media.models.JobInfo; -import com.microsoft.windowsazure.services.media.models.ListResult; -import com.microsoft.windowsazure.services.media.models.Locator; -import com.microsoft.windowsazure.services.media.models.LocatorInfo; -import com.microsoft.windowsazure.services.media.models.LocatorType; -import com.microsoft.windowsazure.services.media.models.MediaProcessor; -import com.microsoft.windowsazure.services.media.models.MediaProcessorInfo; -import com.microsoft.windowsazure.services.media.models.ProtectionKey; -import com.microsoft.windowsazure.services.media.models.Task; -import java.util.HashMap; - -import org.junit.Assert; - -class MediaServiceWrapper { - private final MediaContract service; - - private static final String accessPolicyPrefix = "scenarioTestPrefix"; - - private final String MEDIA_PROCESSOR_STORAGE_DECRYPTION = "Storage Decryption"; - private final String MEDIA_PROCESSOR_WINDOWS_AZURE_MEDIA_ENCODER = "Media Encoder Standard"; - - public static enum EncoderType { - WindowsAzureMediaEncoder, StorageDecryption - } - - public MediaServiceWrapper(MediaContract service) { - this.service = service; - } - - // Manage - public AssetInfo createAsset(String name, AssetOption encryption) - throws ServiceException { - if (encryption == AssetOption.StorageEncrypted - && !EncryptionHelper.canUseStrongCrypto()) { - Assert.fail("JVM does not support the required encryption"); - } - - // Create asset. The SDK's top-level method is the simplest way to do - // that. - return service.create(Asset.create().setName(name) - .setAlternateId("altId").setOptions(encryption)); - } - - public List<ListResult<AssetInfo>> getAssetSortedPagedResults( - String rootName, int pageSize) throws ServiceException { - List<ListResult<AssetInfo>> pages = new ArrayList<ListResult<AssetInfo>>(); - for (int skip = 0; true; skip += pageSize) { - EntityListOperation<AssetInfo> listOperation = Asset.list() - .setTop(pageSize).setSkip(skip) - .set("$filter", "startswith(Name,'" + rootName + "')") - .set("$orderby", "Name"); - - ListResult<AssetInfo> listAssetResult = service.list(listOperation); - pages.add(listAssetResult); - if (listAssetResult.isEmpty()) { - break; - } - } - - return pages; - } - - // Ingest - public void uploadFilesToAsset(AssetInfo asset, int uploadWindowInMinutes, - Map<String, InputStream> inputFiles) throws Exception { - uploadFilesToAsset(asset, uploadWindowInMinutes, inputFiles, null); - } - - public void uploadFilesToAsset(AssetInfo asset, int uploadWindowInMinutes, - Map<String, InputStream> inputFiles, byte[] aesKey) - throws Exception { - AccessPolicyInfo accessPolicy = service.create(AccessPolicy.create( - accessPolicyPrefix + "tempAccessPolicy", uploadWindowInMinutes, - EnumSet.of(AccessPolicyPermission.WRITE))); - LocatorInfo locator = service.create(Locator.create( - accessPolicy.getId(), asset.getId(), LocatorType.SAS)); - - String contentKeyId = createAssetContentKey(asset, aesKey); - - WritableBlobContainerContract uploader = service - .createBlobWriter(locator); - - Map<String, AssetFileInfo> infoToUpload = new HashMap<String, AssetFileInfo>(); - - boolean isFirst = true; - for (String fileName : inputFiles.keySet()) { - MessageDigest digest = MessageDigest.getInstance("MD5"); - - InputStream inputStream = inputFiles.get(fileName); - - byte[] iv = null; - if (aesKey != null) { - iv = createIV(); - inputStream = EncryptionHelper.encryptFile(inputStream, aesKey, - iv); - } - - InputStream digestStream = new DigestInputStream(inputStream, - digest); - CountingStream countingStream = new CountingStream(digestStream); - uploader.createBlockBlob(fileName, countingStream); - - inputStream.close(); - byte[] md5hash = digest.digest(); - String md5 = Base64.encode(md5hash); - - AssetFileInfo fi = new AssetFileInfo(null, new AssetFileType() - .setContentChecksum(md5) - .setContentFileSize(countingStream.getCount()) - .setIsPrimary(isFirst).setName(fileName) - .setInitializationVector(getIVString(iv))); - infoToUpload.put(fileName, fi); - - isFirst = false; - } - - service.action(AssetFile.createFileInfos(asset.getId())); - for (AssetFileInfo assetFile : service.list(AssetFile.list(asset - .getAssetFilesLink()))) { - AssetFileInfo fileInfo = infoToUpload.get(assetFile.getName()); - Updater updateOp = AssetFile.update(assetFile.getId()) - .setContentChecksum(fileInfo.getContentChecksum()) - .setContentFileSize(fileInfo.getContentFileSize()) - .setIsPrimary(fileInfo.getIsPrimary()); - - if (aesKey != null) { - updateOp.setIsEncrypted(true) - .setEncryptionKeyId(contentKeyId) - .setEncryptionScheme("StorageEncryption") - .setEncryptionVersion("1.0") - .setInitializationVector( - fileInfo.getInitializationVector()); - } - - service.update(updateOp); - } - - service.list(AssetFile.list(asset.getAssetFilesLink())); - - service.delete(Locator.delete(locator.getId())); - service.delete(AccessPolicy.delete(accessPolicy.getId())); - } - - private String getIVString(byte[] iv) { - if (iv == null) { - return null; - } - - // Offset the bytes to ensure that the sign-bit is not set. - // Media Services expects unsigned Int64 values. - byte[] sub = new byte[9]; - System.arraycopy(iv, 0, sub, 1, 8); - BigInteger longIv = new BigInteger(sub); - return longIv.toString(); - } - - private byte[] createIV() { - // Media Services requires 128-bit (16-byte) initialization vectors (IV) - // for AES encryption, but also that only the first 8 bytes are filled. - Random random = new Random(); - byte[] effectiveIv = new byte[8]; - random.nextBytes(effectiveIv); - byte[] iv = new byte[16]; - System.arraycopy(effectiveIv, 0, iv, 0, effectiveIv.length); - return iv; - } - - private String createAssetContentKey(AssetInfo asset, byte[] aesKey) - throws Exception { - if (aesKey == null) { - return null; - } - - String protectionKeyId = service.action(ProtectionKey - .getProtectionKeyId(ContentKeyType.StorageEncryption)); - String protectionKey = service.action(ProtectionKey - .getProtectionKey(protectionKeyId)); - - String contentKeyIdUuid = UUID.randomUUID().toString(); - String contentKeyId = "nb:kid:UUID:" + contentKeyIdUuid; - - byte[] encryptedContentKey = EncryptionHelper.encryptSymmetricKey( - protectionKey, aesKey); - String encryptedContentKeyString = Base64.encode(encryptedContentKey); - String checksum = EncryptionHelper.calculateContentKeyChecksum( - contentKeyIdUuid, aesKey); - - service.create(ContentKey - .create(contentKeyId, ContentKeyType.StorageEncryption, - encryptedContentKeyString).setChecksum(checksum) - .setProtectionKeyId(protectionKeyId)); - service.action(Asset.linkContentKey(asset.getId(), contentKeyId)); - return contentKeyId; - } - - private static class CountingStream extends InputStream { - private final InputStream wrappedStream; - private long count; - - public CountingStream(InputStream wrapped) { - wrappedStream = wrapped; - count = 0; - } - - @Override - public int read() throws IOException { - count++; - return wrappedStream.read(); - } - - public long getCount() { - return count; - } - } - - // Process - public JobInfo createJob(String jobName, AssetInfo inputAsset, - Task.CreateBatchOperation task) throws ServiceException { - List<Task.CreateBatchOperation> tasks = new ArrayList<Task.CreateBatchOperation>(); - tasks.add(task); - return createJob(jobName, inputAsset, tasks); - } - - public JobInfo createJob(String jobName, AssetInfo inputAsset, - List<Task.CreateBatchOperation> tasks) throws ServiceException { - Creator jobCreator = Job.create().setName(jobName) - .addInputMediaAsset(inputAsset.getId()).setPriority(2); - - for (Task.CreateBatchOperation task : tasks) { - jobCreator.addTaskCreator(task); - } - - return service.create(jobCreator); - } - - // Process - public Task.CreateBatchOperation createTaskOptions(String taskName, - int inputAssetId, int outputAssetId, EncoderType encoderType) - throws ServiceException { - String taskBody = getTaskBody(inputAssetId, outputAssetId); - - String processor = null; - String configuration = null; - switch (encoderType) { - case WindowsAzureMediaEncoder: - processor = getMediaProcessorIdByName(MEDIA_PROCESSOR_WINDOWS_AZURE_MEDIA_ENCODER); - // Full list of configurations strings for version 2.1 is at: - // http://msdn.microsoft.com/en-us/library/jj129582.aspx - configuration = "VC1 Broadband SD 4x3"; - break; - case StorageDecryption: - processor = getMediaProcessorIdByName(MEDIA_PROCESSOR_STORAGE_DECRYPTION); - configuration = null; - break; - default: - break; - } - - Task.CreateBatchOperation taskCreate = Task.create(processor, taskBody) - .setName(taskName).setConfiguration(configuration); - - return taskCreate; - } - - private String getTaskBody(int inputAssetId, int outputAssetId) { - return "<taskBody><inputAsset>JobInputAsset(" + inputAssetId - + ")</inputAsset>" + "<outputAsset>JobOutputAsset(" - + outputAssetId + ")</outputAsset></taskBody>"; - } - - private String getMediaProcessorIdByName(String processorName) - throws ServiceException { - EntityListOperation<MediaProcessorInfo> operation = MediaProcessor - .list(); - operation.getQueryParameters().putSingle("$filter", - "(Name eq '" + processorName + "')"); - MediaProcessorInfo processor = service.list(operation).get(0); - return processor.getId(); - } - - // Process - public boolean isJobFinished(JobInfo initialJobInfo) - throws ServiceException { - JobInfo currentJob = service.get(Job.get(initialJobInfo.getId())); - System.out.println(currentJob.getState()); - switch (currentJob.getState()) { - case Finished: - case Canceled: - case Error: - return true; - default: - return false; - } - } - - public List<AssetInfo> getJobOutputMediaAssets(JobInfo job) - throws ServiceException { - return service.list(Asset.list(job.getOutputAssetsLink())); - } - - // Process - public void cancelJob(JobInfo job) throws ServiceException { - // Use the service function - service.action(Job.cancel(job.getId())); - } - - // Deliver - private Map<String, URL> createFileURLsFromAsset(AssetInfo asset, - int availabilityWindowInMinutes) throws ServiceException, - MalformedURLException { - Map<String, URL> ret = new HashMap<String, URL>(); - - AccessPolicyInfo readAP = service.create(AccessPolicy.create( - accessPolicyPrefix + "tempAccessPolicy", - availabilityWindowInMinutes, - EnumSet.of(AccessPolicyPermission.READ))); - LocatorInfo readLocator = service.create(Locator.create(readAP.getId(), - asset.getId(), LocatorType.SAS)); - - List<AssetFileInfo> publishedFiles = service.list(AssetFile.list(asset - .getAssetFilesLink())); - for (AssetFileInfo fi : publishedFiles) { - ret.put(fi.getName(), - new URL(readLocator.getBaseUri() + "/" + fi.getName() - + readLocator.getContentAccessToken())); - } - - return ret; - } - - // Deliver - public Map<String, InputStream> downloadFilesFromAsset( - AssetInfo asset, int downloadWindowInMinutes) throws Exception { - Map<String, URL> urls = createFileURLsFromAsset(asset, - downloadWindowInMinutes); - Map<String, InputStream> ret = new HashMap<String, InputStream>(); - - for (String fileName : urls.keySet()) { - URL url = urls.get(fileName); - InputStream stream = getInputStreamWithRetry(url); - ret.put(fileName, stream); - } - - return ret; - } - - // This method is needed because there can be a delay before a new read - // locator - // is applied for the asset files. - private InputStream getInputStreamWithRetry(URL file) throws IOException, - InterruptedException { - InputStream reader = null; - for (int counter = 0; true; counter++) { - try { - reader = file.openConnection().getInputStream(); - break; - } catch (IOException e) { - System.out.println("Got error, wait a bit and try again"); - if (counter < 6) { - Thread.sleep(10000); - } else { - // No more retries. - throw e; - } - } - } - - return reader; - } - - public void removeAllAssetsWithPrefix(String assetPrefix) - throws ServiceException { - ListResult<LocatorInfo> locators = service.list(Locator.list()); - EntityListOperation<AssetInfo> operation = Asset.list(); - operation.getQueryParameters().add("$filter", - "startswith(Name,'" + assetPrefix + "')"); - List<AssetInfo> assets = service.list(operation); - for (AssetInfo asset : assets) { - if (asset.getName().length() > assetPrefix.length() - && asset.getName().substring(0, assetPrefix.length()) - .equals(assetPrefix)) { - for (LocatorInfo locator : locators) { - if (locator.getAssetId().equals(asset.getId())) { - try { - service.delete(Locator.delete(locator.getId())); - } catch (ServiceException e) { - // Don't worry if cannot delete now. - // Might be held on to by a running job - } - } - } - - try { - service.delete(Asset.delete(asset.getId())); - } catch (ServiceException e) { - // Don't worry if cannot delete now. - // Might be held on to by a running job - } - } - } - } - - public void removeAllAccessPoliciesWithPrefix() throws ServiceException { - List<AccessPolicyInfo> accessPolicies = service.list(AccessPolicy - .list()); - for (AccessPolicyInfo accessPolicy : accessPolicies) { - if (accessPolicy.getName().length() > accessPolicyPrefix.length() - && accessPolicy.getName() - .substring(0, accessPolicyPrefix.length()) - .equals(accessPolicyPrefix)) { - try { - service.delete(AccessPolicy.delete(accessPolicy.getId())); - } catch (ServiceException e) { - // Don't worry if cannot delete now. - // Might be held on to by a running job - } - } - } - } - - public void removeAllJobWithPrefix(String testJobPrefix) - throws ServiceException { - List<JobInfo> jobInfos = service.list(Job.list()); - for (JobInfo jobInfo : jobInfos) { - if (jobInfo.getName().startsWith(testJobPrefix)) { - try { - service.delete(Job.delete(jobInfo.getId())); - } catch (ServiceException e) { - } - } - } - } - - private static class EncryptionHelper { - public static boolean canUseStrongCrypto() { - try { - Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); - SecretKeySpec secretKeySpec = new SecretKeySpec(new byte[32], - "AES"); - cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec); - } catch (Exception e) { - return false; - } - return true; - } - - public static byte[] encryptSymmetricKey(String protectionKey, - byte[] inputData) throws Exception { - Cipher cipher = Cipher - .getInstance("RSA/ECB/OAEPWithSHA-1AndMGF1Padding"); - CertificateFactory certificateFactory = CertificateFactory - .getInstance("X.509"); - byte[] protectionKeyBytes = Base64.decode(protectionKey); - ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream( - protectionKeyBytes); - Certificate certificate = certificateFactory - .generateCertificate(byteArrayInputStream); - Key publicKey = certificate.getPublicKey(); - SecureRandom secureRandom = new SecureRandom(); - cipher.init(Cipher.ENCRYPT_MODE, publicKey, secureRandom); - byte[] cipherText = cipher.doFinal(inputData); - return cipherText; - } - - public static String calculateContentKeyChecksum(String uuid, - byte[] aesKey) throws Exception { - Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); - SecretKeySpec secretKeySpec = new SecretKeySpec(aesKey, "AES"); - cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec); - byte[] encryptionResult = cipher.doFinal(uuid.getBytes("UTF8")); - byte[] checksumByteArray = new byte[8]; - System.arraycopy(encryptionResult, 0, checksumByteArray, 0, 8); - String checksum = Base64.encode(checksumByteArray); - return checksum; - } - - public static InputStream encryptFile(InputStream inputStream, - byte[] key, byte[] iv) throws Exception { - Cipher cipher = Cipher.getInstance("AES/CTR/NoPadding"); - SecretKeySpec keySpec = new SecretKeySpec(key, "AES"); - IvParameterSpec ivParameterSpec = new IvParameterSpec(iv); - cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivParameterSpec); - CipherInputStream cipherInputStream = new CipherInputStream( - inputStream, cipher); - return cipherInputStream; - } - } - -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/ScenarioTestBase.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/ScenarioTestBase.java deleted file mode 100644 index 9aa6ac457453..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/services/scenarios/ScenarioTestBase.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.microsoft.windowsazure.services.scenarios; - -import static org.junit.Assert.fail; - -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -import org.junit.Rule; -import org.junit.rules.MethodRule; -import org.junit.runners.model.FrameworkMethod; -import org.junit.runners.model.Statement; - -import com.microsoft.windowsazure.Configuration; -import com.microsoft.windowsazure.services.blob.BlobConfiguration; -import com.microsoft.windowsazure.services.media.MediaConfiguration; -import com.microsoft.windowsazure.services.media.authentication.AzureAdClientSymmetricKey; -import com.microsoft.windowsazure.services.media.authentication.AzureAdTokenCredentials; -import com.microsoft.windowsazure.services.media.authentication.AzureAdTokenProvider; -import com.microsoft.windowsazure.services.media.authentication.AzureEnvironments; -import com.microsoft.windowsazure.services.media.authentication.TokenProvider; -import com.microsoft.windowsazure.services.queue.QueueConfiguration; - -public abstract class ScenarioTestBase { - protected static Configuration config; - protected static ExecutorService executorService; - - @Rule - public SetupManager setupManager = new SetupManager(); - - protected static void initializeConfig() { - executorService = Executors.newFixedThreadPool(5); - config = Configuration.getInstance(); - - String tenant = config.getProperty("media.azuread.test.tenant").toString(); - String clientId = config.getProperty("media.azuread.test.clientid").toString(); - String clientKey = config.getProperty("media.azuread.test.clientkey").toString(); - String apiserver = config.getProperty("media.azuread.test.account_api_uri").toString(); - - // Setup Azure AD Credentials (in this case using username and password) - AzureAdTokenCredentials credentials = new AzureAdTokenCredentials( - tenant, - new AzureAdClientSymmetricKey(clientId, clientKey), - AzureEnvironments.AZURE_CLOUD_ENVIRONMENT); - - TokenProvider provider = null; - - try { - provider = new AzureAdTokenProvider(credentials, executorService); - } catch (MalformedURLException e) { - throw new RuntimeException(e); - } - - // configure the account endpoint and the token provider for injection - config.setProperty(MediaConfiguration.AZURE_AD_API_SERVER, apiserver); - config.setProperty(MediaConfiguration.AZURE_AD_TOKEN_PROVIDER, provider); - - overrideWithEnv(config, QueueConfiguration.ACCOUNT_KEY, - "media.queue.account.key"); - overrideWithEnv(config, QueueConfiguration.ACCOUNT_NAME, - "media.queue.account.name"); - overrideWithEnv(config, QueueConfiguration.URI, "media.queue.uri"); - } - - protected static void cleanupConfig() { - - // shutdown the executor service required by ADAL4J - executorService.shutdown(); - } - - private static void overrideWithEnv(Configuration config, String key) { - String value = System.getenv(key); - if (value == null) - return; - - config.setProperty(key, value); - } - - protected static void overrideWithEnv(Configuration config, String key, - String enviromentKey) { - String value = System.getenv(enviromentKey); - if (value == null) - return; - - config.setProperty(key, value); - } - - protected void signalSetupStarting() { - setupManager.startSetup(); - } - - protected void signalSetupFinished() { - setupManager.endSetup(); - } - - protected class SetupManager implements MethodRule { - private boolean shouldCapture; - - @Override - public Statement apply(Statement base, FrameworkMethod method, - Object target) { - return new SetupManagerStatement(base); - } - - public void startSetup() { - this.shouldCapture = true; - } - - public void endSetup() { - this.shouldCapture = false; - } - - private class SetupManagerStatement extends Statement { - private final Statement next; - - public SetupManagerStatement(Statement base) { - next = base; - } - - @Override - public void evaluate() throws Throwable { - try { - next.evaluate(); - } catch (Throwable e) { - if (shouldCapture) { - // e.printStackTrace(); - fail("Error occured during setup: " + e.getMessage()); - } else { - throw e; - } - } - } - } - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/utils/ServiceExceptionFactoryTest.java b/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/utils/ServiceExceptionFactoryTest.java deleted file mode 100644 index d07fcb8c8c30..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/java/com/microsoft/windowsazure/utils/ServiceExceptionFactoryTest.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Copyright Microsoft Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.microsoft.windowsazure.utils; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertSame; - -import java.io.ByteArrayInputStream; -import java.net.SocketTimeoutException; - -import org.junit.Test; - -import com.microsoft.windowsazure.core.ServiceTimeoutException; -import com.microsoft.windowsazure.exception.ServiceException; -import com.microsoft.windowsazure.exception.ServiceExceptionFactory; -import com.sun.jersey.api.client.ClientHandlerException; -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.api.client.UniformInterfaceException; - -public class ServiceExceptionFactoryTest { - @Test - public void serviceNameAndMessageAndCauseAppearInException() { - // Arrange - ClientResponse response = new ClientResponse(404, null, - new ByteArrayInputStream(new byte[0]), null); - UniformInterfaceException cause = new UniformInterfaceException( - response); - - // Act - ServiceException exception = ServiceExceptionFactory.process("testing", - new ServiceException("this is a test", cause)); - - // Assert - assertNotNull(exception); - assertEquals("testing", exception.getServiceName()); - assertEquals("this is a test", exception.getMessage()); - assertEquals(cause, exception.getCause()); - } - - @Test - public void httpStatusCodeAndReasonPhraseAppearInException() { - // Arrange - ClientResponse response = new ClientResponse(404, null, - new ByteArrayInputStream(new byte[0]), null); - UniformInterfaceException cause = new UniformInterfaceException( - response); - - // Act - ServiceException exception = ServiceExceptionFactory.process("testing", - new ServiceException("this is a test", cause)); - - // Assert - assertNotNull(exception); - assertEquals(404, exception.getHttpStatusCode()); - assertEquals("Not Found", exception.getHttpReasonPhrase()); - } - - @Test - public void informationWillPassUpIfServiceExceptionIsRootCauseOfClientHandlerExceptions() { - // Arrange - ClientResponse response = new ClientResponse(503, null, - new ByteArrayInputStream(new byte[0]), null); - UniformInterfaceException rootCause = new UniformInterfaceException( - response); - ServiceException originalDescription = ServiceExceptionFactory.process( - "underlying", new ServiceException(rootCause)); - ClientHandlerException wrappingException = new ClientHandlerException( - originalDescription); - - // Act - ServiceException exception = ServiceExceptionFactory.process("actual", - new ServiceException(wrappingException)); - - // Assert - assertEquals(503, exception.getHttpStatusCode()); - assertEquals("underlying", exception.getServiceName()); - } - - @Test - public void socketTimeoutWillPassUpIfInsideClientHandlerException() { - String expectedMessage = "connect timeout"; - SocketTimeoutException rootCause = new SocketTimeoutException( - expectedMessage); - ClientHandlerException wrappingException = new ClientHandlerException( - rootCause); - - ServiceException exception = ServiceExceptionFactory.process("testing", - new ServiceException(wrappingException)); - - assertSame(ServiceTimeoutException.class, exception.getClass()); - assertEquals(expectedMessage, exception.getMessage()); - assertEquals("testing", exception.getServiceName()); - } -} diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/resources/META-INF/com.microsoft.windowsazure.properties b/sdk/mediaservices/microsoft-azure-media/src/test/resources/META-INF/com.microsoft.windowsazure.properties deleted file mode 100644 index 9291222647c9..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/resources/META-INF/com.microsoft.windowsazure.properties +++ /dev/null @@ -1,19 +0,0 @@ -blob.accountName= -blob.accountKey= -blob.uri= -queue.accountName= -queue.accountKey= -queue.uri= -table.accountName= -table.accountKey= -table.uri= -testprefix.com.microsoft.windowsazure.services.core.Configuration.connectTimeout=3 -testprefix.com.microsoft.windowsazure.services.core.Configuration.readTimeout=7 -media.azuread.test.tenant= -media.azuread.test.clientid= -media.azuread.test.clientkey= -media.azuread.test.account_api_uri= -media.azuread.test.useraccount=undefined -media.azuread.test.userpassword=undefined -media.azuread.test.pfxfile=undefined -media.azuread.test.pfxpassword=undefined diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/resources/certificate/server.crt b/sdk/mediaservices/microsoft-azure-media/src/test/resources/certificate/server.crt deleted file mode 100644 index 45100ad45f50..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/resources/certificate/server.crt +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICqTCCAhICCQDm00hjjGf/ITANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UEBhMC -VVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdSZWRtb25kMRMwEQYDVQQKEwpNaWNy -b3NvZnQgMRYwFAYDVQQLEw1XaW5kb3dzIEF6dXJlMRUwEwYDVQQDEwxBbGJlcnQg -Q2hlbmcxJTAjBgkqhkiG9w0BCQEWFmdvbmdjaGVuQG1pY3Jvc29mdC5jb20wIBcN -MTMwMzA2MDAxNzU2WhgPMTkyMzA5MTIyMDMxNDhaMIGXMQswCQYDVQQGEwJVUzEL -MAkGA1UECBMCV0ExEDAOBgNVBAcTB1JlZG1vbmQxEzARBgNVBAoTCk1pY3Jvc29m -dCAxFjAUBgNVBAsTDVdpbmRvd3MgQXp1cmUxFTATBgNVBAMTDEFsYmVydCBDaGVu -ZzElMCMGCSqGSIb3DQEJARYWZ29uZ2NoZW5AbWljcm9zb2Z0LmNvbTCBnzANBgkq -hkiG9w0BAQEFAAOBjQAwgYkCgYEAxct8f2TOECFGtZs5zJN9Vmtk6Jeo2ThbJ8XO -0GPgjKjfLGUgUHrUKSpaHrObaEQWtU9/qdCmctHep5veulGApZ6cBKjL+7xKGQfP -KHq+6nsvF2EutZenPvsFDb7msezcT+Ut1yMnCUd9sjcD0/g2AO5CpplnUR7MOIaq -j/ifsNMCAwEAATANBgkqhkiG9w0BAQUFAAOBgQCAY9QBsXtEfDTZ6Gmplkd2mGGf -aFxRXtEtEXxBrEjhq3c2F8le1ZpMysWfmgpsImZODf3rPN5+UMmL2cqxF0RU+7kG -qPSo8egxg33IfEMTeH5WYHr8ilOxBfw25nnUGr7Cym0m0JAmh5xR47vmEb/EHIXf -iFKpK6o4bjjnszUV2g== ------END CERTIFICATE----- diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/resources/certificate/server.der b/sdk/mediaservices/microsoft-azure-media/src/test/resources/certificate/server.der deleted file mode 100644 index e34ad905b9f157d99e71e21fea545291d011b2a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 634 zcmV-=0)_oBf&z8|0RS)!1_>&LNQU<f0RaI800e>pU@(FLTmk_A0)c@5#mjtuWX=#F zMzxzc%#(dqYh>t`sM$DMC&kXtW8jRa-z;SyP<qrUDq0@1n`lH9wNHPk(57<H-lv=1 zx>10oo}2`z%lo`a83)fOdcNv=FBf4hwU?(p`vncY=CSPDPvtGwBPR(*eX=(L)A%+3 z?n0)SXHg!^IEJc^_@A)T0s{d60Rn-51N+@R6QQ!<c(Wh1LQ$41uWb<GJse{0GZx_6 zfv0>e%8>F{d`5i_cQWaFWS#8+C>6QXiN{cQxvN%?UEo$;_KEexd9k~9-C$?ZG{6I5 zqt6%l`e$zfa8B7DX+?rs<?k8&0tM@)^>JFO5rX&H`Zh)d8Vj2MN@!M~iZ*aT0zm-e z{U6|uDW4S{Nc$W4{COoL{$Di82tI8Ibv%1i=Z^#q!Q;Qi=@Pom$q`swAD>6#Fx=JU z5kcSX{qLyToQ>ZCK>*z#V!|TI=p{_-U7(NHBR=d%UfcT3GAC%qWd7Etho~9$Pk<HM z9r01ZR(0p^n5;VNfxSvW{J+b+N9&s66O95uW@sT|Zv+7*6Q(uJ+$^FE506I*x3iib zZ&YL15H5m}Ap2_^FdMoFn?mNJ>W3xQqizkw2Cae>V6SEe(KjJy0zeUzGlj2mW(FY{ zVNeubU|sGu%A>wYb;LkMDYrnSOxcD;*oPc7u_>?+Jp*2j<C;B;^Sg4L&{PKmV<k<< z&p84?0J+kz908ncB$3RjXMD!1KlOmNtF`IXS8T~#RWs5|p)19$_KWs@d>`068y7%M UN!}B-i;Qe13_leN%CIL3vQ8Hx+W-In diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/resources/media/MPEG4-H264.mp4 b/sdk/mediaservices/microsoft-azure-media/src/test/resources/media/MPEG4-H264.mp4 deleted file mode 100644 index 54c15e4ec7532491d1e5ebd6cecc6a06413edfcc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8697 zcmeHN30PBC7QT6j5SG$ZD58V<aKW_@!Xl<95pYU7h_=Wgitr!=C<#fk0MZ~4gGIVw zZ5a})sBOjK0=4z44pkATWeOFh9i_Ey*oqaZVv!0KVa^R(NSYa#iZfroUUT2M_y5mb z-Z|%<muEl-ISAzIBqE6i2SEYpmLwC45Skbv;!|>rL1959Eb!IcY@936Nv-IXERlZ9 z32ZN(yU1f%Qk+yQ6AR>IpbN*#gIt;tC+5dX$uKt;PZxKjf?+q!#<kQQvVEga=6`PQ zp3nRWJ%t@IX&l#`OyqJr*kl^lox>&t5*e4X&}HEQHYpKsy}U?as*vkJ#&X$Y><bc5 zP7q7D3)y56Uy6lH7{_%Z<3tkRVJ<fkbT}TQl#<7D-8|X2kdk;R84p(o1YA!q4xpqo zUI4nVdLk@JQo0886|oY4C6tuwMY_X3X$l_(#!<0U97rKdO~%Pn<j|%Re9#n9xSb|V z1|n6FgpqYpxcd0uJEjTZb5(!o?QOfW0<osw&AXI&cj%LKD#E`lyy`L{9W>JzmTE+g zLF8<;x+Y(9xrxx2Gwo`dwu_Pti`CwwpdL?I%fZk!S?#=fg`zQP==13luFdL(<$6eC zl>APIzDncr|0S(n>=0vZf18JR3t0Akh_-WXHNodOOT5_@le|g)S*y<(mdX|nP3M`< z_Z5Z8O24o^_ugUSQh{(_vf*k@X$e<UFbrTA0%n$N7Q(?HizqFVapF|eg}zexHtWJY z^}T<Z-CA9lncNy3d9U&8@xvXZ2Y$6vHaN{hN^5EM$-FZSMT~o26)(%5;%IyIr>@LZ zmV<kt#ZX#n!qu|v;|1jxTECNed@=P}W3_XDbJpVHP8=uqu8!LlTP%v|OLK#AgL*QR zetf@#_SP%5(`<c<qFEZ2ru$x}x<+09TL*>s?tt|?ovr7c^tgB{t^AzbWi5ycH!LN~ zK-~N}$J-gi-534dwv7UDY*(<wK@b-kiW!X{ZY73fCxb})XwFGb-2|52k>a%SUlxDn zxaE}cUXL?BsJ<w=x^A<ky|q)b#eH#RmMzCQp}zErAfT?RqdTZZQ?&TRW{s`;wZ_}- z(*(bH$fY}O?(=30SsG<fS{tI&vi)3~v%9al>xSFbi6=Vo9xvRuUAwI?XJPBj*k-5T zj9&_m=7#Jz-s}=<cdhj3%m10M--Zp7S+}NoPSxb_P{|?9oFa8+>dl*X%Uh+Iq@tlc z(6&)p79G4Doz@!OwI_sq;<<N9|BH`}IIWxeNjF(+1>vOp<lFf(U+P>PdG_6({A!f5 zD!Y`&qg}mfEvO#*vxnbblz(WdMH?W0t^MLqWkgoa;RDYv=g)tsQVGb_pW20G1yh?u z$&p*Xv2toFGMMn^hcO|iX4RwWPQ1aZ&3K2K6eahmGcDh>J$ptGQhf5M&@;hB<G`?7 zrJW*b<@E;+FRE|bysdlQz^SEuKxxO*AyAr?GbJ~s_GI9o?A@^&;<WeLUI<;^t`;24 zV@0%trHAC)x&GCjOB?P=edFr0cCUQKwkeY<zy9&%`?>!|fX|75y>HH{ij;rbw!V7m z2Q3NR9lFd_zXoTiht;_s+^~NZqLX~b2YVd|2joU+?I0XF-kei;?(AXbr>&eyW-{(a z+O;$khvjfTnsa7X@BvFjV#q$f?Eqd1&(0kj>P%_vbwek24Dg17GS^y?`uYx|)Som; zeaBJiPZ^~?IZFL$qtu@<N`2=M=s(!N>6=a8r?W?}2Yvmyqtu^2N`046>a$0w&l#n@ z$0+r^Myc;T0{yX$0qzL)Fc1So0j2c;{gdB|X%$b+H+Qy2#JKbDw&0QnjelI8UO>0C zLNwxsw#RB|n{!lXgM5&LFVTOSjhGX76^N{=Kug&+h?vYmj3c}$h(KRfAl8%H+3<Q{ zjR^BStD@>?Fw*sq1hGCkkX{B&M6=pBBQV^1$vS28Yss&yjrjEHh%T$LX)5zORzBv$ z!sS8pEmlrH^<~~sf_pK;&;RHn$MO=Msr_;P@e?^qi|VhncXjt<`RX;UTwML6F$&0~ z-x<8I=4%^bVT>CaEba0-&9Tg(FamtF6#H@~BBSgO!)iBnXFBt$>ifzH#4E>dMLLH{ zD$tTV70Q#d5$k#dnptIbu-P2Z(2I$PIXSoxJP18{6`8(SMguRqyb*&~hjl)60iSMl zd--LDBOi?L@}bg4$(mbWv&C%g_uss_Q~r{4=Fw}}L+>?AO1qd|s{cv_2+s)dGeQE4 zkUtwCfkwzPMo5qj8PhWhcNA>2?g}I1IU{7H5fWyEL>M8FM#vf?WUUbrqeI5p4zWh- z@{JII5t3+xJa2>ujgS;0L}G+UjS#sG8EZSF4qKP-r?lyirEeb#51sI=A~e(*G3?oh zsjWtINU(t_oN!ZDAQtCUoN&z$VYVsatvW|iMmEucE-~lt{kyudzWAck3s$*n{H{!3 z9m%P78QxjHproY)$}Sbk{uI${BUDI<7#8{7h)IJqu`AzPg;bOC5yQH8+1%jE-YmNs zsC5mS&btN0$NwA_?NBZL`p0z!=~kC&7YT9?lohZ<=ie&ddVE+m?$5;A+kanhkC)4C zFy_9JCNSpdK4YeXF<G2&Hn!)}2=PvPRDnTRh&f5)Gd<gkW5Z+$SgRU7ZwPcX<sxui z^sCrMB`rr{5cwew1)L=j6Cpa<Fn;6H=W&WA5zCW<8*|{vJn^(Pk)BOVv>}Lq4G{y6 zd}K#yGw@f07~9r{KOK9ntZ40QVkqIVD6MjUoiaJ&an;~BVAh*tR3@2hlZ@IVvuPMJ zriTsgDtFjw`uCe>l6l1>^O{K}-z4*fN#;$HOo2(J&?KWB#*DRH-yXJ_zFl{iWOkZl zcAI40HOcHT$?P@Bl$d1pn`90SW5(L9Wy4m}x9g!{jH!Jf#M~?ri&J5wP?Va;2dP)~ z2f+9BUPvMMGgO9k05<6JhBSYzMTaa^Czn#mK(3J|>(<ntp|6eCH7xpCm^0|}FoZ8{ zP!T;*#80B2L5lc>_oWz*Xwk2SR%1Q%L?T}()wSS~n#7MEXk!@$eQ_X_!WYJ49lEV3 zDMbJcyHt_U#%J*RI7dGGqJsxR!CSOeNQGoyoA^p5kH!Dtzf~re4Hz5iY@|}-+(6=D za9g^YYD0m*;ED^)a!Hs!=`V%_6Z#Ott3xj~-xDyaKh3Y=k=`a`p8)c$oh#O>5qk7p zM1No9mF+Z1MMI3l(>^Ltc96;Cvi^DS79!zxe*hT)TaD|-%|K$#vR{HPkwt%-p@*C6 z;qX)%)W_ops4xdj3G-$^d!WF2ga$f~>D8y8JsotP2MPP8y$7`%+D}4dKe$Tlgt^8) z{7Ni?HK#zG^pLB!OdcnOHF3c{nce3`D_?{j@kfYt7u)~=WD9<@hu>T$)WPqsGeFM{ ze5M~G;77)|e{+_xufeUu&oT}mqafFTnCL6Kfrd`fcbPuReL3pa&azCbNYS4r1p0iv zvmDfamRYjCvpk?Xf^$q~^`B$D!8u+DKUh=!6Aj%Gq5Hua!B%l$$IJLSBhpnW)l>i& zAnkaMBL^@`ny!umgc#2<qhSLY9?WbQ0Wg}acQE@86|w;wuZx|Em7q;H8XPnjkMKeM zqyAw7gG9jG524cvkE~me1m1xpun+R$hmZtFNCN2)iVgS=F(7sz{s$8QbWwnUFUN83 gA&S>YjFI{eRye?e4_Qn?VI~P>_zyam5s*Rt1xb%oW&i*H diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/resources/schemas/PlayReadyLicenseResponseTemplate.xsd b/sdk/mediaservices/microsoft-azure-media/src/test/resources/schemas/PlayReadyLicenseResponseTemplate.xsd deleted file mode 100644 index 0c9915d69a88..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/resources/schemas/PlayReadyLicenseResponseTemplate.xsd +++ /dev/null @@ -1,220 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<xs:schema xmlns:tns="http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1" xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" /> - <xs:complexType name="AgcAndColorStripeRestriction"> - <xs:sequence> - <xs:element minOccurs="0" name="ConfigurationData" type="xs:unsignedByte" /> - </xs:sequence> - </xs:complexType> - <xs:element name="AgcAndColorStripeRestriction" nillable="true" type="tns:AgcAndColorStripeRestriction" /> - <xs:simpleType name="ContentType"> - <xs:restriction base="xs:string"> - <xs:enumeration value="Unspecified" /> - <xs:enumeration value="UltravioletDownload" /> - <xs:enumeration value="UltravioletStreaming" /> - </xs:restriction> - </xs:simpleType> - <xs:element name="ContentType" nillable="true" type="tns:ContentType" /> - <xs:complexType name="ExplicitAnalogTelevisionRestriction"> - <xs:sequence> - <xs:element minOccurs="0" name="BestEffort" type="xs:boolean" /> - <xs:element minOccurs="0" name="ConfigurationData" type="xs:unsignedByte" /> - </xs:sequence> - </xs:complexType> - <xs:element name="ExplicitAnalogTelevisionRestriction" nillable="true" type="tns:ExplicitAnalogTelevisionRestriction" /> - <xs:complexType name="PlayReadyContentKey"> - <xs:sequence /> - </xs:complexType> - <xs:element name="PlayReadyContentKey" nillable="true" type="tns:PlayReadyContentKey" /> - <xs:complexType name="ContentEncryptionKeyFromHeader"> - <xs:complexContent mixed="false"> - <xs:extension base="tns:PlayReadyContentKey"> - <xs:sequence /> - </xs:extension> - </xs:complexContent> - </xs:complexType> - <xs:element name="ContentEncryptionKeyFromHeader" nillable="true" type="tns:ContentEncryptionKeyFromHeader" /> - <xs:complexType name="ContentEncryptionKeyFromKeyIdentifier"> - <xs:complexContent mixed="false"> - <xs:extension base="tns:PlayReadyContentKey"> - <xs:sequence> - <xs:element minOccurs="0" name="KeyIdentifier" type="ser:guid" /> - </xs:sequence> - </xs:extension> - </xs:complexContent> - </xs:complexType> - <xs:element name="ContentEncryptionKeyFromKeyIdentifier" nillable="true" type="tns:ContentEncryptionKeyFromKeyIdentifier" /> - <xs:complexType name="PlayReadyLicenseResponseTemplate"> - <xs:sequence> - <xs:element name="LicenseTemplates" nillable="true" type="tns:ArrayOfPlayReadyLicenseTemplate" /> - <xs:element minOccurs="0" name="ResponseCustomData" nillable="true" type="xs:string"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:complexType> - <xs:element name="PlayReadyLicenseResponseTemplate" nillable="true" type="tns:PlayReadyLicenseResponseTemplate" /> - <xs:complexType name="ArrayOfPlayReadyLicenseTemplate"> - <xs:sequence> - <xs:element minOccurs="0" maxOccurs="unbounded" name="PlayReadyLicenseTemplate" nillable="true" type="tns:PlayReadyLicenseTemplate" /> - </xs:sequence> - </xs:complexType> - <xs:element name="ArrayOfPlayReadyLicenseTemplate" nillable="true" type="tns:ArrayOfPlayReadyLicenseTemplate" /> - <xs:complexType name="PlayReadyLicenseTemplate"> - <xs:sequence> - <xs:element minOccurs="0" name="AllowTestDevices" type="xs:boolean" /> - <xs:element minOccurs="0" name="BeginDate" nillable="true" type="xs:dateTime"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element name="ContentKey" nillable="true" type="tns:PlayReadyContentKey" /> - <xs:element minOccurs="0" name="ContentType" type="tns:ContentType"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="ExpirationDate" nillable="true" type="xs:dateTime"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="GracePeriod" nillable="true" type="ser:duration"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="LicenseType" type="tns:PlayReadyLicenseType" /> - <xs:element minOccurs="0" name="PlayRight" nillable="true" type="tns:PlayReadyPlayRight" /> - </xs:sequence> - </xs:complexType> - <xs:element name="PlayReadyLicenseTemplate" nillable="true" type="tns:PlayReadyLicenseTemplate" /> - <xs:simpleType name="PlayReadyLicenseType"> - <xs:restriction base="xs:string"> - <xs:enumeration value="Nonpersistent" /> - <xs:enumeration value="Persistent" /> - </xs:restriction> - </xs:simpleType> - <xs:element name="PlayReadyLicenseType" nillable="true" type="tns:PlayReadyLicenseType" /> - <xs:complexType name="PlayReadyPlayRight"> - <xs:sequence> - <xs:element minOccurs="0" name="AgcAndColorStripeRestriction" nillable="true" type="tns:AgcAndColorStripeRestriction"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="AllowPassingVideoContentToUnknownOutput" type="tns:UnknownOutputPassingOption"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="AnalogVideoOpl" nillable="true" type="xs:int"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="CompressedDigitalAudioOpl" nillable="true" type="xs:int"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="CompressedDigitalVideoOpl" nillable="true" type="xs:int"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="DigitalVideoOnlyContentRestriction" type="xs:boolean"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="ExplicitAnalogTelevisionOutputRestriction" nillable="true" type="tns:ExplicitAnalogTelevisionRestriction"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="FirstPlayExpiration" nillable="true" type="ser:duration"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="ImageConstraintForAnalogComponentVideoRestriction" type="xs:boolean"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="ImageConstraintForAnalogComputerMonitorRestriction" type="xs:boolean"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="ScmsRestriction" nillable="true" type="tns:ScmsRestriction"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="UncompressedDigitalAudioOpl" nillable="true" type="xs:int"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:element minOccurs="0" name="UncompressedDigitalVideoOpl" nillable="true" type="xs:int"> - <xs:annotation> - <xs:appinfo> - <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:complexType> - <xs:element name="PlayReadyPlayRight" nillable="true" type="tns:PlayReadyPlayRight" /> - <xs:simpleType name="UnknownOutputPassingOption"> - <xs:restriction base="xs:string"> - <xs:enumeration value="NotAllowed" /> - <xs:enumeration value="Allowed" /> - <xs:enumeration value="AllowedWithVideoConstriction" /> - </xs:restriction> - </xs:simpleType> - <xs:element name="UnknownOutputPassingOption" nillable="true" type="tns:UnknownOutputPassingOption" /> - <xs:complexType name="ScmsRestriction"> - <xs:sequence> - <xs:element minOccurs="0" name="ConfigurationData" type="xs:unsignedByte" /> - </xs:sequence> - </xs:complexType> - <xs:element name="ScmsRestriction" nillable="true" type="tns:ScmsRestriction" /> -</xs:schema> \ No newline at end of file diff --git a/sdk/mediaservices/microsoft-azure-media/src/test/resources/schemas/TokenRestrictionTemplate.xsd b/sdk/mediaservices/microsoft-azure-media/src/test/resources/schemas/TokenRestrictionTemplate.xsd deleted file mode 100644 index 3cdece201f81..000000000000 --- a/sdk/mediaservices/microsoft-azure-media/src/test/resources/schemas/TokenRestrictionTemplate.xsd +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<xs:schema xmlns:tns="http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/TokenRestrictionTemplate/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:complexType name="TokenClaim"> - <xs:sequence> - <xs:element name="ClaimType" nillable="true" type="xs:string" /> - <xs:element minOccurs="0" name="ClaimValue" nillable="true" type="xs:string" /> - </xs:sequence> - </xs:complexType> - <xs:element name="TokenClaim" nillable="true" type="tns:TokenClaim" /> - <xs:complexType name="TokenRestrictionTemplate"> - <xs:sequence> - <xs:element minOccurs="0" name="AlternateVerificationKeys" nillable="true" type="tns:ArrayOfTokenVerificationKey" /> - <xs:element name="Audience" nillable="true" type="xs:anyURI" /> - <xs:element name="Issuer" nillable="true" type="xs:anyURI" /> - <xs:element name="PrimaryVerificationKey" nillable="true" type="tns:TokenVerificationKey" /> - <xs:element minOccurs="0" name="RequiredClaims" nillable="true" type="tns:ArrayOfTokenClaim" /> - </xs:sequence> - </xs:complexType> - <xs:element name="TokenRestrictionTemplate" nillable="true" type="tns:TokenRestrictionTemplate" /> - <xs:complexType name="ArrayOfTokenVerificationKey"> - <xs:sequence> - <xs:element minOccurs="0" maxOccurs="unbounded" name="TokenVerificationKey" nillable="true" type="tns:TokenVerificationKey" /> - </xs:sequence> - </xs:complexType> - <xs:element name="ArrayOfTokenVerificationKey" nillable="true" type="tns:ArrayOfTokenVerificationKey" /> - <xs:complexType name="TokenVerificationKey"> - <xs:sequence /> - </xs:complexType> - <xs:element name="TokenVerificationKey" nillable="true" type="tns:TokenVerificationKey" /> - <xs:complexType name="ArrayOfTokenClaim"> - <xs:sequence> - <xs:element minOccurs="0" maxOccurs="unbounded" name="TokenClaim" nillable="true" type="tns:TokenClaim" /> - </xs:sequence> - </xs:complexType> - <xs:element name="ArrayOfTokenClaim" nillable="true" type="tns:ArrayOfTokenClaim" /> - <xs:complexType name="SymmetricVerificationKey"> - <xs:complexContent mixed="false"> - <xs:extension base="tns:TokenVerificationKey"> - <xs:sequence> - <xs:element name="KeyValue" nillable="true" type="xs:base64Binary" /> - </xs:sequence> - </xs:extension> - </xs:complexContent> - </xs:complexType> - <xs:element name="SymmetricVerificationKey" nillable="true" type="tns:SymmetricVerificationKey" /> -</xs:schema> \ No newline at end of file diff --git a/sdk/mediaservices/pom.xml b/sdk/mediaservices/pom.xml index 8eb47b2b97c1..a9c73511bc7f 100644 --- a/sdk/mediaservices/pom.xml +++ b/sdk/mediaservices/pom.xml @@ -10,6 +10,5 @@ <modules> <module>azure-resourcemanager-mediaservices</module> - <module>microsoft-azure-media</module> </modules> </project> From 44d7ea86d04cfdce7bd46b30a6db318547553430 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 24 Nov 2025 12:18:36 -0800 Subject: [PATCH 17/26] Increment package versions for computelimit releases (#47366) --- eng/versioning/version_client.txt | 2 +- .../azure-resourcemanager-computelimit/CHANGELOG.md | 10 ++++++++++ .../azure-resourcemanager-computelimit/pom.xml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 23ca49424c33..0ea94f0a1f2a 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -512,7 +512,7 @@ com.azure.resourcemanager:azure-resourcemanager-azurestackhci-vm;1.0.0-beta.1;1. com.azure.resourcemanager:azure-resourcemanager-workloadorchestration;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-disconnectedoperations;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-compute-recommender;1.0.0-beta.1;1.0.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-computelimit;1.0.0-beta.1;1.0.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-computelimit;1.0.0-beta.1;1.0.0-beta.2 com.azure.tools:azure-sdk-archetype;1.0.0;1.2.0-beta.1 com.azure.tools:azure-sdk-build-tool;1.0.0;1.1.0-beta.1 com.azure.v2:azure-client-sdk-parent;2.0.0-beta.2;2.0.0-beta.2 diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md b/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md index b2ca1a2b2f77..3dc86eb03faf 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md +++ b/sdk/computelimit/azure-resourcemanager-computelimit/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.0.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.0.0-beta.1 (2025-11-12) - Azure Resource Manager ComputeLimit client library for Java. This package contains Microsoft Azure SDK for ComputeLimit Management SDK. Microsoft Azure Compute Limit Resource Provider. Package api-version 2025-08-15. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/computelimit/azure-resourcemanager-computelimit/pom.xml b/sdk/computelimit/azure-resourcemanager-computelimit/pom.xml index e67eb68c0570..4f756900b0e9 100644 --- a/sdk/computelimit/azure-resourcemanager-computelimit/pom.xml +++ b/sdk/computelimit/azure-resourcemanager-computelimit/pom.xml @@ -14,7 +14,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-computelimit</artifactId> - <version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-computelimit;current} --> + <version>1.0.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-computelimit;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for ComputeLimit Management</name> From 90a04e734cdb579166a9af9865c3a65ca138a134 Mon Sep 17 00:00:00 2001 From: Fabian Meiswinkel <fabianm@microsoft.com> Date: Mon, 24 Nov 2025 23:23:18 +0100 Subject: [PATCH 18/26] Enables EndpointValidation (#47111) * Enables EndpointValidation * Update Configs.java * Fixing test failures * Update TestSuiteBase.java * Create InvalidHostnameTest.java * Update InvalidHostnameTest.java * Updating changelog * Updated changelogs * Adding tests for direct mode * Fixing test flakiness due to Client leak * Fixed changelog * Iterating on test fixes * Adding more memory related logs * Iterating on test fixes * Revert unnecessary changes * Update TestSuiteBase.java * Update TestSuiteBase.java * Update TestSuiteBase.java * Update log4j2-test.properties * Update RxDocumentClientImpl.java * Update InvalidHostnameTest.java * Update CosmosDiagnosticsTest.java --- .../azure-cosmos-encryption/CHANGELOG.md | 1 + .../azure-cosmos-kafka-connect/CHANGELOG.md | 1 + .../azure-cosmos-spark_3-3_2-12/CHANGELOG.md | 1 + .../azure-cosmos-spark_3-4_2-12/CHANGELOG.md | 1 + .../azure-cosmos-spark_3-5_2-12/CHANGELOG.md | 1 + .../azure/cosmos/CosmosDiagnosticsTest.java | 22 +- .../com/azure/cosmos/InvalidHostnameTest.java | 275 ++++++++++++++++++ .../RntbdTransportClientTest.java | 5 + sdk/cosmos/azure-cosmos/CHANGELOG.md | 1 + .../azure/cosmos/implementation/Configs.java | 51 ++++ .../SharedTransportClient.java | 2 +- .../directconnectivity/TransportClient.java | 2 +- .../rntbd/RntbdClientChannelHandler.java | 14 +- .../rntbd/RntbdClientChannelPool.java | 8 +- .../rntbd/RntbdEndpoint.java | 2 + .../rntbd/RntbdServiceEndpoint.java | 5 + 16 files changed, 383 insertions(+), 9 deletions(-) create mode 100644 sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/InvalidHostnameTest.java diff --git a/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md b/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md index 5917cc663840..a7cc8f227e3b 100644 --- a/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md @@ -9,6 +9,7 @@ #### Bugs Fixed #### Other Changes +* Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) ### 2.24.0 (2025-10-21) #### Other Changes diff --git a/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md b/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md index a24e5d7790aa..0fec6fe0780b 100644 --- a/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md @@ -9,6 +9,7 @@ #### Bugs Fixed #### Other Changes +* Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) ### 2.6.1 (2025-11-18) diff --git a/sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md b/sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md index 7e38c12f591c..6191c9707903 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md @@ -9,6 +9,7 @@ #### Bugs Fixed #### Other Changes +* Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) ### 4.41.0 (2025-10-21) diff --git a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md index f9f00bf3c533..d685256cc544 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-spark_3-4_2-12/CHANGELOG.md @@ -9,6 +9,7 @@ #### Bugs Fixed #### Other Changes +* Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) ### 4.41.0 (2025-10-21) diff --git a/sdk/cosmos/azure-cosmos-spark_3-5_2-12/CHANGELOG.md b/sdk/cosmos/azure-cosmos-spark_3-5_2-12/CHANGELOG.md index 94c2ec2d138d..aa37319a326e 100644 --- a/sdk/cosmos/azure-cosmos-spark_3-5_2-12/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos-spark_3-5_2-12/CHANGELOG.md @@ -9,6 +9,7 @@ #### Bugs Fixed #### Other Changes +* Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) ### 4.41.0 (2025-10-21) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosDiagnosticsTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosDiagnosticsTest.java index ab5d26f0d4c4..efb25bdfd288 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosDiagnosticsTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosDiagnosticsTest.java @@ -569,8 +569,16 @@ public void databaseAccountToClients() { String diagnostics = createResponse.getDiagnostics().toString(); // assert diagnostics shows the correct format for tracking client instances - assertThat(diagnostics).contains(String.format("\"clientEndpoints\"" + - ":{\"%s\"", TestConfigurations.HOST)); + String prefix = "\"clientEndpoints\":{"; + int startIndex = diagnostics.indexOf(prefix); + assertThat(startIndex).isGreaterThanOrEqualTo(0); + startIndex += prefix.length(); + int endIndex = diagnostics.indexOf("}", startIndex); + assertThat(endIndex).isGreaterThan(startIndex); + int matchingIndex = diagnostics.indexOf(TestConfigurations.HOST, startIndex); + assertThat(matchingIndex).isGreaterThanOrEqualTo(startIndex); + assertThat(matchingIndex).isLessThanOrEqualTo(endIndex); + // track number of clients currently mapped to account int clientsIndex = diagnostics.indexOf("\"clientEndpoints\":"); // we do end at +120 to ensure we grab the bracket even if the account is very long or if @@ -592,8 +600,14 @@ public void databaseAccountToClients() { createResponse = cosmosContainer.createItem(internalObjectNode); diagnostics = createResponse.getDiagnostics().toString(); // assert diagnostics shows the correct format for tracking client instances - assertThat(diagnostics).contains(String.format("\"clientEndpoints\"" + - ":{\"%s\"", TestConfigurations.HOST)); + startIndex = diagnostics.indexOf(prefix); + assertThat(startIndex).isGreaterThanOrEqualTo(0); + startIndex += prefix.length(); + endIndex = diagnostics.indexOf("}", startIndex); + assertThat(endIndex).isGreaterThan(startIndex); + matchingIndex = diagnostics.indexOf(TestConfigurations.HOST, startIndex); + assertThat(matchingIndex).isGreaterThanOrEqualTo(startIndex); + assertThat(matchingIndex).isLessThanOrEqualTo(endIndex); // grab new value and assert one additional client is mapped to the same account used previously clientsIndex = diagnostics.indexOf("\"clientEndpoints\":"); substrings = diagnostics.substring(clientsIndex, clientsIndex + 120) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/InvalidHostnameTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/InvalidHostnameTest.java new file mode 100644 index 000000000000..7420eab8d9f6 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/InvalidHostnameTest.java @@ -0,0 +1,275 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + * + */ +package com.azure.cosmos; + +import com.azure.cosmos.implementation.Configs; +import com.azure.cosmos.implementation.GlobalEndpointManager; +import com.azure.cosmos.implementation.GoneException; +import com.azure.cosmos.implementation.HttpConstants; +import com.azure.cosmos.implementation.InternalServerErrorException; +import com.azure.cosmos.implementation.RxDocumentServiceRequest; +import com.azure.cosmos.implementation.Utils; +import com.azure.cosmos.implementation.directconnectivity.ReflectionUtils; +import com.azure.cosmos.implementation.directconnectivity.StoreResponse; +import com.azure.cosmos.implementation.directconnectivity.TransportClient; +import com.azure.cosmos.implementation.directconnectivity.Uri; +import com.azure.cosmos.implementation.directconnectivity.rntbd.ProactiveOpenConnectionsProcessor; +import com.azure.cosmos.implementation.faultinjection.IFaultInjectorProvider; +import com.azure.cosmos.models.CosmosContainerIdentity; +import com.azure.cosmos.models.ThroughputProperties; +import com.azure.cosmos.rx.TestSuiteBase; +import com.fasterxml.jackson.databind.node.ObjectNode; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufAllocator; +import org.testng.SkipException; +import org.testng.annotations.Factory; +import org.testng.annotations.Test; +import reactor.core.publisher.Mono; + +import javax.net.ssl.SSLHandshakeException; +import java.net.InetAddress; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.UnknownHostException; +import java.util.List; +import java.util.UUID; + +import static org.assertj.core.api.Assertions.fail; +import static org.assertj.core.api.Assertions.assertThat; + +public class InvalidHostnameTest extends TestSuiteBase { + @Factory(dataProvider = "clientBuildersWithSessionConsistency") + public InvalidHostnameTest(CosmosClientBuilder clientBuilder) { + super(clientBuilder); + } + + @Test(groups = { "fast", "fi-multi-master", "multi-region" }, timeOut = TIMEOUT) + public void gatewayConnectionFailsWhenHostnameIsInvalid() throws Exception { + gatewayConnectionFailsWhenHostnameIsInvalidCore(null); + gatewayConnectionFailsWhenHostnameIsInvalidCore(false); + } + + @Test(groups = { "fast", "fi-multi-master", "multi-region" }, timeOut = TIMEOUT) + public void gatewayConnectionFailsWhenHostnameIsInvalidEvenWhenHostnameValidationIsDisabled() throws Exception { + gatewayConnectionFailsWhenHostnameIsInvalidCore(true); + } + + @Test(groups = { "fast", "fi-multi-master", "multi-region" }, timeOut = TIMEOUT) + public void directConnectionSucceedsWhenHostnameIsInvalidAndHostnameValidationIsDisabled() throws Exception { + directConnectionTestCore(true); + } + + @Test(groups = { "fast", "fi-multi-master", "multi-region" }, timeOut = TIMEOUT) + public void directConnectionFailsWhenHostnameIsInvalidAndHostnameValidationIsNotSet() throws Exception { + directConnectionFailsWhenHostnameIsInvalidCore(null); + } + + @Test(groups = { "fast", "fi-multi-master", "multi-region" }, timeOut = TIMEOUT) + public void directConnectionFailsWhenHostnameIsInvalidAndHostnameValidationIsEnabled() throws Exception { + directConnectionFailsWhenHostnameIsInvalidCore(false); + } + + private void directConnectionFailsWhenHostnameIsInvalidCore(Boolean disableHostnameValidation) throws Exception { + try { + directConnectionTestCore(disableHostnameValidation); + fail("The test should have failed with invalid hostname when hostname " + + "validation is enabled or not set."); + } catch (InternalServerErrorException cosmosException) { + assertThat(cosmosException.getStatusCode()).isEqualTo(500); + assertThat(cosmosException.getSubStatusCode()) + .isEqualTo(HttpConstants.SubStatusCodes.INVALID_RESULT); + assertThat(cosmosException).hasCauseInstanceOf(RuntimeException.class); + RuntimeException runtimeException = (RuntimeException)cosmosException.getCause(); + assertThat(runtimeException).hasCauseInstanceOf(GoneException.class); + GoneException goneException = (GoneException)runtimeException.getCause(); + assertThat(goneException).hasCauseInstanceOf(SSLHandshakeException.class); + logger.info("Expected exception was thrown", cosmosException); + } + } + + private void directConnectionTestCore(Boolean disableHostnameValidation) throws Exception { + CosmosDatabase createdDatabase = null; + CosmosClient client = null; + CosmosClientBuilder builder = getClientBuilder(); + + if (builder.getEndpoint().contains("localhost")) { + throw new SkipException("This test is irrelevant for emulator"); + } + + if (builder.getConnectionPolicy().getConnectionMode() != ConnectionMode.DIRECT) { + throw new SkipException("This test is only relevant for direct mode"); + } + + try { + if (disableHostnameValidation != null) { + System.setProperty("COSMOS.HOSTNAME_VALIDATION_DISABLED", disableHostnameValidation.toString()); + } else { + System.clearProperty("COSMOS.HOSTNAME_VALIDATION_DISABLED"); + } + Configs.resetIsHostnameValidationDisabledForTests(); + + client = builder.buildClient(); + + TransportClient originalTransportClient = ReflectionUtils.getTransportClient(client); + + ReflectionUtils.setTransportClient( + client, + new HostnameInvalidationTransportClient(originalTransportClient)); + + String dbName = CosmosDatabaseForTest.generateId(); + createdDatabase = createSyncDatabase(client, dbName); + createdDatabase.createContainer( + "TestContainer", + "/id", + ThroughputProperties.createManualThroughput(400)); + CosmosContainer createdContainer = client.getDatabase(dbName).getContainer("TestContainer"); + ObjectNode newObject = Utils.getSimpleObjectMapper().createObjectNode(); + newObject.put("id", UUID.randomUUID().toString()); + createdContainer.upsertItem(newObject); + } + finally { + if (createdDatabase != null) { + safeDeleteSyncDatabase(createdDatabase); + } + + if (client != null) { + safeCloseSyncClient(client); + } + + System.clearProperty("COSMOS.HOSTNAME_VALIDATION_DISABLED"); + Configs.resetIsHostnameValidationDisabledForTests(); + } + } + + private void gatewayConnectionFailsWhenHostnameIsInvalidCore(Boolean disableHostnameValidation) throws Exception { + CosmosDatabase createdDatabase = null; + CosmosClient client = null; + CosmosClientBuilder builder = getClientBuilder(); + + if (builder.getEndpoint().contains("localhost")) { + throw new SkipException("This test is irrelevant for emulator"); + } + + try { + if (disableHostnameValidation != null) { + System.setProperty("COSMOS.HOSTNAME_VALIDATION_DISABLED", disableHostnameValidation.toString()); + } else { + System.clearProperty("COSMOS.HOSTNAME_VALIDATION_DISABLED"); + } + Configs.resetIsHostnameValidationDisabledForTests(); + + URI uri = URI.create(builder.getEndpoint()); + InetAddress address = InetAddress.getByName(uri.getHost()); + URI uriWithInvalidHostname = new URI( + uri.getScheme(), + uri.getUserInfo(), + address.getHostAddress(), // Use the DNS-resolved IP-address as new hostname - this is invalid form TLS cert perspective + uri.getPort(), + uri.getPath(), + uri.getQuery(), + uri.getFragment() + ); + builder.endpoint(uriWithInvalidHostname.toString()); + client = builder.buildClient(); + String dbName = CosmosDatabaseForTest.generateId(); + createdDatabase = createSyncDatabase(client, dbName); + fail("The attempt to connect to the Gateway endpoint to create a database " + + "should have failed due to invalid hostname."); + } catch (RuntimeException e) { + assertThat(e).hasCauseInstanceOf(CosmosException.class); + CosmosException cosmosException = (CosmosException)e.getCause(); + assertThat(cosmosException.getStatusCode()).isEqualTo(503); + assertThat(cosmosException.getSubStatusCode()) + .isEqualTo(HttpConstants.SubStatusCodes.GATEWAY_ENDPOINT_UNAVAILABLE); + assertThat(cosmosException).hasCauseInstanceOf(SSLHandshakeException.class); + logger.info("Expected exception was thrown", cosmosException); + } + finally { + if (createdDatabase != null) { + safeDeleteSyncDatabase(createdDatabase); + } + + if (client != null) { + safeCloseSyncClient(client); + } + + System.clearProperty("COSMOS.HOSTNAME_VALIDATION_DISABLED"); + Configs.resetIsHostnameValidationDisabledForTests(); + } + } + + private static class HostnameInvalidationTransportClient extends TransportClient { + private final TransportClient inner; + + public HostnameInvalidationTransportClient(TransportClient transportClient) { + this.inner = transportClient; + } + + @Override + public void close() throws Exception { + this.inner.close(); + } + + @Override + public Mono<StoreResponse> invokeStoreAsync(Uri physicalAddress, RxDocumentServiceRequest request) { + URI uri = physicalAddress.getURI(); + InetAddress address = null; + try { + address = InetAddress.getByName(uri.getHost()); + } catch (UnknownHostException e) { + throw new RuntimeException(e); + } + String uriWithInvalidHostname; + try { + uriWithInvalidHostname = new URI( + uri.getScheme(), + uri.getUserInfo(), + address.getHostAddress(), // Use the DNS-resolved IP-address as new hostname - this is invalid form TLS cert perspective + uri.getPort(), + uri.getPath(), + uri.getQuery(), + uri.getFragment() + ).toString(); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + + Uri ipBasedAddress = Uri.create(uriWithInvalidHostname); + + logger.info("Changed physical address '{}' into '{}'.", physicalAddress, ipBasedAddress); + + return this + .inner + .invokeStoreAsync(ipBasedAddress, request) + .onErrorMap(t -> new RuntimeException(t)); + } + + @Override + public void configureFaultInjectorProvider(IFaultInjectorProvider injectorProvider) { + this.inner.configureFaultInjectorProvider(injectorProvider); + } + + @Override + public GlobalEndpointManager getGlobalEndpointManager() { + return this.inner.getGlobalEndpointManager(); + } + + @Override + public ProactiveOpenConnectionsProcessor getProactiveOpenConnectionsProcessor() { + return this.inner.getProactiveOpenConnectionsProcessor(); + } + + @Override + public void recordOpenConnectionsAndInitCachesCompleted(List<CosmosContainerIdentity> cosmosContainerIdentities) { + this.inner.recordOpenConnectionsAndInitCachesCompleted(cosmosContainerIdentities); + } + + @Override + public void recordOpenConnectionsAndInitCachesStarted(List<CosmosContainerIdentity> cosmosContainerIdentities) { + this.inner.recordOpenConnectionsAndInitCachesStarted(cosmosContainerIdentities); + } + } +} diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClientTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClientTest.java index 07af54b8c73c..b1c93b2ee7a3 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClientTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClientTest.java @@ -1138,6 +1138,11 @@ public URI serviceEndpoint() { return null; } + @Override + public URI serverKeyUsedAsActualRemoteAddress() { + return this.remoteURI; + } + @Override public void injectConnectionErrors(String ruleId, double threshold, Class<?> eventType) { throw new NotImplementedException("injectConnectionErrors is not supported in FakeEndpoint"); diff --git a/sdk/cosmos/azure-cosmos/CHANGELOG.md b/sdk/cosmos/azure-cosmos/CHANGELOG.md index 5e2a89e6a2bb..b9a62661e695 100644 --- a/sdk/cosmos/azure-cosmos/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos/CHANGELOG.md @@ -10,6 +10,7 @@ * Fixed a possible memory leak (Netty buffers) in Gateway mode caused by a race condition when timeouts are happening. - [47228](https://github.com/Azure/azure-sdk-for-java/pull/47228) and [47251](https://github.com/Azure/azure-sdk-for-java/pull/47251) #### Other Changes +* Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) * Changed to use incremental change feed to get partition key ranges. - [46810](https://github.com/Azure/azure-sdk-for-java/pull/46810) ### 4.75.0 (2025-10-21) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java index b656b84e66db..18cca304ecd7 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/Configs.java @@ -19,6 +19,8 @@ import java.time.Duration; import java.util.EnumSet; import java.util.Locale; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; import static com.azure.cosmos.implementation.guava25.base.MoreObjects.firstNonNull; import static com.azure.cosmos.implementation.guava25.base.Strings.emptyToNull; @@ -328,6 +330,17 @@ public class Configs { private static final String HTTP_CONNECTION_WITHOUT_TLS_ALLOWED = "COSMOS.HTTP_CONNECTION_WITHOUT_TLS_ALLOWED"; private static final String HTTP_CONNECTION_WITHOUT_TLS_ALLOWED_VARIABLE = "COSMOS_HTTP_CONNECTION_WITHOUT_TLS_ALLOWED"; + // Config to indicate whether hostname validation for TLS connections to the Cosmos DB endpoints + // (Gateway and Backend) should be disabled + // By default Netty 4.1 is not enabling hostname validation - this is not ideal form security perspective + // because it makes man-in-the-middle attacks easier. It only impacts direct mode connections because + // connections to the Gateway always use ReactorNetty (which enables hostname validation). So all HTTP connections + // are fine - RNTBD is what is in scope for the configs below. + // By default, the Cosmos DB SDK enables hostname validation for RNTBD as well. + private static final boolean DEFAULT_HOSTNAME_VALIDATION_DISABLED = false; + private static final String HOSTNAME_VALIDATION_DISABLED = "COSMOS.HOSTNAME_VALIDATION_DISABLED"; + private static final String HOSTNAME_VALIDATION_DISABLED_VARIABLE = "COSMOS_HOSTNAME_VALIDATION_DISABLED"; + // Config to indicate whether disable server certificate validation for emulator // Please note that this config should only during development or test, please do not use in prod env private static final boolean DEFAULT_EMULATOR_SERVER_CERTIFICATE_VALIDATION_DISABLED = false; @@ -378,6 +391,9 @@ public class Configs { private static final boolean DEFAULT_CLIENT_LEAK_DETECTION_ENABLED = false; private static final String CLIENT_LEAK_DETECTION_ENABLED = "COSMOS.CLIENT_LEAK_DETECTION_ENABLED"; + private static final Object lockObject = new Object(); + private static Boolean cachedIsHostnameValidationDisabled = null; + public static int getCPUCnt() { return CPU_CNT; } @@ -391,6 +407,8 @@ private SslContext sslContextInit(boolean serverCertVerificationDisabled, boolea if (serverCertVerificationDisabled) { sslContextBuilder.trustManager(InsecureTrustManagerFactory.INSTANCE); // disable cert verification + } else if (!isHostnameValidationDisabled()) { + sslContextBuilder.endpointIdentificationAlgorithm("HTTPS"); } if (http2Enabled) { @@ -405,6 +423,7 @@ private SslContext sslContextInit(boolean serverCertVerificationDisabled, boolea ) ); } + return sslContextBuilder.build(); } catch (SSLException sslException) { logger.error("Fatal error cannot instantiate ssl context due to {}", sslException.getMessage(), sslException); @@ -1193,6 +1212,38 @@ public static boolean isEmulatorServerCertValidationDisabled() { return Boolean.parseBoolean(certVerificationDisabledConfig); } + private static boolean isHostnameValidationDisabledCore() { + String hostNameVerificationDisabledConfig = System.getProperty( + HOSTNAME_VALIDATION_DISABLED, + firstNonNull( + emptyToNull(System.getenv().get(HOSTNAME_VALIDATION_DISABLED_VARIABLE)), + String.valueOf(DEFAULT_HOSTNAME_VALIDATION_DISABLED))); + + return Boolean.parseBoolean(hostNameVerificationDisabledConfig); + } + + public static void resetIsHostnameValidationDisabledForTests() { + synchronized (lockObject) { + cachedIsHostnameValidationDisabled = null; + } + } + + private static boolean isHostnameValidationDisabled() { + Boolean isHostnameValidationSnapshot = cachedIsHostnameValidationDisabled; + if (isHostnameValidationSnapshot != null) { + return isHostnameValidationSnapshot; + } + + synchronized (lockObject) { + isHostnameValidationSnapshot = cachedIsHostnameValidationDisabled; + if (isHostnameValidationSnapshot != null) { + return isHostnameValidationSnapshot; + } + + return cachedIsHostnameValidationDisabled = isHostnameValidationDisabledCore(); + } + } + public static String getEmulatorHost() { return System.getProperty( EMULATOR_HOST, diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/SharedTransportClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/SharedTransportClient.java index 2bec51b95c90..d97b961238a8 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/SharedTransportClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/SharedTransportClient.java @@ -96,7 +96,7 @@ private SharedTransportClient( } @Override - protected Mono<StoreResponse> invokeStoreAsync(Uri physicalAddress, RxDocumentServiceRequest request) { + public Mono<StoreResponse> invokeStoreAsync(Uri physicalAddress, RxDocumentServiceRequest request) { return transportClient.invokeStoreAsync(physicalAddress, request); } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/TransportClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/TransportClient.java index 2498e5807a4a..4c99cbed55d2 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/TransportClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/TransportClient.java @@ -65,7 +65,7 @@ public Mono<StoreResponse> invokeResourceOperationInternalAsync(Uri physicalAddr return this.invokeStoreInternalAsync(physicalAddress, request); } - protected abstract Mono<StoreResponse> invokeStoreAsync( + public abstract Mono<StoreResponse> invokeStoreAsync( Uri physicalAddress, RxDocumentServiceRequest request); diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelHandler.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelHandler.java index 716b1d7ede98..cd85424105f6 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelHandler.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelHandler.java @@ -18,6 +18,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.net.URI; import java.util.concurrent.TimeUnit; import static com.azure.cosmos.implementation.guava25.base.Preconditions.checkNotNull; @@ -30,19 +31,23 @@ public class RntbdClientChannelHandler extends ChannelInitializer<Channel> imple private final Config config; private final RntbdConnectionStateListener connectionStateListener; private final RntbdServerErrorInjector serverErrorInjector; + private final URI serviceKeyUsedAsActualRemoteAddress; RntbdClientChannelHandler( final Config config, final ChannelHealthChecker healthChecker, final RntbdConnectionStateListener connectionStateListener, - final RntbdServerErrorInjector serverErrorInjector) { + final RntbdServerErrorInjector serverErrorInjector, + final URI serviceKeyUsedAsActualRemoteAddress) { checkNotNull(healthChecker, "expected non-null healthChecker"); checkNotNull(config, "expected non-null config"); + checkNotNull(serviceKeyUsedAsActualRemoteAddress, "serviceKeyUsedAsActualRemoteAddress"); this.healthChecker = healthChecker; this.config = config; this.connectionStateListener = connectionStateListener; this.serverErrorInjector = serverErrorInjector; + this.serviceKeyUsedAsActualRemoteAddress = serviceKeyUsedAsActualRemoteAddress; } /** @@ -127,7 +132,12 @@ protected void initChannel(final Channel channel) { } // Initialize sslHandler with jdkCompatibilityMode = true for openssl context. - SslHandler sslHandler = new SslHandler(this.config.sslContext().newEngine(channel.alloc())); + // Use the actual host-name and port to allow SNI and hostname validation being enabled. + SslHandler sslHandler = new SslHandler( + this.config.sslContext().newEngine( + channel.alloc(), + this.serviceKeyUsedAsActualRemoteAddress.getHost(), + this.serviceKeyUsedAsActualRemoteAddress.getPort())); sslHandler.setHandshakeTimeout(config.sslHandshakeTimeoutInMillis(), TimeUnit.MILLISECONDS); pipeline.addFirst(SslHandler.class.toString(), sslHandler); diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelPool.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelPool.java index e3babbd65b07..a302cdd253b4 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelPool.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelPool.java @@ -219,7 +219,13 @@ public final class RntbdClientChannelPool implements ChannelPool { checkNotNull(durableEndpointMetrics, "expected non-null durableEndpointMetrics"); RntbdClientChannelHealthChecker healthChecker = new RntbdClientChannelHealthChecker(config, clientTelemetry); - this.poolHandler = new RntbdClientChannelHandler(config, healthChecker, connectionStateListener, serverErrorInjector); + this.poolHandler = new RntbdClientChannelHandler( + config, + healthChecker, + connectionStateListener, + serverErrorInjector, + endpoint.serverKeyUsedAsActualRemoteAddress()); + this.executor = bootstrap.config().group().next(); this.healthChecker = healthChecker; this.serverErrorInjector = serverErrorInjector; diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdEndpoint.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdEndpoint.java index 15a1a8e374df..442d5a63f583 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdEndpoint.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdEndpoint.java @@ -81,6 +81,8 @@ public interface RntbdEndpoint extends AutoCloseable { URI serviceEndpoint(); + URI serverKeyUsedAsActualRemoteAddress(); + void injectConnectionErrors( String faultInjectionRuleId, double threshold, diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java index f0120e54cf30..feb8cdb32a7e 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdServiceEndpoint.java @@ -327,6 +327,11 @@ public URI serviceEndpoint() { return this.serviceEndpoint; } + @Override + public URI serverKeyUsedAsActualRemoteAddress() { + return this.serverKey; + } + @Override public void injectConnectionErrors( String faultInjectionRuleId, From c54a779377f9a1856872fb51ad528497b51b3b9b Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 24 Nov 2025 15:08:21 -0800 Subject: [PATCH 19/26] Configurations: 'specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/ServiceFabricManagedClusters/tspconfig.yaml', API Version: 2025-10-01-preview, SDK Release Type: beta, and CommitSHA: '833aeb9992144f6e04d99de1316a7f37a001ee94' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5554955 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. (#47219) --- .../CHANGELOG.md | 67 +- .../README.md | 4 +- .../SAMPLE.md | 318 ++++++-- .../pom.xml | 2 +- .../fluent/ApplicationsClient.java | 248 +++++- .../fluent/ManagedClustersClient.java | 39 +- .../fluent/NodeTypesClient.java | 8 +- .../fluent/ServicesClient.java | 69 ++ .../ApplicationResourceImpl.java | 42 +- .../ApplicationsClientImpl.java | 767 +++++++++++++++++- .../implementation/ApplicationsImpl.java | 34 + .../implementation/ManagedClusterImpl.java | 6 +- .../ManagedClustersClientImpl.java | 119 ++- .../implementation/NodeTypesClientImpl.java | 18 +- ...ceFabricManagedClustersMgmtClientImpl.java | 2 +- .../implementation/ServiceResourceImpl.java | 11 + .../implementation/ServicesClientImpl.java | 216 +++++ .../implementation/ServicesImpl.java | 12 + .../models/ApplicationFetchHealthRequest.java | 221 +++++ .../models/ApplicationResource.java | 82 +- .../models/ApplicationUpdateParameters.java | 29 + ...ApplicationUpdateParametersProperties.java | 92 +++ .../models/Applications.java | 91 +++ .../models/HealthFilter.java | 71 ++ .../RestartDeployedCodePackageRequest.java | 227 ++++++ .../models/RestartKind.java | 46 ++ .../models/RestartReplicaRequest.java | 208 +++++ .../models/RollingUpgradeMode.java | 3 +- .../RuntimeApplicationHealthPolicy.java | 204 +++++ .../models/RuntimeFailureAction.java | 53 ++ .../models/RuntimeRollingUpgradeMode.java | 57 ++ ...eRollingUpgradeUpdateMonitoringPolicy.java | 424 ++++++++++ .../RuntimeServiceTypeHealthPolicy.java | 217 +++++ ...imeUpdateApplicationUpgradeParameters.java | 181 +++++ .../models/RuntimeUpgradeKind.java | 46 ++ .../models/ServiceResource.java | 21 + .../models/Services.java | 31 + ...ricmanagedclusters_apiview_properties.json | 25 +- ...servicefabricmanagedclusters_metadata.json | 2 +- ...tionTypeVersionsCreateOrUpdateSamples.java | 2 +- .../ApplicationTypeVersionsDeleteSamples.java | 2 +- .../ApplicationTypeVersionsGetSamples.java | 2 +- ...eVersionsListByApplicationTypeSamples.java | 2 +- .../ApplicationTypeVersionsUpdateSamples.java | 2 +- ...ApplicationTypesCreateOrUpdateSamples.java | 2 +- .../ApplicationTypesDeleteSamples.java | 2 +- .../generated/ApplicationTypesGetSamples.java | 2 +- .../ApplicationTypesListSamples.java | 2 +- .../ApplicationTypesUpdateSamples.java | 2 +- .../ApplicationsCreateOrUpdateSamples.java | 4 +- .../generated/ApplicationsDeleteSamples.java | 2 +- .../ApplicationsFetchHealthSamples.java | 33 + .../generated/ApplicationsGetSamples.java | 2 +- .../generated/ApplicationsListSamples.java | 2 +- .../ApplicationsReadUpgradeSamples.java | 2 +- ...ionsRestartDeployedCodePackageSamples.java | 32 + .../ApplicationsResumeUpgradeSamples.java | 2 +- .../ApplicationsStartRollbackSamples.java | 2 +- .../generated/ApplicationsUpdateSamples.java | 9 +- .../ApplicationsUpdateUpgradeSamples.java | 68 ++ ...agedApplyMaintenanceWindowPostSamples.java | 2 +- ...ManagedAzResiliencyStatusesGetSamples.java | 2 +- ...ClusterVersionGetByEnvironmentSamples.java | 2 +- .../ManagedClusterVersionGetSamples.java | 2 +- ...lusterVersionListByEnvironmentSamples.java | 2 +- .../ManagedClusterVersionListSamples.java | 2 +- .../ManagedClustersCreateOrUpdateSamples.java | 4 +- .../ManagedClustersDeleteSamples.java | 2 +- ...agedClustersGetByResourceGroupSamples.java | 2 +- ...agedClustersGetFaultSimulationSamples.java | 2 +- ...gedClustersListByResourceGroupSamples.java | 2 +- ...gedClustersListFaultSimulationSamples.java | 2 +- .../generated/ManagedClustersListSamples.java | 2 +- ...edClustersStartFaultSimulationSamples.java | 2 +- ...gedClustersStopFaultSimulationSamples.java | 2 +- .../ManagedClustersUpdateSamples.java | 2 +- ...edMaintenanceWindowStatusesGetSamples.java | 2 +- .../ManagedUnsupportedVMSizesGetSamples.java | 2 +- .../ManagedUnsupportedVMSizesListSamples.java | 2 +- .../generated/NodeTypeSkusListSamples.java | 2 +- .../NodeTypesCreateOrUpdateSamples.java | 16 +- .../generated/NodeTypesDeallocateSamples.java | 2 +- .../generated/NodeTypesDeleteNodeSamples.java | 2 +- .../generated/NodeTypesDeleteSamples.java | 2 +- .../NodeTypesGetFaultSimulationSamples.java | 2 +- .../generated/NodeTypesGetSamples.java | 2 +- ...NodeTypesListByManagedClustersSamples.java | 2 +- .../NodeTypesListFaultSimulationSamples.java | 2 +- .../generated/NodeTypesRedeploySamples.java | 4 +- .../generated/NodeTypesReimageSamples.java | 4 +- .../generated/NodeTypesRestartSamples.java | 2 +- .../NodeTypesStartFaultSimulationSamples.java | 2 +- .../generated/NodeTypesStartSamples.java | 2 +- .../NodeTypesStopFaultSimulationSamples.java | 2 +- .../generated/NodeTypesUpdateSamples.java | 4 +- .../generated/OperationsListSamples.java | 2 +- .../ServicesCreateOrUpdateSamples.java | 4 +- .../generated/ServicesDeleteSamples.java | 2 +- .../generated/ServicesGetSamples.java | 2 +- .../ServicesListByApplicationsSamples.java | 2 +- .../ServicesRestartReplicaSamples.java | 34 + .../generated/ServicesUpdateSamples.java | 2 +- ...talNamedPartitionScalingMechanisTests.java | 20 +- ...nalNetworkInterfaceConfigurationTests.java | 135 +-- .../ApplicationFetchHealthRequestTests.java | 40 + .../ApplicationResourceListTests.java | 58 +- .../ApplicationTypeResourceInnerTests.java | 16 +- .../ApplicationTypeResourceListTests.java | 8 +- ...pplicationTypeResourcePropertiesTests.java | 2 +- .../ApplicationTypeUpdateParametersTests.java | 10 +- ...licationTypeVersionResourceInnerTests.java | 21 +- ...plicationTypeVersionResourceListTests.java | 10 +- ...ionTypeVersionResourcePropertiesTests.java | 8 +- ...ationTypeVersionUpdateParametersTests.java | 8 +- ...icationTypeVersionsCleanupPolicyTests.java | 8 +- ...onTypeVersionsCreateOrUpdateMockTests.java | 18 +- ...nTypeVersionsGetWithResponseMockTests.java | 10 +- ...rsionsListByApplicationTypesMockTests.java | 10 +- ...esCreateOrUpdateWithResponseMockTests.java | 14 +- ...licationTypesGetWithResponseMockTests.java | 8 +- .../ApplicationTypesListMockTests.java | 8 +- ...cationUpdateParametersPropertiesTests.java | 40 + .../ApplicationUpdateParametersTests.java | 12 +- .../ApplicationsCreateOrUpdateMockTests.java | 125 ++- .../ApplicationsGetWithResponseMockTests.java | 57 +- .../generated/ApplicationsListMockTests.java | 54 +- ...eragePartitionLoadScalingTriggerTests.java | 26 +- ...AverageServiceLoadScalingTriggerTests.java | 32 +- .../generated/AzureActiveDirectoryTests.java | 23 +- .../generated/ClientCertificateTests.java | 23 +- .../generated/ClusterHealthPolicyTests.java | 14 +- .../ClusterMonitoringPolicyTests.java | 32 +- .../ClusterUpgradeDeltaHealthPolicyTests.java | 20 +- .../generated/ClusterUpgradePolicyTests.java | 74 +- .../EndpointRangeDescriptionTests.java | 13 +- .../FaultSimulationConstraintsTests.java | 8 +- .../FaultSimulationContentTests.java | 8 +- .../FaultSimulationContentWrapperTests.java | 14 +- .../FaultSimulationDetailsTests.java | 16 +- .../FaultSimulationIdContentTests.java | 8 +- .../generated/FaultSimulationInnerTests.java | 25 +- .../FaultSimulationListResultTests.java | 30 +- .../generated/FrontendConfigurationTests.java | 26 +- ...tionPublicIpAddressConfigurationTests.java | 27 +- .../generated/IpConfigurationTests.java | 67 +- .../generated/IpTagTests.java | 12 +- .../generated/LoadBalancingRuleTests.java | 44 +- ...enanceWindowsPostWithResponsMockTests.java | 3 +- .../ManagedAzResiliencyStatusInnerTests.java | 2 +- ...iencyStatusesGetWithResponseMockTests.java | 4 +- .../ManagedClusterUpdateParametersTests.java | 11 +- ...tFaultSimulationWithResponseMockTests.java | 30 +- ...dClustersListFaultSimulationMockTests.java | 26 +- ...agedMaintenanceWindowStatusInnerTests.java | 2 +- ...eWindowStatusesGetWithResponMockTests.java | 4 +- ...portedVMSizesGetWithResponseMockTests.java | 5 +- ...anagedUnsupportedVMSizesListMockTests.java | 4 +- .../generated/ManagedVMSizeInnerTests.java | 2 +- .../generated/ManagedVMSizesResultTests.java | 4 +- .../generated/NamedPartitionSchemeTests.java | 13 +- .../generated/NetworkSecurityRuleTests.java | 80 +- .../NodeTypeActionParametersTests.java | 21 +- .../NodeTypeAvailableSkuInnerTests.java | 2 +- .../NodeTypeFaultSimulationTests.java | 8 +- .../generated/NodeTypeListSkuResultTests.java | 4 +- .../generated/NodeTypeNatConfigTests.java | 20 +- .../generated/NodeTypeSkuCapacityTests.java | 2 +- .../generated/NodeTypeSkuTests.java | 20 +- .../generated/NodeTypeSkusListMockTests.java | 4 +- .../generated/NodeTypeSupportedSkuTests.java | 2 +- .../NodeTypeUpdateParametersTests.java | 22 +- ...tFaultSimulationWithResponseMockTests.java | 30 +- ...NodeTypesListFaultSimulationMockTests.java | 28 +- .../generated/OperationsListMockTests.java | 18 +- ...itionInstanceCountScaleMechanismTests.java | 20 +- .../generated/ResourceAzStatusTests.java | 2 +- .../generated/RestartReplicaRequestTests.java | 40 + .../RuntimeApplicationHealthPolicyTests.java | 78 ++ ...sumeApplicationUpgradeParametersTests.java | 11 +- ...ingUpgradeUpdateMonitoringPolicyTests.java | 56 ++ .../RuntimeServiceTypeHealthPolicyTests.java | 33 + ...dateApplicationUpgradeParametersTests.java | 137 ++++ .../generated/ServiceCorrelationTests.java | 17 +- .../generated/ServiceEndpointTests.java | 21 +- .../generated/ServiceLoadMetricTests.java | 32 +- ...vicePlacementInvalidDomainPolicyTests.java | 9 +- ...acementPreferPrimaryDomainPolicyTests.java | 8 +- ...tRequireDomainDistributionPolicyTests.java | 8 +- ...icePlacementRequiredDomainPolicyTests.java | 9 +- .../generated/ServiceResourceInnerTests.java | 98 +-- .../generated/ServiceResourceListTests.java | 28 +- .../ServiceResourcePropertiesBaseTests.java | 84 +- .../ServiceResourcePropertiesTests.java | 96 ++- .../ServiceUpdateParametersTests.java | 9 +- .../ServicesCreateOrUpdateMockTests.java | 75 +- .../ServicesGetWithResponseMockTests.java | 31 +- .../ServicesListByApplicationsMockTests.java | 28 +- .../SettingsParameterDescriptionTests.java | 14 +- .../SettingsSectionDescriptionTests.java | 25 +- .../generated/SkuTests.java | 8 +- .../StatefulServicePropertiesTests.java | 118 +-- .../StatelessServicePropertiesTests.java | 116 +-- .../generated/SubnetTests.java | 26 +- .../VMSSExtensionPropertiesTests.java | 46 +- .../generated/VMSizeTests.java | 2 +- .../generated/VaultCertificateTests.java | 17 +- .../generated/VaultSecretGroupTests.java | 21 +- .../generated/VmApplicationTests.java | 32 +- .../generated/VmManagedIdentityTests.java | 14 +- .../generated/VmssDataDiskTests.java | 26 +- .../generated/VmssExtensionTests.java | 51 +- .../ZoneFaultSimulationContentTests.java | 20 +- .../tsp-location.yaml | 4 +- 213 files changed, 6170 insertions(+), 1544 deletions(-) create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationFetchHealthRequest.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParametersProperties.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/HealthFilter.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartDeployedCodePackageRequest.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartKind.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartReplicaRequest.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeApplicationHealthPolicy.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeFailureAction.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeMode.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeUpdateMonitoringPolicy.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeServiceTypeHealthPolicy.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpdateApplicationUpgradeParameters.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpgradeKind.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsFetchHealthSamples.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsRestartDeployedCodePackageSamples.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateUpgradeSamples.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesRestartReplicaSamples.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationFetchHealthRequestTests.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersPropertiesTests.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RestartReplicaRequestTests.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeApplicationHealthPolicyTests.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeRollingUpgradeUpdateMonitoringPolicyTests.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeServiceTypeHealthPolicyTests.java create mode 100644 sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeUpdateApplicationUpgradeParametersTests.java diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/CHANGELOG.md b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/CHANGELOG.md index cea3c568bb76..6c778eafc2f5 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/CHANGELOG.md +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/CHANGELOG.md @@ -1,14 +1,73 @@ # Release History -## 1.1.0-beta.3 (Unreleased) +## 1.1.0-beta.3 (2025-11-10) + +- Azure Resource Manager Service Fabric Managed Clusters client library for Java. This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. Service Fabric Managed Clusters Management Client. Package api-version 2025-10-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +* `models.RuntimeUpdateApplicationUpgradeParameters` was added -### Bugs Fixed +* `models.RestartKind` was added -### Other Changes +* `models.ApplicationFetchHealthRequest` was added + +* `models.RestartDeployedCodePackageRequest` was added + +* `models.RestartReplicaRequest` was added + +* `models.RuntimeApplicationHealthPolicy` was added + +* `models.RuntimeRollingUpgradeMode` was added + +* `models.RuntimeRollingUpgradeUpdateMonitoringPolicy` was added + +* `models.RuntimeUpgradeKind` was added + +* `models.RuntimeServiceTypeHealthPolicy` was added + +* `models.RuntimeFailureAction` was added + +* `models.ApplicationUpdateParametersProperties` was added + +* `models.HealthFilter` was added + +#### `models.ApplicationResource` was modified + +* `updateUpgrade(models.RuntimeUpdateApplicationUpgradeParameters)` was added +* `restartDeployedCodePackage(models.RestartDeployedCodePackageRequest)` was added +* `fetchHealth(models.ApplicationFetchHealthRequest)` was added +* `updateUpgrade(models.RuntimeUpdateApplicationUpgradeParameters,com.azure.core.util.Context)` was added +* `restartDeployedCodePackage(models.RestartDeployedCodePackageRequest,com.azure.core.util.Context)` was added +* `fetchHealth(models.ApplicationFetchHealthRequest,com.azure.core.util.Context)` was added + +#### `models.ApplicationUpdateParameters` was modified + +* `withProperties(models.ApplicationUpdateParametersProperties)` was added +* `properties()` was added + +#### `models.Services` was modified + +* `restartReplica(java.lang.String,java.lang.String,java.lang.String,java.lang.String,models.RestartReplicaRequest,com.azure.core.util.Context)` was added +* `restartReplica(java.lang.String,java.lang.String,java.lang.String,java.lang.String,models.RestartReplicaRequest)` was added + +#### `models.Applications` was modified + +* `fetchHealth(java.lang.String,java.lang.String,java.lang.String,models.ApplicationFetchHealthRequest)` was added +* `updateUpgrade(java.lang.String,java.lang.String,java.lang.String,models.RuntimeUpdateApplicationUpgradeParameters)` was added +* `updateUpgrade(java.lang.String,java.lang.String,java.lang.String,models.RuntimeUpdateApplicationUpgradeParameters,com.azure.core.util.Context)` was added +* `restartDeployedCodePackage(java.lang.String,java.lang.String,java.lang.String,models.RestartDeployedCodePackageRequest)` was added +* `restartDeployedCodePackage(java.lang.String,java.lang.String,java.lang.String,models.RestartDeployedCodePackageRequest,com.azure.core.util.Context)` was added +* `fetchHealth(java.lang.String,java.lang.String,java.lang.String,models.ApplicationFetchHealthRequest,com.azure.core.util.Context)` was added + +#### `models.ServiceResource` was modified + +* `restartReplica(models.RestartReplicaRequest)` was added +* `restartReplica(models.RestartReplicaRequest,com.azure.core.util.Context)` was added + +#### `models.ApplicationResource$Update` was modified + +* `withProperties(models.ApplicationUpdateParametersProperties)` was added ## 1.1.0-beta.2 (2025-08-11) diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/README.md b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/README.md index 11f309c7c124..ff80581d40a0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/README.md +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Service Fabric Managed Clusters client library for Java. -This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. Service Fabric Managed Clusters Management Client. Package api-version 2025-06-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. Service Fabric Managed Clusters Management Client. Package api-version 2025-10-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-servicefabricmanagedclusters</artifactId> - <version>1.1.0-beta.2</version> + <version>1.1.0-beta.3</version> </dependency> ``` [//]: # ({x-version-update-end}) diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/SAMPLE.md b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/SAMPLE.md index 9b27e8e16f97..00e17a41a359 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/SAMPLE.md +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/SAMPLE.md @@ -21,12 +21,15 @@ - [CreateOrUpdate](#applications_createorupdate) - [Delete](#applications_delete) +- [FetchHealth](#applications_fetchhealth) - [Get](#applications_get) - [List](#applications_list) - [ReadUpgrade](#applications_readupgrade) +- [RestartDeployedCodePackage](#applications_restartdeployedcodepackage) - [ResumeUpgrade](#applications_resumeupgrade) - [StartRollback](#applications_startrollback) - [Update](#applications_update) +- [UpdateUpgrade](#applications_updateupgrade) ## ManagedApplyMaintenanceWindow @@ -97,6 +100,7 @@ - [Delete](#services_delete) - [Get](#services_get) - [ListByApplications](#services_listbyapplications) +- [RestartReplica](#services_restartreplica) - [Update](#services_update) ### ApplicationTypeVersions_CreateOrUpdate @@ -106,7 +110,7 @@ */ public final class ApplicationTypeVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPutOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionPutOperation_example.json */ /** * Sample code: Put an application type version. @@ -133,7 +137,7 @@ public final class ApplicationTypeVersionsCreateOrUpdateSamples { */ public final class ApplicationTypeVersionsDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionDeleteOperation_example.json */ /** * Sample code: Delete an application type version. @@ -156,7 +160,7 @@ public final class ApplicationTypeVersionsDeleteSamples { */ public final class ApplicationTypeVersionsGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionGetOperation_example.json */ /** * Sample code: Get an application type version. @@ -179,7 +183,7 @@ public final class ApplicationTypeVersionsGetSamples { */ public final class ApplicationTypeVersionsListByApplicationTypeSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionListOperation_example.json */ /** * Sample code: Get a list of application type version resources. @@ -206,7 +210,7 @@ import java.util.Map; */ public final class ApplicationTypeVersionsUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionPatchOperation_example.json */ /** * Sample code: Patch an application type version. @@ -243,7 +247,7 @@ public final class ApplicationTypeVersionsUpdateSamples { */ public final class ApplicationTypesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePutOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNamePutOperation_example.json */ /** * Sample code: Put an application type. @@ -269,7 +273,7 @@ public final class ApplicationTypesCreateOrUpdateSamples { */ public final class ApplicationTypesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNameDeleteOperation_example.json */ /** * Sample code: Delete an application type. @@ -291,7 +295,7 @@ public final class ApplicationTypesDeleteSamples { */ public final class ApplicationTypesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNameGetOperation_example.json */ /** * Sample code: Get an application type. @@ -313,7 +317,7 @@ public final class ApplicationTypesGetSamples { */ public final class ApplicationTypesListSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNameListOperation_example.json */ /** * Sample code: Get a list of application type name resources. @@ -339,7 +343,7 @@ import java.util.Map; */ public final class ApplicationTypesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNamePatchOperation_example.json */ /** * Sample code: Patch an application type. @@ -385,7 +389,7 @@ import java.util.Map; */ public final class ApplicationsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationPutOperation_example_max.json + * x-ms-original-file: 2025-10-01-preview/ApplicationPutOperation_example_max.json */ /** * Sample code: Put an application with maximum parameters. @@ -428,7 +432,7 @@ public final class ApplicationsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/ApplicationPutOperation_example_min.json + * x-ms-original-file: 2025-10-01-preview/ApplicationPutOperation_example_min.json */ /** * Sample code: Put an application with minimum parameters. @@ -468,7 +472,7 @@ public final class ApplicationsCreateOrUpdateSamples { */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationDeleteOperation_example.json */ /** * Sample code: Delete an application. @@ -482,6 +486,38 @@ public final class ApplicationsDeleteSamples { } ``` +### Applications_FetchHealth + +```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.HealthFilter; + +/** + * Samples for Applications FetchHealth. + */ +public final class ApplicationsFetchHealthSamples { + /* + * x-ms-original-file: 2025-10-01-preview/ApplicationActionFetchHealth_example.json + */ + /** + * Sample code: Fetch application health. + * + * @param manager Entry point to ServiceFabricManagedClustersManager. + */ + public static void fetchApplicationHealth( + com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + manager.applications() + .fetchHealth("resRg", "myCluster", "myApp", + new ApplicationFetchHealthRequest().withEventsHealthStateFilter(HealthFilter.ERROR) + .withDeployedApplicationsHealthStateFilter(HealthFilter.ERROR) + .withServicesHealthStateFilter(HealthFilter.ERROR) + .withExcludeHealthStatistics(true) + .withTimeout(30L), + com.azure.core.util.Context.NONE); + } +} +``` + ### Applications_Get ```java @@ -490,7 +526,7 @@ public final class ApplicationsDeleteSamples { */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationGetOperation_example.json */ /** * Sample code: Get an application. @@ -512,7 +548,7 @@ public final class ApplicationsGetSamples { */ public final class ApplicationsListSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationListOperation_example.json */ /** * Sample code: Get a list of application resources. @@ -534,7 +570,7 @@ public final class ApplicationsListSamples { */ public final class ApplicationsReadUpgradeSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationActionGetUpgrade_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationActionGetUpgrade_example.json */ /** * Sample code: Get an application upgrade. @@ -548,6 +584,37 @@ public final class ApplicationsReadUpgradeSamples { } ``` +### Applications_RestartDeployedCodePackage + +```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartDeployedCodePackageRequest; + +/** + * Samples for Applications RestartDeployedCodePackage. + */ +public final class ApplicationsRestartDeployedCodePackageSamples { + /* + * x-ms-original-file: 2025-10-01-preview/ApplicationActionRestartDeployedCodePackage_example.json + */ + /** + * Sample code: Restart deployed code package. + * + * @param manager Entry point to ServiceFabricManagedClustersManager. + */ + public static void restartDeployedCodePackage( + com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + manager.applications() + .restartDeployedCodePackage("resRg", "myCluster", "myApp", + new RestartDeployedCodePackageRequest().withNodeName("nt1_0") + .withServiceManifestName("TestPkg") + .withCodePackageName("fakeTokenPlaceholder") + .withCodePackageInstanceId("fakeTokenPlaceholder") + .withServicePackageActivationId("sharedProcess"), + com.azure.core.util.Context.NONE); + } +} +``` + ### Applications_ResumeUpgrade ```java @@ -558,7 +625,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResu */ public final class ApplicationsResumeUpgradeSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationActionResumeUpgrade_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationActionResumeUpgrade_example.json */ /** * Sample code: Resume upgrade. @@ -583,7 +650,7 @@ public final class ApplicationsResumeUpgradeSamples { */ public final class ApplicationsStartRollbackSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationActionStartRollback_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationActionStartRollback_example.json */ /** * Sample code: Start an application upgrade rollback. @@ -601,6 +668,7 @@ public final class ApplicationsStartRollbackSamples { ```java import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationResource; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParametersProperties; import java.util.HashMap; import java.util.Map; @@ -609,7 +677,7 @@ import java.util.Map; */ public final class ApplicationsUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationPatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationPatchOperation_example.json */ /** * Sample code: Patch an application. @@ -621,7 +689,78 @@ public final class ApplicationsUpdateSamples { ApplicationResource resource = manager.applications() .getWithResponse("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("a", "b")).apply(); + resource.update() + .withTags(mapOf("a", "b")) + .withProperties(new ApplicationUpdateParametersProperties() + .withParameters(mapOf("param1", "value1", "param2", "value2"))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Applications_UpdateUpgrade + +```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeApplicationHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeFailureAction; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeMode; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeUpdateMonitoringPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeServiceTypeHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpgradeKind; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Applications UpdateUpgrade. + */ +public final class ApplicationsUpdateUpgradeSamples { + /* + * x-ms-original-file: 2025-10-01-preview/ApplicationActionUpdateUpgrade_example.json + */ + /** + * Sample code: Update an application upgrade. + * + * @param manager Entry point to ServiceFabricManagedClustersManager. + */ + public static void updateAnApplicationUpgrade( + com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + manager.applications() + .updateUpgrade("resRg", "myCluster", "myApp", + new RuntimeUpdateApplicationUpgradeParameters().withName("fabric:/Voting") + .withUpgradeKind(RuntimeUpgradeKind.ROLLING) + .withApplicationHealthPolicy(new RuntimeApplicationHealthPolicy().withConsiderWarningAsError(true) + .withMaxPercentUnhealthyDeployedApplications(10) + .withDefaultServiceTypeHealthPolicy( + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(12) + .withMaxPercentUnhealthyPartitionsPerService(10) + .withMaxPercentUnhealthyReplicasPerPartition(11)) + .withServiceTypeHealthPolicyMap(mapOf("VotingWeb", + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(15) + .withMaxPercentUnhealthyPartitionsPerService(13) + .withMaxPercentUnhealthyReplicasPerPartition(14)))) + .withUpdateDescription(new RuntimeRollingUpgradeUpdateMonitoringPolicy() + .withRollingUpgradeMode(RuntimeRollingUpgradeMode.MONITORED) + .withForceRestart(true) + .withFailureAction(RuntimeFailureAction.MANUAL) + .withHealthCheckWaitDurationInMilliseconds("PT0H0M10S") + .withHealthCheckStableDurationInMilliseconds("PT1H0M0S") + .withHealthCheckRetryTimeoutInMilliseconds("PT0H15M0S") + .withUpgradeTimeoutInMilliseconds("PT2H0M0S") + .withUpgradeDomainTimeoutInMilliseconds("PT2H0M0S")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -646,7 +785,7 @@ public final class ApplicationsUpdateSamples { */ public final class ManagedApplyMaintenanceWindowPostSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedApplyMaintenanceWindowPost_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedApplyMaintenanceWindowPost_example.json */ /** * Sample code: Apply Maintenance Window Status. @@ -669,7 +808,7 @@ public final class ManagedApplyMaintenanceWindowPostSamples { */ public final class ManagedAzResiliencyStatusesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/managedAzResiliencyStatusGet_example.json + * x-ms-original-file: 2025-10-01-preview/managedAzResiliencyStatusGet_example.json */ /** * Sample code: Az Resiliency status of Base Resources. @@ -692,7 +831,7 @@ public final class ManagedAzResiliencyStatusesGetSamples { */ public final class ManagedClusterVersionGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGet_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterVersionGet_example.json */ /** * Sample code: Get cluster version. @@ -716,7 +855,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClus */ public final class ManagedClusterVersionGetByEnvironmentSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGetByEnvironment_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterVersionGetByEnvironment_example.json */ /** * Sample code: Get cluster version by environment. @@ -740,7 +879,7 @@ public final class ManagedClusterVersionGetByEnvironmentSamples { */ public final class ManagedClusterVersionListSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionList_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterVersionList_example.json */ /** * Sample code: List cluster versions. @@ -764,7 +903,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClus */ public final class ManagedClusterVersionListByEnvironmentSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionListByEnvironment.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterVersionListByEnvironment.json */ /** * Sample code: List cluster versions by environment. @@ -818,7 +957,7 @@ import java.util.Map; */ public final class ManagedClustersCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterPutOperation_example_max.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterPutOperation_example_max.json */ /** * Sample code: Put a cluster with maximum parameters. @@ -927,7 +1066,7 @@ public final class ManagedClustersCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterPutOperation_example_min.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterPutOperation_example_min.json */ /** * Sample code: Put a cluster with minimum parameters. @@ -974,7 +1113,7 @@ public final class ManagedClustersCreateOrUpdateSamples { */ public final class ManagedClustersDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterDeleteOperation_example.json */ /** * Sample code: Delete a cluster. @@ -996,7 +1135,7 @@ public final class ManagedClustersDeleteSamples { */ public final class ManagedClustersGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterGetOperation_example.json */ /** * Sample code: Get a cluster. @@ -1021,7 +1160,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimula */ public final class ManagedClustersGetFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterGetFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/ManagedClusterGetFaultSimulation_example.json */ /** * Sample code: Get Managed Cluster Fault Simulation. @@ -1046,7 +1185,7 @@ public final class ManagedClustersGetFaultSimulationSamples { */ public final class ManagedClustersListSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterListBySubscriptionOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterListBySubscriptionOperation_example.json */ /** * Sample code: List managed clusters. @@ -1068,7 +1207,7 @@ public final class ManagedClustersListSamples { */ public final class ManagedClustersListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterListByResourceGroupOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterListByResourceGroupOperation_example.json */ /** * Sample code: List cluster by resource group. @@ -1090,7 +1229,7 @@ public final class ManagedClustersListByResourceGroupSamples { */ public final class ManagedClustersListFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterListFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/ManagedClusterListFaultSimulation_example.json */ /** * Sample code: List Managed Cluster Fault Simulation. @@ -1116,7 +1255,7 @@ import java.util.Arrays; */ public final class ManagedClustersStartFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStartFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/ManagedClusterStartFaultSimulation_example.json */ /** * Sample code: Start Managed Cluster Fault Simulation. @@ -1142,7 +1281,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimula */ public final class ManagedClustersStopFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStopFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/ManagedClusterStopFaultSimulation_example.json */ /** * Sample code: Stop Managed Cluster Fault Simulation. @@ -1171,7 +1310,7 @@ import java.util.Map; */ public final class ManagedClustersUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterPatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterPatchOperation_example.json */ /** * Sample code: Patch a managed cluster. @@ -1208,7 +1347,7 @@ public final class ManagedClustersUpdateSamples { */ public final class ManagedMaintenanceWindowStatusesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedMaintenanceWindowStatusGet_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedMaintenanceWindowStatusGet_example.json */ /** * Sample code: Get Maintenance Window Status. @@ -1231,7 +1370,7 @@ public final class ManagedMaintenanceWindowStatusesGetSamples { */ public final class ManagedUnsupportedVMSizesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesGet_example.json + * x-ms-original-file: 2025-10-01-preview/managedUnsupportedVMSizesGet_example.json */ /** * Sample code: Get unsupported vm sizes. @@ -1254,7 +1393,7 @@ public final class ManagedUnsupportedVMSizesGetSamples { */ public final class ManagedUnsupportedVMSizesListSamples { /* - * x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesList_example.json + * x-ms-original-file: 2025-10-01-preview/managedUnsupportedVMSizesList_example.json */ /** * Sample code: List unsupported vm sizes. @@ -1276,7 +1415,7 @@ public final class ManagedUnsupportedVMSizesListSamples { */ public final class NodeTypeSkusListSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypeSkusListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypeSkusListOperation_example.json */ /** * Sample code: List a node type SKUs. @@ -1326,7 +1465,7 @@ import java.util.Map; */ public final class NodeTypesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationStateless_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationStateless_example.json */ /** * Sample code: Put an stateless node type with temporary disk for service fabric. @@ -1361,7 +1500,7 @@ public final class NodeTypesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperation_example_max.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperation_example_max.json */ /** * Sample code: Put a node type with maximum parameters. @@ -1477,7 +1616,7 @@ public final class NodeTypesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationAutoScale_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationAutoScale_example.json */ /** * Sample code: Put a node type with auto-scale parameters. @@ -1523,7 +1662,7 @@ public final class NodeTypesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperation_example_min.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperation_example_min.json */ /** * Sample code: Put a node type with minimum parameters. @@ -1547,7 +1686,7 @@ public final class NodeTypesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationDedicatedHost_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationDedicatedHost_example.json */ /** * Sample code: Put node type with dedicated hosts. @@ -1577,7 +1716,7 @@ public final class NodeTypesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationVmImagePlan_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationVmImagePlan_example.json */ /** * Sample code: Put node type with vm image plan. @@ -1604,7 +1743,7 @@ public final class NodeTypesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json */ /** * Sample code: Put node type with shared galleries custom vm image. @@ -1626,7 +1765,7 @@ public final class NodeTypesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationCustomImage_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationCustomImage_example.json */ /** * Sample code: Put node type with custom vm image. @@ -1672,7 +1811,7 @@ import java.util.Arrays; */ public final class NodeTypesDeallocateSamples { /* - * x-ms-original-file: 2025-06-01-preview/DeallocateNodes_example.json + * x-ms-original-file: 2025-10-01-preview/DeallocateNodes_example.json */ /** * Sample code: Deallocate nodes. @@ -1697,7 +1836,7 @@ public final class NodeTypesDeallocateSamples { */ public final class NodeTypesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypeDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypeDeleteOperation_example.json */ /** * Sample code: Delete a node type. @@ -1722,7 +1861,7 @@ import java.util.Arrays; */ public final class NodeTypesDeleteNodeSamples { /* - * x-ms-original-file: 2025-06-01-preview/DeleteNodes_example.json + * x-ms-original-file: 2025-10-01-preview/DeleteNodes_example.json */ /** * Sample code: Delete nodes. @@ -1747,7 +1886,7 @@ public final class NodeTypesDeleteNodeSamples { */ public final class NodeTypesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypeGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypeGetOperation_example.json */ /** * Sample code: Get a node type. @@ -1771,7 +1910,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimula */ public final class NodeTypesGetFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeGetFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/NodeTypeGetFaultSimulation_example.json */ /** * Sample code: Get Node Type Fault Simulation. @@ -1796,7 +1935,7 @@ public final class NodeTypesGetFaultSimulationSamples { */ public final class NodeTypesListByManagedClustersSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypeListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypeListOperation_example.json */ /** * Sample code: List node type of the specified managed cluster. @@ -1818,7 +1957,7 @@ public final class NodeTypesListByManagedClustersSamples { */ public final class NodeTypesListFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeListFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/NodeTypeListFaultSimulation_example.json */ /** * Sample code: List Node Type Fault Simulation. @@ -1844,7 +1983,7 @@ import java.util.Arrays; */ public final class NodeTypesRedeploySamples { /* - * x-ms-original-file: 2025-06-01-preview/RedeployNodes_UD_example.json + * x-ms-original-file: 2025-10-01-preview/RedeployNodes_UD_example.json */ /** * Sample code: Redeploy all nodes by upgrade domain. @@ -1860,7 +1999,7 @@ public final class NodeTypesRedeploySamples { } /* - * x-ms-original-file: 2025-06-01-preview/RedeployNodes_example.json + * x-ms-original-file: 2025-10-01-preview/RedeployNodes_example.json */ /** * Sample code: Redeploy nodes. @@ -1889,7 +2028,7 @@ import java.util.Arrays; */ public final class NodeTypesReimageSamples { /* - * x-ms-original-file: 2025-06-01-preview/ReimageNodes_example.json + * x-ms-original-file: 2025-10-01-preview/ReimageNodes_example.json */ /** * Sample code: Reimage nodes. @@ -1905,7 +2044,7 @@ public final class NodeTypesReimageSamples { } /* - * x-ms-original-file: 2025-06-01-preview/ReimageNodes_UD_example.json + * x-ms-original-file: 2025-10-01-preview/ReimageNodes_UD_example.json */ /** * Sample code: Reimage all nodes by upgrade domain. @@ -1933,7 +2072,7 @@ import java.util.Arrays; */ public final class NodeTypesRestartSamples { /* - * x-ms-original-file: 2025-06-01-preview/RestartNodes_example.json + * x-ms-original-file: 2025-10-01-preview/RestartNodes_example.json */ /** * Sample code: Restart nodes. @@ -1961,7 +2100,7 @@ import java.util.Arrays; */ public final class NodeTypesStartSamples { /* - * x-ms-original-file: 2025-06-01-preview/StartNodes_example.json + * x-ms-original-file: 2025-10-01-preview/StartNodes_example.json */ /** * Sample code: Start nodes. @@ -1989,7 +2128,7 @@ import java.util.Arrays; */ public final class NodeTypesStartFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStartFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/NodeTypeStartFaultSimulation_example.json */ /** * Sample code: Start Node Type Fault Simulation. @@ -2015,7 +2154,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimula */ public final class NodeTypesStopFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStopFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/NodeTypeStopFaultSimulation_example.json */ /** * Sample code: Stop Node Type Fault Simulation. @@ -2045,7 +2184,7 @@ import java.util.Map; */ public final class NodeTypesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePatchOperation_example.json */ /** * Sample code: Patch a node type. @@ -2061,7 +2200,7 @@ public final class NodeTypesUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePatchOperationAutoScale_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePatchOperationAutoScale_example.json */ /** * Sample code: Patch a node type while auto-scaling. @@ -2101,7 +2240,7 @@ public final class NodeTypesUpdateSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: 2025-06-01-preview/OperationsList_example.json + * x-ms-original-file: 2025-10-01-preview/OperationsList_example.json */ /** * Sample code: List the operations for the provider. @@ -2139,7 +2278,7 @@ import java.util.Map; */ public final class ServicesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServicePutOperation_example_min.json + * x-ms-original-file: 2025-10-01-preview/ServicePutOperation_example_min.json */ /** * Sample code: Put a service with minimum parameters. @@ -2159,7 +2298,7 @@ public final class ServicesCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-06-01-preview/ServicePutOperation_example_max.json + * x-ms-original-file: 2025-10-01-preview/ServicePutOperation_example_max.json */ /** * Sample code: Put a service with maximum parameters. @@ -2223,7 +2362,7 @@ public final class ServicesCreateOrUpdateSamples { */ public final class ServicesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServiceDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ServiceDeleteOperation_example.json */ /** * Sample code: Delete a service. @@ -2245,7 +2384,7 @@ public final class ServicesDeleteSamples { */ public final class ServicesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServiceGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ServiceGetOperation_example.json */ /** * Sample code: Get a service. @@ -2268,7 +2407,7 @@ public final class ServicesGetSamples { */ public final class ServicesListByApplicationsSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServiceListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ServiceListOperation_example.json */ /** * Sample code: Get a list of service resources. @@ -2282,6 +2421,39 @@ public final class ServicesListByApplicationsSamples { } ``` +### Services_RestartReplica + +```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartKind; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest; +import java.util.Arrays; + +/** + * Samples for Services RestartReplica. + */ +public final class ServicesRestartReplicaSamples { + /* + * x-ms-original-file: 2025-10-01-preview/ServiceActionRestartReplica_example.json + */ + /** + * Sample code: Restart replicas. + * + * @param manager Entry point to ServiceFabricManagedClustersManager. + */ + public static void restartReplicas( + com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + manager.services() + .restartReplica("resRg", "myCluster", "myApp", "myService", + new RestartReplicaRequest().withPartitionId("00000000-0000-0000-0000-000000000000") + .withReplicaIds(Arrays.asList(123456789012345680L)) + .withRestartKind(RestartKind.SIMULTANEOUS) + .withForceRestart(false) + .withTimeout(60L), + com.azure.core.util.Context.NONE); + } +} +``` + ### Services_Update ```java @@ -2294,7 +2466,7 @@ import java.util.Map; */ public final class ServicesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServicePatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ServicePatchOperation_example.json */ /** * Sample code: Patch a service. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/pom.xml b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/pom.xml index 5220975afa24..90cf7b6b46cb 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/pom.xml +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/pom.xml @@ -18,7 +18,7 @@ <packaging>jar</packaging> <name>Microsoft Azure SDK for Service Fabric Managed Clusters Management</name> - <description>This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Service Fabric Managed Clusters Management Client. Package api-version 2025-06-01-preview.</description> + <description>This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Service Fabric Managed Clusters Management Client. Package api-version 2025-10-01-preview.</description> <url>https://github.com/Azure/azure-sdk-for-java</url> <licenses> diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationsClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationsClient.java index c02bb0eceb0d..782ef62f3709 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationsClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationsClient.java @@ -12,8 +12,11 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartDeployedCodePackageRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters; /** * An instance of this class provides access to all the operations defined in ApplicationsClient. @@ -121,7 +124,23 @@ ApplicationResourceInner createOrUpdate(String resourceGroupName, String cluster ApplicationResourceInner parameters, Context context); /** - * Updates the tags of an application resource of a given managed cluster. + * Updates an application resource of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The application resource updated tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of the application resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ApplicationResourceInner>, ApplicationResourceInner> beginUpdate(String resourceGroupName, + String clusterName, String applicationName, ApplicationUpdateParameters parameters); + + /** + * Updates an application resource of a given managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -131,14 +150,14 @@ ApplicationResourceInner createOrUpdate(String resourceGroupName, String cluster * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 application resource along with {@link Response}. + * @return the {@link SyncPoller} for polling of the application resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response<ApplicationResourceInner> updateWithResponse(String resourceGroupName, String clusterName, - String applicationName, ApplicationUpdateParameters parameters, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ApplicationResourceInner>, ApplicationResourceInner> beginUpdate(String resourceGroupName, + String clusterName, String applicationName, ApplicationUpdateParameters parameters, Context context); /** - * Updates the tags of an application resource of a given managed cluster. + * Updates an application resource of a given managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -153,6 +172,23 @@ Response<ApplicationResourceInner> updateWithResponse(String resourceGroupName, ApplicationResourceInner update(String resourceGroupName, String clusterName, String applicationName, ApplicationUpdateParameters parameters); + /** + * Updates an application resource of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The application resource updated tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 application resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApplicationResourceInner update(String resourceGroupName, String clusterName, String applicationName, + ApplicationUpdateParameters parameters, Context context); + /** * Delete a Service Fabric managed application resource with the specified name. * @@ -433,4 +469,204 @@ SyncPoller<PollResult<Void>, Void> beginStartRollback(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) void startRollback(String resourceGroupName, String clusterName, String applicationName, Context context); + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginUpdateUpgrade(String resourceGroupName, String clusterName, + String applicationName, RuntimeUpdateApplicationUpgradeParameters parameters); + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginUpdateUpgrade(String resourceGroupName, String clusterName, + String applicationName, RuntimeUpdateApplicationUpgradeParameters parameters, Context context); + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + void updateUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters); + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + void updateUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters, Context context); + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of the status of the deployed application health. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginFetchHealth(String resourceGroupName, String clusterName, + String applicationName, ApplicationFetchHealthRequest parameters); + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of the status of the deployed application health. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginFetchHealth(String resourceGroupName, String clusterName, + String applicationName, ApplicationFetchHealthRequest parameters, Context context); + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + void fetchHealth(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters); + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + void fetchHealth(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters, Context context); + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginRestartDeployedCodePackage(String resourceGroupName, String clusterName, + String applicationName, RestartDeployedCodePackageRequest parameters); + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginRestartDeployedCodePackage(String resourceGroupName, String clusterName, + String applicationName, RestartDeployedCodePackageRequest parameters, Context context); + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + void restartDeployedCodePackage(String resourceGroupName, String clusterName, String applicationName, + RestartDeployedCodePackageRequest parameters); + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + void restartDeployedCodePackage(String resourceGroupName, String clusterName, String applicationName, + RestartDeployedCodePackageRequest parameters, Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java index f1f196c6f690..064c432bc32a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java @@ -114,6 +114,21 @@ SyncPoller<PollResult<ManagedClusterInner>, ManagedClusterInner> beginCreateOrUp ManagedClusterInner createOrUpdate(String resourceGroupName, String clusterName, ManagedClusterInner parameters, Context context); + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of the managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ManagedClusterInner>, ManagedClusterInner> beginUpdate(String resourceGroupName, + String clusterName, ManagedClusterUpdateParameters parameters); + /** * Update the tags of of a Service Fabric managed cluster resource with the specified name. * @@ -124,11 +139,11 @@ ManagedClusterInner createOrUpdate(String resourceGroupName, String clusterName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 managed cluster resource along with {@link Response}. + * @return the {@link SyncPoller} for polling of the managed cluster resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response<ManagedClusterInner> updateWithResponse(String resourceGroupName, String clusterName, - ManagedClusterUpdateParameters parameters, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<ManagedClusterInner>, ManagedClusterInner> beginUpdate(String resourceGroupName, + String clusterName, ManagedClusterUpdateParameters parameters, Context context); /** * Update the tags of of a Service Fabric managed cluster resource with the specified name. @@ -144,6 +159,22 @@ Response<ManagedClusterInner> updateWithResponse(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) ManagedClusterInner update(String resourceGroupName, String clusterName, ManagedClusterUpdateParameters parameters); + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterInner update(String resourceGroupName, String clusterName, ManagedClusterUpdateParameters parameters, + Context context); + /** * Delete a Service Fabric managed cluster resource with the specified name. * diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java index 4f930568b9db..c2e1ca8b8dff 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java @@ -121,7 +121,7 @@ NodeTypeInner createOrUpdate(String resourceGroupName, String clusterName, Strin NodeTypeInner parameters, Context context); /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -138,7 +138,7 @@ SyncPoller<PollResult<NodeTypeInner>, NodeTypeInner> beginUpdate(String resource String nodeTypeName, NodeTypeUpdateParameters parameters); /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -156,7 +156,7 @@ SyncPoller<PollResult<NodeTypeInner>, NodeTypeInner> beginUpdate(String resource String nodeTypeName, NodeTypeUpdateParameters parameters, Context context); /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -172,7 +172,7 @@ NodeTypeInner update(String resourceGroupName, String clusterName, String nodeTy NodeTypeUpdateParameters parameters); /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServicesClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServicesClient.java index fc0e429a1189..5a341183af9f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServicesClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServicesClient.java @@ -12,6 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ServiceResourceInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceUpdateParameters; /** @@ -257,4 +258,72 @@ PagedIterable<ServiceResourceInner> listByApplications(String resourceGroupName, @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ServiceResourceInner> listByApplications(String resourceGroupName, String clusterName, String applicationName, Context context); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginRestartReplica(String resourceGroupName, String clusterName, + String applicationName, String serviceName, RestartReplicaRequest parameters); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller<PollResult<Void>, Void> beginRestartReplica(String resourceGroupName, String clusterName, + String applicationName, String serviceName, RestartReplicaRequest parameters, Context context); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + void restartReplica(String resourceGroupName, String clusterName, String applicationName, String serviceName, + RestartReplicaRequest parameters); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + void restartReplica(String resourceGroupName, String clusterName, String applicationName, String serviceName, + RestartReplicaRequest parameters, Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationResourceImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationResourceImpl.java index 1851337b8069..eb9ee14edfe0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationResourceImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationResourceImpl.java @@ -8,12 +8,16 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationResource; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParametersProperties; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpgradePolicy; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUserAssignedIdentity; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedIdentity; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartDeployedCodePackageRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters; import java.util.Collections; import java.util.List; import java.util.Map; @@ -150,16 +154,14 @@ public ApplicationResourceImpl update() { public ApplicationResource apply() { this.innerObject = serviceManager.serviceClient() .getApplications() - .updateWithResponse(resourceGroupName, clusterName, applicationName, updateParameters, Context.NONE) - .getValue(); + .update(resourceGroupName, clusterName, applicationName, updateParameters, Context.NONE); return this; } public ApplicationResource apply(Context context) { this.innerObject = serviceManager.serviceClient() .getApplications() - .updateWithResponse(resourceGroupName, clusterName, applicationName, updateParameters, context) - .getValue(); + .update(resourceGroupName, clusterName, applicationName, updateParameters, context); return this; } @@ -213,6 +215,33 @@ public void startRollback(Context context) { serviceManager.applications().startRollback(resourceGroupName, clusterName, applicationName, context); } + public void updateUpgrade(RuntimeUpdateApplicationUpgradeParameters parameters) { + serviceManager.applications().updateUpgrade(resourceGroupName, clusterName, applicationName, parameters); + } + + public void updateUpgrade(RuntimeUpdateApplicationUpgradeParameters parameters, Context context) { + serviceManager.applications() + .updateUpgrade(resourceGroupName, clusterName, applicationName, parameters, context); + } + + public void fetchHealth(ApplicationFetchHealthRequest parameters) { + serviceManager.applications().fetchHealth(resourceGroupName, clusterName, applicationName, parameters); + } + + public void fetchHealth(ApplicationFetchHealthRequest parameters, Context context) { + serviceManager.applications().fetchHealth(resourceGroupName, clusterName, applicationName, parameters, context); + } + + public void restartDeployedCodePackage(RestartDeployedCodePackageRequest parameters) { + serviceManager.applications() + .restartDeployedCodePackage(resourceGroupName, clusterName, applicationName, parameters); + } + + public void restartDeployedCodePackage(RestartDeployedCodePackageRequest parameters, Context context) { + serviceManager.applications() + .restartDeployedCodePackage(resourceGroupName, clusterName, applicationName, parameters, context); + } + public ApplicationResourceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -258,6 +287,11 @@ public ApplicationResourceImpl withUpgradePolicy(ApplicationUpgradePolicy upgrad return this; } + public ApplicationResourceImpl withProperties(ApplicationUpdateParametersProperties properties) { + this.updateParameters.withProperties(properties); + return this; + } + private boolean isInCreateMode() { return this.innerModel() == null || this.innerModel().id() == null; } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsClientImpl.java index 72a689b6d972..edb07d802187 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsClientImpl.java @@ -37,8 +37,11 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceInner; import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationResourceList; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartDeployedCodePackageRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -116,9 +119,9 @@ Response<BinaryData> createOrUpdateSync(@HostParam("endpoint") String endpoint, Context context); @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<ApplicationResourceInner>> update(@HostParam("endpoint") String endpoint, + Mono<Response<Flux<ByteBuffer>>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, @@ -126,9 +129,9 @@ Mono<Response<ApplicationResourceInner>> update(@HostParam("endpoint") String en Context context); @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response<ApplicationResourceInner> updateSync(@HostParam("endpoint") String endpoint, + Response<BinaryData> updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, @@ -227,6 +230,66 @@ Response<BinaryData> startRollbackSync(@HostParam("endpoint") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("applicationName") String applicationName, Context context); + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/updateUpgrade") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> updateUpgrade(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RuntimeUpdateApplicationUpgradeParameters parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/updateUpgrade") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> updateUpgradeSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RuntimeUpdateApplicationUpgradeParameters parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/fetchHealth") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> fetchHealth(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ApplicationFetchHealthRequest parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/fetchHealth") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> fetchHealthSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ApplicationFetchHealthRequest parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/restartDeployedCodePackage") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> restartDeployedCodePackage(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RestartDeployedCodePackageRequest parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/restartDeployedCodePackage") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> restartDeployedCodePackageSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RestartDeployedCodePackageRequest parameters, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -518,7 +581,7 @@ public ApplicationResourceInner createOrUpdate(String resourceGroupName, String } /** - * Updates the tags of an application resource of a given managed cluster. + * Updates an application resource of a given managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -530,8 +593,8 @@ public ApplicationResourceInner createOrUpdate(String resourceGroupName, String * @return the application resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<ApplicationResourceInner>> updateWithResponseAsync(String resourceGroupName, - String clusterName, String applicationName, ApplicationUpdateParameters parameters) { + private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String applicationName, ApplicationUpdateParameters parameters) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -542,7 +605,7 @@ private Mono<Response<ApplicationResourceInner>> updateWithResponseAsync(String } /** - * Updates the tags of an application resource of a given managed cluster. + * Updates an application resource of a given managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -551,17 +614,20 @@ private Mono<Response<ApplicationResourceInner>> updateWithResponseAsync(String * @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 application resource on successful completion of {@link Mono}. + * @return the application resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<ApplicationResourceInner> updateAsync(String resourceGroupName, String clusterName, + private Response<BinaryData> updateWithResponse(String resourceGroupName, String clusterName, String applicationName, ApplicationUpdateParameters parameters) { - return updateWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, accept, + parameters, Context.NONE); } /** - * Updates the tags of an application resource of a given managed cluster. + * Updates an application resource of a given managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -574,7 +640,7 @@ private Mono<ApplicationResourceInner> updateAsync(String resourceGroupName, Str * @return the application resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response<ApplicationResourceInner> updateWithResponse(String resourceGroupName, String clusterName, + private Response<BinaryData> updateWithResponse(String resourceGroupName, String clusterName, String applicationName, ApplicationUpdateParameters parameters, Context context) { final String contentType = "application/json"; final String accept = "application/json"; @@ -584,7 +650,91 @@ public Response<ApplicationResourceInner> updateWithResponse(String resourceGrou } /** - * Updates the tags of an application resource of a given managed cluster. + * Updates an application resource of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The application resource updated tags. + * @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 {@link PollerFlux} for polling of the application resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ApplicationResourceInner>, ApplicationResourceInner> beginUpdateAsync( + String resourceGroupName, String clusterName, String applicationName, ApplicationUpdateParameters parameters) { + Mono<Response<Flux<ByteBuffer>>> mono + = updateWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters); + return this.client.<ApplicationResourceInner, ApplicationResourceInner>getLroResult(mono, + this.client.getHttpPipeline(), ApplicationResourceInner.class, ApplicationResourceInner.class, + this.client.getContext()); + } + + /** + * Updates an application resource of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The application resource updated tags. + * @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 {@link SyncPoller} for polling of the application resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ApplicationResourceInner>, ApplicationResourceInner> beginUpdate( + String resourceGroupName, String clusterName, String applicationName, ApplicationUpdateParameters parameters) { + Response<BinaryData> response = updateWithResponse(resourceGroupName, clusterName, applicationName, parameters); + return this.client.<ApplicationResourceInner, ApplicationResourceInner>getLroResult(response, + ApplicationResourceInner.class, ApplicationResourceInner.class, Context.NONE); + } + + /** + * Updates an application resource of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The application resource updated tags. + * @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 {@link SyncPoller} for polling of the application resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ApplicationResourceInner>, ApplicationResourceInner> beginUpdate( + String resourceGroupName, String clusterName, String applicationName, ApplicationUpdateParameters parameters, + Context context) { + Response<BinaryData> response + = updateWithResponse(resourceGroupName, clusterName, applicationName, parameters, context); + return this.client.<ApplicationResourceInner, ApplicationResourceInner>getLroResult(response, + ApplicationResourceInner.class, ApplicationResourceInner.class, context); + } + + /** + * Updates an application resource of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The application resource updated tags. + * @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 application resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ApplicationResourceInner> updateAsync(String resourceGroupName, String clusterName, + String applicationName, ApplicationUpdateParameters parameters) { + return beginUpdateAsync(resourceGroupName, clusterName, applicationName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an application resource of a given managed cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -598,7 +748,26 @@ public Response<ApplicationResourceInner> updateWithResponse(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) public ApplicationResourceInner update(String resourceGroupName, String clusterName, String applicationName, ApplicationUpdateParameters parameters) { - return updateWithResponse(resourceGroupName, clusterName, applicationName, parameters, Context.NONE).getValue(); + return beginUpdate(resourceGroupName, clusterName, applicationName, parameters).getFinalResult(); + } + + /** + * Updates an application resource of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The application resource updated tags. + * @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 application resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApplicationResourceInner update(String resourceGroupName, String clusterName, String applicationName, + ApplicationUpdateParameters parameters, Context context) { + return beginUpdate(resourceGroupName, clusterName, applicationName, parameters, context).getFinalResult(); } /** @@ -1422,6 +1591,572 @@ public void startRollback(String resourceGroupName, String clusterName, String a beginStartRollback(resourceGroupName, clusterName, applicationName, context).getFinalResult(); } + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> updateUpgradeWithResponseAsync(String resourceGroupName, + String clusterName, String applicationName, RuntimeUpdateApplicationUpgradeParameters parameters) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.updateUpgrade(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, + parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateUpgradeWithResponse(String resourceGroupName, String clusterName, + String applicationName, RuntimeUpdateApplicationUpgradeParameters parameters) { + final String contentType = "application/json"; + return service.updateUpgradeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, parameters, + Context.NONE); + } + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> updateUpgradeWithResponse(String resourceGroupName, String clusterName, + String applicationName, RuntimeUpdateApplicationUpgradeParameters parameters, Context context) { + final String contentType = "application/json"; + return service.updateUpgradeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, parameters, + context); + } + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<Void>, Void> beginUpdateUpgradeAsync(String resourceGroupName, String clusterName, + String applicationName, RuntimeUpdateApplicationUpgradeParameters parameters) { + Mono<Response<Flux<ByteBuffer>>> mono + = updateUpgradeWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginUpdateUpgrade(String resourceGroupName, String clusterName, + String applicationName, RuntimeUpdateApplicationUpgradeParameters parameters) { + Response<BinaryData> response + = updateUpgradeWithResponse(resourceGroupName, clusterName, applicationName, parameters); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginUpdateUpgrade(String resourceGroupName, String clusterName, + String applicationName, RuntimeUpdateApplicationUpgradeParameters parameters, Context context) { + Response<BinaryData> response + = updateUpgradeWithResponse(resourceGroupName, clusterName, applicationName, parameters, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Void> updateUpgradeAsync(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters) { + return beginUpdateUpgradeAsync(resourceGroupName, clusterName, applicationName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @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 updateUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters) { + beginUpdateUpgrade(resourceGroupName, clusterName, applicationName, parameters).getFinalResult(); + } + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @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 updateUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters, Context context) { + beginUpdateUpgrade(resourceGroupName, clusterName, applicationName, parameters, context).getFinalResult(); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @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 status of the deployed application health along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> fetchHealthWithResponseAsync(String resourceGroupName, String clusterName, + String applicationName, ApplicationFetchHealthRequest parameters) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.fetchHealth(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, + parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @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 status of the deployed application health along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> fetchHealthWithResponse(String resourceGroupName, String clusterName, + String applicationName, ApplicationFetchHealthRequest parameters) { + final String contentType = "application/json"; + return service.fetchHealthSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, parameters, + Context.NONE); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @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 status of the deployed application health along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> fetchHealthWithResponse(String resourceGroupName, String clusterName, + String applicationName, ApplicationFetchHealthRequest parameters, Context context) { + final String contentType = "application/json"; + return service.fetchHealthSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, parameters, + context); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @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 {@link PollerFlux} for polling of the status of the deployed application health. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<Void>, Void> beginFetchHealthAsync(String resourceGroupName, String clusterName, + String applicationName, ApplicationFetchHealthRequest parameters) { + Mono<Response<Flux<ByteBuffer>>> mono + = fetchHealthWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @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 {@link SyncPoller} for polling of the status of the deployed application health. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginFetchHealth(String resourceGroupName, String clusterName, + String applicationName, ApplicationFetchHealthRequest parameters) { + Response<BinaryData> response + = fetchHealthWithResponse(resourceGroupName, clusterName, applicationName, parameters); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @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 {@link SyncPoller} for polling of the status of the deployed application health. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginFetchHealth(String resourceGroupName, String clusterName, + String applicationName, ApplicationFetchHealthRequest parameters, Context context) { + Response<BinaryData> response + = fetchHealthWithResponse(resourceGroupName, clusterName, applicationName, parameters, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @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 status of the deployed application health on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Void> fetchHealthAsync(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters) { + return beginFetchHealthAsync(resourceGroupName, clusterName, applicationName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @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 fetchHealth(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters) { + beginFetchHealth(resourceGroupName, clusterName, applicationName, parameters).getFinalResult(); + } + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @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 fetchHealth(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters, Context context) { + beginFetchHealth(resourceGroupName, clusterName, applicationName, parameters, context).getFinalResult(); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> restartDeployedCodePackageWithResponseAsync(String resourceGroupName, + String clusterName, String applicationName, RestartDeployedCodePackageRequest parameters) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.restartDeployedCodePackage(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + applicationName, contentType, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> restartDeployedCodePackageWithResponse(String resourceGroupName, String clusterName, + String applicationName, RestartDeployedCodePackageRequest parameters) { + final String contentType = "application/json"; + return service.restartDeployedCodePackageSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, parameters, + Context.NONE); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> restartDeployedCodePackageWithResponse(String resourceGroupName, String clusterName, + String applicationName, RestartDeployedCodePackageRequest parameters, Context context) { + final String contentType = "application/json"; + return service.restartDeployedCodePackageSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, parameters, + context); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<Void>, Void> beginRestartDeployedCodePackageAsync(String resourceGroupName, + String clusterName, String applicationName, RestartDeployedCodePackageRequest parameters) { + Mono<Response<Flux<ByteBuffer>>> mono + = restartDeployedCodePackageWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginRestartDeployedCodePackage(String resourceGroupName, + String clusterName, String applicationName, RestartDeployedCodePackageRequest parameters) { + Response<BinaryData> response + = restartDeployedCodePackageWithResponse(resourceGroupName, clusterName, applicationName, parameters); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginRestartDeployedCodePackage(String resourceGroupName, + String clusterName, String applicationName, RestartDeployedCodePackageRequest parameters, Context context) { + Response<BinaryData> response = restartDeployedCodePackageWithResponse(resourceGroupName, clusterName, + applicationName, parameters, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Void> restartDeployedCodePackageAsync(String resourceGroupName, String clusterName, + String applicationName, RestartDeployedCodePackageRequest parameters) { + return beginRestartDeployedCodePackageAsync(resourceGroupName, clusterName, applicationName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @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 restartDeployedCodePackage(String resourceGroupName, String clusterName, String applicationName, + RestartDeployedCodePackageRequest parameters) { + beginRestartDeployedCodePackage(resourceGroupName, clusterName, applicationName, parameters).getFinalResult(); + } + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @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 restartDeployedCodePackage(String resourceGroupName, String clusterName, String applicationName, + RestartDeployedCodePackageRequest parameters, Context context) { + beginRestartDeployedCodePackage(resourceGroupName, clusterName, applicationName, parameters, context) + .getFinalResult(); + } + /** * Get the next page of items. * diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsImpl.java index 0754e8b6959d..9f29662a261e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsImpl.java @@ -11,9 +11,12 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationResource; import com.azure.resourcemanager.servicefabricmanagedclusters.models.Applications; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartDeployedCodePackageRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters; public final class ApplicationsImpl implements Applications { private static final ClientLogger LOGGER = new ClientLogger(ApplicationsImpl.class); @@ -94,6 +97,37 @@ public void startRollback(String resourceGroupName, String clusterName, String a this.serviceClient().startRollback(resourceGroupName, clusterName, applicationName, context); } + public void updateUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters) { + this.serviceClient().updateUpgrade(resourceGroupName, clusterName, applicationName, parameters); + } + + public void updateUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters, Context context) { + this.serviceClient().updateUpgrade(resourceGroupName, clusterName, applicationName, parameters, context); + } + + public void fetchHealth(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters) { + this.serviceClient().fetchHealth(resourceGroupName, clusterName, applicationName, parameters); + } + + public void fetchHealth(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters, Context context) { + this.serviceClient().fetchHealth(resourceGroupName, clusterName, applicationName, parameters, context); + } + + public void restartDeployedCodePackage(String resourceGroupName, String clusterName, String applicationName, + RestartDeployedCodePackageRequest parameters) { + this.serviceClient().restartDeployedCodePackage(resourceGroupName, clusterName, applicationName, parameters); + } + + public void restartDeployedCodePackage(String resourceGroupName, String clusterName, String applicationName, + RestartDeployedCodePackageRequest parameters, Context context) { + this.serviceClient() + .restartDeployedCodePackage(resourceGroupName, clusterName, applicationName, parameters, context); + } + public ApplicationResource getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java index 64ef33d05d29..6643c6a27b2d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java @@ -356,16 +356,14 @@ public ManagedClusterImpl update() { public ManagedCluster apply() { this.innerObject = serviceManager.serviceClient() .getManagedClusters() - .updateWithResponse(resourceGroupName, clusterName, updateParameters, Context.NONE) - .getValue(); + .update(resourceGroupName, clusterName, updateParameters, Context.NONE); return this; } public ManagedCluster apply(Context context) { this.innerObject = serviceManager.serviceClient() .getManagedClusters() - .updateWithResponse(resourceGroupName, clusterName, updateParameters, context) - .getValue(); + .update(resourceGroupName, clusterName, updateParameters, context); return this; } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java index 58acf59180cd..09e59ea0c8ba 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java @@ -115,18 +115,18 @@ Response<BinaryData> createOrUpdateSync(@HostParam("endpoint") String endpoint, @BodyParam("application/json") ManagedClusterInner parameters, Context context); @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono<Response<ManagedClusterInner>> update(@HostParam("endpoint") String endpoint, + Mono<Response<Flux<ByteBuffer>>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") ManagedClusterUpdateParameters parameters, Context context); @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response<ManagedClusterInner> updateSync(@HostParam("endpoint") String endpoint, + Response<BinaryData> updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @@ -576,7 +576,7 @@ public ManagedClusterInner createOrUpdate(String resourceGroupName, String clust * @return the managed cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<Response<ManagedClusterInner>> updateWithResponseAsync(String resourceGroupName, String clusterName, + private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resourceGroupName, String clusterName, ManagedClusterUpdateParameters parameters) { final String contentType = "application/json"; final String accept = "application/json"; @@ -594,13 +594,16 @@ private Mono<Response<ManagedClusterInner>> updateWithResponseAsync(String resou * @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 managed cluster resource on successful completion of {@link Mono}. + * @return the managed cluster resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono<ManagedClusterInner> updateAsync(String resourceGroupName, String clusterName, + private Response<BinaryData> updateWithResponse(String resourceGroupName, String clusterName, ManagedClusterUpdateParameters parameters) { - return updateWithResponseAsync(resourceGroupName, clusterName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, parameters, + Context.NONE); } /** @@ -616,7 +619,7 @@ private Mono<ManagedClusterInner> updateAsync(String resourceGroupName, String c * @return the managed cluster resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response<ManagedClusterInner> updateWithResponse(String resourceGroupName, String clusterName, + private Response<BinaryData> updateWithResponse(String resourceGroupName, String clusterName, ManagedClusterUpdateParameters parameters, Context context) { final String contentType = "application/json"; final String accept = "application/json"; @@ -624,6 +627,82 @@ public Response<ManagedClusterInner> updateWithResponse(String resourceGroupName this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, parameters, context); } + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @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 {@link PollerFlux} for polling of the managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<ManagedClusterInner>, ManagedClusterInner> beginUpdateAsync(String resourceGroupName, + String clusterName, ManagedClusterUpdateParameters parameters) { + Mono<Response<Flux<ByteBuffer>>> mono = updateWithResponseAsync(resourceGroupName, clusterName, parameters); + return this.client.<ManagedClusterInner, ManagedClusterInner>getLroResult(mono, this.client.getHttpPipeline(), + ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); + } + + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @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 {@link SyncPoller} for polling of the managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ManagedClusterInner>, ManagedClusterInner> beginUpdate(String resourceGroupName, + String clusterName, ManagedClusterUpdateParameters parameters) { + Response<BinaryData> response = updateWithResponse(resourceGroupName, clusterName, parameters); + return this.client.<ManagedClusterInner, ManagedClusterInner>getLroResult(response, ManagedClusterInner.class, + ManagedClusterInner.class, Context.NONE); + } + + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @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 {@link SyncPoller} for polling of the managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<ManagedClusterInner>, ManagedClusterInner> beginUpdate(String resourceGroupName, + String clusterName, ManagedClusterUpdateParameters parameters, Context context) { + Response<BinaryData> response = updateWithResponse(resourceGroupName, clusterName, parameters, context); + return this.client.<ManagedClusterInner, ManagedClusterInner>getLroResult(response, ManagedClusterInner.class, + ManagedClusterInner.class, context); + } + + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @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 managed cluster resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<ManagedClusterInner> updateAsync(String resourceGroupName, String clusterName, + ManagedClusterUpdateParameters parameters) { + return beginUpdateAsync(resourceGroupName, clusterName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + /** * Update the tags of of a Service Fabric managed cluster resource with the specified name. * @@ -638,7 +717,25 @@ public Response<ManagedClusterInner> updateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) public ManagedClusterInner update(String resourceGroupName, String clusterName, ManagedClusterUpdateParameters parameters) { - return updateWithResponse(resourceGroupName, clusterName, parameters, Context.NONE).getValue(); + return beginUpdate(resourceGroupName, clusterName, parameters).getFinalResult(); + } + + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @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 managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner update(String resourceGroupName, String clusterName, + ManagedClusterUpdateParameters parameters, Context context) { + return beginUpdate(resourceGroupName, clusterName, parameters, context).getFinalResult(); } /** diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java index 569461b5ba16..4ad520fb18a7 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java @@ -676,7 +676,7 @@ public NodeTypeInner createOrUpdate(String resourceGroupName, String clusterName } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -701,7 +701,7 @@ private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync(String resource } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -724,7 +724,7 @@ private Response<BinaryData> updateWithResponse(String resourceGroupName, String } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -748,7 +748,7 @@ private Response<BinaryData> updateWithResponse(String resourceGroupName, String } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -770,7 +770,7 @@ private PollerFlux<PollResult<NodeTypeInner>, NodeTypeInner> beginUpdateAsync(St } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -791,7 +791,7 @@ public SyncPoller<PollResult<NodeTypeInner>, NodeTypeInner> beginUpdate(String r } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -814,7 +814,7 @@ public SyncPoller<PollResult<NodeTypeInner>, NodeTypeInner> beginUpdate(String r } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -834,7 +834,7 @@ private Mono<NodeTypeInner> updateAsync(String resourceGroupName, String cluster } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. @@ -852,7 +852,7 @@ public NodeTypeInner update(String resourceGroupName, String clusterName, String } /** - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Update the configuration of a node type of a given managed cluster, only updating tags or capacity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientImpl.java index 0a9a84413d99..414fe9078395 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientImpl.java @@ -337,7 +337,7 @@ public NodeTypeSkusClient getNodeTypeSkus() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2025-06-01-preview"; + this.apiVersion = "2025-10-01-preview"; this.operations = new OperationsClientImpl(this); this.applications = new ApplicationsClientImpl(this); this.applicationTypes = new ApplicationTypesClientImpl(this); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceResourceImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceResourceImpl.java index ba396666eb02..757868522a3d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceResourceImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceResourceImpl.java @@ -8,6 +8,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ServiceResourceInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResource; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResourceProperties; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceUpdateParameters; @@ -160,6 +161,16 @@ public ServiceResource refresh(Context context) { return this; } + public void restartReplica(RestartReplicaRequest parameters) { + serviceManager.services() + .restartReplica(resourceGroupName, clusterName, applicationName, serviceName, parameters); + } + + public void restartReplica(RestartReplicaRequest parameters, Context context) { + serviceManager.services() + .restartReplica(resourceGroupName, clusterName, applicationName, serviceName, parameters, context); + } + public ServiceResourceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesClientImpl.java index 2a6a31084ee7..b9d79cd49ac1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesClientImpl.java @@ -14,6 +14,7 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -36,6 +37,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ServiceResourceInner; import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ServiceResourceList; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -172,6 +174,28 @@ Response<ServiceResourceList> listByApplicationsSync(@HostParam("endpoint") Stri @PathParam("applicationName") String applicationName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}/restartReplica") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono<Response<Flux<ByteBuffer>>> restartReplica(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("applicationName") String applicationName, @PathParam("serviceName") String serviceName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RestartReplicaRequest parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}/restartReplica") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response<BinaryData> restartReplicaSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("applicationName") String applicationName, @PathParam("serviceName") String serviceName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RestartReplicaRequest parameters, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -882,6 +906,198 @@ public PagedIterable<ServiceResourceInner> listByApplications(String resourceGro nextLink -> listByApplicationsNextSinglePage(nextLink, context)); } + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Response<Flux<ByteBuffer>>> restartReplicaWithResponseAsync(String resourceGroupName, + String clusterName, String applicationName, String serviceName, RestartReplicaRequest parameters) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.restartReplica(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, serviceName, + contentType, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> restartReplicaWithResponse(String resourceGroupName, String clusterName, + String applicationName, String serviceName, RestartReplicaRequest parameters) { + final String contentType = "application/json"; + return service.restartReplicaSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, serviceName, contentType, + parameters, Context.NONE); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response<BinaryData> restartReplicaWithResponse(String resourceGroupName, String clusterName, + String applicationName, String serviceName, RestartReplicaRequest parameters, Context context) { + final String contentType = "application/json"; + return service.restartReplicaSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, serviceName, contentType, + parameters, context); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux<PollResult<Void>, Void> beginRestartReplicaAsync(String resourceGroupName, String clusterName, + String applicationName, String serviceName, RestartReplicaRequest parameters) { + Mono<Response<Flux<ByteBuffer>>> mono + = restartReplicaWithResponseAsync(resourceGroupName, clusterName, applicationName, serviceName, parameters); + return this.client.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginRestartReplica(String resourceGroupName, String clusterName, + String applicationName, String serviceName, RestartReplicaRequest parameters) { + Response<BinaryData> response + = restartReplicaWithResponse(resourceGroupName, clusterName, applicationName, serviceName, parameters); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller<PollResult<Void>, Void> beginRestartReplica(String resourceGroupName, String clusterName, + String applicationName, String serviceName, RestartReplicaRequest parameters, Context context) { + Response<BinaryData> response = restartReplicaWithResponse(resourceGroupName, clusterName, applicationName, + serviceName, parameters, context); + return this.client.<Void, Void>getLroResult(response, Void.class, Void.class, context); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono<Void> restartReplicaAsync(String resourceGroupName, String clusterName, String applicationName, + String serviceName, RestartReplicaRequest parameters) { + return beginRestartReplicaAsync(resourceGroupName, clusterName, applicationName, serviceName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @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 restartReplica(String resourceGroupName, String clusterName, String applicationName, String serviceName, + RestartReplicaRequest parameters) { + beginRestartReplica(resourceGroupName, clusterName, applicationName, serviceName, parameters).getFinalResult(); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @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 restartReplica(String resourceGroupName, String clusterName, String applicationName, String serviceName, + RestartReplicaRequest parameters, Context context) { + beginRestartReplica(resourceGroupName, clusterName, applicationName, serviceName, parameters, context) + .getFinalResult(); + } + /** * Get the next page of items. * diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesImpl.java index 40c3afe21a72..93fd30986ec3 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesImpl.java @@ -11,6 +11,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ServiceResourceInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResource; import com.azure.resourcemanager.servicefabricmanagedclusters.models.Services; @@ -73,6 +74,17 @@ public PagedIterable<ServiceResource> listByApplications(String resourceGroupNam return ResourceManagerUtils.mapPage(inner, inner1 -> new ServiceResourceImpl(inner1, this.manager())); } + public void restartReplica(String resourceGroupName, String clusterName, String applicationName, String serviceName, + RestartReplicaRequest parameters) { + this.serviceClient().restartReplica(resourceGroupName, clusterName, applicationName, serviceName, parameters); + } + + public void restartReplica(String resourceGroupName, String clusterName, String applicationName, String serviceName, + RestartReplicaRequest parameters, Context context) { + this.serviceClient() + .restartReplica(resourceGroupName, clusterName, applicationName, serviceName, parameters, context); + } + public ServiceResource getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationFetchHealthRequest.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationFetchHealthRequest.java new file mode 100644 index 000000000000..82d6d228b5cc --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationFetchHealthRequest.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Parameters for fetching the health of an application. + */ +@Fluent +public final class ApplicationFetchHealthRequest implements JsonSerializable<ApplicationFetchHealthRequest> { + /* + * Allows filtering of the health events returned in the response based on health state. + */ + private HealthFilter eventsHealthStateFilter; + + /* + * Allows filtering of the deployed applications health state objects returned in the result of application health + * query based on their health state. + */ + private HealthFilter deployedApplicationsHealthStateFilter; + + /* + * Allows filtering of the services health state objects returned in the result of services health query based on + * their health state. + */ + private HealthFilter servicesHealthStateFilter; + + /* + * Indicates whether the health statistics should be returned as part of the query result. False by default. The + * statistics show the number of children entities in health state Ok, Warning, and Error. + */ + private Boolean excludeHealthStatistics; + + /* + * Request timeout for the health query in seconds. The default value is 60 seconds. + */ + private Long timeout; + + /** + * Creates an instance of ApplicationFetchHealthRequest class. + */ + public ApplicationFetchHealthRequest() { + } + + /** + * Get the eventsHealthStateFilter property: Allows filtering of the health events returned in the response based on + * health state. + * + * @return the eventsHealthStateFilter value. + */ + public HealthFilter eventsHealthStateFilter() { + return this.eventsHealthStateFilter; + } + + /** + * Set the eventsHealthStateFilter property: Allows filtering of the health events returned in the response based on + * health state. + * + * @param eventsHealthStateFilter the eventsHealthStateFilter value to set. + * @return the ApplicationFetchHealthRequest object itself. + */ + public ApplicationFetchHealthRequest withEventsHealthStateFilter(HealthFilter eventsHealthStateFilter) { + this.eventsHealthStateFilter = eventsHealthStateFilter; + return this; + } + + /** + * Get the deployedApplicationsHealthStateFilter property: Allows filtering of the deployed applications health + * state objects returned in the result of application health query based on their health state. + * + * @return the deployedApplicationsHealthStateFilter value. + */ + public HealthFilter deployedApplicationsHealthStateFilter() { + return this.deployedApplicationsHealthStateFilter; + } + + /** + * Set the deployedApplicationsHealthStateFilter property: Allows filtering of the deployed applications health + * state objects returned in the result of application health query based on their health state. + * + * @param deployedApplicationsHealthStateFilter the deployedApplicationsHealthStateFilter value to set. + * @return the ApplicationFetchHealthRequest object itself. + */ + public ApplicationFetchHealthRequest + withDeployedApplicationsHealthStateFilter(HealthFilter deployedApplicationsHealthStateFilter) { + this.deployedApplicationsHealthStateFilter = deployedApplicationsHealthStateFilter; + return this; + } + + /** + * Get the servicesHealthStateFilter property: Allows filtering of the services health state objects returned in the + * result of services health query based on their health state. + * + * @return the servicesHealthStateFilter value. + */ + public HealthFilter servicesHealthStateFilter() { + return this.servicesHealthStateFilter; + } + + /** + * Set the servicesHealthStateFilter property: Allows filtering of the services health state objects returned in the + * result of services health query based on their health state. + * + * @param servicesHealthStateFilter the servicesHealthStateFilter value to set. + * @return the ApplicationFetchHealthRequest object itself. + */ + public ApplicationFetchHealthRequest withServicesHealthStateFilter(HealthFilter servicesHealthStateFilter) { + this.servicesHealthStateFilter = servicesHealthStateFilter; + return this; + } + + /** + * Get the excludeHealthStatistics property: Indicates whether the health statistics should be returned as part of + * the query result. False by default. The statistics show the number of children entities in health state Ok, + * Warning, and Error. + * + * @return the excludeHealthStatistics value. + */ + public Boolean excludeHealthStatistics() { + return this.excludeHealthStatistics; + } + + /** + * Set the excludeHealthStatistics property: Indicates whether the health statistics should be returned as part of + * the query result. False by default. The statistics show the number of children entities in health state Ok, + * Warning, and Error. + * + * @param excludeHealthStatistics the excludeHealthStatistics value to set. + * @return the ApplicationFetchHealthRequest object itself. + */ + public ApplicationFetchHealthRequest withExcludeHealthStatistics(Boolean excludeHealthStatistics) { + this.excludeHealthStatistics = excludeHealthStatistics; + return this; + } + + /** + * Get the timeout property: Request timeout for the health query in seconds. The default value is 60 seconds. + * + * @return the timeout value. + */ + public Long timeout() { + return this.timeout; + } + + /** + * Set the timeout property: Request timeout for the health query in seconds. The default value is 60 seconds. + * + * @param timeout the timeout value to set. + * @return the ApplicationFetchHealthRequest object itself. + */ + public ApplicationFetchHealthRequest withTimeout(Long timeout) { + this.timeout = timeout; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("eventsHealthStateFilter", + this.eventsHealthStateFilter == null ? null : this.eventsHealthStateFilter.toString()); + jsonWriter.writeStringField("deployedApplicationsHealthStateFilter", + this.deployedApplicationsHealthStateFilter == null + ? null + : this.deployedApplicationsHealthStateFilter.toString()); + jsonWriter.writeStringField("servicesHealthStateFilter", + this.servicesHealthStateFilter == null ? null : this.servicesHealthStateFilter.toString()); + jsonWriter.writeBooleanField("excludeHealthStatistics", this.excludeHealthStatistics); + jsonWriter.writeNumberField("timeout", this.timeout); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ApplicationFetchHealthRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ApplicationFetchHealthRequest if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ApplicationFetchHealthRequest. + */ + public static ApplicationFetchHealthRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ApplicationFetchHealthRequest deserializedApplicationFetchHealthRequest + = new ApplicationFetchHealthRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("eventsHealthStateFilter".equals(fieldName)) { + deserializedApplicationFetchHealthRequest.eventsHealthStateFilter + = HealthFilter.fromString(reader.getString()); + } else if ("deployedApplicationsHealthStateFilter".equals(fieldName)) { + deserializedApplicationFetchHealthRequest.deployedApplicationsHealthStateFilter + = HealthFilter.fromString(reader.getString()); + } else if ("servicesHealthStateFilter".equals(fieldName)) { + deserializedApplicationFetchHealthRequest.servicesHealthStateFilter + = HealthFilter.fromString(reader.getString()); + } else if ("excludeHealthStatistics".equals(fieldName)) { + deserializedApplicationFetchHealthRequest.excludeHealthStatistics + = reader.getNullable(JsonReader::getBoolean); + } else if ("timeout".equals(fieldName)) { + deserializedApplicationFetchHealthRequest.timeout = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedApplicationFetchHealthRequest; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResource.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResource.java index 24de821e8ec1..dc075d8bd72f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResource.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResource.java @@ -303,7 +303,7 @@ interface WithUpgradePolicy { /** * The template for ApplicationResource update. */ - interface Update extends UpdateStages.WithTags { + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. * @@ -336,6 +336,19 @@ interface WithTags { */ Update withTags(Map<String, String> tags); } + + /** + * The stage of the ApplicationResource update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Application update parameters properties.. + * + * @param properties Application update parameters properties. + * @return the next definition stage. + */ + Update withProperties(ApplicationUpdateParametersProperties properties); + } } /** @@ -415,4 +428,71 @@ interface WithTags { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void startRollback(Context context); + + /** + * Send a request to update the current application upgrade. + * + * @param parameters The parameters for updating an application upgrade. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void updateUpgrade(RuntimeUpdateApplicationUpgradeParameters parameters); + + /** + * Send a request to update the current application upgrade. + * + * @param parameters The parameters for updating an application upgrade. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void updateUpgrade(RuntimeUpdateApplicationUpgradeParameters parameters, Context context); + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param parameters The parameters for fetching the health of a deployed application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void fetchHealth(ApplicationFetchHealthRequest parameters); + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param parameters The parameters for fetching the health of a deployed application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void fetchHealth(ApplicationFetchHealthRequest parameters, Context context); + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param parameters The parameters for restarting a deployed code package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restartDeployedCodePackage(RestartDeployedCodePackageRequest parameters); + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param parameters The parameters for restarting a deployed code package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restartDeployedCodePackage(RestartDeployedCodePackageRequest parameters, Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParameters.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParameters.java index 19f7e04d836f..0cacd002bf76 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParameters.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParameters.java @@ -22,6 +22,11 @@ public final class ApplicationUpdateParameters implements JsonSerializable<Appli */ private Map<String, String> tags; + /* + * Application update parameters properties. + */ + private ApplicationUpdateParametersProperties properties; + /** * Creates an instance of ApplicationUpdateParameters class. */ @@ -48,6 +53,26 @@ public ApplicationUpdateParameters withTags(Map<String, String> tags) { return this; } + /** + * Get the properties property: Application update parameters properties. + * + * @return the properties value. + */ + public ApplicationUpdateParametersProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Application update parameters properties. + * + * @param properties the properties value to set. + * @return the ApplicationUpdateParameters object itself. + */ + public ApplicationUpdateParameters withProperties(ApplicationUpdateParametersProperties properties) { + this.properties = properties; + return this; + } + /** * {@inheritDoc} */ @@ -55,6 +80,7 @@ public ApplicationUpdateParameters withTags(Map<String, String> tags) { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); return jsonWriter.writeEndObject(); } @@ -76,6 +102,9 @@ public static ApplicationUpdateParameters fromJson(JsonReader jsonReader) throws if ("tags".equals(fieldName)) { Map<String, String> tags = reader.readMap(reader1 -> reader1.getString()); deserializedApplicationUpdateParameters.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedApplicationUpdateParameters.properties + = ApplicationUpdateParametersProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParametersProperties.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParametersProperties.java new file mode 100644 index 000000000000..332ea296bf02 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParametersProperties.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Properties for application update request. + */ +@Fluent +public final class ApplicationUpdateParametersProperties + implements JsonSerializable<ApplicationUpdateParametersProperties> { + /* + * List of application parameters with overridden values from their default values specified in the application + * manifest. + */ + private Map<String, String> parameters; + + /** + * Creates an instance of ApplicationUpdateParametersProperties class. + */ + public ApplicationUpdateParametersProperties() { + } + + /** + * Get the parameters property: List of application parameters with overridden values from their default values + * specified in the application manifest. + * + * @return the parameters value. + */ + public Map<String, String> parameters() { + return this.parameters; + } + + /** + * Set the parameters property: List of application parameters with overridden values from their default values + * specified in the application manifest. + * + * @param parameters the parameters value to set. + * @return the ApplicationUpdateParametersProperties object itself. + */ + public ApplicationUpdateParametersProperties withParameters(Map<String, String> parameters) { + this.parameters = parameters; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("parameters", this.parameters, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ApplicationUpdateParametersProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ApplicationUpdateParametersProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ApplicationUpdateParametersProperties. + */ + public static ApplicationUpdateParametersProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ApplicationUpdateParametersProperties deserializedApplicationUpdateParametersProperties + = new ApplicationUpdateParametersProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("parameters".equals(fieldName)) { + Map<String, String> parameters = reader.readMap(reader1 -> reader1.getString()); + deserializedApplicationUpdateParametersProperties.parameters = parameters; + } else { + reader.skipChildren(); + } + } + + return deserializedApplicationUpdateParametersProperties; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Applications.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Applications.java index 158e1bcaa514..7871d7f36dd9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Applications.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Applications.java @@ -183,6 +183,97 @@ void resumeUpgrade(String resourceGroupName, String clusterName, String applicat */ void startRollback(String resourceGroupName, String clusterName, String applicationName, Context context); + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void updateUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters); + + /** + * Send a request to update the current application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for updating an application upgrade. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void updateUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeUpdateApplicationUpgradeParameters parameters, Context context); + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void fetchHealth(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters); + + /** + * Get the status of the deployed application health. It will query the cluster to find the health of the deployed + * application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for fetching the health of a deployed application. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void fetchHealth(String resourceGroupName, String clusterName, String applicationName, + ApplicationFetchHealthRequest parameters, Context context); + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restartDeployedCodePackage(String resourceGroupName, String clusterName, String applicationName, + RestartDeployedCodePackageRequest parameters); + + /** + * Restart a code package instance of a service replica or instance. This is a potentially destabilizing operation + * that should be used with immense care. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param parameters The parameters for restarting a deployed code package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restartDeployedCodePackage(String resourceGroupName, String clusterName, String applicationName, + RestartDeployedCodePackageRequest parameters, Context context); + /** * Get a Service Fabric managed application resource created or in the process of being created in the Service * Fabric cluster resource. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/HealthFilter.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/HealthFilter.java new file mode 100644 index 000000000000..698180e3a4eb --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/HealthFilter.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum for filtering health events. + */ +public final class HealthFilter extends ExpandableStringEnum<HealthFilter> { + /** + * Default value. Matches any health state. + */ + public static final HealthFilter DEFAULT = fromString("Default"); + + /** + * Filter that doesn't match any health state. Used to return no results on a given collection of health entities. + */ + public static final HealthFilter NONE = fromString("None"); + + /** + * Filter for health state Ok. + */ + public static final HealthFilter OK = fromString("Ok"); + + /** + * Filter for health state Warning. + */ + public static final HealthFilter WARNING = fromString("Warning"); + + /** + * Filter for health state Error. + */ + public static final HealthFilter ERROR = fromString("Error"); + + /** + * Filter that matches input with any health state. + */ + public static final HealthFilter ALL = fromString("All"); + + /** + * Creates a new instance of HealthFilter value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HealthFilter() { + } + + /** + * Creates or finds a HealthFilter from its string representation. + * + * @param name a name to look for. + * @return the corresponding HealthFilter. + */ + public static HealthFilter fromString(String name) { + return fromString(name, HealthFilter.class); + } + + /** + * Gets known HealthFilter values. + * + * @return known HealthFilter values. + */ + public static Collection<HealthFilter> values() { + return values(HealthFilter.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartDeployedCodePackageRequest.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartDeployedCodePackageRequest.java new file mode 100644 index 000000000000..fc298f4f0e49 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartDeployedCodePackageRequest.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Parameters for restarting a deployed code package. + */ +@Fluent +public final class RestartDeployedCodePackageRequest implements JsonSerializable<RestartDeployedCodePackageRequest> { + /* + * The name of the node where the code package needs to be restarted. Use '*' to restart on all nodes where the code + * package is running. + */ + private String nodeName; + + /* + * The name of the service manifest as specified in the code package. + */ + private String serviceManifestName; + + /* + * The name of the code package as specified in the service manifest. + */ + private String codePackageName; + + /* + * The instance ID for currently running entry point. For a code package setup entry point (if specified) runs first + * and after it finishes main entry point is started. Each time entry point executable is run, its instance ID will + * change. If 0 is passed in as the code package instance ID, the API will restart the code package with whatever + * instance ID it is currently running. If an instance ID other than 0 is passed in, the API will restart the code + * package only if the current Instance ID matches the passed in instance ID. Note, passing in the exact instance ID + * (not 0) in the API is safer, because if ensures at most one restart of the code package. + */ + private String codePackageInstanceId; + + /* + * The activation id of a deployed service package. If ServicePackageActivationMode specified at the time of + * creating the service is 'SharedProcess' (or if it is not specified, in which case it defaults to + * 'SharedProcess'), then value of ServicePackageActivationId is always an empty string. + */ + private String servicePackageActivationId; + + /** + * Creates an instance of RestartDeployedCodePackageRequest class. + */ + public RestartDeployedCodePackageRequest() { + } + + /** + * Get the nodeName property: The name of the node where the code package needs to be restarted. Use '*' to restart + * on all nodes where the code package is running. + * + * @return the nodeName value. + */ + public String nodeName() { + return this.nodeName; + } + + /** + * Set the nodeName property: The name of the node where the code package needs to be restarted. Use '*' to restart + * on all nodes where the code package is running. + * + * @param nodeName the nodeName value to set. + * @return the RestartDeployedCodePackageRequest object itself. + */ + public RestartDeployedCodePackageRequest withNodeName(String nodeName) { + this.nodeName = nodeName; + return this; + } + + /** + * Get the serviceManifestName property: The name of the service manifest as specified in the code package. + * + * @return the serviceManifestName value. + */ + public String serviceManifestName() { + return this.serviceManifestName; + } + + /** + * Set the serviceManifestName property: The name of the service manifest as specified in the code package. + * + * @param serviceManifestName the serviceManifestName value to set. + * @return the RestartDeployedCodePackageRequest object itself. + */ + public RestartDeployedCodePackageRequest withServiceManifestName(String serviceManifestName) { + this.serviceManifestName = serviceManifestName; + return this; + } + + /** + * Get the codePackageName property: The name of the code package as specified in the service manifest. + * + * @return the codePackageName value. + */ + public String codePackageName() { + return this.codePackageName; + } + + /** + * Set the codePackageName property: The name of the code package as specified in the service manifest. + * + * @param codePackageName the codePackageName value to set. + * @return the RestartDeployedCodePackageRequest object itself. + */ + public RestartDeployedCodePackageRequest withCodePackageName(String codePackageName) { + this.codePackageName = codePackageName; + return this; + } + + /** + * Get the codePackageInstanceId property: The instance ID for currently running entry point. For a code package + * setup entry point (if specified) runs first and after it finishes main entry point is started. Each time entry + * point executable is run, its instance ID will change. If 0 is passed in as the code package instance ID, the API + * will restart the code package with whatever instance ID it is currently running. If an instance ID other than 0 + * is passed in, the API will restart the code package only if the current Instance ID matches the passed in + * instance ID. Note, passing in the exact instance ID (not 0) in the API is safer, because if ensures at most one + * restart of the code package. + * + * @return the codePackageInstanceId value. + */ + public String codePackageInstanceId() { + return this.codePackageInstanceId; + } + + /** + * Set the codePackageInstanceId property: The instance ID for currently running entry point. For a code package + * setup entry point (if specified) runs first and after it finishes main entry point is started. Each time entry + * point executable is run, its instance ID will change. If 0 is passed in as the code package instance ID, the API + * will restart the code package with whatever instance ID it is currently running. If an instance ID other than 0 + * is passed in, the API will restart the code package only if the current Instance ID matches the passed in + * instance ID. Note, passing in the exact instance ID (not 0) in the API is safer, because if ensures at most one + * restart of the code package. + * + * @param codePackageInstanceId the codePackageInstanceId value to set. + * @return the RestartDeployedCodePackageRequest object itself. + */ + public RestartDeployedCodePackageRequest withCodePackageInstanceId(String codePackageInstanceId) { + this.codePackageInstanceId = codePackageInstanceId; + return this; + } + + /** + * Get the servicePackageActivationId property: The activation id of a deployed service package. If + * ServicePackageActivationMode specified at the time of creating the service is 'SharedProcess' (or if it is not + * specified, in which case it defaults to 'SharedProcess'), then value of ServicePackageActivationId is always an + * empty string. + * + * @return the servicePackageActivationId value. + */ + public String servicePackageActivationId() { + return this.servicePackageActivationId; + } + + /** + * Set the servicePackageActivationId property: The activation id of a deployed service package. If + * ServicePackageActivationMode specified at the time of creating the service is 'SharedProcess' (or if it is not + * specified, in which case it defaults to 'SharedProcess'), then value of ServicePackageActivationId is always an + * empty string. + * + * @param servicePackageActivationId the servicePackageActivationId value to set. + * @return the RestartDeployedCodePackageRequest object itself. + */ + public RestartDeployedCodePackageRequest withServicePackageActivationId(String servicePackageActivationId) { + this.servicePackageActivationId = servicePackageActivationId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nodeName", this.nodeName); + jsonWriter.writeStringField("serviceManifestName", this.serviceManifestName); + jsonWriter.writeStringField("codePackageName", this.codePackageName); + jsonWriter.writeStringField("codePackageInstanceId", this.codePackageInstanceId); + jsonWriter.writeStringField("servicePackageActivationId", this.servicePackageActivationId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RestartDeployedCodePackageRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RestartDeployedCodePackageRequest if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RestartDeployedCodePackageRequest. + */ + public static RestartDeployedCodePackageRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RestartDeployedCodePackageRequest deserializedRestartDeployedCodePackageRequest + = new RestartDeployedCodePackageRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nodeName".equals(fieldName)) { + deserializedRestartDeployedCodePackageRequest.nodeName = reader.getString(); + } else if ("serviceManifestName".equals(fieldName)) { + deserializedRestartDeployedCodePackageRequest.serviceManifestName = reader.getString(); + } else if ("codePackageName".equals(fieldName)) { + deserializedRestartDeployedCodePackageRequest.codePackageName = reader.getString(); + } else if ("codePackageInstanceId".equals(fieldName)) { + deserializedRestartDeployedCodePackageRequest.codePackageInstanceId = reader.getString(); + } else if ("servicePackageActivationId".equals(fieldName)) { + deserializedRestartDeployedCodePackageRequest.servicePackageActivationId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRestartDeployedCodePackageRequest; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartKind.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartKind.java new file mode 100644 index 000000000000..dd7bcd25b64d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartKind.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The kind of restart to perform. + */ +public final class RestartKind extends ExpandableStringEnum<RestartKind> { + /** + * Restart all listed replicas at the same time. + */ + public static final RestartKind SIMULTANEOUS = fromString("Simultaneous"); + + /** + * Creates a new instance of RestartKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RestartKind() { + } + + /** + * Creates or finds a RestartKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding RestartKind. + */ + public static RestartKind fromString(String name) { + return fromString(name, RestartKind.class); + } + + /** + * Gets known RestartKind values. + * + * @return known RestartKind values. + */ + public static Collection<RestartKind> values() { + return values(RestartKind.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartReplicaRequest.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartReplicaRequest.java new file mode 100644 index 000000000000..22fcc9c0a368 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartReplicaRequest.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Request to restart a replica. + */ +@Fluent +public final class RestartReplicaRequest implements JsonSerializable<RestartReplicaRequest> { + /* + * The ID of the partition. + */ + private String partitionId; + + /* + * The IDs of the replicas to be restarted. + */ + private List<Long> replicaIds; + + /* + * The kind of restart to perform. + */ + private RestartKind restartKind; + + /* + * If true, the restart operation will be forced. Use this option with care, as it may cause data loss. + */ + private Boolean forceRestart; + + /* + * The server timeout for performing the operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The default value for this parameter is 60 + * seconds. + */ + private Long timeout; + + /** + * Creates an instance of RestartReplicaRequest class. + */ + public RestartReplicaRequest() { + } + + /** + * Get the partitionId property: The ID of the partition. + * + * @return the partitionId value. + */ + public String partitionId() { + return this.partitionId; + } + + /** + * Set the partitionId property: The ID of the partition. + * + * @param partitionId the partitionId value to set. + * @return the RestartReplicaRequest object itself. + */ + public RestartReplicaRequest withPartitionId(String partitionId) { + this.partitionId = partitionId; + return this; + } + + /** + * Get the replicaIds property: The IDs of the replicas to be restarted. + * + * @return the replicaIds value. + */ + public List<Long> replicaIds() { + return this.replicaIds; + } + + /** + * Set the replicaIds property: The IDs of the replicas to be restarted. + * + * @param replicaIds the replicaIds value to set. + * @return the RestartReplicaRequest object itself. + */ + public RestartReplicaRequest withReplicaIds(List<Long> replicaIds) { + this.replicaIds = replicaIds; + return this; + } + + /** + * Get the restartKind property: The kind of restart to perform. + * + * @return the restartKind value. + */ + public RestartKind restartKind() { + return this.restartKind; + } + + /** + * Set the restartKind property: The kind of restart to perform. + * + * @param restartKind the restartKind value to set. + * @return the RestartReplicaRequest object itself. + */ + public RestartReplicaRequest withRestartKind(RestartKind restartKind) { + this.restartKind = restartKind; + return this; + } + + /** + * Get the forceRestart property: If true, the restart operation will be forced. Use this option with care, as it + * may cause data loss. + * + * @return the forceRestart value. + */ + public Boolean forceRestart() { + return this.forceRestart; + } + + /** + * Set the forceRestart property: If true, the restart operation will be forced. Use this option with care, as it + * may cause data loss. + * + * @param forceRestart the forceRestart value to set. + * @return the RestartReplicaRequest object itself. + */ + public RestartReplicaRequest withForceRestart(Boolean forceRestart) { + this.forceRestart = forceRestart; + return this; + } + + /** + * Get the timeout property: The server timeout for performing the operation in seconds. This timeout specifies the + * time duration that the client is willing to wait for the requested operation to complete. The default value for + * this parameter is 60 seconds. + * + * @return the timeout value. + */ + public Long timeout() { + return this.timeout; + } + + /** + * Set the timeout property: The server timeout for performing the operation in seconds. This timeout specifies the + * time duration that the client is willing to wait for the requested operation to complete. The default value for + * this parameter is 60 seconds. + * + * @param timeout the timeout value to set. + * @return the RestartReplicaRequest object itself. + */ + public RestartReplicaRequest withTimeout(Long timeout) { + this.timeout = timeout; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("partitionId", this.partitionId); + jsonWriter.writeArrayField("replicaIds", this.replicaIds, (writer, element) -> writer.writeLong(element)); + jsonWriter.writeStringField("restartKind", this.restartKind == null ? null : this.restartKind.toString()); + jsonWriter.writeBooleanField("forceRestart", this.forceRestart); + jsonWriter.writeNumberField("timeout", this.timeout); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RestartReplicaRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RestartReplicaRequest if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RestartReplicaRequest. + */ + public static RestartReplicaRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RestartReplicaRequest deserializedRestartReplicaRequest = new RestartReplicaRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("partitionId".equals(fieldName)) { + deserializedRestartReplicaRequest.partitionId = reader.getString(); + } else if ("replicaIds".equals(fieldName)) { + List<Long> replicaIds = reader.readArray(reader1 -> reader1.getLong()); + deserializedRestartReplicaRequest.replicaIds = replicaIds; + } else if ("restartKind".equals(fieldName)) { + deserializedRestartReplicaRequest.restartKind = RestartKind.fromString(reader.getString()); + } else if ("forceRestart".equals(fieldName)) { + deserializedRestartReplicaRequest.forceRestart = reader.getNullable(JsonReader::getBoolean); + } else if ("timeout".equals(fieldName)) { + deserializedRestartReplicaRequest.timeout = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedRestartReplicaRequest; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMode.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMode.java index 9476ffeebaa8..63276bbc698f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMode.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMode.java @@ -13,12 +13,11 @@ public final class RollingUpgradeMode extends ExpandableStringEnum<RollingUpgradeMode> { /** * The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. - * The value is 0. */ public static final RollingUpgradeMode MONITORED = fromString("Monitored"); /** - * The upgrade will proceed automatically without performing any health monitoring. The value is 1. + * The upgrade will proceed automatically without performing any health monitoring. */ public static final RollingUpgradeMode UNMONITORED_AUTO = fromString("UnmonitoredAuto"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeApplicationHealthPolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeApplicationHealthPolicy.java new file mode 100644 index 000000000000..27f755e2458a --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeApplicationHealthPolicy.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Cluster level definition for a health policy used to evaluate the health of an application or one of its children + * entities. + */ +@Fluent +public final class RuntimeApplicationHealthPolicy implements JsonSerializable<RuntimeApplicationHealthPolicy> { + /* + * Indicates whether warnings are treated with the same severity as errors. + */ + private boolean considerWarningAsError; + + /* + * The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to + * 100. + * The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before + * the application is considered in error. + * This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the + * application is currently deployed on in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. + */ + private int maxPercentUnhealthyDeployedApplications; + + /* + * The health policy used by default to evaluate the health of a service type. + */ + private RuntimeServiceTypeHealthPolicy defaultServiceTypeHealthPolicy; + + /* + * The map with service type health policy per service type name. The map is empty by default. + */ + private Map<String, RuntimeServiceTypeHealthPolicy> serviceTypeHealthPolicyMap; + + /** + * Creates an instance of RuntimeApplicationHealthPolicy class. + */ + public RuntimeApplicationHealthPolicy() { + } + + /** + * Get the considerWarningAsError property: Indicates whether warnings are treated with the same severity as errors. + * + * @return the considerWarningAsError value. + */ + public boolean considerWarningAsError() { + return this.considerWarningAsError; + } + + /** + * Set the considerWarningAsError property: Indicates whether warnings are treated with the same severity as errors. + * + * @param considerWarningAsError the considerWarningAsError value to set. + * @return the RuntimeApplicationHealthPolicy object itself. + */ + public RuntimeApplicationHealthPolicy withConsiderWarningAsError(boolean considerWarningAsError) { + this.considerWarningAsError = considerWarningAsError; + return this; + } + + /** + * Get the maxPercentUnhealthyDeployedApplications property: The maximum allowed percentage of unhealthy deployed + * applications. Allowed values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before + * the application is considered in error. + * This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the + * application is currently deployed on in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. + * + * @return the maxPercentUnhealthyDeployedApplications value. + */ + public int maxPercentUnhealthyDeployedApplications() { + return this.maxPercentUnhealthyDeployedApplications; + } + + /** + * Set the maxPercentUnhealthyDeployedApplications property: The maximum allowed percentage of unhealthy deployed + * applications. Allowed values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before + * the application is considered in error. + * This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the + * application is currently deployed on in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. + * + * @param maxPercentUnhealthyDeployedApplications the maxPercentUnhealthyDeployedApplications value to set. + * @return the RuntimeApplicationHealthPolicy object itself. + */ + public RuntimeApplicationHealthPolicy + withMaxPercentUnhealthyDeployedApplications(int maxPercentUnhealthyDeployedApplications) { + this.maxPercentUnhealthyDeployedApplications = maxPercentUnhealthyDeployedApplications; + return this; + } + + /** + * Get the defaultServiceTypeHealthPolicy property: The health policy used by default to evaluate the health of a + * service type. + * + * @return the defaultServiceTypeHealthPolicy value. + */ + public RuntimeServiceTypeHealthPolicy defaultServiceTypeHealthPolicy() { + return this.defaultServiceTypeHealthPolicy; + } + + /** + * Set the defaultServiceTypeHealthPolicy property: The health policy used by default to evaluate the health of a + * service type. + * + * @param defaultServiceTypeHealthPolicy the defaultServiceTypeHealthPolicy value to set. + * @return the RuntimeApplicationHealthPolicy object itself. + */ + public RuntimeApplicationHealthPolicy + withDefaultServiceTypeHealthPolicy(RuntimeServiceTypeHealthPolicy defaultServiceTypeHealthPolicy) { + this.defaultServiceTypeHealthPolicy = defaultServiceTypeHealthPolicy; + return this; + } + + /** + * Get the serviceTypeHealthPolicyMap property: The map with service type health policy per service type name. The + * map is empty by default. + * + * @return the serviceTypeHealthPolicyMap value. + */ + public Map<String, RuntimeServiceTypeHealthPolicy> serviceTypeHealthPolicyMap() { + return this.serviceTypeHealthPolicyMap; + } + + /** + * Set the serviceTypeHealthPolicyMap property: The map with service type health policy per service type name. The + * map is empty by default. + * + * @param serviceTypeHealthPolicyMap the serviceTypeHealthPolicyMap value to set. + * @return the RuntimeApplicationHealthPolicy object itself. + */ + public RuntimeApplicationHealthPolicy + withServiceTypeHealthPolicyMap(Map<String, RuntimeServiceTypeHealthPolicy> serviceTypeHealthPolicyMap) { + this.serviceTypeHealthPolicyMap = serviceTypeHealthPolicyMap; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("considerWarningAsError", this.considerWarningAsError); + jsonWriter.writeIntField("maxPercentUnhealthyDeployedApplications", + this.maxPercentUnhealthyDeployedApplications); + jsonWriter.writeJsonField("defaultServiceTypeHealthPolicy", this.defaultServiceTypeHealthPolicy); + jsonWriter.writeMapField("serviceTypeHealthPolicyMap", this.serviceTypeHealthPolicyMap, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RuntimeApplicationHealthPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RuntimeApplicationHealthPolicy if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RuntimeApplicationHealthPolicy. + */ + public static RuntimeApplicationHealthPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RuntimeApplicationHealthPolicy deserializedRuntimeApplicationHealthPolicy + = new RuntimeApplicationHealthPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("considerWarningAsError".equals(fieldName)) { + deserializedRuntimeApplicationHealthPolicy.considerWarningAsError = reader.getBoolean(); + } else if ("maxPercentUnhealthyDeployedApplications".equals(fieldName)) { + deserializedRuntimeApplicationHealthPolicy.maxPercentUnhealthyDeployedApplications + = reader.getInt(); + } else if ("defaultServiceTypeHealthPolicy".equals(fieldName)) { + deserializedRuntimeApplicationHealthPolicy.defaultServiceTypeHealthPolicy + = RuntimeServiceTypeHealthPolicy.fromJson(reader); + } else if ("serviceTypeHealthPolicyMap".equals(fieldName)) { + Map<String, RuntimeServiceTypeHealthPolicy> serviceTypeHealthPolicyMap + = reader.readMap(reader1 -> RuntimeServiceTypeHealthPolicy.fromJson(reader1)); + deserializedRuntimeApplicationHealthPolicy.serviceTypeHealthPolicyMap = serviceTypeHealthPolicyMap; + } else { + reader.skipChildren(); + } + } + + return deserializedRuntimeApplicationHealthPolicy; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeFailureAction.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeFailureAction.java new file mode 100644 index 000000000000..239d7eb137ee --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeFailureAction.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Cluster level definition for the compensating action to perform when a Monitored upgrade encounters monitoring policy + * or health policy violations. + */ +public final class RuntimeFailureAction extends ExpandableStringEnum<RuntimeFailureAction> { + /** + * Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade fails. + */ + public static final RuntimeFailureAction ROLLBACK = fromString("Rollback"); + + /** + * Indicates that a manual repair will need to be performed by the administrator if the upgrade fails. Service + * Fabric will not proceed to the next upgrade domain automatically. + */ + public static final RuntimeFailureAction MANUAL = fromString("Manual"); + + /** + * Creates a new instance of RuntimeFailureAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RuntimeFailureAction() { + } + + /** + * Creates or finds a RuntimeFailureAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding RuntimeFailureAction. + */ + public static RuntimeFailureAction fromString(String name) { + return fromString(name, RuntimeFailureAction.class); + } + + /** + * Gets known RuntimeFailureAction values. + * + * @return known RuntimeFailureAction values. + */ + public static Collection<RuntimeFailureAction> values() { + return values(RuntimeFailureAction.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeMode.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeMode.java new file mode 100644 index 000000000000..6fd45e186d6f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeMode.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Cluster level definition for the mode used to monitor health during a rolling upgrade. + */ +public final class RuntimeRollingUpgradeMode extends ExpandableStringEnum<RuntimeRollingUpgradeMode> { + /** + * The upgrade will proceed automatically without performing any health monitoring. + */ + public static final RuntimeRollingUpgradeMode UNMONITORED_AUTO = fromString("UnmonitoredAuto"); + + /** + * The upgrade will stop after completing each upgrade domain, giving the opportunity to manually monitor health + * before proceeding. + */ + public static final RuntimeRollingUpgradeMode UNMONITORED_MANUAL = fromString("UnmonitoredManual"); + + /** + * The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. + */ + public static final RuntimeRollingUpgradeMode MONITORED = fromString("Monitored"); + + /** + * Creates a new instance of RuntimeRollingUpgradeMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RuntimeRollingUpgradeMode() { + } + + /** + * Creates or finds a RuntimeRollingUpgradeMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding RuntimeRollingUpgradeMode. + */ + public static RuntimeRollingUpgradeMode fromString(String name) { + return fromString(name, RuntimeRollingUpgradeMode.class); + } + + /** + * Gets known RuntimeRollingUpgradeMode values. + * + * @return known RuntimeRollingUpgradeMode values. + */ + public static Collection<RuntimeRollingUpgradeMode> values() { + return values(RuntimeRollingUpgradeMode.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeUpdateMonitoringPolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeUpdateMonitoringPolicy.java new file mode 100644 index 000000000000..22e2716dd607 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeUpdateMonitoringPolicy.java @@ -0,0 +1,424 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes the parameters for updating a rolling upgrade of application or cluster. + */ +@Fluent +public final class RuntimeRollingUpgradeUpdateMonitoringPolicy + implements JsonSerializable<RuntimeRollingUpgradeUpdateMonitoringPolicy> { + /* + * The mode used to monitor health during a rolling upgrade. + */ + private RuntimeRollingUpgradeMode rollingUpgradeMode; + + /* + * If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the + * upgrade only changes configuration or data). + */ + private Boolean forceRestart; + + /* + * The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there + * are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of + * availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 + * and 42949672925 inclusive. (unsigned 32-bit integer). + */ + private Long replicaSetCheckTimeoutInMilliseconds; + + /* + * The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy + * violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start + * rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode + */ + private RuntimeFailureAction failureAction; + + /* + * The amount of time to wait after completing an upgrade domain before applying health policies. It is first + * interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number + * representing the total number of milliseconds. + */ + private String healthCheckWaitDurationInMilliseconds; + + /* + * The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next + * upgrade domain. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + * interpreted as a number representing the total number of milliseconds. + */ + private String healthCheckStableDurationInMilliseconds; + + /* + * The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction + * is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is + * interpreted as a number representing the total number of milliseconds. + */ + private String healthCheckRetryTimeoutInMilliseconds; + + /* + * The amount of time the overall upgrade has to complete before FailureAction is executed. It is first interpreted + * as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + */ + private String upgradeTimeoutInMilliseconds; + + /* + * The amount of time each upgrade domain has to complete before FailureAction is executed. It is first interpreted + * as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the + * total number of milliseconds. + */ + private String upgradeDomainTimeoutInMilliseconds; + + /* + * Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain + * gracefully. This would be effective when the instance is closing during the application/cluster upgrade, only for + * those instances which have a non-zero delay duration configured in the service description. + */ + private Long instanceCloseDelayDurationInSeconds; + + /** + * Creates an instance of RuntimeRollingUpgradeUpdateMonitoringPolicy class. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy() { + } + + /** + * Get the rollingUpgradeMode property: The mode used to monitor health during a rolling upgrade. + * + * @return the rollingUpgradeMode value. + */ + public RuntimeRollingUpgradeMode rollingUpgradeMode() { + return this.rollingUpgradeMode; + } + + /** + * Set the rollingUpgradeMode property: The mode used to monitor health during a rolling upgrade. + * + * @param rollingUpgradeMode the rollingUpgradeMode value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy + withRollingUpgradeMode(RuntimeRollingUpgradeMode rollingUpgradeMode) { + this.rollingUpgradeMode = rollingUpgradeMode; + return this; + } + + /** + * Get the forceRestart property: If true, then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). + * + * @return the forceRestart value. + */ + public Boolean forceRestart() { + return this.forceRestart; + } + + /** + * Set the forceRestart property: If true, then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). + * + * @param forceRestart the forceRestart value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy withForceRestart(Boolean forceRestart) { + this.forceRestart = forceRestart; + return this; + } + + /** + * Get the replicaSetCheckTimeoutInMilliseconds property: The maximum amount of time to block processing of an + * upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, + * processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the + * start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + * + * @return the replicaSetCheckTimeoutInMilliseconds value. + */ + public Long replicaSetCheckTimeoutInMilliseconds() { + return this.replicaSetCheckTimeoutInMilliseconds; + } + + /** + * Set the replicaSetCheckTimeoutInMilliseconds property: The maximum amount of time to block processing of an + * upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, + * processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the + * start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + * + * @param replicaSetCheckTimeoutInMilliseconds the replicaSetCheckTimeoutInMilliseconds value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy + withReplicaSetCheckTimeoutInMilliseconds(Long replicaSetCheckTimeoutInMilliseconds) { + this.replicaSetCheckTimeoutInMilliseconds = replicaSetCheckTimeoutInMilliseconds; + return this; + } + + /** + * Get the failureAction property: The compensating action to perform when a Monitored upgrade encounters monitoring + * policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the + * upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual + * upgrade mode. + * + * @return the failureAction value. + */ + public RuntimeFailureAction failureAction() { + return this.failureAction; + } + + /** + * Set the failureAction property: The compensating action to perform when a Monitored upgrade encounters monitoring + * policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the + * upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual + * upgrade mode. + * + * @param failureAction the failureAction value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy withFailureAction(RuntimeFailureAction failureAction) { + this.failureAction = failureAction; + return this; + } + + /** + * Get the healthCheckWaitDurationInMilliseconds property: The amount of time to wait after completing an upgrade + * domain before applying health policies. It is first interpreted as a string representing an ISO 8601 duration. If + * that fails, then it is interpreted as a number representing the total number of milliseconds. + * + * @return the healthCheckWaitDurationInMilliseconds value. + */ + public String healthCheckWaitDurationInMilliseconds() { + return this.healthCheckWaitDurationInMilliseconds; + } + + /** + * Set the healthCheckWaitDurationInMilliseconds property: The amount of time to wait after completing an upgrade + * domain before applying health policies. It is first interpreted as a string representing an ISO 8601 duration. If + * that fails, then it is interpreted as a number representing the total number of milliseconds. + * + * @param healthCheckWaitDurationInMilliseconds the healthCheckWaitDurationInMilliseconds value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy + withHealthCheckWaitDurationInMilliseconds(String healthCheckWaitDurationInMilliseconds) { + this.healthCheckWaitDurationInMilliseconds = healthCheckWaitDurationInMilliseconds; + return this; + } + + /** + * Get the healthCheckStableDurationInMilliseconds property: The amount of time that the application or cluster must + * remain healthy before the upgrade proceeds to the next upgrade domain. It is first interpreted as a string + * representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + * number of milliseconds. + * + * @return the healthCheckStableDurationInMilliseconds value. + */ + public String healthCheckStableDurationInMilliseconds() { + return this.healthCheckStableDurationInMilliseconds; + } + + /** + * Set the healthCheckStableDurationInMilliseconds property: The amount of time that the application or cluster must + * remain healthy before the upgrade proceeds to the next upgrade domain. It is first interpreted as a string + * representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + * number of milliseconds. + * + * @param healthCheckStableDurationInMilliseconds the healthCheckStableDurationInMilliseconds value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy + withHealthCheckStableDurationInMilliseconds(String healthCheckStableDurationInMilliseconds) { + this.healthCheckStableDurationInMilliseconds = healthCheckStableDurationInMilliseconds; + return this; + } + + /** + * Get the healthCheckRetryTimeoutInMilliseconds property: The amount of time to retry health evaluation when the + * application or cluster is unhealthy before FailureAction is executed. It is first interpreted as a string + * representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + * number of milliseconds. + * + * @return the healthCheckRetryTimeoutInMilliseconds value. + */ + public String healthCheckRetryTimeoutInMilliseconds() { + return this.healthCheckRetryTimeoutInMilliseconds; + } + + /** + * Set the healthCheckRetryTimeoutInMilliseconds property: The amount of time to retry health evaluation when the + * application or cluster is unhealthy before FailureAction is executed. It is first interpreted as a string + * representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total + * number of milliseconds. + * + * @param healthCheckRetryTimeoutInMilliseconds the healthCheckRetryTimeoutInMilliseconds value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy + withHealthCheckRetryTimeoutInMilliseconds(String healthCheckRetryTimeoutInMilliseconds) { + this.healthCheckRetryTimeoutInMilliseconds = healthCheckRetryTimeoutInMilliseconds; + return this; + } + + /** + * Get the upgradeTimeoutInMilliseconds property: The amount of time the overall upgrade has to complete before + * FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of milliseconds. + * + * @return the upgradeTimeoutInMilliseconds value. + */ + public String upgradeTimeoutInMilliseconds() { + return this.upgradeTimeoutInMilliseconds; + } + + /** + * Set the upgradeTimeoutInMilliseconds property: The amount of time the overall upgrade has to complete before + * FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, + * then it is interpreted as a number representing the total number of milliseconds. + * + * @param upgradeTimeoutInMilliseconds the upgradeTimeoutInMilliseconds value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy + withUpgradeTimeoutInMilliseconds(String upgradeTimeoutInMilliseconds) { + this.upgradeTimeoutInMilliseconds = upgradeTimeoutInMilliseconds; + return this; + } + + /** + * Get the upgradeDomainTimeoutInMilliseconds property: The amount of time each upgrade domain has to complete + * before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that + * fails, then it is interpreted as a number representing the total number of milliseconds. + * + * @return the upgradeDomainTimeoutInMilliseconds value. + */ + public String upgradeDomainTimeoutInMilliseconds() { + return this.upgradeDomainTimeoutInMilliseconds; + } + + /** + * Set the upgradeDomainTimeoutInMilliseconds property: The amount of time each upgrade domain has to complete + * before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that + * fails, then it is interpreted as a number representing the total number of milliseconds. + * + * @param upgradeDomainTimeoutInMilliseconds the upgradeDomainTimeoutInMilliseconds value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy + withUpgradeDomainTimeoutInMilliseconds(String upgradeDomainTimeoutInMilliseconds) { + this.upgradeDomainTimeoutInMilliseconds = upgradeDomainTimeoutInMilliseconds; + return this; + } + + /** + * Get the instanceCloseDelayDurationInSeconds property: Duration in seconds, to wait before a stateless instance is + * closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing + * during the application/cluster upgrade, only for those instances which have a non-zero delay duration configured + * in the service description. + * + * @return the instanceCloseDelayDurationInSeconds value. + */ + public Long instanceCloseDelayDurationInSeconds() { + return this.instanceCloseDelayDurationInSeconds; + } + + /** + * Set the instanceCloseDelayDurationInSeconds property: Duration in seconds, to wait before a stateless instance is + * closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing + * during the application/cluster upgrade, only for those instances which have a non-zero delay duration configured + * in the service description. + * + * @param instanceCloseDelayDurationInSeconds the instanceCloseDelayDurationInSeconds value to set. + * @return the RuntimeRollingUpgradeUpdateMonitoringPolicy object itself. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy + withInstanceCloseDelayDurationInSeconds(Long instanceCloseDelayDurationInSeconds) { + this.instanceCloseDelayDurationInSeconds = instanceCloseDelayDurationInSeconds; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("rollingUpgradeMode", + this.rollingUpgradeMode == null ? null : this.rollingUpgradeMode.toString()); + jsonWriter.writeBooleanField("forceRestart", this.forceRestart); + jsonWriter.writeNumberField("replicaSetCheckTimeoutInMilliseconds", this.replicaSetCheckTimeoutInMilliseconds); + jsonWriter.writeStringField("failureAction", this.failureAction == null ? null : this.failureAction.toString()); + jsonWriter.writeStringField("healthCheckWaitDurationInMilliseconds", + this.healthCheckWaitDurationInMilliseconds); + jsonWriter.writeStringField("healthCheckStableDurationInMilliseconds", + this.healthCheckStableDurationInMilliseconds); + jsonWriter.writeStringField("healthCheckRetryTimeoutInMilliseconds", + this.healthCheckRetryTimeoutInMilliseconds); + jsonWriter.writeStringField("upgradeTimeoutInMilliseconds", this.upgradeTimeoutInMilliseconds); + jsonWriter.writeStringField("upgradeDomainTimeoutInMilliseconds", this.upgradeDomainTimeoutInMilliseconds); + jsonWriter.writeNumberField("instanceCloseDelayDurationInSeconds", this.instanceCloseDelayDurationInSeconds); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RuntimeRollingUpgradeUpdateMonitoringPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RuntimeRollingUpgradeUpdateMonitoringPolicy if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RuntimeRollingUpgradeUpdateMonitoringPolicy. + */ + public static RuntimeRollingUpgradeUpdateMonitoringPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RuntimeRollingUpgradeUpdateMonitoringPolicy deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy + = new RuntimeRollingUpgradeUpdateMonitoringPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("rollingUpgradeMode".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.rollingUpgradeMode + = RuntimeRollingUpgradeMode.fromString(reader.getString()); + } else if ("forceRestart".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.forceRestart + = reader.getNullable(JsonReader::getBoolean); + } else if ("replicaSetCheckTimeoutInMilliseconds".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.replicaSetCheckTimeoutInMilliseconds + = reader.getNullable(JsonReader::getLong); + } else if ("failureAction".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.failureAction + = RuntimeFailureAction.fromString(reader.getString()); + } else if ("healthCheckWaitDurationInMilliseconds".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.healthCheckWaitDurationInMilliseconds + = reader.getString(); + } else if ("healthCheckStableDurationInMilliseconds".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.healthCheckStableDurationInMilliseconds + = reader.getString(); + } else if ("healthCheckRetryTimeoutInMilliseconds".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.healthCheckRetryTimeoutInMilliseconds + = reader.getString(); + } else if ("upgradeTimeoutInMilliseconds".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.upgradeTimeoutInMilliseconds + = reader.getString(); + } else if ("upgradeDomainTimeoutInMilliseconds".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.upgradeDomainTimeoutInMilliseconds + = reader.getString(); + } else if ("instanceCloseDelayDurationInSeconds".equals(fieldName)) { + deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy.instanceCloseDelayDurationInSeconds + = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedRuntimeRollingUpgradeUpdateMonitoringPolicy; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeServiceTypeHealthPolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeServiceTypeHealthPolicy.java new file mode 100644 index 000000000000..375a08de9142 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeServiceTypeHealthPolicy.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Cluster level definition that represents the health policy used to evaluate the health of services belonging to a + * service type. + */ +@Fluent +public final class RuntimeServiceTypeHealthPolicy implements JsonSerializable<RuntimeServiceTypeHealthPolicy> { + /* + * The maximum allowed percentage of unhealthy services. + * + * The percentage represents the maximum tolerated percentage of services that can be unhealthy before the + * application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the specific service type over the total + * number of services of the specific service type. + * The computation rounds up to tolerate one failure on small numbers of services. + */ + private int maxPercentUnhealthyServices; + + /* + * The maximum allowed percentage of unhealthy partitions per service. + * + * The percentage represents the maximum tolerated percentage of partitions that can be unhealthy before the service + * is considered in error. + * If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions + * in the service. + * The computation rounds up to tolerate one failure on small numbers of partitions. + */ + private int maxPercentUnhealthyPartitionsPerService; + + /* + * The maximum allowed percentage of unhealthy replicas per partition. + * + * The percentage represents the maximum tolerated percentage of replicas that can be unhealthy before the partition + * is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in + * the partition. + * The computation rounds up to tolerate one failure on small numbers of replicas. + */ + private int maxPercentUnhealthyReplicasPerPartition; + + /** + * Creates an instance of RuntimeServiceTypeHealthPolicy class. + */ + public RuntimeServiceTypeHealthPolicy() { + } + + /** + * Get the maxPercentUnhealthyServices property: The maximum allowed percentage of unhealthy services. + * + * The percentage represents the maximum tolerated percentage of services that can be unhealthy before the + * application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the specific service type over the total + * number of services of the specific service type. + * The computation rounds up to tolerate one failure on small numbers of services. + * + * @return the maxPercentUnhealthyServices value. + */ + public int maxPercentUnhealthyServices() { + return this.maxPercentUnhealthyServices; + } + + /** + * Set the maxPercentUnhealthyServices property: The maximum allowed percentage of unhealthy services. + * + * The percentage represents the maximum tolerated percentage of services that can be unhealthy before the + * application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the specific service type over the total + * number of services of the specific service type. + * The computation rounds up to tolerate one failure on small numbers of services. + * + * @param maxPercentUnhealthyServices the maxPercentUnhealthyServices value to set. + * @return the RuntimeServiceTypeHealthPolicy object itself. + */ + public RuntimeServiceTypeHealthPolicy withMaxPercentUnhealthyServices(int maxPercentUnhealthyServices) { + this.maxPercentUnhealthyServices = maxPercentUnhealthyServices; + return this; + } + + /** + * Get the maxPercentUnhealthyPartitionsPerService property: The maximum allowed percentage of unhealthy partitions + * per service. + * + * The percentage represents the maximum tolerated percentage of partitions that can be unhealthy before the service + * is considered in error. + * If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions + * in the service. + * The computation rounds up to tolerate one failure on small numbers of partitions. + * + * @return the maxPercentUnhealthyPartitionsPerService value. + */ + public int maxPercentUnhealthyPartitionsPerService() { + return this.maxPercentUnhealthyPartitionsPerService; + } + + /** + * Set the maxPercentUnhealthyPartitionsPerService property: The maximum allowed percentage of unhealthy partitions + * per service. + * + * The percentage represents the maximum tolerated percentage of partitions that can be unhealthy before the service + * is considered in error. + * If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions + * in the service. + * The computation rounds up to tolerate one failure on small numbers of partitions. + * + * @param maxPercentUnhealthyPartitionsPerService the maxPercentUnhealthyPartitionsPerService value to set. + * @return the RuntimeServiceTypeHealthPolicy object itself. + */ + public RuntimeServiceTypeHealthPolicy + withMaxPercentUnhealthyPartitionsPerService(int maxPercentUnhealthyPartitionsPerService) { + this.maxPercentUnhealthyPartitionsPerService = maxPercentUnhealthyPartitionsPerService; + return this; + } + + /** + * Get the maxPercentUnhealthyReplicasPerPartition property: The maximum allowed percentage of unhealthy replicas + * per partition. + * + * The percentage represents the maximum tolerated percentage of replicas that can be unhealthy before the partition + * is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in + * the partition. + * The computation rounds up to tolerate one failure on small numbers of replicas. + * + * @return the maxPercentUnhealthyReplicasPerPartition value. + */ + public int maxPercentUnhealthyReplicasPerPartition() { + return this.maxPercentUnhealthyReplicasPerPartition; + } + + /** + * Set the maxPercentUnhealthyReplicasPerPartition property: The maximum allowed percentage of unhealthy replicas + * per partition. + * + * The percentage represents the maximum tolerated percentage of replicas that can be unhealthy before the partition + * is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in + * the partition. + * The computation rounds up to tolerate one failure on small numbers of replicas. + * + * @param maxPercentUnhealthyReplicasPerPartition the maxPercentUnhealthyReplicasPerPartition value to set. + * @return the RuntimeServiceTypeHealthPolicy object itself. + */ + public RuntimeServiceTypeHealthPolicy + withMaxPercentUnhealthyReplicasPerPartition(int maxPercentUnhealthyReplicasPerPartition) { + this.maxPercentUnhealthyReplicasPerPartition = maxPercentUnhealthyReplicasPerPartition; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("maxPercentUnhealthyServices", this.maxPercentUnhealthyServices); + jsonWriter.writeIntField("maxPercentUnhealthyPartitionsPerService", + this.maxPercentUnhealthyPartitionsPerService); + jsonWriter.writeIntField("maxPercentUnhealthyReplicasPerPartition", + this.maxPercentUnhealthyReplicasPerPartition); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RuntimeServiceTypeHealthPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RuntimeServiceTypeHealthPolicy if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RuntimeServiceTypeHealthPolicy. + */ + public static RuntimeServiceTypeHealthPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RuntimeServiceTypeHealthPolicy deserializedRuntimeServiceTypeHealthPolicy + = new RuntimeServiceTypeHealthPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maxPercentUnhealthyServices".equals(fieldName)) { + deserializedRuntimeServiceTypeHealthPolicy.maxPercentUnhealthyServices = reader.getInt(); + } else if ("maxPercentUnhealthyPartitionsPerService".equals(fieldName)) { + deserializedRuntimeServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService + = reader.getInt(); + } else if ("maxPercentUnhealthyReplicasPerPartition".equals(fieldName)) { + deserializedRuntimeServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition + = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedRuntimeServiceTypeHealthPolicy; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpdateApplicationUpgradeParameters.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpdateApplicationUpgradeParameters.java new file mode 100644 index 000000000000..f607a97ef4b7 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpdateApplicationUpgradeParameters.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Parameters for the Update Upgrade action. + */ +@Fluent +public final class RuntimeUpdateApplicationUpgradeParameters + implements JsonSerializable<RuntimeUpdateApplicationUpgradeParameters> { + /* + * The name of the application, including the 'fabric:' URI scheme. + */ + private String name; + + /* + * The kind of the upgrade. + */ + private RuntimeUpgradeKind upgradeKind; + + /* + * Defines a health policy used to evaluate the health of an application or one of its children entities. + */ + private RuntimeApplicationHealthPolicy applicationHealthPolicy; + + /* + * Describes the parameters for updating a rolling upgrade of application or cluster and a monitoring policy. + */ + private RuntimeRollingUpgradeUpdateMonitoringPolicy updateDescription; + + /** + * Creates an instance of RuntimeUpdateApplicationUpgradeParameters class. + */ + public RuntimeUpdateApplicationUpgradeParameters() { + } + + /** + * Get the name property: The name of the application, including the 'fabric:' URI scheme. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the application, including the 'fabric:' URI scheme. + * + * @param name the name value to set. + * @return the RuntimeUpdateApplicationUpgradeParameters object itself. + */ + public RuntimeUpdateApplicationUpgradeParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the upgradeKind property: The kind of the upgrade. + * + * @return the upgradeKind value. + */ + public RuntimeUpgradeKind upgradeKind() { + return this.upgradeKind; + } + + /** + * Set the upgradeKind property: The kind of the upgrade. + * + * @param upgradeKind the upgradeKind value to set. + * @return the RuntimeUpdateApplicationUpgradeParameters object itself. + */ + public RuntimeUpdateApplicationUpgradeParameters withUpgradeKind(RuntimeUpgradeKind upgradeKind) { + this.upgradeKind = upgradeKind; + return this; + } + + /** + * Get the applicationHealthPolicy property: Defines a health policy used to evaluate the health of an application + * or one of its children entities. + * + * @return the applicationHealthPolicy value. + */ + public RuntimeApplicationHealthPolicy applicationHealthPolicy() { + return this.applicationHealthPolicy; + } + + /** + * Set the applicationHealthPolicy property: Defines a health policy used to evaluate the health of an application + * or one of its children entities. + * + * @param applicationHealthPolicy the applicationHealthPolicy value to set. + * @return the RuntimeUpdateApplicationUpgradeParameters object itself. + */ + public RuntimeUpdateApplicationUpgradeParameters + withApplicationHealthPolicy(RuntimeApplicationHealthPolicy applicationHealthPolicy) { + this.applicationHealthPolicy = applicationHealthPolicy; + return this; + } + + /** + * Get the updateDescription property: Describes the parameters for updating a rolling upgrade of application or + * cluster and a monitoring policy. + * + * @return the updateDescription value. + */ + public RuntimeRollingUpgradeUpdateMonitoringPolicy updateDescription() { + return this.updateDescription; + } + + /** + * Set the updateDescription property: Describes the parameters for updating a rolling upgrade of application or + * cluster and a monitoring policy. + * + * @param updateDescription the updateDescription value to set. + * @return the RuntimeUpdateApplicationUpgradeParameters object itself. + */ + public RuntimeUpdateApplicationUpgradeParameters + withUpdateDescription(RuntimeRollingUpgradeUpdateMonitoringPolicy updateDescription) { + this.updateDescription = updateDescription; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("upgradeKind", this.upgradeKind == null ? null : this.upgradeKind.toString()); + jsonWriter.writeJsonField("applicationHealthPolicy", this.applicationHealthPolicy); + jsonWriter.writeJsonField("updateDescription", this.updateDescription); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RuntimeUpdateApplicationUpgradeParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RuntimeUpdateApplicationUpgradeParameters if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RuntimeUpdateApplicationUpgradeParameters. + */ + public static RuntimeUpdateApplicationUpgradeParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RuntimeUpdateApplicationUpgradeParameters deserializedRuntimeUpdateApplicationUpgradeParameters + = new RuntimeUpdateApplicationUpgradeParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedRuntimeUpdateApplicationUpgradeParameters.name = reader.getString(); + } else if ("upgradeKind".equals(fieldName)) { + deserializedRuntimeUpdateApplicationUpgradeParameters.upgradeKind + = RuntimeUpgradeKind.fromString(reader.getString()); + } else if ("applicationHealthPolicy".equals(fieldName)) { + deserializedRuntimeUpdateApplicationUpgradeParameters.applicationHealthPolicy + = RuntimeApplicationHealthPolicy.fromJson(reader); + } else if ("updateDescription".equals(fieldName)) { + deserializedRuntimeUpdateApplicationUpgradeParameters.updateDescription + = RuntimeRollingUpgradeUpdateMonitoringPolicy.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRuntimeUpdateApplicationUpgradeParameters; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpgradeKind.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpgradeKind.java new file mode 100644 index 000000000000..f346430d945b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpgradeKind.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Cluster level definition for the kind of upgrade. + */ +public final class RuntimeUpgradeKind extends ExpandableStringEnum<RuntimeUpgradeKind> { + /** + * The upgrade progresses one upgrade domain at a time. + */ + public static final RuntimeUpgradeKind ROLLING = fromString("Rolling"); + + /** + * Creates a new instance of RuntimeUpgradeKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RuntimeUpgradeKind() { + } + + /** + * Creates or finds a RuntimeUpgradeKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding RuntimeUpgradeKind. + */ + public static RuntimeUpgradeKind fromString(String name) { + return fromString(name, RuntimeUpgradeKind.class); + } + + /** + * Gets known RuntimeUpgradeKind values. + * + * @return known RuntimeUpgradeKind values. + */ + public static Collection<RuntimeUpgradeKind> values() { + return values(RuntimeUpgradeKind.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResource.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResource.java index 15ee9e179cea..5d04d7f0d797 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResource.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResource.java @@ -252,4 +252,25 @@ interface WithTags { * @return the refreshed resource. */ ServiceResource refresh(Context context); + + /** + * A long-running resource action. + * + * @param parameters The parameters for restarting replicas. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restartReplica(RestartReplicaRequest parameters); + + /** + * A long-running resource action. + * + * @param parameters The parameters for restarting replicas. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restartReplica(RestartReplicaRequest parameters, Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Services.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Services.java index 525801838065..306723c06fed 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Services.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Services.java @@ -107,6 +107,37 @@ PagedIterable<ServiceResource> listByApplications(String resourceGroupName, Stri PagedIterable<ServiceResource> listByApplications(String resourceGroupName, String clusterName, String applicationName, Context context); + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restartReplica(String resourceGroupName, String clusterName, String applicationName, String serviceName, + RestartReplicaRequest parameters); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application resource. + * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. + * @param parameters The parameters for restarting replicas. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restartReplica(String resourceGroupName, String clusterName, String applicationName, String serviceName, + RestartReplicaRequest parameters, Context context); + /** * Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed * application resource. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/META-INF/azure-resourcemanager-servicefabricmanagedclusters_apiview_properties.json b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/META-INF/azure-resourcemanager-servicefabricmanagedclusters_apiview_properties.json index c2ee5c0b925a..d3248ef0be3f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/META-INF/azure-resourcemanager-servicefabricmanagedclusters_apiview_properties.json +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/META-INF/azure-resourcemanager-servicefabricmanagedclusters_apiview_properties.json @@ -24,19 +24,25 @@ "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient": "Microsoft.ServiceFabric.Applications", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginCreateOrUpdate": "Microsoft.ServiceFabric.Applications.createOrUpdate", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginDelete": "Microsoft.ServiceFabric.Applications.delete", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginFetchHealth": "Microsoft.ServiceFabric.Applications.fetchHealth", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginReadUpgrade": "Microsoft.ServiceFabric.Applications.readUpgrade", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginRestartDeployedCodePackage": "Microsoft.ServiceFabric.Applications.restartDeployedCodePackage", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginResumeUpgrade": "Microsoft.ServiceFabric.Applications.resumeUpgrade", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginStartRollback": "Microsoft.ServiceFabric.Applications.startRollback", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginUpdate": "Microsoft.ServiceFabric.Applications.update", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginUpdateUpgrade": "Microsoft.ServiceFabric.Applications.updateUpgrade", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.createOrUpdate": "Microsoft.ServiceFabric.Applications.createOrUpdate", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.delete": "Microsoft.ServiceFabric.Applications.delete", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.fetchHealth": "Microsoft.ServiceFabric.Applications.fetchHealth", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.get": "Microsoft.ServiceFabric.Applications.get", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.getWithResponse": "Microsoft.ServiceFabric.Applications.get", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.list": "Microsoft.ServiceFabric.Applications.list", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.readUpgrade": "Microsoft.ServiceFabric.Applications.readUpgrade", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.restartDeployedCodePackage": "Microsoft.ServiceFabric.Applications.restartDeployedCodePackage", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.resumeUpgrade": "Microsoft.ServiceFabric.Applications.resumeUpgrade", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.startRollback": "Microsoft.ServiceFabric.Applications.startRollback", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.update": "Microsoft.ServiceFabric.Applications.update", - "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.updateWithResponse": "Microsoft.ServiceFabric.Applications.update", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.updateUpgrade": "Microsoft.ServiceFabric.Applications.updateUpgrade", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient": "Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient.post": "Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient.postWithResponse": "Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post", @@ -57,6 +63,7 @@ "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginDelete": "Microsoft.ServiceFabric.ManagedClusters.delete", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginStartFaultSimulation": "Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginStopFaultSimulation": "Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginUpdate": "Microsoft.ServiceFabric.ManagedClusters.update", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.createOrUpdate": "Microsoft.ServiceFabric.ManagedClusters.createOrUpdate", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.delete": "Microsoft.ServiceFabric.ManagedClusters.delete", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getByResourceGroup": "Microsoft.ServiceFabric.ManagedClusters.get", @@ -69,7 +76,6 @@ "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.startFaultSimulation": "Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.stopFaultSimulation": "Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.update": "Microsoft.ServiceFabric.ManagedClusters.update", - "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.updateWithResponse": "Microsoft.ServiceFabric.ManagedClusters.update", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient.get": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient.getWithResponse": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get", @@ -114,11 +120,13 @@ "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient": "Microsoft.ServiceFabric.Services", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.beginCreateOrUpdate": "Microsoft.ServiceFabric.Services.createOrUpdate", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.beginDelete": "Microsoft.ServiceFabric.Services.delete", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.beginRestartReplica": "Microsoft.ServiceFabric.Services.restartReplica", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.createOrUpdate": "Microsoft.ServiceFabric.Services.createOrUpdate", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.delete": "Microsoft.ServiceFabric.Services.delete", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.get": "Microsoft.ServiceFabric.Services.get", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.getWithResponse": "Microsoft.ServiceFabric.Services.get", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.listByApplications": "Microsoft.ServiceFabric.Services.listByApplications", + "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.restartReplica": "Microsoft.ServiceFabric.Services.restartReplica", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.update": "Microsoft.ServiceFabric.Services.update", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.updateWithResponse": "Microsoft.ServiceFabric.Services.update", "com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceInner": "Microsoft.ServiceFabric.ApplicationResource", @@ -155,11 +163,13 @@ "com.azure.resourcemanager.servicefabricmanagedclusters.models.Access": "Microsoft.ServiceFabric.Access", "com.azure.resourcemanager.servicefabricmanagedclusters.models.AddRemoveIncrementalNamedPartitionScalingMechanism": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism", "com.azure.resourcemanager.servicefabricmanagedclusters.models.AdditionalNetworkInterfaceConfiguration": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest": "Microsoft.ServiceFabric.ApplicationFetchHealthRequest", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationHealthPolicy": "Microsoft.ServiceFabric.ApplicationHealthPolicy", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeUpdateParameters": "Microsoft.ServiceFabric.ApplicationTypeUpdateParameters", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionUpdateParameters": "Microsoft.ServiceFabric.ApplicationTypeVersionUpdateParameters", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionsCleanupPolicy": "Microsoft.ServiceFabric.ApplicationTypeVersionsCleanupPolicy", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParameters": "Microsoft.ServiceFabric.ApplicationUpdateParameters", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParametersProperties": "Microsoft.ServiceFabric.ApplicationUpdateParametersProperties", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpgradePolicy": "Microsoft.ServiceFabric.ApplicationUpgradePolicy", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUserAssignedIdentity": "Microsoft.ServiceFabric.ApplicationUserAssignedIdentity", "com.azure.resourcemanager.servicefabricmanagedclusters.models.AutoGeneratedDomainNameLabelScope": "Microsoft.ServiceFabric.AutoGeneratedDomainNameLabelScope", @@ -188,6 +198,7 @@ "com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationIdContent": "Microsoft.ServiceFabric.FaultSimulationIdContent", "com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationStatus": "Microsoft.ServiceFabric.FaultSimulationStatus", "com.azure.resourcemanager.servicefabricmanagedclusters.models.FrontendConfiguration": "Microsoft.ServiceFabric.FrontendConfiguration", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.HealthFilter": "Microsoft.ServiceFabric.HealthFilter", "com.azure.resourcemanager.servicefabricmanagedclusters.models.IpAddressType": "Microsoft.ServiceFabric.IPAddressType", "com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfiguration": "Microsoft.ServiceFabric.IpConfiguration", "com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfigurationPublicIpAddressConfiguration": "Microsoft.ServiceFabric.PublicIPAddressConfiguration", @@ -222,9 +233,19 @@ "com.azure.resourcemanager.servicefabricmanagedclusters.models.Protocol": "Microsoft.ServiceFabric.Protocol", "com.azure.resourcemanager.servicefabricmanagedclusters.models.PublicIpAddressVersion": "Microsoft.ServiceFabric.PublicIPAddressVersion", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ResourceAzStatus": "Microsoft.ServiceFabric.ResourceAzStatus", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartDeployedCodePackageRequest": "Microsoft.ServiceFabric.RestartDeployedCodePackageRequest", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartKind": "Microsoft.ServiceFabric.RestartKind", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest": "Microsoft.ServiceFabric.RestartReplicaRequest", "com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMode": "Microsoft.ServiceFabric.RollingUpgradeMode", "com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMonitoringPolicy": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeApplicationHealthPolicy": "Microsoft.ServiceFabric.RuntimeApplicationHealthPolicy", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeFailureAction": "Microsoft.ServiceFabric.RuntimeFailureAction", "com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters": "Microsoft.ServiceFabric.RuntimeResumeApplicationUpgradeParameters", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeMode": "Microsoft.ServiceFabric.RuntimeRollingUpgradeMode", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeUpdateMonitoringPolicy": "Microsoft.ServiceFabric.RuntimeRollingUpgradeUpdateMonitoringPolicy", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeServiceTypeHealthPolicy": "Microsoft.ServiceFabric.RuntimeServiceTypeHealthPolicy", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters": "Microsoft.ServiceFabric.RuntimeUpdateApplicationUpgradeParameters", + "com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpgradeKind": "Microsoft.ServiceFabric.RuntimeUpgradeKind", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingMechanism": "Microsoft.ServiceFabric.ScalingMechanism", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingPolicy": "Microsoft.ServiceFabric.ScalingPolicy", "com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingTrigger": "Microsoft.ServiceFabric.ScalingTrigger", diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/META-INF/azure-resourcemanager-servicefabricmanagedclusters_metadata.json b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/META-INF/azure-resourcemanager-servicefabricmanagedclusters_metadata.json index 3054efc976b4..832c790c231d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/META-INF/azure-resourcemanager-servicefabricmanagedclusters_metadata.json +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/META-INF/azure-resourcemanager-servicefabricmanagedclusters_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersion":"2025-06-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient":"Microsoft.ServiceFabric.ApplicationTypeVersions","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.ApplicationTypeVersions.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.beginDelete":"Microsoft.ServiceFabric.ApplicationTypeVersions.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.createOrUpdate":"Microsoft.ServiceFabric.ApplicationTypeVersions.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.delete":"Microsoft.ServiceFabric.ApplicationTypeVersions.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.get":"Microsoft.ServiceFabric.ApplicationTypeVersions.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.getWithResponse":"Microsoft.ServiceFabric.ApplicationTypeVersions.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.listByApplicationTypes":"Microsoft.ServiceFabric.ApplicationTypeVersions.listByApplicationTypes","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.update":"Microsoft.ServiceFabric.ApplicationTypeVersions.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.updateWithResponse":"Microsoft.ServiceFabric.ApplicationTypeVersions.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient":"Microsoft.ServiceFabric.ApplicationTypes","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.beginDelete":"Microsoft.ServiceFabric.ApplicationTypes.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.createOrUpdate":"Microsoft.ServiceFabric.ApplicationTypes.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.createOrUpdateWithResponse":"Microsoft.ServiceFabric.ApplicationTypes.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.delete":"Microsoft.ServiceFabric.ApplicationTypes.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.get":"Microsoft.ServiceFabric.ApplicationTypes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.getWithResponse":"Microsoft.ServiceFabric.ApplicationTypes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.list":"Microsoft.ServiceFabric.ApplicationTypes.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.update":"Microsoft.ServiceFabric.ApplicationTypes.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.updateWithResponse":"Microsoft.ServiceFabric.ApplicationTypes.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient":"Microsoft.ServiceFabric.Applications","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.Applications.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginDelete":"Microsoft.ServiceFabric.Applications.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginReadUpgrade":"Microsoft.ServiceFabric.Applications.readUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginResumeUpgrade":"Microsoft.ServiceFabric.Applications.resumeUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginStartRollback":"Microsoft.ServiceFabric.Applications.startRollback","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.createOrUpdate":"Microsoft.ServiceFabric.Applications.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.delete":"Microsoft.ServiceFabric.Applications.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.get":"Microsoft.ServiceFabric.Applications.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.getWithResponse":"Microsoft.ServiceFabric.Applications.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.list":"Microsoft.ServiceFabric.Applications.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.readUpgrade":"Microsoft.ServiceFabric.Applications.readUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.resumeUpgrade":"Microsoft.ServiceFabric.Applications.resumeUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.startRollback":"Microsoft.ServiceFabric.Applications.startRollback","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.update":"Microsoft.ServiceFabric.Applications.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.updateWithResponse":"Microsoft.ServiceFabric.Applications.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient":"Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient.post":"Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient.postWithResponse":"Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedAzResiliencyStatusesClient":"Microsoft.ServiceFabric.ManagedAzResiliencyStatus","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedAzResiliencyStatusesClient.get":"Microsoft.ServiceFabric.ManagedAzResiliencyStatus.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedAzResiliencyStatusesClient.getWithResponse":"Microsoft.ServiceFabric.ManagedAzResiliencyStatus.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient":"Microsoft.ServiceFabric.ManagedClusterVersion","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.get":"Microsoft.ServiceFabric.ManagedClusterVersion.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.getByEnvironment":"Microsoft.ServiceFabric.ManagedClusterVersion.getByEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.getByEnvironmentWithResponse":"Microsoft.ServiceFabric.ManagedClusterVersion.getByEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.getWithResponse":"Microsoft.ServiceFabric.ManagedClusterVersion.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.list":"Microsoft.ServiceFabric.ManagedClusterVersion.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.listByEnvironment":"Microsoft.ServiceFabric.ManagedClusterVersion.listByEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.listByEnvironmentWithResponse":"Microsoft.ServiceFabric.ManagedClusterVersion.listByEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.listWithResponse":"Microsoft.ServiceFabric.ManagedClusterVersion.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient":"Microsoft.ServiceFabric.ManagedClusters","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.ManagedClusters.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginDelete":"Microsoft.ServiceFabric.ManagedClusters.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginStartFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginStopFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.createOrUpdate":"Microsoft.ServiceFabric.ManagedClusters.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.delete":"Microsoft.ServiceFabric.ManagedClusters.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getByResourceGroup":"Microsoft.ServiceFabric.ManagedClusters.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getByResourceGroupWithResponse":"Microsoft.ServiceFabric.ManagedClusters.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.getFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getFaultSimulationWithResponse":"Microsoft.ServiceFabric.ManagedClusters.getFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.list":"Microsoft.ServiceFabric.ManagedClusters.listBySubscription","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.listByResourceGroup":"Microsoft.ServiceFabric.ManagedClusters.listByResourceGroup","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.listFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.listFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.startFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.stopFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.update":"Microsoft.ServiceFabric.ManagedClusters.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.updateWithResponse":"Microsoft.ServiceFabric.ManagedClusters.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient":"Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient.get":"Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient.getWithResponse":"Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedUnsupportedVMSizesClient":"Microsoft.ServiceFabric.ManagedUnsupportedVMSizes","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedUnsupportedVMSizesClient.get":"Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedUnsupportedVMSizesClient.getWithResponse":"Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedUnsupportedVMSizesClient.list":"Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypeSkusClient":"Microsoft.ServiceFabric.NodeTypeSkus","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypeSkusClient.list":"Microsoft.ServiceFabric.NodeTypeSkus.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient":"Microsoft.ServiceFabric.NodeTypes","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.NodeTypes.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginDeallocate":"Microsoft.ServiceFabric.NodeTypes.deallocate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginDelete":"Microsoft.ServiceFabric.NodeTypes.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginDeleteNode":"Microsoft.ServiceFabric.NodeTypes.deleteNode","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginRedeploy":"Microsoft.ServiceFabric.NodeTypes.redeploy","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginReimage":"Microsoft.ServiceFabric.NodeTypes.reimage","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginRestart":"Microsoft.ServiceFabric.NodeTypes.restart","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginStart":"Microsoft.ServiceFabric.NodeTypes.start","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginStartFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.startFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginStopFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.stopFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginUpdate":"Microsoft.ServiceFabric.NodeTypes.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.createOrUpdate":"Microsoft.ServiceFabric.NodeTypes.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.deallocate":"Microsoft.ServiceFabric.NodeTypes.deallocate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.delete":"Microsoft.ServiceFabric.NodeTypes.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.deleteNode":"Microsoft.ServiceFabric.NodeTypes.deleteNode","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.get":"Microsoft.ServiceFabric.NodeTypes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.getFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.getFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.getFaultSimulationWithResponse":"Microsoft.ServiceFabric.NodeTypes.getFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.getWithResponse":"Microsoft.ServiceFabric.NodeTypes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.listByManagedClusters":"Microsoft.ServiceFabric.NodeTypes.listByManagedClusters","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.listFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.listFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.redeploy":"Microsoft.ServiceFabric.NodeTypes.redeploy","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.reimage":"Microsoft.ServiceFabric.NodeTypes.reimage","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.restart":"Microsoft.ServiceFabric.NodeTypes.restart","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.start":"Microsoft.ServiceFabric.NodeTypes.start","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.startFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.startFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.stopFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.stopFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.update":"Microsoft.ServiceFabric.NodeTypes.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.OperationsClient":"Microsoft.ServiceFabric.Operations","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.OperationsClient.list":"Microsoft.ServiceFabric.Operations.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServiceFabricManagedClustersMgmtClient":"Microsoft.ServiceFabric","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient":"Microsoft.ServiceFabric.Services","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.Services.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.beginDelete":"Microsoft.ServiceFabric.Services.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.createOrUpdate":"Microsoft.ServiceFabric.Services.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.delete":"Microsoft.ServiceFabric.Services.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.get":"Microsoft.ServiceFabric.Services.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.getWithResponse":"Microsoft.ServiceFabric.Services.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.listByApplications":"Microsoft.ServiceFabric.Services.listByApplications","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.update":"Microsoft.ServiceFabric.Services.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.updateWithResponse":"Microsoft.ServiceFabric.Services.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceInner":"Microsoft.ServiceFabric.ApplicationResource","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceProperties":"Microsoft.ServiceFabric.ApplicationResourceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeResourceInner":"Microsoft.ServiceFabric.ApplicationTypeResource","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeResourceProperties":"Microsoft.ServiceFabric.ApplicationTypeResourceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeVersionResourceInner":"Microsoft.ServiceFabric.ApplicationTypeVersionResource","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeVersionResourceProperties":"Microsoft.ServiceFabric.ApplicationTypeVersionResourceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.FaultSimulationInner":"Microsoft.ServiceFabric.FaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedAzResiliencyStatusInner":"Microsoft.ServiceFabric.ManagedAzResiliencyStatusContent","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterCodeVersionResultInner":"Microsoft.ServiceFabric.ManagedClusterCodeVersionResult","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterInner":"Microsoft.ServiceFabric.ManagedCluster","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterProperties":"Microsoft.ServiceFabric.ManagedClusterProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterVersionDetails":"Microsoft.ServiceFabric.ManagedClusterVersionDetails","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedMaintenanceWindowStatusInner":"Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedVMSizeInner":"Microsoft.ServiceFabric.ManagedVMSize","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeAvailableSkuInner":"Microsoft.ServiceFabric.NodeTypeAvailableSku","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeInner":"Microsoft.ServiceFabric.NodeType","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeProperties":"Microsoft.ServiceFabric.NodeTypeProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.OperationResultInner":"Microsoft.ServiceFabric.OperationResult","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ServiceResourceInner":"Microsoft.ServiceFabric.ServiceResource","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.VMSSExtensionProperties":"Microsoft.ServiceFabric.VMSSExtensionProperties","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.ServiceFabricManagedClustersMgmtClientBuilder":"Microsoft.ServiceFabric","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationResourceList":"Microsoft.ServiceFabric.ApplicationResourceList","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationTypeResourceList":"Microsoft.ServiceFabric.ApplicationTypeResourceList","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationTypeVersionResourceList":"Microsoft.ServiceFabric.ApplicationTypeVersionResourceList","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.FaultSimulationListResult":"Microsoft.ServiceFabric.FaultSimulationListResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ManagedClusterListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ManagedVMSizesResult":"Microsoft.ServiceFabric.ManagedVMSizesResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.NodeTypeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.NodeTypeListSkuResult":"Microsoft.ServiceFabric.NodeTypeListSkuResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.OperationListResult":"Microsoft.ServiceFabric.OperationListResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ServiceResourceList":"Microsoft.ServiceFabric.ServiceResourceList","com.azure.resourcemanager.servicefabricmanagedclusters.models.Access":"Microsoft.ServiceFabric.Access","com.azure.resourcemanager.servicefabricmanagedclusters.models.AddRemoveIncrementalNamedPartitionScalingMechanism":"Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism","com.azure.resourcemanager.servicefabricmanagedclusters.models.AdditionalNetworkInterfaceConfiguration":"Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationHealthPolicy":"Microsoft.ServiceFabric.ApplicationHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeUpdateParameters":"Microsoft.ServiceFabric.ApplicationTypeUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionUpdateParameters":"Microsoft.ServiceFabric.ApplicationTypeVersionUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionsCleanupPolicy":"Microsoft.ServiceFabric.ApplicationTypeVersionsCleanupPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParameters":"Microsoft.ServiceFabric.ApplicationUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpgradePolicy":"Microsoft.ServiceFabric.ApplicationUpgradePolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUserAssignedIdentity":"Microsoft.ServiceFabric.ApplicationUserAssignedIdentity","com.azure.resourcemanager.servicefabricmanagedclusters.models.AutoGeneratedDomainNameLabelScope":"Microsoft.ServiceFabric.AutoGeneratedDomainNameLabelScope","com.azure.resourcemanager.servicefabricmanagedclusters.models.AvailableOperationDisplay":"Microsoft.ServiceFabric.AvailableOperationDisplay","com.azure.resourcemanager.servicefabricmanagedclusters.models.AveragePartitionLoadScalingTrigger":"Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger","com.azure.resourcemanager.servicefabricmanagedclusters.models.AverageServiceLoadScalingTrigger":"Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger","com.azure.resourcemanager.servicefabricmanagedclusters.models.AzureActiveDirectory":"Microsoft.ServiceFabric.AzureActiveDirectory","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClientCertificate":"Microsoft.ServiceFabric.ClientCertificate","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterHealthPolicy":"Microsoft.ServiceFabric.ClusterHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterMonitoringPolicy":"Microsoft.ServiceFabric.ClusterMonitoringPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterState":"Microsoft.ServiceFabric.ClusterState","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeCadence":"Microsoft.ServiceFabric.ClusterUpgradeCadence","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeDeltaHealthPolicy":"Microsoft.ServiceFabric.ClusterUpgradeDeltaHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeMode":"Microsoft.ServiceFabric.ClusterUpgradeMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradePolicy":"Microsoft.ServiceFabric.ClusterUpgradePolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.Direction":"Microsoft.ServiceFabric.Direction","com.azure.resourcemanager.servicefabricmanagedclusters.models.DiskType":"Microsoft.ServiceFabric.DiskType","com.azure.resourcemanager.servicefabricmanagedclusters.models.EndpointRangeDescription":"Microsoft.ServiceFabric.EndpointRangeDescription","com.azure.resourcemanager.servicefabricmanagedclusters.models.EvictionPolicyType":"Microsoft.ServiceFabric.EvictionPolicyType","com.azure.resourcemanager.servicefabricmanagedclusters.models.FailureAction":"Microsoft.ServiceFabric.FailureAction","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultKind":"Microsoft.ServiceFabric.FaultKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationConstraints":"Microsoft.ServiceFabric.FaultSimulationConstraints","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContent":"Microsoft.ServiceFabric.FaultSimulationContent","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContentWrapper":"Microsoft.ServiceFabric.FaultSimulationContentWrapper","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationDetails":"Microsoft.ServiceFabric.FaultSimulationDetails","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationIdContent":"Microsoft.ServiceFabric.FaultSimulationIdContent","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationStatus":"Microsoft.ServiceFabric.FaultSimulationStatus","com.azure.resourcemanager.servicefabricmanagedclusters.models.FrontendConfiguration":"Microsoft.ServiceFabric.FrontendConfiguration","com.azure.resourcemanager.servicefabricmanagedclusters.models.IpAddressType":"Microsoft.ServiceFabric.IPAddressType","com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfiguration":"Microsoft.ServiceFabric.IpConfiguration","com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfigurationPublicIpAddressConfiguration":"Microsoft.ServiceFabric.PublicIPAddressConfiguration","com.azure.resourcemanager.servicefabricmanagedclusters.models.IpTag":"Microsoft.ServiceFabric.IpTag","com.azure.resourcemanager.servicefabricmanagedclusters.models.LoadBalancingRule":"Microsoft.ServiceFabric.LoadBalancingRule","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterAddOnFeature":"Microsoft.ServiceFabric.ManagedClusterAddOnFeature","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterUpdateParameters":"Microsoft.ServiceFabric.ManagedClusterUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterVersionEnvironment":"Microsoft.ServiceFabric.ManagedClusterVersionEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedIdentity":"Microsoft.ServiceFabric.ManagedIdentity","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedIdentityType":"Microsoft.ServiceFabric.ManagedIdentityType","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedResourceProvisioningState":"Microsoft.ServiceFabric.ManagedResourceProvisioningState","com.azure.resourcemanager.servicefabricmanagedclusters.models.MoveCost":"Microsoft.ServiceFabric.MoveCost","com.azure.resourcemanager.servicefabricmanagedclusters.models.NamedPartitionScheme":"Microsoft.ServiceFabric.NamedPartitionScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.NetworkSecurityRule":"Microsoft.ServiceFabric.NetworkSecurityRule","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters":"Microsoft.ServiceFabric.NodeTypeActionParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeFaultSimulation":"Microsoft.ServiceFabric.NodeTypeFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeNatConfig":"Microsoft.ServiceFabric.NodeTypeNatConfig","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSku":"Microsoft.ServiceFabric.NodeTypeSku","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSkuCapacity":"Microsoft.ServiceFabric.NodeTypeSkuCapacity","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSkuScaleType":"Microsoft.ServiceFabric.NodeTypeSkuScaleType","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSupportedSku":"Microsoft.ServiceFabric.NodeTypeSupportedSku","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeUpdateParameters":"Microsoft.ServiceFabric.NodeTypeUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.NsgProtocol":"Microsoft.ServiceFabric.NsgProtocol","com.azure.resourcemanager.servicefabricmanagedclusters.models.OsType":"Microsoft.ServiceFabric.OsType","com.azure.resourcemanager.servicefabricmanagedclusters.models.Partition":"Microsoft.ServiceFabric.Partition","com.azure.resourcemanager.servicefabricmanagedclusters.models.PartitionInstanceCountScaleMechanism":"Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism","com.azure.resourcemanager.servicefabricmanagedclusters.models.PartitionScheme":"Microsoft.ServiceFabric.PartitionScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateEndpointNetworkPolicies":"Microsoft.ServiceFabric.PrivateEndpointNetworkPolicies","com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateIpAddressVersion":"Microsoft.ServiceFabric.PrivateIPAddressVersion","com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateLinkServiceNetworkPolicies":"Microsoft.ServiceFabric.PrivateLinkServiceNetworkPolicies","com.azure.resourcemanager.servicefabricmanagedclusters.models.ProbeProtocol":"Microsoft.ServiceFabric.ProbeProtocol","com.azure.resourcemanager.servicefabricmanagedclusters.models.Protocol":"Microsoft.ServiceFabric.Protocol","com.azure.resourcemanager.servicefabricmanagedclusters.models.PublicIpAddressVersion":"Microsoft.ServiceFabric.PublicIPAddressVersion","com.azure.resourcemanager.servicefabricmanagedclusters.models.ResourceAzStatus":"Microsoft.ServiceFabric.ResourceAzStatus","com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMode":"Microsoft.ServiceFabric.RollingUpgradeMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMonitoringPolicy":"Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters":"Microsoft.ServiceFabric.RuntimeResumeApplicationUpgradeParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingMechanism":"Microsoft.ServiceFabric.ScalingMechanism","com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingPolicy":"Microsoft.ServiceFabric.ScalingPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingTrigger":"Microsoft.ServiceFabric.ScalingTrigger","com.azure.resourcemanager.servicefabricmanagedclusters.models.SecurityEncryptionType":"Microsoft.ServiceFabric.SecurityEncryptionType","com.azure.resourcemanager.servicefabricmanagedclusters.models.SecurityType":"Microsoft.ServiceFabric.SecurityType","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceCorrelation":"Microsoft.ServiceFabric.ServiceCorrelation","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceCorrelationScheme":"Microsoft.ServiceFabric.ServiceCorrelationScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceEndpoint":"Microsoft.ServiceFabric.ServiceEndpoint","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceKind":"Microsoft.ServiceFabric.ServiceKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceLoadMetric":"Microsoft.ServiceFabric.ServiceLoadMetric","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceLoadMetricWeight":"Microsoft.ServiceFabric.ServiceLoadMetricWeight","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePackageActivationMode":"Microsoft.ServiceFabric.ServicePackageActivationMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementInvalidDomainPolicy":"Microsoft.ServiceFabric.ServicePlacementInvalidDomainPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementNonPartiallyPlaceServicePolicy":"Microsoft.ServiceFabric.ServicePlacementNonPartiallyPlaceServicePolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementPolicy":"Microsoft.ServiceFabric.ServicePlacementPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementPolicyType":"Microsoft.ServiceFabric.ServicePlacementPolicyType","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementPreferPrimaryDomainPolicy":"Microsoft.ServiceFabric.ServicePlacementPreferPrimaryDomainPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementRequireDomainDistributionPolicy":"Microsoft.ServiceFabric.ServicePlacementRequireDomainDistributionPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementRequiredDomainPolicy":"Microsoft.ServiceFabric.ServicePlacementRequiredDomainPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResourceProperties":"Microsoft.ServiceFabric.ServiceResourceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResourcePropertiesBase":"Microsoft.ServiceFabric.ServiceResourcePropertiesBase","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceScalingMechanismKind":"Microsoft.ServiceFabric.ServiceScalingMechanismKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceScalingTriggerKind":"Microsoft.ServiceFabric.ServiceScalingTriggerKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceTypeHealthPolicy":"Microsoft.ServiceFabric.ServiceTypeHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceUpdateParameters":"Microsoft.ServiceFabric.ServiceUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.SettingsParameterDescription":"Microsoft.ServiceFabric.SettingsParameterDescription","com.azure.resourcemanager.servicefabricmanagedclusters.models.SettingsSectionDescription":"Microsoft.ServiceFabric.SettingsSectionDescription","com.azure.resourcemanager.servicefabricmanagedclusters.models.SfmcOperationStatus":"Microsoft.ServiceFabric.SfmcOperationStatus","com.azure.resourcemanager.servicefabricmanagedclusters.models.SingletonPartitionScheme":"Microsoft.ServiceFabric.SingletonPartitionScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.Sku":"Microsoft.ServiceFabric.Sku","com.azure.resourcemanager.servicefabricmanagedclusters.models.SkuName":"Microsoft.ServiceFabric.SkuName","com.azure.resourcemanager.servicefabricmanagedclusters.models.StatefulServiceProperties":"Microsoft.ServiceFabric.StatefulServiceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.models.StatelessServiceProperties":"Microsoft.ServiceFabric.StatelessServiceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.models.Subnet":"Microsoft.ServiceFabric.Subnet","com.azure.resourcemanager.servicefabricmanagedclusters.models.UniformInt64RangePartitionScheme":"Microsoft.ServiceFabric.UniformInt64RangePartitionScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.UpdateType":"Microsoft.ServiceFabric.UpdateType","com.azure.resourcemanager.servicefabricmanagedclusters.models.UserAssignedIdentity":"Microsoft.ServiceFabric.UserAssignedIdentity","com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSize":"Microsoft.ServiceFabric.VMSize","com.azure.resourcemanager.servicefabricmanagedclusters.models.VaultCertificate":"Microsoft.ServiceFabric.VaultCertificate","com.azure.resourcemanager.servicefabricmanagedclusters.models.VaultSecretGroup":"Microsoft.ServiceFabric.VaultSecretGroup","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmApplication":"Microsoft.ServiceFabric.VmApplication","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmImagePlan":"Microsoft.ServiceFabric.VmImagePlan","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmManagedIdentity":"Microsoft.ServiceFabric.VmManagedIdentity","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmSetupAction":"Microsoft.ServiceFabric.VmSetupAction","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssDataDisk":"Microsoft.ServiceFabric.VmssDataDisk","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtension":"Microsoft.ServiceFabric.VMSSExtension","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtensionSetupOrder":"Microsoft.ServiceFabric.VmssExtensionSetupOrder","com.azure.resourcemanager.servicefabricmanagedclusters.models.ZonalUpdateMode":"Microsoft.ServiceFabric.ZonalUpdateMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.ZoneFaultSimulationContent":"Microsoft.ServiceFabric.ZoneFaultSimulationContent"},"generatedFiles":["src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/ServiceFabricManagedClustersManager.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationTypeVersionsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationTypesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedApplyMaintenanceWindowsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedAzResiliencyStatusesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClusterVersionsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedMaintenanceWindowStatusesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedUnsupportedVMSizesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypeSkusClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServiceFabricManagedClustersMgmtClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServicesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationResourceInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationResourceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeResourceInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeResourceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeVersionResourceInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeVersionResourceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/FaultSimulationInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedAzResiliencyStatusInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterCodeVersionResultInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterVersionDetails.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedMaintenanceWindowStatusInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedVMSizeInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/NodeTypeAvailableSkuInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/NodeTypeInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/NodeTypeProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/OperationResultInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ServiceResourceInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/VMSSExtensionProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/package-info.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationResourceImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeResourceImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionResourceImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/FaultSimulationImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedApplyMaintenanceWindowsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedApplyMaintenanceWindowsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterCodeVersionResultImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterVersionsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedUnsupportedVMSizesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedUnsupportedVMSizesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedVMSizeImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeAvailableSkuImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeSkusClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeSkusImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationResultImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientBuilder.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceResourceImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationResourceList.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationTypeResourceList.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationTypeVersionResourceList.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/FaultSimulationListResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ManagedClusterListResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ManagedVMSizesResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/NodeTypeListResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/NodeTypeListSkuResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ServiceResourceList.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/package-info.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Access.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AddRemoveIncrementalNamedPartitionScalingMechanism.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AdditionalNetworkInterfaceConfiguration.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResource.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeResource.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionResource.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersions.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionsCleanupPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypes.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpgradePolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Applications.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AutoGeneratedDomainNameLabelScope.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AvailableOperationDisplay.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AveragePartitionLoadScalingTrigger.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AverageServiceLoadScalingTrigger.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AzureActiveDirectory.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClientCertificate.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterMonitoringPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterState.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeCadence.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeDeltaHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradePolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Direction.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/DiskType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/EndpointRangeDescription.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/EvictionPolicyType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FailureAction.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulation.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationConstraints.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationContent.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationContentWrapper.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationDetails.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationIdContent.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FrontendConfiguration.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpAddressType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpConfiguration.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpConfigurationPublicIpAddressConfiguration.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpTag.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/LoadBalancingRule.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedApplyMaintenanceWindows.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedAzResiliencyStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedAzResiliencyStatuses.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedCluster.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterAddOnFeature.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterCodeVersionResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterVersionEnvironment.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterVersions.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedIdentity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedIdentityType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedMaintenanceWindowStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedMaintenanceWindowStatuses.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedUnsupportedVMSizes.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedVMSize.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/MoveCost.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NamedPartitionScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NetworkSecurityRule.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeActionParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeAvailableSku.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeFaultSimulation.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeNatConfig.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSku.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkuCapacity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkuScaleType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSupportedSku.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypes.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NsgProtocol.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Operations.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OsType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Partition.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PartitionInstanceCountScaleMechanism.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PartitionScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateEndpointNetworkPolicies.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateIpAddressVersion.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateLinkServiceNetworkPolicies.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ProbeProtocol.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Protocol.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PublicIpAddressVersion.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ResourceAzStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMonitoringPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeResumeApplicationUpgradeParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingMechanism.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingTrigger.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SecurityEncryptionType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SecurityType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceCorrelation.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceCorrelationScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceEndpoint.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceLoadMetric.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceLoadMetricWeight.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePackageActivationMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementInvalidDomainPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementNonPartiallyPlaceServicePolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPolicyType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPreferPrimaryDomainPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementRequireDomainDistributionPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementRequiredDomainPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResource.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourcePropertiesBase.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceScalingMechanismKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceScalingTriggerKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceTypeHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Services.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SettingsParameterDescription.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SettingsSectionDescription.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SfmcOperationStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SingletonPartitionScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Sku.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SkuName.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/StatefulServiceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/StatelessServiceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Subnet.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UniformInt64RangePartitionScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UpdateType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VMSize.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VaultCertificate.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VaultSecretGroup.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmApplication.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmImagePlan.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmManagedIdentity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmSetupAction.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssDataDisk.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssExtension.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssExtensionSetupOrder.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ZonalUpdateMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ZoneFaultSimulationContent.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/package-info.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersion":"2025-10-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient":"Microsoft.ServiceFabric.ApplicationTypeVersions","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.ApplicationTypeVersions.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.beginDelete":"Microsoft.ServiceFabric.ApplicationTypeVersions.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.createOrUpdate":"Microsoft.ServiceFabric.ApplicationTypeVersions.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.delete":"Microsoft.ServiceFabric.ApplicationTypeVersions.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.get":"Microsoft.ServiceFabric.ApplicationTypeVersions.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.getWithResponse":"Microsoft.ServiceFabric.ApplicationTypeVersions.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.listByApplicationTypes":"Microsoft.ServiceFabric.ApplicationTypeVersions.listByApplicationTypes","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.update":"Microsoft.ServiceFabric.ApplicationTypeVersions.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient.updateWithResponse":"Microsoft.ServiceFabric.ApplicationTypeVersions.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient":"Microsoft.ServiceFabric.ApplicationTypes","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.beginDelete":"Microsoft.ServiceFabric.ApplicationTypes.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.createOrUpdate":"Microsoft.ServiceFabric.ApplicationTypes.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.createOrUpdateWithResponse":"Microsoft.ServiceFabric.ApplicationTypes.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.delete":"Microsoft.ServiceFabric.ApplicationTypes.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.get":"Microsoft.ServiceFabric.ApplicationTypes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.getWithResponse":"Microsoft.ServiceFabric.ApplicationTypes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.list":"Microsoft.ServiceFabric.ApplicationTypes.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.update":"Microsoft.ServiceFabric.ApplicationTypes.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient.updateWithResponse":"Microsoft.ServiceFabric.ApplicationTypes.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient":"Microsoft.ServiceFabric.Applications","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.Applications.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginDelete":"Microsoft.ServiceFabric.Applications.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginFetchHealth":"Microsoft.ServiceFabric.Applications.fetchHealth","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginReadUpgrade":"Microsoft.ServiceFabric.Applications.readUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginRestartDeployedCodePackage":"Microsoft.ServiceFabric.Applications.restartDeployedCodePackage","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginResumeUpgrade":"Microsoft.ServiceFabric.Applications.resumeUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginStartRollback":"Microsoft.ServiceFabric.Applications.startRollback","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginUpdate":"Microsoft.ServiceFabric.Applications.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.beginUpdateUpgrade":"Microsoft.ServiceFabric.Applications.updateUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.createOrUpdate":"Microsoft.ServiceFabric.Applications.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.delete":"Microsoft.ServiceFabric.Applications.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.fetchHealth":"Microsoft.ServiceFabric.Applications.fetchHealth","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.get":"Microsoft.ServiceFabric.Applications.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.getWithResponse":"Microsoft.ServiceFabric.Applications.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.list":"Microsoft.ServiceFabric.Applications.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.readUpgrade":"Microsoft.ServiceFabric.Applications.readUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.restartDeployedCodePackage":"Microsoft.ServiceFabric.Applications.restartDeployedCodePackage","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.resumeUpgrade":"Microsoft.ServiceFabric.Applications.resumeUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.startRollback":"Microsoft.ServiceFabric.Applications.startRollback","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.update":"Microsoft.ServiceFabric.Applications.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient.updateUpgrade":"Microsoft.ServiceFabric.Applications.updateUpgrade","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient":"Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient.post":"Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedApplyMaintenanceWindowsClient.postWithResponse":"Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedAzResiliencyStatusesClient":"Microsoft.ServiceFabric.ManagedAzResiliencyStatus","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedAzResiliencyStatusesClient.get":"Microsoft.ServiceFabric.ManagedAzResiliencyStatus.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedAzResiliencyStatusesClient.getWithResponse":"Microsoft.ServiceFabric.ManagedAzResiliencyStatus.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient":"Microsoft.ServiceFabric.ManagedClusterVersion","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.get":"Microsoft.ServiceFabric.ManagedClusterVersion.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.getByEnvironment":"Microsoft.ServiceFabric.ManagedClusterVersion.getByEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.getByEnvironmentWithResponse":"Microsoft.ServiceFabric.ManagedClusterVersion.getByEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.getWithResponse":"Microsoft.ServiceFabric.ManagedClusterVersion.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.list":"Microsoft.ServiceFabric.ManagedClusterVersion.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.listByEnvironment":"Microsoft.ServiceFabric.ManagedClusterVersion.listByEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.listByEnvironmentWithResponse":"Microsoft.ServiceFabric.ManagedClusterVersion.listByEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClusterVersionsClient.listWithResponse":"Microsoft.ServiceFabric.ManagedClusterVersion.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient":"Microsoft.ServiceFabric.ManagedClusters","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.ManagedClusters.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginDelete":"Microsoft.ServiceFabric.ManagedClusters.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginStartFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginStopFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.beginUpdate":"Microsoft.ServiceFabric.ManagedClusters.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.createOrUpdate":"Microsoft.ServiceFabric.ManagedClusters.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.delete":"Microsoft.ServiceFabric.ManagedClusters.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getByResourceGroup":"Microsoft.ServiceFabric.ManagedClusters.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getByResourceGroupWithResponse":"Microsoft.ServiceFabric.ManagedClusters.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.getFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.getFaultSimulationWithResponse":"Microsoft.ServiceFabric.ManagedClusters.getFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.list":"Microsoft.ServiceFabric.ManagedClusters.listBySubscription","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.listByResourceGroup":"Microsoft.ServiceFabric.ManagedClusters.listByResourceGroup","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.listFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.listFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.startFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.stopFaultSimulation":"Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient.update":"Microsoft.ServiceFabric.ManagedClusters.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient":"Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient.get":"Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedMaintenanceWindowStatusesClient.getWithResponse":"Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedUnsupportedVMSizesClient":"Microsoft.ServiceFabric.ManagedUnsupportedVMSizes","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedUnsupportedVMSizesClient.get":"Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedUnsupportedVMSizesClient.getWithResponse":"Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedUnsupportedVMSizesClient.list":"Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypeSkusClient":"Microsoft.ServiceFabric.NodeTypeSkus","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypeSkusClient.list":"Microsoft.ServiceFabric.NodeTypeSkus.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient":"Microsoft.ServiceFabric.NodeTypes","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.NodeTypes.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginDeallocate":"Microsoft.ServiceFabric.NodeTypes.deallocate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginDelete":"Microsoft.ServiceFabric.NodeTypes.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginDeleteNode":"Microsoft.ServiceFabric.NodeTypes.deleteNode","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginRedeploy":"Microsoft.ServiceFabric.NodeTypes.redeploy","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginReimage":"Microsoft.ServiceFabric.NodeTypes.reimage","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginRestart":"Microsoft.ServiceFabric.NodeTypes.restart","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginStart":"Microsoft.ServiceFabric.NodeTypes.start","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginStartFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.startFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginStopFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.stopFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.beginUpdate":"Microsoft.ServiceFabric.NodeTypes.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.createOrUpdate":"Microsoft.ServiceFabric.NodeTypes.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.deallocate":"Microsoft.ServiceFabric.NodeTypes.deallocate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.delete":"Microsoft.ServiceFabric.NodeTypes.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.deleteNode":"Microsoft.ServiceFabric.NodeTypes.deleteNode","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.get":"Microsoft.ServiceFabric.NodeTypes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.getFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.getFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.getFaultSimulationWithResponse":"Microsoft.ServiceFabric.NodeTypes.getFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.getWithResponse":"Microsoft.ServiceFabric.NodeTypes.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.listByManagedClusters":"Microsoft.ServiceFabric.NodeTypes.listByManagedClusters","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.listFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.listFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.redeploy":"Microsoft.ServiceFabric.NodeTypes.redeploy","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.reimage":"Microsoft.ServiceFabric.NodeTypes.reimage","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.restart":"Microsoft.ServiceFabric.NodeTypes.restart","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.start":"Microsoft.ServiceFabric.NodeTypes.start","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.startFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.startFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.stopFaultSimulation":"Microsoft.ServiceFabric.NodeTypes.stopFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient.update":"Microsoft.ServiceFabric.NodeTypes.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.OperationsClient":"Microsoft.ServiceFabric.Operations","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.OperationsClient.list":"Microsoft.ServiceFabric.Operations.list","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServiceFabricManagedClustersMgmtClient":"Microsoft.ServiceFabric","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient":"Microsoft.ServiceFabric.Services","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.beginCreateOrUpdate":"Microsoft.ServiceFabric.Services.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.beginDelete":"Microsoft.ServiceFabric.Services.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.beginRestartReplica":"Microsoft.ServiceFabric.Services.restartReplica","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.createOrUpdate":"Microsoft.ServiceFabric.Services.createOrUpdate","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.delete":"Microsoft.ServiceFabric.Services.delete","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.get":"Microsoft.ServiceFabric.Services.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.getWithResponse":"Microsoft.ServiceFabric.Services.get","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.listByApplications":"Microsoft.ServiceFabric.Services.listByApplications","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.restartReplica":"Microsoft.ServiceFabric.Services.restartReplica","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.update":"Microsoft.ServiceFabric.Services.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient.updateWithResponse":"Microsoft.ServiceFabric.Services.update","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceInner":"Microsoft.ServiceFabric.ApplicationResource","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceProperties":"Microsoft.ServiceFabric.ApplicationResourceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeResourceInner":"Microsoft.ServiceFabric.ApplicationTypeResource","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeResourceProperties":"Microsoft.ServiceFabric.ApplicationTypeResourceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeVersionResourceInner":"Microsoft.ServiceFabric.ApplicationTypeVersionResource","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeVersionResourceProperties":"Microsoft.ServiceFabric.ApplicationTypeVersionResourceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.FaultSimulationInner":"Microsoft.ServiceFabric.FaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedAzResiliencyStatusInner":"Microsoft.ServiceFabric.ManagedAzResiliencyStatusContent","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterCodeVersionResultInner":"Microsoft.ServiceFabric.ManagedClusterCodeVersionResult","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterInner":"Microsoft.ServiceFabric.ManagedCluster","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterProperties":"Microsoft.ServiceFabric.ManagedClusterProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterVersionDetails":"Microsoft.ServiceFabric.ManagedClusterVersionDetails","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedMaintenanceWindowStatusInner":"Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedVMSizeInner":"Microsoft.ServiceFabric.ManagedVMSize","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeAvailableSkuInner":"Microsoft.ServiceFabric.NodeTypeAvailableSku","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeInner":"Microsoft.ServiceFabric.NodeType","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeProperties":"Microsoft.ServiceFabric.NodeTypeProperties","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.OperationResultInner":"Microsoft.ServiceFabric.OperationResult","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ServiceResourceInner":"Microsoft.ServiceFabric.ServiceResource","com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.VMSSExtensionProperties":"Microsoft.ServiceFabric.VMSSExtensionProperties","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.ServiceFabricManagedClustersMgmtClientBuilder":"Microsoft.ServiceFabric","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationResourceList":"Microsoft.ServiceFabric.ApplicationResourceList","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationTypeResourceList":"Microsoft.ServiceFabric.ApplicationTypeResourceList","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationTypeVersionResourceList":"Microsoft.ServiceFabric.ApplicationTypeVersionResourceList","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.FaultSimulationListResult":"Microsoft.ServiceFabric.FaultSimulationListResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ManagedClusterListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ManagedVMSizesResult":"Microsoft.ServiceFabric.ManagedVMSizesResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.NodeTypeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.NodeTypeListSkuResult":"Microsoft.ServiceFabric.NodeTypeListSkuResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.OperationListResult":"Microsoft.ServiceFabric.OperationListResult","com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ServiceResourceList":"Microsoft.ServiceFabric.ServiceResourceList","com.azure.resourcemanager.servicefabricmanagedclusters.models.Access":"Microsoft.ServiceFabric.Access","com.azure.resourcemanager.servicefabricmanagedclusters.models.AddRemoveIncrementalNamedPartitionScalingMechanism":"Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism","com.azure.resourcemanager.servicefabricmanagedclusters.models.AdditionalNetworkInterfaceConfiguration":"Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest":"Microsoft.ServiceFabric.ApplicationFetchHealthRequest","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationHealthPolicy":"Microsoft.ServiceFabric.ApplicationHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeUpdateParameters":"Microsoft.ServiceFabric.ApplicationTypeUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionUpdateParameters":"Microsoft.ServiceFabric.ApplicationTypeVersionUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionsCleanupPolicy":"Microsoft.ServiceFabric.ApplicationTypeVersionsCleanupPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParameters":"Microsoft.ServiceFabric.ApplicationUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParametersProperties":"Microsoft.ServiceFabric.ApplicationUpdateParametersProperties","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpgradePolicy":"Microsoft.ServiceFabric.ApplicationUpgradePolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUserAssignedIdentity":"Microsoft.ServiceFabric.ApplicationUserAssignedIdentity","com.azure.resourcemanager.servicefabricmanagedclusters.models.AutoGeneratedDomainNameLabelScope":"Microsoft.ServiceFabric.AutoGeneratedDomainNameLabelScope","com.azure.resourcemanager.servicefabricmanagedclusters.models.AvailableOperationDisplay":"Microsoft.ServiceFabric.AvailableOperationDisplay","com.azure.resourcemanager.servicefabricmanagedclusters.models.AveragePartitionLoadScalingTrigger":"Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger","com.azure.resourcemanager.servicefabricmanagedclusters.models.AverageServiceLoadScalingTrigger":"Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger","com.azure.resourcemanager.servicefabricmanagedclusters.models.AzureActiveDirectory":"Microsoft.ServiceFabric.AzureActiveDirectory","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClientCertificate":"Microsoft.ServiceFabric.ClientCertificate","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterHealthPolicy":"Microsoft.ServiceFabric.ClusterHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterMonitoringPolicy":"Microsoft.ServiceFabric.ClusterMonitoringPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterState":"Microsoft.ServiceFabric.ClusterState","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeCadence":"Microsoft.ServiceFabric.ClusterUpgradeCadence","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeDeltaHealthPolicy":"Microsoft.ServiceFabric.ClusterUpgradeDeltaHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeMode":"Microsoft.ServiceFabric.ClusterUpgradeMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradePolicy":"Microsoft.ServiceFabric.ClusterUpgradePolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.Direction":"Microsoft.ServiceFabric.Direction","com.azure.resourcemanager.servicefabricmanagedclusters.models.DiskType":"Microsoft.ServiceFabric.DiskType","com.azure.resourcemanager.servicefabricmanagedclusters.models.EndpointRangeDescription":"Microsoft.ServiceFabric.EndpointRangeDescription","com.azure.resourcemanager.servicefabricmanagedclusters.models.EvictionPolicyType":"Microsoft.ServiceFabric.EvictionPolicyType","com.azure.resourcemanager.servicefabricmanagedclusters.models.FailureAction":"Microsoft.ServiceFabric.FailureAction","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultKind":"Microsoft.ServiceFabric.FaultKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationConstraints":"Microsoft.ServiceFabric.FaultSimulationConstraints","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContent":"Microsoft.ServiceFabric.FaultSimulationContent","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContentWrapper":"Microsoft.ServiceFabric.FaultSimulationContentWrapper","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationDetails":"Microsoft.ServiceFabric.FaultSimulationDetails","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationIdContent":"Microsoft.ServiceFabric.FaultSimulationIdContent","com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationStatus":"Microsoft.ServiceFabric.FaultSimulationStatus","com.azure.resourcemanager.servicefabricmanagedclusters.models.FrontendConfiguration":"Microsoft.ServiceFabric.FrontendConfiguration","com.azure.resourcemanager.servicefabricmanagedclusters.models.HealthFilter":"Microsoft.ServiceFabric.HealthFilter","com.azure.resourcemanager.servicefabricmanagedclusters.models.IpAddressType":"Microsoft.ServiceFabric.IPAddressType","com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfiguration":"Microsoft.ServiceFabric.IpConfiguration","com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfigurationPublicIpAddressConfiguration":"Microsoft.ServiceFabric.PublicIPAddressConfiguration","com.azure.resourcemanager.servicefabricmanagedclusters.models.IpTag":"Microsoft.ServiceFabric.IpTag","com.azure.resourcemanager.servicefabricmanagedclusters.models.LoadBalancingRule":"Microsoft.ServiceFabric.LoadBalancingRule","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterAddOnFeature":"Microsoft.ServiceFabric.ManagedClusterAddOnFeature","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterUpdateParameters":"Microsoft.ServiceFabric.ManagedClusterUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterVersionEnvironment":"Microsoft.ServiceFabric.ManagedClusterVersionEnvironment","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedIdentity":"Microsoft.ServiceFabric.ManagedIdentity","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedIdentityType":"Microsoft.ServiceFabric.ManagedIdentityType","com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedResourceProvisioningState":"Microsoft.ServiceFabric.ManagedResourceProvisioningState","com.azure.resourcemanager.servicefabricmanagedclusters.models.MoveCost":"Microsoft.ServiceFabric.MoveCost","com.azure.resourcemanager.servicefabricmanagedclusters.models.NamedPartitionScheme":"Microsoft.ServiceFabric.NamedPartitionScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.NetworkSecurityRule":"Microsoft.ServiceFabric.NetworkSecurityRule","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters":"Microsoft.ServiceFabric.NodeTypeActionParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeFaultSimulation":"Microsoft.ServiceFabric.NodeTypeFaultSimulation","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeNatConfig":"Microsoft.ServiceFabric.NodeTypeNatConfig","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSku":"Microsoft.ServiceFabric.NodeTypeSku","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSkuCapacity":"Microsoft.ServiceFabric.NodeTypeSkuCapacity","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSkuScaleType":"Microsoft.ServiceFabric.NodeTypeSkuScaleType","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSupportedSku":"Microsoft.ServiceFabric.NodeTypeSupportedSku","com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeUpdateParameters":"Microsoft.ServiceFabric.NodeTypeUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.NsgProtocol":"Microsoft.ServiceFabric.NsgProtocol","com.azure.resourcemanager.servicefabricmanagedclusters.models.OsType":"Microsoft.ServiceFabric.OsType","com.azure.resourcemanager.servicefabricmanagedclusters.models.Partition":"Microsoft.ServiceFabric.Partition","com.azure.resourcemanager.servicefabricmanagedclusters.models.PartitionInstanceCountScaleMechanism":"Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism","com.azure.resourcemanager.servicefabricmanagedclusters.models.PartitionScheme":"Microsoft.ServiceFabric.PartitionScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateEndpointNetworkPolicies":"Microsoft.ServiceFabric.PrivateEndpointNetworkPolicies","com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateIpAddressVersion":"Microsoft.ServiceFabric.PrivateIPAddressVersion","com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateLinkServiceNetworkPolicies":"Microsoft.ServiceFabric.PrivateLinkServiceNetworkPolicies","com.azure.resourcemanager.servicefabricmanagedclusters.models.ProbeProtocol":"Microsoft.ServiceFabric.ProbeProtocol","com.azure.resourcemanager.servicefabricmanagedclusters.models.Protocol":"Microsoft.ServiceFabric.Protocol","com.azure.resourcemanager.servicefabricmanagedclusters.models.PublicIpAddressVersion":"Microsoft.ServiceFabric.PublicIPAddressVersion","com.azure.resourcemanager.servicefabricmanagedclusters.models.ResourceAzStatus":"Microsoft.ServiceFabric.ResourceAzStatus","com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartDeployedCodePackageRequest":"Microsoft.ServiceFabric.RestartDeployedCodePackageRequest","com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartKind":"Microsoft.ServiceFabric.RestartKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest":"Microsoft.ServiceFabric.RestartReplicaRequest","com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMode":"Microsoft.ServiceFabric.RollingUpgradeMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMonitoringPolicy":"Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeApplicationHealthPolicy":"Microsoft.ServiceFabric.RuntimeApplicationHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeFailureAction":"Microsoft.ServiceFabric.RuntimeFailureAction","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters":"Microsoft.ServiceFabric.RuntimeResumeApplicationUpgradeParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeMode":"Microsoft.ServiceFabric.RuntimeRollingUpgradeMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeUpdateMonitoringPolicy":"Microsoft.ServiceFabric.RuntimeRollingUpgradeUpdateMonitoringPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeServiceTypeHealthPolicy":"Microsoft.ServiceFabric.RuntimeServiceTypeHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters":"Microsoft.ServiceFabric.RuntimeUpdateApplicationUpgradeParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpgradeKind":"Microsoft.ServiceFabric.RuntimeUpgradeKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingMechanism":"Microsoft.ServiceFabric.ScalingMechanism","com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingPolicy":"Microsoft.ServiceFabric.ScalingPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingTrigger":"Microsoft.ServiceFabric.ScalingTrigger","com.azure.resourcemanager.servicefabricmanagedclusters.models.SecurityEncryptionType":"Microsoft.ServiceFabric.SecurityEncryptionType","com.azure.resourcemanager.servicefabricmanagedclusters.models.SecurityType":"Microsoft.ServiceFabric.SecurityType","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceCorrelation":"Microsoft.ServiceFabric.ServiceCorrelation","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceCorrelationScheme":"Microsoft.ServiceFabric.ServiceCorrelationScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceEndpoint":"Microsoft.ServiceFabric.ServiceEndpoint","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceKind":"Microsoft.ServiceFabric.ServiceKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceLoadMetric":"Microsoft.ServiceFabric.ServiceLoadMetric","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceLoadMetricWeight":"Microsoft.ServiceFabric.ServiceLoadMetricWeight","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePackageActivationMode":"Microsoft.ServiceFabric.ServicePackageActivationMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementInvalidDomainPolicy":"Microsoft.ServiceFabric.ServicePlacementInvalidDomainPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementNonPartiallyPlaceServicePolicy":"Microsoft.ServiceFabric.ServicePlacementNonPartiallyPlaceServicePolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementPolicy":"Microsoft.ServiceFabric.ServicePlacementPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementPolicyType":"Microsoft.ServiceFabric.ServicePlacementPolicyType","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementPreferPrimaryDomainPolicy":"Microsoft.ServiceFabric.ServicePlacementPreferPrimaryDomainPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementRequireDomainDistributionPolicy":"Microsoft.ServiceFabric.ServicePlacementRequireDomainDistributionPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementRequiredDomainPolicy":"Microsoft.ServiceFabric.ServicePlacementRequiredDomainPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResourceProperties":"Microsoft.ServiceFabric.ServiceResourceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResourcePropertiesBase":"Microsoft.ServiceFabric.ServiceResourcePropertiesBase","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceScalingMechanismKind":"Microsoft.ServiceFabric.ServiceScalingMechanismKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceScalingTriggerKind":"Microsoft.ServiceFabric.ServiceScalingTriggerKind","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceTypeHealthPolicy":"Microsoft.ServiceFabric.ServiceTypeHealthPolicy","com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceUpdateParameters":"Microsoft.ServiceFabric.ServiceUpdateParameters","com.azure.resourcemanager.servicefabricmanagedclusters.models.SettingsParameterDescription":"Microsoft.ServiceFabric.SettingsParameterDescription","com.azure.resourcemanager.servicefabricmanagedclusters.models.SettingsSectionDescription":"Microsoft.ServiceFabric.SettingsSectionDescription","com.azure.resourcemanager.servicefabricmanagedclusters.models.SfmcOperationStatus":"Microsoft.ServiceFabric.SfmcOperationStatus","com.azure.resourcemanager.servicefabricmanagedclusters.models.SingletonPartitionScheme":"Microsoft.ServiceFabric.SingletonPartitionScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.Sku":"Microsoft.ServiceFabric.Sku","com.azure.resourcemanager.servicefabricmanagedclusters.models.SkuName":"Microsoft.ServiceFabric.SkuName","com.azure.resourcemanager.servicefabricmanagedclusters.models.StatefulServiceProperties":"Microsoft.ServiceFabric.StatefulServiceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.models.StatelessServiceProperties":"Microsoft.ServiceFabric.StatelessServiceProperties","com.azure.resourcemanager.servicefabricmanagedclusters.models.Subnet":"Microsoft.ServiceFabric.Subnet","com.azure.resourcemanager.servicefabricmanagedclusters.models.UniformInt64RangePartitionScheme":"Microsoft.ServiceFabric.UniformInt64RangePartitionScheme","com.azure.resourcemanager.servicefabricmanagedclusters.models.UpdateType":"Microsoft.ServiceFabric.UpdateType","com.azure.resourcemanager.servicefabricmanagedclusters.models.UserAssignedIdentity":"Microsoft.ServiceFabric.UserAssignedIdentity","com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSize":"Microsoft.ServiceFabric.VMSize","com.azure.resourcemanager.servicefabricmanagedclusters.models.VaultCertificate":"Microsoft.ServiceFabric.VaultCertificate","com.azure.resourcemanager.servicefabricmanagedclusters.models.VaultSecretGroup":"Microsoft.ServiceFabric.VaultSecretGroup","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmApplication":"Microsoft.ServiceFabric.VmApplication","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmImagePlan":"Microsoft.ServiceFabric.VmImagePlan","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmManagedIdentity":"Microsoft.ServiceFabric.VmManagedIdentity","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmSetupAction":"Microsoft.ServiceFabric.VmSetupAction","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssDataDisk":"Microsoft.ServiceFabric.VmssDataDisk","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtension":"Microsoft.ServiceFabric.VMSSExtension","com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtensionSetupOrder":"Microsoft.ServiceFabric.VmssExtensionSetupOrder","com.azure.resourcemanager.servicefabricmanagedclusters.models.ZonalUpdateMode":"Microsoft.ServiceFabric.ZonalUpdateMode","com.azure.resourcemanager.servicefabricmanagedclusters.models.ZoneFaultSimulationContent":"Microsoft.ServiceFabric.ZoneFaultSimulationContent"},"generatedFiles":["src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/ServiceFabricManagedClustersManager.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationTypeVersionsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationTypesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedApplyMaintenanceWindowsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedAzResiliencyStatusesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClusterVersionsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedMaintenanceWindowStatusesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedUnsupportedVMSizesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypeSkusClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServiceFabricManagedClustersMgmtClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServicesClient.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationResourceInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationResourceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeResourceInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeResourceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeVersionResourceInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeVersionResourceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/FaultSimulationInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedAzResiliencyStatusInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterCodeVersionResultInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterVersionDetails.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedMaintenanceWindowStatusInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedVMSizeInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/NodeTypeAvailableSkuInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/NodeTypeInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/NodeTypeProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/OperationResultInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ServiceResourceInner.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/VMSSExtensionProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/package-info.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationResourceImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeResourceImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionResourceImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/FaultSimulationImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedApplyMaintenanceWindowsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedApplyMaintenanceWindowsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterCodeVersionResultImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterVersionsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedUnsupportedVMSizesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedUnsupportedVMSizesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedVMSizeImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeAvailableSkuImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeSkusClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeSkusImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationResultImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientBuilder.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceResourceImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesClientImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesImpl.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationResourceList.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationTypeResourceList.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationTypeVersionResourceList.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/FaultSimulationListResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ManagedClusterListResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ManagedVMSizesResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/NodeTypeListResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/NodeTypeListSkuResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ServiceResourceList.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/package-info.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Access.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AddRemoveIncrementalNamedPartitionScalingMechanism.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AdditionalNetworkInterfaceConfiguration.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationFetchHealthRequest.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResource.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeResource.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionResource.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersions.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionsCleanupPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypes.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParametersProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpgradePolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Applications.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AutoGeneratedDomainNameLabelScope.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AvailableOperationDisplay.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AveragePartitionLoadScalingTrigger.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AverageServiceLoadScalingTrigger.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AzureActiveDirectory.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClientCertificate.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterMonitoringPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterState.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeCadence.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeDeltaHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradePolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Direction.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/DiskType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/EndpointRangeDescription.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/EvictionPolicyType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FailureAction.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulation.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationConstraints.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationContent.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationContentWrapper.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationDetails.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationIdContent.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FrontendConfiguration.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/HealthFilter.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpAddressType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpConfiguration.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpConfigurationPublicIpAddressConfiguration.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpTag.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/LoadBalancingRule.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedApplyMaintenanceWindows.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedAzResiliencyStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedAzResiliencyStatuses.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedCluster.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterAddOnFeature.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterCodeVersionResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterVersionEnvironment.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterVersions.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedIdentity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedIdentityType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedMaintenanceWindowStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedMaintenanceWindowStatuses.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedUnsupportedVMSizes.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedVMSize.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/MoveCost.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NamedPartitionScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NetworkSecurityRule.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeActionParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeAvailableSku.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeFaultSimulation.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeNatConfig.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSku.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkuCapacity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkuScaleType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSupportedSku.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypes.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NsgProtocol.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResult.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Operations.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OsType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Partition.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PartitionInstanceCountScaleMechanism.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PartitionScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateEndpointNetworkPolicies.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateIpAddressVersion.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateLinkServiceNetworkPolicies.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ProbeProtocol.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Protocol.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PublicIpAddressVersion.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ResourceAzStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartDeployedCodePackageRequest.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RestartReplicaRequest.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMonitoringPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeApplicationHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeFailureAction.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeResumeApplicationUpgradeParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeRollingUpgradeUpdateMonitoringPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeServiceTypeHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpdateApplicationUpgradeParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeUpgradeKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingMechanism.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingTrigger.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SecurityEncryptionType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SecurityType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceCorrelation.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceCorrelationScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceEndpoint.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceLoadMetric.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceLoadMetricWeight.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePackageActivationMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementInvalidDomainPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementNonPartiallyPlaceServicePolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPolicyType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPreferPrimaryDomainPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementRequireDomainDistributionPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementRequiredDomainPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResource.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourcePropertiesBase.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceScalingMechanismKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceScalingTriggerKind.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceTypeHealthPolicy.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceUpdateParameters.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Services.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SettingsParameterDescription.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SettingsSectionDescription.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SfmcOperationStatus.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SingletonPartitionScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Sku.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SkuName.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/StatefulServiceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/StatelessServiceProperties.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Subnet.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UniformInt64RangePartitionScheme.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UpdateType.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VMSize.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VaultCertificate.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VaultSecretGroup.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmApplication.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmImagePlan.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmManagedIdentity.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmSetupAction.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssDataDisk.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssExtension.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssExtensionSetupOrder.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ZonalUpdateMode.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ZoneFaultSimulationContent.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/package-info.java","src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateSamples.java index ecca1394e4ae..8ff0129b1815 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationTypeVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPutOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionPutOperation_example.json */ /** * Sample code: Put an application type version. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsDeleteSamples.java index 39abad1f1999..28a122530222 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationTypeVersionsDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionDeleteOperation_example.json */ /** * Sample code: Delete an application type version. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetSamples.java index 139033fb9922..21465e4a54c0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationTypeVersionsGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionGetOperation_example.json */ /** * Sample code: Get an application type version. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypeSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypeSamples.java index 8426f472339e..60c38de2b357 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypeSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypeSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationTypeVersionsListByApplicationTypeSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionListOperation_example.json */ /** * Sample code: Get a list of application type version resources. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsUpdateSamples.java index 545feab5ebb1..9bc50989ecb2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ApplicationTypeVersionsUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeVersionPatchOperation_example.json */ /** * Sample code: Patch an application type version. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateSamples.java index 0c0488cd8362..3555f8663472 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationTypesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePutOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNamePutOperation_example.json */ /** * Sample code: Put an application type. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesDeleteSamples.java index 20902a9a25c0..cf61fc68451b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationTypesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNameDeleteOperation_example.json */ /** * Sample code: Delete an application type. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetSamples.java index 104580efd708..00e4c128726a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationTypesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNameGetOperation_example.json */ /** * Sample code: Get an application type. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListSamples.java index 0ffe80d593fd..dcb19f52d971 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationTypesListSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNameListOperation_example.json */ /** * Sample code: Get a list of application type name resources. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesUpdateSamples.java index 98293488c5a6..8a3a2f4b2048 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ApplicationTypesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationTypeNamePatchOperation_example.json */ /** * Sample code: Patch an application type. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateSamples.java index 8eb42814021b..94510f82fbd2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateSamples.java @@ -18,7 +18,7 @@ */ public final class ApplicationsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationPutOperation_example_max.json + * x-ms-original-file: 2025-10-01-preview/ApplicationPutOperation_example_max.json */ /** * Sample code: Put an application with maximum parameters. @@ -61,7 +61,7 @@ public static void putAnApplicationWithMaximumParameters( } /* - * x-ms-original-file: 2025-06-01-preview/ApplicationPutOperation_example_min.json + * x-ms-original-file: 2025-10-01-preview/ApplicationPutOperation_example_min.json */ /** * Sample code: Put an application with minimum parameters. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsDeleteSamples.java index 83607770c9b4..83ee31d2cd2a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationDeleteOperation_example.json */ /** * Sample code: Delete an application. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsFetchHealthSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsFetchHealthSamples.java new file mode 100644 index 000000000000..33bf2d00cff7 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsFetchHealthSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.HealthFilter; + +/** + * Samples for Applications FetchHealth. + */ +public final class ApplicationsFetchHealthSamples { + /* + * x-ms-original-file: 2025-10-01-preview/ApplicationActionFetchHealth_example.json + */ + /** + * Sample code: Fetch application health. + * + * @param manager Entry point to ServiceFabricManagedClustersManager. + */ + public static void fetchApplicationHealth( + com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + manager.applications() + .fetchHealth("resRg", "myCluster", "myApp", + new ApplicationFetchHealthRequest().withEventsHealthStateFilter(HealthFilter.ERROR) + .withDeployedApplicationsHealthStateFilter(HealthFilter.ERROR) + .withServicesHealthStateFilter(HealthFilter.ERROR) + .withExcludeHealthStatistics(true) + .withTimeout(30L), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetSamples.java index 071a16d6c5b3..6396f3ea0ec6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationGetOperation_example.json */ /** * Sample code: Get an application. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListSamples.java index fc592bae0827..9d3a38fe6440 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationsListSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationListOperation_example.json */ /** * Sample code: Get a list of application resources. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsReadUpgradeSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsReadUpgradeSamples.java index 3aff5325dbc5..4320a0914241 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsReadUpgradeSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsReadUpgradeSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationsReadUpgradeSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationActionGetUpgrade_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationActionGetUpgrade_example.json */ /** * Sample code: Get an application upgrade. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsRestartDeployedCodePackageSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsRestartDeployedCodePackageSamples.java new file mode 100644 index 000000000000..1abda62a915b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsRestartDeployedCodePackageSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartDeployedCodePackageRequest; + +/** + * Samples for Applications RestartDeployedCodePackage. + */ +public final class ApplicationsRestartDeployedCodePackageSamples { + /* + * x-ms-original-file: 2025-10-01-preview/ApplicationActionRestartDeployedCodePackage_example.json + */ + /** + * Sample code: Restart deployed code package. + * + * @param manager Entry point to ServiceFabricManagedClustersManager. + */ + public static void restartDeployedCodePackage( + com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + manager.applications() + .restartDeployedCodePackage("resRg", "myCluster", "myApp", + new RestartDeployedCodePackageRequest().withNodeName("nt1_0") + .withServiceManifestName("TestPkg") + .withCodePackageName("fakeTokenPlaceholder") + .withCodePackageInstanceId("fakeTokenPlaceholder") + .withServicePackageActivationId("sharedProcess"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsResumeUpgradeSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsResumeUpgradeSamples.java index 4ad470d8868d..a7cae81d0282 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsResumeUpgradeSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsResumeUpgradeSamples.java @@ -11,7 +11,7 @@ */ public final class ApplicationsResumeUpgradeSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationActionResumeUpgrade_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationActionResumeUpgrade_example.json */ /** * Sample code: Resume upgrade. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsStartRollbackSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsStartRollbackSamples.java index d04994897e06..44d6ad34fa4d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsStartRollbackSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsStartRollbackSamples.java @@ -9,7 +9,7 @@ */ public final class ApplicationsStartRollbackSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationActionStartRollback_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationActionStartRollback_example.json */ /** * Sample code: Start an application upgrade rollback. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateSamples.java index 38936195655c..08471d5af3d6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.servicefabricmanagedclusters.generated; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationResource; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParametersProperties; import java.util.HashMap; import java.util.Map; @@ -13,7 +14,7 @@ */ public final class ApplicationsUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ApplicationPatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ApplicationPatchOperation_example.json */ /** * Sample code: Patch an application. @@ -25,7 +26,11 @@ public static void patchAnApplication( ApplicationResource resource = manager.applications() .getWithResponse("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("a", "b")).apply(); + resource.update() + .withTags(mapOf("a", "b")) + .withProperties(new ApplicationUpdateParametersProperties() + .withParameters(mapOf("param1", "value1", "param2", "value2"))) + .apply(); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateUpgradeSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateUpgradeSamples.java new file mode 100644 index 000000000000..5859cd0d88f9 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateUpgradeSamples.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeApplicationHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeFailureAction; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeMode; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeUpdateMonitoringPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeServiceTypeHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpgradeKind; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Applications UpdateUpgrade. + */ +public final class ApplicationsUpdateUpgradeSamples { + /* + * x-ms-original-file: 2025-10-01-preview/ApplicationActionUpdateUpgrade_example.json + */ + /** + * Sample code: Update an application upgrade. + * + * @param manager Entry point to ServiceFabricManagedClustersManager. + */ + public static void updateAnApplicationUpgrade( + com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + manager.applications() + .updateUpgrade("resRg", "myCluster", "myApp", + new RuntimeUpdateApplicationUpgradeParameters().withName("fabric:/Voting") + .withUpgradeKind(RuntimeUpgradeKind.ROLLING) + .withApplicationHealthPolicy(new RuntimeApplicationHealthPolicy().withConsiderWarningAsError(true) + .withMaxPercentUnhealthyDeployedApplications(10) + .withDefaultServiceTypeHealthPolicy( + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(12) + .withMaxPercentUnhealthyPartitionsPerService(10) + .withMaxPercentUnhealthyReplicasPerPartition(11)) + .withServiceTypeHealthPolicyMap(mapOf("VotingWeb", + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(15) + .withMaxPercentUnhealthyPartitionsPerService(13) + .withMaxPercentUnhealthyReplicasPerPartition(14)))) + .withUpdateDescription(new RuntimeRollingUpgradeUpdateMonitoringPolicy() + .withRollingUpgradeMode(RuntimeRollingUpgradeMode.MONITORED) + .withForceRestart(true) + .withFailureAction(RuntimeFailureAction.MANUAL) + .withHealthCheckWaitDurationInMilliseconds("PT0H0M10S") + .withHealthCheckStableDurationInMilliseconds("PT1H0M0S") + .withHealthCheckRetryTimeoutInMilliseconds("PT0H15M0S") + .withUpgradeTimeoutInMilliseconds("PT2H0M0S") + .withUpgradeDomainTimeoutInMilliseconds("PT2H0M0S")), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowPostSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowPostSamples.java index c38a9bf247db..1b0d59964f25 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowPostSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowPostSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedApplyMaintenanceWindowPostSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedApplyMaintenanceWindowPost_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedApplyMaintenanceWindowPost_example.json */ /** * Sample code: Apply Maintenance Window Status. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetSamples.java index 7b2103850533..58cd85137723 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedAzResiliencyStatusesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/managedAzResiliencyStatusGet_example.json + * x-ms-original-file: 2025-10-01-preview/managedAzResiliencyStatusGet_example.json */ /** * Sample code: Az Resiliency status of Base Resources. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetByEnvironmentSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetByEnvironmentSamples.java index 56678e3fa7db..a784aaade51d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetByEnvironmentSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetByEnvironmentSamples.java @@ -11,7 +11,7 @@ */ public final class ManagedClusterVersionGetByEnvironmentSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGetByEnvironment_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterVersionGetByEnvironment_example.json */ /** * Sample code: Get cluster version by environment. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetSamples.java index 16c60261ac4e..de5b4711a22e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClusterVersionGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGet_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterVersionGet_example.json */ /** * Sample code: Get cluster version. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListByEnvironmentSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListByEnvironmentSamples.java index e5c4ccd3a608..b7296523c8ab 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListByEnvironmentSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListByEnvironmentSamples.java @@ -11,7 +11,7 @@ */ public final class ManagedClusterVersionListByEnvironmentSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionListByEnvironment.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterVersionListByEnvironment.json */ /** * Sample code: List cluster versions by environment. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListSamples.java index 353377aa1e5c..28506e081ecf 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClusterVersionListSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionList_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterVersionList_example.json */ /** * Sample code: List cluster versions. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersCreateOrUpdateSamples.java index 7dea934aa2ad..6cc3b85b1d3f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersCreateOrUpdateSamples.java @@ -39,7 +39,7 @@ */ public final class ManagedClustersCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterPutOperation_example_max.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterPutOperation_example_max.json */ /** * Sample code: Put a cluster with maximum parameters. @@ -148,7 +148,7 @@ public static void putAClusterWithMaximumParameters( } /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterPutOperation_example_min.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterPutOperation_example_min.json */ /** * Sample code: Put a cluster with minimum parameters. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersDeleteSamples.java index 9b38f36dd012..ec905caaad4d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterDeleteOperation_example.json */ /** * Sample code: Delete a cluster. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetByResourceGroupSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetByResourceGroupSamples.java index f379ca4fd7fa..9b648bc305c2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetByResourceGroupSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterGetOperation_example.json */ /** * Sample code: Get a cluster. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetFaultSimulationSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetFaultSimulationSamples.java index b4074866e621..b027a820f093 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetFaultSimulationSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetFaultSimulationSamples.java @@ -11,7 +11,7 @@ */ public final class ManagedClustersGetFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterGetFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/ManagedClusterGetFaultSimulation_example.json */ /** * Sample code: Get Managed Cluster Fault Simulation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListByResourceGroupSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListByResourceGroupSamples.java index 7d2d18a8502a..a79f996487ff 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListByResourceGroupSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListByResourceGroupSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterListByResourceGroupOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterListByResourceGroupOperation_example.json */ /** * Sample code: List cluster by resource group. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListFaultSimulationSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListFaultSimulationSamples.java index 460a99d19c12..ae0c318b6b73 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListFaultSimulationSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListFaultSimulationSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterListFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/ManagedClusterListFaultSimulation_example.json */ /** * Sample code: List Managed Cluster Fault Simulation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListSamples.java index 87012983694b..02de89fb0aab 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterListBySubscriptionOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterListBySubscriptionOperation_example.json */ /** * Sample code: List managed clusters. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersStartFaultSimulationSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersStartFaultSimulationSamples.java index b9b5c1873149..5c45c926e71a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersStartFaultSimulationSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersStartFaultSimulationSamples.java @@ -13,7 +13,7 @@ */ public final class ManagedClustersStartFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStartFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/ManagedClusterStartFaultSimulation_example.json */ /** * Sample code: Start Managed Cluster Fault Simulation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersStopFaultSimulationSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersStopFaultSimulationSamples.java index 033f84ffb3d1..ddeb03980014 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersStopFaultSimulationSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersStopFaultSimulationSamples.java @@ -11,7 +11,7 @@ */ public final class ManagedClustersStopFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStopFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/ManagedClusterStopFaultSimulation_example.json */ /** * Sample code: Stop Managed Cluster Fault Simulation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersUpdateSamples.java index 2146ff7b3bbc..3e4419301675 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ManagedClustersUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedClusterPatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedClusterPatchOperation_example.json */ /** * Sample code: Patch a managed cluster. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetSamples.java index 56c838a18491..eb1ff3f7ac35 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedMaintenanceWindowStatusesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ManagedMaintenanceWindowStatusGet_example.json + * x-ms-original-file: 2025-10-01-preview/ManagedMaintenanceWindowStatusGet_example.json */ /** * Sample code: Get Maintenance Window Status. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetSamples.java index 92d897540521..586382b1c0bf 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedUnsupportedVMSizesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesGet_example.json + * x-ms-original-file: 2025-10-01-preview/managedUnsupportedVMSizesGet_example.json */ /** * Sample code: Get unsupported vm sizes. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListSamples.java index dcfe7faf8731..eb66d04bcd4a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedUnsupportedVMSizesListSamples { /* - * x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesList_example.json + * x-ms-original-file: 2025-10-01-preview/managedUnsupportedVMSizesList_example.json */ /** * Sample code: List unsupported vm sizes. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListSamples.java index f2bced300184..003b56a79d03 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListSamples.java @@ -9,7 +9,7 @@ */ public final class NodeTypeSkusListSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypeSkusListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypeSkusListOperation_example.json */ /** * Sample code: List a node type SKUs. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesCreateOrUpdateSamples.java index f1678e863a57..ae5f2ef39334 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesCreateOrUpdateSamples.java @@ -37,7 +37,7 @@ */ public final class NodeTypesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationStateless_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationStateless_example.json */ /** * Sample code: Put an stateless node type with temporary disk for service fabric. @@ -72,7 +72,7 @@ public static void putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric( } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperation_example_max.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperation_example_max.json */ /** * Sample code: Put a node type with maximum parameters. @@ -188,7 +188,7 @@ public static void putANodeTypeWithMaximumParameters( } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationAutoScale_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationAutoScale_example.json */ /** * Sample code: Put a node type with auto-scale parameters. @@ -234,7 +234,7 @@ public static void putANodeTypeWithAutoScaleParameters( } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperation_example_min.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperation_example_min.json */ /** * Sample code: Put a node type with minimum parameters. @@ -258,7 +258,7 @@ public static void putANodeTypeWithMinimumParameters( } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationDedicatedHost_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationDedicatedHost_example.json */ /** * Sample code: Put node type with dedicated hosts. @@ -288,7 +288,7 @@ public static void putNodeTypeWithDedicatedHosts( } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationVmImagePlan_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationVmImagePlan_example.json */ /** * Sample code: Put node type with vm image plan. @@ -315,7 +315,7 @@ public static void putNodeTypeWithVmImagePlan( } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json */ /** * Sample code: Put node type with shared galleries custom vm image. @@ -337,7 +337,7 @@ public static void putNodeTypeWithSharedGalleriesCustomVmImage( } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationCustomImage_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePutOperationCustomImage_example.json */ /** * Sample code: Put node type with custom vm image. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeallocateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeallocateSamples.java index c9aff6ba4d09..32f89d683e6e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeallocateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeallocateSamples.java @@ -12,7 +12,7 @@ */ public final class NodeTypesDeallocateSamples { /* - * x-ms-original-file: 2025-06-01-preview/DeallocateNodes_example.json + * x-ms-original-file: 2025-10-01-preview/DeallocateNodes_example.json */ /** * Sample code: Deallocate nodes. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteNodeSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteNodeSamples.java index e50a2ab0b252..49c6023d748d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteNodeSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteNodeSamples.java @@ -12,7 +12,7 @@ */ public final class NodeTypesDeleteNodeSamples { /* - * x-ms-original-file: 2025-06-01-preview/DeleteNodes_example.json + * x-ms-original-file: 2025-10-01-preview/DeleteNodes_example.json */ /** * Sample code: Delete nodes. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteSamples.java index 16a1b1d425da..c9847021dbbc 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class NodeTypesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypeDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypeDeleteOperation_example.json */ /** * Sample code: Delete a node type. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetFaultSimulationSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetFaultSimulationSamples.java index 7585b0f95a46..6abd9ea525bd 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetFaultSimulationSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetFaultSimulationSamples.java @@ -11,7 +11,7 @@ */ public final class NodeTypesGetFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeGetFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/NodeTypeGetFaultSimulation_example.json */ /** * Sample code: Get Node Type Fault Simulation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetSamples.java index e126f636c946..6169ac9be55d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetSamples.java @@ -9,7 +9,7 @@ */ public final class NodeTypesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypeGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypeGetOperation_example.json */ /** * Sample code: Get a node type. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListByManagedClustersSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListByManagedClustersSamples.java index 92f3f69218be..76e432b80f06 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListByManagedClustersSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListByManagedClustersSamples.java @@ -9,7 +9,7 @@ */ public final class NodeTypesListByManagedClustersSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypeListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypeListOperation_example.json */ /** * Sample code: List node type of the specified managed cluster. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListFaultSimulationSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListFaultSimulationSamples.java index a5023f57e6ea..b406fe14fcbe 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListFaultSimulationSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListFaultSimulationSamples.java @@ -9,7 +9,7 @@ */ public final class NodeTypesListFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeListFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/NodeTypeListFaultSimulation_example.json */ /** * Sample code: List Node Type Fault Simulation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRedeploySamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRedeploySamples.java index 5bef17ee33f4..4bc82438e556 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRedeploySamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRedeploySamples.java @@ -13,7 +13,7 @@ */ public final class NodeTypesRedeploySamples { /* - * x-ms-original-file: 2025-06-01-preview/RedeployNodes_UD_example.json + * x-ms-original-file: 2025-10-01-preview/RedeployNodes_UD_example.json */ /** * Sample code: Redeploy all nodes by upgrade domain. @@ -29,7 +29,7 @@ public static void redeployAllNodesByUpgradeDomain( } /* - * x-ms-original-file: 2025-06-01-preview/RedeployNodes_example.json + * x-ms-original-file: 2025-10-01-preview/RedeployNodes_example.json */ /** * Sample code: Redeploy nodes. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesReimageSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesReimageSamples.java index a6354c5c7c6b..d8ef8bac081d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesReimageSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesReimageSamples.java @@ -13,7 +13,7 @@ */ public final class NodeTypesReimageSamples { /* - * x-ms-original-file: 2025-06-01-preview/ReimageNodes_example.json + * x-ms-original-file: 2025-10-01-preview/ReimageNodes_example.json */ /** * Sample code: Reimage nodes. @@ -29,7 +29,7 @@ public static void reimageNodes( } /* - * x-ms-original-file: 2025-06-01-preview/ReimageNodes_UD_example.json + * x-ms-original-file: 2025-10-01-preview/ReimageNodes_UD_example.json */ /** * Sample code: Reimage all nodes by upgrade domain. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRestartSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRestartSamples.java index 0c753307bb28..a97db8b1340b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRestartSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRestartSamples.java @@ -12,7 +12,7 @@ */ public final class NodeTypesRestartSamples { /* - * x-ms-original-file: 2025-06-01-preview/RestartNodes_example.json + * x-ms-original-file: 2025-10-01-preview/RestartNodes_example.json */ /** * Sample code: Restart nodes. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartFaultSimulationSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartFaultSimulationSamples.java index 9e7fbacb338f..b7cef1050444 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartFaultSimulationSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartFaultSimulationSamples.java @@ -13,7 +13,7 @@ */ public final class NodeTypesStartFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStartFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/NodeTypeStartFaultSimulation_example.json */ /** * Sample code: Start Node Type Fault Simulation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartSamples.java index 0e79f6094d0f..6d25e9092cf0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartSamples.java @@ -12,7 +12,7 @@ */ public final class NodeTypesStartSamples { /* - * x-ms-original-file: 2025-06-01-preview/StartNodes_example.json + * x-ms-original-file: 2025-10-01-preview/StartNodes_example.json */ /** * Sample code: Start nodes. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStopFaultSimulationSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStopFaultSimulationSamples.java index b4939cf02fb9..5f820cab29a6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStopFaultSimulationSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStopFaultSimulationSamples.java @@ -11,7 +11,7 @@ */ public final class NodeTypesStopFaultSimulationSamples { /* - * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStopFaultSimulation_example.json + * x-ms-original-file: 2025-10-01-preview/faultSimulation/NodeTypeStopFaultSimulation_example.json */ /** * Sample code: Stop Node Type Fault Simulation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesUpdateSamples.java index d4465dbba326..eefa42b13e08 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class NodeTypesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePatchOperation_example.json */ /** * Sample code: Patch a node type. @@ -30,7 +30,7 @@ public static void patchANodeType( } /* - * x-ms-original-file: 2025-06-01-preview/NodeTypePatchOperationAutoScale_example.json + * x-ms-original-file: 2025-10-01-preview/NodeTypePatchOperationAutoScale_example.json */ /** * Sample code: Patch a node type while auto-scaling. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListSamples.java index d257cbb42b69..009382b77c72 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2025-06-01-preview/OperationsList_example.json + * x-ms-original-file: 2025-10-01-preview/OperationsList_example.json */ /** * Sample code: List the operations for the provider. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateSamples.java index 5c6f83746fbd..075dca19fd70 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateSamples.java @@ -25,7 +25,7 @@ */ public final class ServicesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServicePutOperation_example_min.json + * x-ms-original-file: 2025-10-01-preview/ServicePutOperation_example_min.json */ /** * Sample code: Put a service with minimum parameters. @@ -45,7 +45,7 @@ public static void putAServiceWithMinimumParameters( } /* - * x-ms-original-file: 2025-06-01-preview/ServicePutOperation_example_max.json + * x-ms-original-file: 2025-10-01-preview/ServicePutOperation_example_max.json */ /** * Sample code: Put a service with maximum parameters. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesDeleteSamples.java index 803849fe030d..a40fcc0b6240 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ServicesDeleteSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServiceDeleteOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ServiceDeleteOperation_example.json */ /** * Sample code: Delete a service. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetSamples.java index 32f57dcbba94..524f24f4f0de 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ServicesGetSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServiceGetOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ServiceGetOperation_example.json */ /** * Sample code: Get a service. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsSamples.java index 761136357a5b..dbb15499d187 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsSamples.java @@ -9,7 +9,7 @@ */ public final class ServicesListByApplicationsSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServiceListOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ServiceListOperation_example.json */ /** * Sample code: Get a list of service resources. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesRestartReplicaSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesRestartReplicaSamples.java new file mode 100644 index 000000000000..82fd5d29c5b9 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesRestartReplicaSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartKind; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest; +import java.util.Arrays; + +/** + * Samples for Services RestartReplica. + */ +public final class ServicesRestartReplicaSamples { + /* + * x-ms-original-file: 2025-10-01-preview/ServiceActionRestartReplica_example.json + */ + /** + * Sample code: Restart replicas. + * + * @param manager Entry point to ServiceFabricManagedClustersManager. + */ + public static void restartReplicas( + com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + manager.services() + .restartReplica("resRg", "myCluster", "myApp", "myService", + new RestartReplicaRequest().withPartitionId("00000000-0000-0000-0000-000000000000") + .withReplicaIds(Arrays.asList(123456789012345680L)) + .withRestartKind(RestartKind.SIMULTANEOUS) + .withForceRestart(false) + .withTimeout(60L), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesUpdateSamples.java index 83c3e44d9ed8..d1c733fade67 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ServicesUpdateSamples { /* - * x-ms-original-file: 2025-06-01-preview/ServicePatchOperation_example.json + * x-ms-original-file: 2025-10-01-preview/ServicePatchOperation_example.json */ /** * Sample code: Patch a service. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AddRemoveIncrementalNamedPartitionScalingMechanisTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AddRemoveIncrementalNamedPartitionScalingMechanisTests.java index fce63a7b4a8d..af73ea805dd1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AddRemoveIncrementalNamedPartitionScalingMechanisTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AddRemoveIncrementalNamedPartitionScalingMechanisTests.java @@ -12,22 +12,22 @@ public final class AddRemoveIncrementalNamedPartitionScalingMechanisTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddRemoveIncrementalNamedPartitionScalingMechanism model = BinaryData.fromString( - "{\"kind\":\"AddRemoveIncrementalNamedPartition\",\"minPartitionCount\":990417532,\"maxPartitionCount\":1056372950,\"scaleIncrement\":683546621}") + "{\"kind\":\"AddRemoveIncrementalNamedPartition\",\"minPartitionCount\":983156788,\"maxPartitionCount\":1386333367,\"scaleIncrement\":452971481}") .toObject(AddRemoveIncrementalNamedPartitionScalingMechanism.class); - Assertions.assertEquals(990417532, model.minPartitionCount()); - Assertions.assertEquals(1056372950, model.maxPartitionCount()); - Assertions.assertEquals(683546621, model.scaleIncrement()); + Assertions.assertEquals(983156788, model.minPartitionCount()); + Assertions.assertEquals(1386333367, model.maxPartitionCount()); + Assertions.assertEquals(452971481, model.scaleIncrement()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AddRemoveIncrementalNamedPartitionScalingMechanism model - = new AddRemoveIncrementalNamedPartitionScalingMechanism().withMinPartitionCount(990417532) - .withMaxPartitionCount(1056372950) - .withScaleIncrement(683546621); + = new AddRemoveIncrementalNamedPartitionScalingMechanism().withMinPartitionCount(983156788) + .withMaxPartitionCount(1386333367) + .withScaleIncrement(452971481); model = BinaryData.fromObject(model).toObject(AddRemoveIncrementalNamedPartitionScalingMechanism.class); - Assertions.assertEquals(990417532, model.minPartitionCount()); - Assertions.assertEquals(1056372950, model.maxPartitionCount()); - Assertions.assertEquals(683546621, model.scaleIncrement()); + Assertions.assertEquals(983156788, model.minPartitionCount()); + Assertions.assertEquals(1386333367, model.maxPartitionCount()); + Assertions.assertEquals(452971481, model.scaleIncrement()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AdditionalNetworkInterfaceConfigurationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AdditionalNetworkInterfaceConfigurationTests.java index a8535c8e27e8..46f038e1d410 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AdditionalNetworkInterfaceConfigurationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AdditionalNetworkInterfaceConfigurationTests.java @@ -19,24 +19,25 @@ public final class AdditionalNetworkInterfaceConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AdditionalNetworkInterfaceConfiguration model = BinaryData.fromString( - "{\"name\":\"egxuvwzf\",\"enableAcceleratedNetworking\":true,\"dscpConfiguration\":{\"id\":\"ctlpdngitvgb\"},\"ipConfigurations\":[{\"name\":\"rixkwmyijejve\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"pna\"},{\"id\":\"exccbdreaxhcexd\"},{\"id\":\"vqahqkghtpwi\"},{\"id\":\"hyjsvfycx\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"oowvrv\"},{\"id\":\"gjqppy\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"on\"},{\"id\":\"yhgfipnsx\"},{\"id\":\"cwaekrrjre\"}],\"subnet\":{\"id\":\"tsgumhj\"},\"privateIPAddressVersion\":\"IPv4\",\"publicIPAddressConfiguration\":{\"name\":\"kxw\",\"ipTags\":[{\"ipTagType\":\"lbqpvuzlmvfelf\",\"tag\":\"tgp\"}],\"publicIPAddressVersion\":\"IPv4\"}},{\"name\":\"pwjxezn\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"rnjwmw\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"saz\"},{\"id\":\"joqkagfhsxt\"},{\"id\":\"ugzxnf\"},{\"id\":\"zpxdt\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"kqjjlwuenvrkp\"}],\"subnet\":{\"id\":\"aibrebqaaysjkixq\"},\"privateIPAddressVersion\":\"IPv6\",\"publicIPAddressConfiguration\":{\"name\":\"tezlwff\",\"ipTags\":[{\"ipTagType\":\"kpj\",\"tag\":\"qqmtedltmmji\"},{\"ipTagType\":\"yeozphvwauyqncy\",\"tag\":\"upkvipmdsc\"},{\"ipTagType\":\"xqupevzhf\",\"tag\":\"totxhojujb\"},{\"ipTagType\":\"pelmcuvhixbjxyf\",\"tag\":\"n\"}],\"publicIPAddressVersion\":\"IPv4\"}}]}") + "{\"name\":\"jl\",\"enableAcceleratedNetworking\":true,\"dscpConfiguration\":{\"id\":\"lwg\"},\"ipConfigurations\":[{\"name\":\"tsbwtovvtgse\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"iufxqknpir\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"ttwqmsni\"},{\"id\":\"cdm\"},{\"id\":\"r\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"ijnkrxfrdd\"},{\"id\":\"ratiz\"},{\"id\":\"onasxifto\"}],\"subnet\":{\"id\":\"zh\"},\"privateIPAddressVersion\":\"IPv6\",\"publicIPAddressConfiguration\":{\"name\":\"sgogczhonnxk\",\"ipTags\":[{\"ipTagType\":\"nyhmossxkkgthr\",\"tag\":\"gh\"},{\"ipTagType\":\"jbdhqxvc\",\"tag\":\"gf\"},{\"ipTagType\":\"pdso\",\"tag\":\"bshrnsvbuswd\"}],\"publicIPAddressVersion\":\"IPv4\"}},{\"name\":\"ybycnunvj\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"f\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"pqgik\"},{\"id\":\"irtx\"},{\"id\":\"uxzejntpsew\"},{\"id\":\"oi\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"rydxtqm\"}],\"subnet\":{\"id\":\"xorgg\"},\"privateIPAddressVersion\":\"IPv6\",\"publicIPAddressConfiguration\":{\"name\":\"aomtbghhavgrvkff\",\"ipTags\":[{\"ipTagType\":\"zh\",\"tag\":\"jbibg\"},{\"ipTagType\":\"mfxumvfcluyovw\",\"tag\":\"nbkfezzxscy\"},{\"ipTagType\":\"wzdgirujbzbo\",\"tag\":\"vzzbtdcq\"},{\"ipTagType\":\"pniyujviyl\",\"tag\":\"dshf\"}],\"publicIPAddressVersion\":\"IPv4\"}},{\"name\":\"rbgyefry\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"ojfmwnco\"},{\"id\":\"rfh\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"ymoxoftpipiwyczu\"},{\"id\":\"a\"},{\"id\":\"qjlihhyuspska\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"mfwdgzxu\"},{\"id\":\"cvpa\"},{\"id\":\"sreuzvxurisjnh\"},{\"id\":\"txifqj\"}],\"subnet\":{\"id\":\"mrhublwpc\"},\"privateIPAddressVersion\":\"IPv4\",\"publicIPAddressConfiguration\":{\"name\":\"rgjupauut\",\"ipTags\":[{\"ipTagType\":\"qhih\",\"tag\":\"jqgwzp\"}],\"publicIPAddressVersion\":\"IPv6\"}}]}") .toObject(AdditionalNetworkInterfaceConfiguration.class); - Assertions.assertEquals("egxuvwzf", model.name()); + Assertions.assertEquals("jl", model.name()); Assertions.assertTrue(model.enableAcceleratedNetworking()); - Assertions.assertEquals("ctlpdngitvgb", model.dscpConfiguration().id()); - Assertions.assertEquals("rixkwmyijejve", model.ipConfigurations().get(0).name()); - Assertions.assertEquals("pna", + Assertions.assertEquals("lwg", model.dscpConfiguration().id()); + Assertions.assertEquals("tsbwtovvtgse", model.ipConfigurations().get(0).name()); + Assertions.assertEquals("iufxqknpir", model.ipConfigurations().get(0).applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("oowvrv", + Assertions.assertEquals("ttwqmsni", model.ipConfigurations().get(0).loadBalancerBackendAddressPools().get(0).id()); - Assertions.assertEquals("on", model.ipConfigurations().get(0).loadBalancerInboundNatPools().get(0).id()); - Assertions.assertEquals("tsgumhj", model.ipConfigurations().get(0).subnet().id()); - Assertions.assertEquals(PrivateIpAddressVersion.IPV4, + Assertions.assertEquals("ijnkrxfrdd", + model.ipConfigurations().get(0).loadBalancerInboundNatPools().get(0).id()); + Assertions.assertEquals("zh", model.ipConfigurations().get(0).subnet().id()); + Assertions.assertEquals(PrivateIpAddressVersion.IPV6, model.ipConfigurations().get(0).privateIpAddressVersion()); - Assertions.assertEquals("kxw", model.ipConfigurations().get(0).publicIpAddressConfiguration().name()); - Assertions.assertEquals("lbqpvuzlmvfelf", + Assertions.assertEquals("sgogczhonnxk", model.ipConfigurations().get(0).publicIpAddressConfiguration().name()); + Assertions.assertEquals("nyhmossxkkgthr", model.ipConfigurations().get(0).publicIpAddressConfiguration().ipTags().get(0).ipTagType()); - Assertions.assertEquals("tgp", + Assertions.assertEquals("gh", model.ipConfigurations().get(0).publicIpAddressConfiguration().ipTags().get(0).tag()); Assertions.assertEquals(PublicIpAddressVersion.IPV4, model.ipConfigurations().get(0).publicIpAddressConfiguration().publicIpAddressVersion()); @@ -44,63 +45,71 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AdditionalNetworkInterfaceConfiguration model - = new AdditionalNetworkInterfaceConfiguration().withName("egxuvwzf") - .withEnableAcceleratedNetworking(true) - .withDscpConfiguration(new SubResource().withId("ctlpdngitvgb")) - .withIpConfigurations( - Arrays - .asList( - new IpConfiguration().withName("rixkwmyijejve") - .withApplicationGatewayBackendAddressPools(Arrays.asList( - new SubResource().withId("pna"), new SubResource().withId("exccbdreaxhcexd"), - new SubResource().withId("vqahqkghtpwi"), new SubResource().withId("hyjsvfycx"))) - .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource().withId("oowvrv"), - new SubResource().withId("gjqppy"))) - .withLoadBalancerInboundNatPools(Arrays.asList( - new SubResource().withId("on"), new SubResource().withId("yhgfipnsx"), - new SubResource().withId("cwaekrrjre"))) - .withSubnet(new SubResource().withId("tsgumhj")) - .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV4) - .withPublicIpAddressConfiguration(new IpConfigurationPublicIpAddressConfiguration() - .withName("kxw") - .withIpTags( - Arrays.asList(new IpTag().withIpTagType("lbqpvuzlmvfelf").withTag("tgp"))) - .withPublicIpAddressVersion(PublicIpAddressVersion.IPV4)), - new IpConfiguration().withName("pwjxezn") - .withApplicationGatewayBackendAddressPools( - Arrays.asList(new SubResource().withId("rnjwmw"))) - .withLoadBalancerBackendAddressPools(Arrays.asList( - new SubResource().withId("saz"), new SubResource().withId("joqkagfhsxt"), - new SubResource().withId("ugzxnf"), new SubResource().withId("zpxdt"))) - .withLoadBalancerInboundNatPools( - Arrays.asList(new SubResource().withId("kqjjlwuenvrkp"))) - .withSubnet(new SubResource().withId("aibrebqaaysjkixq")) - .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV6) - .withPublicIpAddressConfiguration(new IpConfigurationPublicIpAddressConfiguration() - .withName("tezlwff") - .withIpTags(Arrays.asList(new IpTag().withIpTagType("kpj").withTag("qqmtedltmmji"), - new IpTag().withIpTagType("yeozphvwauyqncy").withTag("upkvipmdsc"), - new IpTag().withIpTagType("xqupevzhf").withTag("totxhojujb"), - new IpTag().withIpTagType("pelmcuvhixbjxyf").withTag("n"))) - .withPublicIpAddressVersion(PublicIpAddressVersion.IPV4)))); + AdditionalNetworkInterfaceConfiguration model = new AdditionalNetworkInterfaceConfiguration().withName("jl") + .withEnableAcceleratedNetworking(true) + .withDscpConfiguration(new SubResource().withId("lwg")) + .withIpConfigurations(Arrays.asList( + new IpConfiguration().withName("tsbwtovvtgse") + .withApplicationGatewayBackendAddressPools(Arrays.asList(new SubResource().withId("iufxqknpir"))) + .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource().withId("ttwqmsni"), + new SubResource().withId("cdm"), new SubResource().withId("r"))) + .withLoadBalancerInboundNatPools(Arrays.asList(new SubResource().withId("ijnkrxfrdd"), + new SubResource().withId("ratiz"), new SubResource().withId("onasxifto"))) + .withSubnet(new SubResource().withId("zh")) + .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV6) + .withPublicIpAddressConfiguration( + new IpConfigurationPublicIpAddressConfiguration().withName("sgogczhonnxk") + .withIpTags(Arrays.asList(new IpTag().withIpTagType("nyhmossxkkgthr").withTag("gh"), + new IpTag().withIpTagType("jbdhqxvc").withTag("gf"), + new IpTag().withIpTagType("pdso").withTag("bshrnsvbuswd"))) + .withPublicIpAddressVersion(PublicIpAddressVersion.IPV4)), + new IpConfiguration().withName("ybycnunvj") + .withApplicationGatewayBackendAddressPools(Arrays.asList(new SubResource().withId("f"))) + .withLoadBalancerBackendAddressPools( + Arrays.asList(new SubResource().withId("pqgik"), new SubResource().withId("irtx"), + new SubResource().withId("uxzejntpsew"), new SubResource().withId("oi"))) + .withLoadBalancerInboundNatPools(Arrays.asList(new SubResource().withId("rydxtqm"))) + .withSubnet(new SubResource().withId("xorgg")) + .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV6) + .withPublicIpAddressConfiguration( + new IpConfigurationPublicIpAddressConfiguration().withName("aomtbghhavgrvkff") + .withIpTags(Arrays.asList(new IpTag().withIpTagType("zh").withTag("jbibg"), + new IpTag().withIpTagType("mfxumvfcluyovw").withTag("nbkfezzxscy"), + new IpTag().withIpTagType("wzdgirujbzbo").withTag("vzzbtdcq"), + new IpTag().withIpTagType("pniyujviyl").withTag("dshf"))) + .withPublicIpAddressVersion(PublicIpAddressVersion.IPV4)), + new IpConfiguration().withName("rbgyefry") + .withApplicationGatewayBackendAddressPools( + Arrays.asList(new SubResource().withId("ojfmwnco"), new SubResource().withId("rfh"))) + .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource().withId("ymoxoftpipiwyczu"), + new SubResource().withId("a"), new SubResource().withId("qjlihhyuspska"))) + .withLoadBalancerInboundNatPools( + Arrays.asList(new SubResource().withId("mfwdgzxu"), new SubResource().withId("cvpa"), + new SubResource().withId("sreuzvxurisjnh"), new SubResource().withId("txifqj"))) + .withSubnet(new SubResource().withId("mrhublwpc")) + .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV4) + .withPublicIpAddressConfiguration( + new IpConfigurationPublicIpAddressConfiguration().withName("rgjupauut") + .withIpTags(Arrays.asList(new IpTag().withIpTagType("qhih").withTag("jqgwzp"))) + .withPublicIpAddressVersion(PublicIpAddressVersion.IPV6)))); model = BinaryData.fromObject(model).toObject(AdditionalNetworkInterfaceConfiguration.class); - Assertions.assertEquals("egxuvwzf", model.name()); + Assertions.assertEquals("jl", model.name()); Assertions.assertTrue(model.enableAcceleratedNetworking()); - Assertions.assertEquals("ctlpdngitvgb", model.dscpConfiguration().id()); - Assertions.assertEquals("rixkwmyijejve", model.ipConfigurations().get(0).name()); - Assertions.assertEquals("pna", + Assertions.assertEquals("lwg", model.dscpConfiguration().id()); + Assertions.assertEquals("tsbwtovvtgse", model.ipConfigurations().get(0).name()); + Assertions.assertEquals("iufxqknpir", model.ipConfigurations().get(0).applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("oowvrv", + Assertions.assertEquals("ttwqmsni", model.ipConfigurations().get(0).loadBalancerBackendAddressPools().get(0).id()); - Assertions.assertEquals("on", model.ipConfigurations().get(0).loadBalancerInboundNatPools().get(0).id()); - Assertions.assertEquals("tsgumhj", model.ipConfigurations().get(0).subnet().id()); - Assertions.assertEquals(PrivateIpAddressVersion.IPV4, + Assertions.assertEquals("ijnkrxfrdd", + model.ipConfigurations().get(0).loadBalancerInboundNatPools().get(0).id()); + Assertions.assertEquals("zh", model.ipConfigurations().get(0).subnet().id()); + Assertions.assertEquals(PrivateIpAddressVersion.IPV6, model.ipConfigurations().get(0).privateIpAddressVersion()); - Assertions.assertEquals("kxw", model.ipConfigurations().get(0).publicIpAddressConfiguration().name()); - Assertions.assertEquals("lbqpvuzlmvfelf", + Assertions.assertEquals("sgogczhonnxk", model.ipConfigurations().get(0).publicIpAddressConfiguration().name()); + Assertions.assertEquals("nyhmossxkkgthr", model.ipConfigurations().get(0).publicIpAddressConfiguration().ipTags().get(0).ipTagType()); - Assertions.assertEquals("tgp", + Assertions.assertEquals("gh", model.ipConfigurations().get(0).publicIpAddressConfiguration().ipTags().get(0).tag()); Assertions.assertEquals(PublicIpAddressVersion.IPV4, model.ipConfigurations().get(0).publicIpAddressConfiguration().publicIpAddressVersion()); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationFetchHealthRequestTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationFetchHealthRequestTests.java new file mode 100644 index 000000000000..018e81ac582f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationFetchHealthRequestTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationFetchHealthRequest; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.HealthFilter; +import org.junit.jupiter.api.Assertions; + +public final class ApplicationFetchHealthRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ApplicationFetchHealthRequest model = BinaryData.fromString( + "{\"eventsHealthStateFilter\":\"All\",\"deployedApplicationsHealthStateFilter\":\"Error\",\"servicesHealthStateFilter\":\"Warning\",\"excludeHealthStatistics\":false,\"timeout\":6902616970691402171}") + .toObject(ApplicationFetchHealthRequest.class); + Assertions.assertEquals(HealthFilter.ALL, model.eventsHealthStateFilter()); + Assertions.assertEquals(HealthFilter.ERROR, model.deployedApplicationsHealthStateFilter()); + Assertions.assertEquals(HealthFilter.WARNING, model.servicesHealthStateFilter()); + Assertions.assertFalse(model.excludeHealthStatistics()); + Assertions.assertEquals(6902616970691402171L, model.timeout()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ApplicationFetchHealthRequest model + = new ApplicationFetchHealthRequest().withEventsHealthStateFilter(HealthFilter.ALL) + .withDeployedApplicationsHealthStateFilter(HealthFilter.ERROR) + .withServicesHealthStateFilter(HealthFilter.WARNING) + .withExcludeHealthStatistics(false) + .withTimeout(6902616970691402171L); + model = BinaryData.fromObject(model).toObject(ApplicationFetchHealthRequest.class); + Assertions.assertEquals(HealthFilter.ALL, model.eventsHealthStateFilter()); + Assertions.assertEquals(HealthFilter.ERROR, model.deployedApplicationsHealthStateFilter()); + Assertions.assertEquals(HealthFilter.WARNING, model.servicesHealthStateFilter()); + Assertions.assertFalse(model.excludeHealthStatistics()); + Assertions.assertEquals(6902616970691402171L, model.timeout()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourceListTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourceListTests.java index e3902e8a33ac..25ec0ec408ef 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourceListTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourceListTests.java @@ -15,82 +15,82 @@ public final class ApplicationResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"managedIdentities\":[{\"name\":\"mocpc\",\"principalId\":\"shurzafbljjgpbto\"}],\"provisioningState\":\"jmkljavbqidtqajz\",\"version\":\"l\",\"parameters\":{\"rlkhbzhfepgzgq\":\"dj\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":1678385538,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1054800376,\"maxPercentUnhealthyPartitionsPerService\":1323879070,\"maxPercentUnhealthyReplicasPerPartition\":149734817},\"serviceTypeHealthPolicyMap\":{\"hhbcsglummajtjao\":{\"maxPercentUnhealthyServices\":1853852705,\"maxPercentUnhealthyPartitionsPerService\":812550328,\"maxPercentUnhealthyReplicasPerPartition\":1450066184},\"nbdxk\":{\"maxPercentUnhealthyServices\":1291201271,\"maxPercentUnhealthyPartitionsPerService\":1555681942,\"maxPercentUnhealthyReplicasPerPartition\":2016183317}}},\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"ajionpimexgstxg\",\"healthCheckStableDuration\":\"po\",\"healthCheckRetryTimeout\":\"gmaajrm\",\"upgradeTimeout\":\"djwzrlov\",\"upgradeDomainTimeout\":\"clwhijcoejctbz\"},\"instanceCloseDelayDuration\":93842203637959361,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":4015230803094049478,\"recreateApplication\":true}},\"tags\":{\"c\":\"ukdkexxppofmxa\",\"toc\":\"jpgd\",\"hvpmoue\":\"j\"},\"identity\":{\"principalId\":\"zxibqeoj\",\"tenantId\":\"qbzvddntwnd\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"qkwpyeicxmqc\":{\"principalId\":\"npzaoq\",\"clientId\":\"hrhcffcyddglmjth\"},\"joghmewuama\":{\"principalId\":\"q\",\"clientId\":\"khixuigdtopbo\"},\"iotkftutqxl\":{\"principalId\":\"rzayv\",\"clientId\":\"pgvdf\"},\"tthzrvqd\":{\"principalId\":\"xlefgugnxkrx\",\"clientId\":\"mi\"}}},\"location\":\"bhj\",\"id\":\"igeho\",\"name\":\"fbowskanyk\",\"type\":\"zlcuiywgqywgndrv\"},{\"properties\":{\"managedIdentities\":[{\"name\":\"gpphrcgyn\",\"principalId\":\"ocpecfvmmco\"},{\"name\":\"fsxlzevgbmqjqa\",\"principalId\":\"c\"},{\"name\":\"pmivkwlzu\",\"principalId\":\"ccfwnfnbacfion\"},{\"name\":\"ebxetqgtzxdp\",\"principalId\":\"qbqqwxr\"}],\"provisioningState\":\"eallnwsubisnj\",\"version\":\"pmng\",\"parameters\":{\"aqw\":\"c\",\"xnj\":\"ochcbonqvpkvl\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":1797788548,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1902616098,\"maxPercentUnhealthyPartitionsPerService\":495940499,\"maxPercentUnhealthyReplicasPerPartition\":1864604101},\"serviceTypeHealthPolicyMap\":{\"yyien\":{\"maxPercentUnhealthyServices\":248230839,\"maxPercentUnhealthyPartitionsPerService\":1111118193,\"maxPercentUnhealthyReplicasPerPartition\":762343473},\"wtgrhpdjpj\":{\"maxPercentUnhealthyServices\":1285754335,\"maxPercentUnhealthyPartitionsPerService\":290307035,\"maxPercentUnhealthyReplicasPerPartition\":147839675}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"azjpqyegualhbxxh\",\"healthCheckStableDuration\":\"jj\",\"healthCheckRetryTimeout\":\"zvdudgwdslfhotwm\",\"upgradeTimeout\":\"ynpwlbj\",\"upgradeDomainTimeout\":\"pgacftadehxnlty\"},\"instanceCloseDelayDuration\":3166263548175677909,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":5708772881134087692,\"recreateApplication\":false}},\"tags\":{\"xzdmohctb\":\"dejbavo\"},\"identity\":{\"principalId\":\"dwxdndnv\",\"tenantId\":\"gujjugwdkcglh\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"kh\":{\"principalId\":\"yggdtjixh\",\"clientId\":\"uofqwe\"},\"cibvyvdcsitynn\":{\"principalId\":\"n\",\"clientId\":\"fyexfwhy\"},\"c\":{\"principalId\":\"mdectehfiqscjey\",\"clientId\":\"hezrkgq\"}}},\"location\":\"efovgmk\",\"id\":\"leyyvx\",\"name\":\"qjpkcattpngjcrc\",\"type\":\"zsqpjhvmdajvny\"}],\"nextLink\":\"unqecanoae\"}") + "{\"value\":[{\"properties\":{\"managedIdentities\":[{\"name\":\"yulpkudjkr\",\"principalId\":\"khbzhfepgzg\"},{\"name\":\"e\",\"principalId\":\"zloc\"}],\"provisioningState\":\"c\",\"version\":\"ierhhbcsglummaj\",\"parameters\":{\"jionpimexgstxgc\":\"odxobnbdxkqpxok\",\"lovmclwhijcoe\":\"odgmaajrmvdjwz\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":1252918399,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1083194269,\"maxPercentUnhealthyPartitionsPerService\":21849341,\"maxPercentUnhealthyReplicasPerPartition\":751291073},\"serviceTypeHealthPolicyMap\":{\"bfkgukdkex\":{\"maxPercentUnhealthyServices\":1712979680,\"maxPercentUnhealthyPartitionsPerService\":934868772,\"maxPercentUnhealthyReplicasPerPartition\":1302368966}}},\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"mxaxc\",\"healthCheckStableDuration\":\"jpgd\",\"healthCheckRetryTimeout\":\"toc\",\"upgradeTimeout\":\"j\",\"upgradeDomainTimeout\":\"hvpmoue\"},\"instanceCloseDelayDuration\":8357781437020373583,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":7433658867107362465,\"recreateApplication\":true}},\"tags\":{\"icbtwnpzao\":\"qbzvddntwnd\",\"jthjqkwpyei\":\"vuhrhcffcyddgl\",\"q\":\"xmqci\"},\"identity\":{\"principalId\":\"hix\",\"tenantId\":\"gdtopbobjogh\",\"type\":\"None\",\"userAssignedIdentities\":{\"t\":{\"principalId\":\"a\",\"clientId\":\"rzayv\"}}},\"location\":\"vdfgiotk\",\"id\":\"utqxlngx\",\"name\":\"efgugnxk\",\"type\":\"xdqmidtthzrvqdra\"},{\"properties\":{\"managedIdentities\":[{\"name\":\"big\",\"principalId\":\"h\"}],\"provisioningState\":\"fbowskanyk\",\"version\":\"lcuiywgqywgndr\",\"parameters\":{\"fvm\":\"hzgpphrcgyncocpe\",\"bmqj\":\"coofsxlzev\",\"lzu\":\"abcypmivk\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":1916526415,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1023174750,\"maxPercentUnhealthyPartitionsPerService\":1351999022,\"maxPercentUnhealthyReplicasPerPartition\":1347818370},\"serviceTypeHealthPolicyMap\":{\"nlebxetqgtzxd\":{\"maxPercentUnhealthyServices\":1187016173,\"maxPercentUnhealthyPartitionsPerService\":1241894222,\"maxPercentUnhealthyReplicasPerPartition\":2055969856},\"qqwx\":{\"maxPercentUnhealthyServices\":1901976575,\"maxPercentUnhealthyPartitionsPerService\":1698686419,\"maxPercentUnhealthyReplicasPerPartition\":1802954017}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"llnwsubi\",\"healthCheckStableDuration\":\"njampm\",\"healthCheckRetryTimeout\":\"gnzscxaqwo\",\"upgradeTimeout\":\"chcbonqvpkvlrxnj\",\"upgradeDomainTimeout\":\"ase\"},\"instanceCloseDelayDuration\":8171673918249071507,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":1066143336474759537,\"recreateApplication\":false}},\"tags\":{\"jp\":\"enjbdlwtgrhp\",\"e\":\"umasxazjpq\",\"zvdudgwdslfhotwm\":\"ualhbxxhejj\"},\"identity\":{\"principalId\":\"pwlbjnpg\",\"tenantId\":\"ftadehxnltyfs\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"xzdmohctb\":{\"principalId\":\"esnzwde\",\"clientId\":\"avo\"},\"zj\":{\"principalId\":\"udwxdndnvowguj\",\"clientId\":\"gwdkcglhsl\"}}},\"location\":\"ggd\",\"id\":\"ixhbkuofqweykhm\",\"name\":\"n\",\"type\":\"vfyexfw\"},{\"properties\":{\"managedIdentities\":[{\"name\":\"i\",\"principalId\":\"vyvdcs\"},{\"name\":\"tynnaamdectehfi\",\"principalId\":\"scjeypv\"},{\"name\":\"ezrkgqhcjrefo\",\"principalId\":\"gm\"},{\"name\":\"qsl\",\"principalId\":\"yyvxyqjpkcattpn\"}],\"provisioningState\":\"cr\",\"version\":\"zsqpjhvmdajvny\",\"parameters\":{\"hy\":\"nqecanoaeup\",\"cma\":\"ltrpmopj\",\"kthfui\":\"u\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":1411125802,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":2105680522,\"maxPercentUnhealthyPartitionsPerService\":397485144,\"maxPercentUnhealthyReplicasPerPartition\":1099680690},\"serviceTypeHealthPolicyMap\":{\"uozmyzydagfua\":{\"maxPercentUnhealthyServices\":1076562523,\"maxPercentUnhealthyPartitionsPerService\":2084111616,\"maxPercentUnhealthyReplicasPerPartition\":720859603},\"yiuokktwh\":{\"maxPercentUnhealthyServices\":906864290,\"maxPercentUnhealthyPartitionsPerService\":1613770943,\"maxPercentUnhealthyReplicasPerPartition\":1852056449},\"zywqsmbsu\":{\"maxPercentUnhealthyServices\":2073255975,\"maxPercentUnhealthyPartitionsPerService\":291798162,\"maxPercentUnhealthyReplicasPerPartition\":334875262},\"moryocfsfksym\":{\"maxPercentUnhealthyServices\":854764023,\"maxPercentUnhealthyPartitionsPerService\":760240945,\"maxPercentUnhealthyReplicasPerPartition\":1524544291}}},\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"kiiuxhqyudxor\",\"healthCheckStableDuration\":\"qn\",\"healthCheckRetryTimeout\":\"poczvyifqrvkdvjs\",\"upgradeTimeout\":\"lrmv\",\"upgradeDomainTimeout\":\"d\"},\"instanceCloseDelayDuration\":5974315112474207956,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":2149411154837156311,\"recreateApplication\":true}},\"tags\":{\"ruwiqzbqjvsov\":\"bczw\",\"hzdobpxjmflbvvnc\":\"yokacspkw\",\"rsa\":\"rkcciwwzjuqk\"},\"identity\":{\"principalId\":\"ku\",\"tenantId\":\"oskg\",\"type\":\"None\",\"userAssignedIdentities\":{\"v\":{\"principalId\":\"mjmvxieduugidyjr\",\"clientId\":\"byao\"},\"gz\":{\"principalId\":\"csonpclhoco\",\"clientId\":\"lkevle\"}}},\"location\":\"u\",\"id\":\"mvfaxkffeiith\",\"name\":\"vmezy\",\"type\":\"shxmzsbbzoggigrx\"},{\"properties\":{\"managedIdentities\":[{\"name\":\"vjxxjnsp\",\"principalId\":\"dptkoenkouk\"}],\"provisioningState\":\"udwtiukbl\",\"version\":\"gkpocipazyxoe\",\"parameters\":{\"npiucgygevqznty\":\"g\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":51531430,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":2033477361,\"maxPercentUnhealthyPartitionsPerService\":173387394,\"maxPercentUnhealthyReplicasPerPartition\":2078386445},\"serviceTypeHealthPolicyMap\":{\"pyd\":{\"maxPercentUnhealthyServices\":53365345,\"maxPercentUnhealthyPartitionsPerService\":1971484471,\"maxPercentUnhealthyReplicasPerPartition\":1233826604},\"xdeoejzic\":{\"maxPercentUnhealthyServices\":1342514759,\"maxPercentUnhealthyPartitionsPerService\":1305817330,\"maxPercentUnhealthyReplicasPerPartition\":1880549577},\"jttgzf\":{\"maxPercentUnhealthyServices\":1718564660,\"maxPercentUnhealthyPartitionsPerService\":746400217,\"maxPercentUnhealthyReplicasPerPartition\":764179455},\"cbkhajdeyeamdph\":{\"maxPercentUnhealthyServices\":1027327550,\"maxPercentUnhealthyPartitionsPerService\":2101457273,\"maxPercentUnhealthyReplicasPerPartition\":22083476}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"buxwgip\",\"healthCheckStableDuration\":\"honowkgshwank\",\"healthCheckRetryTimeout\":\"xzbinjeputt\",\"upgradeTimeout\":\"rywn\",\"upgradeDomainTimeout\":\"zoqftiyqzrnkcqvy\"},\"instanceCloseDelayDuration\":3429279847863801881,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":2826375712205950913,\"recreateApplication\":true}},\"tags\":{\"w\":\"qnwvlrya\"},\"identity\":{\"principalId\":\"unmmq\",\"tenantId\":\"yxzk\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ewrmjmwvvjektc\":{\"principalId\":\"oklyaxuconuq\",\"clientId\":\"fkbey\"}}},\"location\":\"enhwlrs\",\"id\":\"rzpwvlqdqgbiq\",\"name\":\"lihkaetcktvfc\",\"type\":\"vf\"}],\"nextLink\":\"kymuctqhjfbebr\"}") .toObject(ApplicationResourceList.class); - Assertions.assertEquals("ukdkexxppofmxa", model.value().get(0).tags().get("c")); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, - model.value().get(0).identity().type()); - Assertions.assertEquals("bhj", model.value().get(0).location()); - Assertions.assertEquals("mocpc", model.value().get(0).managedIdentities().get(0).name()); - Assertions.assertEquals("shurzafbljjgpbto", model.value().get(0).managedIdentities().get(0).principalId()); - Assertions.assertEquals("l", model.value().get(0).version()); - Assertions.assertEquals("dj", model.value().get(0).parameters().get("rlkhbzhfepgzgq")); - Assertions.assertFalse(model.value().get(0).upgradePolicy().applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(1678385538, + Assertions.assertEquals("qbzvddntwnd", model.value().get(0).tags().get("icbtwnpzao")); + Assertions.assertEquals(ManagedIdentityType.NONE, model.value().get(0).identity().type()); + Assertions.assertEquals("vdfgiotk", model.value().get(0).location()); + Assertions.assertEquals("yulpkudjkr", model.value().get(0).managedIdentities().get(0).name()); + Assertions.assertEquals("khbzhfepgzg", model.value().get(0).managedIdentities().get(0).principalId()); + Assertions.assertEquals("ierhhbcsglummaj", model.value().get(0).version()); + Assertions.assertEquals("odxobnbdxkqpxok", model.value().get(0).parameters().get("jionpimexgstxgc")); + Assertions.assertTrue(model.value().get(0).upgradePolicy().applicationHealthPolicy().considerWarningAsError()); + Assertions.assertEquals(1252918399, model.value().get(0).upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(1054800376, + Assertions.assertEquals(1083194269, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyServices()); - Assertions.assertEquals(1323879070, + Assertions.assertEquals(21849341, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(149734817, + Assertions.assertEquals(751291073, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(1853852705, + Assertions.assertEquals(1712979680, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("hhbcsglummajtjao") + .get("bfkgukdkex") .maxPercentUnhealthyServices()); - Assertions.assertEquals(812550328, + Assertions.assertEquals(934868772, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("hhbcsglummajtjao") + .get("bfkgukdkex") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(1450066184, + Assertions.assertEquals(1302368966, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("hhbcsglummajtjao") + .get("bfkgukdkex") .maxPercentUnhealthyReplicasPerPartition()); Assertions.assertFalse(model.value().get(0).upgradePolicy().forceRestart()); - Assertions.assertEquals(FailureAction.MANUAL, + Assertions.assertEquals(FailureAction.ROLLBACK, model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("ajionpimexgstxg", + Assertions.assertEquals("mxaxc", model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("po", + Assertions.assertEquals("jpgd", model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("gmaajrm", + Assertions.assertEquals("toc", model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("djwzrlov", + Assertions.assertEquals("j", model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("clwhijcoejctbz", + Assertions.assertEquals("hvpmoue", model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(93842203637959361L, model.value().get(0).upgradePolicy().instanceCloseDelayDuration()); + Assertions.assertEquals(8357781437020373583L, + model.value().get(0).upgradePolicy().instanceCloseDelayDuration()); Assertions.assertEquals(RollingUpgradeMode.MONITORED, model.value().get(0).upgradePolicy().upgradeMode()); - Assertions.assertEquals(4015230803094049478L, + Assertions.assertEquals(7433658867107362465L, model.value().get(0).upgradePolicy().upgradeReplicaSetCheckTimeout()); Assertions.assertTrue(model.value().get(0).upgradePolicy().recreateApplication()); - Assertions.assertEquals("unqecanoae", model.nextLink()); + Assertions.assertEquals("kymuctqhjfbebr", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceInnerTests.java index 3856cbb84dcc..54453ae5347d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceInnerTests.java @@ -14,21 +14,19 @@ public final class ApplicationTypeResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeResourceInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"kthfui\"},\"tags\":{\"yzydagfuaxbezyi\":\"dsfcpkvxodpuoz\",\"ywqsmbsurexim\":\"okktwhrdxw\",\"stkiiuxhqyud\":\"ryocfsfksymdd\",\"rq\":\"o\"},\"location\":\"poczvyifqrvkdvjs\",\"id\":\"rm\",\"name\":\"vdfwatkpn\",\"type\":\"ulexxbczwtr\"}") + "{\"properties\":{\"provisioningState\":\"xdbabphlwr\"},\"tags\":{\"azt\":\"ktsthsucocmny\"},\"location\":\"twwrqp\",\"id\":\"dckzywbiexz\",\"name\":\"eyueaxibxujwb\",\"type\":\"qwalmuzyoxaepd\"}") .toObject(ApplicationTypeResourceInner.class); - Assertions.assertEquals("dsfcpkvxodpuoz", model.tags().get("yzydagfuaxbezyi")); - Assertions.assertEquals("poczvyifqrvkdvjs", model.location()); + Assertions.assertEquals("ktsthsucocmny", model.tags().get("azt")); + Assertions.assertEquals("twwrqp", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApplicationTypeResourceInner model = new ApplicationTypeResourceInner() - .withTags(mapOf("yzydagfuaxbezyi", "dsfcpkvxodpuoz", "ywqsmbsurexim", "okktwhrdxw", "stkiiuxhqyud", - "ryocfsfksymdd", "rq", "o")) - .withLocation("poczvyifqrvkdvjs"); + ApplicationTypeResourceInner model + = new ApplicationTypeResourceInner().withTags(mapOf("azt", "ktsthsucocmny")).withLocation("twwrqp"); model = BinaryData.fromObject(model).toObject(ApplicationTypeResourceInner.class); - Assertions.assertEquals("dsfcpkvxodpuoz", model.tags().get("yzydagfuaxbezyi")); - Assertions.assertEquals("poczvyifqrvkdvjs", model.location()); + Assertions.assertEquals("ktsthsucocmny", model.tags().get("azt")); + Assertions.assertEquals("twwrqp", model.location()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceListTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceListTests.java index 455b7c1a88b4..3c2b1b047df8 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceListTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceListTests.java @@ -12,10 +12,10 @@ public final class ApplicationTypeResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"eduugi\"},\"tags\":{\"clhocohsl\":\"rrfbyaosvexcson\",\"eggzfb\":\"ev\",\"ithlvmezyvshxm\":\"hfmvfaxkffe\"},\"location\":\"bbzoggig\",\"id\":\"wburvjxxjnspydpt\",\"name\":\"oenkouknvudwti\",\"type\":\"kbldngkpocipa\"},{\"properties\":{\"provisioningState\":\"o\"},\"tags\":{\"iucgygevqzn\":\"kgjn\",\"rbpizc\":\"yp\",\"j\":\"r\",\"yhxdeoejzicwi\":\"dpydn\"},\"location\":\"jttgzf\",\"id\":\"shcbkhajdeyeamdp\",\"name\":\"agalpbuxwgipwhon\",\"type\":\"wkgshwa\"},{\"properties\":{\"provisioningState\":\"xzbinjeputt\"},\"tags\":{\"vyxlwhzlsicohoqq\":\"wnuzoqftiyqzrnkc\",\"yav\":\"wvl\"},\"location\":\"heun\",\"id\":\"qhgyxzkonocukok\",\"name\":\"yaxuconuqszfkb\",\"type\":\"ypewrmjmwvvjekt\"}],\"nextLink\":\"senhwlrs\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"kfssxqukkf\"},\"tags\":{\"xnkjzkdesl\":\"mg\",\"kdwzbaiuebbaumny\":\"vlopwiyighx\",\"txp\":\"upedeojnabckhs\"},\"location\":\"ebtfhvpesap\",\"id\":\"rdqmhjjdhtldwkyz\",\"name\":\"uutkncw\",\"type\":\"cwsvlxotog\"},{\"properties\":{\"provisioningState\":\"upqsx\"},\"tags\":{\"ykvceoveil\":\"i\",\"k\":\"vnotyfjfcnj\",\"kphywpnvjto\":\"nxdhbt\",\"plpho\":\"nermcl\"},\"location\":\"scrpabgyepsbjt\",\"id\":\"qugxywpmueefjzwf\",\"name\":\"kqujidsuyono\",\"type\":\"glaocq\"},{\"properties\":{\"provisioningState\":\"cmgyud\"},\"tags\":{\"wfudwpzntxhdzhl\":\"lmoyrx\",\"hckfrlhrx\":\"qj\"},\"location\":\"kyv\",\"id\":\"ca\",\"name\":\"uzbpzkafku\",\"type\":\"b\"}],\"nextLink\":\"nwbmeh\"}") .toObject(ApplicationTypeResourceList.class); - Assertions.assertEquals("rrfbyaosvexcson", model.value().get(0).tags().get("clhocohsl")); - Assertions.assertEquals("bbzoggig", model.value().get(0).location()); - Assertions.assertEquals("senhwlrs", model.nextLink()); + Assertions.assertEquals("mg", model.value().get(0).tags().get("xnkjzkdesl")); + Assertions.assertEquals("ebtfhvpesap", model.value().get(0).location()); + Assertions.assertEquals("nwbmeh", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourcePropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourcePropertiesTests.java index f98c403eb72b..444fea1d3db6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourcePropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourcePropertiesTests.java @@ -10,7 +10,7 @@ public final class ApplicationTypeResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ApplicationTypeResourceProperties model = BinaryData.fromString("{\"provisioningState\":\"iqzbq\"}") + ApplicationTypeResourceProperties model = BinaryData.fromString("{\"provisioningState\":\"jancu\"}") .toObject(ApplicationTypeResourceProperties.class); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeUpdateParametersTests.java index 1edd933d6bbc..2312ad1d24b4 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeUpdateParametersTests.java @@ -14,17 +14,17 @@ public final class ApplicationTypeUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"okacspk\":\"ovm\",\"jmflbvvnch\":\"lhzdobp\",\"ajiwkuo\":\"kcciwwzjuqkhr\",\"sauuimj\":\"oskg\"}}") + "{\"tags\":{\"bavxbniwdjswzt\":\"d\",\"xbzpfzab\":\"dbpgnxytxhp\",\"ovplw\":\"lcuhxwtctyqiklb\",\"gu\":\"bhvgy\"}}") .toObject(ApplicationTypeUpdateParameters.class); - Assertions.assertEquals("ovm", model.tags().get("okacspk")); + Assertions.assertEquals("d", model.tags().get("bavxbniwdjswzt")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApplicationTypeUpdateParameters model = new ApplicationTypeUpdateParameters() - .withTags(mapOf("okacspk", "ovm", "jmflbvvnch", "lhzdobp", "ajiwkuo", "kcciwwzjuqkhr", "sauuimj", "oskg")); + ApplicationTypeUpdateParameters model = new ApplicationTypeUpdateParameters().withTags( + mapOf("bavxbniwdjswzt", "d", "xbzpfzab", "dbpgnxytxhp", "ovplw", "lcuhxwtctyqiklb", "gu", "bhvgy")); model = BinaryData.fromObject(model).toObject(ApplicationTypeUpdateParameters.class); - Assertions.assertEquals("ovm", model.tags().get("okacspk")); + Assertions.assertEquals("d", model.tags().get("bavxbniwdjswzt")); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceInnerTests.java index 366e90070289..a80932e56aa7 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceInnerTests.java @@ -14,24 +14,23 @@ public final class ApplicationTypeVersionResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeVersionResourceInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"zpwv\",\"appPackageUrl\":\"qdqgbi\"},\"tags\":{\"vf\":\"ihkaetcktvfc\",\"xerf\":\"nkymuctqhjfbebrj\",\"phxepcyvahf\":\"wutttxfvjrbi\",\"gidokgjljyoxgvcl\":\"ljkyqxjvuuj\"},\"location\":\"gsncghkjeszz\",\"id\":\"ijhtxf\",\"name\":\"gx\",\"type\":\"fsm\"}") + "{\"properties\":{\"provisioningState\":\"yvjusrtslhsp\",\"appPackageUrl\":\"deemao\"},\"tags\":{\"vt\":\"ag\",\"hahvljuahaq\":\"elmqk\",\"exq\":\"hcdhmdual\",\"crgvxpvgom\":\"vfadmws\"},\"location\":\"fmisg\",\"id\":\"nbbelda\",\"name\":\"k\",\"type\":\"baliourqhakauha\"}") .toObject(ApplicationTypeVersionResourceInner.class); - Assertions.assertEquals("ihkaetcktvfc", model.tags().get("vf")); - Assertions.assertEquals("gsncghkjeszz", model.location()); - Assertions.assertEquals("qdqgbi", model.appPackageUrl()); + Assertions.assertEquals("ag", model.tags().get("vt")); + Assertions.assertEquals("fmisg", model.location()); + Assertions.assertEquals("deemao", model.appPackageUrl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationTypeVersionResourceInner model = new ApplicationTypeVersionResourceInner() - .withTags(mapOf("vf", "ihkaetcktvfc", "xerf", "nkymuctqhjfbebrj", "phxepcyvahf", "wutttxfvjrbi", - "gidokgjljyoxgvcl", "ljkyqxjvuuj")) - .withLocation("gsncghkjeszz") - .withAppPackageUrl("qdqgbi"); + .withTags(mapOf("vt", "ag", "hahvljuahaq", "elmqk", "exq", "hcdhmdual", "crgvxpvgom", "vfadmws")) + .withLocation("fmisg") + .withAppPackageUrl("deemao"); model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionResourceInner.class); - Assertions.assertEquals("ihkaetcktvfc", model.tags().get("vf")); - Assertions.assertEquals("gsncghkjeszz", model.location()); - Assertions.assertEquals("qdqgbi", model.appPackageUrl()); + Assertions.assertEquals("ag", model.tags().get("vt")); + Assertions.assertEquals("fmisg", model.location()); + Assertions.assertEquals("deemao", model.appPackageUrl()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceListTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceListTests.java index 1ae4d230577a..bd01cd535fe9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceListTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceListTests.java @@ -12,11 +12,11 @@ public final class ApplicationTypeVersionResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeVersionResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"lfbxzpuzycisp\",\"appPackageUrl\":\"qzahmgkbrp\"},\"tags\":{\"rgvtqag\":\"hibnuqqkpika\",\"bfs\":\"buynhijggm\"},\"location\":\"rbu\",\"id\":\"cvpnazzmhjrunmpx\",\"name\":\"tdbhrbnla\",\"type\":\"kx\"}],\"nextLink\":\"skpbhenbtkcxywn\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"ojgjrwjueiotwmc\",\"appPackageUrl\":\"ytdxwit\"},\"tags\":{\"hniskxfbkpyc\":\"jawgqwg\"},\"location\":\"lwn\",\"id\":\"hjdauwhvylwz\",\"name\":\"tdhxujznbmpowuwp\",\"type\":\"zqlveualupjmkhf\"}],\"nextLink\":\"bbcswsrtjri\"}") .toObject(ApplicationTypeVersionResourceList.class); - Assertions.assertEquals("hibnuqqkpika", model.value().get(0).tags().get("rgvtqag")); - Assertions.assertEquals("rbu", model.value().get(0).location()); - Assertions.assertEquals("qzahmgkbrp", model.value().get(0).appPackageUrl()); - Assertions.assertEquals("skpbhenbtkcxywn", model.nextLink()); + Assertions.assertEquals("jawgqwg", model.value().get(0).tags().get("hniskxfbkpyc")); + Assertions.assertEquals("lwn", model.value().get(0).location()); + Assertions.assertEquals("ytdxwit", model.value().get(0).appPackageUrl()); + Assertions.assertEquals("bbcswsrtjri", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourcePropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourcePropertiesTests.java index d84469b2840a..60ab7457f70c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourcePropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourcePropertiesTests.java @@ -12,16 +12,16 @@ public final class ApplicationTypeVersionResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeVersionResourceProperties model - = BinaryData.fromString("{\"provisioningState\":\"eh\",\"appPackageUrl\":\"pvecxgodeb\"}") + = BinaryData.fromString("{\"provisioningState\":\"sfwxosowzxc\",\"appPackageUrl\":\"gicjooxdjeb\"}") .toObject(ApplicationTypeVersionResourceProperties.class); - Assertions.assertEquals("pvecxgodeb", model.appPackageUrl()); + Assertions.assertEquals("gicjooxdjeb", model.appPackageUrl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationTypeVersionResourceProperties model - = new ApplicationTypeVersionResourceProperties().withAppPackageUrl("pvecxgodeb"); + = new ApplicationTypeVersionResourceProperties().withAppPackageUrl("gicjooxdjeb"); model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionResourceProperties.class); - Assertions.assertEquals("pvecxgodeb", model.appPackageUrl()); + Assertions.assertEquals("gicjooxdjeb", model.appPackageUrl()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionUpdateParametersTests.java index e1b1d6fe84b3..d49eb7ab24b4 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionUpdateParametersTests.java @@ -13,17 +13,17 @@ public final class ApplicationTypeVersionUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ApplicationTypeVersionUpdateParameters model = BinaryData.fromString("{\"tags\":{\"ukgri\":\"krbm\"}}") + ApplicationTypeVersionUpdateParameters model = BinaryData.fromString("{\"tags\":{\"ecivyh\":\"cwwfvovbvme\"}}") .toObject(ApplicationTypeVersionUpdateParameters.class); - Assertions.assertEquals("krbm", model.tags().get("ukgri")); + Assertions.assertEquals("cwwfvovbvme", model.tags().get("ecivyh")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationTypeVersionUpdateParameters model - = new ApplicationTypeVersionUpdateParameters().withTags(mapOf("ukgri", "krbm")); + = new ApplicationTypeVersionUpdateParameters().withTags(mapOf("ecivyh", "cwwfvovbvme")); model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionUpdateParameters.class); - Assertions.assertEquals("krbm", model.tags().get("ukgri")); + Assertions.assertEquals("cwwfvovbvme", model.tags().get("ecivyh")); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCleanupPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCleanupPolicyTests.java index 0ae27e0815c4..9a27cb617196 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCleanupPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCleanupPolicyTests.java @@ -11,16 +11,16 @@ public final class ApplicationTypeVersionsCleanupPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ApplicationTypeVersionsCleanupPolicy model = BinaryData.fromString("{\"maxUnusedVersionsToKeep\":1783583685}") + ApplicationTypeVersionsCleanupPolicy model = BinaryData.fromString("{\"maxUnusedVersionsToKeep\":1538408928}") .toObject(ApplicationTypeVersionsCleanupPolicy.class); - Assertions.assertEquals(1783583685, model.maxUnusedVersionsToKeep()); + Assertions.assertEquals(1538408928, model.maxUnusedVersionsToKeep()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationTypeVersionsCleanupPolicy model - = new ApplicationTypeVersionsCleanupPolicy().withMaxUnusedVersionsToKeep(1783583685); + = new ApplicationTypeVersionsCleanupPolicy().withMaxUnusedVersionsToKeep(1538408928); model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionsCleanupPolicy.class); - Assertions.assertEquals(1783583685, model.maxUnusedVersionsToKeep()); + Assertions.assertEquals(1538408928, model.maxUnusedVersionsToKeep()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateMockTests.java index 2325f03edeba..2955bf16bc4e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateMockTests.java @@ -23,7 +23,7 @@ public final class ApplicationTypeVersionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"appPackageUrl\":\"kdlpa\"},\"tags\":{\"gsftufqobrjlnacg\":\"cxfailcfxwmdboxd\",\"nrzvuljraaer\":\"ckknhxkizvy\",\"gukkjqnvbroy\":\"nok\",\"xulcdisdos\":\"a\"},\"location\":\"b\",\"id\":\"vgjrwhr\",\"name\":\"vyc\",\"type\":\"t\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"appPackageUrl\":\"wxdzaumweoohgu\"},\"tags\":{\"olbaemwmdx\":\"zboyjathwt\",\"f\":\"ebwjscjpahlxvea\",\"qcttadijaeukmrsi\":\"xnmwmqtibxyijddt\"},\"location\":\"kpn\",\"id\":\"aapm\",\"name\":\"dqmeqwigpibudq\",\"type\":\"yxeb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,16 +33,16 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationTypeVersionResource response = manager.applicationTypeVersions() - .define("g") - .withExistingApplicationType("klnsrmffey", "xcktpiymerteeamm", "qiekkkzddrt") - .withRegion("m") - .withTags(mapOf("s", "cuijpxt", "wsawddjibabxvi", "wprtu", "tfgle", "itvtzeexavo")) - .withAppPackageUrl("refdee") + .define("smkss") + .withExistingApplicationType("ppipifhpfeoa", "vgcxtx", "csheafidltugsr") + .withRegion("nkjpdnjzha") + .withTags(mapOf("hm", "biqtgdq", "lllibph", "wsldrizetpwbr", "a", "qzmiza")) + .withAppPackageUrl("egprhptil") .create(); - Assertions.assertEquals("cxfailcfxwmdboxd", response.tags().get("gsftufqobrjlnacg")); - Assertions.assertEquals("b", response.location()); - Assertions.assertEquals("kdlpa", response.appPackageUrl()); + Assertions.assertEquals("zboyjathwt", response.tags().get("olbaemwmdx")); + Assertions.assertEquals("kpn", response.location()); + Assertions.assertEquals("wxdzaumweoohgu", response.appPackageUrl()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetWithResponseMockTests.java index f8aecdb502bd..ad530c5b48d1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class ApplicationTypeVersionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"nxpmyyefrpmpdnq\",\"appPackageUrl\":\"skawaoqvmmb\"},\"tags\":{\"qlkzme\":\"fr\"},\"location\":\"itgvkx\",\"id\":\"yqdrf\",\"name\":\"gcealzxwh\",\"type\":\"ansym\"}"; + = "{\"properties\":{\"provisioningState\":\"d\",\"appPackageUrl\":\"tnsi\"},\"tags\":{\"ckdlpag\":\"hzmme\",\"xdfgsftufqobr\":\"rcxfailcfxwmdb\",\"knh\":\"lnacgcc\"},\"location\":\"izvy\",\"id\":\"rzvul\",\"name\":\"r\",\"type\":\"aeranokqgukkjqnv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationTypeVersionResource response = manager.applicationTypeVersions() - .getWithResponse("ouwivkxoyzunbixx", "ti", "vcpwpgclrc", "vtsoxf", com.azure.core.util.Context.NONE) + .getWithResponse("dmdqb", "pypqtgsfj", "cbslhhx", "db", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("fr", response.tags().get("qlkzme")); - Assertions.assertEquals("itgvkx", response.location()); - Assertions.assertEquals("skawaoqvmmb", response.appPackageUrl()); + Assertions.assertEquals("hzmme", response.tags().get("ckdlpag")); + Assertions.assertEquals("izvy", response.location()); + Assertions.assertEquals("tnsi", response.appPackageUrl()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypesMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypesMockTests.java index 24d2502207ec..e120d45ee37c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypesMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypesMockTests.java @@ -22,7 +22,7 @@ public final class ApplicationTypeVersionsListByApplicationTypesMockTests { @Test public void testListByApplicationTypes() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"kjsqzhzbezkgi\",\"appPackageUrl\":\"sidxasicdd\"},\"tags\":{\"gat\":\"jskgfmocwahp\",\"kzyb\":\"eaahhvjhhn\",\"yxkyxvx\":\"jjidjk\"},\"location\":\"blbjedn\",\"id\":\"lageuaulxun\",\"name\":\"mjbnk\",\"type\":\"pxynenlsvxeizzg\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"hryvy\",\"appPackageUrl\":\"ytdc\"},\"tags\":{\"vjdhttzaefedxih\":\"ccknfnwmbtmvp\"},\"location\":\"rphkmcrjdqnsdfz\",\"id\":\"gtgkylkdghr\",\"name\":\"euutlwxezwzh\",\"type\":\"kvbwnhhtqlgeh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testListByApplicationTypes() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ApplicationTypeVersionResource> response = manager.applicationTypeVersions() - .listByApplicationTypes("yqhlwigdivbkbx", "omfaj", "wasqvdaeyyg", com.azure.core.util.Context.NONE); + .listByApplicationTypes("roylaxxu", "cdisd", "sfjbjsvg", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jskgfmocwahp", response.iterator().next().tags().get("gat")); - Assertions.assertEquals("blbjedn", response.iterator().next().location()); - Assertions.assertEquals("sidxasicdd", response.iterator().next().appPackageUrl()); + Assertions.assertEquals("ccknfnwmbtmvp", response.iterator().next().tags().get("vjdhttzaefedxih")); + Assertions.assertEquals("rphkmcrjdqnsdfz", response.iterator().next().location()); + Assertions.assertEquals("ytdc", response.iterator().next().appPackageUrl()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateWithResponseMockTests.java index c2c323739d80..f28bded7c7ff 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class ApplicationTypesCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"dyp\"},\"tags\":{\"sqy\":\"uemsly\"},\"location\":\"foobrlttyms\",\"id\":\"ygqdnfwqzdz\",\"name\":\"tilaxh\",\"type\":\"fhqlyvi\"}"; + = "{\"properties\":{\"provisioningState\":\"nsrmffeycx\"},\"tags\":{\"mx\":\"piymerteea\",\"xv\":\"iekkkzddrtkgdojb\",\"cuijpxt\":\"vrefdeesv\"},\"location\":\"uwprtujwsawd\",\"id\":\"ibabxvititvtzeex\",\"name\":\"vo\",\"type\":\"tfgle\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,14 +33,14 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationTypeResource response = manager.applicationTypes() - .define("sdtutnwlduyc") - .withExistingManagedCluster("zflbqvg", "qvlgafcqusrdvetn") - .withRegion("uvgp") - .withTags(mapOf("xgketwz", "qgsjjxun", "mhv", "hzjhf")) + .define("kgfmocwahpq") + .withExistingManagedCluster("uxakjsqzhzbezk", "imsidxasicddyvvj") + .withRegion("kyxvxevblbjedn") + .withTags(mapOf("idjks", "zybbj")) .create(); - Assertions.assertEquals("uemsly", response.tags().get("sqy")); - Assertions.assertEquals("foobrlttyms", response.location()); + Assertions.assertEquals("piymerteea", response.tags().get("mx")); + Assertions.assertEquals("uwprtujwsawd", response.location()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetWithResponseMockTests.java index 041fac79991b..60e16e33d4b6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class ApplicationTypesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"imlnwiaaomylw\"},\"tags\":{\"l\":\"ulcsethwwnpj\"},\"location\":\"swpchwahfbousn\",\"id\":\"pgfewetwlyx\",\"name\":\"ncxykxhdjhlimm\",\"type\":\"cxfhbcporxv\"}"; + = "{\"properties\":{\"provisioningState\":\"eqsx\"},\"tags\":{\"sbhud\":\"fbuzjyihs\",\"foobrlttyms\":\"pohyuemslynsqyr\",\"nfwqzdzgtilaxhn\":\"nygq\",\"wivkxo\":\"hqlyvijo\"},\"location\":\"un\",\"id\":\"xxrtikvc\",\"name\":\"wpgclrcivt\",\"type\":\"oxfrkenxpmyyefr\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationTypeResource response = manager.applicationTypes() - .getWithResponse("wpfaj", "jwltlwtjjgu", "talhsnvkcdmxzr", com.azure.core.util.Context.NONE) + .getWithResponse("xundxgk", "twzhhzjhfjmhv", "muvgp", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ulcsethwwnpj", response.tags().get("l")); - Assertions.assertEquals("swpchwahfbousn", response.location()); + Assertions.assertEquals("fbuzjyihs", response.tags().get("sbhud")); + Assertions.assertEquals("un", response.location()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListMockTests.java index 77298087d003..b0e4fd20683c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListMockTests.java @@ -22,7 +22,7 @@ public final class ApplicationTypesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"juhdqazkmtgguwpi\"},\"tags\":{\"f\":\"jcivmmg\"},\"location\":\"iwrxgkn\",\"id\":\"vyi\",\"name\":\"zqodfvpgshox\",\"type\":\"sgbpfgzdjtx\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"rtql\"},\"tags\":{\"kxlzyqdrfeg\":\"egnitg\",\"lwigdivbkbx\":\"ealzxwhcansymoyq\"},\"location\":\"mf\",\"id\":\"uwasqvd\",\"name\":\"e\",\"type\":\"y\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ApplicationTypeResource> response - = manager.applicationTypes().list("cjzhqi", "xfpxtgqscja", com.azure.core.util.Context.NONE); + = manager.applicationTypes().list("mpdnqqskawa", "qvmmbn", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jcivmmg", response.iterator().next().tags().get("f")); - Assertions.assertEquals("iwrxgkn", response.iterator().next().location()); + Assertions.assertEquals("egnitg", response.iterator().next().tags().get("kxlzyqdrfeg")); + Assertions.assertEquals("mf", response.iterator().next().location()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersPropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersPropertiesTests.java new file mode 100644 index 000000000000..40afdd13a6da --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersPropertiesTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParametersProperties; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ApplicationUpdateParametersPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ApplicationUpdateParametersProperties model = BinaryData.fromString("{\"parameters\":{\"ljavbqid\":\"qcjm\"}}") + .toObject(ApplicationUpdateParametersProperties.class); + Assertions.assertEquals("qcjm", model.parameters().get("ljavbqid")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ApplicationUpdateParametersProperties model + = new ApplicationUpdateParametersProperties().withParameters(mapOf("ljavbqid", "qcjm")); + model = BinaryData.fromObject(model).toObject(ApplicationUpdateParametersProperties.class); + Assertions.assertEquals("qcjm", model.parameters().get("ljavbqid")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersTests.java index 2dbbc2c62a52..6fa511b670ef 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersTests.java @@ -6,6 +6,7 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParametersProperties; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -14,17 +15,22 @@ public final class ApplicationUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"eeh\":\"lnrosfqp\",\"swjdkirso\":\"zvypyqrimzinp\",\"soifiyipjxsqw\":\"dqxhcrmnohjtckwh\",\"bznorcjxvsnby\":\"gr\"}}") + "{\"tags\":{\"eeh\":\"lnrosfqp\",\"swjdkirso\":\"zvypyqrimzinp\",\"soifiyipjxsqw\":\"dqxhcrmnohjtckwh\",\"bznorcjxvsnby\":\"gr\"},\"properties\":{\"parameters\":{\"cyshurzafbljjgp\":\"nmoc\"}}}") .toObject(ApplicationUpdateParameters.class); Assertions.assertEquals("lnrosfqp", model.tags().get("eeh")); + Assertions.assertEquals("nmoc", model.properties().parameters().get("cyshurzafbljjgp")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApplicationUpdateParameters model = new ApplicationUpdateParameters().withTags(mapOf("eeh", "lnrosfqp", - "swjdkirso", "zvypyqrimzinp", "soifiyipjxsqw", "dqxhcrmnohjtckwh", "bznorcjxvsnby", "gr")); + ApplicationUpdateParameters model = new ApplicationUpdateParameters() + .withTags(mapOf("eeh", "lnrosfqp", "swjdkirso", "zvypyqrimzinp", "soifiyipjxsqw", "dqxhcrmnohjtckwh", + "bznorcjxvsnby", "gr")) + .withProperties( + new ApplicationUpdateParametersProperties().withParameters(mapOf("cyshurzafbljjgp", "nmoc"))); model = BinaryData.fromObject(model).toObject(ApplicationUpdateParameters.class); Assertions.assertEquals("lnrosfqp", model.tags().get("eeh")); + Assertions.assertEquals("nmoc", model.properties().parameters().get("cyshurzafbljjgp")); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateMockTests.java index 4cb6fa7e9a5e..b688c94d841e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateMockTests.java @@ -34,7 +34,7 @@ public final class ApplicationsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"managedIdentities\":[{\"name\":\"hocxvdfffwafqrou\",\"principalId\":\"aspavehhr\"},{\"name\":\"kbunzoz\",\"principalId\":\"dhcxgkmoy\"},{\"name\":\"cdyuibhmfdnbzyd\",\"principalId\":\"f\"},{\"name\":\"fcjnaeoisrvhmgor\",\"principalId\":\"fukiscvwmzhw\"}],\"provisioningState\":\"Succeeded\",\"version\":\"gnhnzeyq\",\"parameters\":{\"dbeesmie\":\"jfzqlqhycavodgg\",\"wqfbylyrfgiagt\":\"nlrariaawiuagy\",\"zjvusfzldmo\":\"ojocqwogf\",\"own\":\"uxylfsbtkadpy\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":1188867128,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":792325056,\"maxPercentUnhealthyPartitionsPerService\":403303744,\"maxPercentUnhealthyReplicasPerPartition\":1343904651},\"serviceTypeHealthPolicyMap\":{\"cmisofie\":{\"maxPercentUnhealthyServices\":508604725,\"maxPercentUnhealthyPartitionsPerService\":1010221539,\"maxPercentUnhealthyReplicasPerPartition\":490054164}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"jy\",\"healthCheckStableDuration\":\"dh\",\"healthCheckRetryTimeout\":\"u\",\"upgradeTimeout\":\"lcplc\",\"upgradeDomainTimeout\":\"khihihlhzds\"},\"instanceCloseDelayDuration\":2248945719770323903,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":4511642520735539935,\"recreateApplication\":true}},\"tags\":{\"e\":\"fgmvecactxmwo\",\"ekqvgqouwif\":\"owcluqo\",\"ivqikfxcvhr\":\"mpjw\"},\"identity\":{\"principalId\":\"huagrttikteusqc\",\"tenantId\":\"vyklxuby\",\"type\":\"None\",\"userAssignedIdentities\":{\"brta\":{\"principalId\":\"fblcq\",\"clientId\":\"ubgq\"},\"qseypxiutcxa\":{\"principalId\":\"etttwgdslqxihhr\",\"clientId\":\"oi\"},\"abrqnkkzj\":{\"principalId\":\"hyrpetogebjoxs\",\"clientId\":\"vnh\"},\"qbeitpkxztmoob\":{\"principalId\":\"b\",\"clientId\":\"gaehvvibrxjjst\"}}},\"location\":\"ft\",\"id\":\"gfcwqmpimaqxzhem\",\"name\":\"yhohujswtwkozzwc\",\"type\":\"lkb\"}"; + = "{\"properties\":{\"managedIdentities\":[{\"name\":\"rttikteusqc\",\"principalId\":\"kvyklxubyjaffmm\"},{\"name\":\"bl\",\"principalId\":\"qcuubgqibrta\"},{\"name\":\"metttwgd\",\"principalId\":\"lqxihhrmooiz\"},{\"name\":\"seypxiutcxapz\",\"principalId\":\"y\"}],\"provisioningState\":\"Succeeded\",\"version\":\"oxslh\",\"parameters\":{\"aehvvibrxjjstoq\":\"labrqnkkzjcjbtr\",\"bklftidgfcwqmpim\":\"eitpkxztmo\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":1167127831,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1502903933,\"maxPercentUnhealthyPartitionsPerService\":1484369172,\"maxPercentUnhealthyReplicasPerPartition\":2126797239},\"serviceTypeHealthPolicyMap\":{\"swtwkozzwc\":{\"maxPercentUnhealthyServices\":1611708700,\"maxPercentUnhealthyPartitionsPerService\":453799283,\"maxPercentUnhealthyReplicasPerPartition\":633481749}}},\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"wpfaj\",\"healthCheckStableDuration\":\"jwltlwtjjgu\",\"healthCheckRetryTimeout\":\"talhsnvkcdmxzr\",\"upgradeTimeout\":\"oaimlnw\",\"upgradeDomainTimeout\":\"aaomylweazu\"},\"instanceCloseDelayDuration\":7974020410660782836,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":7245561295211561576,\"recreateApplication\":true}},\"tags\":{\"wpchwahf\":\"fz\"},\"identity\":{\"principalId\":\"snfepgfewetwlyx\",\"tenantId\":\"cxy\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"qizxfpxtgqscjavf\":{\"principalId\":\"limmbcxf\",\"clientId\":\"cporxvxcjz\"},\"wpijrajci\":{\"principalId\":\"uhdqazk\",\"clientId\":\"gg\"},\"oxgsgbpfgzdjtx\":{\"principalId\":\"mghfcfiwrxgkne\",\"clientId\":\"yinzqodfvpgs\"},\"rdve\":{\"principalId\":\"flbqvgaq\",\"clientId\":\"gafcqu\"}}},\"location\":\"wsdtutnwl\",\"id\":\"ycvuzhyrmewipmv\",\"name\":\"k\",\"type\":\"xukuqgsj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -44,108 +44,107 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationResource response = manager.applications() - .define("ktwkuziyc") - .withExistingManagedCluster("ril", "zapeewchpx") - .withRegion("rbbcevq") - .withTags(mapOf("hqyikvy", "qyuvvfonkp", "vluwmncsttij", "auy")) - .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.NONE) + .define("hqyikvy") + .withExistingManagedCluster("jazysdzhezwwvaiq", "uvvfonkp") + .withRegion("uqovekqvgqouwif") + .withTags(mapOf("vwmzhwplefaxvxil", "vhmgorffukis", "nzeyqxtjj", "btgn")) + .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities( - mapOf("gkynscliqh", new UserAssignedIdentity(), "dxzxhi", new UserAssignedIdentity()))) - .withManagedIdentities(Arrays - .asList(new ApplicationUserAssignedIdentity().withName("ufuztcktyhjtq").withPrincipalId("dcgzul"))) - .withVersion("zgkrvqe") - .withParameters(mapOf("t", "oepry", "fvaawzqa", "wytpzdmovz")) + mapOf("iagtc", new UserAssignedIdentity(), "ozuxylfsbtkadpys", new UserAssignedIdentity(), + "cuplcplcwkhih", new UserAssignedIdentity(), "txmwoteyow", new UserAssignedIdentity()))) + .withManagedIdentities( + Arrays.asList(new ApplicationUserAssignedIdentity().withName("avluwmncs").withPrincipalId("tijfybvp"), + new ApplicationUserAssignedIdentity().withName("ekrsgs").withPrincipalId("b"), + new ApplicationUserAssignedIdentity().withName("huzqgn").withPrincipalId("dgkynscliqhzvhxn"))) + .withVersion("otppnv") + .withParameters(mapOf("dhlfkqojpykvgt", "xhihfrbbcevqagtl")) .withUpgradePolicy(new ApplicationUpgradePolicy() .withApplicationHealthPolicy(new ApplicationHealthPolicy().withConsiderWarningAsError(true) - .withMaxPercentUnhealthyDeployedApplications(97417905) + .withMaxPercentUnhealthyDeployedApplications(1625047918) .withDefaultServiceTypeHealthPolicy( - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1828408441) - .withMaxPercentUnhealthyPartitionsPerService(1869010035) - .withMaxPercentUnhealthyReplicasPerPartition(1067396685)) - .withServiceTypeHealthPolicyMap(mapOf("ndtic", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1058037553) - .withMaxPercentUnhealthyPartitionsPerService(335381913) - .withMaxPercentUnhealthyReplicasPerPartition(1970549549), - "zmlqtmldgxo", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1691117977) - .withMaxPercentUnhealthyPartitionsPerService(687349800) - .withMaxPercentUnhealthyReplicasPerPartition(675680646), - "clnpkci", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1135591058) - .withMaxPercentUnhealthyPartitionsPerService(1794047018) - .withMaxPercentUnhealthyReplicasPerPartition(1646739085)))) + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(840860863) + .withMaxPercentUnhealthyPartitionsPerService(1598759472) + .withMaxPercentUnhealthyReplicasPerPartition(2043504503)) + .withServiceTypeHealthPolicyMap(mapOf("rnysux", + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1409785918) + .withMaxPercentUnhealthyPartitionsPerService(212235085) + .withMaxPercentUnhealthyReplicasPerPartition(599707965), + "fwgckhocxvdfffw", + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(718092493) + .withMaxPercentUnhealthyPartitionsPerService(1439980159) + .withMaxPercentUnhealthyReplicasPerPartition(214541271)))) .withForceRestart(false) .withRollingUpgradeMonitoringPolicy( - new RollingUpgradeMonitoringPolicy().withFailureAction(FailureAction.ROLLBACK) - .withHealthCheckWaitDuration("ykhyawfvjlboxqvk") - .withHealthCheckStableDuration("lmxhomdyn") - .withHealthCheckRetryTimeout("dwdigumb") - .withUpgradeTimeout("raauzzpt") - .withUpgradeDomainTimeout("a")) - .withInstanceCloseDelayDuration(8740215687103788004L) - .withUpgradeMode(RollingUpgradeMode.UNMONITORED_AUTO) - .withUpgradeReplicaSetCheckTimeout(5386759909033236623L) - .withRecreateApplication(true)) + new RollingUpgradeMonitoringPolicy().withFailureAction(FailureAction.MANUAL) + .withHealthCheckWaitDuration("udaspavehh") + .withHealthCheckStableDuration("vkbunzozudh") + .withHealthCheckRetryTimeout("xg") + .withUpgradeTimeout("moy") + .withUpgradeDomainTimeout("cdyuibhmfdnbzyd")) + .withInstanceCloseDelayDuration(8043600707281481210L) + .withUpgradeMode(RollingUpgradeMode.MONITORED) + .withUpgradeReplicaSetCheckTimeout(8257017600772006197L) + .withRecreateApplication(false)) .create(); - Assertions.assertEquals("fgmvecactxmwo", response.tags().get("e")); - Assertions.assertEquals(ManagedIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("ft", response.location()); - Assertions.assertEquals("hocxvdfffwafqrou", response.managedIdentities().get(0).name()); - Assertions.assertEquals("aspavehhr", response.managedIdentities().get(0).principalId()); - Assertions.assertEquals("gnhnzeyq", response.version()); - Assertions.assertEquals("jfzqlqhycavodgg", response.parameters().get("dbeesmie")); + Assertions.assertEquals("fz", response.tags().get("wpchwahf")); + Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("wsdtutnwl", response.location()); + Assertions.assertEquals("rttikteusqc", response.managedIdentities().get(0).name()); + Assertions.assertEquals("kvyklxubyjaffmm", response.managedIdentities().get(0).principalId()); + Assertions.assertEquals("oxslh", response.version()); + Assertions.assertEquals("labrqnkkzjcjbtr", response.parameters().get("aehvvibrxjjstoq")); Assertions.assertFalse(response.upgradePolicy().applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(1188867128, + Assertions.assertEquals(1167127831, response.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(792325056, + Assertions.assertEquals(1502903933, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyServices()); - Assertions.assertEquals(403303744, + Assertions.assertEquals(1484369172, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(1343904651, + Assertions.assertEquals(2126797239, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(508604725, + Assertions.assertEquals(1611708700, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("cmisofie") + .get("swtwkozzwc") .maxPercentUnhealthyServices()); - Assertions.assertEquals(1010221539, + Assertions.assertEquals(453799283, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("cmisofie") + .get("swtwkozzwc") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(490054164, + Assertions.assertEquals(633481749, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("cmisofie") + .get("swtwkozzwc") .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertTrue(response.upgradePolicy().forceRestart()); + Assertions.assertFalse(response.upgradePolicy().forceRestart()); Assertions.assertEquals(FailureAction.MANUAL, response.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("jy", + Assertions.assertEquals("wpfaj", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("dh", + Assertions.assertEquals("jwltlwtjjgu", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("u", + Assertions.assertEquals("talhsnvkcdmxzr", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("lcplc", response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("khihihlhzds", + Assertions.assertEquals("oaimlnw", response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); + Assertions.assertEquals("aaomylweazu", response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(2248945719770323903L, response.upgradePolicy().instanceCloseDelayDuration()); - Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_AUTO, response.upgradePolicy().upgradeMode()); - Assertions.assertEquals(4511642520735539935L, response.upgradePolicy().upgradeReplicaSetCheckTimeout()); + Assertions.assertEquals(7974020410660782836L, response.upgradePolicy().instanceCloseDelayDuration()); + Assertions.assertEquals(RollingUpgradeMode.MONITORED, response.upgradePolicy().upgradeMode()); + Assertions.assertEquals(7245561295211561576L, response.upgradePolicy().upgradeReplicaSetCheckTimeout()); Assertions.assertTrue(response.upgradePolicy().recreateApplication()); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetWithResponseMockTests.java index 3c183885fdd3..247480fb86ee 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class ApplicationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"managedIdentities\":[{\"name\":\"iuxxpshneekulfg\",\"principalId\":\"lqubkwdlen\"},{\"name\":\"d\",\"principalId\":\"utujba\"},{\"name\":\"pjuohminyfl\",\"principalId\":\"orwmduvwpklv\"}],\"provisioningState\":\"mygdxpgpqch\",\"version\":\"zepn\",\"parameters\":{\"axconfozauo\":\"crxgibb\",\"nuuepzlrp\":\"sukokwbqplhl\",\"nnrwrbiork\":\"wzsoldweyuqdunv\",\"xmsivfomiloxggdu\":\"alywjhhgdn\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":133601107,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1357028156,\"maxPercentUnhealthyPartitionsPerService\":1264679400,\"maxPercentUnhealthyReplicasPerPartition\":569162481},\"serviceTypeHealthPolicyMap\":{\"hvcyyysfg\":{\"maxPercentUnhealthyServices\":1581273229,\"maxPercentUnhealthyPartitionsPerService\":1778919230,\"maxPercentUnhealthyReplicasPerPartition\":886290907},\"ubiipuipwoqonma\":{\"maxPercentUnhealthyServices\":1377717439,\"maxPercentUnhealthyPartitionsPerService\":2137619748,\"maxPercentUnhealthyReplicasPerPartition\":355548039},\"nizshqvcim\":{\"maxPercentUnhealthyServices\":219234320,\"maxPercentUnhealthyPartitionsPerService\":914015459,\"maxPercentUnhealthyReplicasPerPartition\":167629289}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"mblrrilbywd\",\"healthCheckStableDuration\":\"smiccwrwfscj\",\"healthCheckRetryTimeout\":\"n\",\"upgradeTimeout\":\"nszqujiz\",\"upgradeDomainTimeout\":\"voqyt\"},\"instanceCloseDelayDuration\":1821183361408913568,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":2398197739518116547,\"recreateApplication\":false}},\"tags\":{\"hjoxo\":\"tp\"},\"identity\":{\"principalId\":\"sks\",\"tenantId\":\"iml\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"fgfb\":{\"principalId\":\"cgxxlxs\",\"clientId\":\"gcvizqzdwlvwlyou\"},\"g\":{\"principalId\":\"ubdyhgk\",\"clientId\":\"in\"},\"mmqtgqqqxhr\":{\"principalId\":\"zfttsttktlahb\",\"clientId\":\"ctxtgzukxi\"},\"azivjlfrqttbajl\":{\"principalId\":\"rxcpjuisavo\",\"clientId\":\"dzf\"}}},\"location\":\"tnwxy\",\"id\":\"pidkqqfkuvscxkdm\",\"name\":\"igovi\",\"type\":\"rxkpmloazuruoc\"}"; + = "{\"properties\":{\"managedIdentities\":[{\"name\":\"ljxkcgxxlx\",\"principalId\":\"ffgcvizqz\"},{\"name\":\"wlvwlyoupf\",\"principalId\":\"fbkjubdyhgkfmi\"}],\"provisioningState\":\"g\",\"version\":\"zfttsttktlahb\",\"parameters\":{\"gzukxitmm\":\"tx\",\"qqxhrnxrxcpj\":\"tg\",\"dzf\":\"isavok\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":2015132564,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":225909755,\"maxPercentUnhealthyPartitionsPerService\":1398349003,\"maxPercentUnhealthyReplicasPerPartition\":1209052818},\"serviceTypeHealthPolicyMap\":{\"jlkatnwxy\":{\"maxPercentUnhealthyServices\":234618918,\"maxPercentUnhealthyPartitionsPerService\":1411328763,\"maxPercentUnhealthyReplicasPerPartition\":2022353115},\"dkqqfkuvscxkd\":{\"maxPercentUnhealthyServices\":713204380,\"maxPercentUnhealthyPartitionsPerService\":2086170636,\"maxPercentUnhealthyReplicasPerPartition\":372897699}}},\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"vibrxkpmloazuruo\",\"healthCheckStableDuration\":\"bgo\",\"healthCheckRetryTimeout\":\"rb\",\"upgradeTimeout\":\"eoybfhjxakvvjgs\",\"upgradeDomainTimeout\":\"ordilmywwtkgkxny\"},\"instanceCloseDelayDuration\":9040461916743042317,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":475774977196617352,\"recreateApplication\":true}},\"tags\":{\"j\":\"wbcihxuuwh\",\"akkud\":\"xccybvpa\",\"wjplma\":\"px\"},\"identity\":{\"principalId\":\"cyohpfkyrkdbd\",\"tenantId\":\"ogsjkmnwqjno\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"mvmemfnczd\":{\"principalId\":\"d\",\"clientId\":\"acegfnmntf\"}}},\"location\":\"vbalxlllc\",\"id\":\"odbzevwrdnhf\",\"name\":\"kuvsjcswsm\",\"type\":\"stul\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,67 +34,68 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationResource response = manager.applications() - .getWithResponse("jvewzcjznmwcp", "guaadraufactkahz", "v", com.azure.core.util.Context.NONE) + .getWithResponse("vutpthjoxo", "smsks", "pi", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("tp", response.tags().get("hjoxo")); - Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("tnwxy", response.location()); - Assertions.assertEquals("iuxxpshneekulfg", response.managedIdentities().get(0).name()); - Assertions.assertEquals("lqubkwdlen", response.managedIdentities().get(0).principalId()); - Assertions.assertEquals("zepn", response.version()); - Assertions.assertEquals("crxgibb", response.parameters().get("axconfozauo")); + Assertions.assertEquals("wbcihxuuwh", response.tags().get("j")); + Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, response.identity().type()); + Assertions.assertEquals("vbalxlllc", response.location()); + Assertions.assertEquals("ljxkcgxxlx", response.managedIdentities().get(0).name()); + Assertions.assertEquals("ffgcvizqz", response.managedIdentities().get(0).principalId()); + Assertions.assertEquals("zfttsttktlahb", response.version()); + Assertions.assertEquals("tx", response.parameters().get("gzukxitmm")); Assertions.assertTrue(response.upgradePolicy().applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(133601107, + Assertions.assertEquals(2015132564, response.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(1357028156, + Assertions.assertEquals(225909755, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyServices()); - Assertions.assertEquals(1264679400, + Assertions.assertEquals(1398349003, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(569162481, + Assertions.assertEquals(1209052818, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(1581273229, + Assertions.assertEquals(234618918, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("hvcyyysfg") + .get("jlkatnwxy") .maxPercentUnhealthyServices()); - Assertions.assertEquals(1778919230, + Assertions.assertEquals(1411328763, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("hvcyyysfg") + .get("jlkatnwxy") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(886290907, + Assertions.assertEquals(2022353115, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("hvcyyysfg") + .get("jlkatnwxy") .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertTrue(response.upgradePolicy().forceRestart()); + Assertions.assertFalse(response.upgradePolicy().forceRestart()); Assertions.assertEquals(FailureAction.ROLLBACK, response.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("mblrrilbywd", + Assertions.assertEquals("vibrxkpmloazuruo", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("smiccwrwfscj", + Assertions.assertEquals("bgo", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("n", + Assertions.assertEquals("rb", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("nszqujiz", response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("voqyt", + Assertions.assertEquals("eoybfhjxakvvjgs", + response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); + Assertions.assertEquals("ordilmywwtkgkxny", response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(1821183361408913568L, response.upgradePolicy().instanceCloseDelayDuration()); + Assertions.assertEquals(9040461916743042317L, response.upgradePolicy().instanceCloseDelayDuration()); Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_AUTO, response.upgradePolicy().upgradeMode()); - Assertions.assertEquals(2398197739518116547L, response.upgradePolicy().upgradeReplicaSetCheckTimeout()); - Assertions.assertFalse(response.upgradePolicy().recreateApplication()); + Assertions.assertEquals(475774977196617352L, response.upgradePolicy().upgradeReplicaSetCheckTimeout()); + Assertions.assertTrue(response.upgradePolicy().recreateApplication()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListMockTests.java index 75f3690382a1..ccb390911e20 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListMockTests.java @@ -25,7 +25,7 @@ public final class ApplicationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"managedIdentities\":[{\"name\":\"lmywwtkgkxnyed\",\"principalId\":\"b\"}],\"provisioningState\":\"vudtjuewbcihx\",\"version\":\"whcjyxcc\",\"parameters\":{\"px\":\"payakkud\",\"stcyohpfkyrkdbd\":\"wjplma\",\"nobaiyhddviacegf\":\"iogsjkmnwq\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":864919134,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":394707099,\"maxPercentUnhealthyPartitionsPerService\":328676113,\"maxPercentUnhealthyReplicasPerPartition\":2049535402},\"serviceTypeHealthPolicyMap\":{\"zdwvvbalxl\":{\"maxPercentUnhealthyServices\":999073348,\"maxPercentUnhealthyPartitionsPerService\":1649759602,\"maxPercentUnhealthyReplicasPerPartition\":1382156415},\"podbzevwrdnh\":{\"maxPercentUnhealthyServices\":1368120415,\"maxPercentUnhealthyPartitionsPerService\":677641870,\"maxPercentUnhealthyReplicasPerPartition\":2062090684}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"sjcswsmystuluqyp\",\"healthCheckStableDuration\":\"cvlerchpqbmfpjba\",\"healthCheckRetryTimeout\":\"widf\",\"upgradeTimeout\":\"xsspuunnoxyhk\",\"upgradeDomainTimeout\":\"g\"},\"instanceCloseDelayDuration\":9129720972817619539,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":5806792787635363155,\"recreateApplication\":true}},\"tags\":{\"wdaomdjvlpjxxkzb\":\"a\",\"ncj\":\"msgeivsiykzk\",\"y\":\"xonbzoggculapz\"},\"identity\":{\"principalId\":\"ogtqxepnylbf\",\"tenantId\":\"jlyjtlvofq\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"wiivwzjbhyzsx\":{\"principalId\":\"byfmowuxr\",\"clientId\":\"pvdwxf\"}}},\"location\":\"kambtrnegvmnvuqe\",\"id\":\"lds\",\"name\":\"astjbkkdmflvestm\",\"type\":\"lx\"}]}"; + = "{\"value\":[{\"properties\":{\"managedIdentities\":[{\"name\":\"bm\",\"principalId\":\"pjbabwidfc\"},{\"name\":\"sspuunnoxyhkx\",\"principalId\":\"qddrihpfhoqcaae\"},{\"name\":\"dao\",\"principalId\":\"djvlpj\"},{\"name\":\"xkzb\",\"principalId\":\"msgeivsiykzk\"}],\"provisioningState\":\"cjdx\",\"version\":\"bzo\",\"parameters\":{\"ogtqxepnylbf\":\"ulapzwyrp\",\"cib\":\"ajlyjtlvofqzhv\",\"uxrkjp\":\"fmo\",\"wiivwzjbhyzsx\":\"dwxf\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":857914437,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":2010544463,\"maxPercentUnhealthyPartitionsPerService\":1753999923,\"maxPercentUnhealthyReplicasPerPartition\":426068094},\"serviceTypeHealthPolicyMap\":{\"vuqeqvldspast\":{\"maxPercentUnhealthyServices\":1243501701,\"maxPercentUnhealthyPartitionsPerService\":1525920075,\"maxPercentUnhealthyReplicasPerPartition\":983606156},\"dmflv\":{\"maxPercentUnhealthyServices\":900352978,\"maxPercentUnhealthyPartitionsPerService\":1481750195,\"maxPercentUnhealthyReplicasPerPartition\":1155931033},\"jlxr\":{\"maxPercentUnhealthyServices\":922777,\"maxPercentUnhealthyPartitionsPerService\":1294255388,\"maxPercentUnhealthyReplicasPerPartition\":1941406807}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"apeewchpxlkt\",\"healthCheckStableDuration\":\"kuziycsle\",\"healthCheckRetryTimeout\":\"ufuztcktyhjtq\",\"upgradeTimeout\":\"dcgzul\",\"upgradeDomainTimeout\":\"mmrqz\"},\"instanceCloseDelayDuration\":9007359622737683059,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":6630814331855742678,\"recreateApplication\":false}},\"tags\":{\"ytp\":\"rvqeevtoepryutn\"},\"identity\":{\"principalId\":\"o\",\"tenantId\":\"vf\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"xndticokpvzmlqtm\":{\"principalId\":\"adflgzu\",\"clientId\":\"glae\"},\"iykhy\":{\"principalId\":\"gxobfirclnp\",\"clientId\":\"iayz\"}}},\"location\":\"fvjlboxqvkjlmx\",\"id\":\"mdy\",\"name\":\"hdwdi\",\"type\":\"umbnraauzzp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,86 +35,86 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ApplicationResource> response - = manager.applications().list("goorbteo", "bfhjxakvvjgsl", com.azure.core.util.Context.NONE); + = manager.applications().list("qypfcv", "er", com.azure.core.util.Context.NONE); - Assertions.assertEquals("a", response.iterator().next().tags().get("wdaomdjvlpjxxkzb")); - Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("kambtrnegvmnvuqe", response.iterator().next().location()); - Assertions.assertEquals("lmywwtkgkxnyed", response.iterator().next().managedIdentities().get(0).name()); - Assertions.assertEquals("b", response.iterator().next().managedIdentities().get(0).principalId()); - Assertions.assertEquals("whcjyxcc", response.iterator().next().version()); - Assertions.assertEquals("payakkud", response.iterator().next().parameters().get("px")); + Assertions.assertEquals("rvqeevtoepryutn", response.iterator().next().tags().get("ytp")); + Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); + Assertions.assertEquals("fvjlboxqvkjlmx", response.iterator().next().location()); + Assertions.assertEquals("bm", response.iterator().next().managedIdentities().get(0).name()); + Assertions.assertEquals("pjbabwidfc", response.iterator().next().managedIdentities().get(0).principalId()); + Assertions.assertEquals("bzo", response.iterator().next().version()); + Assertions.assertEquals("ulapzwyrp", response.iterator().next().parameters().get("ogtqxepnylbf")); Assertions .assertTrue(response.iterator().next().upgradePolicy().applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(864919134, + Assertions.assertEquals(857914437, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(394707099, + Assertions.assertEquals(2010544463, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyServices()); - Assertions.assertEquals(328676113, + Assertions.assertEquals(1753999923, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(2049535402, + Assertions.assertEquals(426068094, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(999073348, + Assertions.assertEquals(1243501701, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("zdwvvbalxl") + .get("vuqeqvldspast") .maxPercentUnhealthyServices()); - Assertions.assertEquals(1649759602, + Assertions.assertEquals(1525920075, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("zdwvvbalxl") + .get("vuqeqvldspast") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(1382156415, + Assertions.assertEquals(983606156, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("zdwvvbalxl") + .get("vuqeqvldspast") .maxPercentUnhealthyReplicasPerPartition()); Assertions.assertTrue(response.iterator().next().upgradePolicy().forceRestart()); Assertions.assertEquals(FailureAction.MANUAL, response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("sjcswsmystuluqyp", + Assertions.assertEquals("apeewchpxlkt", response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("cvlerchpqbmfpjba", + Assertions.assertEquals("kuziycsle", response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("widf", + Assertions.assertEquals("ufuztcktyhjtq", response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("xsspuunnoxyhk", + Assertions.assertEquals("dcgzul", response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("g", + Assertions.assertEquals("mmrqz", response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(9129720972817619539L, + Assertions.assertEquals(9007359622737683059L, response.iterator().next().upgradePolicy().instanceCloseDelayDuration()); Assertions.assertEquals(RollingUpgradeMode.MONITORED, response.iterator().next().upgradePolicy().upgradeMode()); - Assertions.assertEquals(5806792787635363155L, + Assertions.assertEquals(6630814331855742678L, response.iterator().next().upgradePolicy().upgradeReplicaSetCheckTimeout()); - Assertions.assertTrue(response.iterator().next().upgradePolicy().recreateApplication()); + Assertions.assertFalse(response.iterator().next().upgradePolicy().recreateApplication()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AveragePartitionLoadScalingTriggerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AveragePartitionLoadScalingTriggerTests.java index f3df8302c566..1876ed8b94b9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AveragePartitionLoadScalingTriggerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AveragePartitionLoadScalingTriggerTests.java @@ -12,25 +12,25 @@ public final class AveragePartitionLoadScalingTriggerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AveragePartitionLoadScalingTrigger model = BinaryData.fromString( - "{\"kind\":\"AveragePartitionLoadTrigger\",\"metricName\":\"hfxobbcswsrtj\",\"lowerLoadThreshold\":92.76548731368051,\"upperLoadThreshold\":84.5100937659018,\"scaleInterval\":\"bpbewtghfgb\"}") + "{\"kind\":\"AveragePartitionLoadTrigger\",\"metricName\":\"sldnkwwtppjflcxo\",\"lowerLoadThreshold\":66.58158433453451,\"upperLoadThreshold\":52.26322581783733,\"scaleInterval\":\"nzmnsikvm\"}") .toObject(AveragePartitionLoadScalingTrigger.class); - Assertions.assertEquals("hfxobbcswsrtj", model.metricName()); - Assertions.assertEquals(92.76548731368051, model.lowerLoadThreshold()); - Assertions.assertEquals(84.5100937659018, model.upperLoadThreshold()); - Assertions.assertEquals("bpbewtghfgb", model.scaleInterval()); + Assertions.assertEquals("sldnkwwtppjflcxo", model.metricName()); + Assertions.assertEquals(66.58158433453451, model.lowerLoadThreshold()); + Assertions.assertEquals(52.26322581783733, model.upperLoadThreshold()); + Assertions.assertEquals("nzmnsikvm", model.scaleInterval()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AveragePartitionLoadScalingTrigger model - = new AveragePartitionLoadScalingTrigger().withMetricName("hfxobbcswsrtj") - .withLowerLoadThreshold(92.76548731368051) - .withUpperLoadThreshold(84.5100937659018) - .withScaleInterval("bpbewtghfgb"); + = new AveragePartitionLoadScalingTrigger().withMetricName("sldnkwwtppjflcxo") + .withLowerLoadThreshold(66.58158433453451) + .withUpperLoadThreshold(52.26322581783733) + .withScaleInterval("nzmnsikvm"); model = BinaryData.fromObject(model).toObject(AveragePartitionLoadScalingTrigger.class); - Assertions.assertEquals("hfxobbcswsrtj", model.metricName()); - Assertions.assertEquals(92.76548731368051, model.lowerLoadThreshold()); - Assertions.assertEquals(84.5100937659018, model.upperLoadThreshold()); - Assertions.assertEquals("bpbewtghfgb", model.scaleInterval()); + Assertions.assertEquals("sldnkwwtppjflcxo", model.metricName()); + Assertions.assertEquals(66.58158433453451, model.lowerLoadThreshold()); + Assertions.assertEquals(52.26322581783733, model.upperLoadThreshold()); + Assertions.assertEquals("nzmnsikvm", model.scaleInterval()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AverageServiceLoadScalingTriggerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AverageServiceLoadScalingTriggerTests.java index 7793aa5345f2..b67f610d09f5 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AverageServiceLoadScalingTriggerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AverageServiceLoadScalingTriggerTests.java @@ -12,27 +12,27 @@ public final class AverageServiceLoadScalingTriggerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AverageServiceLoadScalingTrigger model = BinaryData.fromString( - "{\"kind\":\"AverageServiceLoadTrigger\",\"metricName\":\"c\",\"lowerLoadThreshold\":65.33544191967107,\"upperLoadThreshold\":79.37105398505092,\"scaleInterval\":\"lvqhjkbegibtnmx\",\"useOnlyPrimaryLoad\":true}") + "{\"kind\":\"AverageServiceLoadTrigger\",\"metricName\":\"qzeqqkdltfzxm\",\"lowerLoadThreshold\":54.37658882164613,\"upperLoadThreshold\":25.287367109549173,\"scaleInterval\":\"ur\",\"useOnlyPrimaryLoad\":false}") .toObject(AverageServiceLoadScalingTrigger.class); - Assertions.assertEquals("c", model.metricName()); - Assertions.assertEquals(65.33544191967107, model.lowerLoadThreshold()); - Assertions.assertEquals(79.37105398505092, model.upperLoadThreshold()); - Assertions.assertEquals("lvqhjkbegibtnmx", model.scaleInterval()); - Assertions.assertTrue(model.useOnlyPrimaryLoad()); + Assertions.assertEquals("qzeqqkdltfzxm", model.metricName()); + Assertions.assertEquals(54.37658882164613, model.lowerLoadThreshold()); + Assertions.assertEquals(25.287367109549173, model.upperLoadThreshold()); + Assertions.assertEquals("ur", model.scaleInterval()); + Assertions.assertFalse(model.useOnlyPrimaryLoad()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AverageServiceLoadScalingTrigger model = new AverageServiceLoadScalingTrigger().withMetricName("c") - .withLowerLoadThreshold(65.33544191967107) - .withUpperLoadThreshold(79.37105398505092) - .withScaleInterval("lvqhjkbegibtnmx") - .withUseOnlyPrimaryLoad(true); + AverageServiceLoadScalingTrigger model = new AverageServiceLoadScalingTrigger().withMetricName("qzeqqkdltfzxm") + .withLowerLoadThreshold(54.37658882164613) + .withUpperLoadThreshold(25.287367109549173) + .withScaleInterval("ur") + .withUseOnlyPrimaryLoad(false); model = BinaryData.fromObject(model).toObject(AverageServiceLoadScalingTrigger.class); - Assertions.assertEquals("c", model.metricName()); - Assertions.assertEquals(65.33544191967107, model.lowerLoadThreshold()); - Assertions.assertEquals(79.37105398505092, model.upperLoadThreshold()); - Assertions.assertEquals("lvqhjkbegibtnmx", model.scaleInterval()); - Assertions.assertTrue(model.useOnlyPrimaryLoad()); + Assertions.assertEquals("qzeqqkdltfzxm", model.metricName()); + Assertions.assertEquals(54.37658882164613, model.lowerLoadThreshold()); + Assertions.assertEquals(25.287367109549173, model.upperLoadThreshold()); + Assertions.assertEquals("ur", model.scaleInterval()); + Assertions.assertFalse(model.useOnlyPrimaryLoad()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AzureActiveDirectoryTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AzureActiveDirectoryTests.java index 919990524542..ab878dc41035 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AzureActiveDirectoryTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AzureActiveDirectoryTests.java @@ -11,23 +11,22 @@ public final class AzureActiveDirectoryTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AzureActiveDirectory model = BinaryData - .fromString( - "{\"tenantId\":\"nmabik\",\"clusterApplication\":\"orgjhxbldt\",\"clientApplication\":\"wrlkdmtn\"}") + AzureActiveDirectory model = BinaryData.fromString( + "{\"tenantId\":\"qidbqfatpxllrxcy\",\"clusterApplication\":\"oadsuvar\",\"clientApplication\":\"wdmjsjqbjhhyx\"}") .toObject(AzureActiveDirectory.class); - Assertions.assertEquals("nmabik", model.tenantId()); - Assertions.assertEquals("orgjhxbldt", model.clusterApplication()); - Assertions.assertEquals("wrlkdmtn", model.clientApplication()); + Assertions.assertEquals("qidbqfatpxllrxcy", model.tenantId()); + Assertions.assertEquals("oadsuvar", model.clusterApplication()); + Assertions.assertEquals("wdmjsjqbjhhyx", model.clientApplication()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureActiveDirectory model = new AzureActiveDirectory().withTenantId("nmabik") - .withClusterApplication("orgjhxbldt") - .withClientApplication("wrlkdmtn"); + AzureActiveDirectory model = new AzureActiveDirectory().withTenantId("qidbqfatpxllrxcy") + .withClusterApplication("oadsuvar") + .withClientApplication("wdmjsjqbjhhyx"); model = BinaryData.fromObject(model).toObject(AzureActiveDirectory.class); - Assertions.assertEquals("nmabik", model.tenantId()); - Assertions.assertEquals("orgjhxbldt", model.clusterApplication()); - Assertions.assertEquals("wrlkdmtn", model.clientApplication()); + Assertions.assertEquals("qidbqfatpxllrxcy", model.tenantId()); + Assertions.assertEquals("oadsuvar", model.clusterApplication()); + Assertions.assertEquals("wdmjsjqbjhhyx", model.clientApplication()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClientCertificateTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClientCertificateTests.java index 5e2459137a37..40f6024e0abd 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClientCertificateTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClientCertificateTests.java @@ -11,25 +11,26 @@ public final class ClientCertificateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ClientCertificate model = BinaryData.fromString( - "{\"isAdmin\":true,\"thumbprint\":\"iizynkedyatrwyh\",\"commonName\":\"ibzyhwitsmyp\",\"issuerThumbprint\":\"npcdpumnzgm\"}") + ClientCertificate model = BinaryData + .fromString( + "{\"isAdmin\":true,\"thumbprint\":\"yf\",\"commonName\":\"dgqggebdu\",\"issuerThumbprint\":\"g\"}") .toObject(ClientCertificate.class); Assertions.assertTrue(model.isAdmin()); - Assertions.assertEquals("iizynkedyatrwyh", model.thumbprint()); - Assertions.assertEquals("ibzyhwitsmyp", model.commonName()); - Assertions.assertEquals("npcdpumnzgm", model.issuerThumbprint()); + Assertions.assertEquals("yf", model.thumbprint()); + Assertions.assertEquals("dgqggebdu", model.commonName()); + Assertions.assertEquals("g", model.issuerThumbprint()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ClientCertificate model = new ClientCertificate().withIsAdmin(true) - .withThumbprint("iizynkedyatrwyh") - .withCommonName("ibzyhwitsmyp") - .withIssuerThumbprint("npcdpumnzgm"); + .withThumbprint("yf") + .withCommonName("dgqggebdu") + .withIssuerThumbprint("g"); model = BinaryData.fromObject(model).toObject(ClientCertificate.class); Assertions.assertTrue(model.isAdmin()); - Assertions.assertEquals("iizynkedyatrwyh", model.thumbprint()); - Assertions.assertEquals("ibzyhwitsmyp", model.commonName()); - Assertions.assertEquals("npcdpumnzgm", model.issuerThumbprint()); + Assertions.assertEquals("yf", model.thumbprint()); + Assertions.assertEquals("dgqggebdu", model.commonName()); + Assertions.assertEquals("g", model.issuerThumbprint()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterHealthPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterHealthPolicyTests.java index 7656b46f2f58..150feffd6aa5 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterHealthPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterHealthPolicyTests.java @@ -12,18 +12,18 @@ public final class ClusterHealthPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterHealthPolicy model = BinaryData - .fromString("{\"maxPercentUnhealthyNodes\":1789990861,\"maxPercentUnhealthyApplications\":155471033}") + .fromString("{\"maxPercentUnhealthyNodes\":726747953,\"maxPercentUnhealthyApplications\":576385447}") .toObject(ClusterHealthPolicy.class); - Assertions.assertEquals(1789990861, model.maxPercentUnhealthyNodes()); - Assertions.assertEquals(155471033, model.maxPercentUnhealthyApplications()); + Assertions.assertEquals(726747953, model.maxPercentUnhealthyNodes()); + Assertions.assertEquals(576385447, model.maxPercentUnhealthyApplications()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterHealthPolicy model = new ClusterHealthPolicy().withMaxPercentUnhealthyNodes(1789990861) - .withMaxPercentUnhealthyApplications(155471033); + ClusterHealthPolicy model = new ClusterHealthPolicy().withMaxPercentUnhealthyNodes(726747953) + .withMaxPercentUnhealthyApplications(576385447); model = BinaryData.fromObject(model).toObject(ClusterHealthPolicy.class); - Assertions.assertEquals(1789990861, model.maxPercentUnhealthyNodes()); - Assertions.assertEquals(155471033, model.maxPercentUnhealthyApplications()); + Assertions.assertEquals(726747953, model.maxPercentUnhealthyNodes()); + Assertions.assertEquals(576385447, model.maxPercentUnhealthyApplications()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterMonitoringPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterMonitoringPolicyTests.java index e1e9dad3d79b..59565d9b0303 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterMonitoringPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterMonitoringPolicyTests.java @@ -12,27 +12,27 @@ public final class ClusterMonitoringPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterMonitoringPolicy model = BinaryData.fromString( - "{\"healthCheckWaitDuration\":\"atklddxbjhwuaa\",\"healthCheckStableDuration\":\"oz\",\"healthCheckRetryTimeout\":\"osphyoul\",\"upgradeTimeout\":\"jrvxaglrv\",\"upgradeDomainTimeout\":\"mjwosytx\"}") + "{\"healthCheckWaitDuration\":\"uqlcvydy\",\"healthCheckStableDuration\":\"atdooaojkniod\",\"healthCheckRetryTimeout\":\"oo\",\"upgradeTimeout\":\"bw\",\"upgradeDomainTimeout\":\"ujhemmsbvdkcrodt\"}") .toObject(ClusterMonitoringPolicy.class); - Assertions.assertEquals("atklddxbjhwuaa", model.healthCheckWaitDuration()); - Assertions.assertEquals("oz", model.healthCheckStableDuration()); - Assertions.assertEquals("osphyoul", model.healthCheckRetryTimeout()); - Assertions.assertEquals("jrvxaglrv", model.upgradeTimeout()); - Assertions.assertEquals("mjwosytx", model.upgradeDomainTimeout()); + Assertions.assertEquals("uqlcvydy", model.healthCheckWaitDuration()); + Assertions.assertEquals("atdooaojkniod", model.healthCheckStableDuration()); + Assertions.assertEquals("oo", model.healthCheckRetryTimeout()); + Assertions.assertEquals("bw", model.upgradeTimeout()); + Assertions.assertEquals("ujhemmsbvdkcrodt", model.upgradeDomainTimeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterMonitoringPolicy model = new ClusterMonitoringPolicy().withHealthCheckWaitDuration("atklddxbjhwuaa") - .withHealthCheckStableDuration("oz") - .withHealthCheckRetryTimeout("osphyoul") - .withUpgradeTimeout("jrvxaglrv") - .withUpgradeDomainTimeout("mjwosytx"); + ClusterMonitoringPolicy model = new ClusterMonitoringPolicy().withHealthCheckWaitDuration("uqlcvydy") + .withHealthCheckStableDuration("atdooaojkniod") + .withHealthCheckRetryTimeout("oo") + .withUpgradeTimeout("bw") + .withUpgradeDomainTimeout("ujhemmsbvdkcrodt"); model = BinaryData.fromObject(model).toObject(ClusterMonitoringPolicy.class); - Assertions.assertEquals("atklddxbjhwuaa", model.healthCheckWaitDuration()); - Assertions.assertEquals("oz", model.healthCheckStableDuration()); - Assertions.assertEquals("osphyoul", model.healthCheckRetryTimeout()); - Assertions.assertEquals("jrvxaglrv", model.upgradeTimeout()); - Assertions.assertEquals("mjwosytx", model.upgradeDomainTimeout()); + Assertions.assertEquals("uqlcvydy", model.healthCheckWaitDuration()); + Assertions.assertEquals("atdooaojkniod", model.healthCheckStableDuration()); + Assertions.assertEquals("oo", model.healthCheckRetryTimeout()); + Assertions.assertEquals("bw", model.upgradeTimeout()); + Assertions.assertEquals("ujhemmsbvdkcrodt", model.upgradeDomainTimeout()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradeDeltaHealthPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradeDeltaHealthPolicyTests.java index 33a1b74c045a..208f438ca3ce 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradeDeltaHealthPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradeDeltaHealthPolicyTests.java @@ -12,22 +12,22 @@ public final class ClusterUpgradeDeltaHealthPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterUpgradeDeltaHealthPolicy model = BinaryData.fromString( - "{\"maxPercentDeltaUnhealthyNodes\":730394428,\"maxPercentUpgradeDomainDeltaUnhealthyNodes\":1632471353,\"maxPercentDeltaUnhealthyApplications\":1449386799}") + "{\"maxPercentDeltaUnhealthyNodes\":1464984840,\"maxPercentUpgradeDomainDeltaUnhealthyNodes\":866904084,\"maxPercentDeltaUnhealthyApplications\":966805028}") .toObject(ClusterUpgradeDeltaHealthPolicy.class); - Assertions.assertEquals(730394428, model.maxPercentDeltaUnhealthyNodes()); - Assertions.assertEquals(1632471353, model.maxPercentUpgradeDomainDeltaUnhealthyNodes()); - Assertions.assertEquals(1449386799, model.maxPercentDeltaUnhealthyApplications()); + Assertions.assertEquals(1464984840, model.maxPercentDeltaUnhealthyNodes()); + Assertions.assertEquals(866904084, model.maxPercentUpgradeDomainDeltaUnhealthyNodes()); + Assertions.assertEquals(966805028, model.maxPercentDeltaUnhealthyApplications()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ClusterUpgradeDeltaHealthPolicy model - = new ClusterUpgradeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyNodes(730394428) - .withMaxPercentUpgradeDomainDeltaUnhealthyNodes(1632471353) - .withMaxPercentDeltaUnhealthyApplications(1449386799); + = new ClusterUpgradeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyNodes(1464984840) + .withMaxPercentUpgradeDomainDeltaUnhealthyNodes(866904084) + .withMaxPercentDeltaUnhealthyApplications(966805028); model = BinaryData.fromObject(model).toObject(ClusterUpgradeDeltaHealthPolicy.class); - Assertions.assertEquals(730394428, model.maxPercentDeltaUnhealthyNodes()); - Assertions.assertEquals(1632471353, model.maxPercentUpgradeDomainDeltaUnhealthyNodes()); - Assertions.assertEquals(1449386799, model.maxPercentDeltaUnhealthyApplications()); + Assertions.assertEquals(1464984840, model.maxPercentDeltaUnhealthyNodes()); + Assertions.assertEquals(866904084, model.maxPercentUpgradeDomainDeltaUnhealthyNodes()); + Assertions.assertEquals(966805028, model.maxPercentDeltaUnhealthyApplications()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradePolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradePolicyTests.java index 52c59ba97869..86c925ce09d3 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradePolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradePolicyTests.java @@ -15,48 +15,48 @@ public final class ClusterUpgradePolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterUpgradePolicy model = BinaryData.fromString( - "{\"forceRestart\":false,\"healthPolicy\":{\"maxPercentUnhealthyNodes\":1947559864,\"maxPercentUnhealthyApplications\":2088277848},\"deltaHealthPolicy\":{\"maxPercentDeltaUnhealthyNodes\":101100234,\"maxPercentUpgradeDomainDeltaUnhealthyNodes\":972343553,\"maxPercentDeltaUnhealthyApplications\":636112442},\"monitoringPolicy\":{\"healthCheckWaitDuration\":\"gwimfn\",\"healthCheckStableDuration\":\"hfjx\",\"healthCheckRetryTimeout\":\"mszkkfo\",\"upgradeTimeout\":\"rey\",\"upgradeDomainTimeout\":\"kzikfjawneaivxwc\"},\"upgradeReplicaSetCheckTimeout\":\"lpcirelsf\"}") + "{\"forceRestart\":true,\"healthPolicy\":{\"maxPercentUnhealthyNodes\":1682881109,\"maxPercentUnhealthyApplications\":207967373},\"deltaHealthPolicy\":{\"maxPercentDeltaUnhealthyNodes\":2025880638,\"maxPercentUpgradeDomainDeltaUnhealthyNodes\":2135802257,\"maxPercentDeltaUnhealthyApplications\":1817909710},\"monitoringPolicy\":{\"healthCheckWaitDuration\":\"xtrthz\",\"healthCheckStableDuration\":\"aytdwkqbrq\",\"healthCheckRetryTimeout\":\"bpaxhexiilivpdt\",\"upgradeTimeout\":\"irqtdqoa\",\"upgradeDomainTimeout\":\"oruzfgsquyfxrxx\"},\"upgradeReplicaSetCheckTimeout\":\"ptramxj\"}") .toObject(ClusterUpgradePolicy.class); - Assertions.assertFalse(model.forceRestart()); - Assertions.assertEquals(1947559864, model.healthPolicy().maxPercentUnhealthyNodes()); - Assertions.assertEquals(2088277848, model.healthPolicy().maxPercentUnhealthyApplications()); - Assertions.assertEquals(101100234, model.deltaHealthPolicy().maxPercentDeltaUnhealthyNodes()); - Assertions.assertEquals(972343553, model.deltaHealthPolicy().maxPercentUpgradeDomainDeltaUnhealthyNodes()); - Assertions.assertEquals(636112442, model.deltaHealthPolicy().maxPercentDeltaUnhealthyApplications()); - Assertions.assertEquals("gwimfn", model.monitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("hfjx", model.monitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("mszkkfo", model.monitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("rey", model.monitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("kzikfjawneaivxwc", model.monitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals("lpcirelsf", model.upgradeReplicaSetCheckTimeout()); + Assertions.assertTrue(model.forceRestart()); + Assertions.assertEquals(1682881109, model.healthPolicy().maxPercentUnhealthyNodes()); + Assertions.assertEquals(207967373, model.healthPolicy().maxPercentUnhealthyApplications()); + Assertions.assertEquals(2025880638, model.deltaHealthPolicy().maxPercentDeltaUnhealthyNodes()); + Assertions.assertEquals(2135802257, model.deltaHealthPolicy().maxPercentUpgradeDomainDeltaUnhealthyNodes()); + Assertions.assertEquals(1817909710, model.deltaHealthPolicy().maxPercentDeltaUnhealthyApplications()); + Assertions.assertEquals("xtrthz", model.monitoringPolicy().healthCheckWaitDuration()); + Assertions.assertEquals("aytdwkqbrq", model.monitoringPolicy().healthCheckStableDuration()); + Assertions.assertEquals("bpaxhexiilivpdt", model.monitoringPolicy().healthCheckRetryTimeout()); + Assertions.assertEquals("irqtdqoa", model.monitoringPolicy().upgradeTimeout()); + Assertions.assertEquals("oruzfgsquyfxrxx", model.monitoringPolicy().upgradeDomainTimeout()); + Assertions.assertEquals("ptramxj", model.upgradeReplicaSetCheckTimeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterUpgradePolicy model = new ClusterUpgradePolicy().withForceRestart(false) - .withHealthPolicy(new ClusterHealthPolicy().withMaxPercentUnhealthyNodes(1947559864) - .withMaxPercentUnhealthyApplications(2088277848)) - .withDeltaHealthPolicy(new ClusterUpgradeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyNodes(101100234) - .withMaxPercentUpgradeDomainDeltaUnhealthyNodes(972343553) - .withMaxPercentDeltaUnhealthyApplications(636112442)) - .withMonitoringPolicy(new ClusterMonitoringPolicy().withHealthCheckWaitDuration("gwimfn") - .withHealthCheckStableDuration("hfjx") - .withHealthCheckRetryTimeout("mszkkfo") - .withUpgradeTimeout("rey") - .withUpgradeDomainTimeout("kzikfjawneaivxwc")) - .withUpgradeReplicaSetCheckTimeout("lpcirelsf"); + ClusterUpgradePolicy model = new ClusterUpgradePolicy().withForceRestart(true) + .withHealthPolicy(new ClusterHealthPolicy().withMaxPercentUnhealthyNodes(1682881109) + .withMaxPercentUnhealthyApplications(207967373)) + .withDeltaHealthPolicy(new ClusterUpgradeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyNodes(2025880638) + .withMaxPercentUpgradeDomainDeltaUnhealthyNodes(2135802257) + .withMaxPercentDeltaUnhealthyApplications(1817909710)) + .withMonitoringPolicy(new ClusterMonitoringPolicy().withHealthCheckWaitDuration("xtrthz") + .withHealthCheckStableDuration("aytdwkqbrq") + .withHealthCheckRetryTimeout("bpaxhexiilivpdt") + .withUpgradeTimeout("irqtdqoa") + .withUpgradeDomainTimeout("oruzfgsquyfxrxx")) + .withUpgradeReplicaSetCheckTimeout("ptramxj"); model = BinaryData.fromObject(model).toObject(ClusterUpgradePolicy.class); - Assertions.assertFalse(model.forceRestart()); - Assertions.assertEquals(1947559864, model.healthPolicy().maxPercentUnhealthyNodes()); - Assertions.assertEquals(2088277848, model.healthPolicy().maxPercentUnhealthyApplications()); - Assertions.assertEquals(101100234, model.deltaHealthPolicy().maxPercentDeltaUnhealthyNodes()); - Assertions.assertEquals(972343553, model.deltaHealthPolicy().maxPercentUpgradeDomainDeltaUnhealthyNodes()); - Assertions.assertEquals(636112442, model.deltaHealthPolicy().maxPercentDeltaUnhealthyApplications()); - Assertions.assertEquals("gwimfn", model.monitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("hfjx", model.monitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("mszkkfo", model.monitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("rey", model.monitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("kzikfjawneaivxwc", model.monitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals("lpcirelsf", model.upgradeReplicaSetCheckTimeout()); + Assertions.assertTrue(model.forceRestart()); + Assertions.assertEquals(1682881109, model.healthPolicy().maxPercentUnhealthyNodes()); + Assertions.assertEquals(207967373, model.healthPolicy().maxPercentUnhealthyApplications()); + Assertions.assertEquals(2025880638, model.deltaHealthPolicy().maxPercentDeltaUnhealthyNodes()); + Assertions.assertEquals(2135802257, model.deltaHealthPolicy().maxPercentUpgradeDomainDeltaUnhealthyNodes()); + Assertions.assertEquals(1817909710, model.deltaHealthPolicy().maxPercentDeltaUnhealthyApplications()); + Assertions.assertEquals("xtrthz", model.monitoringPolicy().healthCheckWaitDuration()); + Assertions.assertEquals("aytdwkqbrq", model.monitoringPolicy().healthCheckStableDuration()); + Assertions.assertEquals("bpaxhexiilivpdt", model.monitoringPolicy().healthCheckRetryTimeout()); + Assertions.assertEquals("irqtdqoa", model.monitoringPolicy().upgradeTimeout()); + Assertions.assertEquals("oruzfgsquyfxrxx", model.monitoringPolicy().upgradeDomainTimeout()); + Assertions.assertEquals("ptramxj", model.upgradeReplicaSetCheckTimeout()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/EndpointRangeDescriptionTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/EndpointRangeDescriptionTests.java index 1d65e5c647c6..c1ab1019a891 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/EndpointRangeDescriptionTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/EndpointRangeDescriptionTests.java @@ -11,17 +11,18 @@ public final class EndpointRangeDescriptionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EndpointRangeDescription model = BinaryData.fromString("{\"startPort\":988966310,\"endPort\":485732763}") + EndpointRangeDescription model = BinaryData.fromString("{\"startPort\":1437302517,\"endPort\":2035857816}") .toObject(EndpointRangeDescription.class); - Assertions.assertEquals(988966310, model.startPort()); - Assertions.assertEquals(485732763, model.endPort()); + Assertions.assertEquals(1437302517, model.startPort()); + Assertions.assertEquals(2035857816, model.endPort()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EndpointRangeDescription model = new EndpointRangeDescription().withStartPort(988966310).withEndPort(485732763); + EndpointRangeDescription model + = new EndpointRangeDescription().withStartPort(1437302517).withEndPort(2035857816); model = BinaryData.fromObject(model).toObject(EndpointRangeDescription.class); - Assertions.assertEquals(988966310, model.startPort()); - Assertions.assertEquals(485732763, model.endPort()); + Assertions.assertEquals(1437302517, model.startPort()); + Assertions.assertEquals(2035857816, model.endPort()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationConstraintsTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationConstraintsTests.java index 8b7dcbcdf198..211cf70bb66b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationConstraintsTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationConstraintsTests.java @@ -12,16 +12,16 @@ public final class FaultSimulationConstraintsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FaultSimulationConstraints model = BinaryData.fromString("{\"expirationTime\":\"2021-11-21T09:22:46Z\"}") + FaultSimulationConstraints model = BinaryData.fromString("{\"expirationTime\":\"2021-08-26T13:15:20Z\"}") .toObject(FaultSimulationConstraints.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-21T09:22:46Z"), model.expirationTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-26T13:15:20Z"), model.expirationTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FaultSimulationConstraints model - = new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-11-21T09:22:46Z")); + = new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-08-26T13:15:20Z")); model = BinaryData.fromObject(model).toObject(FaultSimulationConstraints.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-21T09:22:46Z"), model.expirationTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-26T13:15:20Z"), model.expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentTests.java index f8e363e8d98e..58305196fedd 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentTests.java @@ -14,19 +14,19 @@ public final class FaultSimulationContentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FaultSimulationContent model = BinaryData.fromString( - "{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-06-09T08:03:32Z\"}}") + "{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-12-03T02:45:56Z\"}}") .toObject(FaultSimulationContent.class); Assertions.assertTrue(model.force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T08:03:32Z"), model.constraints().expirationTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T02:45:56Z"), model.constraints().expirationTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FaultSimulationContent model = new FaultSimulationContent().withForce(true) .withConstraints( - new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-06-09T08:03:32Z"))); + new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-12-03T02:45:56Z"))); model = BinaryData.fromObject(model).toObject(FaultSimulationContent.class); Assertions.assertTrue(model.force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T08:03:32Z"), model.constraints().expirationTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T02:45:56Z"), model.constraints().expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentWrapperTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentWrapperTests.java index 6cade38cf395..695b02bba346 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentWrapperTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentWrapperTests.java @@ -15,22 +15,22 @@ public final class FaultSimulationContentWrapperTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FaultSimulationContentWrapper model = BinaryData.fromString( - "{\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-03-04T19:19:07Z\"}}}") + "{\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-08-04T06:20:25Z\"}}}") .toObject(FaultSimulationContentWrapper.class); - Assertions.assertFalse(model.parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T19:19:07Z"), + Assertions.assertTrue(model.parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-04T06:20:25Z"), model.parameters().constraints().expirationTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FaultSimulationContentWrapper model - = new FaultSimulationContentWrapper().withParameters(new FaultSimulationContent().withForce(false) + = new FaultSimulationContentWrapper().withParameters(new FaultSimulationContent().withForce(true) .withConstraints( - new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-03-04T19:19:07Z")))); + new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-08-04T06:20:25Z")))); model = BinaryData.fromObject(model).toObject(FaultSimulationContentWrapper.class); - Assertions.assertFalse(model.parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T19:19:07Z"), + Assertions.assertTrue(model.parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-04T06:20:25Z"), model.parameters().constraints().expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationDetailsTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationDetailsTests.java index ae81bd80ee76..f830d45a4785 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationDetailsTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationDetailsTests.java @@ -15,16 +15,16 @@ public final class FaultSimulationDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FaultSimulationDetails model = BinaryData.fromString( - "{\"clusterId\":\"thzvaytdwkqbrqu\",\"operationId\":\"axhexiilivp\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"r\",\"status\":\"Done\",\"operationId\":\"oaxoruzfgsqu\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"xxle\",\"status\":\"Done\",\"operationId\":\"mxjezwlw\",\"operationStatus\":\"Succeeded\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-10-02T16:07:13Z\"}}}") + "{\"clusterId\":\"wabm\",\"operationId\":\"efkifr\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"qujmqlgkf\",\"status\":\"StopFailed\",\"operationId\":\"oaongbjc\",\"operationStatus\":\"Failed\"},{\"nodeTypeName\":\"i\",\"status\":\"Stopping\",\"operationId\":\"df\",\"operationStatus\":\"Created\"},{\"nodeTypeName\":\"ezkojvdcp\",\"status\":\"Active\",\"operationId\":\"ouicybxarzgszu\",\"operationStatus\":\"Created\"},{\"nodeTypeName\":\"iqopidoamciod\",\"status\":\"Starting\",\"operationId\":\"zxkhnzbonlwnto\",\"operationStatus\":\"Aborted\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-09-24T01:53:24Z\"}}}") .toObject(FaultSimulationDetails.class); - Assertions.assertEquals("thzvaytdwkqbrqu", model.clusterId()); - Assertions.assertEquals("axhexiilivp", model.operationId()); - Assertions.assertEquals("r", model.nodeTypeFaultSimulation().get(0).nodeTypeName()); - Assertions.assertEquals(FaultSimulationStatus.DONE, model.nodeTypeFaultSimulation().get(0).status()); - Assertions.assertEquals("oaxoruzfgsqu", model.nodeTypeFaultSimulation().get(0).operationId()); - Assertions.assertEquals(SfmcOperationStatus.STARTED, model.nodeTypeFaultSimulation().get(0).operationStatus()); + Assertions.assertEquals("wabm", model.clusterId()); + Assertions.assertEquals("efkifr", model.operationId()); + Assertions.assertEquals("qujmqlgkf", model.nodeTypeFaultSimulation().get(0).nodeTypeName()); + Assertions.assertEquals(FaultSimulationStatus.STOP_FAILED, model.nodeTypeFaultSimulation().get(0).status()); + Assertions.assertEquals("oaongbjc", model.nodeTypeFaultSimulation().get(0).operationId()); + Assertions.assertEquals(SfmcOperationStatus.FAILED, model.nodeTypeFaultSimulation().get(0).operationStatus()); Assertions.assertFalse(model.parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-02T16:07:13Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-24T01:53:24Z"), model.parameters().constraints().expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationIdContentTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationIdContentTests.java index 043d065d31f7..03657107ddfa 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationIdContentTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationIdContentTests.java @@ -12,14 +12,14 @@ public final class FaultSimulationIdContentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FaultSimulationIdContent model - = BinaryData.fromString("{\"simulationId\":\"dgssofwqmzqal\"}").toObject(FaultSimulationIdContent.class); - Assertions.assertEquals("dgssofwqmzqal", model.simulationId()); + = BinaryData.fromString("{\"simulationId\":\"yhmlwpaztzp\"}").toObject(FaultSimulationIdContent.class); + Assertions.assertEquals("yhmlwpaztzp", model.simulationId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FaultSimulationIdContent model = new FaultSimulationIdContent().withSimulationId("dgssofwqmzqal"); + FaultSimulationIdContent model = new FaultSimulationIdContent().withSimulationId("yhmlwpaztzp"); model = BinaryData.fromObject(model).toObject(FaultSimulationIdContent.class); - Assertions.assertEquals("dgssofwqmzqal", model.simulationId()); + Assertions.assertEquals("yhmlwpaztzp", model.simulationId()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationInnerTests.java index fe208875607b..96c61a7b632a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationInnerTests.java @@ -15,22 +15,21 @@ public final class FaultSimulationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FaultSimulationInner model = BinaryData.fromString( - "{\"simulationId\":\"mnjijpxacqqudf\",\"status\":\"Active\",\"startTime\":\"2021-06-13T18:20:41Z\",\"endTime\":\"2021-01-28T01:39:16Z\",\"details\":{\"clusterId\":\"jyvayffimrzrtuz\",\"operationId\":\"gsexne\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"wnwmewzs\",\"status\":\"Starting\",\"operationId\":\"uzsoi\",\"operationStatus\":\"Failed\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-08-16T07:42:29Z\"}}}}") + "{\"simulationId\":\"ncckw\",\"status\":\"Active\",\"startTime\":\"2021-06-29T06:08:24Z\",\"endTime\":\"2021-07-28T19:48:05Z\",\"details\":{\"clusterId\":\"uyqaxzfeqztppr\",\"operationId\":\"lxorjaltolmncws\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"csdbnwdcfhuc\",\"status\":\"Done\",\"operationId\":\"uvglsbjjcanvx\",\"operationStatus\":\"Canceled\"},{\"nodeTypeName\":\"udutnco\",\"status\":\"Stopping\",\"operationId\":\"xqtvcofu\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"kgjubgdknnqvsazn\",\"status\":\"Active\",\"operationId\":\"rudsg\",\"operationStatus\":\"Aborted\"},{\"nodeTypeName\":\"kycgrauwj\",\"status\":\"Starting\",\"operationId\":\"eburu\",\"operationStatus\":\"Canceled\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-06-02T15:45:41Z\"}}}}") .toObject(FaultSimulationInner.class); - Assertions.assertEquals("mnjijpxacqqudf", model.simulationId()); + Assertions.assertEquals("ncckw", model.simulationId()); Assertions.assertEquals(FaultSimulationStatus.ACTIVE, model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-13T18:20:41Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-28T01:39:16Z"), model.endTime()); - Assertions.assertEquals("jyvayffimrzrtuz", model.details().clusterId()); - Assertions.assertEquals("gsexne", model.details().operationId()); - Assertions.assertEquals("wnwmewzs", model.details().nodeTypeFaultSimulation().get(0).nodeTypeName()); - Assertions.assertEquals(FaultSimulationStatus.STARTING, - model.details().nodeTypeFaultSimulation().get(0).status()); - Assertions.assertEquals("uzsoi", model.details().nodeTypeFaultSimulation().get(0).operationId()); - Assertions.assertEquals(SfmcOperationStatus.FAILED, + Assertions.assertEquals(OffsetDateTime.parse("2021-06-29T06:08:24Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-28T19:48:05Z"), model.endTime()); + Assertions.assertEquals("uyqaxzfeqztppr", model.details().clusterId()); + Assertions.assertEquals("lxorjaltolmncws", model.details().operationId()); + Assertions.assertEquals("csdbnwdcfhuc", model.details().nodeTypeFaultSimulation().get(0).nodeTypeName()); + Assertions.assertEquals(FaultSimulationStatus.DONE, model.details().nodeTypeFaultSimulation().get(0).status()); + Assertions.assertEquals("uvglsbjjcanvx", model.details().nodeTypeFaultSimulation().get(0).operationId()); + Assertions.assertEquals(SfmcOperationStatus.CANCELED, model.details().nodeTypeFaultSimulation().get(0).operationStatus()); - Assertions.assertTrue(model.details().parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-16T07:42:29Z"), + Assertions.assertFalse(model.details().parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-02T15:45:41Z"), model.details().parameters().constraints().expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationListResultTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationListResultTests.java index b45334bbd7e2..71f177d1915d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationListResultTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationListResultTests.java @@ -15,23 +15,25 @@ public final class FaultSimulationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FaultSimulationListResult model = BinaryData.fromString( - "{\"value\":[{\"simulationId\":\"pulpqblylsyxk\",\"status\":\"StopFailed\",\"startTime\":\"2021-09-15T07:03:18Z\",\"endTime\":\"2021-04-06T04:34:54Z\",\"details\":{\"clusterId\":\"iagxsdszuempsbz\",\"operationId\":\"z\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"pnqi\",\"status\":\"Active\",\"operationId\":\"v\",\"operationStatus\":\"Failed\"},{\"nodeTypeName\":\"dxrbuukzcle\",\"status\":\"StartFailed\",\"operationId\":\"lw\",\"operationStatus\":\"Succeeded\"},{\"nodeTypeName\":\"zpof\",\"status\":\"Stopping\",\"operationId\":\"wyfzqwhxxbuyqa\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"qztpp\",\"status\":\"Stopping\",\"operationId\":\"xorjaltolmncwsob\",\"operationStatus\":\"Created\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-09-05T19:42:48Z\"}}}},{\"simulationId\":\"fhucqdpfuv\",\"status\":\"Done\",\"startTime\":\"2021-09-06T08:21:41Z\",\"endTime\":\"2021-05-13T14:00:03Z\",\"details\":{\"clusterId\":\"vxb\",\"operationId\":\"vudutncor\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"qtvcofudflvkgj\",\"status\":\"Done\",\"operationId\":\"knnqvsaznq\",\"operationStatus\":\"Failed\"},{\"nodeTypeName\":\"udsgs\",\"status\":\"Done\",\"operationId\":\"yc\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"wjue\",\"status\":\"StartFailed\",\"operationId\":\"uruv\",\"operationStatus\":\"Aborted\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2020-12-25T04:12:31Z\"}}}}],\"nextLink\":\"ab\"}") + "{\"value\":[{\"simulationId\":\"wyznkbyku\",\"status\":\"StartFailed\",\"startTime\":\"2021-12-03T17:47:47Z\",\"endTime\":\"2021-10-22T08:31:17Z\",\"details\":{\"clusterId\":\"hrskdsnfd\",\"operationId\":\"oakgtdlmkkzev\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"wpusdsttwvogv\",\"status\":\"Done\",\"operationId\":\"dcngqqmoakufgmj\",\"operationStatus\":\"Canceled\"},{\"nodeTypeName\":\"dgrtwaenuuzkopbm\",\"status\":\"Active\",\"operationId\":\"dwoyuhhziuiefoz\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"smlmzqhoftrm\",\"status\":\"Starting\",\"operationId\":\"iahxicsl\",\"operationStatus\":\"Succeeded\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-04-23T06:55:46Z\"}}}},{\"simulationId\":\"halns\",\"status\":\"Done\",\"startTime\":\"2021-07-18T12:17:06Z\",\"endTime\":\"2021-10-17T19:05:13Z\",\"details\":{\"clusterId\":\"ivwitqscywugg\",\"operationId\":\"luhczbw\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"i\",\"status\":\"Starting\",\"operationId\":\"gzd\",\"operationStatus\":\"Succeeded\"},{\"nodeTypeName\":\"eypqwdxggicccn\",\"status\":\"Starting\",\"operationId\":\"exmk\",\"operationStatus\":\"Failed\"},{\"nodeTypeName\":\"tvlz\",\"status\":\"Starting\",\"operationId\":\"hz\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"dtclusiypb\",\"status\":\"Done\",\"operationId\":\"tg\",\"operationStatus\":\"Created\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-06-12T00:27:16Z\"}}}}],\"nextLink\":\"qukyhejhzi\"}") .toObject(FaultSimulationListResult.class); - Assertions.assertEquals("pulpqblylsyxk", model.value().get(0).simulationId()); - Assertions.assertEquals(FaultSimulationStatus.STOP_FAILED, model.value().get(0).status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-15T07:03:18Z"), model.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T04:34:54Z"), model.value().get(0).endTime()); - Assertions.assertEquals("iagxsdszuempsbz", model.value().get(0).details().clusterId()); - Assertions.assertEquals("z", model.value().get(0).details().operationId()); - Assertions.assertEquals("pnqi", model.value().get(0).details().nodeTypeFaultSimulation().get(0).nodeTypeName()); - Assertions.assertEquals(FaultSimulationStatus.ACTIVE, + Assertions.assertEquals("wyznkbyku", model.value().get(0).simulationId()); + Assertions.assertEquals(FaultSimulationStatus.START_FAILED, model.value().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T17:47:47Z"), model.value().get(0).startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-22T08:31:17Z"), model.value().get(0).endTime()); + Assertions.assertEquals("hrskdsnfd", model.value().get(0).details().clusterId()); + Assertions.assertEquals("oakgtdlmkkzev", model.value().get(0).details().operationId()); + Assertions.assertEquals("wpusdsttwvogv", + model.value().get(0).details().nodeTypeFaultSimulation().get(0).nodeTypeName()); + Assertions.assertEquals(FaultSimulationStatus.DONE, model.value().get(0).details().nodeTypeFaultSimulation().get(0).status()); - Assertions.assertEquals("v", model.value().get(0).details().nodeTypeFaultSimulation().get(0).operationId()); - Assertions.assertEquals(SfmcOperationStatus.FAILED, + Assertions.assertEquals("dcngqqmoakufgmj", + model.value().get(0).details().nodeTypeFaultSimulation().get(0).operationId()); + Assertions.assertEquals(SfmcOperationStatus.CANCELED, model.value().get(0).details().nodeTypeFaultSimulation().get(0).operationStatus()); - Assertions.assertFalse(model.value().get(0).details().parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T19:42:48Z"), + Assertions.assertTrue(model.value().get(0).details().parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-23T06:55:46Z"), model.value().get(0).details().parameters().constraints().expirationTime()); - Assertions.assertEquals("ab", model.nextLink()); + Assertions.assertEquals("qukyhejhzi", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FrontendConfigurationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FrontendConfigurationTests.java index b9172dbbdfc3..68f15dd01dd1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FrontendConfigurationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FrontendConfigurationTests.java @@ -13,24 +13,24 @@ public final class FrontendConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FrontendConfiguration model = BinaryData.fromString( - "{\"ipAddressType\":\"IPv4\",\"loadBalancerBackendAddressPoolId\":\"irryuzhlh\",\"loadBalancerInboundNatPoolId\":\"oqrvqqaatjin\",\"applicationGatewayBackendAddressPoolId\":\"goupmfiibfg\"}") + "{\"ipAddressType\":\"IPv6\",\"loadBalancerBackendAddressPoolId\":\"coolsttpkiwkkb\",\"loadBalancerInboundNatPoolId\":\"jrywvtylbfpnc\",\"applicationGatewayBackendAddressPoolId\":\"doiwi\"}") .toObject(FrontendConfiguration.class); - Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); - Assertions.assertEquals("irryuzhlh", model.loadBalancerBackendAddressPoolId()); - Assertions.assertEquals("oqrvqqaatjin", model.loadBalancerInboundNatPoolId()); - Assertions.assertEquals("goupmfiibfg", model.applicationGatewayBackendAddressPoolId()); + Assertions.assertEquals(IpAddressType.IPV6, model.ipAddressType()); + Assertions.assertEquals("coolsttpkiwkkb", model.loadBalancerBackendAddressPoolId()); + Assertions.assertEquals("jrywvtylbfpnc", model.loadBalancerInboundNatPoolId()); + Assertions.assertEquals("doiwi", model.applicationGatewayBackendAddressPoolId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FrontendConfiguration model = new FrontendConfiguration().withIpAddressType(IpAddressType.IPV4) - .withLoadBalancerBackendAddressPoolId("irryuzhlh") - .withLoadBalancerInboundNatPoolId("oqrvqqaatjin") - .withApplicationGatewayBackendAddressPoolId("goupmfiibfg"); + FrontendConfiguration model = new FrontendConfiguration().withIpAddressType(IpAddressType.IPV6) + .withLoadBalancerBackendAddressPoolId("coolsttpkiwkkb") + .withLoadBalancerInboundNatPoolId("jrywvtylbfpnc") + .withApplicationGatewayBackendAddressPoolId("doiwi"); model = BinaryData.fromObject(model).toObject(FrontendConfiguration.class); - Assertions.assertEquals(IpAddressType.IPV4, model.ipAddressType()); - Assertions.assertEquals("irryuzhlh", model.loadBalancerBackendAddressPoolId()); - Assertions.assertEquals("oqrvqqaatjin", model.loadBalancerInboundNatPoolId()); - Assertions.assertEquals("goupmfiibfg", model.applicationGatewayBackendAddressPoolId()); + Assertions.assertEquals(IpAddressType.IPV6, model.ipAddressType()); + Assertions.assertEquals("coolsttpkiwkkb", model.loadBalancerBackendAddressPoolId()); + Assertions.assertEquals("jrywvtylbfpnc", model.loadBalancerInboundNatPoolId()); + Assertions.assertEquals("doiwi", model.applicationGatewayBackendAddressPoolId()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationPublicIpAddressConfigurationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationPublicIpAddressConfigurationTests.java index 93089db9bf1f..5876b41420df 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationPublicIpAddressConfigurationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationPublicIpAddressConfigurationTests.java @@ -15,27 +15,24 @@ public final class IpConfigurationPublicIpAddressConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpConfigurationPublicIpAddressConfiguration model = BinaryData.fromString( - "{\"name\":\"hxjbdhqxvc\",\"ipTags\":[{\"ipTagType\":\"rpdsof\",\"tag\":\"shrnsvbuswdvz\"},{\"ipTagType\":\"ybycnunvj\",\"tag\":\"rtkfawnopq\"},{\"ipTagType\":\"ikyzirtxdy\",\"tag\":\"x\"},{\"ipTagType\":\"ejnt\",\"tag\":\"sewgioilqukr\"}],\"publicIPAddressVersion\":\"IPv6\"}") + "{\"name\":\"lvtno\",\"ipTags\":[{\"ipTagType\":\"zgemjdftuljlt\",\"tag\":\"ucea\"}],\"publicIPAddressVersion\":\"IPv4\"}") .toObject(IpConfigurationPublicIpAddressConfiguration.class); - Assertions.assertEquals("hxjbdhqxvc", model.name()); - Assertions.assertEquals("rpdsof", model.ipTags().get(0).ipTagType()); - Assertions.assertEquals("shrnsvbuswdvz", model.ipTags().get(0).tag()); - Assertions.assertEquals(PublicIpAddressVersion.IPV6, model.publicIpAddressVersion()); + Assertions.assertEquals("lvtno", model.name()); + Assertions.assertEquals("zgemjdftuljlt", model.ipTags().get(0).ipTagType()); + Assertions.assertEquals("ucea", model.ipTags().get(0).tag()); + Assertions.assertEquals(PublicIpAddressVersion.IPV4, model.publicIpAddressVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { IpConfigurationPublicIpAddressConfiguration model - = new IpConfigurationPublicIpAddressConfiguration().withName("hxjbdhqxvc") - .withIpTags(Arrays.asList(new IpTag().withIpTagType("rpdsof").withTag("shrnsvbuswdvz"), - new IpTag().withIpTagType("ybycnunvj").withTag("rtkfawnopq"), - new IpTag().withIpTagType("ikyzirtxdy").withTag("x"), - new IpTag().withIpTagType("ejnt").withTag("sewgioilqukr"))) - .withPublicIpAddressVersion(PublicIpAddressVersion.IPV6); + = new IpConfigurationPublicIpAddressConfiguration().withName("lvtno") + .withIpTags(Arrays.asList(new IpTag().withIpTagType("zgemjdftuljlt").withTag("ucea"))) + .withPublicIpAddressVersion(PublicIpAddressVersion.IPV4); model = BinaryData.fromObject(model).toObject(IpConfigurationPublicIpAddressConfiguration.class); - Assertions.assertEquals("hxjbdhqxvc", model.name()); - Assertions.assertEquals("rpdsof", model.ipTags().get(0).ipTagType()); - Assertions.assertEquals("shrnsvbuswdvz", model.ipTags().get(0).tag()); - Assertions.assertEquals(PublicIpAddressVersion.IPV6, model.publicIpAddressVersion()); + Assertions.assertEquals("lvtno", model.name()); + Assertions.assertEquals("zgemjdftuljlt", model.ipTags().get(0).ipTagType()); + Assertions.assertEquals("ucea", model.ipTags().get(0).tag()); + Assertions.assertEquals(PublicIpAddressVersion.IPV4, model.publicIpAddressVersion()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationTests.java index 4c1ae2e16290..17207f13648d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationTests.java @@ -18,51 +18,46 @@ public final class IpConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpConfiguration model = BinaryData.fromString( - "{\"name\":\"coolsttpkiwkkb\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"ywvtylbfpnc\"},{\"id\":\"doiwi\"},{\"id\":\"htywubxcbihwq\"},{\"id\":\"fdntwjchrdgoih\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"ctondz\"},{\"id\":\"uu\"},{\"id\":\"dlwggytsbwtovv\"},{\"id\":\"seinqfiuf\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"pirgnepttwq\"},{\"id\":\"niffcdmqnroj\"},{\"id\":\"ijnkrxfrdd\"},{\"id\":\"ratiz\"}],\"subnet\":{\"id\":\"nasx\"},\"privateIPAddressVersion\":\"IPv6\",\"publicIPAddressConfiguration\":{\"name\":\"zq\",\"ipTags\":[{\"ipTagType\":\"f\",\"tag\":\"wesgogczh\"},{\"ipTagType\":\"nnxk\",\"tag\":\"lgnyhmo\"},{\"ipTagType\":\"sxkkg\",\"tag\":\"h\"}],\"publicIPAddressVersion\":\"IPv4\"}}") + "{\"name\":\"n\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"sx\"},{\"id\":\"foimwkslircizjxv\"},{\"id\":\"fceacvlhvygd\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"mrtwna\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"biwkojgcyzt\"}],\"subnet\":{\"id\":\"z\"},\"privateIPAddressVersion\":\"IPv6\",\"publicIPAddressConfiguration\":{\"name\":\"qphchqnrnrpxehuw\",\"ipTags\":[{\"ipTagType\":\"qgaifmviklbydv\",\"tag\":\"hbejdznxcvdsrhnj\"}],\"publicIPAddressVersion\":\"IPv6\"}}") .toObject(IpConfiguration.class); - Assertions.assertEquals("coolsttpkiwkkb", model.name()); - Assertions.assertEquals("ywvtylbfpnc", model.applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("ctondz", model.loadBalancerBackendAddressPools().get(0).id()); - Assertions.assertEquals("pirgnepttwq", model.loadBalancerInboundNatPools().get(0).id()); - Assertions.assertEquals("nasx", model.subnet().id()); + Assertions.assertEquals("n", model.name()); + Assertions.assertEquals("sx", model.applicationGatewayBackendAddressPools().get(0).id()); + Assertions.assertEquals("mrtwna", model.loadBalancerBackendAddressPools().get(0).id()); + Assertions.assertEquals("biwkojgcyzt", model.loadBalancerInboundNatPools().get(0).id()); + Assertions.assertEquals("z", model.subnet().id()); Assertions.assertEquals(PrivateIpAddressVersion.IPV6, model.privateIpAddressVersion()); - Assertions.assertEquals("zq", model.publicIpAddressConfiguration().name()); - Assertions.assertEquals("f", model.publicIpAddressConfiguration().ipTags().get(0).ipTagType()); - Assertions.assertEquals("wesgogczh", model.publicIpAddressConfiguration().ipTags().get(0).tag()); - Assertions.assertEquals(PublicIpAddressVersion.IPV4, + Assertions.assertEquals("qphchqnrnrpxehuw", model.publicIpAddressConfiguration().name()); + Assertions.assertEquals("qgaifmviklbydv", model.publicIpAddressConfiguration().ipTags().get(0).ipTagType()); + Assertions.assertEquals("hbejdznxcvdsrhnj", model.publicIpAddressConfiguration().ipTags().get(0).tag()); + Assertions.assertEquals(PublicIpAddressVersion.IPV6, model.publicIpAddressConfiguration().publicIpAddressVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpConfiguration model = new IpConfiguration().withName("coolsttpkiwkkb") - .withApplicationGatewayBackendAddressPools( - Arrays.asList(new SubResource().withId("ywvtylbfpnc"), new SubResource().withId("doiwi"), - new SubResource().withId("htywubxcbihwq"), new SubResource().withId("fdntwjchrdgoih"))) - .withLoadBalancerBackendAddressPools( - Arrays.asList(new SubResource().withId("ctondz"), new SubResource().withId("uu"), - new SubResource().withId("dlwggytsbwtovv"), new SubResource().withId("seinqfiuf"))) - .withLoadBalancerInboundNatPools( - Arrays.asList(new SubResource().withId("pirgnepttwq"), new SubResource().withId("niffcdmqnroj"), - new SubResource().withId("ijnkrxfrdd"), new SubResource().withId("ratiz"))) - .withSubnet(new SubResource().withId("nasx")) - .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV6) - .withPublicIpAddressConfiguration(new IpConfigurationPublicIpAddressConfiguration().withName("zq") - .withIpTags(Arrays.asList(new IpTag().withIpTagType("f").withTag("wesgogczh"), - new IpTag().withIpTagType("nnxk").withTag("lgnyhmo"), - new IpTag().withIpTagType("sxkkg").withTag("h"))) - .withPublicIpAddressVersion(PublicIpAddressVersion.IPV4)); + IpConfiguration model + = new IpConfiguration().withName("n") + .withApplicationGatewayBackendAddressPools(Arrays.asList(new SubResource().withId("sx"), + new SubResource().withId("foimwkslircizjxv"), new SubResource().withId("fceacvlhvygd"))) + .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource().withId("mrtwna"))) + .withLoadBalancerInboundNatPools(Arrays.asList(new SubResource().withId("biwkojgcyzt"))) + .withSubnet(new SubResource().withId("z")) + .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV6) + .withPublicIpAddressConfiguration(new IpConfigurationPublicIpAddressConfiguration() + .withName("qphchqnrnrpxehuw") + .withIpTags(Arrays.asList(new IpTag().withIpTagType("qgaifmviklbydv").withTag("hbejdznxcvdsrhnj"))) + .withPublicIpAddressVersion(PublicIpAddressVersion.IPV6)); model = BinaryData.fromObject(model).toObject(IpConfiguration.class); - Assertions.assertEquals("coolsttpkiwkkb", model.name()); - Assertions.assertEquals("ywvtylbfpnc", model.applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("ctondz", model.loadBalancerBackendAddressPools().get(0).id()); - Assertions.assertEquals("pirgnepttwq", model.loadBalancerInboundNatPools().get(0).id()); - Assertions.assertEquals("nasx", model.subnet().id()); + Assertions.assertEquals("n", model.name()); + Assertions.assertEquals("sx", model.applicationGatewayBackendAddressPools().get(0).id()); + Assertions.assertEquals("mrtwna", model.loadBalancerBackendAddressPools().get(0).id()); + Assertions.assertEquals("biwkojgcyzt", model.loadBalancerInboundNatPools().get(0).id()); + Assertions.assertEquals("z", model.subnet().id()); Assertions.assertEquals(PrivateIpAddressVersion.IPV6, model.privateIpAddressVersion()); - Assertions.assertEquals("zq", model.publicIpAddressConfiguration().name()); - Assertions.assertEquals("f", model.publicIpAddressConfiguration().ipTags().get(0).ipTagType()); - Assertions.assertEquals("wesgogczh", model.publicIpAddressConfiguration().ipTags().get(0).tag()); - Assertions.assertEquals(PublicIpAddressVersion.IPV4, + Assertions.assertEquals("qphchqnrnrpxehuw", model.publicIpAddressConfiguration().name()); + Assertions.assertEquals("qgaifmviklbydv", model.publicIpAddressConfiguration().ipTags().get(0).ipTagType()); + Assertions.assertEquals("hbejdznxcvdsrhnj", model.publicIpAddressConfiguration().ipTags().get(0).tag()); + Assertions.assertEquals(PublicIpAddressVersion.IPV6, model.publicIpAddressConfiguration().publicIpAddressVersion()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpTagTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpTagTests.java index aa45f125be32..f1459b10b099 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpTagTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpTagTests.java @@ -11,16 +11,16 @@ public final class IpTagTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IpTag model = BinaryData.fromString("{\"ipTagType\":\"vc\",\"tag\":\"ayrhyrnx\"}").toObject(IpTag.class); - Assertions.assertEquals("vc", model.ipTagType()); - Assertions.assertEquals("ayrhyrnx", model.tag()); + IpTag model = BinaryData.fromString("{\"ipTagType\":\"beddgssofw\",\"tag\":\"mzqa\"}").toObject(IpTag.class); + Assertions.assertEquals("beddgssofw", model.ipTagType()); + Assertions.assertEquals("mzqa", model.tag()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpTag model = new IpTag().withIpTagType("vc").withTag("ayrhyrnx"); + IpTag model = new IpTag().withIpTagType("beddgssofw").withTag("mzqa"); model = BinaryData.fromObject(model).toObject(IpTag.class); - Assertions.assertEquals("vc", model.ipTagType()); - Assertions.assertEquals("ayrhyrnx", model.tag()); + Assertions.assertEquals("beddgssofw", model.ipTagType()); + Assertions.assertEquals("mzqa", model.tag()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/LoadBalancingRuleTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/LoadBalancingRuleTests.java index 4688c4a77e2b..e2987115a359 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/LoadBalancingRuleTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/LoadBalancingRuleTests.java @@ -14,33 +14,33 @@ public final class LoadBalancingRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LoadBalancingRule model = BinaryData.fromString( - "{\"frontendPort\":929911976,\"backendPort\":1475911208,\"protocol\":\"tcp\",\"probePort\":161159064,\"probeProtocol\":\"https\",\"probeRequestPath\":\"utauv\",\"loadDistribution\":\"tkuwhhmhykojo\"}") + "{\"frontendPort\":772691250,\"backendPort\":1695810733,\"protocol\":\"udp\",\"probePort\":976430532,\"probeProtocol\":\"http\",\"probeRequestPath\":\"tfudxepx\",\"loadDistribution\":\"qagvrvm\"}") .toObject(LoadBalancingRule.class); - Assertions.assertEquals(929911976, model.frontendPort()); - Assertions.assertEquals(1475911208, model.backendPort()); - Assertions.assertEquals(Protocol.TCP, model.protocol()); - Assertions.assertEquals(161159064, model.probePort()); - Assertions.assertEquals(ProbeProtocol.HTTPS, model.probeProtocol()); - Assertions.assertEquals("utauv", model.probeRequestPath()); - Assertions.assertEquals("tkuwhhmhykojo", model.loadDistribution()); + Assertions.assertEquals(772691250, model.frontendPort()); + Assertions.assertEquals(1695810733, model.backendPort()); + Assertions.assertEquals(Protocol.UDP, model.protocol()); + Assertions.assertEquals(976430532, model.probePort()); + Assertions.assertEquals(ProbeProtocol.HTTP, model.probeProtocol()); + Assertions.assertEquals("tfudxepx", model.probeRequestPath()); + Assertions.assertEquals("qagvrvm", model.loadDistribution()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LoadBalancingRule model = new LoadBalancingRule().withFrontendPort(929911976) - .withBackendPort(1475911208) - .withProtocol(Protocol.TCP) - .withProbePort(161159064) - .withProbeProtocol(ProbeProtocol.HTTPS) - .withProbeRequestPath("utauv") - .withLoadDistribution("tkuwhhmhykojo"); + LoadBalancingRule model = new LoadBalancingRule().withFrontendPort(772691250) + .withBackendPort(1695810733) + .withProtocol(Protocol.UDP) + .withProbePort(976430532) + .withProbeProtocol(ProbeProtocol.HTTP) + .withProbeRequestPath("tfudxepx") + .withLoadDistribution("qagvrvm"); model = BinaryData.fromObject(model).toObject(LoadBalancingRule.class); - Assertions.assertEquals(929911976, model.frontendPort()); - Assertions.assertEquals(1475911208, model.backendPort()); - Assertions.assertEquals(Protocol.TCP, model.protocol()); - Assertions.assertEquals(161159064, model.probePort()); - Assertions.assertEquals(ProbeProtocol.HTTPS, model.probeProtocol()); - Assertions.assertEquals("utauv", model.probeRequestPath()); - Assertions.assertEquals("tkuwhhmhykojo", model.loadDistribution()); + Assertions.assertEquals(772691250, model.frontendPort()); + Assertions.assertEquals(1695810733, model.backendPort()); + Assertions.assertEquals(Protocol.UDP, model.protocol()); + Assertions.assertEquals(976430532, model.probePort()); + Assertions.assertEquals(ProbeProtocol.HTTP, model.probeProtocol()); + Assertions.assertEquals("tfudxepx", model.probeRequestPath()); + Assertions.assertEquals("qagvrvm", model.loadDistribution()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowsPostWithResponsMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowsPostWithResponsMockTests.java index eaa25f3dd384..1f3784bf2444 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowsPostWithResponsMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowsPostWithResponsMockTests.java @@ -27,7 +27,8 @@ public void testPostWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.managedApplyMaintenanceWindows().postWithResponse("tnpsihclaf", "va", com.azure.core.util.Context.NONE); + manager.managedApplyMaintenanceWindows() + .postWithResponse("d", "cpfnznthjtwkja", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusInnerTests.java index 1d55cb239b26..0ea7c08ff23b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusInnerTests.java @@ -11,7 +11,7 @@ public final class ManagedAzResiliencyStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedAzResiliencyStatusInner model = BinaryData.fromString( - "{\"baseResourceStatus\":[{\"resourceName\":\"vtpuqujmqlgk\",\"resourceType\":\"tndoaongbjc\",\"isZoneResilient\":true,\"details\":\"i\"},{\"resourceName\":\"jed\",\"resourceType\":\"wwa\",\"isZoneResilient\":false,\"details\":\"jvdcpzfoqouic\"}],\"isClusterZoneResilient\":true}") + "{\"baseResourceStatus\":[{\"resourceName\":\"p\",\"resourceType\":\"ksrpqv\",\"isZoneResilient\":false,\"details\":\"aehtwd\"},{\"resourceName\":\"ftswibyrcdlbhsh\",\"resourceType\":\"p\",\"isZoneResilient\":false,\"details\":\"twitykhev\"},{\"resourceName\":\"cedcpnmdy\",\"resourceType\":\"nwzxltjcv\",\"isZoneResilient\":true,\"details\":\"iugcxnavvwxq\"},{\"resourceName\":\"y\",\"resourceType\":\"nyowxwlmdjrkvfg\",\"isZoneResilient\":false,\"details\":\"p\"}],\"isClusterZoneResilient\":false}") .toObject(ManagedAzResiliencyStatusInner.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetWithResponseMockTests.java index 22310e5acdf8..174a8da7e2b1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class ManagedAzResiliencyStatusesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"baseResourceStatus\":[{\"resourceName\":\"ophzfylsgcrp\",\"resourceType\":\"cunezzcezelfw\",\"isZoneResilient\":false,\"details\":\"wx\"}],\"isClusterZoneResilient\":true}"; + = "{\"baseResourceStatus\":[{\"resourceName\":\"zpnpbswv\",\"resourceType\":\"loccsrmozihm\",\"isZoneResilient\":false,\"details\":\"wtxxpkyjcx\"},{\"resourceName\":\"xgrytfmp\",\"resourceType\":\"cil\",\"isZoneResilient\":true,\"details\":\"ykggnoxuztrksx\"}],\"isClusterZoneResilient\":false}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ManagedAzResiliencyStatus response = manager.managedAzResiliencyStatuses() - .getWithResponse("v", "dibmikostbzbkiwb", com.azure.core.util.Context.NONE) + .getWithResponse("kxcoxpelnje", "agltsxoa", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterUpdateParametersTests.java index a6645605ffac..ded7d1062234 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterUpdateParametersTests.java @@ -13,17 +13,16 @@ public final class ManagedClusterUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ManagedClusterUpdateParameters model = BinaryData.fromString("{\"tags\":{\"ekkezzikhlyfjh\":\"kfcktqum\"}}") - .toObject(ManagedClusterUpdateParameters.class); - Assertions.assertEquals("kfcktqum", model.tags().get("ekkezzikhlyfjh")); + ManagedClusterUpdateParameters model + = BinaryData.fromString("{\"tags\":{\"fltkacjv\":\"wj\"}}").toObject(ManagedClusterUpdateParameters.class); + Assertions.assertEquals("wj", model.tags().get("fltkacjv")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedClusterUpdateParameters model - = new ManagedClusterUpdateParameters().withTags(mapOf("ekkezzikhlyfjh", "kfcktqum")); + ManagedClusterUpdateParameters model = new ManagedClusterUpdateParameters().withTags(mapOf("fltkacjv", "wj")); model = BinaryData.fromObject(model).toObject(ManagedClusterUpdateParameters.class); - Assertions.assertEquals("kfcktqum", model.tags().get("ekkezzikhlyfjh")); + Assertions.assertEquals("wj", model.tags().get("fltkacjv")); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetFaultSimulationWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetFaultSimulationWithResponseMockTests.java index 9e39665821f4..31300d8032d2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetFaultSimulationWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetFaultSimulationWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class ManagedClustersGetFaultSimulationWithResponseMockTests { @Test public void testGetFaultSimulationWithResponse() throws Exception { String responseStr - = "{\"simulationId\":\"rqjb\",\"status\":\"Active\",\"startTime\":\"2021-01-25T09:16:29Z\",\"endTime\":\"2021-01-05T10:30:14Z\",\"details\":{\"clusterId\":\"afhonqj\",\"operationId\":\"eickpz\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"pmxelnwcltyje\",\"status\":\"Stopping\",\"operationId\":\"mlfmkqs\",\"operationStatus\":\"Created\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-07-30T21:11:41Z\"}}}}"; + = "{\"simulationId\":\"qvhpsylkkshkbff\",\"status\":\"StopFailed\",\"startTime\":\"2021-04-10T03:24:01Z\",\"endTime\":\"2021-06-13T14:19:09Z\",\"details\":{\"clusterId\":\"wwp\",\"operationId\":\"xs\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"ujgicgaaoe\",\"status\":\"StopFailed\",\"operationId\":\"qutdewemxs\",\"operationStatus\":\"Failed\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-06-28T16:34:33Z\"}}}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,24 +34,24 @@ public void testGetFaultSimulationWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FaultSimulation response = manager.managedClusters() - .getFaultSimulationWithResponse("xecwcro", "phslhcawjutifdw", - new FaultSimulationIdContent().withSimulationId("mvi"), com.azure.core.util.Context.NONE) + .getFaultSimulationWithResponse("mwqkchcxwaxf", "w", + new FaultSimulationIdContent().withSimulationId("jkjexf"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("rqjb", response.simulationId()); - Assertions.assertEquals(FaultSimulationStatus.ACTIVE, response.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-25T09:16:29Z"), response.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T10:30:14Z"), response.endTime()); - Assertions.assertEquals("afhonqj", response.details().clusterId()); - Assertions.assertEquals("eickpz", response.details().operationId()); - Assertions.assertEquals("pmxelnwcltyje", response.details().nodeTypeFaultSimulation().get(0).nodeTypeName()); - Assertions.assertEquals(FaultSimulationStatus.STOPPING, + Assertions.assertEquals("qvhpsylkkshkbff", response.simulationId()); + Assertions.assertEquals(FaultSimulationStatus.STOP_FAILED, response.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-10T03:24:01Z"), response.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-13T14:19:09Z"), response.endTime()); + Assertions.assertEquals("wwp", response.details().clusterId()); + Assertions.assertEquals("xs", response.details().operationId()); + Assertions.assertEquals("ujgicgaaoe", response.details().nodeTypeFaultSimulation().get(0).nodeTypeName()); + Assertions.assertEquals(FaultSimulationStatus.STOP_FAILED, response.details().nodeTypeFaultSimulation().get(0).status()); - Assertions.assertEquals("mlfmkqs", response.details().nodeTypeFaultSimulation().get(0).operationId()); - Assertions.assertEquals(SfmcOperationStatus.CREATED, + Assertions.assertEquals("qutdewemxs", response.details().nodeTypeFaultSimulation().get(0).operationId()); + Assertions.assertEquals(SfmcOperationStatus.FAILED, response.details().nodeTypeFaultSimulation().get(0).operationStatus()); - Assertions.assertTrue(response.details().parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-30T21:11:41Z"), + Assertions.assertFalse(response.details().parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-28T16:34:33Z"), response.details().parameters().constraints().expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListFaultSimulationMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListFaultSimulationMockTests.java index ff45ee2b1050..6e5da9ff9dd9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListFaultSimulationMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListFaultSimulationMockTests.java @@ -24,7 +24,7 @@ public final class ManagedClustersListFaultSimulationMockTests { @Test public void testListFaultSimulation() throws Exception { String responseStr - = "{\"value\":[{\"simulationId\":\"hsphaivmxyas\",\"status\":\"StopFailed\",\"startTime\":\"2021-09-18T11:57:58Z\",\"endTime\":\"2021-01-20T23:20:50Z\",\"details\":{\"clusterId\":\"wakoihkn\",\"operationId\":\"jblmljhlnymz\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"ryuzcbmqqv\",\"status\":\"StartFailed\",\"operationId\":\"fgtayxonsup\",\"operationStatus\":\"Succeeded\"},{\"nodeTypeName\":\"zqn\",\"status\":\"StartFailed\",\"operationId\":\"ql\",\"operationStatus\":\"Failed\"},{\"nodeTypeName\":\"ibg\",\"status\":\"Done\",\"operationId\":\"xfyqonmpqoxwdo\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"iqxeiiqbimht\",\"status\":\"Stopping\",\"operationId\":\"nhe\",\"operationStatus\":\"Started\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-02-24T17:49:08Z\"}}}}]}"; + = "{\"value\":[{\"simulationId\":\"whixmonstsh\",\"status\":\"StartFailed\",\"startTime\":\"2021-11-30T03:41Z\",\"endTime\":\"2021-08-28T04:08:34Z\",\"details\":{\"clusterId\":\"lduccbi\",\"operationId\":\"svu\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"iegstm\",\"status\":\"StartFailed\",\"operationId\":\"jizcilnghgs\",\"operationStatus\":\"Created\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-09-06T18:31Z\"}}}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,25 +33,25 @@ public void testListFaultSimulation() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable<FaultSimulation> response - = manager.managedClusters().listFaultSimulation("x", "uamwabzxrvxc", com.azure.core.util.Context.NONE); + PagedIterable<FaultSimulation> response = manager.managedClusters() + .listFaultSimulation("gehkfkimrtixokff", "yinljqe", com.azure.core.util.Context.NONE); - Assertions.assertEquals("hsphaivmxyas", response.iterator().next().simulationId()); - Assertions.assertEquals(FaultSimulationStatus.STOP_FAILED, response.iterator().next().status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T11:57:58Z"), response.iterator().next().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T23:20:50Z"), response.iterator().next().endTime()); - Assertions.assertEquals("wakoihkn", response.iterator().next().details().clusterId()); - Assertions.assertEquals("jblmljhlnymz", response.iterator().next().details().operationId()); - Assertions.assertEquals("ryuzcbmqqv", + Assertions.assertEquals("whixmonstsh", response.iterator().next().simulationId()); + Assertions.assertEquals(FaultSimulationStatus.START_FAILED, response.iterator().next().status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-30T03:41Z"), response.iterator().next().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-28T04:08:34Z"), response.iterator().next().endTime()); + Assertions.assertEquals("lduccbi", response.iterator().next().details().clusterId()); + Assertions.assertEquals("svu", response.iterator().next().details().operationId()); + Assertions.assertEquals("iegstm", response.iterator().next().details().nodeTypeFaultSimulation().get(0).nodeTypeName()); Assertions.assertEquals(FaultSimulationStatus.START_FAILED, response.iterator().next().details().nodeTypeFaultSimulation().get(0).status()); - Assertions.assertEquals("fgtayxonsup", + Assertions.assertEquals("jizcilnghgs", response.iterator().next().details().nodeTypeFaultSimulation().get(0).operationId()); - Assertions.assertEquals(SfmcOperationStatus.SUCCEEDED, + Assertions.assertEquals(SfmcOperationStatus.CREATED, response.iterator().next().details().nodeTypeFaultSimulation().get(0).operationStatus()); Assertions.assertFalse(response.iterator().next().details().parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-24T17:49:08Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T18:31Z"), response.iterator().next().details().parameters().constraints().expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusInnerTests.java index cda80be9ff64..c0d6d8f2de7a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusInnerTests.java @@ -11,7 +11,7 @@ public final class ManagedMaintenanceWindowStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedMaintenanceWindowStatusInner model = BinaryData.fromString( - "{\"isWindowEnabled\":true,\"isRegionReady\":false,\"isWindowActive\":false,\"canApplyUpdates\":true,\"lastWindowStatusUpdateAtUTC\":\"2021-10-15T06:55:02Z\",\"lastWindowStartTimeUTC\":\"2021-03-04T17:22:18Z\",\"lastWindowEndTimeUTC\":\"2021-10-02T18:29:47Z\"}") + "{\"isWindowEnabled\":true,\"isRegionReady\":false,\"isWindowActive\":false,\"canApplyUpdates\":true,\"lastWindowStatusUpdateAtUTC\":\"2021-03-14T01:14:47Z\",\"lastWindowStartTimeUTC\":\"2021-01-18T23:13:43Z\",\"lastWindowEndTimeUTC\":\"2021-02-18T14:41:58Z\"}") .toObject(ManagedMaintenanceWindowStatusInner.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetWithResponMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetWithResponMockTests.java index e9c800e05bed..c05b52ae745a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetWithResponMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetWithResponMockTests.java @@ -20,7 +20,7 @@ public final class ManagedMaintenanceWindowStatusesGetWithResponMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"isWindowEnabled\":true,\"isRegionReady\":false,\"isWindowActive\":false,\"canApplyUpdates\":true,\"lastWindowStatusUpdateAtUTC\":\"2021-11-26T04:41:12Z\",\"lastWindowStartTimeUTC\":\"2021-10-30T13:50:04Z\",\"lastWindowEndTimeUTC\":\"2021-03-27T13:01:29Z\"}"; + = "{\"isWindowEnabled\":false,\"isRegionReady\":false,\"isWindowActive\":false,\"canApplyUpdates\":true,\"lastWindowStatusUpdateAtUTC\":\"2021-10-01T04:20:56Z\",\"lastWindowStartTimeUTC\":\"2021-07-27T11:11:31Z\",\"lastWindowEndTimeUTC\":\"2021-08-19T07:20:59Z\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ManagedMaintenanceWindowStatus response = manager.managedMaintenanceWindowStatuses() - .getWithResponse("lpt", "sqqw", com.azure.core.util.Context.NONE) + .getWithResponse("srxuzvoam", "tcqiosmg", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetWithResponseMockTests.java index 63df7cd8876d..e019b14e2eac 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetWithResponseMockTests.java @@ -19,7 +19,8 @@ public final class ManagedUnsupportedVMSizesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - String responseStr = "{\"properties\":{\"size\":\"wvz\"},\"id\":\"zvd\",\"name\":\"zdix\",\"type\":\"q\"}"; + String responseStr + = "{\"properties\":{\"size\":\"kpzvcpopmxelnwc\"},\"id\":\"yjede\",\"name\":\"mlfmkqs\",\"type\":\"zuawxtzxpuamwa\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -29,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ManagedVMSize response = manager.managedUnsupportedVMSizes() - .getWithResponse("czurtlei", "q", com.azure.core.util.Context.NONE) + .getWithResponse("aglkafhon", "juj", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListMockTests.java index e8d91952ff4c..1e3f61f52af0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListMockTests.java @@ -21,7 +21,7 @@ public final class ManagedUnsupportedVMSizesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"size\":\"qhewj\"},\"id\":\"mcgsbostzelnd\",\"name\":\"tutmzl\",\"type\":\"ojlvfhrbbpneqvc\"}]}"; + = "{\"value\":[{\"properties\":{\"size\":\"haivm\"},\"id\":\"asflvg\",\"name\":\"zwywako\",\"type\":\"knsmjblmljhlnymz\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ManagedVMSize> response - = manager.managedUnsupportedVMSizes().list("noda", com.azure.core.util.Context.NONE); + = manager.managedUnsupportedVMSizes().list("zxrvxcus", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizeInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizeInnerTests.java index 1cd05dc50f42..2400031c0d6f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizeInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizeInnerTests.java @@ -12,7 +12,7 @@ public final class ManagedVMSizeInnerTests { public void testDeserialize() throws Exception { ManagedVMSizeInner model = BinaryData .fromString( - "{\"properties\":{\"size\":\"lvpnpp\"},\"id\":\"flrwd\",\"name\":\"dlxyjrxs\",\"type\":\"afcnih\"}") + "{\"properties\":{\"size\":\"k\"},\"id\":\"oxafn\",\"name\":\"lpichk\",\"type\":\"mkcdyhbpkkpwdre\"}") .toObject(ManagedVMSizeInner.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizesResultTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizesResultTests.java index 110c4fd85c04..7ef4c8ac5c3a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizesResultTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizesResultTests.java @@ -12,8 +12,8 @@ public final class ManagedVMSizesResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedVMSizesResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"size\":\"vpk\"},\"id\":\"dcvd\",\"name\":\"vo\",\"type\":\"sotbob\"},{\"properties\":{\"size\":\"pcjwv\"},\"id\":\"dldwmgxc\",\"name\":\"slpmutwuo\",\"type\":\"rpkhjwn\"},{\"properties\":{\"size\":\"sluicpdggkzz\"},\"id\":\"mbmpaxmodfvuefy\",\"name\":\"bpfvm\",\"type\":\"hrfou\"}],\"nextLink\":\"taakc\"}") + "{\"value\":[{\"properties\":{\"size\":\"s\"},\"id\":\"sytgadgvraea\",\"name\":\"e\",\"type\":\"zar\"},{\"properties\":{\"size\":\"q\"},\"id\":\"ijfqkacewiipfp\",\"name\":\"ji\",\"type\":\"wifto\"},{\"properties\":{\"size\":\"vpuvks\"},\"id\":\"lsa\",\"name\":\"ynfs\",\"type\":\"ljphuopxodl\"},{\"properties\":{\"size\":\"ntorzihleosjswsr\"},\"id\":\"lyzrpzbchckqqzqi\",\"name\":\"iysui\",\"type\":\"ynkedyatrwyhqmib\"}],\"nextLink\":\"hwit\"}") .toObject(ManagedVMSizesResult.class); - Assertions.assertEquals("taakc", model.nextLink()); + Assertions.assertEquals("hwit", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NamedPartitionSchemeTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NamedPartitionSchemeTests.java index f13784ba8d2f..6a7a345c1748 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NamedPartitionSchemeTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NamedPartitionSchemeTests.java @@ -12,17 +12,18 @@ public final class NamedPartitionSchemeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NamedPartitionScheme model = BinaryData.fromString( - "{\"partitionScheme\":\"Named\",\"names\":[\"loayqcgw\",\"tzjuzgwyzmhtxo\",\"gmtsavjcbpwxqpsr\",\"nftguvriuhpr\"]}") + NamedPartitionScheme model = BinaryData + .fromString( + "{\"partitionScheme\":\"Named\",\"names\":[\"bdagxt\",\"bqdxbx\",\"akbogqxndlkzgxh\",\"ripl\"]}") .toObject(NamedPartitionScheme.class); - Assertions.assertEquals("loayqcgw", model.names().get(0)); + Assertions.assertEquals("bdagxt", model.names().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamedPartitionScheme model = new NamedPartitionScheme() - .withNames(Arrays.asList("loayqcgw", "tzjuzgwyzmhtxo", "gmtsavjcbpwxqpsr", "nftguvriuhpr")); + NamedPartitionScheme model + = new NamedPartitionScheme().withNames(Arrays.asList("bdagxt", "bqdxbx", "akbogqxndlkzgxh", "ripl")); model = BinaryData.fromObject(model).toObject(NamedPartitionScheme.class); - Assertions.assertEquals("loayqcgw", model.names().get(0)); + Assertions.assertEquals("bdagxt", model.names().get(0)); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NetworkSecurityRuleTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NetworkSecurityRuleTests.java index b84cdd5beb71..e4d604da10cf 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NetworkSecurityRuleTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NetworkSecurityRuleTests.java @@ -16,54 +16,54 @@ public final class NetworkSecurityRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityRule model = BinaryData.fromString( - "{\"name\":\"afnn\",\"description\":\"pichkoymkcdy\",\"protocol\":\"http\",\"sourceAddressPrefixes\":[\"kpw\",\"reqnovvqfov\",\"jxywsuws\",\"rsndsytgadgvra\"],\"destinationAddressPrefixes\":[\"neqn\"],\"sourcePortRanges\":[\"rwlqu\",\"ijfqkacewiipfp\",\"bjibwwiftohq\",\"vpuvks\"],\"destinationPortRanges\":[\"saknynfsyn\"],\"sourceAddressPrefix\":\"ph\",\"destinationAddressPrefix\":\"pxodlqiyntorzih\",\"sourcePortRange\":\"osjswsr\",\"destinationPortRange\":\"lyzrpzbchckqqzqi\",\"access\":\"allow\",\"priority\":1257157038,\"direction\":\"outbound\"}") + "{\"name\":\"pkukghi\",\"description\":\"blxgwimf\",\"protocol\":\"esp\",\"sourceAddressPrefixes\":[\"j\",\"wmszkk\"],\"destinationAddressPrefixes\":[\"rey\",\"kzikfjawneaivxwc\"],\"sourcePortRanges\":[\"pcirelsfeaen\",\"abfatkl\",\"dxbjhwuaanozj\"],\"destinationPortRanges\":[\"hyoulpjr\"],\"sourceAddressPrefix\":\"ag\",\"destinationAddressPrefix\":\"vimjwos\",\"sourcePortRange\":\"xitc\",\"destinationPortRange\":\"fcktqumiekke\",\"access\":\"allow\",\"priority\":697538658,\"direction\":\"inbound\"}") .toObject(NetworkSecurityRule.class); - Assertions.assertEquals("afnn", model.name()); - Assertions.assertEquals("pichkoymkcdy", model.description()); - Assertions.assertEquals(NsgProtocol.HTTP, model.protocol()); - Assertions.assertEquals("kpw", model.sourceAddressPrefixes().get(0)); - Assertions.assertEquals("neqn", model.destinationAddressPrefixes().get(0)); - Assertions.assertEquals("rwlqu", model.sourcePortRanges().get(0)); - Assertions.assertEquals("saknynfsyn", model.destinationPortRanges().get(0)); - Assertions.assertEquals("ph", model.sourceAddressPrefix()); - Assertions.assertEquals("pxodlqiyntorzih", model.destinationAddressPrefix()); - Assertions.assertEquals("osjswsr", model.sourcePortRange()); - Assertions.assertEquals("lyzrpzbchckqqzqi", model.destinationPortRange()); + Assertions.assertEquals("pkukghi", model.name()); + Assertions.assertEquals("blxgwimf", model.description()); + Assertions.assertEquals(NsgProtocol.ESP, model.protocol()); + Assertions.assertEquals("j", model.sourceAddressPrefixes().get(0)); + Assertions.assertEquals("rey", model.destinationAddressPrefixes().get(0)); + Assertions.assertEquals("pcirelsfeaen", model.sourcePortRanges().get(0)); + Assertions.assertEquals("hyoulpjr", model.destinationPortRanges().get(0)); + Assertions.assertEquals("ag", model.sourceAddressPrefix()); + Assertions.assertEquals("vimjwos", model.destinationAddressPrefix()); + Assertions.assertEquals("xitc", model.sourcePortRange()); + Assertions.assertEquals("fcktqumiekke", model.destinationPortRange()); Assertions.assertEquals(Access.ALLOW, model.access()); - Assertions.assertEquals(1257157038, model.priority()); - Assertions.assertEquals(Direction.OUTBOUND, model.direction()); + Assertions.assertEquals(697538658, model.priority()); + Assertions.assertEquals(Direction.INBOUND, model.direction()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkSecurityRule model = new NetworkSecurityRule().withName("afnn") - .withDescription("pichkoymkcdy") - .withProtocol(NsgProtocol.HTTP) - .withSourceAddressPrefixes(Arrays.asList("kpw", "reqnovvqfov", "jxywsuws", "rsndsytgadgvra")) - .withDestinationAddressPrefixes(Arrays.asList("neqn")) - .withSourcePortRanges(Arrays.asList("rwlqu", "ijfqkacewiipfp", "bjibwwiftohq", "vpuvks")) - .withDestinationPortRanges(Arrays.asList("saknynfsyn")) - .withSourceAddressPrefix("ph") - .withDestinationAddressPrefix("pxodlqiyntorzih") - .withSourcePortRange("osjswsr") - .withDestinationPortRange("lyzrpzbchckqqzqi") + NetworkSecurityRule model = new NetworkSecurityRule().withName("pkukghi") + .withDescription("blxgwimf") + .withProtocol(NsgProtocol.ESP) + .withSourceAddressPrefixes(Arrays.asList("j", "wmszkk")) + .withDestinationAddressPrefixes(Arrays.asList("rey", "kzikfjawneaivxwc")) + .withSourcePortRanges(Arrays.asList("pcirelsfeaen", "abfatkl", "dxbjhwuaanozj")) + .withDestinationPortRanges(Arrays.asList("hyoulpjr")) + .withSourceAddressPrefix("ag") + .withDestinationAddressPrefix("vimjwos") + .withSourcePortRange("xitc") + .withDestinationPortRange("fcktqumiekke") .withAccess(Access.ALLOW) - .withPriority(1257157038) - .withDirection(Direction.OUTBOUND); + .withPriority(697538658) + .withDirection(Direction.INBOUND); model = BinaryData.fromObject(model).toObject(NetworkSecurityRule.class); - Assertions.assertEquals("afnn", model.name()); - Assertions.assertEquals("pichkoymkcdy", model.description()); - Assertions.assertEquals(NsgProtocol.HTTP, model.protocol()); - Assertions.assertEquals("kpw", model.sourceAddressPrefixes().get(0)); - Assertions.assertEquals("neqn", model.destinationAddressPrefixes().get(0)); - Assertions.assertEquals("rwlqu", model.sourcePortRanges().get(0)); - Assertions.assertEquals("saknynfsyn", model.destinationPortRanges().get(0)); - Assertions.assertEquals("ph", model.sourceAddressPrefix()); - Assertions.assertEquals("pxodlqiyntorzih", model.destinationAddressPrefix()); - Assertions.assertEquals("osjswsr", model.sourcePortRange()); - Assertions.assertEquals("lyzrpzbchckqqzqi", model.destinationPortRange()); + Assertions.assertEquals("pkukghi", model.name()); + Assertions.assertEquals("blxgwimf", model.description()); + Assertions.assertEquals(NsgProtocol.ESP, model.protocol()); + Assertions.assertEquals("j", model.sourceAddressPrefixes().get(0)); + Assertions.assertEquals("rey", model.destinationAddressPrefixes().get(0)); + Assertions.assertEquals("pcirelsfeaen", model.sourcePortRanges().get(0)); + Assertions.assertEquals("hyoulpjr", model.destinationPortRanges().get(0)); + Assertions.assertEquals("ag", model.sourceAddressPrefix()); + Assertions.assertEquals("vimjwos", model.destinationAddressPrefix()); + Assertions.assertEquals("xitc", model.sourcePortRange()); + Assertions.assertEquals("fcktqumiekke", model.destinationPortRange()); Assertions.assertEquals(Access.ALLOW, model.access()); - Assertions.assertEquals(1257157038, model.priority()); - Assertions.assertEquals(Direction.OUTBOUND, model.direction()); + Assertions.assertEquals(697538658, model.priority()); + Assertions.assertEquals(Direction.INBOUND, model.direction()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeActionParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeActionParametersTests.java index cb0f3df01439..dd52480bae1a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeActionParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeActionParametersTests.java @@ -13,22 +13,23 @@ public final class NodeTypeActionParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NodeTypeActionParameters model - = BinaryData.fromString("{\"nodes\":[\"ckpyklyhplu\"],\"force\":false,\"updateType\":\"Default\"}") - .toObject(NodeTypeActionParameters.class); - Assertions.assertEquals("ckpyklyhplu", model.nodes().get(0)); - Assertions.assertFalse(model.force()); + NodeTypeActionParameters model = BinaryData + .fromString("{\"nodes\":[\"ewzcjznmwcp\",\"guaadraufactkahz\"],\"force\":true,\"updateType\":\"Default\"}") + .toObject(NodeTypeActionParameters.class); + Assertions.assertEquals("ewzcjznmwcp", model.nodes().get(0)); + Assertions.assertTrue(model.force()); Assertions.assertEquals(UpdateType.DEFAULT, model.updateType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NodeTypeActionParameters model = new NodeTypeActionParameters().withNodes(Arrays.asList("ckpyklyhplu")) - .withForce(false) - .withUpdateType(UpdateType.DEFAULT); + NodeTypeActionParameters model + = new NodeTypeActionParameters().withNodes(Arrays.asList("ewzcjznmwcp", "guaadraufactkahz")) + .withForce(true) + .withUpdateType(UpdateType.DEFAULT); model = BinaryData.fromObject(model).toObject(NodeTypeActionParameters.class); - Assertions.assertEquals("ckpyklyhplu", model.nodes().get(0)); - Assertions.assertFalse(model.force()); + Assertions.assertEquals("ewzcjznmwcp", model.nodes().get(0)); + Assertions.assertTrue(model.force()); Assertions.assertEquals(UpdateType.DEFAULT, model.updateType()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeAvailableSkuInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeAvailableSkuInnerTests.java index 4423e1ba4442..db2d9f819456 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeAvailableSkuInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeAvailableSkuInnerTests.java @@ -11,7 +11,7 @@ public final class NodeTypeAvailableSkuInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NodeTypeAvailableSkuInner model = BinaryData.fromString( - "{\"resourceType\":\"qjfsmlmbtxhw\",\"sku\":{\"name\":\"srtawcoezbr\",\"tier\":\"bskhudygoookkqfq\"},\"capacity\":{\"minimum\":1168640634,\"maximum\":173772181,\"default\":1730138654,\"scaleType\":\"Automatic\"}}") + "{\"resourceType\":\"dweyuqdunv\",\"sku\":{\"name\":\"rwrbi\",\"tier\":\"ktalywjhhgdnhxms\"},\"capacity\":{\"minimum\":759547890,\"maximum\":601340793,\"default\":486711131,\"scaleType\":\"Manual\"}}") .toObject(NodeTypeAvailableSkuInner.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeFaultSimulationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeFaultSimulationTests.java index 3465dd29a917..cd673ed92028 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeFaultSimulationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeFaultSimulationTests.java @@ -14,11 +14,11 @@ public final class NodeTypeFaultSimulationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NodeTypeFaultSimulation model = BinaryData.fromString( - "{\"nodeTypeName\":\"ypatdooaojkniod\",\"status\":\"Stopping\",\"operationId\":\"bw\",\"operationStatus\":\"Aborted\"}") + "{\"nodeTypeName\":\"szzcmrvexztv\",\"status\":\"StopFailed\",\"operationId\":\"sfraoyzko\",\"operationStatus\":\"Aborted\"}") .toObject(NodeTypeFaultSimulation.class); - Assertions.assertEquals("ypatdooaojkniod", model.nodeTypeName()); - Assertions.assertEquals(FaultSimulationStatus.STOPPING, model.status()); - Assertions.assertEquals("bw", model.operationId()); + Assertions.assertEquals("szzcmrvexztv", model.nodeTypeName()); + Assertions.assertEquals(FaultSimulationStatus.STOP_FAILED, model.status()); + Assertions.assertEquals("sfraoyzko", model.operationId()); Assertions.assertEquals(SfmcOperationStatus.ABORTED, model.operationStatus()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeListSkuResultTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeListSkuResultTests.java index 9024109a1982..c5b72219c219 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeListSkuResultTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeListSkuResultTests.java @@ -12,8 +12,8 @@ public final class NodeTypeListSkuResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NodeTypeListSkuResult model = BinaryData.fromString( - "{\"value\":[{\"resourceType\":\"dlgzibthostgkt\",\"sku\":{\"name\":\"dxeclzedqbcvh\",\"tier\":\"h\"},\"capacity\":{\"minimum\":751350709,\"maximum\":695028965,\"default\":1774431759,\"scaleType\":\"Automatic\"}}],\"nextLink\":\"fbumlkx\"}") + "{\"value\":[{\"resourceType\":\"uxxpshne\",\"sku\":{\"name\":\"lfg\",\"tier\":\"qubkw\"},\"capacity\":{\"minimum\":2030075200,\"maximum\":83851075,\"default\":1559984904,\"scaleType\":\"None\"}},{\"resourceType\":\"bazpjuohmi\",\"sku\":{\"name\":\"lnorwmdu\",\"tier\":\"pklvxw\"},\"capacity\":{\"minimum\":1917702529,\"maximum\":1521698279,\"default\":181907688,\"scaleType\":\"Automatic\"}},{\"resourceType\":\"isze\",\"sku\":{\"name\":\"bjcrxgibbdaxco\",\"tier\":\"ozauorsukokwb\"},\"capacity\":{\"minimum\":650795079,\"maximum\":2075854063,\"default\":1945545527,\"scaleType\":\"Automatic\"}}],\"nextLink\":\"zlrphwzs\"}") .toObject(NodeTypeListSkuResult.class); - Assertions.assertEquals("fbumlkx", model.nextLink()); + Assertions.assertEquals("zlrphwzs", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeNatConfigTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeNatConfigTests.java index b773378c28f3..3531d86d9546 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeNatConfigTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeNatConfigTests.java @@ -13,21 +13,21 @@ public final class NodeTypeNatConfigTests { public void testDeserialize() throws Exception { NodeTypeNatConfig model = BinaryData .fromString( - "{\"backendPort\":148831092,\"frontendPortRangeStart\":1083346406,\"frontendPortRangeEnd\":1621053169}") + "{\"backendPort\":709721668,\"frontendPortRangeStart\":40609312,\"frontendPortRangeEnd\":1077701136}") .toObject(NodeTypeNatConfig.class); - Assertions.assertEquals(148831092, model.backendPort()); - Assertions.assertEquals(1083346406, model.frontendPortRangeStart()); - Assertions.assertEquals(1621053169, model.frontendPortRangeEnd()); + Assertions.assertEquals(709721668, model.backendPort()); + Assertions.assertEquals(40609312, model.frontendPortRangeStart()); + Assertions.assertEquals(1077701136, model.frontendPortRangeEnd()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NodeTypeNatConfig model = new NodeTypeNatConfig().withBackendPort(148831092) - .withFrontendPortRangeStart(1083346406) - .withFrontendPortRangeEnd(1621053169); + NodeTypeNatConfig model = new NodeTypeNatConfig().withBackendPort(709721668) + .withFrontendPortRangeStart(40609312) + .withFrontendPortRangeEnd(1077701136); model = BinaryData.fromObject(model).toObject(NodeTypeNatConfig.class); - Assertions.assertEquals(148831092, model.backendPort()); - Assertions.assertEquals(1083346406, model.frontendPortRangeStart()); - Assertions.assertEquals(1621053169, model.frontendPortRangeEnd()); + Assertions.assertEquals(709721668, model.backendPort()); + Assertions.assertEquals(40609312, model.frontendPortRangeStart()); + Assertions.assertEquals(1077701136, model.frontendPortRangeEnd()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuCapacityTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuCapacityTests.java index 67b3b1639bc4..a4843a542369 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuCapacityTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuCapacityTests.java @@ -12,7 +12,7 @@ public final class NodeTypeSkuCapacityTests { public void testDeserialize() throws Exception { NodeTypeSkuCapacity model = BinaryData .fromString( - "{\"minimum\":1877295480,\"maximum\":1922609600,\"default\":462603095,\"scaleType\":\"Automatic\"}") + "{\"minimum\":1812829551,\"maximum\":1377717439,\"default\":355548039,\"scaleType\":\"Manual\"}") .toObject(NodeTypeSkuCapacity.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuTests.java index b5ccdc8b0e3f..2dcb8e960a01 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuTests.java @@ -11,21 +11,19 @@ public final class NodeTypeSkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NodeTypeSku model - = BinaryData.fromString("{\"name\":\"jzhpjbibgjmfx\",\"tier\":\"vfcluyovwxnbkfe\",\"capacity\":1794198042}") - .toObject(NodeTypeSku.class); - Assertions.assertEquals("jzhpjbibgjmfx", model.name()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.tier()); - Assertions.assertEquals(1794198042, model.capacity()); + NodeTypeSku model = BinaryData.fromString("{\"name\":\"kjprvk\",\"tier\":\"fz\",\"capacity\":497380476}") + .toObject(NodeTypeSku.class); + Assertions.assertEquals("kjprvk", model.name()); + Assertions.assertEquals("fz", model.tier()); + Assertions.assertEquals(497380476, model.capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NodeTypeSku model - = new NodeTypeSku().withName("jzhpjbibgjmfx").withTier("vfcluyovwxnbkfe").withCapacity(1794198042); + NodeTypeSku model = new NodeTypeSku().withName("kjprvk").withTier("fz").withCapacity(497380476); model = BinaryData.fromObject(model).toObject(NodeTypeSku.class); - Assertions.assertEquals("jzhpjbibgjmfx", model.name()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.tier()); - Assertions.assertEquals(1794198042, model.capacity()); + Assertions.assertEquals("kjprvk", model.name()); + Assertions.assertEquals("fz", model.tier()); + Assertions.assertEquals(497380476, model.capacity()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListMockTests.java index 8a7fa355c0bb..3f2f1c9c3ac9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListMockTests.java @@ -21,7 +21,7 @@ public final class NodeTypeSkusListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"resourceType\":\"xjawrt\",\"sku\":{\"name\":\"jmyccxlzhcoxov\",\"tier\":\"khenlus\"},\"capacity\":{\"minimum\":742162315,\"maximum\":1821687022,\"default\":325685122,\"scaleType\":\"Manual\"}}]}"; + = "{\"value\":[{\"resourceType\":\"g\",\"sku\":{\"name\":\"gdlfgt\",\"tier\":\"snaquf\"},\"capacity\":{\"minimum\":821039939,\"maximum\":230335495,\"default\":553103423,\"scaleType\":\"None\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<NodeTypeAvailableSku> response - = manager.nodeTypeSkus().list("bauiropi", "nszonwpngaj", "n", com.azure.core.util.Context.NONE); + = manager.nodeTypeSkus().list("hzjqatucoige", "xncnwfe", "bnwgfmxj", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSupportedSkuTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSupportedSkuTests.java index 959f672e21b4..a72f416b5316 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSupportedSkuTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSupportedSkuTests.java @@ -10,7 +10,7 @@ public final class NodeTypeSupportedSkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NodeTypeSupportedSku model = BinaryData.fromString("{\"name\":\"iqtqzfavyvnq\",\"tier\":\"bar\"}") + NodeTypeSupportedSku model = BinaryData.fromString("{\"name\":\"dufiq\",\"tier\":\"ieuzaofjchvcyyy\"}") .toObject(NodeTypeSupportedSku.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeUpdateParametersTests.java index bd9e2960788a..54ab5a575f4b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeUpdateParametersTests.java @@ -15,24 +15,24 @@ public final class NodeTypeUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NodeTypeUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"wzdgirujbzbo\":\"cy\",\"pniyujviyl\":\"vzzbtdcq\"},\"sku\":{\"name\":\"hfssnrb\",\"tier\":\"efr\",\"capacity\":1375463592}}") + "{\"tags\":{\"tczheydbsdshmkx\":\"x\",\"ltfnhtbaxkgx\":\"aehvbbxuri\"},\"sku\":{\"name\":\"ckpyklyhplu\",\"tier\":\"pvruudlg\",\"capacity\":1558509810}}") .toObject(NodeTypeUpdateParameters.class); - Assertions.assertEquals("cy", model.tags().get("wzdgirujbzbo")); - Assertions.assertEquals("hfssnrb", model.sku().name()); - Assertions.assertEquals("efr", model.sku().tier()); - Assertions.assertEquals(1375463592, model.sku().capacity()); + Assertions.assertEquals("x", model.tags().get("tczheydbsdshmkx")); + Assertions.assertEquals("ckpyklyhplu", model.sku().name()); + Assertions.assertEquals("pvruudlg", model.sku().tier()); + Assertions.assertEquals(1558509810, model.sku().capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NodeTypeUpdateParameters model - = new NodeTypeUpdateParameters().withTags(mapOf("wzdgirujbzbo", "cy", "pniyujviyl", "vzzbtdcq")) - .withSku(new NodeTypeSku().withName("hfssnrb").withTier("efr").withCapacity(1375463592)); + = new NodeTypeUpdateParameters().withTags(mapOf("tczheydbsdshmkx", "x", "ltfnhtbaxkgx", "aehvbbxuri")) + .withSku(new NodeTypeSku().withName("ckpyklyhplu").withTier("pvruudlg").withCapacity(1558509810)); model = BinaryData.fromObject(model).toObject(NodeTypeUpdateParameters.class); - Assertions.assertEquals("cy", model.tags().get("wzdgirujbzbo")); - Assertions.assertEquals("hfssnrb", model.sku().name()); - Assertions.assertEquals("efr", model.sku().tier()); - Assertions.assertEquals(1375463592, model.sku().capacity()); + Assertions.assertEquals("x", model.tags().get("tczheydbsdshmkx")); + Assertions.assertEquals("ckpyklyhplu", model.sku().name()); + Assertions.assertEquals("pvruudlg", model.sku().tier()); + Assertions.assertEquals(1558509810, model.sku().capacity()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetFaultSimulationWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetFaultSimulationWithResponseMockTests.java index 8c1854878b28..b330844d594b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetFaultSimulationWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetFaultSimulationWithResponseMockTests.java @@ -24,7 +24,7 @@ public final class NodeTypesGetFaultSimulationWithResponseMockTests { @Test public void testGetFaultSimulationWithResponse() throws Exception { String responseStr - = "{\"simulationId\":\"qpswokmvkhlggdhb\",\"status\":\"StartFailed\",\"startTime\":\"2021-11-19T21:48:38Z\",\"endTime\":\"2021-10-24T18:45:15Z\",\"details\":{\"clusterId\":\"wiwtglxxhl\",\"operationId\":\"pg\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"mnzhrgmqg\",\"status\":\"Starting\",\"operationId\":\"pqcbfrmbodthsq\",\"operationStatus\":\"Succeeded\"},{\"nodeTypeName\":\"iibakcl\",\"status\":\"StartFailed\",\"operationId\":\"rnxousxauzlwvsg\",\"operationStatus\":\"Aborted\"},{\"nodeTypeName\":\"qf\",\"status\":\"Starting\",\"operationId\":\"uxmmkjsvthnwp\",\"operationStatus\":\"Canceled\"},{\"nodeTypeName\":\"ovmribiattg\",\"status\":\"Active\",\"operationId\":\"fotang\",\"operationStatus\":\"Canceled\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-04-07T10:16:52Z\"}}}}"; + = "{\"simulationId\":\"wvsgmwohqfzizvu\",\"status\":\"Stopping\",\"startTime\":\"2021-05-31T23:38:12Z\",\"endTime\":\"2021-11-29T19:19:58Z\",\"details\":{\"clusterId\":\"nwpztekovmrib\",\"operationId\":\"ttgplucfotangcf\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"zcugswvxwlmzqw\",\"status\":\"Done\",\"operationId\":\"njmxmcuqudtcvcl\",\"operationStatus\":\"Created\"},{\"nodeTypeName\":\"dkvgfabuiyjibuzp\",\"status\":\"Done\",\"operationId\":\"neiknpg\",\"operationStatus\":\"Canceled\"},{\"nodeTypeName\":\"iuqhibtozipqwj\",\"status\":\"Active\",\"operationId\":\"rrxxgewpktvq\",\"operationStatus\":\"Canceled\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-10-19T13:03Z\"}}}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,24 +34,24 @@ public void testGetFaultSimulationWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FaultSimulation response = manager.nodeTypes() - .getFaultSimulationWithResponse("hgovfgp", "kqmhhaowjr", "zvuporqzdfuydz", - new FaultSimulationIdContent().withSimulationId("kfvxcnq"), com.azure.core.util.Context.NONE) + .getFaultSimulationWithResponse("mqgjsxvpq", "bfrmbodthsqqgvri", "bakclacjfrnxous", + new FaultSimulationIdContent().withSimulationId("au"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qpswokmvkhlggdhb", response.simulationId()); - Assertions.assertEquals(FaultSimulationStatus.START_FAILED, response.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-19T21:48:38Z"), response.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-24T18:45:15Z"), response.endTime()); - Assertions.assertEquals("wiwtglxxhl", response.details().clusterId()); - Assertions.assertEquals("pg", response.details().operationId()); - Assertions.assertEquals("mnzhrgmqg", response.details().nodeTypeFaultSimulation().get(0).nodeTypeName()); - Assertions.assertEquals(FaultSimulationStatus.STARTING, + Assertions.assertEquals("wvsgmwohqfzizvu", response.simulationId()); + Assertions.assertEquals(FaultSimulationStatus.STOPPING, response.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-31T23:38:12Z"), response.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-29T19:19:58Z"), response.endTime()); + Assertions.assertEquals("nwpztekovmrib", response.details().clusterId()); + Assertions.assertEquals("ttgplucfotangcf", response.details().operationId()); + Assertions.assertEquals("zcugswvxwlmzqw", response.details().nodeTypeFaultSimulation().get(0).nodeTypeName()); + Assertions.assertEquals(FaultSimulationStatus.DONE, response.details().nodeTypeFaultSimulation().get(0).status()); - Assertions.assertEquals("pqcbfrmbodthsq", response.details().nodeTypeFaultSimulation().get(0).operationId()); - Assertions.assertEquals(SfmcOperationStatus.SUCCEEDED, + Assertions.assertEquals("njmxmcuqudtcvcl", response.details().nodeTypeFaultSimulation().get(0).operationId()); + Assertions.assertEquals(SfmcOperationStatus.CREATED, response.details().nodeTypeFaultSimulation().get(0).operationStatus()); - Assertions.assertFalse(response.details().parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-07T10:16:52Z"), + Assertions.assertTrue(response.details().parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-19T13:03Z"), response.details().parameters().constraints().expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListFaultSimulationMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListFaultSimulationMockTests.java index 600bd2543ab8..2f1c13c05bba 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListFaultSimulationMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListFaultSimulationMockTests.java @@ -24,7 +24,7 @@ public final class NodeTypesListFaultSimulationMockTests { @Test public void testListFaultSimulation() throws Exception { String responseStr - = "{\"value\":[{\"simulationId\":\"vclx\",\"status\":\"Done\",\"startTime\":\"2021-04-22T20:04:17Z\",\"endTime\":\"2021-07-17T14:44:19Z\",\"details\":{\"clusterId\":\"buiyji\",\"operationId\":\"zphdugneiknp\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"jiuqhibtozi\",\"status\":\"Stopping\",\"operationId\":\"edmurrxxge\",\"operationStatus\":\"Canceled\"},{\"nodeTypeName\":\"vqylkmqpzoyhl\",\"status\":\"Done\",\"operationId\":\"wgcloxoebqinji\",\"operationStatus\":\"Failed\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-10-27T23:36:18Z\"}}}}]}"; + = "{\"value\":[{\"simulationId\":\"jqlafcbahhpzp\",\"status\":\"StopFailed\",\"startTime\":\"2021-01-21T09:59:18Z\",\"endTime\":\"2021-05-13T07:58:47Z\",\"details\":{\"clusterId\":\"ilkmk\",\"operationId\":\"olvdnd\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"ogphuartvtiu\",\"status\":\"StartFailed\",\"operationId\":\"chnmna\",\"operationStatus\":\"Succeeded\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-08-02T04:27:45Z\"}}}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,24 +34,24 @@ public void testListFaultSimulation() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<FaultSimulation> response = manager.nodeTypes() - .listFaultSimulation("gswvxwlmzqwm", "tx", "jmxmcuqud", com.azure.core.util.Context.NONE); + .listFaultSimulation("hlfbcgwgc", "oxoebqi", "jipnwj", com.azure.core.util.Context.NONE); - Assertions.assertEquals("vclx", response.iterator().next().simulationId()); - Assertions.assertEquals(FaultSimulationStatus.DONE, response.iterator().next().status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-22T20:04:17Z"), response.iterator().next().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-17T14:44:19Z"), response.iterator().next().endTime()); - Assertions.assertEquals("buiyji", response.iterator().next().details().clusterId()); - Assertions.assertEquals("zphdugneiknp", response.iterator().next().details().operationId()); - Assertions.assertEquals("jiuqhibtozi", + Assertions.assertEquals("jqlafcbahhpzp", response.iterator().next().simulationId()); + Assertions.assertEquals(FaultSimulationStatus.STOP_FAILED, response.iterator().next().status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-21T09:59:18Z"), response.iterator().next().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-13T07:58:47Z"), response.iterator().next().endTime()); + Assertions.assertEquals("ilkmk", response.iterator().next().details().clusterId()); + Assertions.assertEquals("olvdnd", response.iterator().next().details().operationId()); + Assertions.assertEquals("ogphuartvtiu", response.iterator().next().details().nodeTypeFaultSimulation().get(0).nodeTypeName()); - Assertions.assertEquals(FaultSimulationStatus.STOPPING, + Assertions.assertEquals(FaultSimulationStatus.START_FAILED, response.iterator().next().details().nodeTypeFaultSimulation().get(0).status()); - Assertions.assertEquals("edmurrxxge", + Assertions.assertEquals("chnmna", response.iterator().next().details().nodeTypeFaultSimulation().get(0).operationId()); - Assertions.assertEquals(SfmcOperationStatus.CANCELED, + Assertions.assertEquals(SfmcOperationStatus.SUCCEEDED, response.iterator().next().details().nodeTypeFaultSimulation().get(0).operationStatus()); - Assertions.assertTrue(response.iterator().next().details().parameters().force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T23:36:18Z"), + Assertions.assertFalse(response.iterator().next().details().parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-02T04:27:45Z"), response.iterator().next().details().parameters().constraints().expirationTime()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListMockTests.java index 31f82ae23451..b38c32a46ef6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListMockTests.java @@ -22,7 +22,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"qgzsles\",\"isDataAction\":true,\"display\":{\"provider\":\"rnntiewdjcv\",\"resource\":\"uwrbehwagoh\",\"operation\":\"f\",\"description\":\"mrqemvvhmx\"},\"origin\":\"rjfut\",\"nextLink\":\"oe\"}]}"; + = "{\"value\":[{\"name\":\"ip\",\"isDataAction\":false,\"display\":{\"provider\":\"qonmacj\",\"resource\":\"nizshqvcim\",\"operation\":\"vfgmblrrilby\",\"description\":\"xsmiccwrwfscjf\"},\"origin\":\"nszqujiz\",\"nextLink\":\"oqytibyowbblgy\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,13 @@ public void testList() throws Exception { PagedIterable<OperationResult> response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("qgzsles", response.iterator().next().name()); - Assertions.assertTrue(response.iterator().next().isDataAction()); - Assertions.assertEquals("rnntiewdjcv", response.iterator().next().display().provider()); - Assertions.assertEquals("uwrbehwagoh", response.iterator().next().display().resource()); - Assertions.assertEquals("f", response.iterator().next().display().operation()); - Assertions.assertEquals("mrqemvvhmx", response.iterator().next().display().description()); - Assertions.assertEquals("rjfut", response.iterator().next().origin()); - Assertions.assertEquals("oe", response.iterator().next().nextLink()); + Assertions.assertEquals("ip", response.iterator().next().name()); + Assertions.assertFalse(response.iterator().next().isDataAction()); + Assertions.assertEquals("qonmacj", response.iterator().next().display().provider()); + Assertions.assertEquals("nizshqvcim", response.iterator().next().display().resource()); + Assertions.assertEquals("vfgmblrrilby", response.iterator().next().display().operation()); + Assertions.assertEquals("xsmiccwrwfscjf", response.iterator().next().display().description()); + Assertions.assertEquals("nszqujiz", response.iterator().next().origin()); + Assertions.assertEquals("oqytibyowbblgy", response.iterator().next().nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/PartitionInstanceCountScaleMechanismTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/PartitionInstanceCountScaleMechanismTests.java index 1941f2b40ac6..da898de92fa1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/PartitionInstanceCountScaleMechanismTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/PartitionInstanceCountScaleMechanismTests.java @@ -12,22 +12,22 @@ public final class PartitionInstanceCountScaleMechanismTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartitionInstanceCountScaleMechanism model = BinaryData.fromString( - "{\"kind\":\"ScalePartitionInstanceCount\",\"minInstanceCount\":194224762,\"maxInstanceCount\":803457218,\"scaleIncrement\":1162707208}") + "{\"kind\":\"ScalePartitionInstanceCount\",\"minInstanceCount\":1072723853,\"maxInstanceCount\":2063268376,\"scaleIncrement\":720725723}") .toObject(PartitionInstanceCountScaleMechanism.class); - Assertions.assertEquals(194224762, model.minInstanceCount()); - Assertions.assertEquals(803457218, model.maxInstanceCount()); - Assertions.assertEquals(1162707208, model.scaleIncrement()); + Assertions.assertEquals(1072723853, model.minInstanceCount()); + Assertions.assertEquals(2063268376, model.maxInstanceCount()); + Assertions.assertEquals(720725723, model.scaleIncrement()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PartitionInstanceCountScaleMechanism model - = new PartitionInstanceCountScaleMechanism().withMinInstanceCount(194224762) - .withMaxInstanceCount(803457218) - .withScaleIncrement(1162707208); + = new PartitionInstanceCountScaleMechanism().withMinInstanceCount(1072723853) + .withMaxInstanceCount(2063268376) + .withScaleIncrement(720725723); model = BinaryData.fromObject(model).toObject(PartitionInstanceCountScaleMechanism.class); - Assertions.assertEquals(194224762, model.minInstanceCount()); - Assertions.assertEquals(803457218, model.maxInstanceCount()); - Assertions.assertEquals(1162707208, model.scaleIncrement()); + Assertions.assertEquals(1072723853, model.minInstanceCount()); + Assertions.assertEquals(2063268376, model.maxInstanceCount()); + Assertions.assertEquals(720725723, model.scaleIncrement()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ResourceAzStatusTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ResourceAzStatusTests.java index 5daf7f0fbb73..c9cdaf424f7a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ResourceAzStatusTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ResourceAzStatusTests.java @@ -11,7 +11,7 @@ public final class ResourceAzStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceAzStatus model = BinaryData.fromString( - "{\"resourceName\":\"rzgszufoxci\",\"resourceType\":\"p\",\"isZoneResilient\":false,\"details\":\"mciodhkhazxkhn\"}") + "{\"resourceName\":\"acizsjqlhkrr\",\"resourceType\":\"deibqip\",\"isZoneResilient\":true,\"details\":\"vxndz\"}") .toObject(ResourceAzStatus.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RestartReplicaRequestTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RestartReplicaRequestTests.java new file mode 100644 index 000000000000..ea86313fe0e9 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RestartReplicaRequestTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartKind; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RestartReplicaRequest; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RestartReplicaRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RestartReplicaRequest model = BinaryData.fromString( + "{\"partitionId\":\"iwbwoenwashrtdtk\",\"replicaIds\":[3530483379804377024,8545363856594134553],\"restartKind\":\"Simultaneous\",\"forceRestart\":true,\"timeout\":8644340540999896271}") + .toObject(RestartReplicaRequest.class); + Assertions.assertEquals("iwbwoenwashrtdtk", model.partitionId()); + Assertions.assertEquals(3530483379804377024L, model.replicaIds().get(0)); + Assertions.assertEquals(RestartKind.SIMULTANEOUS, model.restartKind()); + Assertions.assertTrue(model.forceRestart()); + Assertions.assertEquals(8644340540999896271L, model.timeout()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RestartReplicaRequest model = new RestartReplicaRequest().withPartitionId("iwbwoenwashrtdtk") + .withReplicaIds(Arrays.asList(3530483379804377024L, 8545363856594134553L)) + .withRestartKind(RestartKind.SIMULTANEOUS) + .withForceRestart(true) + .withTimeout(8644340540999896271L); + model = BinaryData.fromObject(model).toObject(RestartReplicaRequest.class); + Assertions.assertEquals("iwbwoenwashrtdtk", model.partitionId()); + Assertions.assertEquals(3530483379804377024L, model.replicaIds().get(0)); + Assertions.assertEquals(RestartKind.SIMULTANEOUS, model.restartKind()); + Assertions.assertTrue(model.forceRestart()); + Assertions.assertEquals(8644340540999896271L, model.timeout()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeApplicationHealthPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeApplicationHealthPolicyTests.java new file mode 100644 index 000000000000..2dd77d26af59 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeApplicationHealthPolicyTests.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeApplicationHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeServiceTypeHealthPolicy; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class RuntimeApplicationHealthPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RuntimeApplicationHealthPolicy model = BinaryData.fromString( + "{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":905507147,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":294567134,\"maxPercentUnhealthyPartitionsPerService\":266686286,\"maxPercentUnhealthyReplicasPerPartition\":599393599},\"serviceTypeHealthPolicyMap\":{\"spnqzahmgkb\":{\"maxPercentUnhealthyServices\":1381039739,\"maxPercentUnhealthyPartitionsPerService\":1526069036,\"maxPercentUnhealthyReplicasPerPartition\":1610498845},\"dhibnuq\":{\"maxPercentUnhealthyServices\":1556572818,\"maxPercentUnhealthyPartitionsPerService\":567432535,\"maxPercentUnhealthyReplicasPerPartition\":188498280}}}") + .toObject(RuntimeApplicationHealthPolicy.class); + Assertions.assertTrue(model.considerWarningAsError()); + Assertions.assertEquals(905507147, model.maxPercentUnhealthyDeployedApplications()); + Assertions.assertEquals(294567134, model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices()); + Assertions.assertEquals(266686286, + model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(599393599, + model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition()); + Assertions.assertEquals(1381039739, + model.serviceTypeHealthPolicyMap().get("spnqzahmgkb").maxPercentUnhealthyServices()); + Assertions.assertEquals(1526069036, + model.serviceTypeHealthPolicyMap().get("spnqzahmgkb").maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(1610498845, + model.serviceTypeHealthPolicyMap().get("spnqzahmgkb").maxPercentUnhealthyReplicasPerPartition()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RuntimeApplicationHealthPolicy model = new RuntimeApplicationHealthPolicy().withConsiderWarningAsError(true) + .withMaxPercentUnhealthyDeployedApplications(905507147) + .withDefaultServiceTypeHealthPolicy( + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(294567134) + .withMaxPercentUnhealthyPartitionsPerService(266686286) + .withMaxPercentUnhealthyReplicasPerPartition(599393599)) + .withServiceTypeHealthPolicyMap(mapOf("spnqzahmgkb", + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1381039739) + .withMaxPercentUnhealthyPartitionsPerService(1526069036) + .withMaxPercentUnhealthyReplicasPerPartition(1610498845), + "dhibnuq", + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1556572818) + .withMaxPercentUnhealthyPartitionsPerService(567432535) + .withMaxPercentUnhealthyReplicasPerPartition(188498280))); + model = BinaryData.fromObject(model).toObject(RuntimeApplicationHealthPolicy.class); + Assertions.assertTrue(model.considerWarningAsError()); + Assertions.assertEquals(905507147, model.maxPercentUnhealthyDeployedApplications()); + Assertions.assertEquals(294567134, model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices()); + Assertions.assertEquals(266686286, + model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(599393599, + model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition()); + Assertions.assertEquals(1381039739, + model.serviceTypeHealthPolicyMap().get("spnqzahmgkb").maxPercentUnhealthyServices()); + Assertions.assertEquals(1526069036, + model.serviceTypeHealthPolicyMap().get("spnqzahmgkb").maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(1610498845, + model.serviceTypeHealthPolicyMap().get("spnqzahmgkb").maxPercentUnhealthyReplicasPerPartition()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeResumeApplicationUpgradeParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeResumeApplicationUpgradeParametersTests.java index d442fc9bcea0..a72390ca5a01 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeResumeApplicationUpgradeParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeResumeApplicationUpgradeParametersTests.java @@ -11,17 +11,16 @@ public final class RuntimeResumeApplicationUpgradeParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RuntimeResumeApplicationUpgradeParameters model - = BinaryData.fromString("{\"upgradeDomainName\":\"fhyhltrpmopjmcma\"}") - .toObject(RuntimeResumeApplicationUpgradeParameters.class); - Assertions.assertEquals("fhyhltrpmopjmcma", model.upgradeDomainName()); + RuntimeResumeApplicationUpgradeParameters model = BinaryData.fromString("{\"upgradeDomainName\":\"xerf\"}") + .toObject(RuntimeResumeApplicationUpgradeParameters.class); + Assertions.assertEquals("xerf", model.upgradeDomainName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RuntimeResumeApplicationUpgradeParameters model - = new RuntimeResumeApplicationUpgradeParameters().withUpgradeDomainName("fhyhltrpmopjmcma"); + = new RuntimeResumeApplicationUpgradeParameters().withUpgradeDomainName("xerf"); model = BinaryData.fromObject(model).toObject(RuntimeResumeApplicationUpgradeParameters.class); - Assertions.assertEquals("fhyhltrpmopjmcma", model.upgradeDomainName()); + Assertions.assertEquals("xerf", model.upgradeDomainName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeRollingUpgradeUpdateMonitoringPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeRollingUpgradeUpdateMonitoringPolicyTests.java new file mode 100644 index 000000000000..161d1ad67622 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeRollingUpgradeUpdateMonitoringPolicyTests.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeFailureAction; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeMode; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeUpdateMonitoringPolicy; +import org.junit.jupiter.api.Assertions; + +public final class RuntimeRollingUpgradeUpdateMonitoringPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RuntimeRollingUpgradeUpdateMonitoringPolicy model = BinaryData.fromString( + "{\"rollingUpgradeMode\":\"UnmonitoredAuto\",\"forceRestart\":true,\"replicaSetCheckTimeoutInMilliseconds\":4325126672944286944,\"failureAction\":\"Rollback\",\"healthCheckWaitDurationInMilliseconds\":\"gnbuy\",\"healthCheckStableDurationInMilliseconds\":\"ijggmebfsiar\",\"healthCheckRetryTimeoutInMilliseconds\":\"trcvpnazzmh\",\"upgradeTimeoutInMilliseconds\":\"unmpxttd\",\"upgradeDomainTimeoutInMilliseconds\":\"rbnlankxmyskp\",\"instanceCloseDelayDurationInSeconds\":3194027088014349388}") + .toObject(RuntimeRollingUpgradeUpdateMonitoringPolicy.class); + Assertions.assertEquals(RuntimeRollingUpgradeMode.UNMONITORED_AUTO, model.rollingUpgradeMode()); + Assertions.assertTrue(model.forceRestart()); + Assertions.assertEquals(4325126672944286944L, model.replicaSetCheckTimeoutInMilliseconds()); + Assertions.assertEquals(RuntimeFailureAction.ROLLBACK, model.failureAction()); + Assertions.assertEquals("gnbuy", model.healthCheckWaitDurationInMilliseconds()); + Assertions.assertEquals("ijggmebfsiar", model.healthCheckStableDurationInMilliseconds()); + Assertions.assertEquals("trcvpnazzmh", model.healthCheckRetryTimeoutInMilliseconds()); + Assertions.assertEquals("unmpxttd", model.upgradeTimeoutInMilliseconds()); + Assertions.assertEquals("rbnlankxmyskp", model.upgradeDomainTimeoutInMilliseconds()); + Assertions.assertEquals(3194027088014349388L, model.instanceCloseDelayDurationInSeconds()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RuntimeRollingUpgradeUpdateMonitoringPolicy model = new RuntimeRollingUpgradeUpdateMonitoringPolicy() + .withRollingUpgradeMode(RuntimeRollingUpgradeMode.UNMONITORED_AUTO) + .withForceRestart(true) + .withReplicaSetCheckTimeoutInMilliseconds(4325126672944286944L) + .withFailureAction(RuntimeFailureAction.ROLLBACK) + .withHealthCheckWaitDurationInMilliseconds("gnbuy") + .withHealthCheckStableDurationInMilliseconds("ijggmebfsiar") + .withHealthCheckRetryTimeoutInMilliseconds("trcvpnazzmh") + .withUpgradeTimeoutInMilliseconds("unmpxttd") + .withUpgradeDomainTimeoutInMilliseconds("rbnlankxmyskp") + .withInstanceCloseDelayDurationInSeconds(3194027088014349388L); + model = BinaryData.fromObject(model).toObject(RuntimeRollingUpgradeUpdateMonitoringPolicy.class); + Assertions.assertEquals(RuntimeRollingUpgradeMode.UNMONITORED_AUTO, model.rollingUpgradeMode()); + Assertions.assertTrue(model.forceRestart()); + Assertions.assertEquals(4325126672944286944L, model.replicaSetCheckTimeoutInMilliseconds()); + Assertions.assertEquals(RuntimeFailureAction.ROLLBACK, model.failureAction()); + Assertions.assertEquals("gnbuy", model.healthCheckWaitDurationInMilliseconds()); + Assertions.assertEquals("ijggmebfsiar", model.healthCheckStableDurationInMilliseconds()); + Assertions.assertEquals("trcvpnazzmh", model.healthCheckRetryTimeoutInMilliseconds()); + Assertions.assertEquals("unmpxttd", model.upgradeTimeoutInMilliseconds()); + Assertions.assertEquals("rbnlankxmyskp", model.upgradeDomainTimeoutInMilliseconds()); + Assertions.assertEquals(3194027088014349388L, model.instanceCloseDelayDurationInSeconds()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeServiceTypeHealthPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeServiceTypeHealthPolicyTests.java new file mode 100644 index 000000000000..20633a03ded7 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeServiceTypeHealthPolicyTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeServiceTypeHealthPolicy; +import org.junit.jupiter.api.Assertions; + +public final class RuntimeServiceTypeHealthPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RuntimeServiceTypeHealthPolicy model = BinaryData.fromString( + "{\"maxPercentUnhealthyServices\":486608625,\"maxPercentUnhealthyPartitionsPerService\":1122159032,\"maxPercentUnhealthyReplicasPerPartition\":500953055}") + .toObject(RuntimeServiceTypeHealthPolicy.class); + Assertions.assertEquals(486608625, model.maxPercentUnhealthyServices()); + Assertions.assertEquals(1122159032, model.maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(500953055, model.maxPercentUnhealthyReplicasPerPartition()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RuntimeServiceTypeHealthPolicy model + = new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(486608625) + .withMaxPercentUnhealthyPartitionsPerService(1122159032) + .withMaxPercentUnhealthyReplicasPerPartition(500953055); + model = BinaryData.fromObject(model).toObject(RuntimeServiceTypeHealthPolicy.class); + Assertions.assertEquals(486608625, model.maxPercentUnhealthyServices()); + Assertions.assertEquals(1122159032, model.maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(500953055, model.maxPercentUnhealthyReplicasPerPartition()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeUpdateApplicationUpgradeParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeUpdateApplicationUpgradeParametersTests.java new file mode 100644 index 000000000000..17f02adc3aa3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeUpdateApplicationUpgradeParametersTests.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeApplicationHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeFailureAction; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeMode; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeRollingUpgradeUpdateMonitoringPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeServiceTypeHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpdateApplicationUpgradeParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeUpgradeKind; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class RuntimeUpdateApplicationUpgradeParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RuntimeUpdateApplicationUpgradeParameters model = BinaryData.fromString( + "{\"name\":\"wutttxfvjrbi\",\"upgradeKind\":\"Rolling\",\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":684290279,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":99482426,\"maxPercentUnhealthyPartitionsPerService\":536989913,\"maxPercentUnhealthyReplicasPerPartition\":1103023268},\"serviceTypeHealthPolicyMap\":{\"jky\":{\"maxPercentUnhealthyServices\":1504948811,\"maxPercentUnhealthyPartitionsPerService\":1195568358,\"maxPercentUnhealthyReplicasPerPartition\":772905747},\"uujqgidokgjljyo\":{\"maxPercentUnhealthyServices\":1084643517,\"maxPercentUnhealthyPartitionsPerService\":197436298,\"maxPercentUnhealthyReplicasPerPartition\":1238878906}}},\"updateDescription\":{\"rollingUpgradeMode\":\"UnmonitoredAuto\",\"forceRestart\":true,\"replicaSetCheckTimeoutInMilliseconds\":7617371072440792626,\"failureAction\":\"Rollback\",\"healthCheckWaitDurationInMilliseconds\":\"ghkjeszzhbi\",\"healthCheckStableDurationInMilliseconds\":\"txfvgx\",\"healthCheckRetryTimeoutInMilliseconds\":\"smx\",\"upgradeTimeoutInMilliseconds\":\"hmpvecx\",\"upgradeDomainTimeoutInMilliseconds\":\"debfqkkrbmpukgri\",\"instanceCloseDelayDurationInSeconds\":1675759018761850231}}") + .toObject(RuntimeUpdateApplicationUpgradeParameters.class); + Assertions.assertEquals("wutttxfvjrbi", model.name()); + Assertions.assertEquals(RuntimeUpgradeKind.ROLLING, model.upgradeKind()); + Assertions.assertTrue(model.applicationHealthPolicy().considerWarningAsError()); + Assertions.assertEquals(684290279, model.applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); + Assertions.assertEquals(99482426, + model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices()); + Assertions.assertEquals(536989913, + model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(1103023268, + model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition()); + Assertions.assertEquals(1504948811, + model.applicationHealthPolicy().serviceTypeHealthPolicyMap().get("jky").maxPercentUnhealthyServices()); + Assertions.assertEquals(1195568358, + model.applicationHealthPolicy() + .serviceTypeHealthPolicyMap() + .get("jky") + .maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(772905747, + model.applicationHealthPolicy() + .serviceTypeHealthPolicyMap() + .get("jky") + .maxPercentUnhealthyReplicasPerPartition()); + Assertions.assertEquals(RuntimeRollingUpgradeMode.UNMONITORED_AUTO, + model.updateDescription().rollingUpgradeMode()); + Assertions.assertTrue(model.updateDescription().forceRestart()); + Assertions.assertEquals(7617371072440792626L, model.updateDescription().replicaSetCheckTimeoutInMilliseconds()); + Assertions.assertEquals(RuntimeFailureAction.ROLLBACK, model.updateDescription().failureAction()); + Assertions.assertEquals("ghkjeszzhbi", model.updateDescription().healthCheckWaitDurationInMilliseconds()); + Assertions.assertEquals("txfvgx", model.updateDescription().healthCheckStableDurationInMilliseconds()); + Assertions.assertEquals("smx", model.updateDescription().healthCheckRetryTimeoutInMilliseconds()); + Assertions.assertEquals("hmpvecx", model.updateDescription().upgradeTimeoutInMilliseconds()); + Assertions.assertEquals("debfqkkrbmpukgri", model.updateDescription().upgradeDomainTimeoutInMilliseconds()); + Assertions.assertEquals(1675759018761850231L, model.updateDescription().instanceCloseDelayDurationInSeconds()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RuntimeUpdateApplicationUpgradeParameters model + = new RuntimeUpdateApplicationUpgradeParameters().withName("wutttxfvjrbi") + .withUpgradeKind(RuntimeUpgradeKind.ROLLING) + .withApplicationHealthPolicy(new RuntimeApplicationHealthPolicy().withConsiderWarningAsError(true) + .withMaxPercentUnhealthyDeployedApplications(684290279) + .withDefaultServiceTypeHealthPolicy( + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(99482426) + .withMaxPercentUnhealthyPartitionsPerService(536989913) + .withMaxPercentUnhealthyReplicasPerPartition(1103023268)) + .withServiceTypeHealthPolicyMap(mapOf("jky", + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1504948811) + .withMaxPercentUnhealthyPartitionsPerService(1195568358) + .withMaxPercentUnhealthyReplicasPerPartition(772905747), + "uujqgidokgjljyo", + new RuntimeServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1084643517) + .withMaxPercentUnhealthyPartitionsPerService(197436298) + .withMaxPercentUnhealthyReplicasPerPartition(1238878906)))) + .withUpdateDescription(new RuntimeRollingUpgradeUpdateMonitoringPolicy() + .withRollingUpgradeMode(RuntimeRollingUpgradeMode.UNMONITORED_AUTO) + .withForceRestart(true) + .withReplicaSetCheckTimeoutInMilliseconds(7617371072440792626L) + .withFailureAction(RuntimeFailureAction.ROLLBACK) + .withHealthCheckWaitDurationInMilliseconds("ghkjeszzhbi") + .withHealthCheckStableDurationInMilliseconds("txfvgx") + .withHealthCheckRetryTimeoutInMilliseconds("smx") + .withUpgradeTimeoutInMilliseconds("hmpvecx") + .withUpgradeDomainTimeoutInMilliseconds("debfqkkrbmpukgri") + .withInstanceCloseDelayDurationInSeconds(1675759018761850231L)); + model = BinaryData.fromObject(model).toObject(RuntimeUpdateApplicationUpgradeParameters.class); + Assertions.assertEquals("wutttxfvjrbi", model.name()); + Assertions.assertEquals(RuntimeUpgradeKind.ROLLING, model.upgradeKind()); + Assertions.assertTrue(model.applicationHealthPolicy().considerWarningAsError()); + Assertions.assertEquals(684290279, model.applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); + Assertions.assertEquals(99482426, + model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices()); + Assertions.assertEquals(536989913, + model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(1103023268, + model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition()); + Assertions.assertEquals(1504948811, + model.applicationHealthPolicy().serviceTypeHealthPolicyMap().get("jky").maxPercentUnhealthyServices()); + Assertions.assertEquals(1195568358, + model.applicationHealthPolicy() + .serviceTypeHealthPolicyMap() + .get("jky") + .maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(772905747, + model.applicationHealthPolicy() + .serviceTypeHealthPolicyMap() + .get("jky") + .maxPercentUnhealthyReplicasPerPartition()); + Assertions.assertEquals(RuntimeRollingUpgradeMode.UNMONITORED_AUTO, + model.updateDescription().rollingUpgradeMode()); + Assertions.assertTrue(model.updateDescription().forceRestart()); + Assertions.assertEquals(7617371072440792626L, model.updateDescription().replicaSetCheckTimeoutInMilliseconds()); + Assertions.assertEquals(RuntimeFailureAction.ROLLBACK, model.updateDescription().failureAction()); + Assertions.assertEquals("ghkjeszzhbi", model.updateDescription().healthCheckWaitDurationInMilliseconds()); + Assertions.assertEquals("txfvgx", model.updateDescription().healthCheckStableDurationInMilliseconds()); + Assertions.assertEquals("smx", model.updateDescription().healthCheckRetryTimeoutInMilliseconds()); + Assertions.assertEquals("hmpvecx", model.updateDescription().upgradeTimeoutInMilliseconds()); + Assertions.assertEquals("debfqkkrbmpukgri", model.updateDescription().upgradeDomainTimeoutInMilliseconds()); + Assertions.assertEquals(1675759018761850231L, model.updateDescription().instanceCloseDelayDurationInSeconds()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static <T> Map<String, T> mapOf(Object... inputs) { + Map<String, T> map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceCorrelationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceCorrelationTests.java index 7c1223dc9501..403a02f6d890 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceCorrelationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceCorrelationTests.java @@ -12,18 +12,19 @@ public final class ServiceCorrelationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ServiceCorrelation model = BinaryData.fromString("{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ni\"}") - .toObject(ServiceCorrelation.class); - Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.scheme()); - Assertions.assertEquals("ni", model.serviceName()); + ServiceCorrelation model + = BinaryData.fromString("{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"bncblylpstdbhhx\"}") + .toObject(ServiceCorrelation.class); + Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.scheme()); + Assertions.assertEquals("bncblylpstdbhhx", model.serviceName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceCorrelation model - = new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY).withServiceName("ni"); + ServiceCorrelation model = new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) + .withServiceName("bncblylpstdbhhx"); model = BinaryData.fromObject(model).toObject(ServiceCorrelation.class); - Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.scheme()); - Assertions.assertEquals("ni", model.serviceName()); + Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.scheme()); + Assertions.assertEquals("bncblylpstdbhhx", model.serviceName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceEndpointTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceEndpointTests.java index fc4a1a3d5713..f678542f8d89 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceEndpointTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceEndpointTests.java @@ -13,21 +13,22 @@ public final class ServiceEndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceEndpoint model = BinaryData - .fromString("{\"service\":\"dvwvgpio\",\"locations\":[\"xrtfudxep\"],\"networkIdentifier\":\"yqagvrvm\"}") + .fromString( + "{\"service\":\"ayffim\",\"locations\":[\"tuzqogsexne\",\"fdnw\"],\"networkIdentifier\":\"mewzsyyc\"}") .toObject(ServiceEndpoint.class); - Assertions.assertEquals("dvwvgpio", model.service()); - Assertions.assertEquals("xrtfudxep", model.locations().get(0)); - Assertions.assertEquals("yqagvrvm", model.networkIdentifier()); + Assertions.assertEquals("ayffim", model.service()); + Assertions.assertEquals("tuzqogsexne", model.locations().get(0)); + Assertions.assertEquals("mewzsyyc", model.networkIdentifier()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceEndpoint model = new ServiceEndpoint().withService("dvwvgpio") - .withLocations(Arrays.asList("xrtfudxep")) - .withNetworkIdentifier("yqagvrvm"); + ServiceEndpoint model = new ServiceEndpoint().withService("ayffim") + .withLocations(Arrays.asList("tuzqogsexne", "fdnw")) + .withNetworkIdentifier("mewzsyyc"); model = BinaryData.fromObject(model).toObject(ServiceEndpoint.class); - Assertions.assertEquals("dvwvgpio", model.service()); - Assertions.assertEquals("xrtfudxep", model.locations().get(0)); - Assertions.assertEquals("yqagvrvm", model.networkIdentifier()); + Assertions.assertEquals("ayffim", model.service()); + Assertions.assertEquals("tuzqogsexne", model.locations().get(0)); + Assertions.assertEquals("mewzsyyc", model.networkIdentifier()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceLoadMetricTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceLoadMetricTests.java index d9ef27547bca..13b919e9b210 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceLoadMetricTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceLoadMetricTests.java @@ -13,27 +13,27 @@ public final class ServiceLoadMetricTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceLoadMetric model = BinaryData.fromString( - "{\"name\":\"kxfbkpycgklwndn\",\"weight\":\"High\",\"primaryDefaultLoad\":1922459268,\"secondaryDefaultLoad\":2043748556,\"defaultLoad\":1020918643}") + "{\"name\":\"rzdzucerscdnt\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1072156994,\"secondaryDefaultLoad\":2060062752,\"defaultLoad\":511652180}") .toObject(ServiceLoadMetric.class); - Assertions.assertEquals("kxfbkpycgklwndn", model.name()); - Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.weight()); - Assertions.assertEquals(1922459268, model.primaryDefaultLoad()); - Assertions.assertEquals(2043748556, model.secondaryDefaultLoad()); - Assertions.assertEquals(1020918643, model.defaultLoad()); + Assertions.assertEquals("rzdzucerscdnt", model.name()); + Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, model.weight()); + Assertions.assertEquals(1072156994, model.primaryDefaultLoad()); + Assertions.assertEquals(2060062752, model.secondaryDefaultLoad()); + Assertions.assertEquals(511652180, model.defaultLoad()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceLoadMetric model = new ServiceLoadMetric().withName("kxfbkpycgklwndn") - .withWeight(ServiceLoadMetricWeight.HIGH) - .withPrimaryDefaultLoad(1922459268) - .withSecondaryDefaultLoad(2043748556) - .withDefaultLoad(1020918643); + ServiceLoadMetric model = new ServiceLoadMetric().withName("rzdzucerscdnt") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(1072156994) + .withSecondaryDefaultLoad(2060062752) + .withDefaultLoad(511652180); model = BinaryData.fromObject(model).toObject(ServiceLoadMetric.class); - Assertions.assertEquals("kxfbkpycgklwndn", model.name()); - Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.weight()); - Assertions.assertEquals(1922459268, model.primaryDefaultLoad()); - Assertions.assertEquals(2043748556, model.secondaryDefaultLoad()); - Assertions.assertEquals(1020918643, model.defaultLoad()); + Assertions.assertEquals("rzdzucerscdnt", model.name()); + Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, model.weight()); + Assertions.assertEquals(1072156994, model.primaryDefaultLoad()); + Assertions.assertEquals(2060062752, model.secondaryDefaultLoad()); + Assertions.assertEquals(511652180, model.defaultLoad()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementInvalidDomainPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementInvalidDomainPolicyTests.java index 0dec5d5ab047..0e7445ca71f1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementInvalidDomainPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementInvalidDomainPolicyTests.java @@ -12,15 +12,16 @@ public final class ServicePlacementInvalidDomainPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServicePlacementInvalidDomainPolicy model - = BinaryData.fromString("{\"type\":\"InvalidDomain\",\"domainName\":\"l\"}") + = BinaryData.fromString("{\"type\":\"InvalidDomain\",\"domainName\":\"gtdsslswt\"}") .toObject(ServicePlacementInvalidDomainPolicy.class); - Assertions.assertEquals("l", model.domainName()); + Assertions.assertEquals("gtdsslswt", model.domainName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServicePlacementInvalidDomainPolicy model = new ServicePlacementInvalidDomainPolicy().withDomainName("l"); + ServicePlacementInvalidDomainPolicy model + = new ServicePlacementInvalidDomainPolicy().withDomainName("gtdsslswt"); model = BinaryData.fromObject(model).toObject(ServicePlacementInvalidDomainPolicy.class); - Assertions.assertEquals("l", model.domainName()); + Assertions.assertEquals("gtdsslswt", model.domainName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementPreferPrimaryDomainPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementPreferPrimaryDomainPolicyTests.java index 6bbd49ca12f3..637d7effc1e1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementPreferPrimaryDomainPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementPreferPrimaryDomainPolicyTests.java @@ -12,16 +12,16 @@ public final class ServicePlacementPreferPrimaryDomainPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServicePlacementPreferPrimaryDomainPolicy model - = BinaryData.fromString("{\"type\":\"PreferredPrimaryDomain\",\"domainName\":\"xujznbmpowu\"}") + = BinaryData.fromString("{\"type\":\"PreferredPrimaryDomain\",\"domainName\":\"abnetshh\"}") .toObject(ServicePlacementPreferPrimaryDomainPolicy.class); - Assertions.assertEquals("xujznbmpowu", model.domainName()); + Assertions.assertEquals("abnetshh", model.domainName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServicePlacementPreferPrimaryDomainPolicy model - = new ServicePlacementPreferPrimaryDomainPolicy().withDomainName("xujznbmpowu"); + = new ServicePlacementPreferPrimaryDomainPolicy().withDomainName("abnetshh"); model = BinaryData.fromObject(model).toObject(ServicePlacementPreferPrimaryDomainPolicy.class); - Assertions.assertEquals("xujznbmpowu", model.domainName()); + Assertions.assertEquals("abnetshh", model.domainName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequireDomainDistributionPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequireDomainDistributionPolicyTests.java index 96453347b5c5..dd12afd99f7b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequireDomainDistributionPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequireDomainDistributionPolicyTests.java @@ -12,16 +12,16 @@ public final class ServicePlacementRequireDomainDistributionPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServicePlacementRequireDomainDistributionPolicy model - = BinaryData.fromString("{\"type\":\"RequiredDomainDistribution\",\"domainName\":\"przqlveu\"}") + = BinaryData.fromString("{\"type\":\"RequiredDomainDistribution\",\"domainName\":\"zhedplvwiw\"}") .toObject(ServicePlacementRequireDomainDistributionPolicy.class); - Assertions.assertEquals("przqlveu", model.domainName()); + Assertions.assertEquals("zhedplvwiw", model.domainName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServicePlacementRequireDomainDistributionPolicy model - = new ServicePlacementRequireDomainDistributionPolicy().withDomainName("przqlveu"); + = new ServicePlacementRequireDomainDistributionPolicy().withDomainName("zhedplvwiw"); model = BinaryData.fromObject(model).toObject(ServicePlacementRequireDomainDistributionPolicy.class); - Assertions.assertEquals("przqlveu", model.domainName()); + Assertions.assertEquals("zhedplvwiw", model.domainName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequiredDomainPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequiredDomainPolicyTests.java index 14bb44f7f7b7..ed7f813fd6c6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequiredDomainPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequiredDomainPolicyTests.java @@ -12,15 +12,16 @@ public final class ServicePlacementRequiredDomainPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServicePlacementRequiredDomainPolicy model - = BinaryData.fromString("{\"type\":\"RequiredDomain\",\"domainName\":\"zbtd\"}") + = BinaryData.fromString("{\"type\":\"RequiredDomain\",\"domainName\":\"weriofzpyqsem\"}") .toObject(ServicePlacementRequiredDomainPolicy.class); - Assertions.assertEquals("zbtd", model.domainName()); + Assertions.assertEquals("weriofzpyqsem", model.domainName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServicePlacementRequiredDomainPolicy model = new ServicePlacementRequiredDomainPolicy().withDomainName("zbtd"); + ServicePlacementRequiredDomainPolicy model + = new ServicePlacementRequiredDomainPolicy().withDomainName("weriofzpyqsem"); model = BinaryData.fromObject(model).toObject(ServicePlacementRequiredDomainPolicy.class); - Assertions.assertEquals("zbtd", model.domainName()); + Assertions.assertEquals("weriofzpyqsem", model.domainName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceInnerTests.java index d942cab4f2a5..dc96b50cabd4 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceInnerTests.java @@ -27,71 +27,75 @@ public final class ServiceResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceResourceInner model = BinaryData.fromString( - "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"rsyn\",\"serviceTypeName\":\"qidybyx\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"lhaaxdbabp\",\"placementConstraints\":\"wrqlfktsthsuco\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"yazttbtwwrqpue\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"kzywbiex\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"eyueaxibxujwb\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"walm\"}],\"serviceLoadMetrics\":[{\"name\":\"oxaepd\",\"weight\":\"Low\",\"primaryDefaultLoad\":104874824,\"secondaryDefaultLoad\":350095412,\"defaultLoad\":901682674}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"High\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"tsdbpgn\":\"niwdjsw\",\"xbzpfzab\":\"ytxhp\"},\"location\":\"cuh\",\"id\":\"tcty\",\"name\":\"iklbbovpl\",\"type\":\"zbhvgyuguosv\"}") + "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"bpbewtghfgb\",\"serviceTypeName\":\"c\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"vlvqhjkbegi\",\"placementConstraints\":\"nmxiebwwaloayqc\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"zjuzgwyz\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"txon\"}],\"serviceLoadMetrics\":[{\"name\":\"savjcbpwxqps\",\"weight\":\"Medium\",\"primaryDefaultLoad\":168456950,\"secondaryDefaultLoad\":487735132,\"defaultLoad\":1935483255}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"bexrmcq\":\"yvxqtayriwwroy\",\"e\":\"bycnojvkn\",\"zhpvgqzcjrvxd\":\"qsgzvahapj\"},\"location\":\"lmwlxkvugfhzo\",\"id\":\"wjvzunluthnn\",\"name\":\"rnxipei\",\"type\":\"pjzu\"}") .toObject(ServiceResourceInner.class); - Assertions.assertEquals("wrqlfktsthsuco", model.properties().placementConstraints()); - Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, + Assertions.assertEquals("nmxiebwwaloayqc", model.properties().placementConstraints()); + Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("yazttbtwwrqpue", model.properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("oxaepd", model.properties().serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(104874824, model.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(350095412, model.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(901682674, model.properties().serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.HIGH, model.properties().defaultMoveCost()); - Assertions.assertEquals("qidybyx", model.properties().serviceTypeName()); + Assertions.assertEquals("zjuzgwyz", model.properties().correlationScheme().get(0).serviceName()); + Assertions.assertEquals("savjcbpwxqps", model.properties().serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, + model.properties().serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(168456950, model.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(487735132, model.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(1935483255, model.properties().serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.MEDIUM, model.properties().defaultMoveCost()); + Assertions.assertEquals("c", model.properties().serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.properties().servicePackageActivationMode()); - Assertions.assertEquals("lhaaxdbabp", model.properties().serviceDnsName()); - Assertions.assertEquals("niwdjsw", model.tags().get("tsdbpgn")); - Assertions.assertEquals("cuh", model.location()); + Assertions.assertEquals("vlvqhjkbegi", model.properties().serviceDnsName()); + Assertions.assertEquals("yvxqtayriwwroy", model.tags().get("bexrmcq")); + Assertions.assertEquals("lmwlxkvugfhzo", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServiceResourceInner model = new ServiceResourceInner() - .withProperties(new ServiceResourceProperties().withPlacementConstraints("wrqlfktsthsuco") + .withProperties(new ServiceResourceProperties().withPlacementConstraints("nmxiebwwaloayqc") .withCorrelationScheme(Arrays.asList( - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) - .withServiceName("yazttbtwwrqpue"), new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("kzywbiex"), - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) - .withServiceName("eyueaxibxujwb"), + .withServiceName("zjuzgwyz"), new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("walm"))) - .withServiceLoadMetrics(Arrays.asList(new ServiceLoadMetric().withName("oxaepd") - .withWeight(ServiceLoadMetricWeight.LOW) - .withPrimaryDefaultLoad(104874824) - .withSecondaryDefaultLoad(350095412) - .withDefaultLoad(901682674))) - .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.HIGH) - .withScalingPolicies(Arrays.asList(new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()))) - .withServiceTypeName("qidybyx") + .withServiceName("txon"))) + .withServiceLoadMetrics(Arrays.asList(new ServiceLoadMetric().withName("savjcbpwxqps") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(168456950) + .withSecondaryDefaultLoad(487735132) + .withDefaultLoad(1935483255))) + .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), + new ServicePlacementPolicy())) + .withDefaultMoveCost(MoveCost.MEDIUM) + .withScalingPolicies(Arrays.asList( + new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) + .withScalingTrigger(new ScalingTrigger()), + new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) + .withScalingTrigger(new ScalingTrigger()), + new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) + .withScalingTrigger(new ScalingTrigger()))) + .withServiceTypeName("c") .withPartitionDescription(new Partition()) .withServicePackageActivationMode(ServicePackageActivationMode.EXCLUSIVE_PROCESS) - .withServiceDnsName("lhaaxdbabp")) - .withTags(mapOf("tsdbpgn", "niwdjsw", "xbzpfzab", "ytxhp")) - .withLocation("cuh"); + .withServiceDnsName("vlvqhjkbegi")) + .withTags(mapOf("bexrmcq", "yvxqtayriwwroy", "e", "bycnojvkn", "zhpvgqzcjrvxd", "qsgzvahapj")) + .withLocation("lmwlxkvugfhzo"); model = BinaryData.fromObject(model).toObject(ServiceResourceInner.class); - Assertions.assertEquals("wrqlfktsthsuco", model.properties().placementConstraints()); - Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, + Assertions.assertEquals("nmxiebwwaloayqc", model.properties().placementConstraints()); + Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("yazttbtwwrqpue", model.properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("oxaepd", model.properties().serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(104874824, model.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(350095412, model.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(901682674, model.properties().serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.HIGH, model.properties().defaultMoveCost()); - Assertions.assertEquals("qidybyx", model.properties().serviceTypeName()); + Assertions.assertEquals("zjuzgwyz", model.properties().correlationScheme().get(0).serviceName()); + Assertions.assertEquals("savjcbpwxqps", model.properties().serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, + model.properties().serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(168456950, model.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(487735132, model.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(1935483255, model.properties().serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.MEDIUM, model.properties().defaultMoveCost()); + Assertions.assertEquals("c", model.properties().serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.properties().servicePackageActivationMode()); - Assertions.assertEquals("lhaaxdbabp", model.properties().serviceDnsName()); - Assertions.assertEquals("niwdjsw", model.tags().get("tsdbpgn")); - Assertions.assertEquals("cuh", model.location()); + Assertions.assertEquals("vlvqhjkbegi", model.properties().serviceDnsName()); + Assertions.assertEquals("yvxqtayriwwroy", model.tags().get("bexrmcq")); + Assertions.assertEquals("lmwlxkvugfhzo", model.location()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceListTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceListTests.java index 14fd96e5c9c0..a416f328ace7 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceListTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceListTests.java @@ -16,28 +16,28 @@ public final class ServiceResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"wlxkvugfhzovaw\",\"serviceTypeName\":\"vzunluthnnprnxi\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"pjzu\",\"placementConstraints\":\"jxdultskzbbtdzu\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"kgpwoz\"}],\"serviceLoadMetrics\":[{\"name\":\"fpbsjyofdxl\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1856979158,\"secondaryDefaultLoad\":1422945070,\"defaultLoad\":1252528512},{\"name\":\"aboekqv\",\"weight\":\"Zero\",\"primaryDefaultLoad\":643648278,\"secondaryDefaultLoad\":566883460,\"defaultLoad\":314739755}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"oyaqcslyjpkiid\":\"caalnjixisxyaw\",\"eli\":\"yexz\",\"bnxknalaulppg\":\"hnrztfol\"},\"location\":\"tpnapnyiropuhpig\",\"id\":\"gylgqgitxmedjvcs\",\"name\":\"ynqwwncwzzhxgk\",\"type\":\"rmgucnap\"},{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"oellwp\",\"serviceTypeName\":\"fdygpfqbuaceopz\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"huaoppp\",\"placementConstraints\":\"eqx\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ahzxctobgbk\"}],\"serviceLoadMetrics\":[{\"name\":\"izpost\",\"weight\":\"Low\",\"primaryDefaultLoad\":1065588244,\"secondaryDefaultLoad\":1002036598,\"defaultLoad\":1194461063},{\"name\":\"mfqjhhkxbp\",\"weight\":\"High\",\"primaryDefaultLoad\":1776506496,\"secondaryDefaultLoad\":1775545087,\"defaultLoad\":256415791},{\"name\":\"yngudivk\",\"weight\":\"Low\",\"primaryDefaultLoad\":1042702068,\"secondaryDefaultLoad\":1688847935,\"defaultLoad\":1519965226},{\"name\":\"szjfauvjfdxxivet\",\"weight\":\"Medium\",\"primaryDefaultLoad\":393815457,\"secondaryDefaultLoad\":730619532,\"defaultLoad\":1493412527}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"fxoblytkb\":\"xyslqbh\",\"wfbkrvrns\":\"mpew\"},\"location\":\"hqjohxcrsbfova\",\"id\":\"ruvw\",\"name\":\"hsqfsubcgjbirxbp\",\"type\":\"bsrfbj\"},{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"w\",\"serviceTypeName\":\"sotftpvj\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"ilzznfqqnvwp\",\"placementConstraints\":\"taruoujmkcj\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"tjrybnwjewgdr\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"rvnaenqpeh\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"doy\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ifthnz\"}],\"serviceLoadMetrics\":[{\"name\":\"sl\",\"weight\":\"Medium\",\"primaryDefaultLoad\":782103033,\"secondaryDefaultLoad\":1611377785,\"defaultLoad\":1427716289},{\"name\":\"duhavhqlkt\",\"weight\":\"High\",\"primaryDefaultLoad\":1712324120,\"secondaryDefaultLoad\":709486053,\"defaultLoad\":1315398087},{\"name\":\"ycduier\",\"weight\":\"High\",\"primaryDefaultLoad\":178925296,\"secondaryDefaultLoad\":595633272,\"defaultLoad\":50940581},{\"name\":\"l\",\"weight\":\"Medium\",\"primaryDefaultLoad\":245335843,\"secondaryDefaultLoad\":1979529158,\"defaultLoad\":1277939729}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"sadbz\":\"swiydmcwyhzdx\",\"dvxzbncblylpst\":\"nvdfznuda\",\"rsc\":\"bhhxsrzdzuc\"},\"location\":\"t\",\"id\":\"vfiwjmygtdss\",\"name\":\"s\",\"type\":\"tmweriofzpyq\"},{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"wab\",\"serviceTypeName\":\"ets\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"h\",\"placementConstraints\":\"plvwiwubmwmbes\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"wwtppj\"}],\"serviceLoadMetrics\":[{\"name\":\"xogaokonzmnsikv\",\"weight\":\"High\",\"primaryDefaultLoad\":611254930,\"secondaryDefaultLoad\":1625673068,\"defaultLoad\":1175665004},{\"name\":\"l\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1014332587,\"secondaryDefaultLoad\":187973075,\"defaultLoad\":1086084158},{\"name\":\"gureodkwobdag\",\"weight\":\"High\",\"primaryDefaultLoad\":1795454962,\"secondaryDefaultLoad\":1120938995,\"defaultLoad\":1020209011}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"High\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"bpodxunkbebxm\":\"ndlkzgxhurip\",\"oievseotgqrlltm\":\"byyntwlrbqt\",\"jefuzmuvpbttdumo\":\"wlauwzizxbmpg\"},\"location\":\"pxebmnzbt\",\"id\":\"jpglkfgohdne\",\"name\":\"el\",\"type\":\"phsdyhto\"}],\"nextLink\":\"ikdowwquuvx\"}") + "{\"value\":[{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"ttdumorppxebmnzb\",\"serviceTypeName\":\"bhjpglkfgohdne\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"phsdyhto\",\"placementConstraints\":\"ikdowwquuvx\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"vithh\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"o\"}],\"serviceLoadMetrics\":[{\"name\":\"ggbhcohfwds\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1077119628,\"secondaryDefaultLoad\":215049895,\"defaultLoad\":1496719551}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"High\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"pnppfuf\":\"dkzzewkfvhqcrail\"},\"location\":\"wdmhdlxyjrxs\",\"id\":\"afcnih\",\"name\":\"wqapnedgfbcvk\",\"type\":\"vq\"},{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"eqdcv\",\"serviceTypeName\":\"rhvoods\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"bzdopcj\",\"placementConstraints\":\"nhdldwmgxcx\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"mutwuoe\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"pkhjwni\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"sluicpdggkzz\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"mbmpaxmodfvuefy\"}],\"serviceLoadMetrics\":[{\"name\":\"pfvmwyhrfou\",\"weight\":\"Low\",\"primaryDefaultLoad\":938616277,\"secondaryDefaultLoad\":988727085,\"defaultLoad\":1662588727},{\"name\":\"iyzvqtmnub\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1989438546,\"secondaryDefaultLoad\":1254452597,\"defaultLoad\":1550438212}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"v\":\"ypomgkopkwho\",\"mocmbqfqvmk\":\"ajqgxy\",\"helxprglya\":\"xozap\",\"kcbcue\":\"dd\"},\"location\":\"jxgciqibrh\",\"id\":\"xsdqrhzoymibmrqy\",\"name\":\"bahwfl\",\"type\":\"szdtmhrkwof\"}],\"nextLink\":\"voqacpiexpbt\"}") .toObject(ServiceResourceList.class); - Assertions.assertEquals("jxdultskzbbtdzu", model.value().get(0).properties().placementConstraints()); - Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, + Assertions.assertEquals("ikdowwquuvx", model.value().get(0).properties().placementConstraints()); + Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.value().get(0).properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("kgpwoz", model.value().get(0).properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("fpbsjyofdxl", model.value().get(0).properties().serviceLoadMetrics().get(0).name()); + Assertions.assertEquals("vithh", model.value().get(0).properties().correlationScheme().get(0).serviceName()); + Assertions.assertEquals("ggbhcohfwds", model.value().get(0).properties().serviceLoadMetrics().get(0).name()); Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, model.value().get(0).properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(1856979158, + Assertions.assertEquals(1077119628, model.value().get(0).properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(1422945070, + Assertions.assertEquals(215049895, model.value().get(0).properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1252528512, + Assertions.assertEquals(1496719551, model.value().get(0).properties().serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.LOW, model.value().get(0).properties().defaultMoveCost()); - Assertions.assertEquals("vzunluthnnprnxi", model.value().get(0).properties().serviceTypeName()); + Assertions.assertEquals(MoveCost.HIGH, model.value().get(0).properties().defaultMoveCost()); + Assertions.assertEquals("bhjpglkfgohdne", model.value().get(0).properties().serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.value().get(0).properties().servicePackageActivationMode()); - Assertions.assertEquals("pjzu", model.value().get(0).properties().serviceDnsName()); - Assertions.assertEquals("caalnjixisxyaw", model.value().get(0).tags().get("oyaqcslyjpkiid")); - Assertions.assertEquals("tpnapnyiropuhpig", model.value().get(0).location()); - Assertions.assertEquals("ikdowwquuvx", model.nextLink()); + Assertions.assertEquals("phsdyhto", model.value().get(0).properties().serviceDnsName()); + Assertions.assertEquals("dkzzewkfvhqcrail", model.value().get(0).tags().get("pnppfuf")); + Assertions.assertEquals("wdmhdlxyjrxs", model.value().get(0).location()); + Assertions.assertEquals("voqacpiexpbt", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesBaseTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesBaseTests.java index 87206561434d..307a6d482e4a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesBaseTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesBaseTests.java @@ -22,63 +22,53 @@ public final class ServiceResourcePropertiesBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceResourcePropertiesBase model = BinaryData.fromString( - "{\"placementConstraints\":\"uhashsfwx\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"z\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ugicjooxdjebw\"}],\"serviceLoadMetrics\":[{\"name\":\"wwfvov\",\"weight\":\"Zero\",\"primaryDefaultLoad\":2004605521,\"secondaryDefaultLoad\":321338352,\"defaultLoad\":1542315989},{\"name\":\"yhz\",\"weight\":\"Low\",\"primaryDefaultLoad\":1339093969,\"secondaryDefaultLoad\":745513484,\"defaultLoad\":1026391011},{\"name\":\"jueiotwmcdytd\",\"weight\":\"Zero\",\"primaryDefaultLoad\":838785311,\"secondaryDefaultLoad\":1070997174,\"defaultLoad\":381866779}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") + "{\"placementConstraints\":\"ndslgnayqigynduh\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"lkthu\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"qolbgyc\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"iertgccymvaolp\"}],\"serviceLoadMetrics\":[{\"name\":\"qlfmmdnbb\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1340500207,\"secondaryDefaultLoad\":870818177,\"defaultLoad\":220182660},{\"name\":\"mcwyhzdxssadb\",\"weight\":\"Medium\",\"primaryDefaultLoad\":487755858,\"secondaryDefaultLoad\":1045217690,\"defaultLoad\":307071571}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"High\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") .toObject(ServiceResourcePropertiesBase.class); - Assertions.assertEquals("uhashsfwx", model.placementConstraints()); + Assertions.assertEquals("ndslgnayqigynduh", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("z", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("wwfvov", model.serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(2004605521, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(321338352, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1542315989, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.LOW, model.defaultMoveCost()); + Assertions.assertEquals("lkthu", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("qlfmmdnbb", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, model.serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(1340500207, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(870818177, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(220182660, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceResourcePropertiesBase model = new ServiceResourcePropertiesBase().withPlacementConstraints("uhashsfwx") + ServiceResourcePropertiesBase model = new ServiceResourcePropertiesBase() + .withPlacementConstraints("ndslgnayqigynduh") .withCorrelationScheme(Arrays.asList( - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY).withServiceName("z"), + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY).withServiceName("lkthu"), new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("ugicjooxdjebw"))) + .withServiceName("qolbgyc"), + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) + .withServiceName("iertgccymvaolp"))) .withServiceLoadMetrics(Arrays.asList( - new ServiceLoadMetric().withName("wwfvov") - .withWeight(ServiceLoadMetricWeight.ZERO) - .withPrimaryDefaultLoad(2004605521) - .withSecondaryDefaultLoad(321338352) - .withDefaultLoad(1542315989), - new ServiceLoadMetric().withName("yhz") - .withWeight(ServiceLoadMetricWeight.LOW) - .withPrimaryDefaultLoad(1339093969) - .withSecondaryDefaultLoad(745513484) - .withDefaultLoad(1026391011), - new ServiceLoadMetric().withName("jueiotwmcdytd") - .withWeight(ServiceLoadMetricWeight.ZERO) - .withPrimaryDefaultLoad(838785311) - .withSecondaryDefaultLoad(1070997174) - .withDefaultLoad(381866779))) - .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), - new ServicePlacementPolicy(), new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.LOW) - .withScalingPolicies(Arrays.asList( - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()))); + new ServiceLoadMetric().withName("qlfmmdnbb") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(1340500207) + .withSecondaryDefaultLoad(870818177) + .withDefaultLoad(220182660), + new ServiceLoadMetric().withName("mcwyhzdxssadb") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(487755858) + .withSecondaryDefaultLoad(1045217690) + .withDefaultLoad(307071571))) + .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy())) + .withDefaultMoveCost(MoveCost.HIGH) + .withScalingPolicies(Arrays.asList(new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) + .withScalingTrigger(new ScalingTrigger()))); model = BinaryData.fromObject(model).toObject(ServiceResourcePropertiesBase.class); - Assertions.assertEquals("uhashsfwx", model.placementConstraints()); + Assertions.assertEquals("ndslgnayqigynduh", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("z", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("wwfvov", model.serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(2004605521, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(321338352, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1542315989, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.LOW, model.defaultMoveCost()); + Assertions.assertEquals("lkthu", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("qlfmmdnbb", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, model.serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(1340500207, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(870818177, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(220182660, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesTests.java index 5458c1836637..00619525fac7 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesTests.java @@ -24,54 +24,50 @@ public final class ServiceResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceResourceProperties model = BinaryData.fromString( - "{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"fssxqukkfplg\",\"serviceTypeName\":\"gsxnkjzkdeslpv\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"i\",\"placementConstraints\":\"ghxpkdw\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"uebbaumnyqup\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"eojnabc\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"smtxpsieb\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"hvpesapskrdqm\"}],\"serviceLoadMetrics\":[{\"name\":\"dhtldwkyz\",\"weight\":\"Low\",\"primaryDefaultLoad\":379697539,\"secondaryDefaultLoad\":38172527,\"defaultLoad\":1341187268},{\"name\":\"cwsvlxotog\",\"weight\":\"Medium\",\"primaryDefaultLoad\":354304408,\"secondaryDefaultLoad\":320708733,\"defaultLoad\":767248190},{\"name\":\"nmic\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1237447101,\"secondaryDefaultLoad\":722438368,\"defaultLoad\":1739821364}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"High\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") + "{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"jxdultskzbbtdzu\",\"serviceTypeName\":\"veekgpwozuhkfp\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"ofd\",\"placementConstraints\":\"uusdttouwa\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"qvkelnsm\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"xwyjsflhhc\"}],\"serviceLoadMetrics\":[{\"name\":\"n\",\"weight\":\"High\",\"primaryDefaultLoad\":923639125,\"secondaryDefaultLoad\":589324262,\"defaultLoad\":663464413},{\"name\":\"joya\",\"weight\":\"Medium\",\"primaryDefaultLoad\":840312667,\"secondaryDefaultLoad\":1050162327,\"defaultLoad\":383766185},{\"name\":\"idzyexznelixhnr\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1975568377,\"secondaryDefaultLoad\":1201064167,\"defaultLoad\":681203122}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") .toObject(ServiceResourceProperties.class); - Assertions.assertEquals("ghxpkdw", model.placementConstraints()); + Assertions.assertEquals("uusdttouwa", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("uebbaumnyqup", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("dhtldwkyz", model.serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(379697539, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(38172527, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1341187268, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost()); - Assertions.assertEquals("gsxnkjzkdeslpv", model.serviceTypeName()); - Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("i", model.serviceDnsName()); + Assertions.assertEquals("qvkelnsm", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("n", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(923639125, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(589324262, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(663464413, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.LOW, model.defaultMoveCost()); + Assertions.assertEquals("veekgpwozuhkfp", model.serviceTypeName()); + Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.servicePackageActivationMode()); + Assertions.assertEquals("ofd", model.serviceDnsName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceResourceProperties model = new ServiceResourceProperties().withPlacementConstraints("ghxpkdw") + ServiceResourceProperties model = new ServiceResourceProperties().withPlacementConstraints("uusdttouwa") .withCorrelationScheme(Arrays.asList( new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("uebbaumnyqup"), - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) - .withServiceName("eojnabc"), + .withServiceName("qvkelnsm"), new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("smtxpsieb"), - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("hvpesapskrdqm"))) + .withServiceName("xwyjsflhhc"))) .withServiceLoadMetrics(Arrays.asList( - new ServiceLoadMetric().withName("dhtldwkyz") - .withWeight(ServiceLoadMetricWeight.LOW) - .withPrimaryDefaultLoad(379697539) - .withSecondaryDefaultLoad(38172527) - .withDefaultLoad(1341187268), - new ServiceLoadMetric().withName("cwsvlxotog") + new ServiceLoadMetric().withName("n") + .withWeight(ServiceLoadMetricWeight.HIGH) + .withPrimaryDefaultLoad(923639125) + .withSecondaryDefaultLoad(589324262) + .withDefaultLoad(663464413), + new ServiceLoadMetric().withName("joya") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(840312667) + .withSecondaryDefaultLoad(1050162327) + .withDefaultLoad(383766185), + new ServiceLoadMetric().withName("idzyexznelixhnr") .withWeight(ServiceLoadMetricWeight.MEDIUM) - .withPrimaryDefaultLoad(354304408) - .withSecondaryDefaultLoad(320708733) - .withDefaultLoad(767248190), - new ServiceLoadMetric().withName("nmic") - .withWeight(ServiceLoadMetricWeight.ZERO) - .withPrimaryDefaultLoad(1237447101) - .withSecondaryDefaultLoad(722438368) - .withDefaultLoad(1739821364))) - .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), - new ServicePlacementPolicy(), new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.HIGH) + .withPrimaryDefaultLoad(1975568377) + .withSecondaryDefaultLoad(1201064167) + .withDefaultLoad(681203122))) + .withServicePlacementPolicies( + Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), new ServicePlacementPolicy())) + .withDefaultMoveCost(MoveCost.LOW) .withScalingPolicies(Arrays.asList( new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()), @@ -81,23 +77,23 @@ public void testSerialize() throws Exception { .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()))) - .withServiceTypeName("gsxnkjzkdeslpv") + .withServiceTypeName("veekgpwozuhkfp") .withPartitionDescription(new Partition()) - .withServicePackageActivationMode(ServicePackageActivationMode.SHARED_PROCESS) - .withServiceDnsName("i"); + .withServicePackageActivationMode(ServicePackageActivationMode.EXCLUSIVE_PROCESS) + .withServiceDnsName("ofd"); model = BinaryData.fromObject(model).toObject(ServiceResourceProperties.class); - Assertions.assertEquals("ghxpkdw", model.placementConstraints()); + Assertions.assertEquals("uusdttouwa", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("uebbaumnyqup", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("dhtldwkyz", model.serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(379697539, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(38172527, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1341187268, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost()); - Assertions.assertEquals("gsxnkjzkdeslpv", model.serviceTypeName()); - Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("i", model.serviceDnsName()); + Assertions.assertEquals("qvkelnsm", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("n", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(923639125, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(589324262, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(663464413, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.LOW, model.defaultMoveCost()); + Assertions.assertEquals("veekgpwozuhkfp", model.serviceTypeName()); + Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.servicePackageActivationMode()); + Assertions.assertEquals("ofd", model.serviceDnsName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceUpdateParametersTests.java index 4ec6bbe8846b..e45b80a6b139 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceUpdateParametersTests.java @@ -14,18 +14,17 @@ public final class ServiceUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceUpdateParameters model = BinaryData - .fromString( - "{\"tags\":{\"bexrmcq\":\"yvxqtayriwwroy\",\"e\":\"bycnojvkn\",\"zhpvgqzcjrvxd\":\"qsgzvahapj\"}}") + .fromString("{\"tags\":{\"wlrbqtkoievseo\":\"dxunkbebxmubyyn\",\"wzizxbmpgcjefuzm\":\"gqrlltmuwla\"}}") .toObject(ServiceUpdateParameters.class); - Assertions.assertEquals("yvxqtayriwwroy", model.tags().get("bexrmcq")); + Assertions.assertEquals("dxunkbebxmubyyn", model.tags().get("wlrbqtkoievseo")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServiceUpdateParameters model = new ServiceUpdateParameters() - .withTags(mapOf("bexrmcq", "yvxqtayriwwroy", "e", "bycnojvkn", "zhpvgqzcjrvxd", "qsgzvahapj")); + .withTags(mapOf("wlrbqtkoievseo", "dxunkbebxmubyyn", "wzizxbmpgcjefuzm", "gqrlltmuwla")); model = BinaryData.fromObject(model).toObject(ServiceUpdateParameters.class); - Assertions.assertEquals("yvxqtayriwwroy", model.tags().get("bexrmcq")); + Assertions.assertEquals("dxunkbebxmubyyn", model.tags().get("wlrbqtkoievseo")); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateMockTests.java index 1bf7136d940a..62dea36e6647 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateMockTests.java @@ -36,7 +36,7 @@ public final class ServicesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"Succeeded\",\"serviceTypeName\":\"rjtloq\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"jrngif\",\"placementConstraints\":\"z\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"cb\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"imzdlyj\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"qwmkyoquf\"}],\"serviceLoadMetrics\":[{\"name\":\"uzslzojhpctfnmdx\",\"weight\":\"High\",\"primaryDefaultLoad\":120965041,\"secondaryDefaultLoad\":1293168350,\"defaultLoad\":1282016388},{\"name\":\"eyzihgrky\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1979493256,\"secondaryDefaultLoad\":1192399452,\"defaultLoad\":1579370856}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"omfgbeglqgleohib\":\"yhyhsgzfczb\",\"xeeebtijvacvbmqz\":\"tnluankrr\",\"wxacevehj\":\"qqxlajr\"},\"location\":\"yxoaf\",\"id\":\"oqltfae\",\"name\":\"linmfgv\",\"type\":\"irpghriypoqeyh\"}"; + = "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"Succeeded\",\"serviceTypeName\":\"mcmuapc\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"evwqqxeyskonq\",\"placementConstraints\":\"nkfkbgbzb\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"qocl\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ygvkzqkjj\"}],\"serviceLoadMetrics\":[{\"name\":\"bzefezr\",\"weight\":\"Low\",\"primaryDefaultLoad\":307502339,\"secondaryDefaultLoad\":488183187,\"defaultLoad\":22024155},{\"name\":\"ipqxbkwvzgnzv\",\"weight\":\"Low\",\"primaryDefaultLoad\":202407711,\"secondaryDefaultLoad\":899715277,\"defaultLoad\":1814010794},{\"name\":\"q\",\"weight\":\"High\",\"primaryDefaultLoad\":1574532239,\"secondaryDefaultLoad\":539540216,\"defaultLoad\":1313632662},{\"name\":\"hewjptmcgsbost\",\"weight\":\"Zero\",\"primaryDefaultLoad\":811304130,\"secondaryDefaultLoad\":1951649855,\"defaultLoad\":2000528831}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"eqvcwwyyurmoch\":\"lvfhrbbp\",\"ejnhlbkpb\":\"prprsnmokay\",\"hahzvechndbnwi\":\"pcpil\",\"wjwiuub\":\"hol\"},\"location\":\"fqsfa\",\"id\":\"qtferrqwexjkmf\",\"name\":\"apjwogqqnobpudcd\",\"type\":\"btqwpwyawbzas\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -46,62 +46,71 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ServiceResource response = manager.services() - .define("boldforobwj") - .withExistingApplication("lyhb", "cu", "chxgs") - .withRegion("jrcg") - .withTags(mapOf("ntvlwijpsttexo", "wq", "uncuw", "qpwcyyufmh", "unqndyfpchrqb", "qspkcdqzhlctd")) - .withProperties(new ServiceResourceProperties().withPlacementConstraints("kwrrwo") + .define("qqxlajr") + .withExistingApplication("qgleohibetnluank", "rfxeeebtij", "acvbmqz") + .withRegion("dbzqgqqihed") + .withTags(mapOf("yj", "fvnz", "opv", "otp")) + .withProperties(new ServiceResourceProperties().withPlacementConstraints("r") .withCorrelationScheme(Arrays.asList( new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("cwyhahno"), + .withServiceName("iypoqeyhlqhykprl"), + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) + .withServiceName("znuciqdsm"), new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("rkywuhpsvfuu"), + .withServiceName("iitdfuxt"), new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("tlwexxwlalniexz"))) + .withServiceName("siibmiybnnustgn"))) .withServiceLoadMetrics(Arrays.asList( - new ServiceLoadMetric().withName("pgepqtybbwwpgda") - .withWeight(ServiceLoadMetricWeight.HIGH) - .withPrimaryDefaultLoad(48761414) - .withSecondaryDefaultLoad(1437214498) - .withDefaultLoad(1984466292), - new ServiceLoadMetric().withName("q") + new ServiceLoadMetric().withName("nmgixh") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(27658455) + .withSecondaryDefaultLoad(1356013965) + .withDefaultLoad(1277274936), + new ServiceLoadMetric().withName("dorhcgyyp") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(812539177) + .withSecondaryDefaultLoad(1374628714) + .withDefaultLoad(147246399), + new ServiceLoadMetric().withName("mbxhugcmjkav") .withWeight(ServiceLoadMetricWeight.ZERO) - .withPrimaryDefaultLoad(264711388) - .withSecondaryDefaultLoad(197643000) - .withDefaultLoad(330254773))) + .withPrimaryDefaultLoad(2097431423) + .withSecondaryDefaultLoad(1220118900) + .withDefaultLoad(1135735210))) .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), new ServicePlacementPolicy(), new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.ZERO) + .withDefaultMoveCost(MoveCost.HIGH) .withScalingPolicies(Arrays.asList( new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()), + new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) + .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()))) - .withServiceTypeName("pbt") + .withServiceTypeName("afgaoqlt") .withPartitionDescription(new Partition()) .withServicePackageActivationMode(ServicePackageActivationMode.SHARED_PROCESS) - .withServiceDnsName("eszabbelawumuas")) + .withServiceDnsName("linmfgv")) .create(); - Assertions.assertEquals("z", response.properties().placementConstraints()); + Assertions.assertEquals("nkfkbgbzb", response.properties().placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, response.properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("cb", response.properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("uzslzojhpctfnmdx", response.properties().serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, + Assertions.assertEquals("qocl", response.properties().correlationScheme().get(0).serviceName()); + Assertions.assertEquals("bzefezr", response.properties().serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.LOW, response.properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(120965041, response.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(1293168350, response.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1282016388, response.properties().serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.LOW, response.properties().defaultMoveCost()); - Assertions.assertEquals("rjtloq", response.properties().serviceTypeName()); + Assertions.assertEquals(307502339, response.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(488183187, response.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(22024155, response.properties().serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.MEDIUM, response.properties().defaultMoveCost()); + Assertions.assertEquals("mcmuapc", response.properties().serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, response.properties().servicePackageActivationMode()); - Assertions.assertEquals("jrngif", response.properties().serviceDnsName()); - Assertions.assertEquals("yhyhsgzfczb", response.tags().get("omfgbeglqgleohib")); - Assertions.assertEquals("yxoaf", response.location()); + Assertions.assertEquals("evwqqxeyskonq", response.properties().serviceDnsName()); + Assertions.assertEquals("lvfhrbbp", response.tags().get("eqvcwwyyurmoch")); + Assertions.assertEquals("fqsfa", response.location()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetWithResponseMockTests.java index 625602ea7fcf..1eabaae4bb93 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetWithResponseMockTests.java @@ -25,7 +25,7 @@ public final class ServicesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"dqns\",\"serviceTypeName\":\"fzpbgtgkyl\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"rjeuut\",\"placementConstraints\":\"xezw\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"vbwnhhtq\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"ehgpp\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ifhpf\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ajvgcxtxjcsheafi\"}],\"serviceLoadMetrics\":[{\"name\":\"ugsresmkssjhoi\",\"weight\":\"High\",\"primaryDefaultLoad\":1451676187,\"secondaryDefaultLoad\":1606818470,\"defaultLoad\":753800849},{\"name\":\"prhptillu\",\"weight\":\"Low\",\"primaryDefaultLoad\":1656639409,\"secondaryDefaultLoad\":1467633348,\"defaultLoad\":2010820897},{\"name\":\"hm\",\"weight\":\"High\",\"primaryDefaultLoad\":484782271,\"secondaryDefaultLoad\":1561127811,\"defaultLoad\":379885454},{\"name\":\"tpwb\",\"weight\":\"Low\",\"primaryDefaultLoad\":1155046174,\"secondaryDefaultLoad\":1996411708,\"defaultLoad\":1970354054}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"ankjpdnjzh\":\"a\",\"lmuoyxprimrsopte\":\"joylh\",\"wxdzaumweoohgu\":\"cjmeislstvasy\",\"emwmdxmebwjs\":\"fuzboyjathwtzolb\"},\"location\":\"p\",\"id\":\"lxveabfqx\",\"name\":\"mwmqtibx\",\"type\":\"ijddtvqc\"}"; + = "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"amqu\",\"serviceTypeName\":\"iosrsjuivfcdis\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"xzhczexrxz\",\"placementConstraints\":\"jrtrhqvwrevk\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"nzonzl\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"i\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"wncvjtszcofiz\"}],\"serviceLoadMetrics\":[{\"name\":\"dhgbjkvre\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1414987705,\"secondaryDefaultLoad\":615677000,\"defaultLoad\":601956231},{\"name\":\"mlovuanashcxl\",\"weight\":\"High\",\"primaryDefaultLoad\":613917704,\"secondaryDefaultLoad\":513286022,\"defaultLoad\":1754763241},{\"name\":\"lvidizozs\",\"weight\":\"Low\",\"primaryDefaultLoad\":1441551440,\"secondaryDefaultLoad\":1920486563,\"defaultLoad\":1331407717}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"ltv\":\"puuw\",\"zhmkdasvflyh\":\"qjctzenkeif\",\"oldforobw\":\"xcudchxgsr\",\"hfovvacqpbtu\":\"lvizb\"},\"location\":\"xesz\",\"id\":\"belawumuaslzkwr\",\"name\":\"woycqucwyha\",\"type\":\"nomdrkywuhpsv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,25 +35,26 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ServiceResource response = manager.services() - .getWithResponse("c", "xgccknfnw", "btmvpdvjdhttza", "fedxihchrphkm", com.azure.core.util.Context.NONE) + .getWithResponse("ybpmzznrtffyaq", "tmhheioqa", "hvseufuqyrx", "dlcgqlsismjqfr", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xezw", response.properties().placementConstraints()); + Assertions.assertEquals("jrtrhqvwrevk", response.properties().placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, response.properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("vbwnhhtq", response.properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("ugsresmkssjhoi", response.properties().serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, + Assertions.assertEquals("nzonzl", response.properties().correlationScheme().get(0).serviceName()); + Assertions.assertEquals("dhgbjkvre", response.properties().serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, response.properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(1451676187, response.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(1606818470, response.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(753800849, response.properties().serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.LOW, response.properties().defaultMoveCost()); - Assertions.assertEquals("fzpbgtgkyl", response.properties().serviceTypeName()); - Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, + Assertions.assertEquals(1414987705, response.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(615677000, response.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(601956231, response.properties().serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.MEDIUM, response.properties().defaultMoveCost()); + Assertions.assertEquals("iosrsjuivfcdis", response.properties().serviceTypeName()); + Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, response.properties().servicePackageActivationMode()); - Assertions.assertEquals("rjeuut", response.properties().serviceDnsName()); - Assertions.assertEquals("a", response.tags().get("ankjpdnjzh")); - Assertions.assertEquals("p", response.location()); + Assertions.assertEquals("xzhczexrxz", response.properties().serviceDnsName()); + Assertions.assertEquals("puuw", response.tags().get("ltv")); + Assertions.assertEquals("xesz", response.location()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsMockTests.java index 6d625d072b69..bd66fe737030 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsMockTests.java @@ -26,7 +26,7 @@ public final class ServicesListByApplicationsMockTests { @Test public void testListByApplications() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"bu\",\"serviceTypeName\":\"qwyxebeybpm\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"tffyaqit\",\"placementConstraints\":\"heioqa\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"eufuqyrxpdlcgql\"}],\"serviceLoadMetrics\":[{\"name\":\"mjqfrddgamquhio\",\"weight\":\"High\",\"primaryDefaultLoad\":2131162818,\"secondaryDefaultLoad\":364566844,\"defaultLoad\":1776992890},{\"name\":\"disyirnxz\",\"weight\":\"Medium\",\"primaryDefaultLoad\":394290556,\"secondaryDefaultLoad\":1167405678,\"defaultLoad\":994025187},{\"name\":\"ujrtrhqvwr\",\"weight\":\"Zero\",\"primaryDefaultLoad\":589242227,\"secondaryDefaultLoad\":1550567255,\"defaultLoad\":1309315594}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"cvjtszcofiz\":\"yw\",\"gbjkvreljeamur\":\"htd\",\"xlpm\":\"zmlovuanash\"},\"location\":\"rbdkelvidiz\",\"id\":\"sdbccxjmonfdgnwn\",\"name\":\"ypuuwwltvuqjctze\",\"type\":\"keifzzhmkdasv\"}]}"; + = "{\"value\":[{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"bwwpgdakchzy\",\"serviceTypeName\":\"lixqnrkcxkjibn\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"uxswqrntvl\",\"placementConstraints\":\"jpsttexoq\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"yyufmhruncuw\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"spkcdqzh\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"tddunqnd\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"pchrqbn\"}],\"serviceLoadMetrics\":[{\"name\":\"cgegydcwbo\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1792979212,\"secondaryDefaultLoad\":1073196572,\"defaultLoad\":1101777200},{\"name\":\"ihrraiouaub\",\"weight\":\"Medium\",\"primaryDefaultLoad\":434775558,\"secondaryDefaultLoad\":1702747573,\"defaultLoad\":465765494},{\"name\":\"oj\",\"weight\":\"High\",\"primaryDefaultLoad\":1614609688,\"secondaryDefaultLoad\":2143335427,\"defaultLoad\":1851238843},{\"name\":\"asccbiui\",\"weight\":\"Low\",\"primaryDefaultLoad\":26585986,\"secondaryDefaultLoad\":162687194,\"defaultLoad\":7799986}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"mdxotngfdgu\":\"dvruzslzojhpctf\",\"i\":\"eyzihgrky\"},\"location\":\"bsnmfpph\",\"id\":\"eevy\",\"name\":\"yhsgz\",\"type\":\"czbgomfgbeg\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,29 +36,29 @@ public void testListByApplications() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable<ServiceResource> response = manager.services() - .listByApplications("tad", "jaeukmrsieekpn", "zaapmudqmeqwi", com.azure.core.util.Context.NONE); + .listByApplications("uurutlwexxwlalni", "xzsrzpge", "q", com.azure.core.util.Context.NONE); - Assertions.assertEquals("heioqa", response.iterator().next().properties().placementConstraints()); + Assertions.assertEquals("jpsttexoq", response.iterator().next().properties().placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, response.iterator().next().properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("eufuqyrxpdlcgql", + Assertions.assertEquals("yyufmhruncuw", response.iterator().next().properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("mjqfrddgamquhio", + Assertions.assertEquals("cgegydcwbo", response.iterator().next().properties().serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, + Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, response.iterator().next().properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(2131162818, + Assertions.assertEquals(1792979212, response.iterator().next().properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(364566844, + Assertions.assertEquals(1073196572, response.iterator().next().properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1776992890, + Assertions.assertEquals(1101777200, response.iterator().next().properties().serviceLoadMetrics().get(0).defaultLoad()); Assertions.assertEquals(MoveCost.MEDIUM, response.iterator().next().properties().defaultMoveCost()); - Assertions.assertEquals("qwyxebeybpm", response.iterator().next().properties().serviceTypeName()); - Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, + Assertions.assertEquals("lixqnrkcxkjibn", response.iterator().next().properties().serviceTypeName()); + Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, response.iterator().next().properties().servicePackageActivationMode()); - Assertions.assertEquals("tffyaqit", response.iterator().next().properties().serviceDnsName()); - Assertions.assertEquals("yw", response.iterator().next().tags().get("cvjtszcofiz")); - Assertions.assertEquals("rbdkelvidiz", response.iterator().next().location()); + Assertions.assertEquals("uxswqrntvl", response.iterator().next().properties().serviceDnsName()); + Assertions.assertEquals("dvruzslzojhpctf", response.iterator().next().tags().get("mdxotngfdgu")); + Assertions.assertEquals("bsnmfpph", response.iterator().next().location()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsParameterDescriptionTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsParameterDescriptionTests.java index 5499f2bdfd9d..72e729b0fae1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsParameterDescriptionTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsParameterDescriptionTests.java @@ -11,17 +11,17 @@ public final class SettingsParameterDescriptionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SettingsParameterDescription model - = BinaryData.fromString("{\"name\":\"z\",\"value\":\"v\"}").toObject(SettingsParameterDescription.class); - Assertions.assertEquals("z", model.name()); - Assertions.assertEquals("v", model.value()); + SettingsParameterDescription model = BinaryData.fromString("{\"name\":\"qnajxqugj\",\"value\":\"ky\"}") + .toObject(SettingsParameterDescription.class); + Assertions.assertEquals("qnajxqugj", model.name()); + Assertions.assertEquals("ky", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SettingsParameterDescription model = new SettingsParameterDescription().withName("z").withValue("v"); + SettingsParameterDescription model = new SettingsParameterDescription().withName("qnajxqugj").withValue("ky"); model = BinaryData.fromObject(model).toObject(SettingsParameterDescription.class); - Assertions.assertEquals("z", model.name()); - Assertions.assertEquals("v", model.value()); + Assertions.assertEquals("qnajxqugj", model.name()); + Assertions.assertEquals("ky", model.value()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsSectionDescriptionTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsSectionDescriptionTests.java index bf0c470d684a..d953fabbbe01 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsSectionDescriptionTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsSectionDescriptionTests.java @@ -13,24 +13,21 @@ public final class SettingsSectionDescriptionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SettingsSectionDescription model = BinaryData.fromString( - "{\"name\":\"vokotllxdyh\",\"parameters\":[{\"name\":\"y\",\"value\":\"cogjltdtbn\"},{\"name\":\"hadoocrk\",\"value\":\"cikhnv\"},{\"name\":\"amqgxqquezikyw\",\"value\":\"gxk\"},{\"name\":\"lla\",\"value\":\"melwuipiccjz\"}]}") - .toObject(SettingsSectionDescription.class); - Assertions.assertEquals("vokotllxdyh", model.name()); - Assertions.assertEquals("y", model.parameters().get(0).name()); - Assertions.assertEquals("cogjltdtbn", model.parameters().get(0).value()); + SettingsSectionDescription model + = BinaryData.fromString("{\"name\":\"rw\",\"parameters\":[{\"name\":\"co\",\"value\":\"uhpkxkgymar\"}]}") + .toObject(SettingsSectionDescription.class); + Assertions.assertEquals("rw", model.name()); + Assertions.assertEquals("co", model.parameters().get(0).name()); + Assertions.assertEquals("uhpkxkgymar", model.parameters().get(0).value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SettingsSectionDescription model = new SettingsSectionDescription().withName("vokotllxdyh") - .withParameters(Arrays.asList(new SettingsParameterDescription().withName("y").withValue("cogjltdtbn"), - new SettingsParameterDescription().withName("hadoocrk").withValue("cikhnv"), - new SettingsParameterDescription().withName("amqgxqquezikyw").withValue("gxk"), - new SettingsParameterDescription().withName("lla").withValue("melwuipiccjz"))); + SettingsSectionDescription model = new SettingsSectionDescription().withName("rw") + .withParameters(Arrays.asList(new SettingsParameterDescription().withName("co").withValue("uhpkxkgymar"))); model = BinaryData.fromObject(model).toObject(SettingsSectionDescription.class); - Assertions.assertEquals("vokotllxdyh", model.name()); - Assertions.assertEquals("y", model.parameters().get(0).name()); - Assertions.assertEquals("cogjltdtbn", model.parameters().get(0).value()); + Assertions.assertEquals("rw", model.name()); + Assertions.assertEquals("co", model.parameters().get(0).name()); + Assertions.assertEquals("uhpkxkgymar", model.parameters().get(0).value()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SkuTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SkuTests.java index c3b69599fc05..a433c1b3c13f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SkuTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SkuTests.java @@ -12,14 +12,14 @@ public final class SkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Sku model = BinaryData.fromString("{\"name\":\"Basic\"}").toObject(Sku.class); - Assertions.assertEquals(SkuName.BASIC, model.name()); + Sku model = BinaryData.fromString("{\"name\":\"Standard\"}").toObject(Sku.class); + Assertions.assertEquals(SkuName.STANDARD, model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Sku model = new Sku().withName(SkuName.BASIC); + Sku model = new Sku().withName(SkuName.STANDARD); model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals(SkuName.BASIC, model.name()); + Assertions.assertEquals(SkuName.STANDARD, model.name()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatefulServicePropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatefulServicePropertiesTests.java index 7bb3a63e417b..a75564df9c28 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatefulServicePropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatefulServicePropertiesTests.java @@ -24,88 +24,92 @@ public final class StatefulServicePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StatefulServiceProperties model = BinaryData.fromString( - "{\"serviceKind\":\"Stateful\",\"hasPersistedState\":false,\"targetReplicaSetSize\":914615331,\"minReplicaSetSize\":1745104172,\"replicaRestartWaitDuration\":\"bkc\",\"quorumLossWaitDuration\":\"dhbt\",\"standByReplicaKeepDuration\":\"phywpnvj\",\"servicePlacementTimeLimit\":\"qnermclfplphoxu\",\"provisioningState\":\"rpabg\",\"serviceTypeName\":\"epsbjtazqu\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"pmueefjzwfqk\",\"placementConstraints\":\"jidsuyonobglaoc\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"cmgyud\"}],\"serviceLoadMetrics\":[{\"name\":\"lmoyrx\",\"weight\":\"Low\",\"primaryDefaultLoad\":403204349,\"secondaryDefaultLoad\":397011465,\"defaultLoad\":1705865903},{\"name\":\"txhdzh\",\"weight\":\"Zero\",\"primaryDefaultLoad\":315057202,\"secondaryDefaultLoad\":278675710,\"defaultLoad\":1058131952}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") + "{\"serviceKind\":\"Stateful\",\"hasPersistedState\":false,\"targetReplicaSetSize\":1181953038,\"minReplicaSetSize\":1784168921,\"replicaRestartWaitDuration\":\"pnapnyiropuh\",\"quorumLossWaitDuration\":\"gvpgy\",\"standByReplicaKeepDuration\":\"qgitxmed\",\"servicePlacementTimeLimit\":\"c\",\"provisioningState\":\"ynqwwncwzzhxgk\",\"serviceTypeName\":\"rmgucnap\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"ellwptfdy\",\"placementConstraints\":\"fqbuaceopzf\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"uaopppcqeq\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"lzdahzxctobgbkdm\"}],\"serviceLoadMetrics\":[{\"name\":\"postmgrcfbunrm\",\"weight\":\"Low\",\"primaryDefaultLoad\":1514196335,\"secondaryDefaultLoad\":529783276,\"defaultLoad\":1199001730},{\"name\":\"vjymjhxxjyngud\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1003023874,\"secondaryDefaultLoad\":855265021,\"defaultLoad\":173760475},{\"name\":\"qzvszjf\",\"weight\":\"Low\",\"primaryDefaultLoad\":2022160914,\"secondaryDefaultLoad\":1631327314,\"defaultLoad\":1924532267}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") .toObject(StatefulServiceProperties.class); - Assertions.assertEquals("jidsuyonobglaoc", model.placementConstraints()); + Assertions.assertEquals("fqbuaceopzf", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("cmgyud", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("lmoyrx", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals("uaopppcqeq", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("postmgrcfbunrm", model.serviceLoadMetrics().get(0).name()); Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(403204349, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(397011465, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1705865903, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.LOW, model.defaultMoveCost()); - Assertions.assertEquals("epsbjtazqu", model.serviceTypeName()); + Assertions.assertEquals(1514196335, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(529783276, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(1199001730, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost()); + Assertions.assertEquals("rmgucnap", model.serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("pmueefjzwfqk", model.serviceDnsName()); + Assertions.assertEquals("ellwptfdy", model.serviceDnsName()); Assertions.assertFalse(model.hasPersistedState()); - Assertions.assertEquals(914615331, model.targetReplicaSetSize()); - Assertions.assertEquals(1745104172, model.minReplicaSetSize()); - Assertions.assertEquals("bkc", model.replicaRestartWaitDuration()); - Assertions.assertEquals("dhbt", model.quorumLossWaitDuration()); - Assertions.assertEquals("phywpnvj", model.standByReplicaKeepDuration()); - Assertions.assertEquals("qnermclfplphoxu", model.servicePlacementTimeLimit()); + Assertions.assertEquals(1181953038, model.targetReplicaSetSize()); + Assertions.assertEquals(1784168921, model.minReplicaSetSize()); + Assertions.assertEquals("pnapnyiropuh", model.replicaRestartWaitDuration()); + Assertions.assertEquals("gvpgy", model.quorumLossWaitDuration()); + Assertions.assertEquals("qgitxmed", model.standByReplicaKeepDuration()); + Assertions.assertEquals("c", model.servicePlacementTimeLimit()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StatefulServiceProperties model = new StatefulServiceProperties().withPlacementConstraints("jidsuyonobglaoc") - .withCorrelationScheme( - Arrays.asList(new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) - .withServiceName("cmgyud"))) + StatefulServiceProperties model = new StatefulServiceProperties().withPlacementConstraints("fqbuaceopzf") + .withCorrelationScheme(Arrays.asList( + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) + .withServiceName("uaopppcqeq"), + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) + .withServiceName("lzdahzxctobgbkdm"))) .withServiceLoadMetrics(Arrays.asList( - new ServiceLoadMetric().withName("lmoyrx") + new ServiceLoadMetric().withName("postmgrcfbunrm") .withWeight(ServiceLoadMetricWeight.LOW) - .withPrimaryDefaultLoad(403204349) - .withSecondaryDefaultLoad(397011465) - .withDefaultLoad(1705865903), - new ServiceLoadMetric().withName("txhdzh") - .withWeight(ServiceLoadMetricWeight.ZERO) - .withPrimaryDefaultLoad(315057202) - .withSecondaryDefaultLoad(278675710) - .withDefaultLoad(1058131952))) - .withServicePlacementPolicies( - Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.LOW) + .withPrimaryDefaultLoad(1514196335) + .withSecondaryDefaultLoad(529783276) + .withDefaultLoad(1199001730), + new ServiceLoadMetric().withName("vjymjhxxjyngud") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(1003023874) + .withSecondaryDefaultLoad(855265021) + .withDefaultLoad(173760475), + new ServiceLoadMetric().withName("qzvszjf") + .withWeight(ServiceLoadMetricWeight.LOW) + .withPrimaryDefaultLoad(2022160914) + .withSecondaryDefaultLoad(1631327314) + .withDefaultLoad(1924532267))) + .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy())) + .withDefaultMoveCost(MoveCost.MEDIUM) .withScalingPolicies(Arrays.asList( new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()), - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()))) - .withServiceTypeName("epsbjtazqu") + .withServiceTypeName("rmgucnap") .withPartitionDescription(new Partition()) .withServicePackageActivationMode(ServicePackageActivationMode.EXCLUSIVE_PROCESS) - .withServiceDnsName("pmueefjzwfqk") + .withServiceDnsName("ellwptfdy") .withHasPersistedState(false) - .withTargetReplicaSetSize(914615331) - .withMinReplicaSetSize(1745104172) - .withReplicaRestartWaitDuration("bkc") - .withQuorumLossWaitDuration("dhbt") - .withStandByReplicaKeepDuration("phywpnvj") - .withServicePlacementTimeLimit("qnermclfplphoxu"); + .withTargetReplicaSetSize(1181953038) + .withMinReplicaSetSize(1784168921) + .withReplicaRestartWaitDuration("pnapnyiropuh") + .withQuorumLossWaitDuration("gvpgy") + .withStandByReplicaKeepDuration("qgitxmed") + .withServicePlacementTimeLimit("c"); model = BinaryData.fromObject(model).toObject(StatefulServiceProperties.class); - Assertions.assertEquals("jidsuyonobglaoc", model.placementConstraints()); + Assertions.assertEquals("fqbuaceopzf", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("cmgyud", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("lmoyrx", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals("uaopppcqeq", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("postmgrcfbunrm", model.serviceLoadMetrics().get(0).name()); Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(403204349, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(397011465, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1705865903, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.LOW, model.defaultMoveCost()); - Assertions.assertEquals("epsbjtazqu", model.serviceTypeName()); + Assertions.assertEquals(1514196335, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(529783276, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(1199001730, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost()); + Assertions.assertEquals("rmgucnap", model.serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("pmueefjzwfqk", model.serviceDnsName()); + Assertions.assertEquals("ellwptfdy", model.serviceDnsName()); Assertions.assertFalse(model.hasPersistedState()); - Assertions.assertEquals(914615331, model.targetReplicaSetSize()); - Assertions.assertEquals(1745104172, model.minReplicaSetSize()); - Assertions.assertEquals("bkc", model.replicaRestartWaitDuration()); - Assertions.assertEquals("dhbt", model.quorumLossWaitDuration()); - Assertions.assertEquals("phywpnvj", model.standByReplicaKeepDuration()); - Assertions.assertEquals("qnermclfplphoxu", model.servicePlacementTimeLimit()); + Assertions.assertEquals(1181953038, model.targetReplicaSetSize()); + Assertions.assertEquals(1784168921, model.minReplicaSetSize()); + Assertions.assertEquals("pnapnyiropuh", model.replicaRestartWaitDuration()); + Assertions.assertEquals("gvpgy", model.quorumLossWaitDuration()); + Assertions.assertEquals("qgitxmed", model.standByReplicaKeepDuration()); + Assertions.assertEquals("c", model.servicePlacementTimeLimit()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatelessServicePropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatelessServicePropertiesTests.java index e6402b6083fa..56fb4abf3990 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatelessServicePropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatelessServicePropertiesTests.java @@ -24,85 +24,85 @@ public final class StatelessServicePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StatelessServiceProperties model = BinaryData.fromString( - "{\"serviceKind\":\"Stateless\",\"instanceCount\":1228255689,\"minInstanceCount\":1085647312,\"minInstancePercentage\":475839278,\"provisioningState\":\"ca\",\"serviceTypeName\":\"uzbpzkafku\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"nwbmeh\",\"placementConstraints\":\"eyvjusrtslhspkde\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"fm\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"gkvtmelmqkrhah\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"juahaquhcdhmdual\"}],\"serviceLoadMetrics\":[{\"name\":\"qpv\",\"weight\":\"High\",\"primaryDefaultLoad\":294636913,\"secondaryDefaultLoad\":1606090132,\"defaultLoad\":205808204},{\"name\":\"gvxp\",\"weight\":\"Low\",\"primaryDefaultLoad\":1677729561,\"secondaryDefaultLoad\":1121960551,\"defaultLoad\":1625950300},{\"name\":\"sgwbnbbeld\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1782633502,\"secondaryDefaultLoad\":70118233,\"defaultLoad\":113893877}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") + "{\"serviceKind\":\"Stateless\",\"instanceCount\":1920566576,\"minInstanceCount\":928990245,\"minInstancePercentage\":1261594790,\"provisioningState\":\"qmcbxvwvxyslqbhs\",\"serviceTypeName\":\"xoblytkbl\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"wwfbkrvrnsvshq\",\"placementConstraints\":\"hxcr\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"vasrruvwb\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"qfsubcgjbirx\"}],\"serviceLoadMetrics\":[{\"name\":\"bsrfbj\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1972509388,\"secondaryDefaultLoad\":1365200524,\"defaultLoad\":772106102},{\"name\":\"tpvjzbexilzznfqq\",\"weight\":\"Low\",\"primaryDefaultLoad\":1473271495,\"secondaryDefaultLoad\":600094153,\"defaultLoad\":1628769376},{\"name\":\"uoujmkcjhwqy\",\"weight\":\"Zero\",\"primaryDefaultLoad\":778428037,\"secondaryDefaultLoad\":385457826,\"defaultLoad\":524895743},{\"name\":\"wgdrjervnaenqp\",\"weight\":\"High\",\"primaryDefaultLoad\":681452902,\"secondaryDefaultLoad\":895776000,\"defaultLoad\":412409909}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"High\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") .toObject(StatelessServiceProperties.class); - Assertions.assertEquals("eyvjusrtslhspkde", model.placementConstraints()); + Assertions.assertEquals("hxcr", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("fm", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("qpv", model.serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(294636913, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(1606090132, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(205808204, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost()); - Assertions.assertEquals("uzbpzkafku", model.serviceTypeName()); - Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("nwbmeh", model.serviceDnsName()); - Assertions.assertEquals(1228255689, model.instanceCount()); - Assertions.assertEquals(1085647312, model.minInstanceCount()); - Assertions.assertEquals(475839278, model.minInstancePercentage()); + Assertions.assertEquals("vasrruvwb", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("bsrfbj", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, model.serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(1972509388, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(1365200524, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(772106102, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost()); + Assertions.assertEquals("xoblytkbl", model.serviceTypeName()); + Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.servicePackageActivationMode()); + Assertions.assertEquals("wwfbkrvrnsvshq", model.serviceDnsName()); + Assertions.assertEquals(1920566576, model.instanceCount()); + Assertions.assertEquals(928990245, model.minInstanceCount()); + Assertions.assertEquals(1261594790, model.minInstancePercentage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StatelessServiceProperties model = new StatelessServiceProperties().withPlacementConstraints("eyvjusrtslhspkde") + StatelessServiceProperties model = new StatelessServiceProperties().withPlacementConstraints("hxcr") .withCorrelationScheme(Arrays.asList( new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("fm"), - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) - .withServiceName("gkvtmelmqkrhah"), + .withServiceName("vasrruvwb"), new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("juahaquhcdhmdual"))) + .withServiceName("qfsubcgjbirx"))) .withServiceLoadMetrics(Arrays.asList( - new ServiceLoadMetric().withName("qpv") - .withWeight(ServiceLoadMetricWeight.HIGH) - .withPrimaryDefaultLoad(294636913) - .withSecondaryDefaultLoad(1606090132) - .withDefaultLoad(205808204), - new ServiceLoadMetric().withName("gvxp") + new ServiceLoadMetric().withName("bsrfbj") + .withWeight(ServiceLoadMetricWeight.ZERO) + .withPrimaryDefaultLoad(1972509388) + .withSecondaryDefaultLoad(1365200524) + .withDefaultLoad(772106102), + new ServiceLoadMetric().withName("tpvjzbexilzznfqq") .withWeight(ServiceLoadMetricWeight.LOW) - .withPrimaryDefaultLoad(1677729561) - .withSecondaryDefaultLoad(1121960551) - .withDefaultLoad(1625950300), - new ServiceLoadMetric().withName("sgwbnbbeld") + .withPrimaryDefaultLoad(1473271495) + .withSecondaryDefaultLoad(600094153) + .withDefaultLoad(1628769376), + new ServiceLoadMetric().withName("uoujmkcjhwqy") .withWeight(ServiceLoadMetricWeight.ZERO) - .withPrimaryDefaultLoad(1782633502) - .withSecondaryDefaultLoad(70118233) - .withDefaultLoad(113893877))) - .withServicePlacementPolicies( - Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.MEDIUM) + .withPrimaryDefaultLoad(778428037) + .withSecondaryDefaultLoad(385457826) + .withDefaultLoad(524895743), + new ServiceLoadMetric().withName("wgdrjervnaenqp") + .withWeight(ServiceLoadMetricWeight.HIGH) + .withPrimaryDefaultLoad(681452902) + .withSecondaryDefaultLoad(895776000) + .withDefaultLoad(412409909))) + .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy())) + .withDefaultMoveCost(MoveCost.HIGH) .withScalingPolicies(Arrays.asList( - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()))) - .withServiceTypeName("uzbpzkafku") + .withServiceTypeName("xoblytkbl") .withPartitionDescription(new Partition()) - .withServicePackageActivationMode(ServicePackageActivationMode.SHARED_PROCESS) - .withServiceDnsName("nwbmeh") - .withInstanceCount(1228255689) - .withMinInstanceCount(1085647312) - .withMinInstancePercentage(475839278); + .withServicePackageActivationMode(ServicePackageActivationMode.EXCLUSIVE_PROCESS) + .withServiceDnsName("wwfbkrvrnsvshq") + .withInstanceCount(1920566576) + .withMinInstanceCount(928990245) + .withMinInstancePercentage(1261594790); model = BinaryData.fromObject(model).toObject(StatelessServiceProperties.class); - Assertions.assertEquals("eyvjusrtslhspkde", model.placementConstraints()); + Assertions.assertEquals("hxcr", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("fm", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("qpv", model.serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(294636913, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(1606090132, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(205808204, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost()); - Assertions.assertEquals("uzbpzkafku", model.serviceTypeName()); - Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("nwbmeh", model.serviceDnsName()); - Assertions.assertEquals(1228255689, model.instanceCount()); - Assertions.assertEquals(1085647312, model.minInstanceCount()); - Assertions.assertEquals(475839278, model.minInstancePercentage()); + Assertions.assertEquals("vasrruvwb", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("bsrfbj", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, model.serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(1972509388, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(1365200524, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(772106102, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost()); + Assertions.assertEquals("xoblytkbl", model.serviceTypeName()); + Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.servicePackageActivationMode()); + Assertions.assertEquals("wwfbkrvrnsvshq", model.serviceDnsName()); + Assertions.assertEquals(1920566576, model.instanceCount()); + Assertions.assertEquals(928990245, model.minInstanceCount()); + Assertions.assertEquals(1261594790, model.minInstancePercentage()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SubnetTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SubnetTests.java index 20ca75d9ebba..e6e6e777da76 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SubnetTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SubnetTests.java @@ -14,27 +14,27 @@ public final class SubnetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Subnet model = BinaryData.fromString( - "{\"name\":\"mueedndrdvstk\",\"enableIpv6\":false,\"privateEndpointNetworkPolicies\":\"enabled\",\"privateLinkServiceNetworkPolicies\":\"disabled\",\"networkSecurityGroupId\":\"lmfmtdaay\"}") + "{\"name\":\"krmnjijpxacqqud\",\"enableIpv6\":true,\"privateEndpointNetworkPolicies\":\"disabled\",\"privateLinkServiceNetworkPolicies\":\"disabled\",\"networkSecurityGroupId\":\"abjy\"}") .toObject(Subnet.class); - Assertions.assertEquals("mueedndrdvstk", model.name()); - Assertions.assertFalse(model.enableIpv6()); - Assertions.assertEquals(PrivateEndpointNetworkPolicies.ENABLED, model.privateEndpointNetworkPolicies()); + Assertions.assertEquals("krmnjijpxacqqud", model.name()); + Assertions.assertTrue(model.enableIpv6()); + Assertions.assertEquals(PrivateEndpointNetworkPolicies.DISABLED, model.privateEndpointNetworkPolicies()); Assertions.assertEquals(PrivateLinkServiceNetworkPolicies.DISABLED, model.privateLinkServiceNetworkPolicies()); - Assertions.assertEquals("lmfmtdaay", model.networkSecurityGroupId()); + Assertions.assertEquals("abjy", model.networkSecurityGroupId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Subnet model = new Subnet().withName("mueedndrdvstk") - .withEnableIpv6(false) - .withPrivateEndpointNetworkPolicies(PrivateEndpointNetworkPolicies.ENABLED) + Subnet model = new Subnet().withName("krmnjijpxacqqud") + .withEnableIpv6(true) + .withPrivateEndpointNetworkPolicies(PrivateEndpointNetworkPolicies.DISABLED) .withPrivateLinkServiceNetworkPolicies(PrivateLinkServiceNetworkPolicies.DISABLED) - .withNetworkSecurityGroupId("lmfmtdaay"); + .withNetworkSecurityGroupId("abjy"); model = BinaryData.fromObject(model).toObject(Subnet.class); - Assertions.assertEquals("mueedndrdvstk", model.name()); - Assertions.assertFalse(model.enableIpv6()); - Assertions.assertEquals(PrivateEndpointNetworkPolicies.ENABLED, model.privateEndpointNetworkPolicies()); + Assertions.assertEquals("krmnjijpxacqqud", model.name()); + Assertions.assertTrue(model.enableIpv6()); + Assertions.assertEquals(PrivateEndpointNetworkPolicies.DISABLED, model.privateEndpointNetworkPolicies()); Assertions.assertEquals(PrivateLinkServiceNetworkPolicies.DISABLED, model.privateLinkServiceNetworkPolicies()); - Assertions.assertEquals("lmfmtdaay", model.networkSecurityGroupId()); + Assertions.assertEquals("abjy", model.networkSecurityGroupId()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionPropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionPropertiesTests.java index 726b341214fb..f0e52529f32d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionPropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionPropertiesTests.java @@ -14,38 +14,38 @@ public final class VMSSExtensionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VMSSExtensionProperties model = BinaryData.fromString( - "{\"publisher\":\"vdnkfxusem\",\"type\":\"wzrmuh\",\"typeHandlerVersion\":\"pfcqdp\",\"autoUpgradeMinorVersion\":false,\"settings\":\"datavpsvuoymgcce\",\"protectedSettings\":\"dataezrypql\",\"forceUpdateTag\":\"eokerqwkyhkobopg\",\"provisionAfterExtensions\":[\"k\"],\"provisioningState\":\"epbqpcrfkbw\",\"enableAutomaticUpgrade\":true,\"setupOrder\":[\"BeforeSFRuntime\",\"BeforeSFRuntime\",\"BeforeSFRuntime\"]}") + "{\"publisher\":\"ebqaaysjkixqtnq\",\"type\":\"tezlwff\",\"typeHandlerVersion\":\"iakp\",\"autoUpgradeMinorVersion\":true,\"settings\":\"datam\",\"protectedSettings\":\"datad\",\"forceUpdateTag\":\"mmji\",\"provisionAfterExtensions\":[\"ozphvwauyqncygu\",\"kvi\"],\"provisioningState\":\"dscwxqupevzhf\",\"enableAutomaticUpgrade\":true,\"setupOrder\":[\"BeforeSFRuntime\",\"BeforeSFRuntime\"]}") .toObject(VMSSExtensionProperties.class); - Assertions.assertEquals("vdnkfxusem", model.publisher()); - Assertions.assertEquals("wzrmuh", model.type()); - Assertions.assertEquals("pfcqdp", model.typeHandlerVersion()); - Assertions.assertFalse(model.autoUpgradeMinorVersion()); - Assertions.assertEquals("eokerqwkyhkobopg", model.forceUpdateTag()); - Assertions.assertEquals("k", model.provisionAfterExtensions().get(0)); + Assertions.assertEquals("ebqaaysjkixqtnq", model.publisher()); + Assertions.assertEquals("tezlwff", model.type()); + Assertions.assertEquals("iakp", model.typeHandlerVersion()); + Assertions.assertTrue(model.autoUpgradeMinorVersion()); + Assertions.assertEquals("mmji", model.forceUpdateTag()); + Assertions.assertEquals("ozphvwauyqncygu", model.provisionAfterExtensions().get(0)); Assertions.assertTrue(model.enableAutomaticUpgrade()); Assertions.assertEquals(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, model.setupOrder().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VMSSExtensionProperties model = new VMSSExtensionProperties().withPublisher("vdnkfxusem") - .withType("wzrmuh") - .withTypeHandlerVersion("pfcqdp") - .withAutoUpgradeMinorVersion(false) - .withSettings("datavpsvuoymgcce") - .withProtectedSettings("dataezrypql") - .withForceUpdateTag("eokerqwkyhkobopg") - .withProvisionAfterExtensions(Arrays.asList("k")) + VMSSExtensionProperties model = new VMSSExtensionProperties().withPublisher("ebqaaysjkixqtnq") + .withType("tezlwff") + .withTypeHandlerVersion("iakp") + .withAutoUpgradeMinorVersion(true) + .withSettings("datam") + .withProtectedSettings("datad") + .withForceUpdateTag("mmji") + .withProvisionAfterExtensions(Arrays.asList("ozphvwauyqncygu", "kvi")) .withEnableAutomaticUpgrade(true) - .withSetupOrder(Arrays.asList(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, - VmssExtensionSetupOrder.BEFORE_SFRUNTIME, VmssExtensionSetupOrder.BEFORE_SFRUNTIME)); + .withSetupOrder( + Arrays.asList(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, VmssExtensionSetupOrder.BEFORE_SFRUNTIME)); model = BinaryData.fromObject(model).toObject(VMSSExtensionProperties.class); - Assertions.assertEquals("vdnkfxusem", model.publisher()); - Assertions.assertEquals("wzrmuh", model.type()); - Assertions.assertEquals("pfcqdp", model.typeHandlerVersion()); - Assertions.assertFalse(model.autoUpgradeMinorVersion()); - Assertions.assertEquals("eokerqwkyhkobopg", model.forceUpdateTag()); - Assertions.assertEquals("k", model.provisionAfterExtensions().get(0)); + Assertions.assertEquals("ebqaaysjkixqtnq", model.publisher()); + Assertions.assertEquals("tezlwff", model.type()); + Assertions.assertEquals("iakp", model.typeHandlerVersion()); + Assertions.assertTrue(model.autoUpgradeMinorVersion()); + Assertions.assertEquals("mmji", model.forceUpdateTag()); + Assertions.assertEquals("ozphvwauyqncygu", model.provisionAfterExtensions().get(0)); Assertions.assertTrue(model.enableAutomaticUpgrade()); Assertions.assertEquals(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, model.setupOrder().get(0)); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSizeTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSizeTests.java index 77db834f295d..75c7ce38cd10 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSizeTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSizeTests.java @@ -10,6 +10,6 @@ public final class VMSizeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VMSize model = BinaryData.fromString("{\"size\":\"qapnedgfbcv\"}").toObject(VMSize.class); + VMSize model = BinaryData.fromString("{\"size\":\"ovvqfovljxywsu\"}").toObject(VMSize.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultCertificateTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultCertificateTests.java index d173b9d51d5d..aaf4c0505c25 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultCertificateTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultCertificateTests.java @@ -11,19 +11,18 @@ public final class VaultCertificateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VaultCertificate model = BinaryData - .fromString("{\"certificateUrl\":\"hfkvtvsexsowuel\",\"certificateStore\":\"qhhahhxvrhmzkwpj\"}") - .toObject(VaultCertificate.class); - Assertions.assertEquals("hfkvtvsexsowuel", model.certificateUrl()); - Assertions.assertEquals("qhhahhxvrhmzkwpj", model.certificateStore()); + VaultCertificate model + = BinaryData.fromString("{\"certificateUrl\":\"on\",\"certificateStore\":\"myhgfipnsxkmc\"}") + .toObject(VaultCertificate.class); + Assertions.assertEquals("on", model.certificateUrl()); + Assertions.assertEquals("myhgfipnsxkmc", model.certificateStore()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VaultCertificate model - = new VaultCertificate().withCertificateUrl("hfkvtvsexsowuel").withCertificateStore("qhhahhxvrhmzkwpj"); + VaultCertificate model = new VaultCertificate().withCertificateUrl("on").withCertificateStore("myhgfipnsxkmc"); model = BinaryData.fromObject(model).toObject(VaultCertificate.class); - Assertions.assertEquals("hfkvtvsexsowuel", model.certificateUrl()); - Assertions.assertEquals("qhhahhxvrhmzkwpj", model.certificateStore()); + Assertions.assertEquals("on", model.certificateUrl()); + Assertions.assertEquals("myhgfipnsxkmc", model.certificateStore()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultSecretGroupTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultSecretGroupTests.java index 3f5c6b4e5670..a23ab8ce05a5 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultSecretGroupTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultSecretGroupTests.java @@ -15,24 +15,23 @@ public final class VaultSecretGroupTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VaultSecretGroup model = BinaryData.fromString( - "{\"sourceVault\":{\"id\":\"cirgzp\"},\"vaultCertificates\":[{\"certificateUrl\":\"lazszrn\",\"certificateStore\":\"oiindfpwpjy\"},{\"certificateUrl\":\"wbtlhflsjcdh\",\"certificateStore\":\"zfjvfbgofe\"},{\"certificateUrl\":\"jagrqmqhldvr\",\"certificateStore\":\"iiojnal\"}]}") + "{\"sourceVault\":{\"id\":\"xccbdreaxhcex\"},\"vaultCertificates\":[{\"certificateUrl\":\"rvqahqkghtpwi\",\"certificateStore\":\"nhyjsv\"},{\"certificateUrl\":\"ycxzbfvoo\",\"certificateStore\":\"vrvmtgjqppyost\"}]}") .toObject(VaultSecretGroup.class); - Assertions.assertEquals("cirgzp", model.sourceVault().id()); - Assertions.assertEquals("lazszrn", model.vaultCertificates().get(0).certificateUrl()); - Assertions.assertEquals("oiindfpwpjy", model.vaultCertificates().get(0).certificateStore()); + Assertions.assertEquals("xccbdreaxhcex", model.sourceVault().id()); + Assertions.assertEquals("rvqahqkghtpwi", model.vaultCertificates().get(0).certificateUrl()); + Assertions.assertEquals("nhyjsv", model.vaultCertificates().get(0).certificateStore()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VaultSecretGroup model - = new VaultSecretGroup().withSourceVault(new SubResource().withId("cirgzp")) + = new VaultSecretGroup().withSourceVault(new SubResource().withId("xccbdreaxhcex")) .withVaultCertificates(Arrays.asList( - new VaultCertificate().withCertificateUrl("lazszrn").withCertificateStore("oiindfpwpjy"), - new VaultCertificate().withCertificateUrl("wbtlhflsjcdh").withCertificateStore("zfjvfbgofe"), - new VaultCertificate().withCertificateUrl("jagrqmqhldvr").withCertificateStore("iiojnal"))); + new VaultCertificate().withCertificateUrl("rvqahqkghtpwi").withCertificateStore("nhyjsv"), + new VaultCertificate().withCertificateUrl("ycxzbfvoo").withCertificateStore("vrvmtgjqppyost"))); model = BinaryData.fromObject(model).toObject(VaultSecretGroup.class); - Assertions.assertEquals("cirgzp", model.sourceVault().id()); - Assertions.assertEquals("lazszrn", model.vaultCertificates().get(0).certificateUrl()); - Assertions.assertEquals("oiindfpwpjy", model.vaultCertificates().get(0).certificateStore()); + Assertions.assertEquals("xccbdreaxhcex", model.sourceVault().id()); + Assertions.assertEquals("rvqahqkghtpwi", model.vaultCertificates().get(0).certificateUrl()); + Assertions.assertEquals("nhyjsv", model.vaultCertificates().get(0).certificateStore()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmApplicationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmApplicationTests.java index 8cfa5beb4bf7..583931d6201e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmApplicationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmApplicationTests.java @@ -12,30 +12,30 @@ public final class VmApplicationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VmApplication model = BinaryData.fromString( - "{\"configurationReference\":\"qmi\",\"enableAutomaticUpgrade\":false,\"order\":1222923392,\"packageReferenceId\":\"ggufhyaomtb\",\"vmGalleryTags\":\"havgrvk\",\"treatFailureAsDeploymentFailure\":true}") + "{\"configurationReference\":\"zuo\",\"enableAutomaticUpgrade\":false,\"order\":1975248748,\"packageReferenceId\":\"w\",\"vmGalleryTags\":\"ioknssxmoj\",\"treatFailureAsDeploymentFailure\":false}") .toObject(VmApplication.class); - Assertions.assertEquals("qmi", model.configurationReference()); + Assertions.assertEquals("zuo", model.configurationReference()); Assertions.assertFalse(model.enableAutomaticUpgrade()); - Assertions.assertEquals(1222923392, model.order()); - Assertions.assertEquals("ggufhyaomtb", model.packageReferenceId()); - Assertions.assertEquals("havgrvk", model.vmGalleryTags()); - Assertions.assertTrue(model.treatFailureAsDeploymentFailure()); + Assertions.assertEquals(1975248748, model.order()); + Assertions.assertEquals("w", model.packageReferenceId()); + Assertions.assertEquals("ioknssxmoj", model.vmGalleryTags()); + Assertions.assertFalse(model.treatFailureAsDeploymentFailure()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VmApplication model = new VmApplication().withConfigurationReference("qmi") + VmApplication model = new VmApplication().withConfigurationReference("zuo") .withEnableAutomaticUpgrade(false) - .withOrder(1222923392) - .withPackageReferenceId("ggufhyaomtb") - .withVmGalleryTags("havgrvk") - .withTreatFailureAsDeploymentFailure(true); + .withOrder(1975248748) + .withPackageReferenceId("w") + .withVmGalleryTags("ioknssxmoj") + .withTreatFailureAsDeploymentFailure(false); model = BinaryData.fromObject(model).toObject(VmApplication.class); - Assertions.assertEquals("qmi", model.configurationReference()); + Assertions.assertEquals("zuo", model.configurationReference()); Assertions.assertFalse(model.enableAutomaticUpgrade()); - Assertions.assertEquals(1222923392, model.order()); - Assertions.assertEquals("ggufhyaomtb", model.packageReferenceId()); - Assertions.assertEquals("havgrvk", model.vmGalleryTags()); - Assertions.assertTrue(model.treatFailureAsDeploymentFailure()); + Assertions.assertEquals(1975248748, model.order()); + Assertions.assertEquals("w", model.packageReferenceId()); + Assertions.assertEquals("ioknssxmoj", model.vmGalleryTags()); + Assertions.assertFalse(model.treatFailureAsDeploymentFailure()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmManagedIdentityTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmManagedIdentityTests.java index 9aa28efef096..46031d57aa54 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmManagedIdentityTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmManagedIdentityTests.java @@ -12,17 +12,17 @@ public final class VmManagedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VmManagedIdentity model = BinaryData - .fromString("{\"userAssignedIdentities\":[\"lpqekf\",\"nkhtjsyingw\",\"qatmtdhtmdvy\",\"gikdgsz\"]}") - .toObject(VmManagedIdentity.class); - Assertions.assertEquals("lpqekf", model.userAssignedIdentities().get(0)); + VmManagedIdentity model + = BinaryData.fromString("{\"userAssignedIdentities\":[\"jbypel\",\"c\",\"vhixbjxy\",\"w\"]}") + .toObject(VmManagedIdentity.class); + Assertions.assertEquals("jbypel", model.userAssignedIdentities().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VmManagedIdentity model = new VmManagedIdentity() - .withUserAssignedIdentities(Arrays.asList("lpqekf", "nkhtjsyingw", "qatmtdhtmdvy", "gikdgsz")); + VmManagedIdentity model + = new VmManagedIdentity().withUserAssignedIdentities(Arrays.asList("jbypel", "c", "vhixbjxy", "w")); model = BinaryData.fromObject(model).toObject(VmManagedIdentity.class); - Assertions.assertEquals("lpqekf", model.userAssignedIdentities().get(0)); + Assertions.assertEquals("jbypel", model.userAssignedIdentities().get(0)); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssDataDiskTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssDataDiskTests.java index beae5690cb52..ca0beda69e7b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssDataDiskTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssDataDiskTests.java @@ -14,24 +14,24 @@ public final class VmssDataDiskTests { public void testDeserialize() throws Exception { VmssDataDisk model = BinaryData .fromString( - "{\"lun\":366208637,\"diskSizeGB\":2107533163,\"diskType\":\"Standard_LRS\",\"diskLetter\":\"olvrw\"}") + "{\"lun\":1845240712,\"diskSizeGB\":1128027174,\"diskType\":\"PremiumV2_LRS\",\"diskLetter\":\"ywub\"}") .toObject(VmssDataDisk.class); - Assertions.assertEquals(366208637, model.lun()); - Assertions.assertEquals(2107533163, model.diskSizeGB()); - Assertions.assertEquals(DiskType.STANDARD_LRS, model.diskType()); - Assertions.assertEquals("olvrw", model.diskLetter()); + Assertions.assertEquals(1845240712, model.lun()); + Assertions.assertEquals(1128027174, model.diskSizeGB()); + Assertions.assertEquals(DiskType.PREMIUM_V2_LRS, model.diskType()); + Assertions.assertEquals("ywub", model.diskLetter()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VmssDataDisk model = new VmssDataDisk().withLun(366208637) - .withDiskSizeGB(2107533163) - .withDiskType(DiskType.STANDARD_LRS) - .withDiskLetter("olvrw"); + VmssDataDisk model = new VmssDataDisk().withLun(1845240712) + .withDiskSizeGB(1128027174) + .withDiskType(DiskType.PREMIUM_V2_LRS) + .withDiskLetter("ywub"); model = BinaryData.fromObject(model).toObject(VmssDataDisk.class); - Assertions.assertEquals(366208637, model.lun()); - Assertions.assertEquals(2107533163, model.diskSizeGB()); - Assertions.assertEquals(DiskType.STANDARD_LRS, model.diskType()); - Assertions.assertEquals("olvrw", model.diskLetter()); + Assertions.assertEquals(1845240712, model.lun()); + Assertions.assertEquals(1128027174, model.diskSizeGB()); + Assertions.assertEquals(DiskType.PREMIUM_V2_LRS, model.diskType()); + Assertions.assertEquals("ywub", model.diskLetter()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssExtensionTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssExtensionTests.java index 836616a665fb..c822877e05ac 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssExtensionTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssExtensionTests.java @@ -14,42 +14,41 @@ public final class VmssExtensionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VmssExtension model = BinaryData.fromString( - "{\"name\":\"wws\",\"properties\":{\"publisher\":\"ughftqsx\",\"type\":\"qxujxukndxd\",\"typeHandlerVersion\":\"grjguufzd\",\"autoUpgradeMinorVersion\":false,\"settings\":\"datatfih\",\"protectedSettings\":\"databotzingamvppho\",\"forceUpdateTag\":\"qzudphq\",\"provisionAfterExtensions\":[\"dkfw\",\"nwcvtbvkayhmtnv\",\"qiatkzwpcnp\",\"zcjaesgvvsccy\"],\"provisioningState\":\"g\",\"enableAutomaticUpgrade\":true,\"setupOrder\":[\"BeforeSFRuntime\",\"BeforeSFRuntime\",\"BeforeSFRuntime\",\"BeforeSFRuntime\"]}}") + "{\"name\":\"a\",\"properties\":{\"publisher\":\"krrjrea\",\"type\":\"xt\",\"typeHandlerVersion\":\"gumhjglikkxws\",\"autoUpgradeMinorVersion\":true,\"settings\":\"dataqpvuzlmvfelf\",\"protectedSettings\":\"datagplcrpwjxeznoigb\",\"forceUpdateTag\":\"jwmwkpnbs\",\"provisionAfterExtensions\":[\"jjoqkagf\",\"sxtta\",\"gzxnfaazpxdtnk\",\"mkqjj\"],\"provisioningState\":\"uenvrkp\",\"enableAutomaticUpgrade\":true,\"setupOrder\":[\"BeforeSFRuntime\",\"BeforeSFRuntime\"]}}") .toObject(VmssExtension.class); - Assertions.assertEquals("wws", model.name()); - Assertions.assertEquals("ughftqsx", model.publisher()); - Assertions.assertEquals("qxujxukndxd", model.type()); - Assertions.assertEquals("grjguufzd", model.typeHandlerVersion()); - Assertions.assertFalse(model.autoUpgradeMinorVersion()); - Assertions.assertEquals("qzudphq", model.forceUpdateTag()); - Assertions.assertEquals("dkfw", model.provisionAfterExtensions().get(0)); + Assertions.assertEquals("a", model.name()); + Assertions.assertEquals("krrjrea", model.publisher()); + Assertions.assertEquals("xt", model.type()); + Assertions.assertEquals("gumhjglikkxws", model.typeHandlerVersion()); + Assertions.assertTrue(model.autoUpgradeMinorVersion()); + Assertions.assertEquals("jwmwkpnbs", model.forceUpdateTag()); + Assertions.assertEquals("jjoqkagf", model.provisionAfterExtensions().get(0)); Assertions.assertTrue(model.enableAutomaticUpgrade()); Assertions.assertEquals(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, model.setupOrder().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VmssExtension model = new VmssExtension().withName("wws") - .withPublisher("ughftqsx") - .withType("qxujxukndxd") - .withTypeHandlerVersion("grjguufzd") - .withAutoUpgradeMinorVersion(false) - .withSettings("datatfih") - .withProtectedSettings("databotzingamvppho") - .withForceUpdateTag("qzudphq") - .withProvisionAfterExtensions(Arrays.asList("dkfw", "nwcvtbvkayhmtnv", "qiatkzwpcnp", "zcjaesgvvsccy")) + VmssExtension model = new VmssExtension().withName("a") + .withPublisher("krrjrea") + .withType("xt") + .withTypeHandlerVersion("gumhjglikkxws") + .withAutoUpgradeMinorVersion(true) + .withSettings("dataqpvuzlmvfelf") + .withProtectedSettings("datagplcrpwjxeznoigb") + .withForceUpdateTag("jwmwkpnbs") + .withProvisionAfterExtensions(Arrays.asList("jjoqkagf", "sxtta", "gzxnfaazpxdtnk", "mkqjj")) .withEnableAutomaticUpgrade(true) .withSetupOrder( - Arrays.asList(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, VmssExtensionSetupOrder.BEFORE_SFRUNTIME, - VmssExtensionSetupOrder.BEFORE_SFRUNTIME, VmssExtensionSetupOrder.BEFORE_SFRUNTIME)); + Arrays.asList(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, VmssExtensionSetupOrder.BEFORE_SFRUNTIME)); model = BinaryData.fromObject(model).toObject(VmssExtension.class); - Assertions.assertEquals("wws", model.name()); - Assertions.assertEquals("ughftqsx", model.publisher()); - Assertions.assertEquals("qxujxukndxd", model.type()); - Assertions.assertEquals("grjguufzd", model.typeHandlerVersion()); - Assertions.assertFalse(model.autoUpgradeMinorVersion()); - Assertions.assertEquals("qzudphq", model.forceUpdateTag()); - Assertions.assertEquals("dkfw", model.provisionAfterExtensions().get(0)); + Assertions.assertEquals("a", model.name()); + Assertions.assertEquals("krrjrea", model.publisher()); + Assertions.assertEquals("xt", model.type()); + Assertions.assertEquals("gumhjglikkxws", model.typeHandlerVersion()); + Assertions.assertTrue(model.autoUpgradeMinorVersion()); + Assertions.assertEquals("jwmwkpnbs", model.forceUpdateTag()); + Assertions.assertEquals("jjoqkagf", model.provisionAfterExtensions().get(0)); Assertions.assertTrue(model.enableAutomaticUpgrade()); Assertions.assertEquals(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, model.setupOrder().get(0)); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ZoneFaultSimulationContentTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ZoneFaultSimulationContentTests.java index f5dab42a57f5..7e915b205b04 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ZoneFaultSimulationContentTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ZoneFaultSimulationContentTests.java @@ -15,22 +15,22 @@ public final class ZoneFaultSimulationContentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ZoneFaultSimulationContent model = BinaryData.fromString( - "{\"faultKind\":\"Zone\",\"zones\":[\"dkcrodt\",\"infwjlfltkacjve\",\"kdlfoa\"],\"force\":false,\"constraints\":{\"expirationTime\":\"2021-01-22T11:21:37Z\"}}") + "{\"faultKind\":\"Zone\",\"zones\":[\"wqaldsyu\"],\"force\":true,\"constraints\":{\"expirationTime\":\"2021-06-17T14:42:30Z\"}}") .toObject(ZoneFaultSimulationContent.class); - Assertions.assertFalse(model.force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-22T11:21:37Z"), model.constraints().expirationTime()); - Assertions.assertEquals("dkcrodt", model.zones().get(0)); + Assertions.assertTrue(model.force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-17T14:42:30Z"), model.constraints().expirationTime()); + Assertions.assertEquals("wqaldsyu", model.zones().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ZoneFaultSimulationContent model = new ZoneFaultSimulationContent().withForce(false) + ZoneFaultSimulationContent model = new ZoneFaultSimulationContent().withForce(true) .withConstraints( - new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-01-22T11:21:37Z"))) - .withZones(Arrays.asList("dkcrodt", "infwjlfltkacjve", "kdlfoa")); + new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-06-17T14:42:30Z"))) + .withZones(Arrays.asList("wqaldsyu")); model = BinaryData.fromObject(model).toObject(ZoneFaultSimulationContent.class); - Assertions.assertFalse(model.force()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-22T11:21:37Z"), model.constraints().expirationTime()); - Assertions.assertEquals("dkcrodt", model.zones().get(0)); + Assertions.assertTrue(model.force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-17T14:42:30Z"), model.constraints().expirationTime()); + Assertions.assertEquals("wqaldsyu", model.zones().get(0)); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/tsp-location.yaml b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/tsp-location.yaml index 960526af63f8..a26d7c515cce 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/tsp-location.yaml +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/tsp-location.yaml @@ -1,4 +1,4 @@ -directory: specification/servicefabricmanagedclusters/ServiceFabricManagedClusters.Management -commit: 05584a1019e75159b0dc70a6751afaa2c77868e6 +directory: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/ServiceFabricManagedClusters +commit: 833aeb9992144f6e04d99de1316a7f37a001ee94 repo: Azure/azure-rest-api-specs additionalDirectories: From eb81443b8e828c6f79acede6304d6a7fb10f2be2 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 24 Nov 2025 17:17:41 -0800 Subject: [PATCH 20/26] Sync eng/common directory with azure-sdk-tools for PR 13040 (#47369) * Include groupId in the pkg name when create api view request * Used the package info in the function signature --------- Co-authored-by: ray chen <raychen@microsoft.com> --- .../templates/steps/create-apireview.yml | 1 + .../templates/steps/validate-all-packages.yml | 1 + eng/common/scripts/Detect-Api-Changes.ps1 | 16 ++++++++++++---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/eng/common/pipelines/templates/steps/create-apireview.yml b/eng/common/pipelines/templates/steps/create-apireview.yml index 288c775aac76..e5deb551a382 100644 --- a/eng/common/pipelines/templates/steps/create-apireview.yml +++ b/eng/common/pipelines/templates/steps/create-apireview.yml @@ -40,6 +40,7 @@ steps: - task: Powershell@2 inputs: filePath: ${{ parameters.SourceRootPath }}/eng/common/scripts/Create-APIReview.ps1 + # PackageInfoFiles example: @('a/file1.json','a/file2.json') arguments: > -PackageInfoFiles @('${{ join(''',''', parameters.PackageInfoFiles) }}') -ArtifactList ('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Select-Object Name) diff --git a/eng/common/pipelines/templates/steps/validate-all-packages.yml b/eng/common/pipelines/templates/steps/validate-all-packages.yml index ae09d268a940..4bcb1286738c 100644 --- a/eng/common/pipelines/templates/steps/validate-all-packages.yml +++ b/eng/common/pipelines/templates/steps/validate-all-packages.yml @@ -24,6 +24,7 @@ steps: azureSubscription: opensource-api-connection scriptType: pscore scriptLocation: inlineScript + # PackageInfoFiles example: @('a/file1.json','a/file2.json') inlineScript: | $(Build.SourcesDirectory)/eng/common/scripts/Validate-All-Packages.ps1 ` -ArtifactList ('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Select-Object Name) ` diff --git a/eng/common/scripts/Detect-Api-Changes.ps1 b/eng/common/scripts/Detect-Api-Changes.ps1 index 5c261de37171..c8e00935cbe0 100644 --- a/eng/common/scripts/Detect-Api-Changes.ps1 +++ b/eng/common/scripts/Detect-Api-Changes.ps1 @@ -22,8 +22,16 @@ Param ( $configFileDir = Join-Path -Path $ArtifactPath "PackageInfo" # Submit API review request and return status whether current revision is approved or pending or failed to create review -function Submit-Request($filePath, $packageName, $packageType) +function Submit-Request($filePath, $packageInfo) { + $packageName = $packageInfo.ArtifactName ?? $packageInfo.Name + $packageType = $packageInfo.SdkType + + # Construct full package name with groupId if available + $fullPackageName = $packageName + if ($packageInfo.PSObject.Members.Name -contains "Group" -and $packageInfo.Group) { + $fullPackageName = "$($packageInfo.Group):$packageName" + } $repoName = $RepoFullName if (!$repoName) { $repoName = "azure/azure-sdk-for-$LanguageShort" @@ -36,7 +44,7 @@ function Submit-Request($filePath, $packageName, $packageType) $query.Add('commitSha', $CommitSha) $query.Add('repoName', $repoName) $query.Add('pullRequestNumber', $PullRequestNumber) - $query.Add('packageName', $packageName) + $query.Add('packageName', $fullPackageName) $query.Add('language', $LanguageShort) $query.Add('project', $DevopsProject) $query.Add('packageType', $packageType) @@ -75,7 +83,7 @@ function Submit-Request($filePath, $packageName, $packageType) catch { Write-Host "ERROR: API request failed" -ForegroundColor Red - Write-Host "Status Code: $($_.Exception.Response.StatusCode.Value__)" -ForegroundColor Yellow + Write-Host "Status Code: $($_.Exception.Response.StatusCode.Value__)" -ForegroundColor Yellow Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Yellow if ($_.ErrorDetails.Message) { Write-Host "Details: $($_.ErrorDetails.Message)" -ForegroundColor Yellow @@ -165,7 +173,7 @@ foreach ($packageInfoFile in $packageInfoFiles) if ($isRequired -eq $True) { $filePath = $pkgPath.Replace($ArtifactPath , "").Replace("\", "/") - $respCode = Submit-Request -filePath $filePath -packageName $pkgArtifactName -packageType $packageType + $respCode = Submit-Request -filePath $filePath -packageInfo $packageInfo if ($respCode -ne '200') { $responses[$pkgArtifactName] = $respCode From a18023d1192a47f7a2282846dae2b158c9a59370 Mon Sep 17 00:00:00 2001 From: Xiaofei Cao <92354331+XiaofeiCao@users.noreply.github.com> Date: Tue, 25 Nov 2025 10:21:32 +0800 Subject: [PATCH 21/26] Increment package versions for patch releases (#47361) Co-authored-by: azure-sdk <azuresdk@microsoft.com> --- eng/versioning/version_client.txt | 38 +++++++++---------- .../azure-resourcemanager-appplatform/pom.xml | 6 +-- .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-appservice/pom.xml | 8 ++-- .../CHANGELOG.md | 8 ++++ sdk/batch/azure-resourcemanager-batch/pom.xml | 2 +- .../azure-resourcemanager-cdn/CHANGELOG.md | 8 ++++ sdk/cdn/azure-resourcemanager-cdn/pom.xml | 4 +- sdk/chaos/azure-resourcemanager-chaos/pom.xml | 2 +- .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-compute/pom.xml | 8 ++-- .../CHANGELOG.md | 8 ++++ .../pom.xml | 6 +-- .../CHANGELOG.md | 8 ++++ .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-cosmos/pom.xml | 2 +- .../azure-resourcemanager-datafactory/pom.xml | 2 +- .../azure-resourcemanager-dns/CHANGELOG.md | 8 ++++ .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-eventhubs/pom.xml | 2 +- .../azure-resourcemanager-frontdoor/pom.xml | 2 +- .../azure-resourcemanager-hdinsight/pom.xml | 2 +- .../pom.xml | 2 +- .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-keyvault/pom.xml | 2 +- .../pom.xml | 4 +- .../pom.xml | 2 +- .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-monitor/pom.xml | 10 ++--- .../azure-resourcemanager-msi/CHANGELOG.md | 8 ++++ sdk/msi/azure-resourcemanager-msi/pom.xml | 2 +- .../azure-resourcemanager-network/pom.xml | 4 +- .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-redis/CHANGELOG.md | 8 ++++ sdk/redis/azure-resourcemanager-redis/pom.xml | 2 +- .../pom.xml | 2 +- .../azure-resourcemanager/pom.xml | 38 +++++++++---------- .../azure-resourcemanager-compute/pom.xml | 2 +- .../azure-resourcemanager-network/pom.xml | 2 +- .../azure-resourcemanager-search/CHANGELOG.md | 8 ++++ .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-sql/CHANGELOG.md | 8 ++++ sdk/sql/azure-resourcemanager-sql/pom.xml | 2 +- .../azure-resourcemanager-standbypool/pom.xml | 2 +- .../CHANGELOG.md | 8 ++++ .../azure-resourcemanager-storage/pom.xml | 4 +- .../CHANGELOG.md | 8 ++++ 47 files changed, 234 insertions(+), 82 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 0ea94f0a1f2a..e8f279b856f9 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -272,30 +272,30 @@ com.azure.spring:spring-cloud-azure-testcontainers;6.0.0;6.1.0-beta.1 com.azure:azure-spring-data-cosmos;6.0.0;6.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager;2.56.0;2.57.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-appplatform;2.51.0;2.52.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-appservice;2.54.0;2.55.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-authorization;2.53.5;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-cdn;2.53.4;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-compute;2.55.0;2.56.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.53.5;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.54.0;2.55.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-containerservice;2.56.0;2.57.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-appservice;2.54.1;2.55.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-authorization;2.53.6;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-cdn;2.53.5;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-compute;2.55.1;2.56.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.53.6;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.54.1;2.55.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-containerservice;2.56.1;2.57.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-cosmos;2.54.0;2.55.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-dns;2.53.4;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.53.4;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-keyvault;2.54.0;2.55.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-monitor;2.53.4;2.54.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-msi;2.53.4;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-dns;2.53.5;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.53.5;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-keyvault;2.54.1;2.55.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-monitor;2.53.5;2.54.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-msi;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-network;2.57.0;2.58.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-perf;1.0.0-beta.1;1.0.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-privatedns;2.53.4;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-privatedns;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-resources;2.53.5;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-redis;2.53.4;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-redis;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-samples;2.0.0-beta.1;2.0.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-search;2.54.3;2.55.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-servicebus;2.53.4;2.54.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-sql;2.53.4;2.54.0-beta.2 -com.azure.resourcemanager:azure-resourcemanager-storage;2.55.1;2.56.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-trafficmanager;2.53.4;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-search;2.54.4;2.55.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-servicebus;2.53.5;2.54.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-sql;2.53.5;2.54.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-storage;2.55.2;2.56.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-trafficmanager;2.53.5;2.54.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-test;2.0.0-beta.2;2.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-mediaservices;2.4.0;2.5.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-mysql;1.0.2;1.1.0-beta.1 diff --git a/sdk/appplatform/azure-resourcemanager-appplatform/pom.xml b/sdk/appplatform/azure-resourcemanager-appplatform/pom.xml index 45b58c6d0fdb..09c017f38a57 100644 --- a/sdk/appplatform/azure-resourcemanager-appplatform/pom.xml +++ b/sdk/appplatform/azure-resourcemanager-appplatform/pom.xml @@ -115,19 +115,19 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-keyvault</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-dns</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-appservice</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md b/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md index 229bf71bada3..8c54c9ff760a 100644 --- a/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md +++ b/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.54.1 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.54.0 (2025-11-13) ### Other Changes diff --git a/sdk/appservice/azure-resourcemanager-appservice/pom.xml b/sdk/appservice/azure-resourcemanager-appservice/pom.xml index 1f07a3e2ce54..0be7ed5bb346 100644 --- a/sdk/appservice/azure-resourcemanager-appservice/pom.xml +++ b/sdk/appservice/azure-resourcemanager-appservice/pom.xml @@ -69,22 +69,22 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-keyvault</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-dns</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> diff --git a/sdk/authorization/azure-resourcemanager-authorization/CHANGELOG.md b/sdk/authorization/azure-resourcemanager-authorization/CHANGELOG.md index 9f1cbcb033d1..17c6aa4a4f07 100644 --- a/sdk/authorization/azure-resourcemanager-authorization/CHANGELOG.md +++ b/sdk/authorization/azure-resourcemanager-authorization/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.6 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.5 (2025-11-14) ### Other Changes diff --git a/sdk/batch/azure-resourcemanager-batch/pom.xml b/sdk/batch/azure-resourcemanager-batch/pom.xml index 09c93d161f9a..fb5f52d9c485 100644 --- a/sdk/batch/azure-resourcemanager-batch/pom.xml +++ b/sdk/batch/azure-resourcemanager-batch/pom.xml @@ -77,7 +77,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/cdn/azure-resourcemanager-cdn/CHANGELOG.md b/sdk/cdn/azure-resourcemanager-cdn/CHANGELOG.md index ae6f0ae4ef40..62f72956a8d9 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/CHANGELOG.md +++ b/sdk/cdn/azure-resourcemanager-cdn/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes diff --git a/sdk/cdn/azure-resourcemanager-cdn/pom.xml b/sdk/cdn/azure-resourcemanager-cdn/pom.xml index 6ce5fc88d8e8..0666cc3c49a5 100644 --- a/sdk/cdn/azure-resourcemanager-cdn/pom.xml +++ b/sdk/cdn/azure-resourcemanager-cdn/pom.xml @@ -70,13 +70,13 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-appservice</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-dns</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/chaos/azure-resourcemanager-chaos/pom.xml b/sdk/chaos/azure-resourcemanager-chaos/pom.xml index 6bcb76489023..c4df66a8d3a8 100644 --- a/sdk/chaos/azure-resourcemanager-chaos/pom.xml +++ b/sdk/chaos/azure-resourcemanager-chaos/pom.xml @@ -97,7 +97,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-keyvault</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md b/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md index fea9335cb16b..842551add4dd 100644 --- a/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md +++ b/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.55.1 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.55.0 (2025-11-17) ### Other Changes diff --git a/sdk/compute/azure-resourcemanager-compute/pom.xml b/sdk/compute/azure-resourcemanager-compute/pom.xml index 5ad94dbbeb09..5b7045da2805 100644 --- a/sdk/compute/azure-resourcemanager-compute/pom.xml +++ b/sdk/compute/azure-resourcemanager-compute/pom.xml @@ -76,7 +76,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> @@ -86,12 +86,12 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-authorization</artifactId> - <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> + <version>2.53.6</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> </dependency> <dependency> <groupId>org.slf4j</groupId> @@ -120,7 +120,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-keyvault</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md b/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md index 0e9b1d756362..aaae3a70b8fb 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.6 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.5 (2025-10-27) ### Other Changes diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml b/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml index 60d58341ef26..4afb220d5cc0 100644 --- a/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml +++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml @@ -65,17 +65,17 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-authorization</artifactId> - <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> + <version>2.53.6</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> diff --git a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md index 5fc3c0e4a8f7..8cffc1811c50 100644 --- a/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md +++ b/sdk/containerregistry/azure-resourcemanager-containerregistry/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.54.1 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.54.0 (2025-11-05) ### Other Changes diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md index b793fbbd6344..749aeddb0309 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.56.1 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.56.0 (2025-11-10) ### Other Changes diff --git a/sdk/cosmos/azure-resourcemanager-cosmos/pom.xml b/sdk/cosmos/azure-resourcemanager-cosmos/pom.xml index 3121fdd8d200..4bfe79dab908 100644 --- a/sdk/cosmos/azure-resourcemanager-cosmos/pom.xml +++ b/sdk/cosmos/azure-resourcemanager-cosmos/pom.xml @@ -73,7 +73,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml b/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml index 5a65749c539c..98955ffca0fc 100644 --- a/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml +++ b/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml @@ -77,7 +77,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/dns/azure-resourcemanager-dns/CHANGELOG.md b/sdk/dns/azure-resourcemanager-dns/CHANGELOG.md index 4246217fad55..6799cf2d589b 100644 --- a/sdk/dns/azure-resourcemanager-dns/CHANGELOG.md +++ b/sdk/dns/azure-resourcemanager-dns/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/CHANGELOG.md b/sdk/eventhubs/azure-resourcemanager-eventhubs/CHANGELOG.md index cda98337fba0..358ce82f5169 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/CHANGELOG.md +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes diff --git a/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml b/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml index 2772fc46ca63..451da1df5498 100644 --- a/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml +++ b/sdk/eventhubs/azure-resourcemanager-eventhubs/pom.xml @@ -64,7 +64,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> diff --git a/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml b/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml index 6784e9496827..da6ef91e386b 100644 --- a/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml +++ b/sdk/frontdoor/azure-resourcemanager-frontdoor/pom.xml @@ -79,7 +79,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml b/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml index 1d0e62b9e295..41f136fa7187 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml @@ -78,7 +78,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/pom.xml b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/pom.xml index 8df22cce5d74..954fa6fa1ddf 100644 --- a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/pom.xml +++ b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/pom.xml @@ -84,7 +84,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/CHANGELOG.md b/sdk/keyvault/azure-resourcemanager-keyvault/CHANGELOG.md index 533419e99e3b..5276862ebf9a 100644 --- a/sdk/keyvault/azure-resourcemanager-keyvault/CHANGELOG.md +++ b/sdk/keyvault/azure-resourcemanager-keyvault/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.54.1 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.54.0 (2025-11-10) ### Other Changes diff --git a/sdk/keyvault/azure-resourcemanager-keyvault/pom.xml b/sdk/keyvault/azure-resourcemanager-keyvault/pom.xml index 46242d576d9c..51bb75ddc174 100644 --- a/sdk/keyvault/azure-resourcemanager-keyvault/pom.xml +++ b/sdk/keyvault/azure-resourcemanager-keyvault/pom.xml @@ -64,7 +64,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-authorization</artifactId> - <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> + <version>2.53.6</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> </dependency> <dependency> <groupId>com.azure</groupId> diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml b/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml index fb389f74ba9d..76e8f1d8750e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml @@ -78,13 +78,13 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-keyvault</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml index 17f53245c268..3a4c39151d34 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml @@ -92,7 +92,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/monitor/azure-resourcemanager-monitor/CHANGELOG.md b/sdk/monitor/azure-resourcemanager-monitor/CHANGELOG.md index 5b162c5df743..7897ab59d475 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/CHANGELOG.md +++ b/sdk/monitor/azure-resourcemanager-monitor/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.54.0-beta.1 (2025-11-06) ### Other Changes diff --git a/sdk/monitor/azure-resourcemanager-monitor/pom.xml b/sdk/monitor/azure-resourcemanager-monitor/pom.xml index 743b8cbb9711..9fa3872ea845 100644 --- a/sdk/monitor/azure-resourcemanager-monitor/pom.xml +++ b/sdk/monitor/azure-resourcemanager-monitor/pom.xml @@ -84,31 +84,31 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-compute</artifactId> - <version>2.55.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-compute;dependency} --> + <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-compute;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-appservice</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-eventhubs</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-eventhubs;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-eventhubs;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-sql</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-sql;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-sql;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/msi/azure-resourcemanager-msi/CHANGELOG.md b/sdk/msi/azure-resourcemanager-msi/CHANGELOG.md index 1a6a7bf4354a..87e2077b7ba6 100644 --- a/sdk/msi/azure-resourcemanager-msi/CHANGELOG.md +++ b/sdk/msi/azure-resourcemanager-msi/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes diff --git a/sdk/msi/azure-resourcemanager-msi/pom.xml b/sdk/msi/azure-resourcemanager-msi/pom.xml index d49c9b83a261..54d328a8fda0 100644 --- a/sdk/msi/azure-resourcemanager-msi/pom.xml +++ b/sdk/msi/azure-resourcemanager-msi/pom.xml @@ -66,7 +66,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-authorization</artifactId> - <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> + <version>2.53.6</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> diff --git a/sdk/network/azure-resourcemanager-network/pom.xml b/sdk/network/azure-resourcemanager-network/pom.xml index 3af6d25c2da4..87b1d32d0674 100644 --- a/sdk/network/azure-resourcemanager-network/pom.xml +++ b/sdk/network/azure-resourcemanager-network/pom.xml @@ -93,13 +93,13 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-keyvault</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> <scope>test</scope> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/privatedns/azure-resourcemanager-privatedns/CHANGELOG.md b/sdk/privatedns/azure-resourcemanager-privatedns/CHANGELOG.md index 2e743822784b..7c0b9b4fe866 100644 --- a/sdk/privatedns/azure-resourcemanager-privatedns/CHANGELOG.md +++ b/sdk/privatedns/azure-resourcemanager-privatedns/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes diff --git a/sdk/redis/azure-resourcemanager-redis/CHANGELOG.md b/sdk/redis/azure-resourcemanager-redis/CHANGELOG.md index 856b81de17f3..f536203cffd7 100644 --- a/sdk/redis/azure-resourcemanager-redis/CHANGELOG.md +++ b/sdk/redis/azure-resourcemanager-redis/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes diff --git a/sdk/redis/azure-resourcemanager-redis/pom.xml b/sdk/redis/azure-resourcemanager-redis/pom.xml index caa624a01433..f9f1617136fd 100644 --- a/sdk/redis/azure-resourcemanager-redis/pom.xml +++ b/sdk/redis/azure-resourcemanager-redis/pom.xml @@ -84,7 +84,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml index f29f371479d7..b46c5d7e59c3 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml @@ -92,7 +92,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-compute</artifactId> - <version>2.55.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-compute;dependency} --> + <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-compute;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index 71ec0b11ccef..158429d8b1f0 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -97,12 +97,12 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-compute</artifactId> - <version>2.55.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-compute;dependency} --> + <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-compute;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> @@ -112,27 +112,27 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-keyvault</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-keyvault;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-sql</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-sql;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-sql;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-authorization</artifactId> - <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> + <version>2.53.6</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-appservice</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-appservice;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> @@ -142,22 +142,22 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerservice</artifactId> - <version>2.56.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerservice;dependency} --> + <version>2.56.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerservice;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-monitor</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-monitor;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-monitor;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerregistry</artifactId> - <version>2.54.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerregistry;dependency} --> + <version>2.54.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerregistry;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-dns</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-dns;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> @@ -167,42 +167,42 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-containerinstance</artifactId> - <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerinstance;dependency} --> + <version>2.53.6</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-containerinstance;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-privatedns</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-privatedns;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-privatedns;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-redis</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-redis;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-redis;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-eventhubs</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-eventhubs;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-eventhubs;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-trafficmanager</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-trafficmanager;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-trafficmanager;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-servicebus</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-servicebus;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-servicebus;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-cdn</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-cdn;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-cdn;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-search</artifactId> - <version>2.54.3</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-search;dependency} --> + <version>2.54.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-search;dependency} --> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> diff --git a/sdk/resourcemanagerhybrid/azure-resourcemanager-compute/pom.xml b/sdk/resourcemanagerhybrid/azure-resourcemanager-compute/pom.xml index 072308e731d3..7d8e5a76ec6d 100644 --- a/sdk/resourcemanagerhybrid/azure-resourcemanager-compute/pom.xml +++ b/sdk/resourcemanagerhybrid/azure-resourcemanager-compute/pom.xml @@ -83,7 +83,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> diff --git a/sdk/resourcemanagerhybrid/azure-resourcemanager-network/pom.xml b/sdk/resourcemanagerhybrid/azure-resourcemanager-network/pom.xml index f303268c68e6..4d3347a3d01c 100644 --- a/sdk/resourcemanagerhybrid/azure-resourcemanager-network/pom.xml +++ b/sdk/resourcemanagerhybrid/azure-resourcemanager-network/pom.xml @@ -99,7 +99,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/search/azure-resourcemanager-search/CHANGELOG.md b/sdk/search/azure-resourcemanager-search/CHANGELOG.md index 4c7468e3f210..15b1878fe004 100644 --- a/sdk/search/azure-resourcemanager-search/CHANGELOG.md +++ b/sdk/search/azure-resourcemanager-search/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.54.4 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.54.3 (2025-10-27) ### Other Changes diff --git a/sdk/servicebus/azure-resourcemanager-servicebus/CHANGELOG.md b/sdk/servicebus/azure-resourcemanager-servicebus/CHANGELOG.md index bbc15f84480f..fec0a343a329 100644 --- a/sdk/servicebus/azure-resourcemanager-servicebus/CHANGELOG.md +++ b/sdk/servicebus/azure-resourcemanager-servicebus/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes diff --git a/sdk/sql/azure-resourcemanager-sql/CHANGELOG.md b/sdk/sql/azure-resourcemanager-sql/CHANGELOG.md index b4aca42ddfa0..7ca79b27dae3 100644 --- a/sdk/sql/azure-resourcemanager-sql/CHANGELOG.md +++ b/sdk/sql/azure-resourcemanager-sql/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes diff --git a/sdk/sql/azure-resourcemanager-sql/pom.xml b/sdk/sql/azure-resourcemanager-sql/pom.xml index 0e7855e66a70..2cf41c4182b1 100644 --- a/sdk/sql/azure-resourcemanager-sql/pom.xml +++ b/sdk/sql/azure-resourcemanager-sql/pom.xml @@ -68,7 +68,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-storage</artifactId> - <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> + <version>2.55.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-storage;dependency} --> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> diff --git a/sdk/standbypool/azure-resourcemanager-standbypool/pom.xml b/sdk/standbypool/azure-resourcemanager-standbypool/pom.xml index 3409bd09e4d4..fb86be2fb7af 100644 --- a/sdk/standbypool/azure-resourcemanager-standbypool/pom.xml +++ b/sdk/standbypool/azure-resourcemanager-standbypool/pom.xml @@ -78,7 +78,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-compute</artifactId> - <version>2.55.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-compute;dependency} --> + <version>2.55.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-compute;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/storage/azure-resourcemanager-storage/CHANGELOG.md b/sdk/storage/azure-resourcemanager-storage/CHANGELOG.md index 58211dd2e70c..1023d448b8d0 100644 --- a/sdk/storage/azure-resourcemanager-storage/CHANGELOG.md +++ b/sdk/storage/azure-resourcemanager-storage/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.55.2 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.55.1 (2025-10-27) ### Other Changes diff --git a/sdk/storage/azure-resourcemanager-storage/pom.xml b/sdk/storage/azure-resourcemanager-storage/pom.xml index e3f7d52a4c08..c23bc4a485cb 100644 --- a/sdk/storage/azure-resourcemanager-storage/pom.xml +++ b/sdk/storage/azure-resourcemanager-storage/pom.xml @@ -67,12 +67,12 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-msi</artifactId> - <version>2.53.4</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> + <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-msi;dependency} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-authorization</artifactId> - <version>2.53.5</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> + <version>2.53.6</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-authorization;dependency} --> </dependency> <dependency> <groupId>org.slf4j</groupId> diff --git a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/CHANGELOG.md b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/CHANGELOG.md index 067b1e9398ca..9d765eca6479 100644 --- a/sdk/trafficmanager/azure-resourcemanager-trafficmanager/CHANGELOG.md +++ b/sdk/trafficmanager/azure-resourcemanager-trafficmanager/CHANGELOG.md @@ -10,6 +10,14 @@ ### Other Changes +## 2.53.5 (2025-11-24) + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.53.4 (2025-10-27) ### Other Changes From 9326612dc96c1c7ac46f5da0da6d03733df71930 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 24 Nov 2025 19:52:57 -0800 Subject: [PATCH 22/26] Increment package versions for newrelicobservability releases (#47371) --- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 10 ++++++++++ .../pom.xml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index e8f279b856f9..e25fc154fec9 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -437,7 +437,7 @@ com.azure.resourcemanager:azure-resourcemanager-storagemover;1.4.0;1.5.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-graphservices;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-voiceservices;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-paloaltonetworks-ngfw;1.3.0;1.4.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-newrelicobservability;1.2.0;1.3.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-newrelicobservability;1.2.0;1.3.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-qumulo;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-selfhelp;1.0.0;1.1.0-beta.6 com.azure.resourcemanager:azure-resourcemanager-networkcloud;2.0.0;2.1.0-beta.2 diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md index e42f57197c73..6bb0d9f9e2ec 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.3.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.3.0-beta.1 (2025-11-24) - Azure Resource Manager NewRelicObservability client library for Java. This package contains Microsoft Azure SDK for NewRelicObservability Management SDK. Package tag package-2025-05-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml index 8d4aebe84ea3..a2c45ae899da 100644 --- a/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml +++ b/sdk/newrelicobservability/azure-resourcemanager-newrelicobservability/pom.xml @@ -14,7 +14,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager-newrelicobservability</artifactId> - <version>1.3.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-newrelicobservability;current} --> + <version>1.3.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-newrelicobservability;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for NewRelicObservability Management</name> From 9972630646638a675f3d77105cb3bdfea75d5d75 Mon Sep 17 00:00:00 2001 From: Xiaofei Cao <92354331+XiaofeiCao@users.noreply.github.com> Date: Tue, 25 Nov 2025 15:04:31 +0800 Subject: [PATCH 23/26] mgmt, prepare release 2.57.0 (#47370) * prepare 2.57.0 * pom.xml * skip record for some CI failure tests * more recording skips * more recording skips * more recording skips --- eng/versioning/version_client.txt | 2 +- .../azure-resourcemanager-perf/pom.xml | 2 +- .../azure-resourcemanager-samples/pom.xml | 2 +- .../samples/ResourceSampleTests.java | 2 ++ .../samples/StorageSampleTests.java | 1 + .../azure-resourcemanager/CHANGELOG.md | 14 +++++++++++++- .../azure-resourcemanager/README.md | 2 +- sdk/resourcemanager/azure-resourcemanager/pom.xml | 2 +- .../resourcemanager/AzureResourceManagerTests.java | 4 ++++ .../azure/resourcemanager/GenericResourceTest.java | 2 ++ .../VirtualNetworkGatewayTests.java | 4 ++++ 11 files changed, 31 insertions(+), 6 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index e25fc154fec9..7bb7b386ada5 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -270,7 +270,7 @@ com.azure.spring:spring-cloud-azure-stream-binder-servicebus-core;6.0.0;6.1.0-be com.azure.spring:spring-cloud-azure-stream-binder-servicebus;6.0.0;6.1.0-beta.1 com.azure.spring:spring-cloud-azure-testcontainers;6.0.0;6.1.0-beta.1 com.azure:azure-spring-data-cosmos;6.0.0;6.1.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager;2.56.0;2.57.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager;2.56.0;2.57.0 com.azure.resourcemanager:azure-resourcemanager-appplatform;2.51.0;2.52.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-appservice;2.54.1;2.55.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-authorization;2.53.6;2.54.0-beta.1 diff --git a/sdk/resourcemanager/azure-resourcemanager-perf/pom.xml b/sdk/resourcemanager/azure-resourcemanager-perf/pom.xml index 109ee9e2e85a..24e8ca2049d7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-perf/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-perf/pom.xml @@ -25,7 +25,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.57.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml index 733e4488ca95..6d831a3dec6c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml @@ -54,7 +54,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.57.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ResourceSampleTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ResourceSampleTests.java index 28ba7af4d010..3f94fca0e899 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ResourceSampleTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/ResourceSampleTests.java @@ -3,6 +3,7 @@ package com.azure.resourcemanager.samples; +import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.resources.samples.DeployUsingARMTemplate; import com.azure.resourcemanager.resources.samples.DeployUsingARMTemplateAsync; import com.azure.resourcemanager.resources.samples.DeployUsingARMTemplateWithDeploymentOperations; @@ -66,6 +67,7 @@ public void testDeployVirtualMachineUsingARMTemplate() throws IOException, Illeg } @Test + @DoNotRecord(skipInPlayback = true) public void testManageLocks() { Assertions.assertTrue(ManageLocks.runSample(azureResourceManager)); } diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/StorageSampleTests.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/StorageSampleTests.java index 757499fb4a86..411e032726a9 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/StorageSampleTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/test/java/com/azure/resourcemanager/samples/StorageSampleTests.java @@ -18,6 +18,7 @@ public void testManageStorageAccount() { } @Test + @DoNotRecord(skipInPlayback = true) public void testManageStorageAccountAsync() { Assertions.assertTrue(ManageStorageAccountAsync.runSample(azureResourceManager)); } diff --git a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md index 9697c6016574..82b5bb8de86c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.57.0-beta.1 (Unreleased) +## 2.57.0 (2025-11-25) ### azure-resourcemanager-containerregistry @@ -42,6 +42,18 @@ - Updated `api-version` to `2025-10-15` +### azure-resourcemanager-resources + +#### Other Changes + +- Optimized `AzureServiceClient` to load library versions during class initialization. + +### Other Changes + +#### Dependency Updates + +- Updated core dependency from resources. + ## 2.56.0 (2025-10-31) ### azure-resourcemanager-containerservice diff --git a/sdk/resourcemanager/azure-resourcemanager/README.md b/sdk/resourcemanager/azure-resourcemanager/README.md index 8d17aefba62a..ee877ed2878c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/README.md +++ b/sdk/resourcemanager/azure-resourcemanager/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.55.0</version> + <version>2.57.0</version> </dependency> ``` [//]: # ({x-version-update-end}) diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index 158429d8b1f0..84790fe1e79c 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -15,7 +15,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.57.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for Management</name> diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureResourceManagerTests.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureResourceManagerTests.java index 84c39165837e..3032cc9f69bc 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureResourceManagerTests.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/AzureResourceManagerTests.java @@ -539,6 +539,7 @@ public void testVMImages() throws ManagementException { * */ @Test + @DoNotRecord(skipInPlayback = true) public void testNetworkSecurityGroups() throws Exception { new TestNSG().runTest(azureResourceManager.networkSecurityGroups(), azureResourceManager.resourceGroups()); } @@ -680,6 +681,7 @@ public void testNetworks() throws Exception { * */ @Test + @DoNotRecord(skipInPlayback = true) public void testNetworkWithAccessFromServiceToSubnet() throws Exception { new TestNetwork().new WithAccessFromServiceToSubnet().runTest(azureResourceManager.networks(), azureResourceManager.resourceGroups()); @@ -690,6 +692,7 @@ public void testNetworkWithAccessFromServiceToSubnet() throws Exception { * */ @Test + @DoNotRecord(skipInPlayback = true) public void testNetworkPeerings() throws Exception { new TestNetwork().new WithPeering().runTest(azureResourceManager.networks(), azureResourceManager.resourceGroups()); @@ -973,6 +976,7 @@ public void testVirtualMachineSSh() throws Exception { * */ @Test + @DoNotRecord(skipInPlayback = true) public void testVirtualMachineSizes() throws Exception { new TestVirtualMachineSizes().runTest(azureResourceManager.virtualMachines(), azureResourceManager.resourceGroups()); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/GenericResourceTest.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/GenericResourceTest.java index 7b4504d6eabe..303c2e50b050 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/GenericResourceTest.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/GenericResourceTest.java @@ -11,6 +11,7 @@ import com.azure.core.http.policy.RetryPolicy; import com.azure.core.management.Region; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.appservice.fluent.models.SiteConfigResourceInner; import com.azure.resourcemanager.appservice.models.NetFrameworkVersion; import com.azure.resourcemanager.appservice.models.PricingTier; @@ -124,6 +125,7 @@ public void testResourceWithSpaceInName() { } @Test + @DoNotRecord(skipInPlayback = true) public void canGetDefaultApiVersionForChildResources() { // test privateDnsZones/virtualNetworkLinks which has the same child resource name as dnsForwardingRulesets/virtualNetworkLinks String vnetName = generateRandomResourceName("vnet", 15); diff --git a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/VirtualNetworkGatewayTests.java b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/VirtualNetworkGatewayTests.java index 01d71c216a84..137768a94047 100644 --- a/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/VirtualNetworkGatewayTests.java +++ b/sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/VirtualNetworkGatewayTests.java @@ -9,6 +9,7 @@ import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.test.annotation.DoNotRecord; import com.azure.resourcemanager.network.models.NetworkWatcher; import com.azure.resourcemanager.network.models.Troubleshooting; import com.azure.resourcemanager.network.models.VirtualNetworkGateway; @@ -127,6 +128,7 @@ public void testNetworkWatcherTroubleshooting() throws Exception { * @throws Exception */ @Test + @DoNotRecord(skipInPlayback = true) public void testVirtualNetworkGateways() throws Exception { new TestVirtualNetworkGateway().new Basic(azureResourceManager.virtualNetworkGateways().manager()) .runTest(azureResourceManager.virtualNetworkGateways(), azureResourceManager.resourceGroups()); @@ -139,6 +141,7 @@ public void testVirtualNetworkGateways() throws Exception { * @throws Exception */ @Test + @DoNotRecord(skipInPlayback = true) public void testVirtualNetworkGatewaySiteToSite() throws Exception { new TestVirtualNetworkGateway().new SiteToSite(azureResourceManager.virtualNetworkGateways().manager()) .runTest(azureResourceManager.virtualNetworkGateways(), azureResourceManager.resourceGroups()); @@ -151,6 +154,7 @@ public void testVirtualNetworkGatewaySiteToSite() throws Exception { * @throws Exception */ @Test + @DoNotRecord(skipInPlayback = true) public void testVirtualNetworkGatewayVNetToVNet() throws Exception { new TestVirtualNetworkGateway().new VNetToVNet(azureResourceManager.virtualNetworkGateways().manager()) .runTest(azureResourceManager.virtualNetworkGateways(), azureResourceManager.resourceGroups()); From 793d43a2f98be817da68e3096ab5bfd49a0bac81 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 25 Nov 2025 04:55:25 -0800 Subject: [PATCH 24/26] Increment package versions for resourcemanager releases (#47377) --- eng/versioning/version_client.txt | 2 +- sdk/batch/azure-compute-batch/pom.xml | 2 +- sdk/boms/spring-cloud-azure-dependencies/pom.xml | 2 +- sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml | 2 +- sdk/resourcemanager/azure-resourcemanager-perf/pom.xml | 2 +- .../azure-resourcemanager-samples/pom.xml | 2 +- sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md | 10 ++++++++++ sdk/resourcemanager/azure-resourcemanager/pom.xml | 2 +- .../azure-resourcemanager-servicelinker/pom.xml | 2 +- sdk/spring/spring-cloud-azure-resourcemanager/pom.xml | 2 +- 10 files changed, 19 insertions(+), 9 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 7bb7b386ada5..6ef300c042e5 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -270,7 +270,7 @@ com.azure.spring:spring-cloud-azure-stream-binder-servicebus-core;6.0.0;6.1.0-be com.azure.spring:spring-cloud-azure-stream-binder-servicebus;6.0.0;6.1.0-beta.1 com.azure.spring:spring-cloud-azure-testcontainers;6.0.0;6.1.0-beta.1 com.azure:azure-spring-data-cosmos;6.0.0;6.1.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager;2.56.0;2.57.0 +com.azure.resourcemanager:azure-resourcemanager;2.57.0;2.58.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-appplatform;2.51.0;2.52.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-appservice;2.54.1;2.55.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-authorization;2.53.6;2.54.0-beta.1 diff --git a/sdk/batch/azure-compute-batch/pom.xml b/sdk/batch/azure-compute-batch/pom.xml index 05c9ef370b6f..12d70cd6181a 100644 --- a/sdk/batch/azure-compute-batch/pom.xml +++ b/sdk/batch/azure-compute-batch/pom.xml @@ -85,7 +85,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.56.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/boms/spring-cloud-azure-dependencies/pom.xml b/sdk/boms/spring-cloud-azure-dependencies/pom.xml index ac25fa3c306a..431e67e86049 100644 --- a/sdk/boms/spring-cloud-azure-dependencies/pom.xml +++ b/sdk/boms/spring-cloud-azure-dependencies/pom.xml @@ -60,7 +60,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.56.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> </dependency> <!-- Spring Cloud Azure --> diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml b/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml index 3587ee0c7903..349e0fb60fb8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml @@ -73,7 +73,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.56.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> <scope>test</scope> </dependency> <dependency> diff --git a/sdk/resourcemanager/azure-resourcemanager-perf/pom.xml b/sdk/resourcemanager/azure-resourcemanager-perf/pom.xml index 24e8ca2049d7..550b785fe022 100644 --- a/sdk/resourcemanager/azure-resourcemanager-perf/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-perf/pom.xml @@ -25,7 +25,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> + <version>2.58.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml index 6d831a3dec6c..60dd74c01d58 100644 --- a/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager-samples/pom.xml @@ -54,7 +54,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> + <version>2.58.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> </dependency> <dependency> <groupId>com.azure.resourcemanager</groupId> diff --git a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md index 82b5bb8de86c..b1e987a8ac56 100644 --- a/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md +++ b/sdk/resourcemanager/azure-resourcemanager/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 2.58.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 2.57.0 (2025-11-25) ### azure-resourcemanager-containerregistry diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml index 84790fe1e79c..8bb051c44566 100644 --- a/sdk/resourcemanager/azure-resourcemanager/pom.xml +++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml @@ -15,7 +15,7 @@ <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> + <version>2.58.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;current} --> <packaging>jar</packaging> <name>Microsoft Azure SDK for Management</name> diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/pom.xml b/sdk/servicelinker/azure-resourcemanager-servicelinker/pom.xml index 8139f2eae215..5c911bac3db3 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/pom.xml +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/pom.xml @@ -73,7 +73,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.56.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> <scope>test</scope> </dependency> </dependencies> diff --git a/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml b/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml index dd69cfd3ad9d..273abe77f6ea 100644 --- a/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml +++ b/sdk/spring/spring-cloud-azure-resourcemanager/pom.xml @@ -47,7 +47,7 @@ <dependency> <groupId>com.azure.resourcemanager</groupId> <artifactId>azure-resourcemanager</artifactId> - <version>2.56.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> + <version>2.57.0</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} --> </dependency> <dependency> From 5d1c49b93a3d948247edd943166c76be0c47b666 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty <abhmohanty@microsoft.com> Date: Tue, 25 Nov 2025 13:15:37 -0500 Subject: [PATCH 25/26] Bail out from barriers when barriers hit 410 `Lease Not Found`. (#47232) * Enable 410-1022 on Head requests to bail out. * Bail fast on barrier on reads. * Enhance tests to ensure primary is contacted and barrier request count doesn't exceed a certain threshold. * Enhance tests to ensure barrier post the QuorumSelected phase is invoked. * Code comments * Adding a way to run tests against a multi-region Strong account. * Adding a way to run tests against a multi-region Strong account. * Validate sub-status code too. * Code cleanup. * Add CHANGELOG.md entry. * Modify barrier hit criteria. * Modify barrier hit criteria. * Add tests for barrier bail out in Bounded Staleness consistency. * Add tests for barrier bail out in Bounded Staleness consistency. * Refactoring * Addressing code comments. * Verify write barrier criteria. * Verify barrier bail out criteria. * Verify barrier bail out criteria. * Managing merge. * Fix compilation errors. * Fix tests. * Fix tests. * Addressing comments. * Addressing comments. * Addressing review comments. * Refactoring. * Addressing review comments. * Addressing review comments. * Addressing review comments. --- sdk/cosmos/azure-cosmos-tests/pom.xml | 15 +- .../cosmos/BailOutFromBarrierE2ETests.java | 543 ++++++++++++++++++ ...InjectionServerErrorRuleOnDirectTests.java | 6 +- .../directconnectivity/ReflectionUtils.java | 4 + .../StoreResponseInterceptorUtils.java | 149 +++++ .../com/azure/cosmos/rx/TestSuiteBase.java | 4 +- ...ier-testng.xml => multi-region-strong.xml} | 6 +- sdk/cosmos/azure-cosmos/CHANGELOG.md | 1 + .../directconnectivity/ConsistencyWriter.java | 139 ++++- .../directconnectivity/QuorumReader.java | 194 ++++++- .../directconnectivity/StoreReader.java | 52 +- .../directconnectivity/StoreResponse.java | 2 +- sdk/cosmos/live-platform-matrix.json | 10 +- 13 files changed, 1067 insertions(+), 58 deletions(-) create mode 100644 sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/BailOutFromBarrierE2ETests.java create mode 100644 sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/StoreResponseInterceptorUtils.java rename sdk/cosmos/azure-cosmos-tests/src/test/resources/{fault-injection-barrier-testng.xml => multi-region-strong.xml} (90%) diff --git a/sdk/cosmos/azure-cosmos-tests/pom.xml b/sdk/cosmos/azure-cosmos-tests/pom.xml index fc7765209c4d..3131458840f7 100644 --- a/sdk/cosmos/azure-cosmos-tests/pom.xml +++ b/sdk/cosmos/azure-cosmos-tests/pom.xml @@ -906,10 +906,10 @@ Licensed under the MIT License. </build> </profile> <profile> - <!-- integration tests, requires Cosmos DB endpoint --> - <id>fault-injection-barrier</id> + <!-- tests which target a multi-region strong Cosmos DB account --> + <id>multi-region-strong</id> <properties> - <test.groups>fault-injection-barrier</test.groups> + <test.groups>multi-region-strong</test.groups> </properties> <build> <plugins> @@ -919,9 +919,14 @@ Licensed under the MIT License. <version>3.5.3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} --> <configuration> <suiteXmlFiles> - <suiteXmlFile>src/test/resources/fault-injection-barrier-testng.xml</suiteXmlFile> + <suiteXmlFile>src/test/resources/multi-region-strong.xml</suiteXmlFile> </suiteXmlFiles> - + <systemPropertyVariables> + <COSMOS.CLIENT_LEAK_DETECTION_ENABLED>true</COSMOS.CLIENT_LEAK_DETECTION_ENABLED> + <io.netty.leakDetection.samplingInterval>1</io.netty.leakDetection.samplingInterval> + <io.netty.leakDetection.targetRecords>256</io.netty.leakDetection.targetRecords> + <io.netty.leakDetection.level>paranoid</io.netty.leakDetection.level> + </systemPropertyVariables> </configuration> </plugin> </plugins> diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/BailOutFromBarrierE2ETests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/BailOutFromBarrierE2ETests.java new file mode 100644 index 000000000000..92ced6c37405 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/BailOutFromBarrierE2ETests.java @@ -0,0 +1,543 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos; + +import com.azure.cosmos.implementation.AsyncDocumentClient; +import com.azure.cosmos.implementation.ClientSideRequestStatistics; +import com.azure.cosmos.implementation.DatabaseAccount; +import com.azure.cosmos.implementation.DatabaseAccountLocation; +import com.azure.cosmos.implementation.GlobalEndpointManager; +import com.azure.cosmos.implementation.HttpConstants; +import com.azure.cosmos.implementation.ImplementationBridgeHelpers; +import com.azure.cosmos.implementation.OperationType; +import com.azure.cosmos.implementation.Strings; +import com.azure.cosmos.implementation.directconnectivity.ConsistencyReader; +import com.azure.cosmos.implementation.directconnectivity.ConsistencyWriter; +import com.azure.cosmos.implementation.directconnectivity.StoreResponseDiagnostics; +import com.azure.cosmos.implementation.directconnectivity.StoreResponseInterceptorUtils; +import com.azure.cosmos.implementation.directconnectivity.StoreResultDiagnostics; +import com.azure.cosmos.models.CosmosItemResponse; +import com.azure.cosmos.models.PartitionKey; +import com.azure.cosmos.rx.TestSuiteBase; +import com.azure.cosmos.test.implementation.interceptor.CosmosInterceptorHelper; +import org.testng.SkipException; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Factory; +import org.testng.annotations.Test; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.fail; + +public class BailOutFromBarrierE2ETests extends TestSuiteBase { + + private static final ImplementationBridgeHelpers.CosmosAsyncClientHelper.CosmosAsyncClientAccessor cosmosAsyncClientAccessor + = ImplementationBridgeHelpers.CosmosAsyncClientHelper.getCosmosAsyncClientAccessor(); + + private volatile CosmosAsyncDatabase database; + private volatile CosmosAsyncContainer container; + private List<String> preferredRegions; + private Map<String, String> regionNameToEndpoint; + + @BeforeClass(groups = {"multi-region-strong"}) + public void beforeClass() { + + try (CosmosAsyncClient dummy = getClientBuilder().buildAsyncClient()) { + AsyncDocumentClient asyncDocumentClient = BridgeInternal.getContextClient(dummy); + GlobalEndpointManager globalEndpointManager = asyncDocumentClient.getGlobalEndpointManager(); + + DatabaseAccount databaseAccount = globalEndpointManager.getLatestDatabaseAccount(); + + AccountLevelLocationContext accountLevelContext = getAccountLevelLocationContext(databaseAccount, false); + + // Set preferred regions starting with secondary region + this.preferredRegions = new ArrayList<>(accountLevelContext.serviceOrderedReadableRegions); + if (this.preferredRegions.size() > 1) { + // Swap first and second to make secondary region preferred + String temp = this.preferredRegions.get(0); + this.preferredRegions.set(0, this.preferredRegions.get(1)); + this.preferredRegions.set(1, temp); + } + + this.regionNameToEndpoint = accountLevelContext.regionNameToEndpoint; + this.database = getSharedCosmosDatabase(dummy); + this.container = getSharedSinglePartitionCosmosContainer(dummy); + } + } + + @Factory(dataProvider = "clientBuildersWithDirectTcp") + public BailOutFromBarrierE2ETests(CosmosClientBuilder clientBuilder) { + super(clientBuilder); + } + + + /** + * Provides test scenarios for head request lease not found (410/1022) error handling. + * + * <p>Each scenario is defined by the following parameters:</p> + * <ul> + * <li><b>headFailureCount</b>: Number of Head requests that should fail with 410/1022 status codes</li> + * <li><b>operationTypeForWhichBarrierFlowIsTriggered</b>: The operation type (Create or Read) that triggers the barrier flow</li> + * <li><b>enterPostQuorumSelectionOnlyBarrierLoop</b>: Whether to enter the post quorum selection only barrier loop</li> + * <li><b>successfulHeadRequestCountWhichDontMeetBarrier</b>: Number of successful Head requests (204 status code) + * that don't meet barrier requirements before failures start</li> + * <li><b>isCrossRegionRetryExpected</b>: Whether a cross-region retry is expected for the scenario</li> + * <li><b>desiredClientLevelConsistency</b>: The desired client-level consistency (STRONG or BOUNDED_STALENESS)</li> + * </ul> + * + * <p><b>Important Notes:</b></p> + * <ul> + * <li>Scenarios are scoped to cases where document requests succeeded but barrier flows were triggered + * (excludes QuorumNotMet scenarios which scope all barriers to primary)</li> + * <li>Create operations tolerate up to 2 Head failures before failing with timeout</li> + * <li>Read operations tolerate 3-5 Head failures before requiring cross-region retry</li> + * <li>In the QuorumSelected phase, successful Head requests that don't meet barrier requirements are tolerated: + * <ul> + * <li>Up to 18 successful Head requests for BOUNDED_STALENESS consistency</li> + * <li>Up to 111 successful Head requests for STRONG consistency</li> + * </ul> + * (See QuorumReader - maxNumberOfReadBarrierReadRetries and maxBarrierRetriesForMultiRegion)</li> + * </ul> + * + * @return array of test scenario parameters for head request lease not found error handling + */ + @DataProvider(name = "headRequestLeaseNotFoundScenarios") + public static Object[][] headRequestLeaseNotFoundScenarios() { + + return new Object[][]{ + { 1, OperationType.Create, false, 0, false, null }, + { 2, OperationType.Create, false, 0, false, null }, + { 3, OperationType.Create, false, 0, false, null }, + { 4, OperationType.Create, false, 0, false, null }, + { 400, OperationType.Create, false, 0, false, null }, + { 1, OperationType.Read, false, 0, false, null }, + { 2, OperationType.Read, false, 0, false, null }, + { 3, OperationType.Read, false, 0, false, null }, + { 4, OperationType.Read, false, 0, true, null }, + { 400, OperationType.Read, false, 0, true, null }, + { 1, OperationType.Read, true, 18, false, ConsistencyLevel.BOUNDED_STALENESS }, + { 2, OperationType.Read, true, 18, false, ConsistencyLevel.BOUNDED_STALENESS }, + { 3, OperationType.Read, true, 18, false, ConsistencyLevel.BOUNDED_STALENESS }, + { 4, OperationType.Read, true, 18, false, ConsistencyLevel.BOUNDED_STALENESS }, + { 5, OperationType.Read, true, 18, true, ConsistencyLevel.BOUNDED_STALENESS }, + { 1, OperationType.Read, true, 18, false, ConsistencyLevel.STRONG }, + { 2, OperationType.Read, true, 18, false, ConsistencyLevel.STRONG }, + { 3, OperationType.Read, true, 18, false, ConsistencyLevel.STRONG }, + { 4, OperationType.Read, true, 18, true, ConsistencyLevel.STRONG }, + { 1, OperationType.Read, true, 108, false, ConsistencyLevel.STRONG }, + { 2, OperationType.Read, true, 108, false, ConsistencyLevel.STRONG }, + { 3, OperationType.Read, true, 108, false, ConsistencyLevel.STRONG }, + { 4, OperationType.Read, true, 108, false, ConsistencyLevel.STRONG }, + { 5, OperationType.Read, true, 108, true, ConsistencyLevel.STRONG } + }; + } + + /** + * Validates that the consistency layer properly handles lease not found (410/1022) errors during + * barrier head requests and implements appropriate bailout/retry strategies based on the failure count, + * operation type, and consistency level. + * + * <p>This test verifies the resilience and fault tolerance of the barrier flow mechanism in the + * consistency layer when head requests fail with lease not found errors. The barrier flow is triggered + * when documents requests succeed but additional head requests are needed to ensure consistency guarantees + * are met across replicas.</p> + * + * <p><b>Test Scenarios:</b></p> + * <ul> + * <li><b>Create Operations:</b> Can tolerate up to 2 head failures before timing out. Beyond this threshold, + * the operation fails with a 408 timeout status code with 1022 substatus.</li> + * <li><b>Read Operations:</b> Can tolerate 3-4 head failures within the same region. After 4 failures, + * the operation triggers a cross-region retry to ensure eventual consistency.</li> + * <li><b>Post-Quorum Selection Barrier Loop:</b> Tests scenarios where initial barriers pass but subsequent + * barriers in the quorum-selected phase encounter failures. The system tolerates different numbers of + * successful head requests that don't meet barrier requirements: + * <ul> + * <li>Up to 18 for BOUNDED_STALENESS consistency</li> + * <li>Up to 111 for STRONG consistency</li> + * </ul> + * </li> + * </ul> + * + * <p><b>Validation Steps:</b></p> + * <ol> + * <li>Creates a CosmosAsyncClient with the specified consistency level and preferred regions</li> + * <li>Intercepts store responses to inject controlled head request failures (410/1022)</li> + * <li>Executes the specified operation (Create or Read) that triggers the barrier flow</li> + * <li>Validates the operation completes successfully or fails appropriately based on failure count</li> + * <li>Examines diagnostics to verify: + * <ul> + * <li>Correct number of head requests were attempted</li> + * <li>Expected number of regions were contacted</li> + * <li>Primary replica was contacted when failures occurred</li> + * <li>No 410 errors reached the Create/Read operations themselves</li> + * </ul> + * </li> + * </ol> + * + * <p><b>Important Notes:</b></p> + * <ul> + * <li>Test scenarios are scoped to cases where document requests succeeded but barrier flows were triggered, + * excluding QuorumNotMet scenarios which scope all barriers to the primary region</li> + * <li>The test uses an interceptor client to inject failures at precise points in the barrier flow</li> + * <li>Cross-region retry is only expected for Read operations exceeding the failure threshold</li> + * <li>The test validates that the system never exposes 410/1022 errors to the application layer for + * the primary Create/Read operations - only head requests should encounter these errors</li> + * </ul> + * + * @param headFailureCount the number of head requests that should fail with 410/1022 status codes + * before the system either succeeds, times out, or retries in another region + * @param operationTypeForWhichBarrierFlowIsTriggered the type of operation (Create or Read) that triggers + * the barrier flow and determines retry behavior + * @param enterPostQuorumSelectionOnlyBarrierLoop if true, allows initial barriers to pass and only injects + * failures during the post-quorum selection barrier loop phase + * @param successfulHeadRequestCountWhichDontMeetBarrier the number of successful head requests (204 status) + * that don't meet barrier requirements before failures + * start being injected (only relevant when in post-quorum + * selection barrier loop) + * @param isCrossRegionRetryExpected whether the test expects a cross-region retry to occur based on the + * failure count and operation type + * @param consistencyLevelApplicableForTest the consistency level to configure on the test client (STRONG or + * BOUNDED_STALENESS), which affects barrier retry thresholds + * + * @throws Exception if the test setup fails or unexpected errors occur during test execution + * + * @see ConsistencyReader for barrier flow implementation in read path + * @see ConsistencyWriter for barrier flow implementation in write path + * @see StoreResponseInterceptorUtils for failure injection mechanisms + */ + @Test(groups = {"multi-region-strong"}, dataProvider = "headRequestLeaseNotFoundScenarios", timeOut = 2 * TIMEOUT, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void validateHeadRequestLeaseNotFoundBailout( + int headFailureCount, + OperationType operationTypeForWhichBarrierFlowIsTriggered, + boolean enterPostQuorumSelectionOnlyBarrierLoop, + int successfulHeadRequestCountWhichDontMeetBarrier, + boolean isCrossRegionRetryExpected, + ConsistencyLevel consistencyLevelApplicableForTest) throws Exception { + + CosmosAsyncClient targetClient = getClientBuilder() + .preferredRegions(this.preferredRegions) + .buildAsyncClient(); + + ConsistencyLevel effectiveConsistencyLevel + = cosmosAsyncClientAccessor.getEffectiveConsistencyLevel(targetClient, operationTypeForWhichBarrierFlowIsTriggered, null); + + ConnectionMode connectionModeOfClientUnderTest + = ConnectionMode.valueOf( + cosmosAsyncClientAccessor.getConnectionMode( + targetClient).toUpperCase()); + + if (!shouldTestExecutionHappen( + effectiveConsistencyLevel, + OperationType.Create.equals(operationTypeForWhichBarrierFlowIsTriggered) ? ConsistencyLevel.STRONG : ConsistencyLevel.BOUNDED_STALENESS, + consistencyLevelApplicableForTest, + connectionModeOfClientUnderTest)) { + + safeClose(targetClient); + + throw new SkipException("Skipping test for arguments: " + + " OperationType: " + operationTypeForWhichBarrierFlowIsTriggered + + " ConsistencyLevel: " + effectiveConsistencyLevel + + " ConnectionMode: " + connectionModeOfClientUnderTest + + " DesiredConsistencyLevel: " + consistencyLevelApplicableForTest); + } + + AtomicInteger successfulHeadCountTracker = new AtomicInteger(); + AtomicInteger failedHeadCountTracker = new AtomicInteger(); + + try { + + TestObject testObject = TestObject.create(); + + if (enterPostQuorumSelectionOnlyBarrierLoop) { + if (OperationType.Read.equals(operationTypeForWhichBarrierFlowIsTriggered)) { + CosmosInterceptorHelper.registerTransportClientInterceptor(targetClient, StoreResponseInterceptorUtils.forceSuccessfulBarriersOnReadUntilQuorumSelectionThenForceBarrierFailures( + effectiveConsistencyLevel, + this.regionNameToEndpoint.get(this.preferredRegions.get(0)), + successfulHeadRequestCountWhichDontMeetBarrier, + successfulHeadCountTracker, + headFailureCount, + failedHeadCountTracker, + HttpConstants.StatusCodes.GONE, + HttpConstants.SubStatusCodes.LEASE_NOT_FOUND + )); + } + } else { + if (OperationType.Create.equals(operationTypeForWhichBarrierFlowIsTriggered)) { + CosmosInterceptorHelper.registerTransportClientInterceptor(targetClient, StoreResponseInterceptorUtils.forceBarrierFollowedByBarrierFailure( + effectiveConsistencyLevel, + this.regionNameToEndpoint.get(this.preferredRegions.get(1)), + headFailureCount, + failedHeadCountTracker, + HttpConstants.StatusCodes.GONE, + HttpConstants.SubStatusCodes.LEASE_NOT_FOUND + )); + } else if (OperationType.Read.equals(operationTypeForWhichBarrierFlowIsTriggered)) { + CosmosInterceptorHelper.registerTransportClientInterceptor(targetClient, StoreResponseInterceptorUtils.forceBarrierFollowedByBarrierFailure( + effectiveConsistencyLevel, + this.regionNameToEndpoint.get(this.preferredRegions.get(0)), + headFailureCount, + failedHeadCountTracker, + HttpConstants.StatusCodes.GONE, + HttpConstants.SubStatusCodes.LEASE_NOT_FOUND + )); + } + } + + try { + CosmosAsyncDatabase targetAsyncDatabase = targetClient.getDatabase(this.database.getId()); + CosmosAsyncContainer targetContainer = targetAsyncDatabase.getContainer(this.container.getId()); + + Thread.sleep(5000); // Wait for collection to be available to be read + + // Assert based on operation type and failure count + if (operationTypeForWhichBarrierFlowIsTriggered == OperationType.Create) { + + // Perform the operation + CosmosItemResponse<?> response = targetContainer.createItem(testObject).block(); + + // For Create, Head can only fail up to 2 times before Create fails with a timeout + if (headFailureCount <= 1) { + // Should eventually succeed + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(HttpConstants.StatusCodes.CREATED); + + // Check diagnostics - should have contacted only one region for create + CosmosDiagnostics diagnostics = response.getDiagnostics(); + assertThat(diagnostics).isNotNull(); + + validateHeadRequestsInCosmosDiagnostics(diagnostics, 2, (2 + successfulHeadRequestCountWhichDontMeetBarrier)); + validateContactedRegions(diagnostics, 1); + } else { + // Should timeout with 408 + fail("Should have thrown timeout exception"); + } + } else { + + targetContainer.createItem(testObject).block(); + + CosmosItemResponse<TestObject> response + = targetContainer.readItem(testObject.getId(), new PartitionKey(testObject.getMypk()), TestObject.class).block(); + + // for Read, Head can fail up to 3 times and still succeed from the same region after which read has to go to another region + if (!isCrossRegionRetryExpected) { + // Should eventually succeed + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(HttpConstants.StatusCodes.OK); + + // Check diagnostics - should have contacted only one region for create + CosmosDiagnostics diagnostics = response.getDiagnostics(); + assertThat(diagnostics).isNotNull(); + + validateHeadRequestsInCosmosDiagnostics(diagnostics, 5, (5 + successfulHeadRequestCountWhichDontMeetBarrier)); + validateContactedRegions(diagnostics, 1); + } else { + // Should eventually succeed + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(HttpConstants.StatusCodes.OK); + + CosmosDiagnostics diagnostics = response.getDiagnostics(); + assertThat(diagnostics).isNotNull(); + + validateHeadRequestsInCosmosDiagnostics(diagnostics, 5, (5 + successfulHeadRequestCountWhichDontMeetBarrier)); + validateContactedRegions(diagnostics, 2); + } + } + + } catch (CosmosException e) { + // Expected for some scenarios + if (operationTypeForWhichBarrierFlowIsTriggered == OperationType.Create) { + + if (headFailureCount <= 1) { + fail("Should have succeeded for create with head failures less than or equal to 2"); + } else { + // Should get 408-1022 timeout + assertThat(e.getStatusCode()).isEqualTo(HttpConstants.StatusCodes.REQUEST_TIMEOUT); + assertThat(e.getSubStatusCode()).isEqualTo(HttpConstants.SubStatusCodes.LEASE_NOT_FOUND); + + CosmosDiagnostics diagnostics = e.getDiagnostics(); + + validateHeadRequestsInCosmosDiagnostics(diagnostics, 2, (2 + successfulHeadRequestCountWhichDontMeetBarrier)); + validateContactedRegions(diagnostics, 1); + } + } + + if (operationTypeForWhichBarrierFlowIsTriggered == OperationType.Read) { + fail("Read operation should have succeeded even with head failures through cross region retry."); + } + } + + } finally { + safeClose(targetClient); + } + } + + private void validateContactedRegions(CosmosDiagnostics diagnostics, int expectedRegionsContactedCount) { + + CosmosDiagnosticsContext cosmosDiagnosticsContext = diagnostics.getDiagnosticsContext(); + Collection<ClientSideRequestStatistics> clientSideRequestStatisticsCollection + = diagnostics.getClientSideRequestStatistics(); + + for (ClientSideRequestStatistics clientSideRequestStatistics : clientSideRequestStatisticsCollection) { + + Collection<ClientSideRequestStatistics.StoreResponseStatistics> storeResponseDiagnosticsList + = clientSideRequestStatistics.getResponseStatisticsList(); + + for (ClientSideRequestStatistics.StoreResponseStatistics storeResponseStatistics : storeResponseDiagnosticsList) { + if (storeResponseStatistics.getRequestOperationType() == OperationType.Create || storeResponseStatistics.getRequestOperationType() == OperationType.Read) { + + if (storeResponseStatistics.getStoreResult().getStoreResponseDiagnostics().getStatusCode() == 410) { + fail("Should not have encountered 410 for Create/Read operation"); + } + } + } + } + + assertThat(cosmosDiagnosticsContext).isNotNull(); + assertThat(cosmosDiagnosticsContext.getContactedRegionNames()).isNotNull(); + assertThat(cosmosDiagnosticsContext.getContactedRegionNames()).isNotEmpty(); + assertThat(cosmosDiagnosticsContext.getContactedRegionNames().size()).as("Mismatch in regions contacted.").isEqualTo(expectedRegionsContactedCount); + } + + private void validateHeadRequestsInCosmosDiagnostics( + CosmosDiagnostics diagnostics, + int maxExpectedHeadRequestCountWithLeaseNotFoundErrors, + int maxExpectedHeadRequestCount) { + + int actualHeadRequestCountWithLeaseNotFoundErrors = 0; + int actualHeadRequestCount = 0; + boolean primaryReplicaContacted = false; + + Collection<ClientSideRequestStatistics> clientSideRequestStatisticsCollection + = diagnostics.getClientSideRequestStatistics(); + + for (ClientSideRequestStatistics clientSideRequestStatistics : clientSideRequestStatisticsCollection) { + + Collection<ClientSideRequestStatistics.StoreResponseStatistics> storeResponseDiagnosticsList + = clientSideRequestStatistics.getResponseStatisticsList(); + + for (ClientSideRequestStatistics.StoreResponseStatistics storeResponseStatistics : storeResponseDiagnosticsList) { + if (storeResponseStatistics.getRequestOperationType() == OperationType.Create || storeResponseStatistics.getRequestOperationType() == OperationType.Read) { + + if (storeResponseStatistics.getStoreResult().getStoreResponseDiagnostics().getStatusCode() == 410) { + fail("Should not have encountered 410 for Create/Read operation"); + } + } + } + + Collection<ClientSideRequestStatistics.StoreResponseStatistics> supplementalResponseStatisticsList + = clientSideRequestStatistics.getSupplementalResponseStatisticsList(); + + for (ClientSideRequestStatistics.StoreResponseStatistics storeResponseStatistics : supplementalResponseStatisticsList) { + if (storeResponseStatistics.getRequestOperationType() == OperationType.Head) { + + StoreResultDiagnostics storeResultDiagnostics = storeResponseStatistics.getStoreResult(); + + assertThat(storeResultDiagnostics).isNotNull(); + + String storePhysicalAddressContacted + = storeResultDiagnostics.getStorePhysicalAddressAsString(); + + StoreResponseDiagnostics storeResponseDiagnostics + = storeResultDiagnostics.getStoreResponseDiagnostics(); + + assertThat(storeResponseDiagnostics).isNotNull(); + + actualHeadRequestCount++; + + if (storeResponseDiagnostics.getStatusCode() == HttpConstants.StatusCodes.GONE && storeResponseDiagnostics.getSubStatusCode() == HttpConstants.SubStatusCodes.LEASE_NOT_FOUND) { + actualHeadRequestCountWithLeaseNotFoundErrors++; + } + + if (isStorePhysicalAddressThatOfPrimaryReplica(storePhysicalAddressContacted)) { + primaryReplicaContacted = true; + } + } + } + } + + assertThat(actualHeadRequestCountWithLeaseNotFoundErrors).as("Head request failed count with 410/1022 should be greater than 1.").isGreaterThan(0); + assertThat(actualHeadRequestCountWithLeaseNotFoundErrors).as("Too many head request failed.").isLessThanOrEqualTo(maxExpectedHeadRequestCountWithLeaseNotFoundErrors); + assertThat(actualHeadRequestCount).as("Too many Head requests made perhaps due to real replication lag.").isLessThanOrEqualTo(maxExpectedHeadRequestCount + 10); + assertThat(primaryReplicaContacted).as("Primary replica should be contacted even when a single Head request sees a 410/1022").isTrue(); + } + + private AccountLevelLocationContext getAccountLevelLocationContext(DatabaseAccount databaseAccount, boolean writeOnly) { + Iterator<DatabaseAccountLocation> locationIterator = + writeOnly ? databaseAccount.getWritableLocations().iterator() : databaseAccount.getReadableLocations().iterator(); + + List<String> serviceOrderedReadableRegions = new ArrayList<>(); + List<String> serviceOrderedWriteableRegions = new ArrayList<>(); + Map<String, String> regionMap = new ConcurrentHashMap<>(); + + while (locationIterator.hasNext()) { + DatabaseAccountLocation accountLocation = locationIterator.next(); + regionMap.put(accountLocation.getName(), accountLocation.getEndpoint()); + + if (writeOnly) { + serviceOrderedWriteableRegions.add(accountLocation.getName()); + } else { + serviceOrderedReadableRegions.add(accountLocation.getName()); + } + } + + return new AccountLevelLocationContext( + serviceOrderedReadableRegions, + serviceOrderedWriteableRegions, + regionMap); + } + + private boolean shouldTestExecutionHappen( + ConsistencyLevel effectiveConsistencyLevel, + ConsistencyLevel minimumConsistencyLevel, + ConsistencyLevel consistencyLevelApplicableForTestScenario, + ConnectionMode connectionModeOfClientUnderTest) { + + if (!connectionModeOfClientUnderTest.name().equalsIgnoreCase(ConnectionMode.DIRECT.name())) { + return false; + } + + if (consistencyLevelApplicableForTestScenario != null) { + return consistencyLevelApplicableForTestScenario.equals(effectiveConsistencyLevel); + } + + return effectiveConsistencyLevel.compareTo(minimumConsistencyLevel) <= 0; + } + + private static boolean isStorePhysicalAddressThatOfPrimaryReplica(String storePhysicalAddress) { + + if (Strings.isNullOrEmpty(storePhysicalAddress)) { + return false; + } + + return storePhysicalAddress.endsWith("p/"); + } + + private static class AccountLevelLocationContext { + private final List<String> serviceOrderedReadableRegions; + private final List<String> serviceOrderedWriteableRegions; + private final Map<String, String> regionNameToEndpoint; + + public AccountLevelLocationContext( + List<String> serviceOrderedReadableRegions, + List<String> serviceOrderedWriteableRegions, + Map<String, String> regionNameToEndpoint) { + + this.serviceOrderedReadableRegions = serviceOrderedReadableRegions; + this.serviceOrderedWriteableRegions = serviceOrderedWriteableRegions; + this.regionNameToEndpoint = regionNameToEndpoint; + } + } + + @AfterClass(groups = {"multi-region-strong"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) + public void afterClass() {} +} diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/FaultInjectionServerErrorRuleOnDirectTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/FaultInjectionServerErrorRuleOnDirectTests.java index 58998a9ab6e4..08e1d7332eab 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/FaultInjectionServerErrorRuleOnDirectTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/FaultInjectionServerErrorRuleOnDirectTests.java @@ -84,7 +84,7 @@ public FaultInjectionServerErrorRuleOnDirectTests(CosmosClientBuilder clientBuil this.subscriberValidationTimeout = TIMEOUT; } - @BeforeClass(groups = {"multi-region", "long", "fast", "fi-multi-master", "fault-injection-barrier"}, timeOut = TIMEOUT) + @BeforeClass(groups = {"multi-region", "long", "fast", "fi-multi-master", "multi-region-strong"}, timeOut = TIMEOUT) public void beforeClass() { clientWithoutPreferredRegions = getClientBuilder() .preferredRegions(new ArrayList<>()) @@ -1057,7 +1057,7 @@ public void faultInjectionServerErrorRuleTests_HitLimit() throws JsonProcessingE } } - @AfterClass(groups = {"multi-region", "long", "fast", "fi-multi-master", "fault-injection-barrier"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) + @AfterClass(groups = {"multi-region", "long", "fast", "fi-multi-master", "multi-region-strong"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true) public void afterClass() { safeClose(clientWithoutPreferredRegions); } @@ -1475,7 +1475,7 @@ public void faultInjectionInjectTcpResponseDelay() throws JsonProcessingExceptio } } - @Test(groups = {"fault-injection-barrier"}, dataProvider = "barrierRequestServerErrorResponseProvider", timeOut = 2 * TIMEOUT) + @Test(groups = {"multi-region-strong"}, dataProvider = "barrierRequestServerErrorResponseProvider", timeOut = 2 * TIMEOUT) public void faultInjection_serverError_barrierRequest( OperationType operationType, FaultInjectionServerErrorType serverErrorType, diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/ReflectionUtils.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/ReflectionUtils.java index cf1110aec87f..fe01de341bc6 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/ReflectionUtils.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/ReflectionUtils.java @@ -309,6 +309,10 @@ public static StoreReader getStoreReader(ConsistencyReader consistencyReader) { return get(StoreReader.class, consistencyReader, "storeReader"); } + public static StoreReader getStoreReader(ConsistencyWriter consistencyWriter) { + return get(StoreReader.class, consistencyWriter, "storeReader"); + } + public static void setStoreReader(ConsistencyReader consistencyReader, StoreReader storeReader) { set(consistencyReader, storeReader, "storeReader"); } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/StoreResponseInterceptorUtils.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/StoreResponseInterceptorUtils.java new file mode 100644 index 000000000000..bdf0fee5cf86 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/StoreResponseInterceptorUtils.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.cosmos.implementation.directconnectivity; + +import com.azure.cosmos.ConsistencyLevel; +import com.azure.cosmos.implementation.OperationType; +import com.azure.cosmos.implementation.RxDocumentServiceRequest; +import com.azure.cosmos.implementation.Utils; + +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.BiFunction; + +public class StoreResponseInterceptorUtils { + + public static BiFunction<RxDocumentServiceRequest, StoreResponse, StoreResponse> forceBarrierFollowedByBarrierFailure( + ConsistencyLevel operationConsistencyLevel, + String regionName, + int maxAllowedFailureCount, + AtomicInteger failureCount, + int statusCode, + int subStatusCode) { + + return (request, storeResponse) -> { + + if (OperationType.Create.equals(request.getOperationType()) && regionName.equals(request.requestContext.regionalRoutingContextToRoute.getGatewayRegionalEndpoint().toString())) { + + long localLsn = Long.parseLong(storeResponse.getHeaderValue(WFConstants.BackendHeaders.LOCAL_LSN)); + long manipulatedGCLSN = localLsn - 1; + + storeResponse.setHeaderValue(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, String.valueOf(manipulatedGCLSN)); + + return storeResponse; + } + + if (OperationType.Read.equals(request.getOperationType()) && regionName.equals(request.requestContext.regionalRoutingContextToRoute.getGatewayRegionalEndpoint().toString())) { + + if (ConsistencyLevel.STRONG.equals(operationConsistencyLevel)) { + + long globalLsn = Long.parseLong(storeResponse.getHeaderValue(WFConstants.BackendHeaders.LSN)); + long itemLsn = Long.parseLong(storeResponse.getHeaderValue(WFConstants.BackendHeaders.ITEM_LSN)); + long manipulatedGlobalCommittedLSN = Math.min(globalLsn, itemLsn) - 1; + + storeResponse.setHeaderValue(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, String.valueOf(manipulatedGlobalCommittedLSN)); + + return storeResponse; + } else if (ConsistencyLevel.BOUNDED_STALENESS.equals(operationConsistencyLevel)) { + + long manipulatedItemLSN = -1; + long manipulatedGlobalLSN = 0; + + storeResponse.setHeaderValue(WFConstants.BackendHeaders.LSN, String.valueOf(manipulatedGlobalLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.LOCAL_LSN, String.valueOf(manipulatedGlobalLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.ITEM_LSN, String.valueOf(manipulatedItemLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.ITEM_LOCAL_LSN, String.valueOf(manipulatedItemLSN)); + + return storeResponse; + } + + return storeResponse; + } + + if (OperationType.Head.equals(request.getOperationType()) && regionName.equals(request.requestContext.regionalRoutingContextToRoute.getGatewayRegionalEndpoint().toString())) { + if (failureCount.incrementAndGet() <= maxAllowedFailureCount) { + throw Utils.createCosmosException(statusCode, subStatusCode, new Exception("An intercepted exception occurred. Check status and substatus code for details."), null); + } + } + + return storeResponse; + }; + } + + public static BiFunction<RxDocumentServiceRequest, StoreResponse, StoreResponse> forceSuccessfulBarriersOnReadUntilQuorumSelectionThenForceBarrierFailures( + ConsistencyLevel operationConsistencyLevel, + String regionName, + int allowedSuccessfulHeadRequestsWithoutBarrierBeingMet, + AtomicInteger successfulHeadRequestCount, + int maxAllowedFailureCount, + AtomicInteger failureCount, + int statusCode, + int subStatusCode) { + + return (request, storeResponse) -> { + + if (OperationType.Read.equals(request.getOperationType()) && regionName.equals(request.requestContext.regionalRoutingContextToRoute.getGatewayRegionalEndpoint().toString())) { + + if (ConsistencyLevel.STRONG.equals(operationConsistencyLevel)) { + + long globalLsn = Long.parseLong(storeResponse.getHeaderValue(WFConstants.BackendHeaders.LSN)); + long itemLsn = Long.parseLong(storeResponse.getHeaderValue(WFConstants.BackendHeaders.ITEM_LSN)); + long manipulatedGlobalCommittedLSN = Math.min(globalLsn, itemLsn) - 1; + + storeResponse.setHeaderValue(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, String.valueOf(manipulatedGlobalCommittedLSN)); + + return storeResponse; + } else if (ConsistencyLevel.BOUNDED_STALENESS.equals(operationConsistencyLevel)) { + + long manipulatedItemLSN = -1; + long manipulatedGlobalLSN = 0; + + storeResponse.setHeaderValue(WFConstants.BackendHeaders.LSN, String.valueOf(manipulatedGlobalLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.LOCAL_LSN, String.valueOf(manipulatedGlobalLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.ITEM_LSN, String.valueOf(manipulatedItemLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.ITEM_LOCAL_LSN, String.valueOf(manipulatedItemLSN)); + + return storeResponse; + } + + return storeResponse; + } + + if (OperationType.Head.equals(request.getOperationType()) && regionName.equals(request.requestContext.regionalRoutingContextToRoute.getGatewayRegionalEndpoint().toString())) { + + if (successfulHeadRequestCount.incrementAndGet() <= allowedSuccessfulHeadRequestsWithoutBarrierBeingMet) { + + if (ConsistencyLevel.STRONG.equals(operationConsistencyLevel)) { + + long localLsn = Long.parseLong(storeResponse.getHeaderValue(WFConstants.BackendHeaders.LOCAL_LSN)); + long itemLsn = Long.parseLong(storeResponse.getHeaderValue(WFConstants.BackendHeaders.ITEM_LSN)); + long manipulatedGCLSN = Math.min(localLsn, itemLsn) - 1; + + storeResponse.setHeaderValue(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN, String.valueOf(manipulatedGCLSN)); + + return storeResponse; + } else if (ConsistencyLevel.BOUNDED_STALENESS.equals(operationConsistencyLevel)) { + + long manipulatedItemLSN = -1; + long manipulatedGlobalLSN = -1; + + storeResponse.setHeaderValue(WFConstants.BackendHeaders.LSN, String.valueOf(manipulatedGlobalLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.LOCAL_LSN, String.valueOf(manipulatedGlobalLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.ITEM_LSN, String.valueOf(manipulatedItemLSN)); + storeResponse.setHeaderValue(WFConstants.BackendHeaders.ITEM_LOCAL_LSN, String.valueOf(manipulatedItemLSN)); + + return storeResponse; + } + + return storeResponse; + } + + if (failureCount.incrementAndGet() <= maxAllowedFailureCount) { + throw Utils.createCosmosException(statusCode, subStatusCode, new Exception("An intercepted exception occurred. Check status and substatus code for details."), null); + } + } + + return storeResponse; + }; + } +} diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/TestSuiteBase.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/TestSuiteBase.java index e4118eedc747..d4e06ca7407b 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/TestSuiteBase.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/TestSuiteBase.java @@ -205,7 +205,7 @@ public CosmosAsyncDatabase getDatabase(String id) { @BeforeSuite(groups = {"thinclient", "fast", "long", "direct", "multi-region", "multi-master", "flaky-multi-master", "emulator", "emulator-vnext", "split", "query", "cfp-split", "circuit-breaker-misc-gateway", "circuit-breaker-misc-direct", - "circuit-breaker-read-all-read-many", "fi-multi-master", "long-emulator", "fi-thinclient-multi-region", "fi-thinclient-multi-master", "fault-injection-barrier"}, timeOut = SUITE_SETUP_TIMEOUT) + "circuit-breaker-read-all-read-many", "fi-multi-master", "long-emulator", "fi-thinclient-multi-region", "fi-thinclient-multi-master", "multi-region-strong"}, timeOut = SUITE_SETUP_TIMEOUT) public void beforeSuite() { logger.info("beforeSuite Started"); @@ -223,7 +223,7 @@ public void beforeSuite() { @AfterSuite(groups = {"thinclient", "fast", "long", "direct", "multi-region", "multi-master", "flaky-multi-master", "emulator", "split", "query", "cfp-split", "circuit-breaker-misc-gateway", "circuit-breaker-misc-direct", - "circuit-breaker-read-all-read-many", "fi-multi-master", "long-emulator", "fi-thinclient-multi-region", "fi-thinclient-multi-master", "fault-injection-barrier"}, timeOut = SUITE_SHUTDOWN_TIMEOUT) + "circuit-breaker-read-all-read-many", "fi-multi-master", "long-emulator", "fi-thinclient-multi-region", "fi-thinclient-multi-master", "multi-region-strong"}, timeOut = SUITE_SHUTDOWN_TIMEOUT) public void afterSuite() { logger.info("afterSuite Started"); diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/resources/fault-injection-barrier-testng.xml b/sdk/cosmos/azure-cosmos-tests/src/test/resources/multi-region-strong.xml similarity index 90% rename from sdk/cosmos/azure-cosmos-tests/src/test/resources/fault-injection-barrier-testng.xml rename to sdk/cosmos/azure-cosmos-tests/src/test/resources/multi-region-strong.xml index 6444f7176010..9b8607cbf971 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/resources/fault-injection-barrier-testng.xml +++ b/sdk/cosmos/azure-cosmos-tests/src/test/resources/multi-region-strong.xml @@ -21,14 +21,14 @@ ~ SOFTWARE. --> <!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd"> -<suite name="fault-injection-barrier"> +<suite name="multi-region-strong"> <listeners> <listener class-name="com.azure.cosmos.CosmosNettyLeakDetectorFactory"/> </listeners> - <test name="fault-injection-barrier" group-by-instances="true"> + <test name="multi-region-strong" group-by-instances="true"> <groups> <run> - <include name="fault-injection-barrier"/> + <include name="multi-region-strong"/> </run> </groups> <packages> diff --git a/sdk/cosmos/azure-cosmos/CHANGELOG.md b/sdk/cosmos/azure-cosmos/CHANGELOG.md index b9a62661e695..47ca8bbf4b36 100644 --- a/sdk/cosmos/azure-cosmos/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos/CHANGELOG.md @@ -12,6 +12,7 @@ #### Other Changes * Enabled hostname validation for RNTBD connections to backend - [PR 47111](https://github.com/Azure/azure-sdk-for-java/pull/47111) * Changed to use incremental change feed to get partition key ranges. - [46810](https://github.com/Azure/azure-sdk-for-java/pull/46810) +* Optimized 410 `Lease Not Found` handling for Strong Consistency account by avoiding unnecessary retries in the barrier attainment flow. - [PR 47232](https://github.com/Azure/azure-sdk-for-java/pull/47232) ### 4.75.0 (2025-10-21) > [!IMPORTANT] diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/ConsistencyWriter.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/ConsistencyWriter.java index 92a781cf071c..86b3e6cd0346 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/ConsistencyWriter.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/ConsistencyWriter.java @@ -27,7 +27,6 @@ import com.azure.cosmos.implementation.Strings; import com.azure.cosmos.implementation.Utils; import com.azure.cosmos.implementation.apachecommons.collections.ComparatorUtils; -import com.azure.cosmos.implementation.directconnectivity.rntbd.ClosedClientTransportException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import reactor.core.Exceptions; @@ -46,11 +45,14 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; +import static com.azure.cosmos.implementation.Exceptions.isAvoidQuorumSelectionException; + /* * ConsistencyWriter has two modes for writing - local quorum-acked write and globally strong write. * @@ -149,6 +151,8 @@ Mono<StoreResponse> writePrivateAsync( TimeoutHelper timeout, boolean forceRefresh) { + final AtomicReference<CosmosException> cosmosExceptionValueHolder = new AtomicReference<>(null); + if (timeout.isElapsed() && // skip throwing RequestTimeout on first retry because the first retry with // force address refresh header can be critical to recover for example from @@ -280,7 +284,7 @@ Mono<StoreResponse> writePrivateAsync( false, primaryURI.get(), replicaStatusList); - return barrierForGlobalStrong(request, response); + return barrierForGlobalStrong(request, response, cosmosExceptionValueHolder); }) .doFinally(signalType -> { if (signalType != SignalType.CANCEL) { @@ -296,11 +300,16 @@ Mono<StoreResponse> writePrivateAsync( } else { Mono<RxDocumentServiceRequest> barrierRequestObs = BarrierRequestHelper.createAsync(this.diagnosticsClientContext, request, this.authorizationTokenProvider, null, request.requestContext.globalCommittedSelectedLSN); - return barrierRequestObs.flatMap(barrierRequest -> waitForWriteBarrierAsync(barrierRequest, request.requestContext.globalCommittedSelectedLSN) + return barrierRequestObs.flatMap(barrierRequest -> waitForWriteBarrierAsync(barrierRequest, request.requestContext.globalCommittedSelectedLSN, cosmosExceptionValueHolder) .flatMap(v -> { if (!v) { logger.info("ConsistencyWriter: Write barrier has not been met for global strong request. SelectedGlobalCommittedLsn: {}", request.requestContext.globalCommittedSelectedLSN); + + if (cosmosExceptionValueHolder.get() != null) { + return Mono.error(cosmosExceptionValueHolder.get()); + } + return Mono.error(new GoneException(RMResources.GlobalStrongWriteBarrierNotMet, HttpConstants.SubStatusCodes.GLOBAL_STRONG_WRITE_BARRIER_NOT_MET)); } @@ -324,7 +333,11 @@ boolean isGlobalStrongRequest(RxDocumentServiceRequest request, StoreResponse re return false; } - Mono<StoreResponse> barrierForGlobalStrong(RxDocumentServiceRequest request, StoreResponse response) { + Mono<StoreResponse> barrierForGlobalStrong( + RxDocumentServiceRequest request, + StoreResponse response, + AtomicReference<CosmosException> cosmosExceptionValueHolder) { + try { if (ReplicatedResourceClient.isGlobalStrongEnabled() && this.isGlobalStrongRequest(request, response)) { Utils.ValueHolder<Long> lsn = Utils.ValueHolder.initialize(-1L); @@ -355,12 +368,17 @@ Mono<StoreResponse> barrierForGlobalStrong(RxDocumentServiceRequest request, Sto request.requestContext.globalCommittedSelectedLSN); return barrierRequestObs.flatMap(barrierRequest -> { - Mono<Boolean> barrierWait = this.waitForWriteBarrierAsync(barrierRequest, request.requestContext.globalCommittedSelectedLSN); + Mono<Boolean> barrierWait = this.waitForWriteBarrierAsync(barrierRequest, request.requestContext.globalCommittedSelectedLSN, cosmosExceptionValueHolder); return barrierWait.flatMap(res -> { if (!res) { logger.error("ConsistencyWriter: Write barrier has not been met for global strong request. SelectedGlobalCommittedLsn: {}", request.requestContext.globalCommittedSelectedLSN); + + if (cosmosExceptionValueHolder.get() != null) { + return Mono.error(cosmosExceptionValueHolder.get()); + } + // RxJava1 doesn't allow throwing checked exception return Mono.error(new GoneException(RMResources.GlobalStrongWriteBarrierNotMet, HttpConstants.SubStatusCodes.GLOBAL_STRONG_WRITE_BARRIER_NOT_MET)); @@ -384,7 +402,11 @@ Mono<StoreResponse> barrierForGlobalStrong(RxDocumentServiceRequest request, Sto } } - private Mono<Boolean> waitForWriteBarrierAsync(RxDocumentServiceRequest barrierRequest, long selectedGlobalCommittedLsn) { + private Mono<Boolean> waitForWriteBarrierAsync( + RxDocumentServiceRequest barrierRequest, + long selectedGlobalCommittedLsn, + AtomicReference<CosmosException> cosmosExceptionValueHolder) { + AtomicInteger writeBarrierRetryCount = new AtomicInteger(ConsistencyWriter.MAX_NUMBER_OF_WRITE_BARRIER_READ_RETRIES); AtomicLong maxGlobalCommittedLsnReceived = new AtomicLong(0); return Flux.defer(() -> { @@ -392,6 +414,10 @@ private Mono<Boolean> waitForWriteBarrierAsync(RxDocumentServiceRequest barrierR return Flux.error(new RequestTimeoutException()); } + if (writeBarrierRetryCount.get() == 0) { + return Mono.just(false); + } + Mono<List<StoreResult>> storeResultListObs = this.storeReader.readMultipleReplicaAsync( barrierRequest, true /*allowPrimary*/, @@ -403,6 +429,27 @@ private Mono<Boolean> waitForWriteBarrierAsync(RxDocumentServiceRequest barrierR false /*forceReadAll*/); return storeResultListObs.flatMap( responses -> { + + boolean isAvoidQuorumSelectionStoreResult = false; + CosmosException cosmosExceptionFromStoreResult = null; + + for (StoreResult storeResult : responses) { + if (storeResult.isAvoidQuorumSelectionException) { + isAvoidQuorumSelectionStoreResult = true; + cosmosExceptionFromStoreResult = storeResult.getException(); + break; + } + } + + if (isAvoidQuorumSelectionStoreResult) { + writeBarrierRetryCount.decrementAndGet(); + return this.isBarrierMeetPossibleInPresenceOfAvoidQuorumSelectionException( + barrierRequest, + selectedGlobalCommittedLsn, + cosmosExceptionValueHolder, + cosmosExceptionFromStoreResult); + } + if (responses != null && responses.stream().anyMatch(response -> response.globalCommittedLSN >= selectedGlobalCommittedLsn)) { return Mono.just(Boolean.TRUE); } @@ -459,6 +506,86 @@ static void getLsnAndGlobalCommittedLsn(StoreResponse response, Utils.ValueHolde } } + private Mono<Boolean> isBarrierMeetPossibleInPresenceOfAvoidQuorumSelectionException( + RxDocumentServiceRequest barrierRequest, + long selectedGlobalCommittedLsn, + AtomicReference<CosmosException> cosmosExceptionValueHolder, + CosmosException cosmosExceptionInStoreResult) { + + AtomicBoolean bailFromWriteBarrierLoop = new AtomicBoolean(false); + + return performOptimisticBarrierOnPrimaryAndDetermineIfBarrierCanBeSatisfied( + barrierRequest, + selectedGlobalCommittedLsn, + cosmosExceptionValueHolder, + bailFromWriteBarrierLoop).flatMap(isBarrierFromPrimarySuccessful -> { + + if (isBarrierFromPrimarySuccessful) { + bailFromWriteBarrierLoop.set(true); + cosmosExceptionValueHolder.set(null); + + return Mono.just(true); + } + + if (bailFromWriteBarrierLoop.get()) { + bailFromWriteBarrierLoop.set(true); + cosmosExceptionValueHolder.set(Utils.createCosmosException( + HttpConstants.StatusCodes.REQUEST_TIMEOUT, + cosmosExceptionInStoreResult.getSubStatusCode(), + cosmosExceptionInStoreResult, + null)); + return Mono.just(false); + } else { + bailFromWriteBarrierLoop.set(false); + cosmosExceptionValueHolder.set(null); + return Mono.empty(); + } + }); + } + + private Mono<Boolean> performOptimisticBarrierOnPrimaryAndDetermineIfBarrierCanBeSatisfied( + RxDocumentServiceRequest barrierRequest, + long selectedGlobalCommittedLSN, + AtomicReference<CosmosException> cosmosExceptionValueHolder, + AtomicBoolean bailFromWriteBarrierLoop) { + + barrierRequest.requestContext.forceRefreshAddressCache = true; + Mono<StoreResult> storeResultObs = this.storeReader.readPrimaryAsync( + barrierRequest, true, false /*useSessionToken*/); + + return storeResultObs.flatMap(storeResult -> { + if (!storeResult.isValid) { + return Mono.just(false); + } + + boolean hasRequiredGlobalCommittedLsn = storeResult.globalCommittedLSN >= selectedGlobalCommittedLSN; + + barrierRequest.requestContext.forceRefreshAddressCache = false; + return Mono.just(hasRequiredGlobalCommittedLsn); + }) + .onErrorResume(throwable -> { + + barrierRequest.requestContext.forceRefreshAddressCache = false; + + if (throwable instanceof CosmosException) { + CosmosException cosmosException = Utils.as(throwable, CosmosException.class); + + if (isAvoidQuorumSelectionException(cosmosException)) { + + bailFromWriteBarrierLoop.set(true); + cosmosExceptionValueHolder.set(cosmosException); + return Mono.just(false); + } + + bailFromWriteBarrierLoop.set(false); + return Mono.just(false); + } + + bailFromWriteBarrierLoop.set(false); + return Mono.just(false); + }); + } + void startBackgroundAddressRefresh(RxDocumentServiceRequest request) { this.addressSelector.resolvePrimaryUriAsync(request, true) .publishOn(Schedulers.boundedElastic()) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/QuorumReader.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/QuorumReader.java index 1f01e66076d6..487d2184db39 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/QuorumReader.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/QuorumReader.java @@ -12,7 +12,6 @@ import com.azure.cosmos.implementation.Exceptions; import com.azure.cosmos.implementation.GoneException; import com.azure.cosmos.implementation.HttpConstants; -import com.azure.cosmos.implementation.ImplementationBridgeHelpers; import com.azure.cosmos.implementation.InternalServerErrorException; import com.azure.cosmos.implementation.Configs; import com.azure.cosmos.implementation.IAuthorizationTokenProvider; @@ -22,6 +21,7 @@ import com.azure.cosmos.implementation.RMResources; import com.azure.cosmos.implementation.RequestChargeTracker; import com.azure.cosmos.implementation.RxDocumentServiceRequest; +import com.azure.cosmos.implementation.Utils; import com.azure.cosmos.implementation.apachecommons.lang.tuple.Pair; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -32,10 +32,13 @@ import java.util.Comparator; import java.util.List; import java.util.Optional; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; +import static com.azure.cosmos.implementation.Exceptions.isAvoidQuorumSelectionException; import static com.azure.cosmos.implementation.Utils.ValueHolder; // @@ -135,6 +138,8 @@ public Mono<StoreResponse> readStrongAsync( final MutableVolatile<Boolean> shouldRetryOnSecondary = new MutableVolatile<>(false); final MutableVolatile<Boolean> hasPerformedReadFromPrimary = new MutableVolatile<>(false); final MutableVolatile<Boolean> includePrimary = new MutableVolatile<>(false); + final AtomicReference<CosmosException> cosmosExceptionValueHolder = new AtomicReference<>(null); + final AtomicBoolean bailOnBarrierValueHolder = new AtomicBoolean(false); return Flux.defer( // the following will be repeated till the repeat().takeUntil(.) condition is satisfied. @@ -149,7 +154,9 @@ public Mono<StoreResponse> readStrongAsync( entity, readQuorumValue, includePrimary.v, - readMode); + readMode, + cosmosExceptionValueHolder, + bailOnBarrierValueHolder); return secondaryQuorumReadResultObs.flux().flatMap( secondaryQuorumReadResult -> { @@ -185,7 +192,9 @@ public Mono<StoreResponse> readStrongAsync( readQuorumValue, secondaryQuorumReadResult.selectedLsn, secondaryQuorumReadResult.globalCommittedSelectedLsn, - readMode); + readMode, + cosmosExceptionValueHolder, + bailOnBarrierValueHolder); return readBarrierObs.flux().flatMap( readBarrier -> { @@ -291,11 +300,15 @@ public Mono<StoreResponse> readStrongAsync( .switchIfEmpty(Flux.defer(() -> { logger.info("Could not complete read quorum with read quorum value of {}", readQuorumValue); - return Flux.error(new GoneException( + if (cosmosExceptionValueHolder.get() != null) { + return Flux.error(cosmosExceptionValueHolder.get()); + } + + return Flux.error(new GoneException( String.format( RMResources.ReadQuorumNotMet, readQuorumValue), - HttpConstants.SubStatusCodes.READ_QUORUM_NOT_MET)); + HttpConstants.SubStatusCodes.READ_QUORUM_NOT_MET)); })) .take(1) .single(); @@ -305,7 +318,10 @@ private Mono<ReadQuorumResult> readQuorumAsync( RxDocumentServiceRequest entity, int readQuorum, boolean includePrimary, - ReadMode readMode) { + ReadMode readMode, + AtomicReference<CosmosException> cosmosExceptionValueHolder, + AtomicBoolean bailOnBarrierValueHolder) { + if (entity.requestContext.timeoutHelper.isElapsed()) { return Mono.error(new GoneException()); } @@ -327,9 +343,21 @@ private Mono<ReadQuorumResult> readQuorumAsync( Mono<RxDocumentServiceRequest> barrierRequestObs = BarrierRequestHelper.createAsync(this.diagnosticsClientContext, entity, this.authorizationTokenProvider, readLsn, globalCommittedLSN); return barrierRequestObs.flatMap( barrierRequest -> { - Mono<Boolean> waitForObs = this.waitForReadBarrierAsync(barrierRequest, false, readQuorum, readLsn, globalCommittedLSN, readMode); + Mono<Boolean> waitForObs = this.waitForReadBarrierAsync(barrierRequest, false, readQuorum, readLsn, globalCommittedLSN, readMode, cosmosExceptionValueHolder, bailOnBarrierValueHolder); return waitForObs.flatMap( waitFor -> { + + if (bailOnBarrierValueHolder.get() && cosmosExceptionValueHolder.get() != null) { + return Mono.just(new ReadQuorumResult( + entity.requestContext.requestChargeTracker, + ReadQuorumResultKind.QuorumNotPossibleInCurrentRegion, + readLsn, + globalCommittedLSN, + storeResult, + storeResponses, + cosmosExceptionValueHolder.get())); + } + if (!waitFor) { return Mono.just(new ReadQuorumResult( entity.requestContext.requestChargeTracker, @@ -616,7 +644,9 @@ private Mono<Boolean> waitForReadBarrierAsync( final int readQuorum, final long readBarrierLsn, final long targetGlobalCommittedLSN, - ReadMode readMode) { + ReadMode readMode, + AtomicReference<CosmosException> cosmosExceptionValueHolder, + AtomicBoolean bailFromReadBarrierLoopValueHolder) { AtomicInteger readBarrierRetryCount = new AtomicInteger(maxNumberOfReadBarrierReadRetries); AtomicInteger readBarrierRetryCountMultiRegion = new AtomicInteger(maxBarrierRetriesForMultiRegion); @@ -635,6 +665,32 @@ private Mono<Boolean> waitForReadBarrierAsync( return responsesObs.flux().flatMap( responses -> { + boolean isAvoidQuorumSelectionStoreResult = false; + CosmosException cosmosExceptionFromStoreResult = null; + + if (readBarrierRetryCount.get() == 0) { + return Mono.just(false); + } + + for (StoreResult storeResult : responses) { + if (storeResult.isAvoidQuorumSelectionException) { + isAvoidQuorumSelectionStoreResult = true; + cosmosExceptionFromStoreResult = storeResult.getException(); + break; + } + } + + if (isAvoidQuorumSelectionStoreResult) { + readBarrierRetryCount.decrementAndGet(); + return this.isBarrierMeetPossibleInPresenceOfAvoidQuorumSelectionException( + barrierRequest, + readBarrierLsn, + targetGlobalCommittedLSN, + cosmosExceptionValueHolder, + bailFromReadBarrierLoopValueHolder, + cosmosExceptionFromStoreResult); + } + long maxGlobalCommittedLsnInResponses = responses.size() > 0 ? responses.stream() .mapToLong(response -> response.globalCommittedLSN).max().getAsLong() : 0; @@ -677,6 +733,10 @@ private Mono<Boolean> waitForReadBarrierAsync( return Flux.just(true); } + if (bailFromReadBarrierLoopValueHolder.get()) { + return Flux.just(false); + } + // we will go into global strong read barrier mode for global strong requests after regular barrier calls have been exhausted. if (targetGlobalCommittedLSN > 0) { return Flux.defer(() -> { @@ -685,12 +745,39 @@ private Mono<Boolean> waitForReadBarrierAsync( return Flux.error(new GoneException()); } - Mono<List<StoreResult>> responsesObs = this.storeReader.readMultipleReplicaAsync( - barrierRequest, allowPrimary, readQuorum, - true /*required valid LSN*/, false /*useSessionToken*/, readMode, false /*checkMinLSN*/, true /*forceReadAll*/); + if (readBarrierRetryCountMultiRegion.get() == 0) { + return Flux.just(false); + } + + Mono<List<StoreResult>> responsesObs = this.storeReader.readMultipleReplicaAsync( + barrierRequest, allowPrimary, readQuorum, + true /*required valid LSN*/, false /*useSessionToken*/, readMode, false /*checkMinLSN*/, true /*forceReadAll*/); return responsesObs.flux().flatMap( responses -> { + + boolean isAvoidQuorumSelectionStoreResult = false; + CosmosException cosmosExceptionFromStoreResult = null; + + for (StoreResult storeResult : responses) { + if (storeResult.isAvoidQuorumSelectionException) { + isAvoidQuorumSelectionStoreResult = true; + cosmosExceptionFromStoreResult = storeResult.getException(); + break; + } + } + + if (isAvoidQuorumSelectionStoreResult) { + readBarrierRetryCountMultiRegion.getAndDecrement(); + return this.isBarrierMeetPossibleInPresenceOfAvoidQuorumSelectionException( + barrierRequest, + readBarrierLsn, + targetGlobalCommittedLSN, + cosmosExceptionValueHolder, + bailFromReadBarrierLoopValueHolder, + cosmosExceptionFromStoreResult); + } + long maxGlobalCommittedLsnInResponses = responses.size() > 0 ? responses.stream() .mapToLong(response -> response.globalCommittedLSN).max().getAsLong() : 0; @@ -823,6 +910,91 @@ private boolean isQuorumMet( return isQuorumMet; } + private Mono<Boolean> isBarrierMeetPossibleInPresenceOfAvoidQuorumSelectionException( + RxDocumentServiceRequest barrierRequest, + long readBarrierLsn, + long targetGlobalCommittedLSN, + AtomicReference<CosmosException> cosmosExceptionValueHolder, + AtomicBoolean bailFromReadBarrierLoop, + CosmosException cosmosExceptionInStoreResult) { + + return performBarrierOnPrimaryAndDetermineIfBarrierCanBeSatisfied( + barrierRequest, + true, + readBarrierLsn, + targetGlobalCommittedLSN, + cosmosExceptionValueHolder, + bailFromReadBarrierLoop).flatMap(isBarrierFromPrimarySuccessful -> { + + if (isBarrierFromPrimarySuccessful) { + bailFromReadBarrierLoop.set(true); + cosmosExceptionValueHolder.set(null); + + return Mono.just(true); + } + + if (bailFromReadBarrierLoop.get()) { + bailFromReadBarrierLoop.set(true); + cosmosExceptionValueHolder.set(Utils.createCosmosException( + HttpConstants.StatusCodes.SERVICE_UNAVAILABLE, + cosmosExceptionInStoreResult.getSubStatusCode(), + cosmosExceptionInStoreResult, + null)); + return Mono.just(false); + } else { + bailFromReadBarrierLoop.set(false); + cosmosExceptionValueHolder.set(null); + return Mono.empty(); + } + }); + } + + private Mono<Boolean> performBarrierOnPrimaryAndDetermineIfBarrierCanBeSatisfied( + RxDocumentServiceRequest barrierRequest, + boolean requiresValidLsn, + long readBarrierLsn, + long targetGlobalCommittedLSN, + AtomicReference<CosmosException> cosmosExceptionValueHolder, + AtomicBoolean bailFromReadBarrierLoop) { + + barrierRequest.requestContext.forceRefreshAddressCache = true; + Mono<StoreResult> storeResultObs = this.storeReader.readPrimaryAsync( + barrierRequest, requiresValidLsn, false /*useSessionToken*/); + + return storeResultObs.flatMap(storeResult -> { + if (!storeResult.isValid) { + return Mono.just(false); + } + + boolean hasRequiredLsn = storeResult.lsn >= readBarrierLsn; + boolean hasRequiredGlobalCommittedLsn = + targetGlobalCommittedLSN <= 0 || storeResult.globalCommittedLSN >= targetGlobalCommittedLSN; + + return Mono.just(hasRequiredLsn && hasRequiredGlobalCommittedLsn); + }) + .onErrorResume(throwable -> { + + barrierRequest.requestContext.forceRefreshAddressCache = false; + + if (throwable instanceof CosmosException) { + CosmosException cosmosException = Utils.as(throwable, CosmosException.class); + + if (isAvoidQuorumSelectionException(cosmosException)) { + + bailFromReadBarrierLoop.set(true); + cosmosExceptionValueHolder.set(cosmosException); + return Mono.just(false); + } + + bailFromReadBarrierLoop.set(false); + return Mono.just(false); + } + + bailFromReadBarrierLoop.set(false); + return Mono.just(false); + }); + } + private enum ReadQuorumResultKind { QuorumMet, QuorumSelected, diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreReader.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreReader.java index 5169dfb121a7..a6046151b23f 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreReader.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreReader.java @@ -281,36 +281,31 @@ private Flux<List<StoreResult>> readFromReplicas(List<StoreResult> resultCollect if (srr.isAvoidQuorumSelectionException) { - // todo: fail fast when barrier requests also hit isAvoidQuorumSelectionException? - // todo: https://github.com/Azure/azure-sdk-for-java/issues/46135 - if (!entity.isBarrierRequest) { + // isAvoidQuorumSelectionException is a special case where we want to enable the enclosing data plane operation + // to fail fast in the region where a quorum selection is being attempted + // no attempts to reselect quorum will be made + if (logger.isDebugEnabled()) { - // isAvoidQuorumSelectionException is a special case where we want to enable the enclosing data plane operation - // to fail fast in the region where a quorum selection is being attempted - // no attempts to reselect quorum will be made - if (logger.isDebugEnabled()) { + int statusCode = srr.getException() != null ? srr.getException().getStatusCode() : 0; + int subStatusCode = srr.getException() != null ? srr.getException().getSubStatusCode() : 0; - int statusCode = srr.getException() != null ? srr.getException().getStatusCode() : 0; - int subStatusCode = srr.getException() != null ? srr.getException().getSubStatusCode() : 0; - - logger.debug("An exception with error code [{}-{}] was observed which means quorum cannot be attained in the current region!", statusCode, subStatusCode); - } + logger.debug("An exception with error code [{}-{}] was observed which means quorum cannot be attained in the current region!", statusCode, subStatusCode); + } - if (!entity.requestContext.performedBackgroundAddressRefresh) { - this.startBackgroundAddressRefresh(entity); - entity.requestContext.performedBackgroundAddressRefresh = true; - } + if (!entity.requestContext.performedBackgroundAddressRefresh) { + this.startBackgroundAddressRefresh(entity); + entity.requestContext.performedBackgroundAddressRefresh = true; + } - // (collect quorum store results if possible) - // for QuorumReader (upstream) to make the final decision on quorum selection - resultCollector.add(srr); + // (collect quorum store results if possible) + // for QuorumReader (upstream) to make the final decision on quorum selection + resultCollector.add(srr); - // Remaining replicas - replicasToRead.set(replicaCountToRead - resultCollector.size()); + // Remaining replicas + replicasToRead.set(replicaCountToRead - resultCollector.size()); - // continue to the next store result - continue; - } + // continue to the next store result + continue; } if (srr.isValid) { @@ -687,6 +682,15 @@ private Mono<ReadReplicaResult> readPrimaryInternalAsync( true, primaryUriReference.get(), replicaStatusList); + + if (storeTaskException instanceof CosmosException) { + CosmosException cosmosException = (CosmosException) storeTaskException; + + if (com.azure.cosmos.implementation.Exceptions.isAvoidQuorumSelectionException(cosmosException)) { + return Mono.error(cosmosException); + } + } + return Mono.just(storeResult); } catch (CosmosException e) { // RxJava1 doesn't allow throwing checked exception from Observable operators diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreResponse.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreResponse.java index a4bab8f3edbe..a3da4b9c487e 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreResponse.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreResponse.java @@ -205,7 +205,7 @@ public String getHeaderValue(String attribute) { } //NOTE: only used for testing purpose to change the response header value - private void setHeaderValue(String headerName, String value) { + void setHeaderValue(String headerName, String value) { if (this.responseHeaderValues == null || this.responseHeaderNames.length != this.responseHeaderValues.length) { return; } diff --git a/sdk/cosmos/live-platform-matrix.json b/sdk/cosmos/live-platform-matrix.json index 96581316474d..e5771c249c1c 100644 --- a/sdk/cosmos/live-platform-matrix.json +++ b/sdk/cosmos/live-platform-matrix.json @@ -13,8 +13,8 @@ "-Pcircuit-breaker-misc-gateway": "CircuitBreakerMiscGateway", "-Pcircuit-breaker-read-all-read-many": "CircuitBreakerReadAllAndReadMany", "-Pmulti-region": "MultiRegion", + "-Pmulti-region-strong": "MultiRegionStrong", "-Plong": "Long", - "-Pfault-injection-barrier": "Fault-injection-barrier", "-DargLine=\"-Dazure.cosmos.directModeProtocol=Tcp\"": "TCP", "Session": "", "ubuntu": "", @@ -182,9 +182,13 @@ { "DESIRED_CONSISTENCIES": "[\"Strong\"]", "ACCOUNT_CONSISTENCY": "Strong", + "ArmConfig": { + "MultiRegion_Strong": { + "ArmTemplateParameters": "@{ enableMultipleWriteLocations = $false; defaultConsistencyLevel = 'Strong'; enableMultipleRegions = $true }" + } + }, "PROTOCOLS": "[\"Tcp\"]", - "ProfileFlag": [ "-Pfault-injection-barrier" ], - "ArmTemplateParameters": "@{ enableMultipleWriteLocations = $false; defaultConsistencyLevel = 'Strong'; enableMultipleRegions = $true }", + "ProfileFlag": [ "-Pmulti-region-strong" ], "Agent": { "ubuntu": { "OSVmImage": "env:LINUXVMIMAGE", "Pool": "env:LINUXPOOL" } } From 8190853356db73a47f7b7ced0b515785fa54f6e3 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty <abhmohanty@microsoft.com> Date: Tue, 25 Nov 2025 18:38:07 -0500 Subject: [PATCH 26/26] Addressing review comments. --- .../cosmos/BailOutFromBarrierE2ETests.java | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/BailOutFromBarrierE2ETests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/BailOutFromBarrierE2ETests.java index 92ced6c37405..7f2ab900f5cb 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/BailOutFromBarrierE2ETests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/BailOutFromBarrierE2ETests.java @@ -17,9 +17,17 @@ import com.azure.cosmos.implementation.directconnectivity.StoreResponseDiagnostics; import com.azure.cosmos.implementation.directconnectivity.StoreResponseInterceptorUtils; import com.azure.cosmos.implementation.directconnectivity.StoreResultDiagnostics; +import com.azure.cosmos.implementation.directconnectivity.WFConstants; import com.azure.cosmos.models.CosmosItemResponse; import com.azure.cosmos.models.PartitionKey; import com.azure.cosmos.rx.TestSuiteBase; +import com.azure.cosmos.test.faultinjection.CosmosFaultInjectionHelper; +import com.azure.cosmos.test.faultinjection.FaultInjectionConditionBuilder; +import com.azure.cosmos.test.faultinjection.FaultInjectionOperationType; +import com.azure.cosmos.test.faultinjection.FaultInjectionResultBuilders; +import com.azure.cosmos.test.faultinjection.FaultInjectionRule; +import com.azure.cosmos.test.faultinjection.FaultInjectionRuleBuilder; +import com.azure.cosmos.test.faultinjection.FaultInjectionServerErrorType; import com.azure.cosmos.test.implementation.interceptor.CosmosInterceptorHelper; import org.testng.SkipException; import org.testng.annotations.AfterClass; @@ -28,11 +36,14 @@ import org.testng.annotations.Factory; import org.testng.annotations.Test; +import java.time.Duration; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicInteger; @@ -381,6 +392,131 @@ public void validateHeadRequestLeaseNotFoundBailout( } } + @Test(groups = {"multi-region-strong"}, dataProvider = "headRequestLeaseNotFoundScenarios", timeOut = 2 * TIMEOUT, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void validateReadRequestBailOutWhenHitWithRUBasedThrottle() { + + CosmosAsyncClient targetClient = getClientBuilder() + .preferredRegions(this.preferredRegions) + .buildAsyncClient(); + + ConsistencyLevel effectiveConsistencyLevel + = cosmosAsyncClientAccessor.getEffectiveConsistencyLevel(targetClient, operationTypeForWhichBarrierFlowIsTriggered, null); + + ConnectionMode connectionModeOfClientUnderTest + = ConnectionMode.valueOf( + cosmosAsyncClientAccessor.getConnectionMode( + targetClient).toUpperCase()); + + if (!shouldTestExecutionHappen( + effectiveConsistencyLevel, + OperationType.Create.equals(operationTypeForWhichBarrierFlowIsTriggered) ? ConsistencyLevel.STRONG : ConsistencyLevel.BOUNDED_STALENESS, + consistencyLevelApplicableForTest, + connectionModeOfClientUnderTest)) { + + safeClose(targetClient); + + throw new SkipException("Skipping test for arguments: " + + " OperationType: " + operationTypeForWhichBarrierFlowIsTriggered + + " ConsistencyLevel: " + effectiveConsistencyLevel + + " ConnectionMode: " + connectionModeOfClientUnderTest + + " DesiredConsistencyLevel: " + consistencyLevelApplicableForTest); + } + + String serverGoneRuleId = "serverErrorRule-serverGone-" + UUID.randomUUID(); + FaultInjectionRule serverGoneErrorRule = + new FaultInjectionRuleBuilder(serverGoneRuleId) + .condition( + new FaultInjectionConditionBuilder() + .operationType(FaultInjectionOperationType.READ_ITEM) + .build() + ) + .result( + FaultInjectionResultBuilders + .getResultBuilder(FaultInjectionServerErrorType.GONE) + .times(1) + .build() + ) + .duration(Duration.ofMinutes(5)) + .build(); + + String tooManyRequestsRuleId = "serverErrorRule-tooManyRequests-" + UUID.randomUUID(); + FaultInjectionRule serverTooManyRequestsErrorRule = + new FaultInjectionRuleBuilder(tooManyRequestsRuleId) + .condition( + new FaultInjectionConditionBuilder() + .operationType(FaultInjectionOperationType.READ_ITEM) + .region(this.preferredRegions.get(0)) + .build() + ) + .result( + FaultInjectionResultBuilders + .getResultBuilder(FaultInjectionServerErrorType.TOO_MANY_REQUEST) + .build() + ) + .build(); + + CosmosFaultInjectionHelper.configureFaultInjectionRules(cosmosAsyncContainer, Arrays.asList(serverTooManyRequestsErrorRule)).block(); + + } + + @Test(groups = {"multi-region-strong"}, dataProvider = "headRequestLeaseNotFoundScenarios", timeOut = 2 * TIMEOUT, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void validateBarrierOnReadRequestBailOutWhenHitWithRUBasedThrottle() { + + CosmosAsyncClient targetClient = getClientBuilder() + .preferredRegions(this.preferredRegions) + .buildAsyncClient(); + + ConsistencyLevel effectiveConsistencyLevel + = cosmosAsyncClientAccessor.getEffectiveConsistencyLevel(targetClient, operationTypeForWhichBarrierFlowIsTriggered, null); + + ConnectionMode connectionModeOfClientUnderTest + = ConnectionMode.valueOf( + cosmosAsyncClientAccessor.getConnectionMode( + targetClient).toUpperCase()); + + if (!shouldTestExecutionHappen( + effectiveConsistencyLevel, + OperationType.Create.equals(operationTypeForWhichBarrierFlowIsTriggered) ? ConsistencyLevel.STRONG : ConsistencyLevel.BOUNDED_STALENESS, + consistencyLevelApplicableForTest, + connectionModeOfClientUnderTest)) { + + safeClose(targetClient); + + throw new SkipException("Skipping test for arguments: " + + " OperationType: " + operationTypeForWhichBarrierFlowIsTriggered + + " ConsistencyLevel: " + effectiveConsistencyLevel + + " ConnectionMode: " + connectionModeOfClientUnderTest + + " DesiredConsistencyLevel: " + consistencyLevelApplicableForTest); + } + + CosmosInterceptorHelper.registerTransportClientInterceptor(targetClient, (request, storeResponse) -> { + if (OperationType.Read.equals(request.getOperationType())) { + long lsn = storeResponse.getHeaderValue(WFConstants.BackendHeaders.LSN); + } + + return storeResponse; + }); + + + String tooManyRequestsRuleId = "serverErrorRule-tooManyRequests-" + UUID.randomUUID(); + FaultInjectionRule serverTooManyRequestsErrorRule = + new FaultInjectionRuleBuilder(tooManyRequestsRuleId) + .condition( + new FaultInjectionConditionBuilder() + .operationType(FaultInjectionOperationType.HEAD_COLLECTION) + .region(this.preferredRegions.get(0)) + .build() + ) + .result( + FaultInjectionResultBuilders + .getResultBuilder(FaultInjectionServerErrorType.TOO_MANY_REQUEST) + .build() + ) + .build(); + + CosmosFaultInjectionHelper.configureFaultInjectionRules(cosmosAsyncContainer, Arrays.asList(serverTooManyRequestsErrorRule)).block(); + } + private void validateContactedRegions(CosmosDiagnostics diagnostics, int expectedRegionsContactedCount) { CosmosDiagnosticsContext cosmosDiagnosticsContext = diagnostics.getDiagnosticsContext();